Skip to main content

fidl_next_fuchsia_driver_framework/
fidl_next_fuchsia_driver_framework.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    pub use fidl_next_common_fuchsia_driver_framework::natural::*;
8
9    #[derive(Debug, Default, PartialEq)]
10    pub struct DevfsAddArgs {
11        pub connector: ::core::option::Option<
12            ::fidl_next::ClientEnd<
13                ::fidl_next_fuchsia_device_fs::Connector,
14                ::fidl_next::fuchsia::zx::Channel,
15            >,
16        >,
17
18        pub class_name: ::core::option::Option<::std::string::String>,
19
20        pub inspect: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
21
22        pub connector_supports:
23            ::core::option::Option<::fidl_next_fuchsia_device_fs::natural::ConnectionType>,
24
25        pub controller_connector: ::core::option::Option<
26            ::fidl_next::ClientEnd<
27                ::fidl_next_fuchsia_device_fs::Connector,
28                ::fidl_next::fuchsia::zx::Channel,
29            >,
30        >,
31    }
32
33    impl DevfsAddArgs {
34        fn __max_ordinal(&self) -> usize {
35            if self.controller_connector.is_some() {
36                return 5;
37            }
38
39            if self.connector_supports.is_some() {
40                return 4;
41            }
42
43            if self.inspect.is_some() {
44                return 3;
45            }
46
47            if self.class_name.is_some() {
48                return 2;
49            }
50
51            if self.connector.is_some() {
52                return 1;
53            }
54
55            0
56        }
57    }
58
59    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DevfsAddArgs<'static>, ___E> for DevfsAddArgs
60    where
61        ___E: ::fidl_next::Encoder + ?Sized,
62        ___E: ::fidl_next::fuchsia::HandleEncoder,
63    {
64        #[inline]
65        fn encode(
66            mut self,
67            encoder: &mut ___E,
68            out: &mut ::core::mem::MaybeUninit<crate::wire::DevfsAddArgs<'static>>,
69            _: (),
70        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
71            ::fidl_next::munge!(let crate::wire::DevfsAddArgs { table } = out);
72
73            let max_ord = self.__max_ordinal();
74
75            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
76            ::fidl_next::Wire::zero_padding(&mut out);
77
78            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
79                ::fidl_next::wire::Envelope,
80            >(encoder, max_ord);
81
82            for i in 1..=max_ord {
83                match i {
84                    5 => {
85                        if let Some(value) = self.controller_connector.take() {
86                            ::fidl_next::wire::Envelope::encode_value::<
87                                ::fidl_next::ClientEnd<
88                                    ::fidl_next_fuchsia_device_fs::Connector,
89                                    ::fidl_next::wire::fuchsia::Channel,
90                                >,
91                                ___E,
92                            >(
93                                value, preallocated.encoder, &mut out, ()
94                            )?;
95                        } else {
96                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
97                        }
98                    }
99
100                    4 => {
101                        if let Some(value) = self.connector_supports.take() {
102                            ::fidl_next::wire::Envelope::encode_value::<
103                                ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
104                                ___E,
105                            >(
106                                value, preallocated.encoder, &mut out, ()
107                            )?;
108                        } else {
109                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
110                        }
111                    }
112
113                    3 => {
114                        if let Some(value) = self.inspect.take() {
115                            ::fidl_next::wire::Envelope::encode_value::<
116                                ::fidl_next::wire::fuchsia::Vmo,
117                                ___E,
118                            >(
119                                value, preallocated.encoder, &mut out, ()
120                            )?;
121                        } else {
122                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
123                        }
124                    }
125
126                    2 => {
127                        if let Some(value) = self.class_name.take() {
128                            ::fidl_next::wire::Envelope::encode_value::<
129                                ::fidl_next::wire::String<'static>,
130                                ___E,
131                            >(
132                                value, preallocated.encoder, &mut out, 255
133                            )?;
134                        } else {
135                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
136                        }
137                    }
138
139                    1 => {
140                        if let Some(value) = self.connector.take() {
141                            ::fidl_next::wire::Envelope::encode_value::<
142                                ::fidl_next::ClientEnd<
143                                    ::fidl_next_fuchsia_device_fs::Connector,
144                                    ::fidl_next::wire::fuchsia::Channel,
145                                >,
146                                ___E,
147                            >(
148                                value, preallocated.encoder, &mut out, ()
149                            )?;
150                        } else {
151                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
152                        }
153                    }
154
155                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
156                }
157                unsafe {
158                    preallocated.write_next(out.assume_init_ref());
159                }
160            }
161
162            ::fidl_next::wire::Table::encode_len(table, max_ord);
163
164            Ok(())
165        }
166    }
167
168    impl<'de> ::fidl_next::FromWire<crate::wire::DevfsAddArgs<'de>> for DevfsAddArgs {
169        #[inline]
170        fn from_wire(wire_: crate::wire::DevfsAddArgs<'de>) -> Self {
171            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
172
173            let connector = wire_.table.get(1);
174
175            let class_name = wire_.table.get(2);
176
177            let inspect = wire_.table.get(3);
178
179            let connector_supports = wire_.table.get(4);
180
181            let controller_connector = wire_.table.get(5);
182
183            Self {
184                connector: connector.map(|envelope| {
185                    ::fidl_next::FromWire::from_wire(unsafe {
186                        envelope.read_unchecked::<::fidl_next::ClientEnd<
187                            ::fidl_next_fuchsia_device_fs::Connector,
188                            ::fidl_next::wire::fuchsia::Channel,
189                        >>()
190                    })
191                }),
192
193                class_name: class_name.map(|envelope| {
194                    ::fidl_next::FromWire::from_wire(unsafe {
195                        envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
196                    })
197                }),
198
199                inspect: inspect.map(|envelope| {
200                    ::fidl_next::FromWire::from_wire(unsafe {
201                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
202                    })
203                }),
204
205                connector_supports: connector_supports.map(|envelope| {
206                    ::fidl_next::FromWire::from_wire(unsafe {
207                        envelope
208                            .read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
209                    })
210                }),
211
212                controller_connector: controller_connector.map(|envelope| {
213                    ::fidl_next::FromWire::from_wire(unsafe {
214                        envelope.read_unchecked::<::fidl_next::ClientEnd<
215                            ::fidl_next_fuchsia_device_fs::Connector,
216                            ::fidl_next::wire::fuchsia::Channel,
217                        >>()
218                    })
219                }),
220            }
221        }
222    }
223
224    #[derive(Debug, Default, PartialEq)]
225    pub struct PowerElementArgs {
226        pub control_client: ::core::option::Option<
227            ::fidl_next::ClientEnd<
228                ::fidl_next_fuchsia_power_broker::ElementControl,
229                ::fidl_next::fuchsia::zx::Channel,
230            >,
231        >,
232
233        pub runner_server: ::core::option::Option<
234            ::fidl_next::ServerEnd<
235                ::fidl_next_fuchsia_power_broker::ElementRunner,
236                ::fidl_next::fuchsia::zx::Channel,
237            >,
238        >,
239
240        pub lessor_client: ::core::option::Option<
241            ::fidl_next::ClientEnd<
242                ::fidl_next_fuchsia_power_broker::Lessor,
243                ::fidl_next::fuchsia::zx::Channel,
244            >,
245        >,
246
247        pub token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
248    }
249
250    impl PowerElementArgs {
251        fn __max_ordinal(&self) -> usize {
252            if self.token.is_some() {
253                return 4;
254            }
255
256            if self.lessor_client.is_some() {
257                return 3;
258            }
259
260            if self.runner_server.is_some() {
261                return 2;
262            }
263
264            if self.control_client.is_some() {
265                return 1;
266            }
267
268            0
269        }
270    }
271
272    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PowerElementArgs<'static>, ___E>
273        for PowerElementArgs
274    where
275        ___E: ::fidl_next::Encoder + ?Sized,
276        ___E: ::fidl_next::fuchsia::HandleEncoder,
277    {
278        #[inline]
279        fn encode(
280            mut self,
281            encoder: &mut ___E,
282            out: &mut ::core::mem::MaybeUninit<crate::wire::PowerElementArgs<'static>>,
283            _: (),
284        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
285            ::fidl_next::munge!(let crate::wire::PowerElementArgs { table } = out);
286
287            let max_ord = self.__max_ordinal();
288
289            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
290            ::fidl_next::Wire::zero_padding(&mut out);
291
292            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
293                ::fidl_next::wire::Envelope,
294            >(encoder, max_ord);
295
296            for i in 1..=max_ord {
297                match i {
298                    4 => {
299                        if let Some(value) = self.token.take() {
300                            ::fidl_next::wire::Envelope::encode_value::<
301                                ::fidl_next::wire::fuchsia::Event,
302                                ___E,
303                            >(
304                                value, preallocated.encoder, &mut out, ()
305                            )?;
306                        } else {
307                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
308                        }
309                    }
310
311                    3 => {
312                        if let Some(value) = self.lessor_client.take() {
313                            ::fidl_next::wire::Envelope::encode_value::<
314                                ::fidl_next::ClientEnd<
315                                    ::fidl_next_fuchsia_power_broker::Lessor,
316                                    ::fidl_next::wire::fuchsia::Channel,
317                                >,
318                                ___E,
319                            >(
320                                value, preallocated.encoder, &mut out, ()
321                            )?;
322                        } else {
323                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
324                        }
325                    }
326
327                    2 => {
328                        if let Some(value) = self.runner_server.take() {
329                            ::fidl_next::wire::Envelope::encode_value::<
330                                ::fidl_next::ServerEnd<
331                                    ::fidl_next_fuchsia_power_broker::ElementRunner,
332                                    ::fidl_next::wire::fuchsia::Channel,
333                                >,
334                                ___E,
335                            >(
336                                value, preallocated.encoder, &mut out, ()
337                            )?;
338                        } else {
339                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
340                        }
341                    }
342
343                    1 => {
344                        if let Some(value) = self.control_client.take() {
345                            ::fidl_next::wire::Envelope::encode_value::<
346                                ::fidl_next::ClientEnd<
347                                    ::fidl_next_fuchsia_power_broker::ElementControl,
348                                    ::fidl_next::wire::fuchsia::Channel,
349                                >,
350                                ___E,
351                            >(
352                                value, preallocated.encoder, &mut out, ()
353                            )?;
354                        } else {
355                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
356                        }
357                    }
358
359                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
360                }
361                unsafe {
362                    preallocated.write_next(out.assume_init_ref());
363                }
364            }
365
366            ::fidl_next::wire::Table::encode_len(table, max_ord);
367
368            Ok(())
369        }
370    }
371
372    impl<'de> ::fidl_next::FromWire<crate::wire::PowerElementArgs<'de>> for PowerElementArgs {
373        #[inline]
374        fn from_wire(wire_: crate::wire::PowerElementArgs<'de>) -> Self {
375            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
376
377            let control_client = wire_.table.get(1);
378
379            let runner_server = wire_.table.get(2);
380
381            let lessor_client = wire_.table.get(3);
382
383            let token = wire_.table.get(4);
384
385            Self {
386                control_client: control_client.map(|envelope| {
387                    ::fidl_next::FromWire::from_wire(unsafe {
388                        envelope.read_unchecked::<::fidl_next::ClientEnd<
389                            ::fidl_next_fuchsia_power_broker::ElementControl,
390                            ::fidl_next::wire::fuchsia::Channel,
391                        >>()
392                    })
393                }),
394
395                runner_server: runner_server.map(|envelope| {
396                    ::fidl_next::FromWire::from_wire(unsafe {
397                        envelope.read_unchecked::<::fidl_next::ServerEnd<
398                            ::fidl_next_fuchsia_power_broker::ElementRunner,
399                            ::fidl_next::wire::fuchsia::Channel,
400                        >>()
401                    })
402                }),
403
404                lessor_client: lessor_client.map(|envelope| {
405                    ::fidl_next::FromWire::from_wire(unsafe {
406                        envelope.read_unchecked::<::fidl_next::ClientEnd<
407                            ::fidl_next_fuchsia_power_broker::Lessor,
408                            ::fidl_next::wire::fuchsia::Channel,
409                        >>()
410                    })
411                }),
412
413                token: token.map(|envelope| {
414                    ::fidl_next::FromWire::from_wire(unsafe {
415                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
416                    })
417                }),
418            }
419        }
420    }
421
422    #[derive(Debug, PartialEq)]
423    #[repr(C)]
424    pub struct DriverResumeRequest {
425        pub power_element_lease: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
426    }
427
428    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>
429        for DriverResumeRequest
430    where
431        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
432        ___E: ::fidl_next::fuchsia::HandleEncoder,
433    {
434        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
435            Self,
436            crate::wire::DriverResumeRequest,
437        > = unsafe {
438            ::fidl_next::CopyOptimization::enable_if(
439            true
440
441                && <
442                    ::core::option::Option<::fidl_next::fuchsia::zx::EventPair> as ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEventPair, ___E>
443                >::COPY_OPTIMIZATION.is_enabled()
444
445        )
446        };
447
448        #[inline]
449        fn encode(
450            self,
451            encoder_: &mut ___E,
452            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverResumeRequest>,
453            _: (),
454        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
455            ::fidl_next::munge! {
456                let crate::wire::DriverResumeRequest {
457                    power_element_lease,
458
459                } = out_;
460            }
461
462            ::fidl_next::Encode::encode(
463                self.power_element_lease,
464                encoder_,
465                power_element_lease,
466                (),
467            )?;
468
469            let mut _field =
470                unsafe { ::fidl_next::Slot::new_unchecked(power_element_lease.as_mut_ptr()) };
471
472            Ok(())
473        }
474    }
475
476    unsafe impl<___E>
477        ::fidl_next::EncodeOption<
478            ::fidl_next::wire::Box<'static, crate::wire::DriverResumeRequest>,
479            ___E,
480        > for DriverResumeRequest
481    where
482        ___E: ::fidl_next::Encoder + ?Sized,
483        DriverResumeRequest: ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>,
484    {
485        #[inline]
486        fn encode_option(
487            this: ::core::option::Option<Self>,
488            encoder: &mut ___E,
489            out: &mut ::core::mem::MaybeUninit<
490                ::fidl_next::wire::Box<'static, crate::wire::DriverResumeRequest>,
491            >,
492            _: (),
493        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
494            if let Some(inner) = this {
495                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
496                ::fidl_next::wire::Box::encode_present(out);
497            } else {
498                ::fidl_next::wire::Box::encode_absent(out);
499            }
500
501            Ok(())
502        }
503    }
504
505    impl ::fidl_next::FromWire<crate::wire::DriverResumeRequest> for DriverResumeRequest {
506        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
507            crate::wire::DriverResumeRequest,
508            Self,
509        > = unsafe {
510            ::fidl_next::CopyOptimization::enable_if(
511            true
512
513                && <
514                    ::core::option::Option<::fidl_next::fuchsia::zx::EventPair> as ::fidl_next::FromWire<::fidl_next::wire::fuchsia::OptionalEventPair>
515                >::COPY_OPTIMIZATION.is_enabled()
516
517        )
518        };
519
520        #[inline]
521        fn from_wire(wire: crate::wire::DriverResumeRequest) -> Self {
522            Self { power_element_lease: ::fidl_next::FromWire::from_wire(wire.power_element_lease) }
523        }
524    }
525
526    #[doc = " Arguments for starting a driver.\n"]
527    #[derive(Debug, Default, PartialEq)]
528    pub struct DriverStartArgs {
529        pub node: ::core::option::Option<
530            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
531        >,
532
533        pub symbols: ::core::option::Option<::std::vec::Vec<crate::natural::NodeSymbol>>,
534
535        pub url: ::core::option::Option<::std::string::String>,
536
537        pub program: ::core::option::Option<::fidl_next_fuchsia_data::natural::Dictionary>,
538
539        pub incoming: ::core::option::Option<
540            ::std::vec::Vec<::fidl_next_fuchsia_component_runner::natural::ComponentNamespaceEntry>,
541        >,
542
543        pub outgoing_dir: ::core::option::Option<
544            ::fidl_next::ServerEnd<
545                ::fidl_next_fuchsia_io::Directory,
546                ::fidl_next::fuchsia::zx::Channel,
547            >,
548        >,
549
550        pub config: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
551
552        pub node_name: ::core::option::Option<::std::string::String>,
553
554        pub node_properties:
555            ::core::option::Option<::std::vec::Vec<crate::natural::NodePropertyEntry>>,
556
557        pub node_offers: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
558
559        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
560
561        pub node_properties_2:
562            ::core::option::Option<::std::vec::Vec<crate::natural::NodePropertyEntry2>>,
563
564        pub vmar: ::core::option::Option<::fidl_next::fuchsia::zx::Vmar>,
565
566        pub power_element_args: ::core::option::Option<crate::natural::PowerElementArgs>,
567
568        pub log_sink: ::core::option::Option<
569            ::fidl_next::ClientEnd<
570                ::fidl_next_fuchsia_logger::LogSink,
571                ::fidl_next::fuchsia::zx::Channel,
572            >,
573        >,
574    }
575
576    impl DriverStartArgs {
577        fn __max_ordinal(&self) -> usize {
578            if self.log_sink.is_some() {
579                return 15;
580            }
581
582            if self.power_element_args.is_some() {
583                return 14;
584            }
585
586            if self.vmar.is_some() {
587                return 13;
588            }
589
590            if self.node_properties_2.is_some() {
591                return 12;
592            }
593
594            if self.node_token.is_some() {
595                return 11;
596            }
597
598            if self.node_offers.is_some() {
599                return 10;
600            }
601
602            if self.node_properties.is_some() {
603                return 9;
604            }
605
606            if self.node_name.is_some() {
607                return 8;
608            }
609
610            if self.config.is_some() {
611                return 7;
612            }
613
614            if self.outgoing_dir.is_some() {
615                return 6;
616            }
617
618            if self.incoming.is_some() {
619                return 5;
620            }
621
622            if self.program.is_some() {
623                return 4;
624            }
625
626            if self.url.is_some() {
627                return 3;
628            }
629
630            if self.symbols.is_some() {
631                return 2;
632            }
633
634            if self.node.is_some() {
635                return 1;
636            }
637
638            0
639        }
640    }
641
642    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>
643        for DriverStartArgs
644    where
645        ___E: ::fidl_next::Encoder + ?Sized,
646        ___E: ::fidl_next::fuchsia::HandleEncoder,
647    {
648        #[inline]
649        fn encode(
650            mut self,
651            encoder: &mut ___E,
652            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartArgs<'static>>,
653            _: (),
654        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
655            ::fidl_next::munge!(let crate::wire::DriverStartArgs { table } = out);
656
657            let max_ord = self.__max_ordinal();
658
659            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
660            ::fidl_next::Wire::zero_padding(&mut out);
661
662            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
663                ::fidl_next::wire::Envelope,
664            >(encoder, max_ord);
665
666            for i in 1..=max_ord {
667                match i {
668                    15 => {
669                        if let Some(value) = self.log_sink.take() {
670                            ::fidl_next::wire::Envelope::encode_value::<
671                                ::fidl_next::ClientEnd<
672                                    ::fidl_next_fuchsia_logger::LogSink,
673                                    ::fidl_next::wire::fuchsia::Channel,
674                                >,
675                                ___E,
676                            >(
677                                value, preallocated.encoder, &mut out, ()
678                            )?;
679                        } else {
680                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
681                        }
682                    }
683
684                    14 => {
685                        if let Some(value) = self.power_element_args.take() {
686                            ::fidl_next::wire::Envelope::encode_value::<
687                                crate::wire::PowerElementArgs<'static>,
688                                ___E,
689                            >(
690                                value, preallocated.encoder, &mut out, ()
691                            )?;
692                        } else {
693                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
694                        }
695                    }
696
697                    13 => {
698                        if let Some(value) = self.vmar.take() {
699                            ::fidl_next::wire::Envelope::encode_value::<
700                                ::fidl_next::wire::fuchsia::Vmar,
701                                ___E,
702                            >(
703                                value, preallocated.encoder, &mut out, ()
704                            )?;
705                        } else {
706                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
707                        }
708                    }
709
710                    12 => {
711                        if let Some(value) = self.node_properties_2.take() {
712                            ::fidl_next::wire::Envelope::encode_value::<
713                                ::fidl_next::wire::Vector<
714                                    'static,
715                                    crate::wire::NodePropertyEntry2<'static>,
716                                >,
717                                ___E,
718                            >(
719                                value, preallocated.encoder, &mut out, (4294967295, ())
720                            )?;
721                        } else {
722                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
723                        }
724                    }
725
726                    11 => {
727                        if let Some(value) = self.node_token.take() {
728                            ::fidl_next::wire::Envelope::encode_value::<
729                                ::fidl_next::wire::fuchsia::Event,
730                                ___E,
731                            >(
732                                value, preallocated.encoder, &mut out, ()
733                            )?;
734                        } else {
735                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
736                        }
737                    }
738
739                    10 => {
740                        if let Some(value) = self.node_offers.take() {
741                            ::fidl_next::wire::Envelope::encode_value::<
742                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
743                                ___E,
744                            >(
745                                value, preallocated.encoder, &mut out, (128, ())
746                            )?;
747                        } else {
748                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
749                        }
750                    }
751
752                    9 => {
753                        if let Some(value) = self.node_properties.take() {
754                            ::fidl_next::wire::Envelope::encode_value::<
755                                ::fidl_next::wire::Vector<
756                                    'static,
757                                    crate::wire::NodePropertyEntry<'static>,
758                                >,
759                                ___E,
760                            >(
761                                value, preallocated.encoder, &mut out, (4294967295, ())
762                            )?;
763                        } else {
764                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
765                        }
766                    }
767
768                    8 => {
769                        if let Some(value) = self.node_name.take() {
770                            ::fidl_next::wire::Envelope::encode_value::<
771                                ::fidl_next::wire::String<'static>,
772                                ___E,
773                            >(
774                                value, preallocated.encoder, &mut out, 4294967295
775                            )?;
776                        } else {
777                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
778                        }
779                    }
780
781                    7 => {
782                        if let Some(value) = self.config.take() {
783                            ::fidl_next::wire::Envelope::encode_value::<
784                                ::fidl_next::wire::fuchsia::Vmo,
785                                ___E,
786                            >(
787                                value, preallocated.encoder, &mut out, ()
788                            )?;
789                        } else {
790                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
791                        }
792                    }
793
794                    6 => {
795                        if let Some(value) = self.outgoing_dir.take() {
796                            ::fidl_next::wire::Envelope::encode_value::<
797                                ::fidl_next::ServerEnd<
798                                    ::fidl_next_fuchsia_io::Directory,
799                                    ::fidl_next::wire::fuchsia::Channel,
800                                >,
801                                ___E,
802                            >(
803                                value, preallocated.encoder, &mut out, ()
804                            )?;
805                        } else {
806                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
807                        }
808                    }
809
810                    5 => {
811                        if let Some(value) = self.incoming.take() {
812                            ::fidl_next::wire::Envelope::encode_value::<::fidl_next::wire::Vector<'static, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'static>>, ___E>(
813                            value,
814                            preallocated.encoder,
815                            &mut out,
816                            (32, ()),
817                        )?;
818                        } else {
819                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
820                        }
821                    }
822
823                    4 => {
824                        if let Some(value) = self.program.take() {
825                            ::fidl_next::wire::Envelope::encode_value::<
826                                ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
827                                ___E,
828                            >(
829                                value, preallocated.encoder, &mut out, ()
830                            )?;
831                        } else {
832                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
833                        }
834                    }
835
836                    3 => {
837                        if let Some(value) = self.url.take() {
838                            ::fidl_next::wire::Envelope::encode_value::<
839                                ::fidl_next::wire::String<'static>,
840                                ___E,
841                            >(
842                                value, preallocated.encoder, &mut out, 4096
843                            )?;
844                        } else {
845                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
846                        }
847                    }
848
849                    2 => {
850                        if let Some(value) = self.symbols.take() {
851                            ::fidl_next::wire::Envelope::encode_value::<
852                                ::fidl_next::wire::Vector<
853                                    'static,
854                                    crate::wire::NodeSymbol<'static>,
855                                >,
856                                ___E,
857                            >(
858                                value, preallocated.encoder, &mut out, (64, ())
859                            )?;
860                        } else {
861                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
862                        }
863                    }
864
865                    1 => {
866                        if let Some(value) = self.node.take() {
867                            ::fidl_next::wire::Envelope::encode_value::<
868                                ::fidl_next::ClientEnd<
869                                    crate::Node,
870                                    ::fidl_next::wire::fuchsia::Channel,
871                                >,
872                                ___E,
873                            >(
874                                value, preallocated.encoder, &mut out, ()
875                            )?;
876                        } else {
877                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
878                        }
879                    }
880
881                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
882                }
883                unsafe {
884                    preallocated.write_next(out.assume_init_ref());
885                }
886            }
887
888            ::fidl_next::wire::Table::encode_len(table, max_ord);
889
890            Ok(())
891        }
892    }
893
894    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartArgs<'de>> for DriverStartArgs {
895        #[inline]
896        fn from_wire(wire_: crate::wire::DriverStartArgs<'de>) -> Self {
897            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
898
899            let node = wire_.table.get(1);
900
901            let symbols = wire_.table.get(2);
902
903            let url = wire_.table.get(3);
904
905            let program = wire_.table.get(4);
906
907            let incoming = wire_.table.get(5);
908
909            let outgoing_dir = wire_.table.get(6);
910
911            let config = wire_.table.get(7);
912
913            let node_name = wire_.table.get(8);
914
915            let node_properties = wire_.table.get(9);
916
917            let node_offers = wire_.table.get(10);
918
919            let node_token = wire_.table.get(11);
920
921            let node_properties_2 = wire_.table.get(12);
922
923            let vmar = wire_.table.get(13);
924
925            let power_element_args = wire_.table.get(14);
926
927            let log_sink = wire_.table.get(15);
928
929            Self {
930
931
932                node: node.map(|envelope| ::fidl_next::FromWire::from_wire(
933                    unsafe { envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>() }
934                )),
935
936
937                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
938                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>() }
939                )),
940
941
942                url: url.map(|envelope| ::fidl_next::FromWire::from_wire(
943                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
944                )),
945
946
947                program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
948                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
949                )),
950
951
952                incoming: incoming.map(|envelope| ::fidl_next::FromWire::from_wire(
953                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>>>() }
954                )),
955
956
957                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
958                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::wire::fuchsia::Channel>>() }
959                )),
960
961
962                config: config.map(|envelope| ::fidl_next::FromWire::from_wire(
963                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>() }
964                )),
965
966
967                node_name: node_name.map(|envelope| ::fidl_next::FromWire::from_wire(
968                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
969                )),
970
971
972                node_properties: node_properties.map(|envelope| ::fidl_next::FromWire::from_wire(
973                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>>() }
974                )),
975
976
977                node_offers: node_offers.map(|envelope| ::fidl_next::FromWire::from_wire(
978                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
979                )),
980
981
982                node_token: node_token.map(|envelope| ::fidl_next::FromWire::from_wire(
983                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>() }
984                )),
985
986
987                node_properties_2: node_properties_2.map(|envelope| ::fidl_next::FromWire::from_wire(
988                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>>() }
989                )),
990
991
992                vmar: vmar.map(|envelope| ::fidl_next::FromWire::from_wire(
993                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmar>() }
994                )),
995
996
997                power_element_args: power_element_args.map(|envelope| ::fidl_next::FromWire::from_wire(
998                    unsafe { envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>() }
999                )),
1000
1001
1002                log_sink: log_sink.map(|envelope| ::fidl_next::FromWire::from_wire(
1003                    unsafe { envelope.read_unchecked::<::fidl_next::ClientEnd<::fidl_next_fuchsia_logger::LogSink, ::fidl_next::wire::fuchsia::Channel>>() }
1004                )),
1005
1006        }
1007        }
1008    }
1009
1010    #[derive(Debug, PartialEq)]
1011    pub struct DriverStartRequest {
1012        pub start_args: crate::natural::DriverStartArgs,
1013    }
1014
1015    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
1016        for DriverStartRequest
1017    where
1018        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1019        ___E: ::fidl_next::Encoder,
1020        ___E: ::fidl_next::fuchsia::HandleEncoder,
1021    {
1022        #[inline]
1023        fn encode(
1024            self,
1025            encoder_: &mut ___E,
1026            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
1027            _: (),
1028        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1029            ::fidl_next::munge! {
1030                let crate::wire::DriverStartRequest {
1031                    start_args,
1032
1033                } = out_;
1034            }
1035
1036            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
1037
1038            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_args.as_mut_ptr()) };
1039
1040            Ok(())
1041        }
1042    }
1043
1044    unsafe impl<___E>
1045        ::fidl_next::EncodeOption<
1046            ::fidl_next::wire::Box<'static, crate::wire::DriverStartRequest<'static>>,
1047            ___E,
1048        > for DriverStartRequest
1049    where
1050        ___E: ::fidl_next::Encoder + ?Sized,
1051        DriverStartRequest: ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>,
1052    {
1053        #[inline]
1054        fn encode_option(
1055            this: ::core::option::Option<Self>,
1056            encoder: &mut ___E,
1057            out: &mut ::core::mem::MaybeUninit<
1058                ::fidl_next::wire::Box<'static, crate::wire::DriverStartRequest<'static>>,
1059            >,
1060            _: (),
1061        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1062            if let Some(inner) = this {
1063                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1064                ::fidl_next::wire::Box::encode_present(out);
1065            } else {
1066                ::fidl_next::wire::Box::encode_absent(out);
1067            }
1068
1069            Ok(())
1070        }
1071    }
1072
1073    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartRequest<'de>> for DriverStartRequest {
1074        #[inline]
1075        fn from_wire(wire: crate::wire::DriverStartRequest<'de>) -> Self {
1076            Self { start_args: ::fidl_next::FromWire::from_wire(wire.start_args) }
1077        }
1078    }
1079
1080    #[derive(Debug, PartialEq)]
1081    pub enum DriverResult {
1082        DriverStartedNodeToken(::fidl_next::fuchsia::zx::Event),
1083
1084        MatchError(::fidl_next::fuchsia::zx::Status),
1085
1086        StartError(::fidl_next::fuchsia::zx::Status),
1087
1088        UnknownOrdinal_(u64),
1089    }
1090
1091    impl DriverResult {
1092        pub fn is_unknown(&self) -> bool {
1093            #[allow(unreachable_patterns)]
1094            match self {
1095                Self::UnknownOrdinal_(_) => true,
1096                _ => false,
1097            }
1098        }
1099    }
1100
1101    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E> for DriverResult
1102    where
1103        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1104        ___E: ::fidl_next::Encoder,
1105        ___E: ::fidl_next::fuchsia::HandleEncoder,
1106    {
1107        #[inline]
1108        fn encode(
1109            self,
1110            encoder: &mut ___E,
1111            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverResult<'static>>,
1112            _: (),
1113        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1114            ::fidl_next::munge!(let crate::wire::DriverResult { raw, _phantom: _ } = out);
1115
1116            match self {
1117                Self::DriverStartedNodeToken(value) => ::fidl_next::wire::Union::encode_as::<
1118                    ___E,
1119                    ::fidl_next::wire::fuchsia::Event,
1120                >(
1121                    value, 1, encoder, raw, ()
1122                )?,
1123
1124                Self::MatchError(value) => ::fidl_next::wire::Union::encode_as::<
1125                    ___E,
1126                    ::fidl_next::wire::fuchsia::Status,
1127                >(value, 2, encoder, raw, ())?,
1128
1129                Self::StartError(value) => ::fidl_next::wire::Union::encode_as::<
1130                    ___E,
1131                    ::fidl_next::wire::fuchsia::Status,
1132                >(value, 3, encoder, raw, ())?,
1133
1134                Self::UnknownOrdinal_(ordinal) => {
1135                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1136                }
1137            }
1138
1139            Ok(())
1140        }
1141    }
1142
1143    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::DriverResult<'static>, ___E>
1144        for DriverResult
1145    where
1146        ___E: ?Sized,
1147        DriverResult: ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E>,
1148    {
1149        #[inline]
1150        fn encode_option(
1151            this: ::core::option::Option<Self>,
1152            encoder: &mut ___E,
1153            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DriverResult<'static>>,
1154            _: (),
1155        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1156            ::fidl_next::munge!(let crate::wire_optional::DriverResult { raw, _phantom: _ } = &mut *out);
1157
1158            if let Some(inner) = this {
1159                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1160                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1161            } else {
1162                ::fidl_next::wire::Union::encode_absent(raw);
1163            }
1164
1165            Ok(())
1166        }
1167    }
1168
1169    impl<'de> ::fidl_next::FromWire<crate::wire::DriverResult<'de>> for DriverResult {
1170        #[inline]
1171        fn from_wire(wire: crate::wire::DriverResult<'de>) -> Self {
1172            let wire = ::core::mem::ManuallyDrop::new(wire);
1173            match wire.raw.ordinal() {
1174                1 => Self::DriverStartedNodeToken(::fidl_next::FromWire::from_wire(unsafe {
1175                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1176                })),
1177
1178                2 => Self::MatchError(::fidl_next::FromWire::from_wire(unsafe {
1179                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
1180                })),
1181
1182                3 => Self::StartError(::fidl_next::FromWire::from_wire(unsafe {
1183                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
1184                })),
1185
1186                ord => return Self::UnknownOrdinal_(ord as u64),
1187            }
1188        }
1189    }
1190
1191    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>> for DriverResult {
1192        #[inline]
1193        fn from_wire_option(
1194            wire: crate::wire_optional::DriverResult<'de>,
1195        ) -> ::core::option::Option<Self> {
1196            if let Some(inner) = wire.into_option() {
1197                Some(::fidl_next::FromWire::from_wire(inner))
1198            } else {
1199                None
1200            }
1201        }
1202    }
1203
1204    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1205        for Box<DriverResult>
1206    {
1207        #[inline]
1208        fn from_wire_option(
1209            wire: crate::wire_optional::DriverResult<'de>,
1210        ) -> ::core::option::Option<Self> {
1211            <
1212            DriverResult as ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1213        >::from_wire_option(wire).map(Box::new)
1214        }
1215    }
1216
1217    #[doc = " Arguments for adding a node.\n"]
1218    #[derive(Debug, Default, PartialEq)]
1219    pub struct NodeAddArgs {
1220        pub name: ::core::option::Option<::std::string::String>,
1221
1222        pub symbols: ::core::option::Option<::std::vec::Vec<crate::natural::NodeSymbol>>,
1223
1224        pub properties: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty>>,
1225
1226        pub devfs_args: ::core::option::Option<crate::natural::DevfsAddArgs>,
1227
1228        pub offers2: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
1229
1230        pub bus_info: ::core::option::Option<crate::natural::BusInfo>,
1231
1232        pub properties2: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty2>>,
1233
1234        pub offers_dictionary:
1235            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
1236
1237        pub driver_host: ::core::option::Option<::std::string::String>,
1238    }
1239
1240    impl NodeAddArgs {
1241        fn __max_ordinal(&self) -> usize {
1242            if self.driver_host.is_some() {
1243                return 10;
1244            }
1245
1246            if self.offers_dictionary.is_some() {
1247                return 9;
1248            }
1249
1250            if self.properties2.is_some() {
1251                return 8;
1252            }
1253
1254            if self.bus_info.is_some() {
1255                return 7;
1256            }
1257
1258            if self.offers2.is_some() {
1259                return 6;
1260            }
1261
1262            if self.devfs_args.is_some() {
1263                return 5;
1264            }
1265
1266            if self.properties.is_some() {
1267                return 4;
1268            }
1269
1270            if self.symbols.is_some() {
1271                return 3;
1272            }
1273
1274            if self.name.is_some() {
1275                return 1;
1276            }
1277
1278            0
1279        }
1280    }
1281
1282    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E> for NodeAddArgs
1283    where
1284        ___E: ::fidl_next::Encoder + ?Sized,
1285        ___E: ::fidl_next::fuchsia::HandleEncoder,
1286    {
1287        #[inline]
1288        fn encode(
1289            mut self,
1290            encoder: &mut ___E,
1291            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddArgs<'static>>,
1292            _: (),
1293        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1294            ::fidl_next::munge!(let crate::wire::NodeAddArgs { table } = out);
1295
1296            let max_ord = self.__max_ordinal();
1297
1298            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1299            ::fidl_next::Wire::zero_padding(&mut out);
1300
1301            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1302                ::fidl_next::wire::Envelope,
1303            >(encoder, max_ord);
1304
1305            for i in 1..=max_ord {
1306                match i {
1307                    10 => {
1308                        if let Some(value) = self.driver_host.take() {
1309                            ::fidl_next::wire::Envelope::encode_value::<
1310                                ::fidl_next::wire::String<'static>,
1311                                ___E,
1312                            >(
1313                                value, preallocated.encoder, &mut out, 128
1314                            )?;
1315                        } else {
1316                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1317                        }
1318                    }
1319
1320                    9 => {
1321                        if let Some(value) = self.offers_dictionary.take() {
1322                            ::fidl_next::wire::Envelope::encode_value::<
1323                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1324                                ___E,
1325                            >(
1326                                value, preallocated.encoder, &mut out, ()
1327                            )?;
1328                        } else {
1329                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1330                        }
1331                    }
1332
1333                    8 => {
1334                        if let Some(value) = self.properties2.take() {
1335                            ::fidl_next::wire::Envelope::encode_value::<
1336                                ::fidl_next::wire::Vector<
1337                                    'static,
1338                                    crate::wire::NodeProperty2<'static>,
1339                                >,
1340                                ___E,
1341                            >(
1342                                value, preallocated.encoder, &mut out, (64, ())
1343                            )?;
1344                        } else {
1345                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1346                        }
1347                    }
1348
1349                    7 => {
1350                        if let Some(value) = self.bus_info.take() {
1351                            ::fidl_next::wire::Envelope::encode_value::<
1352                                crate::wire::BusInfo<'static>,
1353                                ___E,
1354                            >(
1355                                value, preallocated.encoder, &mut out, ()
1356                            )?;
1357                        } else {
1358                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1359                        }
1360                    }
1361
1362                    6 => {
1363                        if let Some(value) = self.offers2.take() {
1364                            ::fidl_next::wire::Envelope::encode_value::<
1365                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
1366                                ___E,
1367                            >(
1368                                value, preallocated.encoder, &mut out, (128, ())
1369                            )?;
1370                        } else {
1371                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1372                        }
1373                    }
1374
1375                    5 => {
1376                        if let Some(value) = self.devfs_args.take() {
1377                            ::fidl_next::wire::Envelope::encode_value::<
1378                                crate::wire::DevfsAddArgs<'static>,
1379                                ___E,
1380                            >(
1381                                value, preallocated.encoder, &mut out, ()
1382                            )?;
1383                        } else {
1384                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1385                        }
1386                    }
1387
1388                    4 => {
1389                        if let Some(value) = self.properties.take() {
1390                            ::fidl_next::wire::Envelope::encode_value::<
1391                                ::fidl_next::wire::Vector<
1392                                    'static,
1393                                    crate::wire::NodeProperty<'static>,
1394                                >,
1395                                ___E,
1396                            >(
1397                                value, preallocated.encoder, &mut out, (64, ())
1398                            )?;
1399                        } else {
1400                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1401                        }
1402                    }
1403
1404                    3 => {
1405                        if let Some(value) = self.symbols.take() {
1406                            ::fidl_next::wire::Envelope::encode_value::<
1407                                ::fidl_next::wire::Vector<
1408                                    'static,
1409                                    crate::wire::NodeSymbol<'static>,
1410                                >,
1411                                ___E,
1412                            >(
1413                                value, preallocated.encoder, &mut out, (64, ())
1414                            )?;
1415                        } else {
1416                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1417                        }
1418                    }
1419
1420                    1 => {
1421                        if let Some(value) = self.name.take() {
1422                            ::fidl_next::wire::Envelope::encode_value::<
1423                                ::fidl_next::wire::String<'static>,
1424                                ___E,
1425                            >(
1426                                value, preallocated.encoder, &mut out, 128
1427                            )?;
1428                        } else {
1429                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1430                        }
1431                    }
1432
1433                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1434                }
1435                unsafe {
1436                    preallocated.write_next(out.assume_init_ref());
1437                }
1438            }
1439
1440            ::fidl_next::wire::Table::encode_len(table, max_ord);
1441
1442            Ok(())
1443        }
1444    }
1445
1446    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddArgs<'de>> for NodeAddArgs {
1447        #[inline]
1448        fn from_wire(wire_: crate::wire::NodeAddArgs<'de>) -> Self {
1449            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1450
1451            let name = wire_.table.get(1);
1452
1453            let symbols = wire_.table.get(3);
1454
1455            let properties = wire_.table.get(4);
1456
1457            let devfs_args = wire_.table.get(5);
1458
1459            let offers2 = wire_.table.get(6);
1460
1461            let bus_info = wire_.table.get(7);
1462
1463            let properties2 = wire_.table.get(8);
1464
1465            let offers_dictionary = wire_.table.get(9);
1466
1467            let driver_host = wire_.table.get(10);
1468
1469            Self {
1470
1471
1472                name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1473                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1474                )),
1475
1476
1477                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
1478                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>() }
1479                )),
1480
1481
1482                properties: properties.map(|envelope| ::fidl_next::FromWire::from_wire(
1483                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>() }
1484                )),
1485
1486
1487                devfs_args: devfs_args.map(|envelope| ::fidl_next::FromWire::from_wire(
1488                    unsafe { envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>() }
1489                )),
1490
1491
1492                offers2: offers2.map(|envelope| ::fidl_next::FromWire::from_wire(
1493                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
1494                )),
1495
1496
1497                bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1498                    unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1499                )),
1500
1501
1502                properties2: properties2.map(|envelope| ::fidl_next::FromWire::from_wire(
1503                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>() }
1504                )),
1505
1506
1507                offers_dictionary: offers_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1508                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1509                )),
1510
1511
1512                driver_host: driver_host.map(|envelope| ::fidl_next::FromWire::from_wire(
1513                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1514                )),
1515
1516        }
1517        }
1518    }
1519
1520    #[doc = " Arguments for providing a resource.\n"]
1521    #[derive(Debug, Default, Clone, PartialEq)]
1522    pub struct ResourceArgs {
1523        pub name: ::core::option::Option<::std::string::String>,
1524
1525        pub properties: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty2>>,
1526
1527        pub offers: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
1528
1529        pub bus_info: ::core::option::Option<crate::natural::BusInfo>,
1530    }
1531
1532    impl ResourceArgs {
1533        fn __max_ordinal(&self) -> usize {
1534            if self.bus_info.is_some() {
1535                return 4;
1536            }
1537
1538            if self.offers.is_some() {
1539                return 3;
1540            }
1541
1542            if self.properties.is_some() {
1543                return 2;
1544            }
1545
1546            if self.name.is_some() {
1547                return 1;
1548            }
1549
1550            0
1551        }
1552    }
1553
1554    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E> for ResourceArgs
1555    where
1556        ___E: ::fidl_next::Encoder + ?Sized,
1557        ___E: ::fidl_next::fuchsia::HandleEncoder,
1558    {
1559        #[inline]
1560        fn encode(
1561            mut self,
1562            encoder: &mut ___E,
1563            out: &mut ::core::mem::MaybeUninit<crate::wire::ResourceArgs<'static>>,
1564            _: (),
1565        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1566            ::fidl_next::munge!(let crate::wire::ResourceArgs { table } = out);
1567
1568            let max_ord = self.__max_ordinal();
1569
1570            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1571            ::fidl_next::Wire::zero_padding(&mut out);
1572
1573            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1574                ::fidl_next::wire::Envelope,
1575            >(encoder, max_ord);
1576
1577            for i in 1..=max_ord {
1578                match i {
1579                    4 => {
1580                        if let Some(value) = self.bus_info.take() {
1581                            ::fidl_next::wire::Envelope::encode_value::<
1582                                crate::wire::BusInfo<'static>,
1583                                ___E,
1584                            >(
1585                                value, preallocated.encoder, &mut out, ()
1586                            )?;
1587                        } else {
1588                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1589                        }
1590                    }
1591
1592                    3 => {
1593                        if let Some(value) = self.offers.take() {
1594                            ::fidl_next::wire::Envelope::encode_value::<
1595                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
1596                                ___E,
1597                            >(
1598                                value, preallocated.encoder, &mut out, (128, ())
1599                            )?;
1600                        } else {
1601                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1602                        }
1603                    }
1604
1605                    2 => {
1606                        if let Some(value) = self.properties.take() {
1607                            ::fidl_next::wire::Envelope::encode_value::<
1608                                ::fidl_next::wire::Vector<
1609                                    'static,
1610                                    crate::wire::NodeProperty2<'static>,
1611                                >,
1612                                ___E,
1613                            >(
1614                                value, preallocated.encoder, &mut out, (64, ())
1615                            )?;
1616                        } else {
1617                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1618                        }
1619                    }
1620
1621                    1 => {
1622                        if let Some(value) = self.name.take() {
1623                            ::fidl_next::wire::Envelope::encode_value::<
1624                                ::fidl_next::wire::String<'static>,
1625                                ___E,
1626                            >(
1627                                value, preallocated.encoder, &mut out, 128
1628                            )?;
1629                        } else {
1630                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1631                        }
1632                    }
1633
1634                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1635                }
1636                unsafe {
1637                    preallocated.write_next(out.assume_init_ref());
1638                }
1639            }
1640
1641            ::fidl_next::wire::Table::encode_len(table, max_ord);
1642
1643            Ok(())
1644        }
1645    }
1646
1647    impl<'de> ::fidl_next::FromWire<crate::wire::ResourceArgs<'de>> for ResourceArgs {
1648        #[inline]
1649        fn from_wire(wire_: crate::wire::ResourceArgs<'de>) -> Self {
1650            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1651
1652            let name = wire_.table.get(1);
1653
1654            let properties = wire_.table.get(2);
1655
1656            let offers = wire_.table.get(3);
1657
1658            let bus_info = wire_.table.get(4);
1659
1660            Self {
1661
1662
1663                name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1664                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1665                )),
1666
1667
1668                properties: properties.map(|envelope| ::fidl_next::FromWire::from_wire(
1669                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>() }
1670                )),
1671
1672
1673                offers: offers.map(|envelope| ::fidl_next::FromWire::from_wire(
1674                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
1675                )),
1676
1677
1678                bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1679                    unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1680                )),
1681
1682        }
1683        }
1684    }
1685
1686    #[derive(Debug, PartialEq)]
1687    pub struct NodeProvideResourceRequest {
1688        pub resource: crate::natural::ResourceArgs,
1689
1690        pub controller:
1691            ::fidl_next::ServerEnd<crate::ResourceController, ::fidl_next::fuchsia::zx::Channel>,
1692    }
1693
1694    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
1695        for NodeProvideResourceRequest
1696    where
1697        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1698        ___E: ::fidl_next::Encoder,
1699        ___E: ::fidl_next::fuchsia::HandleEncoder,
1700    {
1701        #[inline]
1702        fn encode(
1703            self,
1704            encoder_: &mut ___E,
1705            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
1706            _: (),
1707        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1708            ::fidl_next::munge! {
1709                let crate::wire::NodeProvideResourceRequest {
1710                    resource,
1711                    controller,
1712
1713                } = out_;
1714            }
1715
1716            ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
1717
1718            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resource.as_mut_ptr()) };
1719
1720            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1721
1722            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1723
1724            Ok(())
1725        }
1726    }
1727
1728    unsafe impl<___E>
1729        ::fidl_next::EncodeOption<
1730            ::fidl_next::wire::Box<'static, crate::wire::NodeProvideResourceRequest<'static>>,
1731            ___E,
1732        > for NodeProvideResourceRequest
1733    where
1734        ___E: ::fidl_next::Encoder + ?Sized,
1735        NodeProvideResourceRequest:
1736            ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>,
1737    {
1738        #[inline]
1739        fn encode_option(
1740            this: ::core::option::Option<Self>,
1741            encoder: &mut ___E,
1742            out: &mut ::core::mem::MaybeUninit<
1743                ::fidl_next::wire::Box<'static, crate::wire::NodeProvideResourceRequest<'static>>,
1744            >,
1745            _: (),
1746        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1747            if let Some(inner) = this {
1748                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1749                ::fidl_next::wire::Box::encode_present(out);
1750            } else {
1751                ::fidl_next::wire::Box::encode_absent(out);
1752            }
1753
1754            Ok(())
1755        }
1756    }
1757
1758    impl<'de> ::fidl_next::FromWire<crate::wire::NodeProvideResourceRequest<'de>>
1759        for NodeProvideResourceRequest
1760    {
1761        #[inline]
1762        fn from_wire(wire: crate::wire::NodeProvideResourceRequest<'de>) -> Self {
1763            Self {
1764                resource: ::fidl_next::FromWire::from_wire(wire.resource),
1765
1766                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1767            }
1768        }
1769    }
1770
1771    #[derive(Debug, PartialEq)]
1772    pub struct NodeAddChildRequest {
1773        pub args: crate::natural::NodeAddArgs,
1774
1775        pub controller:
1776            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1777
1778        pub node: ::core::option::Option<
1779            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1780        >,
1781    }
1782
1783    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
1784        for NodeAddChildRequest
1785    where
1786        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1787        ___E: ::fidl_next::Encoder,
1788        ___E: ::fidl_next::fuchsia::HandleEncoder,
1789    {
1790        #[inline]
1791        fn encode(
1792            self,
1793            encoder_: &mut ___E,
1794            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
1795            _: (),
1796        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1797            ::fidl_next::munge! {
1798                let crate::wire::NodeAddChildRequest {
1799                    args,
1800                    controller,
1801                    node,
1802
1803                } = out_;
1804            }
1805
1806            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
1807
1808            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
1809
1810            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1811
1812            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1813
1814            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1815
1816            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1817
1818            Ok(())
1819        }
1820    }
1821
1822    unsafe impl<___E>
1823        ::fidl_next::EncodeOption<
1824            ::fidl_next::wire::Box<'static, crate::wire::NodeAddChildRequest<'static>>,
1825            ___E,
1826        > for NodeAddChildRequest
1827    where
1828        ___E: ::fidl_next::Encoder + ?Sized,
1829        NodeAddChildRequest: ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>,
1830    {
1831        #[inline]
1832        fn encode_option(
1833            this: ::core::option::Option<Self>,
1834            encoder: &mut ___E,
1835            out: &mut ::core::mem::MaybeUninit<
1836                ::fidl_next::wire::Box<'static, crate::wire::NodeAddChildRequest<'static>>,
1837            >,
1838            _: (),
1839        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1840            if let Some(inner) = this {
1841                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1842                ::fidl_next::wire::Box::encode_present(out);
1843            } else {
1844                ::fidl_next::wire::Box::encode_absent(out);
1845            }
1846
1847            Ok(())
1848        }
1849    }
1850
1851    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddChildRequest<'de>> for NodeAddChildRequest {
1852        #[inline]
1853        fn from_wire(wire: crate::wire::NodeAddChildRequest<'de>) -> Self {
1854            Self {
1855                args: ::fidl_next::FromWire::from_wire(wire.args),
1856
1857                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1858
1859                node: ::fidl_next::FromWire::from_wire(wire.node),
1860            }
1861        }
1862    }
1863
1864    #[derive(Debug, Default, PartialEq)]
1865    pub struct NodeControllerOnBindRequest {
1866        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
1867    }
1868
1869    impl NodeControllerOnBindRequest {
1870        fn __max_ordinal(&self) -> usize {
1871            if self.node_token.is_some() {
1872                return 1;
1873            }
1874
1875            0
1876        }
1877    }
1878
1879    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeControllerOnBindRequest<'static>, ___E>
1880        for NodeControllerOnBindRequest
1881    where
1882        ___E: ::fidl_next::Encoder + ?Sized,
1883        ___E: ::fidl_next::fuchsia::HandleEncoder,
1884    {
1885        #[inline]
1886        fn encode(
1887            mut self,
1888            encoder: &mut ___E,
1889            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeControllerOnBindRequest<'static>>,
1890            _: (),
1891        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1892            ::fidl_next::munge!(let crate::wire::NodeControllerOnBindRequest { table } = out);
1893
1894            let max_ord = self.__max_ordinal();
1895
1896            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1897            ::fidl_next::Wire::zero_padding(&mut out);
1898
1899            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1900                ::fidl_next::wire::Envelope,
1901            >(encoder, max_ord);
1902
1903            for i in 1..=max_ord {
1904                match i {
1905                    1 => {
1906                        if let Some(value) = self.node_token.take() {
1907                            ::fidl_next::wire::Envelope::encode_value::<
1908                                ::fidl_next::wire::fuchsia::Event,
1909                                ___E,
1910                            >(
1911                                value, preallocated.encoder, &mut out, ()
1912                            )?;
1913                        } else {
1914                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1915                        }
1916                    }
1917
1918                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1919                }
1920                unsafe {
1921                    preallocated.write_next(out.assume_init_ref());
1922                }
1923            }
1924
1925            ::fidl_next::wire::Table::encode_len(table, max_ord);
1926
1927            Ok(())
1928        }
1929    }
1930
1931    impl<'de> ::fidl_next::FromWire<crate::wire::NodeControllerOnBindRequest<'de>>
1932        for NodeControllerOnBindRequest
1933    {
1934        #[inline]
1935        fn from_wire(wire_: crate::wire::NodeControllerOnBindRequest<'de>) -> Self {
1936            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1937
1938            let node_token = wire_.table.get(1);
1939
1940            Self {
1941                node_token: node_token.map(|envelope| {
1942                    ::fidl_next::FromWire::from_wire(unsafe {
1943                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1944                    })
1945                }),
1946            }
1947        }
1948    }
1949}
1950
1951pub mod wire {
1952
1953    pub use fidl_next_common_fuchsia_driver_framework::wire::*;
1954
1955    /// The wire type corresponding to [`DevfsAddArgs`].
1956    #[repr(C)]
1957    pub struct DevfsAddArgs<'de> {
1958        pub(crate) table: ::fidl_next::wire::Table<'de>,
1959    }
1960
1961    impl<'de> Drop for DevfsAddArgs<'de> {
1962        fn drop(&mut self) {
1963            let _ = self.table.get(1).map(|envelope| unsafe {
1964                envelope.read_unchecked::<::fidl_next::ClientEnd<
1965                    ::fidl_next_fuchsia_device_fs::Connector,
1966                    ::fidl_next::wire::fuchsia::Channel,
1967                >>()
1968            });
1969
1970            let _ = self.table.get(2).map(|envelope| unsafe {
1971                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
1972            });
1973
1974            let _ = self.table.get(3).map(|envelope| unsafe {
1975                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
1976            });
1977
1978            let _ = self.table.get(4).map(|envelope| unsafe {
1979                envelope.read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
1980            });
1981
1982            let _ = self.table.get(5).map(|envelope| unsafe {
1983                envelope.read_unchecked::<::fidl_next::ClientEnd<
1984                    ::fidl_next_fuchsia_device_fs::Connector,
1985                    ::fidl_next::wire::fuchsia::Channel,
1986                >>()
1987            });
1988        }
1989    }
1990
1991    impl ::fidl_next::Constrained for DevfsAddArgs<'_> {
1992        type Constraint = ();
1993
1994        fn validate(
1995            _: ::fidl_next::Slot<'_, Self>,
1996            _: Self::Constraint,
1997        ) -> Result<(), ::fidl_next::ValidationError> {
1998            Ok(())
1999        }
2000    }
2001
2002    unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
2003        type Narrowed<'de> = DevfsAddArgs<'de>;
2004
2005        #[inline]
2006        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2007            ::fidl_next::munge!(let Self { table } = out);
2008            ::fidl_next::wire::Table::zero_padding(table);
2009        }
2010    }
2011
2012    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'de>
2013    where
2014        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2015        ___D: ::fidl_next::fuchsia::HandleDecoder,
2016    {
2017        fn decode(
2018            slot: ::fidl_next::Slot<'_, Self>,
2019            decoder: &mut ___D,
2020            _: (),
2021        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2022            ::fidl_next::munge!(let Self { table } = slot);
2023
2024            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2025                match ordinal {
2026                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2027
2028                    1 => {
2029                        ::fidl_next::wire::Envelope::decode_as::<
2030                            ___D,
2031                            ::fidl_next::ClientEnd<
2032                                ::fidl_next_fuchsia_device_fs::Connector,
2033                                ::fidl_next::wire::fuchsia::Channel,
2034                            >,
2035                        >(slot.as_mut(), decoder, ())?;
2036
2037                        Ok(())
2038                    }
2039
2040                    2 => {
2041                        ::fidl_next::wire::Envelope::decode_as::<
2042                            ___D,
2043                            ::fidl_next::wire::String<'de>,
2044                        >(slot.as_mut(), decoder, 255)?;
2045
2046                        let value = unsafe {
2047                            slot.deref_unchecked()
2048                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2049                        };
2050
2051                        if value.len() > 255 {
2052                            return Err(::fidl_next::DecodeError::VectorTooLong {
2053                                size: value.len() as u64,
2054                                limit: 255,
2055                            });
2056                        }
2057
2058                        Ok(())
2059                    }
2060
2061                    3 => {
2062                        ::fidl_next::wire::Envelope::decode_as::<
2063                            ___D,
2064                            ::fidl_next::wire::fuchsia::Vmo,
2065                        >(slot.as_mut(), decoder, ())?;
2066
2067                        Ok(())
2068                    }
2069
2070                    4 => {
2071                        ::fidl_next::wire::Envelope::decode_as::<
2072                            ___D,
2073                            ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
2074                        >(slot.as_mut(), decoder, ())?;
2075
2076                        Ok(())
2077                    }
2078
2079                    5 => {
2080                        ::fidl_next::wire::Envelope::decode_as::<
2081                            ___D,
2082                            ::fidl_next::ClientEnd<
2083                                ::fidl_next_fuchsia_device_fs::Connector,
2084                                ::fidl_next::wire::fuchsia::Channel,
2085                            >,
2086                        >(slot.as_mut(), decoder, ())?;
2087
2088                        Ok(())
2089                    }
2090
2091                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2092                }
2093            })
2094        }
2095    }
2096
2097    impl<'de> DevfsAddArgs<'de> {
2098        pub fn connector(
2099            &self,
2100        ) -> ::core::option::Option<
2101            &::fidl_next::ClientEnd<
2102                ::fidl_next_fuchsia_device_fs::Connector,
2103                ::fidl_next::wire::fuchsia::Channel,
2104            >,
2105        > {
2106            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2107        }
2108
2109        pub fn take_connector(
2110            &mut self,
2111        ) -> ::core::option::Option<
2112            ::fidl_next::ClientEnd<
2113                ::fidl_next_fuchsia_device_fs::Connector,
2114                ::fidl_next::wire::fuchsia::Channel,
2115            >,
2116        > {
2117            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2118        }
2119
2120        pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2121            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2122        }
2123
2124        pub fn take_class_name(
2125            &mut self,
2126        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2127            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2128        }
2129
2130        pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2131            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2132        }
2133
2134        pub fn take_inspect(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2135            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2136        }
2137
2138        pub fn connector_supports(
2139            &self,
2140        ) -> ::core::option::Option<&::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2141            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2142        }
2143
2144        pub fn take_connector_supports(
2145            &mut self,
2146        ) -> ::core::option::Option<::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2147            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2148        }
2149
2150        pub fn controller_connector(
2151            &self,
2152        ) -> ::core::option::Option<
2153            &::fidl_next::ClientEnd<
2154                ::fidl_next_fuchsia_device_fs::Connector,
2155                ::fidl_next::wire::fuchsia::Channel,
2156            >,
2157        > {
2158            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2159        }
2160
2161        pub fn take_controller_connector(
2162            &mut self,
2163        ) -> ::core::option::Option<
2164            ::fidl_next::ClientEnd<
2165                ::fidl_next_fuchsia_device_fs::Connector,
2166                ::fidl_next::wire::fuchsia::Channel,
2167            >,
2168        > {
2169            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2170        }
2171    }
2172
2173    impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
2174        fn fmt(
2175            &self,
2176            f: &mut ::core::fmt::Formatter<'_>,
2177        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2178            f.debug_struct("DevfsAddArgs")
2179                .field("connector", &self.connector())
2180                .field("class_name", &self.class_name())
2181                .field("inspect", &self.inspect())
2182                .field("connector_supports", &self.connector_supports())
2183                .field("controller_connector", &self.controller_connector())
2184                .finish()
2185        }
2186    }
2187
2188    impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
2189        type Natural = crate::natural::DevfsAddArgs;
2190    }
2191
2192    /// The wire type corresponding to [`PowerElementArgs`].
2193    #[repr(C)]
2194    pub struct PowerElementArgs<'de> {
2195        pub(crate) table: ::fidl_next::wire::Table<'de>,
2196    }
2197
2198    impl<'de> Drop for PowerElementArgs<'de> {
2199        fn drop(&mut self) {
2200            let _ = self.table.get(1).map(|envelope| unsafe {
2201                envelope.read_unchecked::<::fidl_next::ClientEnd<
2202                    ::fidl_next_fuchsia_power_broker::ElementControl,
2203                    ::fidl_next::wire::fuchsia::Channel,
2204                >>()
2205            });
2206
2207            let _ = self.table.get(2).map(|envelope| unsafe {
2208                envelope.read_unchecked::<::fidl_next::ServerEnd<
2209                    ::fidl_next_fuchsia_power_broker::ElementRunner,
2210                    ::fidl_next::wire::fuchsia::Channel,
2211                >>()
2212            });
2213
2214            let _ = self.table.get(3).map(|envelope| unsafe {
2215                envelope.read_unchecked::<::fidl_next::ClientEnd<
2216                    ::fidl_next_fuchsia_power_broker::Lessor,
2217                    ::fidl_next::wire::fuchsia::Channel,
2218                >>()
2219            });
2220
2221            let _ = self.table.get(4).map(|envelope| unsafe {
2222                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2223            });
2224        }
2225    }
2226
2227    impl ::fidl_next::Constrained for PowerElementArgs<'_> {
2228        type Constraint = ();
2229
2230        fn validate(
2231            _: ::fidl_next::Slot<'_, Self>,
2232            _: Self::Constraint,
2233        ) -> Result<(), ::fidl_next::ValidationError> {
2234            Ok(())
2235        }
2236    }
2237
2238    unsafe impl ::fidl_next::Wire for PowerElementArgs<'static> {
2239        type Narrowed<'de> = PowerElementArgs<'de>;
2240
2241        #[inline]
2242        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2243            ::fidl_next::munge!(let Self { table } = out);
2244            ::fidl_next::wire::Table::zero_padding(table);
2245        }
2246    }
2247
2248    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PowerElementArgs<'de>
2249    where
2250        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2251        ___D: ::fidl_next::fuchsia::HandleDecoder,
2252    {
2253        fn decode(
2254            slot: ::fidl_next::Slot<'_, Self>,
2255            decoder: &mut ___D,
2256            _: (),
2257        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2258            ::fidl_next::munge!(let Self { table } = slot);
2259
2260            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2261                match ordinal {
2262                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2263
2264                    1 => {
2265                        ::fidl_next::wire::Envelope::decode_as::<
2266                            ___D,
2267                            ::fidl_next::ClientEnd<
2268                                ::fidl_next_fuchsia_power_broker::ElementControl,
2269                                ::fidl_next::wire::fuchsia::Channel,
2270                            >,
2271                        >(slot.as_mut(), decoder, ())?;
2272
2273                        Ok(())
2274                    }
2275
2276                    2 => {
2277                        ::fidl_next::wire::Envelope::decode_as::<
2278                            ___D,
2279                            ::fidl_next::ServerEnd<
2280                                ::fidl_next_fuchsia_power_broker::ElementRunner,
2281                                ::fidl_next::wire::fuchsia::Channel,
2282                            >,
2283                        >(slot.as_mut(), decoder, ())?;
2284
2285                        Ok(())
2286                    }
2287
2288                    3 => {
2289                        ::fidl_next::wire::Envelope::decode_as::<
2290                            ___D,
2291                            ::fidl_next::ClientEnd<
2292                                ::fidl_next_fuchsia_power_broker::Lessor,
2293                                ::fidl_next::wire::fuchsia::Channel,
2294                            >,
2295                        >(slot.as_mut(), decoder, ())?;
2296
2297                        Ok(())
2298                    }
2299
2300                    4 => {
2301                        ::fidl_next::wire::Envelope::decode_as::<
2302                            ___D,
2303                            ::fidl_next::wire::fuchsia::Event,
2304                        >(slot.as_mut(), decoder, ())?;
2305
2306                        Ok(())
2307                    }
2308
2309                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2310                }
2311            })
2312        }
2313    }
2314
2315    impl<'de> PowerElementArgs<'de> {
2316        pub fn control_client(
2317            &self,
2318        ) -> ::core::option::Option<
2319            &::fidl_next::ClientEnd<
2320                ::fidl_next_fuchsia_power_broker::ElementControl,
2321                ::fidl_next::wire::fuchsia::Channel,
2322            >,
2323        > {
2324            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2325        }
2326
2327        pub fn take_control_client(
2328            &mut self,
2329        ) -> ::core::option::Option<
2330            ::fidl_next::ClientEnd<
2331                ::fidl_next_fuchsia_power_broker::ElementControl,
2332                ::fidl_next::wire::fuchsia::Channel,
2333            >,
2334        > {
2335            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2336        }
2337
2338        pub fn runner_server(
2339            &self,
2340        ) -> ::core::option::Option<
2341            &::fidl_next::ServerEnd<
2342                ::fidl_next_fuchsia_power_broker::ElementRunner,
2343                ::fidl_next::wire::fuchsia::Channel,
2344            >,
2345        > {
2346            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2347        }
2348
2349        pub fn take_runner_server(
2350            &mut self,
2351        ) -> ::core::option::Option<
2352            ::fidl_next::ServerEnd<
2353                ::fidl_next_fuchsia_power_broker::ElementRunner,
2354                ::fidl_next::wire::fuchsia::Channel,
2355            >,
2356        > {
2357            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2358        }
2359
2360        pub fn lessor_client(
2361            &self,
2362        ) -> ::core::option::Option<
2363            &::fidl_next::ClientEnd<
2364                ::fidl_next_fuchsia_power_broker::Lessor,
2365                ::fidl_next::wire::fuchsia::Channel,
2366            >,
2367        > {
2368            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2369        }
2370
2371        pub fn take_lessor_client(
2372            &mut self,
2373        ) -> ::core::option::Option<
2374            ::fidl_next::ClientEnd<
2375                ::fidl_next_fuchsia_power_broker::Lessor,
2376                ::fidl_next::wire::fuchsia::Channel,
2377            >,
2378        > {
2379            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2380        }
2381
2382        pub fn token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2383            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2384        }
2385
2386        pub fn take_token(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2387            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2388        }
2389    }
2390
2391    impl<'de> ::core::fmt::Debug for PowerElementArgs<'de> {
2392        fn fmt(
2393            &self,
2394            f: &mut ::core::fmt::Formatter<'_>,
2395        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2396            f.debug_struct("PowerElementArgs")
2397                .field("control_client", &self.control_client())
2398                .field("runner_server", &self.runner_server())
2399                .field("lessor_client", &self.lessor_client())
2400                .field("token", &self.token())
2401                .finish()
2402        }
2403    }
2404
2405    impl<'de> ::fidl_next::IntoNatural for PowerElementArgs<'de> {
2406        type Natural = crate::natural::PowerElementArgs;
2407    }
2408
2409    /// The wire type corresponding to [`DriverResumeRequest`].
2410    #[derive(Debug)]
2411    #[repr(C)]
2412    pub struct DriverResumeRequest {
2413        pub power_element_lease: ::fidl_next::wire::fuchsia::OptionalEventPair,
2414    }
2415
2416    static_assertions::const_assert_eq!(std::mem::size_of::<DriverResumeRequest>(), 4);
2417    static_assertions::const_assert_eq!(std::mem::align_of::<DriverResumeRequest>(), 4);
2418
2419    static_assertions::const_assert_eq!(
2420        std::mem::offset_of!(DriverResumeRequest, power_element_lease),
2421        0
2422    );
2423
2424    impl ::fidl_next::Constrained for DriverResumeRequest {
2425        type Constraint = ();
2426
2427        fn validate(
2428            _: ::fidl_next::Slot<'_, Self>,
2429            _: Self::Constraint,
2430        ) -> Result<(), ::fidl_next::ValidationError> {
2431            Ok(())
2432        }
2433    }
2434
2435    unsafe impl ::fidl_next::Wire for DriverResumeRequest {
2436        type Narrowed<'de> = DriverResumeRequest;
2437
2438        #[inline]
2439        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2440            ::fidl_next::munge! {
2441                let Self {
2442                    power_element_lease,
2443
2444                } = &mut *out_;
2445            }
2446
2447            ::fidl_next::Wire::zero_padding(power_element_lease);
2448        }
2449    }
2450
2451    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResumeRequest
2452    where
2453        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2454        ___D: ::fidl_next::fuchsia::HandleDecoder,
2455    {
2456        fn decode(
2457            slot_: ::fidl_next::Slot<'_, Self>,
2458            decoder_: &mut ___D,
2459            _: (),
2460        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2461            ::fidl_next::munge! {
2462                let Self {
2463                    mut power_element_lease,
2464
2465                } = slot_;
2466            }
2467
2468            let _field = power_element_lease.as_mut();
2469
2470            ::fidl_next::Decode::decode(power_element_lease.as_mut(), decoder_, ())?;
2471
2472            Ok(())
2473        }
2474    }
2475
2476    impl ::fidl_next::IntoNatural for DriverResumeRequest {
2477        type Natural = crate::natural::DriverResumeRequest;
2478    }
2479
2480    /// The wire type corresponding to [`DriverStartArgs`].
2481    #[repr(C)]
2482    pub struct DriverStartArgs<'de> {
2483        pub(crate) table: ::fidl_next::wire::Table<'de>,
2484    }
2485
2486    impl<'de> Drop for DriverStartArgs<'de> {
2487        fn drop(&mut self) {
2488            let _ = self.table.get(1)
2489                .map(|envelope| unsafe {
2490                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>()
2491                });
2492
2493            let _ = self.table.get(2).map(|envelope| unsafe {
2494                envelope
2495                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
2496                    )
2497            });
2498
2499            let _ = self.table.get(3).map(|envelope| unsafe {
2500                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2501            });
2502
2503            let _ = self.table.get(4).map(|envelope| unsafe {
2504                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2505            });
2506
2507            let _ = self.table.get(5).map(|envelope| unsafe {
2508                envelope.read_unchecked::<::fidl_next::wire::Vector<
2509                    'de,
2510                    ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2511                >>()
2512            });
2513
2514            let _ = self.table.get(6).map(|envelope| unsafe {
2515                envelope.read_unchecked::<::fidl_next::ServerEnd<
2516                    ::fidl_next_fuchsia_io::Directory,
2517                    ::fidl_next::wire::fuchsia::Channel,
2518                >>()
2519            });
2520
2521            let _ = self.table.get(7).map(|envelope| unsafe {
2522                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2523            });
2524
2525            let _ = self.table.get(8).map(|envelope| unsafe {
2526                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2527            });
2528
2529            let _ = self.table.get(9)
2530                .map(|envelope| unsafe {
2531                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>>()
2532                });
2533
2534            let _ = self.table.get(10).map(|envelope| unsafe {
2535                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
2536            });
2537
2538            let _ = self.table.get(11).map(|envelope| unsafe {
2539                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2540            });
2541
2542            let _ = self.table.get(12)
2543                .map(|envelope| unsafe {
2544                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>>()
2545                });
2546
2547            let _ = self.table.get(13).map(|envelope| unsafe {
2548                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmar>()
2549            });
2550
2551            let _ = self.table.get(14).map(|envelope| unsafe {
2552                envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>()
2553            });
2554
2555            let _ = self.table.get(15).map(|envelope| unsafe {
2556                envelope.read_unchecked::<::fidl_next::ClientEnd<
2557                    ::fidl_next_fuchsia_logger::LogSink,
2558                    ::fidl_next::wire::fuchsia::Channel,
2559                >>()
2560            });
2561        }
2562    }
2563
2564    impl ::fidl_next::Constrained for DriverStartArgs<'_> {
2565        type Constraint = ();
2566
2567        fn validate(
2568            _: ::fidl_next::Slot<'_, Self>,
2569            _: Self::Constraint,
2570        ) -> Result<(), ::fidl_next::ValidationError> {
2571            Ok(())
2572        }
2573    }
2574
2575    unsafe impl ::fidl_next::Wire for DriverStartArgs<'static> {
2576        type Narrowed<'de> = DriverStartArgs<'de>;
2577
2578        #[inline]
2579        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2580            ::fidl_next::munge!(let Self { table } = out);
2581            ::fidl_next::wire::Table::zero_padding(table);
2582        }
2583    }
2584
2585    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartArgs<'de>
2586    where
2587        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2588        ___D: ::fidl_next::fuchsia::HandleDecoder,
2589    {
2590        fn decode(
2591            slot: ::fidl_next::Slot<'_, Self>,
2592            decoder: &mut ___D,
2593            _: (),
2594        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2595            ::fidl_next::munge!(let Self { table } = slot);
2596
2597            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2598                match ordinal {
2599                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2600
2601                    1 => {
2602                        ::fidl_next::wire::Envelope::decode_as::<
2603                            ___D,
2604                            ::fidl_next::ClientEnd<
2605                                crate::Node,
2606                                ::fidl_next::wire::fuchsia::Channel,
2607                            >,
2608                        >(slot.as_mut(), decoder, ())?;
2609
2610                        Ok(())
2611                    }
2612
2613                    2 => {
2614                        ::fidl_next::wire::Envelope::decode_as::<
2615                            ___D,
2616                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
2617                        >(slot.as_mut(), decoder, (64, ()))?;
2618
2619                        let value = unsafe {
2620                            slot
2621                                            .deref_unchecked()
2622                                            .deref_unchecked::<
2623                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
2624                                            >()
2625                        };
2626
2627                        if value.len() > 64 {
2628                            return Err(::fidl_next::DecodeError::VectorTooLong {
2629                                size: value.len() as u64,
2630                                limit: 64,
2631                            });
2632                        }
2633
2634                        Ok(())
2635                    }
2636
2637                    3 => {
2638                        ::fidl_next::wire::Envelope::decode_as::<
2639                            ___D,
2640                            ::fidl_next::wire::String<'de>,
2641                        >(slot.as_mut(), decoder, 4096)?;
2642
2643                        let value = unsafe {
2644                            slot.deref_unchecked()
2645                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2646                        };
2647
2648                        if value.len() > 4096 {
2649                            return Err(::fidl_next::DecodeError::VectorTooLong {
2650                                size: value.len() as u64,
2651                                limit: 4096,
2652                            });
2653                        }
2654
2655                        Ok(())
2656                    }
2657
2658                    4 => {
2659                        ::fidl_next::wire::Envelope::decode_as::<
2660                            ___D,
2661                            ::fidl_next_fuchsia_data::wire::Dictionary<'de>,
2662                        >(slot.as_mut(), decoder, ())?;
2663
2664                        Ok(())
2665                    }
2666
2667                    5 => {
2668                        ::fidl_next::wire::Envelope::decode_as::<
2669                            ___D,
2670                            ::fidl_next::wire::Vector<
2671                                'de,
2672                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2673                                    'de,
2674                                >,
2675                            >,
2676                        >(slot.as_mut(), decoder, (32, ()))?;
2677
2678                        let value = unsafe {
2679                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
2680                                '_,
2681                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2682                                    '_,
2683                                >,
2684                            >>()
2685                        };
2686
2687                        if value.len() > 32 {
2688                            return Err(::fidl_next::DecodeError::VectorTooLong {
2689                                size: value.len() as u64,
2690                                limit: 32,
2691                            });
2692                        }
2693
2694                        Ok(())
2695                    }
2696
2697                    6 => {
2698                        ::fidl_next::wire::Envelope::decode_as::<
2699                            ___D,
2700                            ::fidl_next::ServerEnd<
2701                                ::fidl_next_fuchsia_io::Directory,
2702                                ::fidl_next::wire::fuchsia::Channel,
2703                            >,
2704                        >(slot.as_mut(), decoder, ())?;
2705
2706                        Ok(())
2707                    }
2708
2709                    7 => {
2710                        ::fidl_next::wire::Envelope::decode_as::<
2711                            ___D,
2712                            ::fidl_next::wire::fuchsia::Vmo,
2713                        >(slot.as_mut(), decoder, ())?;
2714
2715                        Ok(())
2716                    }
2717
2718                    8 => {
2719                        ::fidl_next::wire::Envelope::decode_as::<
2720                            ___D,
2721                            ::fidl_next::wire::String<'de>,
2722                        >(slot.as_mut(), decoder, 4294967295)?;
2723
2724                        Ok(())
2725                    }
2726
2727                    9 => {
2728                        ::fidl_next::wire::Envelope::decode_as::<
2729                            ___D,
2730                            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
2731                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2732
2733                        Ok(())
2734                    }
2735
2736                    10 => {
2737                        ::fidl_next::wire::Envelope::decode_as::<
2738                            ___D,
2739                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
2740                        >(slot.as_mut(), decoder, (128, ()))?;
2741
2742                        let value = unsafe {
2743                            slot
2744                                            .deref_unchecked()
2745                                            .deref_unchecked::<
2746                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
2747                                            >()
2748                        };
2749
2750                        if value.len() > 128 {
2751                            return Err(::fidl_next::DecodeError::VectorTooLong {
2752                                size: value.len() as u64,
2753                                limit: 128,
2754                            });
2755                        }
2756
2757                        Ok(())
2758                    }
2759
2760                    11 => {
2761                        ::fidl_next::wire::Envelope::decode_as::<
2762                            ___D,
2763                            ::fidl_next::wire::fuchsia::Event,
2764                        >(slot.as_mut(), decoder, ())?;
2765
2766                        Ok(())
2767                    }
2768
2769                    12 => {
2770                        ::fidl_next::wire::Envelope::decode_as::<
2771                            ___D,
2772                            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2773                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2774
2775                        Ok(())
2776                    }
2777
2778                    13 => {
2779                        ::fidl_next::wire::Envelope::decode_as::<
2780                            ___D,
2781                            ::fidl_next::wire::fuchsia::Vmar,
2782                        >(slot.as_mut(), decoder, ())?;
2783
2784                        Ok(())
2785                    }
2786
2787                    14 => {
2788                        ::fidl_next::wire::Envelope::decode_as::<
2789                            ___D,
2790                            crate::wire::PowerElementArgs<'de>,
2791                        >(slot.as_mut(), decoder, ())?;
2792
2793                        Ok(())
2794                    }
2795
2796                    15 => {
2797                        ::fidl_next::wire::Envelope::decode_as::<
2798                            ___D,
2799                            ::fidl_next::ClientEnd<
2800                                ::fidl_next_fuchsia_logger::LogSink,
2801                                ::fidl_next::wire::fuchsia::Channel,
2802                            >,
2803                        >(slot.as_mut(), decoder, ())?;
2804
2805                        Ok(())
2806                    }
2807
2808                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2809                }
2810            })
2811        }
2812    }
2813
2814    impl<'de> DriverStartArgs<'de> {
2815        pub fn node(
2816            &self,
2817        ) -> ::core::option::Option<
2818            &::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2819        > {
2820            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2821        }
2822
2823        pub fn take_node(
2824            &mut self,
2825        ) -> ::core::option::Option<
2826            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2827        > {
2828            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2829        }
2830
2831        pub fn symbols(
2832            &self,
2833        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2834        {
2835            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2836        }
2837
2838        pub fn take_symbols(
2839            &mut self,
2840        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2841        {
2842            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2843        }
2844
2845        pub fn url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2846            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2847        }
2848
2849        pub fn take_url(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2850            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2851        }
2852
2853        pub fn program(
2854            &self,
2855        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2856            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2857        }
2858
2859        pub fn take_program(
2860            &mut self,
2861        ) -> ::core::option::Option<::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2862            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2863        }
2864
2865        pub fn incoming(
2866            &self,
2867        ) -> ::core::option::Option<
2868            &::fidl_next::wire::Vector<
2869                'de,
2870                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2871            >,
2872        > {
2873            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2874        }
2875
2876        pub fn take_incoming(
2877            &mut self,
2878        ) -> ::core::option::Option<
2879            ::fidl_next::wire::Vector<
2880                'de,
2881                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2882            >,
2883        > {
2884            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2885        }
2886
2887        pub fn outgoing_dir(
2888            &self,
2889        ) -> ::core::option::Option<
2890            &::fidl_next::ServerEnd<
2891                ::fidl_next_fuchsia_io::Directory,
2892                ::fidl_next::wire::fuchsia::Channel,
2893            >,
2894        > {
2895            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2896        }
2897
2898        pub fn take_outgoing_dir(
2899            &mut self,
2900        ) -> ::core::option::Option<
2901            ::fidl_next::ServerEnd<
2902                ::fidl_next_fuchsia_io::Directory,
2903                ::fidl_next::wire::fuchsia::Channel,
2904            >,
2905        > {
2906            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
2907        }
2908
2909        pub fn config(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2910            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2911        }
2912
2913        pub fn take_config(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2914            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
2915        }
2916
2917        pub fn node_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2918            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2919        }
2920
2921        pub fn take_node_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2922            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
2923        }
2924
2925        pub fn node_properties(
2926            &self,
2927        ) -> ::core::option::Option<
2928            &::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
2929        > {
2930            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2931        }
2932
2933        pub fn take_node_properties(
2934            &mut self,
2935        ) -> ::core::option::Option<
2936            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
2937        > {
2938            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
2939        }
2940
2941        pub fn node_offers(
2942            &self,
2943        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
2944        {
2945            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2946        }
2947
2948        pub fn take_node_offers(
2949            &mut self,
2950        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
2951        {
2952            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
2953        }
2954
2955        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2956            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2957        }
2958
2959        pub fn take_node_token(
2960            &mut self,
2961        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2962            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
2963        }
2964
2965        pub fn node_properties_2(
2966            &self,
2967        ) -> ::core::option::Option<
2968            &::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2969        > {
2970            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
2971        }
2972
2973        pub fn take_node_properties_2(
2974            &mut self,
2975        ) -> ::core::option::Option<
2976            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2977        > {
2978            unsafe { Some(self.table.get_mut(12)?.take_unchecked()) }
2979        }
2980
2981        pub fn vmar(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmar> {
2982            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
2983        }
2984
2985        pub fn take_vmar(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmar> {
2986            unsafe { Some(self.table.get_mut(13)?.take_unchecked()) }
2987        }
2988
2989        pub fn power_element_args(
2990            &self,
2991        ) -> ::core::option::Option<&crate::wire::PowerElementArgs<'de>> {
2992            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
2993        }
2994
2995        pub fn take_power_element_args(
2996            &mut self,
2997        ) -> ::core::option::Option<crate::wire::PowerElementArgs<'de>> {
2998            unsafe { Some(self.table.get_mut(14)?.take_unchecked()) }
2999        }
3000
3001        pub fn log_sink(
3002            &self,
3003        ) -> ::core::option::Option<
3004            &::fidl_next::ClientEnd<
3005                ::fidl_next_fuchsia_logger::LogSink,
3006                ::fidl_next::wire::fuchsia::Channel,
3007            >,
3008        > {
3009            unsafe { Some(self.table.get(15)?.deref_unchecked()) }
3010        }
3011
3012        pub fn take_log_sink(
3013            &mut self,
3014        ) -> ::core::option::Option<
3015            ::fidl_next::ClientEnd<
3016                ::fidl_next_fuchsia_logger::LogSink,
3017                ::fidl_next::wire::fuchsia::Channel,
3018            >,
3019        > {
3020            unsafe { Some(self.table.get_mut(15)?.take_unchecked()) }
3021        }
3022    }
3023
3024    impl<'de> ::core::fmt::Debug for DriverStartArgs<'de> {
3025        fn fmt(
3026            &self,
3027            f: &mut ::core::fmt::Formatter<'_>,
3028        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3029            f.debug_struct("DriverStartArgs")
3030                .field("node", &self.node())
3031                .field("symbols", &self.symbols())
3032                .field("url", &self.url())
3033                .field("program", &self.program())
3034                .field("incoming", &self.incoming())
3035                .field("outgoing_dir", &self.outgoing_dir())
3036                .field("config", &self.config())
3037                .field("node_name", &self.node_name())
3038                .field("node_properties", &self.node_properties())
3039                .field("node_offers", &self.node_offers())
3040                .field("node_token", &self.node_token())
3041                .field("node_properties_2", &self.node_properties_2())
3042                .field("vmar", &self.vmar())
3043                .field("power_element_args", &self.power_element_args())
3044                .field("log_sink", &self.log_sink())
3045                .finish()
3046        }
3047    }
3048
3049    impl<'de> ::fidl_next::IntoNatural for DriverStartArgs<'de> {
3050        type Natural = crate::natural::DriverStartArgs;
3051    }
3052
3053    /// The wire type corresponding to [`DriverStartRequest`].
3054    #[derive(Debug)]
3055    #[repr(C)]
3056    pub struct DriverStartRequest<'de> {
3057        pub start_args: crate::wire::DriverStartArgs<'de>,
3058    }
3059
3060    static_assertions::const_assert_eq!(std::mem::size_of::<DriverStartRequest<'_>>(), 16);
3061    static_assertions::const_assert_eq!(std::mem::align_of::<DriverStartRequest<'_>>(), 8);
3062
3063    static_assertions::const_assert_eq!(
3064        std::mem::offset_of!(DriverStartRequest<'_>, start_args),
3065        0
3066    );
3067
3068    impl ::fidl_next::Constrained for DriverStartRequest<'_> {
3069        type Constraint = ();
3070
3071        fn validate(
3072            _: ::fidl_next::Slot<'_, Self>,
3073            _: Self::Constraint,
3074        ) -> Result<(), ::fidl_next::ValidationError> {
3075            Ok(())
3076        }
3077    }
3078
3079    unsafe impl ::fidl_next::Wire for DriverStartRequest<'static> {
3080        type Narrowed<'de> = DriverStartRequest<'de>;
3081
3082        #[inline]
3083        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3084            ::fidl_next::munge! {
3085                let Self {
3086                    start_args,
3087
3088                } = &mut *out_;
3089            }
3090
3091            ::fidl_next::Wire::zero_padding(start_args);
3092        }
3093    }
3094
3095    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartRequest<'de>
3096    where
3097        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3098        ___D: ::fidl_next::Decoder<'de>,
3099        ___D: ::fidl_next::fuchsia::HandleDecoder,
3100    {
3101        fn decode(
3102            slot_: ::fidl_next::Slot<'_, Self>,
3103            decoder_: &mut ___D,
3104            _: (),
3105        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3106            ::fidl_next::munge! {
3107                let Self {
3108                    mut start_args,
3109
3110                } = slot_;
3111            }
3112
3113            let _field = start_args.as_mut();
3114
3115            ::fidl_next::Decode::decode(start_args.as_mut(), decoder_, ())?;
3116
3117            Ok(())
3118        }
3119    }
3120
3121    impl<'de> ::fidl_next::IntoNatural for DriverStartRequest<'de> {
3122        type Natural = crate::natural::DriverStartRequest;
3123    }
3124
3125    /// The wire type corresponding to [`DriverResult`].
3126    #[repr(transparent)]
3127    pub struct DriverResult<'de> {
3128        pub(crate) raw: ::fidl_next::wire::Union,
3129        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3130    }
3131
3132    impl<'de> Drop for DriverResult<'de> {
3133        fn drop(&mut self) {
3134            match self.raw.ordinal() {
3135                1 => {
3136                    let _ = unsafe {
3137                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3138                    };
3139                }
3140
3141                2 => {
3142                    let _ = unsafe {
3143                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3144                    };
3145                }
3146
3147                3 => {
3148                    let _ = unsafe {
3149                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3150                    };
3151                }
3152
3153                _ => (),
3154            }
3155        }
3156    }
3157
3158    impl ::fidl_next::Constrained for DriverResult<'_> {
3159        type Constraint = ();
3160
3161        fn validate(
3162            _: ::fidl_next::Slot<'_, Self>,
3163            _: Self::Constraint,
3164        ) -> Result<(), ::fidl_next::ValidationError> {
3165            Ok(())
3166        }
3167    }
3168
3169    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
3170        type Narrowed<'de> = DriverResult<'de>;
3171
3172        #[inline]
3173        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3174            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3175            ::fidl_next::wire::Union::zero_padding(raw);
3176        }
3177    }
3178
3179    pub mod driver_result {
3180        pub enum Ref<'de> {
3181            DriverStartedNodeToken(&'de ::fidl_next::wire::fuchsia::Event),
3182
3183            MatchError(&'de ::fidl_next::wire::fuchsia::Status),
3184
3185            StartError(&'de ::fidl_next::wire::fuchsia::Status),
3186
3187            UnknownOrdinal_(u64),
3188        }
3189
3190        pub enum Value {
3191            DriverStartedNodeToken(::fidl_next::wire::fuchsia::Event),
3192
3193            MatchError(::fidl_next::wire::fuchsia::Status),
3194
3195            StartError(::fidl_next::wire::fuchsia::Status),
3196
3197            UnknownOrdinal_(u64),
3198        }
3199    }
3200
3201    impl<'de> DriverResult<'de> {
3202        pub fn as_ref(&self) -> crate::wire::driver_result::Ref<'_> {
3203            match self.raw.ordinal() {
3204                1 => crate::wire::driver_result::Ref::DriverStartedNodeToken(unsafe {
3205                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>()
3206                }),
3207
3208                2 => crate::wire::driver_result::Ref::MatchError(unsafe {
3209                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>()
3210                }),
3211
3212                3 => crate::wire::driver_result::Ref::StartError(unsafe {
3213                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>()
3214                }),
3215
3216                unknown => crate::wire::driver_result::Ref::UnknownOrdinal_(unknown),
3217            }
3218        }
3219
3220        pub fn into_inner(self) -> crate::wire::driver_result::Value {
3221            let this = ::core::mem::ManuallyDrop::new(self);
3222
3223            match this.raw.ordinal() {
3224                1 => crate::wire::driver_result::Value::DriverStartedNodeToken(unsafe {
3225                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3226                }),
3227
3228                2 => crate::wire::driver_result::Value::MatchError(unsafe {
3229                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3230                }),
3231
3232                3 => crate::wire::driver_result::Value::StartError(unsafe {
3233                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3234                }),
3235
3236                unknown => crate::wire::driver_result::Value::UnknownOrdinal_(unknown),
3237            }
3238        }
3239    }
3240
3241    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
3242    where
3243        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3244        ___D: ::fidl_next::Decoder<'de>,
3245        ___D: ::fidl_next::fuchsia::HandleDecoder,
3246    {
3247        fn decode(
3248            mut slot: ::fidl_next::Slot<'_, Self>,
3249            decoder: &mut ___D,
3250            _: (),
3251        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3252            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3253            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3254                1 => {
3255                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
3256                        raw,
3257                        decoder,
3258                        (),
3259                    )?
3260                }
3261
3262                2 => {
3263                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
3264                        raw,
3265                        decoder,
3266                        (),
3267                    )?
3268                }
3269
3270                3 => {
3271                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
3272                        raw,
3273                        decoder,
3274                        (),
3275                    )?
3276                }
3277
3278                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3279            }
3280
3281            Ok(())
3282        }
3283    }
3284
3285    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
3286        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3287            match self.raw.ordinal() {
3288                1 => unsafe {
3289                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>().fmt(f)
3290                },
3291                2 => unsafe {
3292                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>().fmt(f)
3293                },
3294                3 => unsafe {
3295                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>().fmt(f)
3296                },
3297                _ => unsafe { ::core::hint::unreachable_unchecked() },
3298            }
3299        }
3300    }
3301
3302    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
3303        type Natural = crate::natural::DriverResult;
3304    }
3305
3306    /// The wire type corresponding to [`NodeAddArgs`].
3307    #[repr(C)]
3308    pub struct NodeAddArgs<'de> {
3309        pub(crate) table: ::fidl_next::wire::Table<'de>,
3310    }
3311
3312    impl<'de> Drop for NodeAddArgs<'de> {
3313        fn drop(&mut self) {
3314            let _ = self.table.get(1).map(|envelope| unsafe {
3315                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3316            });
3317
3318            let _ = self.table.get(3).map(|envelope| unsafe {
3319                envelope
3320                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
3321                    )
3322            });
3323
3324            let _ = self.table.get(4)
3325                .map(|envelope| unsafe {
3326                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>()
3327                });
3328
3329            let _ = self.table.get(5).map(|envelope| unsafe {
3330                envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>()
3331            });
3332
3333            let _ = self.table.get(6).map(|envelope| unsafe {
3334                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3335            });
3336
3337            let _ = self
3338                .table
3339                .get(7)
3340                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3341
3342            let _ = self.table.get(8)
3343                .map(|envelope| unsafe {
3344                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3345                });
3346
3347            let _ = self.table.get(9)
3348                .map(|envelope| unsafe {
3349                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3350                });
3351
3352            let _ = self.table.get(10).map(|envelope| unsafe {
3353                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3354            });
3355        }
3356    }
3357
3358    impl ::fidl_next::Constrained for NodeAddArgs<'_> {
3359        type Constraint = ();
3360
3361        fn validate(
3362            _: ::fidl_next::Slot<'_, Self>,
3363            _: Self::Constraint,
3364        ) -> Result<(), ::fidl_next::ValidationError> {
3365            Ok(())
3366        }
3367    }
3368
3369    unsafe impl ::fidl_next::Wire for NodeAddArgs<'static> {
3370        type Narrowed<'de> = NodeAddArgs<'de>;
3371
3372        #[inline]
3373        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3374            ::fidl_next::munge!(let Self { table } = out);
3375            ::fidl_next::wire::Table::zero_padding(table);
3376        }
3377    }
3378
3379    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddArgs<'de>
3380    where
3381        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3382        ___D: ::fidl_next::fuchsia::HandleDecoder,
3383    {
3384        fn decode(
3385            slot: ::fidl_next::Slot<'_, Self>,
3386            decoder: &mut ___D,
3387            _: (),
3388        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3389            ::fidl_next::munge!(let Self { table } = slot);
3390
3391            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3392                match ordinal {
3393                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3394
3395                    1 => {
3396                        ::fidl_next::wire::Envelope::decode_as::<
3397                            ___D,
3398                            ::fidl_next::wire::String<'de>,
3399                        >(slot.as_mut(), decoder, 128)?;
3400
3401                        let value = unsafe {
3402                            slot.deref_unchecked()
3403                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3404                        };
3405
3406                        if value.len() > 128 {
3407                            return Err(::fidl_next::DecodeError::VectorTooLong {
3408                                size: value.len() as u64,
3409                                limit: 128,
3410                            });
3411                        }
3412
3413                        Ok(())
3414                    }
3415
3416                    3 => {
3417                        ::fidl_next::wire::Envelope::decode_as::<
3418                            ___D,
3419                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
3420                        >(slot.as_mut(), decoder, (64, ()))?;
3421
3422                        let value = unsafe {
3423                            slot
3424                                            .deref_unchecked()
3425                                            .deref_unchecked::<
3426                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
3427                                            >()
3428                        };
3429
3430                        if value.len() > 64 {
3431                            return Err(::fidl_next::DecodeError::VectorTooLong {
3432                                size: value.len() as u64,
3433                                limit: 64,
3434                            });
3435                        }
3436
3437                        Ok(())
3438                    }
3439
3440                    4 => {
3441                        ::fidl_next::wire::Envelope::decode_as::<
3442                            ___D,
3443                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>,
3444                        >(slot.as_mut(), decoder, (64, ()))?;
3445
3446                        let value = unsafe {
3447                            slot
3448                                            .deref_unchecked()
3449                                            .deref_unchecked::<
3450                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty<'_>>
3451                                            >()
3452                        };
3453
3454                        if value.len() > 64 {
3455                            return Err(::fidl_next::DecodeError::VectorTooLong {
3456                                size: value.len() as u64,
3457                                limit: 64,
3458                            });
3459                        }
3460
3461                        Ok(())
3462                    }
3463
3464                    5 => {
3465                        ::fidl_next::wire::Envelope::decode_as::<
3466                            ___D,
3467                            crate::wire::DevfsAddArgs<'de>,
3468                        >(slot.as_mut(), decoder, ())?;
3469
3470                        Ok(())
3471                    }
3472
3473                    6 => {
3474                        ::fidl_next::wire::Envelope::decode_as::<
3475                            ___D,
3476                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3477                        >(slot.as_mut(), decoder, (128, ()))?;
3478
3479                        let value = unsafe {
3480                            slot
3481                                            .deref_unchecked()
3482                                            .deref_unchecked::<
3483                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3484                                            >()
3485                        };
3486
3487                        if value.len() > 128 {
3488                            return Err(::fidl_next::DecodeError::VectorTooLong {
3489                                size: value.len() as u64,
3490                                limit: 128,
3491                            });
3492                        }
3493
3494                        Ok(())
3495                    }
3496
3497                    7 => {
3498                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3499                            slot.as_mut(),
3500                            decoder,
3501                            (),
3502                        )?;
3503
3504                        Ok(())
3505                    }
3506
3507                    8 => {
3508                        ::fidl_next::wire::Envelope::decode_as::<
3509                            ___D,
3510                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3511                        >(slot.as_mut(), decoder, (64, ()))?;
3512
3513                        let value = unsafe {
3514                            slot
3515                                            .deref_unchecked()
3516                                            .deref_unchecked::<
3517                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3518                                            >()
3519                        };
3520
3521                        if value.len() > 64 {
3522                            return Err(::fidl_next::DecodeError::VectorTooLong {
3523                                size: value.len() as u64,
3524                                limit: 64,
3525                            });
3526                        }
3527
3528                        Ok(())
3529                    }
3530
3531                    9 => {
3532                        ::fidl_next::wire::Envelope::decode_as::<
3533                            ___D,
3534                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3535                        >(slot.as_mut(), decoder, ())?;
3536
3537                        Ok(())
3538                    }
3539
3540                    10 => {
3541                        ::fidl_next::wire::Envelope::decode_as::<
3542                            ___D,
3543                            ::fidl_next::wire::String<'de>,
3544                        >(slot.as_mut(), decoder, 128)?;
3545
3546                        let value = unsafe {
3547                            slot.deref_unchecked()
3548                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3549                        };
3550
3551                        if value.len() > 128 {
3552                            return Err(::fidl_next::DecodeError::VectorTooLong {
3553                                size: value.len() as u64,
3554                                limit: 128,
3555                            });
3556                        }
3557
3558                        Ok(())
3559                    }
3560
3561                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3562                }
3563            })
3564        }
3565    }
3566
3567    impl<'de> NodeAddArgs<'de> {
3568        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3569            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3570        }
3571
3572        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3573            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3574        }
3575
3576        pub fn symbols(
3577            &self,
3578        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3579        {
3580            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3581        }
3582
3583        pub fn take_symbols(
3584            &mut self,
3585        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3586        {
3587            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3588        }
3589
3590        pub fn properties(
3591            &self,
3592        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>
3593        {
3594            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3595        }
3596
3597        pub fn take_properties(
3598            &mut self,
3599        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>
3600        {
3601            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3602        }
3603
3604        pub fn devfs_args(&self) -> ::core::option::Option<&crate::wire::DevfsAddArgs<'de>> {
3605            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
3606        }
3607
3608        pub fn take_devfs_args(
3609            &mut self,
3610        ) -> ::core::option::Option<crate::wire::DevfsAddArgs<'de>> {
3611            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
3612        }
3613
3614        pub fn offers2(
3615            &self,
3616        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3617        {
3618            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
3619        }
3620
3621        pub fn take_offers2(
3622            &mut self,
3623        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3624        {
3625            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
3626        }
3627
3628        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3629            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
3630        }
3631
3632        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3633            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
3634        }
3635
3636        pub fn properties2(
3637            &self,
3638        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3639        {
3640            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
3641        }
3642
3643        pub fn take_properties2(
3644            &mut self,
3645        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3646        {
3647            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
3648        }
3649
3650        pub fn offers_dictionary(
3651            &self,
3652        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3653        {
3654            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
3655        }
3656
3657        pub fn take_offers_dictionary(
3658            &mut self,
3659        ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3660        {
3661            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
3662        }
3663
3664        pub fn driver_host(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3665            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
3666        }
3667
3668        pub fn take_driver_host(
3669            &mut self,
3670        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3671            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
3672        }
3673    }
3674
3675    impl<'de> ::core::fmt::Debug for NodeAddArgs<'de> {
3676        fn fmt(
3677            &self,
3678            f: &mut ::core::fmt::Formatter<'_>,
3679        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3680            f.debug_struct("NodeAddArgs")
3681                .field("name", &self.name())
3682                .field("symbols", &self.symbols())
3683                .field("properties", &self.properties())
3684                .field("devfs_args", &self.devfs_args())
3685                .field("offers2", &self.offers2())
3686                .field("bus_info", &self.bus_info())
3687                .field("properties2", &self.properties2())
3688                .field("offers_dictionary", &self.offers_dictionary())
3689                .field("driver_host", &self.driver_host())
3690                .finish()
3691        }
3692    }
3693
3694    impl<'de> ::fidl_next::IntoNatural for NodeAddArgs<'de> {
3695        type Natural = crate::natural::NodeAddArgs;
3696    }
3697
3698    /// The wire type corresponding to [`ResourceArgs`].
3699    #[repr(C)]
3700    pub struct ResourceArgs<'de> {
3701        pub(crate) table: ::fidl_next::wire::Table<'de>,
3702    }
3703
3704    impl<'de> Drop for ResourceArgs<'de> {
3705        fn drop(&mut self) {
3706            let _ = self.table.get(1).map(|envelope| unsafe {
3707                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3708            });
3709
3710            let _ = self.table.get(2)
3711                .map(|envelope| unsafe {
3712                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3713                });
3714
3715            let _ = self.table.get(3).map(|envelope| unsafe {
3716                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3717            });
3718
3719            let _ = self
3720                .table
3721                .get(4)
3722                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3723        }
3724    }
3725
3726    impl ::fidl_next::Constrained for ResourceArgs<'_> {
3727        type Constraint = ();
3728
3729        fn validate(
3730            _: ::fidl_next::Slot<'_, Self>,
3731            _: Self::Constraint,
3732        ) -> Result<(), ::fidl_next::ValidationError> {
3733            Ok(())
3734        }
3735    }
3736
3737    unsafe impl ::fidl_next::Wire for ResourceArgs<'static> {
3738        type Narrowed<'de> = ResourceArgs<'de>;
3739
3740        #[inline]
3741        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3742            ::fidl_next::munge!(let Self { table } = out);
3743            ::fidl_next::wire::Table::zero_padding(table);
3744        }
3745    }
3746
3747    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResourceArgs<'de>
3748    where
3749        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3750        ___D: ::fidl_next::fuchsia::HandleDecoder,
3751    {
3752        fn decode(
3753            slot: ::fidl_next::Slot<'_, Self>,
3754            decoder: &mut ___D,
3755            _: (),
3756        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3757            ::fidl_next::munge!(let Self { table } = slot);
3758
3759            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3760                match ordinal {
3761                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3762
3763                    1 => {
3764                        ::fidl_next::wire::Envelope::decode_as::<
3765                            ___D,
3766                            ::fidl_next::wire::String<'de>,
3767                        >(slot.as_mut(), decoder, 128)?;
3768
3769                        let value = unsafe {
3770                            slot.deref_unchecked()
3771                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3772                        };
3773
3774                        if value.len() > 128 {
3775                            return Err(::fidl_next::DecodeError::VectorTooLong {
3776                                size: value.len() as u64,
3777                                limit: 128,
3778                            });
3779                        }
3780
3781                        Ok(())
3782                    }
3783
3784                    2 => {
3785                        ::fidl_next::wire::Envelope::decode_as::<
3786                            ___D,
3787                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3788                        >(slot.as_mut(), decoder, (64, ()))?;
3789
3790                        let value = unsafe {
3791                            slot
3792                                            .deref_unchecked()
3793                                            .deref_unchecked::<
3794                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3795                                            >()
3796                        };
3797
3798                        if value.len() > 64 {
3799                            return Err(::fidl_next::DecodeError::VectorTooLong {
3800                                size: value.len() as u64,
3801                                limit: 64,
3802                            });
3803                        }
3804
3805                        Ok(())
3806                    }
3807
3808                    3 => {
3809                        ::fidl_next::wire::Envelope::decode_as::<
3810                            ___D,
3811                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3812                        >(slot.as_mut(), decoder, (128, ()))?;
3813
3814                        let value = unsafe {
3815                            slot
3816                                            .deref_unchecked()
3817                                            .deref_unchecked::<
3818                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3819                                            >()
3820                        };
3821
3822                        if value.len() > 128 {
3823                            return Err(::fidl_next::DecodeError::VectorTooLong {
3824                                size: value.len() as u64,
3825                                limit: 128,
3826                            });
3827                        }
3828
3829                        Ok(())
3830                    }
3831
3832                    4 => {
3833                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3834                            slot.as_mut(),
3835                            decoder,
3836                            (),
3837                        )?;
3838
3839                        Ok(())
3840                    }
3841
3842                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3843                }
3844            })
3845        }
3846    }
3847
3848    impl<'de> ResourceArgs<'de> {
3849        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3850            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3851        }
3852
3853        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3854            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3855        }
3856
3857        pub fn properties(
3858            &self,
3859        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3860        {
3861            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3862        }
3863
3864        pub fn take_properties(
3865            &mut self,
3866        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3867        {
3868            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3869        }
3870
3871        pub fn offers(
3872            &self,
3873        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3874        {
3875            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3876        }
3877
3878        pub fn take_offers(
3879            &mut self,
3880        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3881        {
3882            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3883        }
3884
3885        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3886            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3887        }
3888
3889        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3890            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3891        }
3892    }
3893
3894    impl<'de> ::core::fmt::Debug for ResourceArgs<'de> {
3895        fn fmt(
3896            &self,
3897            f: &mut ::core::fmt::Formatter<'_>,
3898        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3899            f.debug_struct("ResourceArgs")
3900                .field("name", &self.name())
3901                .field("properties", &self.properties())
3902                .field("offers", &self.offers())
3903                .field("bus_info", &self.bus_info())
3904                .finish()
3905        }
3906    }
3907
3908    impl<'de> ::fidl_next::IntoNatural for ResourceArgs<'de> {
3909        type Natural = crate::natural::ResourceArgs;
3910    }
3911
3912    /// The wire type corresponding to [`NodeProvideResourceRequest`].
3913    #[derive(Debug)]
3914    #[repr(C)]
3915    pub struct NodeProvideResourceRequest<'de> {
3916        pub resource: crate::wire::ResourceArgs<'de>,
3917
3918        pub controller:
3919            ::fidl_next::ServerEnd<crate::ResourceController, ::fidl_next::wire::fuchsia::Channel>,
3920    }
3921
3922    static_assertions::const_assert_eq!(std::mem::size_of::<NodeProvideResourceRequest<'_>>(), 24);
3923    static_assertions::const_assert_eq!(std::mem::align_of::<NodeProvideResourceRequest<'_>>(), 8);
3924
3925    static_assertions::const_assert_eq!(
3926        std::mem::offset_of!(NodeProvideResourceRequest<'_>, resource),
3927        0
3928    );
3929
3930    static_assertions::const_assert_eq!(
3931        std::mem::offset_of!(NodeProvideResourceRequest<'_>, controller),
3932        16
3933    );
3934
3935    impl ::fidl_next::Constrained for NodeProvideResourceRequest<'_> {
3936        type Constraint = ();
3937
3938        fn validate(
3939            _: ::fidl_next::Slot<'_, Self>,
3940            _: Self::Constraint,
3941        ) -> Result<(), ::fidl_next::ValidationError> {
3942            Ok(())
3943        }
3944    }
3945
3946    unsafe impl ::fidl_next::Wire for NodeProvideResourceRequest<'static> {
3947        type Narrowed<'de> = NodeProvideResourceRequest<'de>;
3948
3949        #[inline]
3950        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3951            ::fidl_next::munge! {
3952                let Self {
3953                    resource,
3954                    controller,
3955
3956                } = &mut *out_;
3957            }
3958
3959            ::fidl_next::Wire::zero_padding(resource);
3960
3961            ::fidl_next::Wire::zero_padding(controller);
3962
3963            unsafe {
3964                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
3965            }
3966        }
3967    }
3968
3969    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeProvideResourceRequest<'de>
3970    where
3971        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3972        ___D: ::fidl_next::Decoder<'de>,
3973        ___D: ::fidl_next::fuchsia::HandleDecoder,
3974    {
3975        fn decode(
3976            slot_: ::fidl_next::Slot<'_, Self>,
3977            decoder_: &mut ___D,
3978            _: (),
3979        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3980            if slot_.as_bytes()[20..24] != [0u8; 4] {
3981                return Err(::fidl_next::DecodeError::InvalidPadding);
3982            }
3983
3984            ::fidl_next::munge! {
3985                let Self {
3986                    mut resource,
3987                    mut controller,
3988
3989                } = slot_;
3990            }
3991
3992            let _field = resource.as_mut();
3993
3994            ::fidl_next::Decode::decode(resource.as_mut(), decoder_, ())?;
3995
3996            let _field = controller.as_mut();
3997
3998            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
3999
4000            Ok(())
4001        }
4002    }
4003
4004    impl<'de> ::fidl_next::IntoNatural for NodeProvideResourceRequest<'de> {
4005        type Natural = crate::natural::NodeProvideResourceRequest;
4006    }
4007
4008    /// The wire type corresponding to [`NodeAddChildRequest`].
4009    #[derive(Debug)]
4010    #[repr(C)]
4011    pub struct NodeAddChildRequest<'de> {
4012        pub args: crate::wire::NodeAddArgs<'de>,
4013
4014        pub controller:
4015            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4016
4017        pub node: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4018    }
4019
4020    static_assertions::const_assert_eq!(std::mem::size_of::<NodeAddChildRequest<'_>>(), 24);
4021    static_assertions::const_assert_eq!(std::mem::align_of::<NodeAddChildRequest<'_>>(), 8);
4022
4023    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, args), 0);
4024
4025    static_assertions::const_assert_eq!(
4026        std::mem::offset_of!(NodeAddChildRequest<'_>, controller),
4027        16
4028    );
4029
4030    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, node), 20);
4031
4032    impl ::fidl_next::Constrained for NodeAddChildRequest<'_> {
4033        type Constraint = ();
4034
4035        fn validate(
4036            _: ::fidl_next::Slot<'_, Self>,
4037            _: Self::Constraint,
4038        ) -> Result<(), ::fidl_next::ValidationError> {
4039            Ok(())
4040        }
4041    }
4042
4043    unsafe impl ::fidl_next::Wire for NodeAddChildRequest<'static> {
4044        type Narrowed<'de> = NodeAddChildRequest<'de>;
4045
4046        #[inline]
4047        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4048            ::fidl_next::munge! {
4049                let Self {
4050                    args,
4051                    controller,
4052                    node,
4053
4054                } = &mut *out_;
4055            }
4056
4057            ::fidl_next::Wire::zero_padding(args);
4058
4059            ::fidl_next::Wire::zero_padding(controller);
4060
4061            ::fidl_next::Wire::zero_padding(node);
4062        }
4063    }
4064
4065    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddChildRequest<'de>
4066    where
4067        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4068        ___D: ::fidl_next::Decoder<'de>,
4069        ___D: ::fidl_next::fuchsia::HandleDecoder,
4070    {
4071        fn decode(
4072            slot_: ::fidl_next::Slot<'_, Self>,
4073            decoder_: &mut ___D,
4074            _: (),
4075        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4076            ::fidl_next::munge! {
4077                let Self {
4078                    mut args,
4079                    mut controller,
4080                    mut node,
4081
4082                } = slot_;
4083            }
4084
4085            let _field = args.as_mut();
4086
4087            ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
4088
4089            let _field = controller.as_mut();
4090
4091            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4092
4093            let _field = node.as_mut();
4094
4095            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
4096
4097            Ok(())
4098        }
4099    }
4100
4101    impl<'de> ::fidl_next::IntoNatural for NodeAddChildRequest<'de> {
4102        type Natural = crate::natural::NodeAddChildRequest;
4103    }
4104
4105    /// The wire type corresponding to [`NodeControllerOnBindRequest`].
4106    #[repr(C)]
4107    pub struct NodeControllerOnBindRequest<'de> {
4108        pub(crate) table: ::fidl_next::wire::Table<'de>,
4109    }
4110
4111    impl<'de> Drop for NodeControllerOnBindRequest<'de> {
4112        fn drop(&mut self) {
4113            let _ = self.table.get(1).map(|envelope| unsafe {
4114                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
4115            });
4116        }
4117    }
4118
4119    impl ::fidl_next::Constrained for NodeControllerOnBindRequest<'_> {
4120        type Constraint = ();
4121
4122        fn validate(
4123            _: ::fidl_next::Slot<'_, Self>,
4124            _: Self::Constraint,
4125        ) -> Result<(), ::fidl_next::ValidationError> {
4126            Ok(())
4127        }
4128    }
4129
4130    unsafe impl ::fidl_next::Wire for NodeControllerOnBindRequest<'static> {
4131        type Narrowed<'de> = NodeControllerOnBindRequest<'de>;
4132
4133        #[inline]
4134        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4135            ::fidl_next::munge!(let Self { table } = out);
4136            ::fidl_next::wire::Table::zero_padding(table);
4137        }
4138    }
4139
4140    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeControllerOnBindRequest<'de>
4141    where
4142        ___D: ::fidl_next::Decoder<'de> + ?Sized,
4143        ___D: ::fidl_next::fuchsia::HandleDecoder,
4144    {
4145        fn decode(
4146            slot: ::fidl_next::Slot<'_, Self>,
4147            decoder: &mut ___D,
4148            _: (),
4149        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4150            ::fidl_next::munge!(let Self { table } = slot);
4151
4152            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4153                match ordinal {
4154                    0 => unsafe { ::core::hint::unreachable_unchecked() },
4155
4156                    1 => {
4157                        ::fidl_next::wire::Envelope::decode_as::<
4158                            ___D,
4159                            ::fidl_next::wire::fuchsia::Event,
4160                        >(slot.as_mut(), decoder, ())?;
4161
4162                        Ok(())
4163                    }
4164
4165                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4166                }
4167            })
4168        }
4169    }
4170
4171    impl<'de> NodeControllerOnBindRequest<'de> {
4172        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
4173            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4174        }
4175
4176        pub fn take_node_token(
4177            &mut self,
4178        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
4179            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4180        }
4181    }
4182
4183    impl<'de> ::core::fmt::Debug for NodeControllerOnBindRequest<'de> {
4184        fn fmt(
4185            &self,
4186            f: &mut ::core::fmt::Formatter<'_>,
4187        ) -> ::core::result::Result<(), ::core::fmt::Error> {
4188            f.debug_struct("NodeControllerOnBindRequest")
4189                .field("node_token", &self.node_token())
4190                .finish()
4191        }
4192    }
4193
4194    impl<'de> ::fidl_next::IntoNatural for NodeControllerOnBindRequest<'de> {
4195        type Natural = crate::natural::NodeControllerOnBindRequest;
4196    }
4197}
4198
4199pub mod wire_optional {
4200
4201    pub use fidl_next_common_fuchsia_driver_framework::wire_optional::*;
4202
4203    #[repr(transparent)]
4204    pub struct DriverResult<'de> {
4205        pub(crate) raw: ::fidl_next::wire::Union,
4206        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4207    }
4208
4209    impl ::fidl_next::Constrained for DriverResult<'_> {
4210        type Constraint = ();
4211
4212        fn validate(
4213            _: ::fidl_next::Slot<'_, Self>,
4214            _: Self::Constraint,
4215        ) -> Result<(), ::fidl_next::ValidationError> {
4216            Ok(())
4217        }
4218    }
4219
4220    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
4221        type Narrowed<'de> = DriverResult<'de>;
4222
4223        #[inline]
4224        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4225            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4226            ::fidl_next::wire::Union::zero_padding(raw);
4227        }
4228    }
4229
4230    impl<'de> DriverResult<'de> {
4231        pub fn is_some(&self) -> bool {
4232            self.raw.is_some()
4233        }
4234
4235        pub fn is_none(&self) -> bool {
4236            self.raw.is_none()
4237        }
4238
4239        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DriverResult<'de>> {
4240            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4241        }
4242
4243        pub fn into_option(self) -> ::core::option::Option<crate::wire::DriverResult<'de>> {
4244            if self.is_some() {
4245                Some(crate::wire::DriverResult {
4246                    raw: self.raw,
4247                    _phantom: ::core::marker::PhantomData,
4248                })
4249            } else {
4250                None
4251            }
4252        }
4253    }
4254
4255    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
4256    where
4257        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4258        ___D: ::fidl_next::Decoder<'de>,
4259        ___D: ::fidl_next::fuchsia::HandleDecoder,
4260    {
4261        fn decode(
4262            mut slot: ::fidl_next::Slot<'_, Self>,
4263            decoder: &mut ___D,
4264            _: (),
4265        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4266            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4267            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4268                1 => {
4269                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
4270                        raw,
4271                        decoder,
4272                        (),
4273                    )?
4274                }
4275
4276                2 => {
4277                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
4278                        raw,
4279                        decoder,
4280                        (),
4281                    )?
4282                }
4283
4284                3 => {
4285                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
4286                        raw,
4287                        decoder,
4288                        (),
4289                    )?
4290                }
4291
4292                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4293                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4294            }
4295
4296            Ok(())
4297        }
4298    }
4299
4300    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
4301        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4302            self.as_ref().fmt(f)
4303        }
4304    }
4305
4306    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
4307        type Natural = ::core::option::Option<crate::natural::DriverResult>;
4308    }
4309}
4310
4311pub mod generic {
4312
4313    pub use fidl_next_common_fuchsia_driver_framework::generic::*;
4314
4315    /// The generic type corresponding to [`DriverResumeRequest`].
4316    pub struct DriverResumeRequest<T0> {
4317        pub power_element_lease: T0,
4318    }
4319
4320    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>
4321        for DriverResumeRequest<T0>
4322    where
4323        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4324        ___E: ::fidl_next::fuchsia::HandleEncoder,
4325        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEventPair, ___E>,
4326    {
4327        #[inline]
4328        fn encode(
4329            self,
4330            encoder_: &mut ___E,
4331            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverResumeRequest>,
4332            _: (),
4333        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4334            ::fidl_next::munge! {
4335                let crate::wire::DriverResumeRequest {
4336                    power_element_lease,
4337
4338                } = out_;
4339            }
4340
4341            ::fidl_next::Encode::encode(
4342                self.power_element_lease,
4343                encoder_,
4344                power_element_lease,
4345                (),
4346            )?;
4347
4348            Ok(())
4349        }
4350    }
4351
4352    /// The generic type corresponding to [`DriverStartRequest`].
4353    pub struct DriverStartRequest<T0> {
4354        pub start_args: T0,
4355    }
4356
4357    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
4358        for DriverStartRequest<T0>
4359    where
4360        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4361        ___E: ::fidl_next::Encoder,
4362        ___E: ::fidl_next::fuchsia::HandleEncoder,
4363        T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
4364    {
4365        #[inline]
4366        fn encode(
4367            self,
4368            encoder_: &mut ___E,
4369            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
4370            _: (),
4371        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4372            ::fidl_next::munge! {
4373                let crate::wire::DriverStartRequest {
4374                    start_args,
4375
4376                } = out_;
4377            }
4378
4379            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
4380
4381            Ok(())
4382        }
4383    }
4384
4385    /// The generic type corresponding to [`NodeProvideResourceRequest`].
4386    pub struct NodeProvideResourceRequest<T0, T1> {
4387        pub resource: T0,
4388
4389        pub controller: T1,
4390    }
4391
4392    unsafe impl<___E, T0, T1>
4393        ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
4394        for NodeProvideResourceRequest<T0, T1>
4395    where
4396        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4397        ___E: ::fidl_next::Encoder,
4398        ___E: ::fidl_next::fuchsia::HandleEncoder,
4399        T0: ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E>,
4400        T1: ::fidl_next::Encode<
4401                ::fidl_next::ServerEnd<
4402                    crate::ResourceController,
4403                    ::fidl_next::wire::fuchsia::Channel,
4404                >,
4405                ___E,
4406            >,
4407    {
4408        #[inline]
4409        fn encode(
4410            self,
4411            encoder_: &mut ___E,
4412            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
4413            _: (),
4414        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4415            ::fidl_next::munge! {
4416                let crate::wire::NodeProvideResourceRequest {
4417                    resource,
4418                    controller,
4419
4420                } = out_;
4421            }
4422
4423            ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
4424
4425            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4426
4427            Ok(())
4428        }
4429    }
4430
4431    /// The generic type corresponding to [`NodeAddChildRequest`].
4432    pub struct NodeAddChildRequest<T0, T1, T2> {
4433        pub args: T0,
4434
4435        pub controller: T1,
4436
4437        pub node: T2,
4438    }
4439
4440    unsafe impl<___E, T0, T1, T2>
4441        ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
4442        for NodeAddChildRequest<T0, T1, T2>
4443    where
4444        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4445        ___E: ::fidl_next::Encoder,
4446        ___E: ::fidl_next::fuchsia::HandleEncoder,
4447        T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
4448        T1: ::fidl_next::Encode<
4449                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4450                ___E,
4451            >,
4452        T2: ::fidl_next::Encode<
4453                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4454                ___E,
4455            >,
4456    {
4457        #[inline]
4458        fn encode(
4459            self,
4460            encoder_: &mut ___E,
4461            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
4462            _: (),
4463        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4464            ::fidl_next::munge! {
4465                let crate::wire::NodeAddChildRequest {
4466                    args,
4467                    controller,
4468                    node,
4469
4470                } = out_;
4471            }
4472
4473            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
4474
4475            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4476
4477            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
4478
4479            Ok(())
4480        }
4481    }
4482}
4483
4484pub use self::natural::*;
4485
4486/// The type corresponding to the Driver protocol.
4487#[doc = " This protocol is used by the Driver Framework\'s Driver Host to communicate various messages and\n lifecycle hooks to the driver. The connection for this protocol is established through the\n |DriverRegistration| defined in the `driver_symbols` library.\n\n Once the driver has closed its server end, the Driver Framework will initiate the shutdown\n of all dispatchers belonging to this driver.\n"]
4488#[derive(PartialEq, Debug)]
4489pub struct Driver;
4490
4491#[cfg(feature = "driver")]
4492impl ::fidl_next::HasTransport for Driver {
4493    type Transport = ::fdf_fidl::DriverChannel;
4494}
4495
4496pub mod driver {
4497    pub mod prelude {
4498        pub use crate::{
4499            Driver, DriverClientHandler, DriverLocalClientHandler, DriverLocalServerHandler,
4500            DriverServerHandler, driver,
4501        };
4502
4503        pub use crate::natural::DriverResumeRequest;
4504
4505        pub use crate::natural::DriverStartRequest;
4506
4507        pub use crate::natural::DriverResumeResponse;
4508
4509        pub use crate::natural::DriverStartResponse;
4510
4511        pub use crate::natural::DriverSuspendResponse;
4512    }
4513
4514    pub struct Start;
4515
4516    impl ::fidl_next::Method for Start {
4517        const ORDINAL: u64 = 2863727161496985794;
4518        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4519            ::fidl_next::protocol::Flexibility::Flexible;
4520
4521        type Protocol = crate::Driver;
4522
4523        type Request = crate::wire::DriverStartRequest<'static>;
4524    }
4525
4526    impl ::fidl_next::TwoWayMethod for Start {
4527        type Response = ::fidl_next::wire::Result<
4528            'static,
4529            crate::wire::DriverStartResponse,
4530            ::fidl_next::wire::fuchsia::Status,
4531        >;
4532    }
4533
4534    impl<___R> ::fidl_next::Respond<___R> for Start {
4535        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4536
4537        fn respond(response: ___R) -> Self::Output {
4538            ::core::result::Result::Ok(response)
4539        }
4540    }
4541
4542    impl<___R> ::fidl_next::RespondErr<___R> for Start {
4543        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4544
4545        fn respond_err(response: ___R) -> Self::Output {
4546            ::core::result::Result::Err(response)
4547        }
4548    }
4549
4550    pub struct Stop;
4551
4552    impl ::fidl_next::Method for Stop {
4553        const ORDINAL: u64 = 5446759044519003197;
4554        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4555            ::fidl_next::protocol::Flexibility::Flexible;
4556
4557        type Protocol = crate::Driver;
4558
4559        type Request = ::fidl_next::wire::EmptyMessageBody;
4560    }
4561
4562    pub struct Suspend;
4563
4564    impl ::fidl_next::Method for Suspend {
4565        const ORDINAL: u64 = 5542715003953095352;
4566        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4567            ::fidl_next::protocol::Flexibility::Flexible;
4568
4569        type Protocol = crate::Driver;
4570
4571        type Request = ::fidl_next::wire::EmptyMessageBody;
4572    }
4573
4574    impl ::fidl_next::TwoWayMethod for Suspend {
4575        type Response = ::fidl_next::wire::Result<
4576            'static,
4577            crate::wire::DriverSuspendResponse,
4578            ::fidl_next::wire::fuchsia::Status,
4579        >;
4580    }
4581
4582    impl<___R> ::fidl_next::Respond<___R> for Suspend {
4583        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4584
4585        fn respond(response: ___R) -> Self::Output {
4586            ::core::result::Result::Ok(response)
4587        }
4588    }
4589
4590    impl<___R> ::fidl_next::RespondErr<___R> for Suspend {
4591        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4592
4593        fn respond_err(response: ___R) -> Self::Output {
4594            ::core::result::Result::Err(response)
4595        }
4596    }
4597
4598    pub struct Resume;
4599
4600    impl ::fidl_next::Method for Resume {
4601        const ORDINAL: u64 = 2681111055565410632;
4602        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4603            ::fidl_next::protocol::Flexibility::Flexible;
4604
4605        type Protocol = crate::Driver;
4606
4607        type Request = crate::wire::DriverResumeRequest;
4608    }
4609
4610    impl ::fidl_next::TwoWayMethod for Resume {
4611        type Response = ::fidl_next::wire::Result<
4612            'static,
4613            crate::wire::DriverResumeResponse,
4614            ::fidl_next::wire::fuchsia::Status,
4615        >;
4616    }
4617
4618    impl<___R> ::fidl_next::Respond<___R> for Resume {
4619        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4620
4621        fn respond(response: ___R) -> Self::Output {
4622            ::core::result::Result::Ok(response)
4623        }
4624    }
4625
4626    impl<___R> ::fidl_next::RespondErr<___R> for Resume {
4627        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4628
4629        fn respond_err(response: ___R) -> Self::Output {
4630            ::core::result::Result::Err(response)
4631        }
4632    }
4633
4634    mod ___detail {
4635        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Driver
4636        where
4637            ___T: ::fidl_next::Transport,
4638        {
4639            type Client = DriverClient<___T>;
4640            type Server = DriverServer<___T>;
4641        }
4642
4643        /// The client for the `Driver` protocol.
4644        #[repr(transparent)]
4645        pub struct DriverClient<___T: ::fidl_next::Transport> {
4646            #[allow(dead_code)]
4647            client: ::fidl_next::protocol::Client<___T>,
4648        }
4649
4650        impl<___T> DriverClient<___T>
4651        where
4652            ___T: ::fidl_next::Transport,
4653        {
4654            #[doc = " Starts the driver with the given |start_args|.\n\n Drivers should finish their initial setup and enumeration before returning from |Start|.\n In particular they should enumerate all currently available nodes by utilizing\n `fuchsia.driver.framework/Node.AddChild` and waiting for all calls to be completed.\n\n The Framework will not consider the driver to be started until this call has returned\n successfully. Therefore a driver will not have |Stop| called on it until after it has\n replied to |Start| successfully.\n\n If a driver returns an error, it will not have |Stop| called on it before the\n Driver Framework initiates shutdown of the driver\'s dispatchers. Therefore it should have\n performed all necessary cleanup before returning an error.\n"]
4655            pub fn start(
4656                &self,
4657
4658                start_args: impl ::fidl_next::Encode<
4659                    crate::wire::DriverStartArgs<'static>,
4660                    <___T as ::fidl_next::Transport>::SendBuffer,
4661                >,
4662            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
4663            where
4664                <___T as ::fidl_next::Transport>::SendBuffer:
4665                    ::fidl_next::encoder::InternalHandleEncoder,
4666                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4667                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4668            {
4669                self.start_with(crate::generic::DriverStartRequest { start_args })
4670            }
4671
4672            #[doc = " Starts the driver with the given |start_args|.\n\n Drivers should finish their initial setup and enumeration before returning from |Start|.\n In particular they should enumerate all currently available nodes by utilizing\n `fuchsia.driver.framework/Node.AddChild` and waiting for all calls to be completed.\n\n The Framework will not consider the driver to be started until this call has returned\n successfully. Therefore a driver will not have |Stop| called on it until after it has\n replied to |Start| successfully.\n\n If a driver returns an error, it will not have |Stop| called on it before the\n Driver Framework initiates shutdown of the driver\'s dispatchers. Therefore it should have\n performed all necessary cleanup before returning an error.\n"]
4673            pub fn start_with<___R>(
4674                &self,
4675                request: ___R,
4676            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
4677            where
4678                ___R: ::fidl_next::Encode<
4679                        crate::wire::DriverStartRequest<'static>,
4680                        <___T as ::fidl_next::Transport>::SendBuffer,
4681                    >,
4682            {
4683                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4684                    2863727161496985794,
4685                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
4686                    request,
4687                ))
4688            }
4689
4690            #[doc = " Stops the driver. To stop, the driver should teardown any resources it set up in or after\n |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should\n close its server end. Asynchronous operations should fully complete before closing\n the server end.\n"]
4691            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
4692                ::fidl_next::SendFuture::from_untyped(
4693                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
4694                        5446759044519003197,
4695                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
4696                        (),
4697                    ),
4698                )
4699            }
4700
4701            #[doc = " Returns when the driver has suspended the hardware.\n This is called when the power element requests the off power state.\n The driver should turn off the hardware as a response to this call.\n\n Note on execution order after a suspend is requested by the power element:\n  - dispatchers stop accepting new work in the work queue\n  - dispatcher drains previously queued work\n  - Once all work is drained, this method is called\n\n The driver will not immediately |Stop| after it has been suspended.\n It will first go through |Resume| before it is told to |Stop|.\n"]
4702            pub fn suspend(&self) -> ::fidl_next::TwoWayFuture<'_, super::Suspend, ___T> {
4703                ::fidl_next::TwoWayFuture::from_untyped(
4704                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4705                        5542715003953095352,
4706                        <super::Suspend as ::fidl_next::Method>::FLEXIBILITY,
4707                        (),
4708                    ),
4709                )
4710            }
4711
4712            #[doc = " Returns when the driver has resumed the hardware.\n This is called when the power framework requests the power element move to the on power state.\n The driver should turn the hardware back on as a response to this call.\n\n |power_element_lease| is the lease associated with the current wake if the\n wake was from a wake vector. Otherwise it is None.\n\n Note on execution order after a resume is requested by the power element:\n  - This method is called (the dispatcher does not accept any other work at this point)\n  - Once this method completes, dispatchers start accepting new work in the work queue\n"]
4713            pub fn resume(
4714                &self,
4715
4716                power_element_lease: impl ::fidl_next::Encode<
4717                    ::fidl_next::wire::fuchsia::OptionalEventPair,
4718                    <___T as ::fidl_next::Transport>::SendBuffer,
4719                >,
4720            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
4721            where
4722                <___T as ::fidl_next::Transport>::SendBuffer:
4723                    ::fidl_next::encoder::InternalHandleEncoder,
4724                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4725            {
4726                self.resume_with(crate::generic::DriverResumeRequest { power_element_lease })
4727            }
4728
4729            #[doc = " Returns when the driver has resumed the hardware.\n This is called when the power framework requests the power element move to the on power state.\n The driver should turn the hardware back on as a response to this call.\n\n |power_element_lease| is the lease associated with the current wake if the\n wake was from a wake vector. Otherwise it is None.\n\n Note on execution order after a resume is requested by the power element:\n  - This method is called (the dispatcher does not accept any other work at this point)\n  - Once this method completes, dispatchers start accepting new work in the work queue\n"]
4730            pub fn resume_with<___R>(
4731                &self,
4732                request: ___R,
4733            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
4734            where
4735                ___R: ::fidl_next::Encode<
4736                        crate::wire::DriverResumeRequest,
4737                        <___T as ::fidl_next::Transport>::SendBuffer,
4738                    >,
4739            {
4740                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4741                    2681111055565410632,
4742                    <super::Resume as ::fidl_next::Method>::FLEXIBILITY,
4743                    request,
4744                ))
4745            }
4746        }
4747
4748        /// The server for the `Driver` protocol.
4749        #[repr(transparent)]
4750        pub struct DriverServer<___T: ::fidl_next::Transport> {
4751            server: ::fidl_next::protocol::Server<___T>,
4752        }
4753
4754        impl<___T> DriverServer<___T> where ___T: ::fidl_next::Transport {}
4755    }
4756}
4757
4758#[diagnostic::on_unimplemented(
4759    note = "If {Self} implements the non-local DriverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
4760)]
4761
4762/// A client handler for the Driver protocol.
4763///
4764/// See [`Driver`] for more details.
4765pub trait DriverLocalClientHandler<
4766    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4767    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4768>
4769{
4770    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4771        ::core::future::ready(())
4772    }
4773}
4774
4775impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Driver
4776where
4777    ___H: DriverLocalClientHandler<___T>,
4778    ___T: ::fidl_next::Transport,
4779{
4780    async fn on_event(
4781        handler: &mut ___H,
4782        mut message: ::fidl_next::Message<___T>,
4783    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4784        match *message.header().ordinal {
4785            ordinal => {
4786                handler.on_unknown_interaction(ordinal).await;
4787                if ::core::matches!(
4788                    message.header().flexibility(),
4789                    ::fidl_next::protocol::Flexibility::Strict
4790                ) {
4791                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4792                } else {
4793                    Ok(())
4794                }
4795            }
4796        }
4797    }
4798}
4799
4800#[diagnostic::on_unimplemented(
4801    note = "If {Self} implements the non-local DriverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
4802)]
4803
4804/// A server handler for the Driver protocol.
4805///
4806/// See [`Driver`] for more details.
4807pub trait DriverLocalServerHandler<
4808    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4809    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4810>
4811{
4812    #[doc = " Starts the driver with the given |start_args|.\n\n Drivers should finish their initial setup and enumeration before returning from |Start|.\n In particular they should enumerate all currently available nodes by utilizing\n `fuchsia.driver.framework/Node.AddChild` and waiting for all calls to be completed.\n\n The Framework will not consider the driver to be started until this call has returned\n successfully. Therefore a driver will not have |Stop| called on it until after it has\n replied to |Start| successfully.\n\n If a driver returns an error, it will not have |Stop| called on it before the\n Driver Framework initiates shutdown of the driver\'s dispatchers. Therefore it should have\n performed all necessary cleanup before returning an error.\n"]
4813    fn start(
4814        &mut self,
4815
4816        request: ::fidl_next::Request<driver::Start, ___T>,
4817
4818        responder: ::fidl_next::Responder<driver::Start, ___T>,
4819    ) -> impl ::core::future::Future<Output = ()>;
4820
4821    #[doc = " Stops the driver. To stop, the driver should teardown any resources it set up in or after\n |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should\n close its server end. Asynchronous operations should fully complete before closing\n the server end.\n"]
4822    fn stop(&mut self) -> impl ::core::future::Future<Output = ()>;
4823
4824    #[doc = " Returns when the driver has suspended the hardware.\n This is called when the power element requests the off power state.\n The driver should turn off the hardware as a response to this call.\n\n Note on execution order after a suspend is requested by the power element:\n  - dispatchers stop accepting new work in the work queue\n  - dispatcher drains previously queued work\n  - Once all work is drained, this method is called\n\n The driver will not immediately |Stop| after it has been suspended.\n It will first go through |Resume| before it is told to |Stop|.\n"]
4825    fn suspend(
4826        &mut self,
4827
4828        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
4829    ) -> impl ::core::future::Future<Output = ()>;
4830
4831    #[doc = " Returns when the driver has resumed the hardware.\n This is called when the power framework requests the power element move to the on power state.\n The driver should turn the hardware back on as a response to this call.\n\n |power_element_lease| is the lease associated with the current wake if the\n wake was from a wake vector. Otherwise it is None.\n\n Note on execution order after a resume is requested by the power element:\n  - This method is called (the dispatcher does not accept any other work at this point)\n  - Once this method completes, dispatchers start accepting new work in the work queue\n"]
4832    fn resume(
4833        &mut self,
4834
4835        request: ::fidl_next::Request<driver::Resume, ___T>,
4836
4837        responder: ::fidl_next::Responder<driver::Resume, ___T>,
4838    ) -> impl ::core::future::Future<Output = ()>;
4839
4840    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
4841        ::core::future::ready(())
4842    }
4843}
4844
4845impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Driver
4846where
4847    ___H: DriverLocalServerHandler<___T>,
4848    ___T: ::fidl_next::Transport,
4849    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
4850            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4851            Constraint = (),
4852        >,
4853    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
4854            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
4855            Constraint = (),
4856        >,
4857{
4858    async fn on_one_way(
4859        handler: &mut ___H,
4860        mut message: ::fidl_next::Message<___T>,
4861    ) -> ::core::result::Result<
4862        (),
4863        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4864    > {
4865        match *message.header().ordinal {
4866            5446759044519003197 => {
4867                handler.stop().await;
4868                Ok(())
4869            }
4870
4871            ordinal => {
4872                handler.on_unknown_interaction(ordinal).await;
4873                if ::core::matches!(
4874                    message.header().flexibility(),
4875                    ::fidl_next::protocol::Flexibility::Strict
4876                ) {
4877                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4878                } else {
4879                    Ok(())
4880                }
4881            }
4882        }
4883    }
4884
4885    async fn on_two_way(
4886        handler: &mut ___H,
4887        mut message: ::fidl_next::Message<___T>,
4888        responder: ::fidl_next::protocol::Responder<___T>,
4889    ) -> ::core::result::Result<
4890        (),
4891        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4892    > {
4893        match *message.header().ordinal {
4894            2863727161496985794 => {
4895                let responder = ::fidl_next::Responder::from_untyped(responder);
4896
4897                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4898                    Ok(decoded) => {
4899                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
4900                        Ok(())
4901                    }
4902                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4903                        ordinal: 2863727161496985794,
4904                        error,
4905                    }),
4906                }
4907            }
4908
4909            5542715003953095352 => {
4910                let responder = ::fidl_next::Responder::from_untyped(responder);
4911
4912                handler.suspend(responder).await;
4913                Ok(())
4914            }
4915
4916            2681111055565410632 => {
4917                let responder = ::fidl_next::Responder::from_untyped(responder);
4918
4919                match ::fidl_next::AsDecoderExt::into_decoded(message) {
4920                    Ok(decoded) => {
4921                        handler
4922                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
4923                            .await;
4924                        Ok(())
4925                    }
4926                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4927                        ordinal: 2681111055565410632,
4928                        error,
4929                    }),
4930                }
4931            }
4932
4933            ordinal => {
4934                handler.on_unknown_interaction(ordinal).await;
4935                if ::core::matches!(
4936                    message.header().flexibility(),
4937                    ::fidl_next::protocol::Flexibility::Strict
4938                ) {
4939                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4940                } else {
4941                    responder
4942                        .respond_framework_error(
4943                            ordinal,
4944                            ::fidl_next::FrameworkError::UnknownMethod,
4945                        )
4946                        .expect("encoding a framework error should never fail")
4947                        .await?;
4948                    Ok(())
4949                }
4950            }
4951        }
4952    }
4953}
4954
4955/// A client handler for the Driver protocol.
4956///
4957/// See [`Driver`] for more details.
4958pub trait DriverClientHandler<
4959    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
4960    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
4961>
4962{
4963    fn on_unknown_interaction(
4964        &mut self,
4965        ordinal: u64,
4966    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4967        ::core::future::ready(())
4968    }
4969}
4970
4971impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Driver
4972where
4973    ___H: DriverClientHandler<___T> + ::core::marker::Send,
4974    ___T: ::fidl_next::Transport,
4975{
4976    async fn on_event(
4977        handler: &mut ___H,
4978        mut message: ::fidl_next::Message<___T>,
4979    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4980        match *message.header().ordinal {
4981            ordinal => {
4982                handler.on_unknown_interaction(ordinal).await;
4983                if ::core::matches!(
4984                    message.header().flexibility(),
4985                    ::fidl_next::protocol::Flexibility::Strict
4986                ) {
4987                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4988                } else {
4989                    Ok(())
4990                }
4991            }
4992        }
4993    }
4994}
4995
4996/// A server handler for the Driver protocol.
4997///
4998/// See [`Driver`] for more details.
4999pub trait DriverServerHandler<
5000    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5001    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5002>
5003{
5004    #[doc = " Starts the driver with the given |start_args|.\n\n Drivers should finish their initial setup and enumeration before returning from |Start|.\n In particular they should enumerate all currently available nodes by utilizing\n `fuchsia.driver.framework/Node.AddChild` and waiting for all calls to be completed.\n\n The Framework will not consider the driver to be started until this call has returned\n successfully. Therefore a driver will not have |Stop| called on it until after it has\n replied to |Start| successfully.\n\n If a driver returns an error, it will not have |Stop| called on it before the\n Driver Framework initiates shutdown of the driver\'s dispatchers. Therefore it should have\n performed all necessary cleanup before returning an error.\n"]
5005    fn start(
5006        &mut self,
5007
5008        request: ::fidl_next::Request<driver::Start, ___T>,
5009
5010        responder: ::fidl_next::Responder<driver::Start, ___T>,
5011    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5012
5013    #[doc = " Stops the driver. To stop, the driver should teardown any resources it set up in or after\n |Start|. This is a one-way FIDL method. When the driver has completed stopping, it should\n close its server end. Asynchronous operations should fully complete before closing\n the server end.\n"]
5014    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5015
5016    #[doc = " Returns when the driver has suspended the hardware.\n This is called when the power element requests the off power state.\n The driver should turn off the hardware as a response to this call.\n\n Note on execution order after a suspend is requested by the power element:\n  - dispatchers stop accepting new work in the work queue\n  - dispatcher drains previously queued work\n  - Once all work is drained, this method is called\n\n The driver will not immediately |Stop| after it has been suspended.\n It will first go through |Resume| before it is told to |Stop|.\n"]
5017    fn suspend(
5018        &mut self,
5019
5020        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
5021    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5022
5023    #[doc = " Returns when the driver has resumed the hardware.\n This is called when the power framework requests the power element move to the on power state.\n The driver should turn the hardware back on as a response to this call.\n\n |power_element_lease| is the lease associated with the current wake if the\n wake was from a wake vector. Otherwise it is None.\n\n Note on execution order after a resume is requested by the power element:\n  - This method is called (the dispatcher does not accept any other work at this point)\n  - Once this method completes, dispatchers start accepting new work in the work queue\n"]
5024    fn resume(
5025        &mut self,
5026
5027        request: ::fidl_next::Request<driver::Resume, ___T>,
5028
5029        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5030    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5031
5032    fn on_unknown_interaction(
5033        &mut self,
5034        ordinal: u64,
5035    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5036        ::core::future::ready(())
5037    }
5038}
5039
5040impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Driver
5041where
5042    ___H: DriverServerHandler<___T> + ::core::marker::Send,
5043    ___T: ::fidl_next::Transport,
5044    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
5045            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5046            Constraint = (),
5047        >,
5048    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
5049            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5050            Constraint = (),
5051        >,
5052{
5053    async fn on_one_way(
5054        handler: &mut ___H,
5055        mut message: ::fidl_next::Message<___T>,
5056    ) -> ::core::result::Result<
5057        (),
5058        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5059    > {
5060        match *message.header().ordinal {
5061            5446759044519003197 => {
5062                handler.stop().await;
5063                Ok(())
5064            }
5065
5066            ordinal => {
5067                handler.on_unknown_interaction(ordinal).await;
5068                if ::core::matches!(
5069                    message.header().flexibility(),
5070                    ::fidl_next::protocol::Flexibility::Strict
5071                ) {
5072                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5073                } else {
5074                    Ok(())
5075                }
5076            }
5077        }
5078    }
5079
5080    async fn on_two_way(
5081        handler: &mut ___H,
5082        mut message: ::fidl_next::Message<___T>,
5083        responder: ::fidl_next::protocol::Responder<___T>,
5084    ) -> ::core::result::Result<
5085        (),
5086        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5087    > {
5088        match *message.header().ordinal {
5089            2863727161496985794 => {
5090                let responder = ::fidl_next::Responder::from_untyped(responder);
5091
5092                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5093                    Ok(decoded) => {
5094                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
5095                        Ok(())
5096                    }
5097                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5098                        ordinal: 2863727161496985794,
5099                        error,
5100                    }),
5101                }
5102            }
5103
5104            5542715003953095352 => {
5105                let responder = ::fidl_next::Responder::from_untyped(responder);
5106
5107                handler.suspend(responder).await;
5108                Ok(())
5109            }
5110
5111            2681111055565410632 => {
5112                let responder = ::fidl_next::Responder::from_untyped(responder);
5113
5114                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5115                    Ok(decoded) => {
5116                        handler
5117                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
5118                            .await;
5119                        Ok(())
5120                    }
5121                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5122                        ordinal: 2681111055565410632,
5123                        error,
5124                    }),
5125                }
5126            }
5127
5128            ordinal => {
5129                handler.on_unknown_interaction(ordinal).await;
5130                if ::core::matches!(
5131                    message.header().flexibility(),
5132                    ::fidl_next::protocol::Flexibility::Strict
5133                ) {
5134                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5135                } else {
5136                    responder
5137                        .respond_framework_error(
5138                            ordinal,
5139                            ::fidl_next::FrameworkError::UnknownMethod,
5140                        )
5141                        .expect("encoding a framework error should never fail")
5142                        .await?;
5143                    Ok(())
5144                }
5145            }
5146        }
5147    }
5148}
5149
5150impl<___T> DriverClientHandler<___T> for ::fidl_next::IgnoreEvents
5151where
5152    ___T: ::fidl_next::Transport,
5153{
5154    async fn on_unknown_interaction(&mut self, _: u64) {}
5155}
5156
5157impl<___H, ___T> DriverLocalClientHandler<___T> for ::fidl_next::Local<___H>
5158where
5159    ___H: DriverClientHandler<___T>,
5160    ___T: ::fidl_next::Transport,
5161{
5162    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5163        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5164    }
5165}
5166
5167impl<___H, ___T> DriverLocalServerHandler<___T> for ::fidl_next::Local<___H>
5168where
5169    ___H: DriverServerHandler<___T>,
5170    ___T: ::fidl_next::Transport,
5171{
5172    async fn start(
5173        &mut self,
5174
5175        request: ::fidl_next::Request<driver::Start, ___T>,
5176
5177        responder: ::fidl_next::Responder<driver::Start, ___T>,
5178    ) {
5179        ___H::start(&mut self.0, request, responder).await
5180    }
5181
5182    async fn stop(&mut self) {
5183        ___H::stop(&mut self.0).await
5184    }
5185
5186    async fn suspend(&mut self, responder: ::fidl_next::Responder<driver::Suspend, ___T>) {
5187        ___H::suspend(&mut self.0, responder).await
5188    }
5189
5190    async fn resume(
5191        &mut self,
5192
5193        request: ::fidl_next::Request<driver::Resume, ___T>,
5194
5195        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5196    ) {
5197        ___H::resume(&mut self.0, request, responder).await
5198    }
5199
5200    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5201        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5202    }
5203}
5204
5205/// The type corresponding to the Node protocol.
5206#[doc = " Protocol through which a driver manages a node that it is bound to.\n Drivers should maintain their client connection to the node. Dropping\n the client connection while the driver is running will cause the\n driver framework to remove the driver and node from the topology.\n If the driver has set `host_restart_on_crash` to \"true\" in their\n component manifest, dropping the connection will initiate a restart of\n the driver host and driver.\n"]
5207#[derive(PartialEq, Debug)]
5208pub struct Node;
5209
5210#[cfg(target_os = "fuchsia")]
5211impl ::fidl_next::HasTransport for Node {
5212    type Transport = ::fidl_next::fuchsia::zx::Channel;
5213}
5214
5215pub mod node {
5216    pub mod prelude {
5217        pub use crate::{
5218            Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
5219            NodeServerHandler, node,
5220        };
5221
5222        pub use crate::natural::NodeAddChildRequest;
5223
5224        pub use crate::natural::NodeError;
5225
5226        pub use crate::natural::NodeProvideResourceRequest;
5227
5228        pub use crate::natural::NodeAddChildResponse;
5229
5230        pub use crate::natural::NodeProvideResourceResponse;
5231    }
5232
5233    pub struct AddChild;
5234
5235    impl ::fidl_next::Method for AddChild {
5236        const ORDINAL: u64 = 8633697350522413353;
5237        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5238            ::fidl_next::protocol::Flexibility::Flexible;
5239
5240        type Protocol = crate::Node;
5241
5242        type Request = crate::wire::NodeAddChildRequest<'static>;
5243    }
5244
5245    impl ::fidl_next::TwoWayMethod for AddChild {
5246        type Response = ::fidl_next::wire::Result<
5247            'static,
5248            crate::wire::NodeAddChildResponse,
5249            crate::wire::NodeError,
5250        >;
5251    }
5252
5253    impl<___R> ::fidl_next::Respond<___R> for AddChild {
5254        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5255
5256        fn respond(response: ___R) -> Self::Output {
5257            ::core::result::Result::Ok(response)
5258        }
5259    }
5260
5261    impl<___R> ::fidl_next::RespondErr<___R> for AddChild {
5262        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5263
5264        fn respond_err(response: ___R) -> Self::Output {
5265            ::core::result::Result::Err(response)
5266        }
5267    }
5268
5269    pub struct ProvideResource;
5270
5271    impl ::fidl_next::Method for ProvideResource {
5272        const ORDINAL: u64 = 3144824145393523406;
5273        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5274            ::fidl_next::protocol::Flexibility::Flexible;
5275
5276        type Protocol = crate::Node;
5277
5278        type Request = crate::wire::NodeProvideResourceRequest<'static>;
5279    }
5280
5281    impl ::fidl_next::TwoWayMethod for ProvideResource {
5282        type Response = ::fidl_next::wire::Result<
5283            'static,
5284            crate::wire::NodeProvideResourceResponse,
5285            crate::wire::NodeError,
5286        >;
5287    }
5288
5289    impl<___R> ::fidl_next::Respond<___R> for ProvideResource {
5290        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5291
5292        fn respond(response: ___R) -> Self::Output {
5293            ::core::result::Result::Ok(response)
5294        }
5295    }
5296
5297    impl<___R> ::fidl_next::RespondErr<___R> for ProvideResource {
5298        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5299
5300        fn respond_err(response: ___R) -> Self::Output {
5301            ::core::result::Result::Err(response)
5302        }
5303    }
5304
5305    mod ___detail {
5306        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
5307        where
5308            ___T: ::fidl_next::Transport,
5309        {
5310            type Client = NodeClient<___T>;
5311            type Server = NodeServer<___T>;
5312        }
5313
5314        /// The client for the `Node` protocol.
5315        #[repr(transparent)]
5316        pub struct NodeClient<___T: ::fidl_next::Transport> {
5317            #[allow(dead_code)]
5318            client: ::fidl_next::protocol::Client<___T>,
5319        }
5320
5321        impl<___T> NodeClient<___T>
5322        where
5323            ___T: ::fidl_next::Transport,
5324        {
5325            #[doc = " Adds a child node to this node.\n\n If `node` is present, this driver takes responsibility for binding to\n the newly created child. Otherwise, the driver framework will locate an\n appropriate driver to bind the child to.\n"]
5326            pub fn add_child(
5327                &self,
5328
5329                args: impl ::fidl_next::Encode<
5330                    crate::wire::NodeAddArgs<'static>,
5331                    <___T as ::fidl_next::Transport>::SendBuffer,
5332                >,
5333
5334                controller: impl ::fidl_next::Encode<
5335                    ::fidl_next::ServerEnd<
5336                        crate::NodeController,
5337                        ::fidl_next::wire::fuchsia::Channel,
5338                    >,
5339                    <___T as ::fidl_next::Transport>::SendBuffer,
5340                >,
5341
5342                node: impl ::fidl_next::Encode<
5343                    ::fidl_next::ServerEnd<
5344                        crate::Node,
5345                        ::fidl_next::wire::fuchsia::OptionalChannel,
5346                    >,
5347                    <___T as ::fidl_next::Transport>::SendBuffer,
5348                >,
5349            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5350            where
5351                <___T as ::fidl_next::Transport>::SendBuffer:
5352                    ::fidl_next::encoder::InternalHandleEncoder,
5353                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5354                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5355            {
5356                self.add_child_with(crate::generic::NodeAddChildRequest { args, controller, node })
5357            }
5358
5359            #[doc = " Adds a child node to this node.\n\n If `node` is present, this driver takes responsibility for binding to\n the newly created child. Otherwise, the driver framework will locate an\n appropriate driver to bind the child to.\n"]
5360            pub fn add_child_with<___R>(
5361                &self,
5362                request: ___R,
5363            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5364            where
5365                ___R: ::fidl_next::Encode<
5366                        crate::wire::NodeAddChildRequest<'static>,
5367                        <___T as ::fidl_next::Transport>::SendBuffer,
5368                    >,
5369            {
5370                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5371                    8633697350522413353,
5372                    <super::AddChild as ::fidl_next::Method>::FLEXIBILITY,
5373                    request,
5374                ))
5375            }
5376
5377            #[doc = " Provides a resource that other nodes can depend on. The lifetime of the\n provided resource is tied to the `controller` client connection. Dropping\n the client connection will cause the resource to be removed.\n"]
5378            pub fn provide_resource(
5379                &self,
5380
5381                resource: impl ::fidl_next::Encode<
5382                    crate::wire::ResourceArgs<'static>,
5383                    <___T as ::fidl_next::Transport>::SendBuffer,
5384                >,
5385
5386                controller: impl ::fidl_next::Encode<
5387                    ::fidl_next::ServerEnd<
5388                        crate::ResourceController,
5389                        ::fidl_next::wire::fuchsia::Channel,
5390                    >,
5391                    <___T as ::fidl_next::Transport>::SendBuffer,
5392                >,
5393            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5394            where
5395                <___T as ::fidl_next::Transport>::SendBuffer:
5396                    ::fidl_next::encoder::InternalHandleEncoder,
5397                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5398                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5399            {
5400                self.provide_resource_with(crate::generic::NodeProvideResourceRequest {
5401                    resource,
5402
5403                    controller,
5404                })
5405            }
5406
5407            #[doc = " Provides a resource that other nodes can depend on. The lifetime of the\n provided resource is tied to the `controller` client connection. Dropping\n the client connection will cause the resource to be removed.\n"]
5408            pub fn provide_resource_with<___R>(
5409                &self,
5410                request: ___R,
5411            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5412            where
5413                ___R: ::fidl_next::Encode<
5414                        crate::wire::NodeProvideResourceRequest<'static>,
5415                        <___T as ::fidl_next::Transport>::SendBuffer,
5416                    >,
5417            {
5418                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5419                    3144824145393523406,
5420                    <super::ProvideResource as ::fidl_next::Method>::FLEXIBILITY,
5421                    request,
5422                ))
5423            }
5424        }
5425
5426        /// The server for the `Node` protocol.
5427        #[repr(transparent)]
5428        pub struct NodeServer<___T: ::fidl_next::Transport> {
5429            server: ::fidl_next::protocol::Server<___T>,
5430        }
5431
5432        impl<___T> NodeServer<___T> where ___T: ::fidl_next::Transport {}
5433    }
5434}
5435
5436#[diagnostic::on_unimplemented(
5437    note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5438)]
5439
5440/// A client handler for the Node protocol.
5441///
5442/// See [`Node`] for more details.
5443pub trait NodeLocalClientHandler<
5444    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5445    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5446>
5447{
5448    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5449        ::core::future::ready(())
5450    }
5451}
5452
5453impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
5454where
5455    ___H: NodeLocalClientHandler<___T>,
5456    ___T: ::fidl_next::Transport,
5457{
5458    async fn on_event(
5459        handler: &mut ___H,
5460        mut message: ::fidl_next::Message<___T>,
5461    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5462        match *message.header().ordinal {
5463            ordinal => {
5464                handler.on_unknown_interaction(ordinal).await;
5465                if ::core::matches!(
5466                    message.header().flexibility(),
5467                    ::fidl_next::protocol::Flexibility::Strict
5468                ) {
5469                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5470                } else {
5471                    Ok(())
5472                }
5473            }
5474        }
5475    }
5476}
5477
5478#[diagnostic::on_unimplemented(
5479    note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5480)]
5481
5482/// A server handler for the Node protocol.
5483///
5484/// See [`Node`] for more details.
5485pub trait NodeLocalServerHandler<
5486    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5487    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5488>
5489{
5490    #[doc = " Adds a child node to this node.\n\n If `node` is present, this driver takes responsibility for binding to\n the newly created child. Otherwise, the driver framework will locate an\n appropriate driver to bind the child to.\n"]
5491    fn add_child(
5492        &mut self,
5493
5494        request: ::fidl_next::Request<node::AddChild, ___T>,
5495
5496        responder: ::fidl_next::Responder<node::AddChild, ___T>,
5497    ) -> impl ::core::future::Future<Output = ()>;
5498
5499    #[doc = " Provides a resource that other nodes can depend on. The lifetime of the\n provided resource is tied to the `controller` client connection. Dropping\n the client connection will cause the resource to be removed.\n"]
5500    fn provide_resource(
5501        &mut self,
5502
5503        request: ::fidl_next::Request<node::ProvideResource, ___T>,
5504
5505        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
5506    ) -> impl ::core::future::Future<Output = ()>;
5507
5508    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5509        ::core::future::ready(())
5510    }
5511}
5512
5513impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
5514where
5515    ___H: NodeLocalServerHandler<___T>,
5516    ___T: ::fidl_next::Transport,
5517    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
5518            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5519            Constraint = (),
5520        >,
5521    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
5522            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5523            Constraint = (),
5524        >,
5525{
5526    async fn on_one_way(
5527        handler: &mut ___H,
5528        mut message: ::fidl_next::Message<___T>,
5529    ) -> ::core::result::Result<
5530        (),
5531        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5532    > {
5533        match *message.header().ordinal {
5534            ordinal => {
5535                handler.on_unknown_interaction(ordinal).await;
5536                if ::core::matches!(
5537                    message.header().flexibility(),
5538                    ::fidl_next::protocol::Flexibility::Strict
5539                ) {
5540                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5541                } else {
5542                    Ok(())
5543                }
5544            }
5545        }
5546    }
5547
5548    async fn on_two_way(
5549        handler: &mut ___H,
5550        mut message: ::fidl_next::Message<___T>,
5551        responder: ::fidl_next::protocol::Responder<___T>,
5552    ) -> ::core::result::Result<
5553        (),
5554        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5555    > {
5556        match *message.header().ordinal {
5557            8633697350522413353 => {
5558                let responder = ::fidl_next::Responder::from_untyped(responder);
5559
5560                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5561                    Ok(decoded) => {
5562                        handler
5563                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
5564                            .await;
5565                        Ok(())
5566                    }
5567                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5568                        ordinal: 8633697350522413353,
5569                        error,
5570                    }),
5571                }
5572            }
5573
5574            3144824145393523406 => {
5575                let responder = ::fidl_next::Responder::from_untyped(responder);
5576
5577                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5578                    Ok(decoded) => {
5579                        handler
5580                            .provide_resource(
5581                                ::fidl_next::Request::from_decoded(decoded),
5582                                responder,
5583                            )
5584                            .await;
5585                        Ok(())
5586                    }
5587                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5588                        ordinal: 3144824145393523406,
5589                        error,
5590                    }),
5591                }
5592            }
5593
5594            ordinal => {
5595                handler.on_unknown_interaction(ordinal).await;
5596                if ::core::matches!(
5597                    message.header().flexibility(),
5598                    ::fidl_next::protocol::Flexibility::Strict
5599                ) {
5600                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5601                } else {
5602                    responder
5603                        .respond_framework_error(
5604                            ordinal,
5605                            ::fidl_next::FrameworkError::UnknownMethod,
5606                        )
5607                        .expect("encoding a framework error should never fail")
5608                        .await?;
5609                    Ok(())
5610                }
5611            }
5612        }
5613    }
5614}
5615
5616/// A client handler for the Node protocol.
5617///
5618/// See [`Node`] for more details.
5619pub trait NodeClientHandler<
5620    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5621    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5622>
5623{
5624    fn on_unknown_interaction(
5625        &mut self,
5626        ordinal: u64,
5627    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5628        ::core::future::ready(())
5629    }
5630}
5631
5632impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
5633where
5634    ___H: NodeClientHandler<___T> + ::core::marker::Send,
5635    ___T: ::fidl_next::Transport,
5636{
5637    async fn on_event(
5638        handler: &mut ___H,
5639        mut message: ::fidl_next::Message<___T>,
5640    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5641        match *message.header().ordinal {
5642            ordinal => {
5643                handler.on_unknown_interaction(ordinal).await;
5644                if ::core::matches!(
5645                    message.header().flexibility(),
5646                    ::fidl_next::protocol::Flexibility::Strict
5647                ) {
5648                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5649                } else {
5650                    Ok(())
5651                }
5652            }
5653        }
5654    }
5655}
5656
5657/// A server handler for the Node protocol.
5658///
5659/// See [`Node`] for more details.
5660pub trait NodeServerHandler<
5661    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5662    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5663>
5664{
5665    #[doc = " Adds a child node to this node.\n\n If `node` is present, this driver takes responsibility for binding to\n the newly created child. Otherwise, the driver framework will locate an\n appropriate driver to bind the child to.\n"]
5666    fn add_child(
5667        &mut self,
5668
5669        request: ::fidl_next::Request<node::AddChild, ___T>,
5670
5671        responder: ::fidl_next::Responder<node::AddChild, ___T>,
5672    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5673
5674    #[doc = " Provides a resource that other nodes can depend on. The lifetime of the\n provided resource is tied to the `controller` client connection. Dropping\n the client connection will cause the resource to be removed.\n"]
5675    fn provide_resource(
5676        &mut self,
5677
5678        request: ::fidl_next::Request<node::ProvideResource, ___T>,
5679
5680        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
5681    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5682
5683    fn on_unknown_interaction(
5684        &mut self,
5685        ordinal: u64,
5686    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5687        ::core::future::ready(())
5688    }
5689}
5690
5691impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
5692where
5693    ___H: NodeServerHandler<___T> + ::core::marker::Send,
5694    ___T: ::fidl_next::Transport,
5695    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
5696            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5697            Constraint = (),
5698        >,
5699    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
5700            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5701            Constraint = (),
5702        >,
5703{
5704    async fn on_one_way(
5705        handler: &mut ___H,
5706        mut message: ::fidl_next::Message<___T>,
5707    ) -> ::core::result::Result<
5708        (),
5709        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5710    > {
5711        match *message.header().ordinal {
5712            ordinal => {
5713                handler.on_unknown_interaction(ordinal).await;
5714                if ::core::matches!(
5715                    message.header().flexibility(),
5716                    ::fidl_next::protocol::Flexibility::Strict
5717                ) {
5718                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5719                } else {
5720                    Ok(())
5721                }
5722            }
5723        }
5724    }
5725
5726    async fn on_two_way(
5727        handler: &mut ___H,
5728        mut message: ::fidl_next::Message<___T>,
5729        responder: ::fidl_next::protocol::Responder<___T>,
5730    ) -> ::core::result::Result<
5731        (),
5732        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5733    > {
5734        match *message.header().ordinal {
5735            8633697350522413353 => {
5736                let responder = ::fidl_next::Responder::from_untyped(responder);
5737
5738                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5739                    Ok(decoded) => {
5740                        handler
5741                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
5742                            .await;
5743                        Ok(())
5744                    }
5745                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5746                        ordinal: 8633697350522413353,
5747                        error,
5748                    }),
5749                }
5750            }
5751
5752            3144824145393523406 => {
5753                let responder = ::fidl_next::Responder::from_untyped(responder);
5754
5755                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5756                    Ok(decoded) => {
5757                        handler
5758                            .provide_resource(
5759                                ::fidl_next::Request::from_decoded(decoded),
5760                                responder,
5761                            )
5762                            .await;
5763                        Ok(())
5764                    }
5765                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5766                        ordinal: 3144824145393523406,
5767                        error,
5768                    }),
5769                }
5770            }
5771
5772            ordinal => {
5773                handler.on_unknown_interaction(ordinal).await;
5774                if ::core::matches!(
5775                    message.header().flexibility(),
5776                    ::fidl_next::protocol::Flexibility::Strict
5777                ) {
5778                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5779                } else {
5780                    responder
5781                        .respond_framework_error(
5782                            ordinal,
5783                            ::fidl_next::FrameworkError::UnknownMethod,
5784                        )
5785                        .expect("encoding a framework error should never fail")
5786                        .await?;
5787                    Ok(())
5788                }
5789            }
5790        }
5791    }
5792}
5793
5794impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
5795where
5796    ___T: ::fidl_next::Transport,
5797{
5798    async fn on_unknown_interaction(&mut self, _: u64) {}
5799}
5800
5801impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
5802where
5803    ___H: NodeClientHandler<___T>,
5804    ___T: ::fidl_next::Transport,
5805{
5806    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5807        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5808    }
5809}
5810
5811impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
5812where
5813    ___H: NodeServerHandler<___T>,
5814    ___T: ::fidl_next::Transport,
5815{
5816    async fn add_child(
5817        &mut self,
5818
5819        request: ::fidl_next::Request<node::AddChild, ___T>,
5820
5821        responder: ::fidl_next::Responder<node::AddChild, ___T>,
5822    ) {
5823        ___H::add_child(&mut self.0, request, responder).await
5824    }
5825
5826    async fn provide_resource(
5827        &mut self,
5828
5829        request: ::fidl_next::Request<node::ProvideResource, ___T>,
5830
5831        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
5832    ) {
5833        ___H::provide_resource(&mut self.0, request, responder).await
5834    }
5835
5836    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5837        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5838    }
5839}
5840
5841/// The type corresponding to the NodeController protocol.
5842#[doc = " Protocol through which a parent node controls one of its children.\n"]
5843#[derive(PartialEq, Debug)]
5844pub struct NodeController;
5845
5846#[cfg(target_os = "fuchsia")]
5847impl ::fidl_next::HasTransport for NodeController {
5848    type Transport = ::fidl_next::fuchsia::zx::Channel;
5849}
5850
5851pub mod node_controller {
5852    pub mod prelude {
5853        pub use crate::{
5854            NodeController, NodeControllerClientHandler, NodeControllerLocalClientHandler,
5855            NodeControllerLocalServerHandler, NodeControllerServerHandler, node_controller,
5856        };
5857
5858        pub use crate::natural::DriverResult;
5859
5860        pub use crate::natural::NodeControllerOnBindRequest;
5861
5862        pub use crate::natural::NodeControllerRequestBindRequest;
5863
5864        pub use crate::natural::NodeControllerRequestBindResponse;
5865    }
5866
5867    pub struct Remove;
5868
5869    impl ::fidl_next::Method for Remove {
5870        const ORDINAL: u64 = 6123359741742396225;
5871        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5872            ::fidl_next::protocol::Flexibility::Flexible;
5873
5874        type Protocol = crate::NodeController;
5875
5876        type Request = ::fidl_next::wire::EmptyMessageBody;
5877    }
5878
5879    pub struct RequestBind;
5880
5881    impl ::fidl_next::Method for RequestBind {
5882        const ORDINAL: u64 = 4735909333556220047;
5883        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5884            ::fidl_next::protocol::Flexibility::Flexible;
5885
5886        type Protocol = crate::NodeController;
5887
5888        type Request = crate::wire::NodeControllerRequestBindRequest<'static>;
5889    }
5890
5891    impl ::fidl_next::TwoWayMethod for RequestBind {
5892        type Response = ::fidl_next::wire::Result<
5893            'static,
5894            crate::wire::NodeControllerRequestBindResponse,
5895            ::fidl_next::wire::fuchsia::Status,
5896        >;
5897    }
5898
5899    impl<___R> ::fidl_next::Respond<___R> for RequestBind {
5900        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5901
5902        fn respond(response: ___R) -> Self::Output {
5903            ::core::result::Result::Ok(response)
5904        }
5905    }
5906
5907    impl<___R> ::fidl_next::RespondErr<___R> for RequestBind {
5908        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5909
5910        fn respond_err(response: ___R) -> Self::Output {
5911            ::core::result::Result::Err(response)
5912        }
5913    }
5914
5915    pub struct OnBind;
5916
5917    impl ::fidl_next::Method for OnBind {
5918        const ORDINAL: u64 = 5905369594807853098;
5919        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5920            ::fidl_next::protocol::Flexibility::Flexible;
5921
5922        type Protocol = crate::NodeController;
5923
5924        type Request = crate::wire::NodeControllerOnBindRequest<'static>;
5925    }
5926
5927    pub struct WaitForDriver;
5928
5929    impl ::fidl_next::Method for WaitForDriver {
5930        const ORDINAL: u64 = 7635589759067755399;
5931        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5932            ::fidl_next::protocol::Flexibility::Flexible;
5933
5934        type Protocol = crate::NodeController;
5935
5936        type Request = ::fidl_next::wire::EmptyMessageBody;
5937    }
5938
5939    impl ::fidl_next::TwoWayMethod for WaitForDriver {
5940        type Response = ::fidl_next::wire::Result<
5941            'static,
5942            crate::wire::DriverResult<'static>,
5943            ::fidl_next::wire::fuchsia::Status,
5944        >;
5945    }
5946
5947    impl<___R> ::fidl_next::Respond<___R> for WaitForDriver {
5948        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5949
5950        fn respond(response: ___R) -> Self::Output {
5951            ::core::result::Result::Ok(response)
5952        }
5953    }
5954
5955    impl<___R> ::fidl_next::RespondErr<___R> for WaitForDriver {
5956        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5957
5958        fn respond_err(response: ___R) -> Self::Output {
5959            ::core::result::Result::Err(response)
5960        }
5961    }
5962
5963    mod ___detail {
5964        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeController
5965        where
5966            ___T: ::fidl_next::Transport,
5967        {
5968            type Client = NodeControllerClient<___T>;
5969            type Server = NodeControllerServer<___T>;
5970        }
5971
5972        /// The client for the `NodeController` protocol.
5973        #[repr(transparent)]
5974        pub struct NodeControllerClient<___T: ::fidl_next::Transport> {
5975            #[allow(dead_code)]
5976            client: ::fidl_next::protocol::Client<___T>,
5977        }
5978
5979        impl<___T> NodeControllerClient<___T>
5980        where
5981            ___T: ::fidl_next::Transport,
5982        {
5983            #[doc = " Removes the node and all of its children.\n"]
5984            pub fn remove(&self) -> ::fidl_next::SendFuture<'_, ___T> {
5985                ::fidl_next::SendFuture::from_untyped(
5986                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
5987                        6123359741742396225,
5988                        <super::Remove as ::fidl_next::Method>::FLEXIBILITY,
5989                        (),
5990                    ),
5991                )
5992            }
5993
5994            #[doc = " Request that the framework attempts to bind a driver to this node.\n This is an *additional* request for binding as the framework attempts to bind a node once\n when the node is created.\n * error `ZX_ERR_ALREADY_BOUND` if the node is already bound and `force_rebind` is false.\n * error `ZX_ERR_ALREADY_EXISTS` if the node has an outstanding |RequestBind| call which has\n not completed.\n"]
5995            pub fn request_bind_with<___R>(
5996                &self,
5997                request: ___R,
5998            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestBind, ___T>
5999            where
6000                ___R: ::fidl_next::Encode<
6001                        crate::wire::NodeControllerRequestBindRequest<'static>,
6002                        <___T as ::fidl_next::Transport>::SendBuffer,
6003                    >,
6004            {
6005                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6006                    4735909333556220047,
6007                    <super::RequestBind as ::fidl_next::Method>::FLEXIBILITY,
6008                    request,
6009                ))
6010            }
6011
6012            #[doc = " Hanging get style call that returns a terminal state for the associated `Node`,\n or the composite node that is parented by this node.\n For a successfully started driver this returns immediately with the token of the\n node that the driver started on.\n If an error happens we wait until bootup is complete, which is when all drivers that\n can bind and start have done so, before returning the error.\n"]
6013            pub fn wait_for_driver(
6014                &self,
6015            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForDriver, ___T> {
6016                ::fidl_next::TwoWayFuture::from_untyped(
6017                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6018                        7635589759067755399,
6019                        <super::WaitForDriver as ::fidl_next::Method>::FLEXIBILITY,
6020                        (),
6021                    ),
6022                )
6023            }
6024        }
6025
6026        /// The server for the `NodeController` protocol.
6027        #[repr(transparent)]
6028        pub struct NodeControllerServer<___T: ::fidl_next::Transport> {
6029            server: ::fidl_next::protocol::Server<___T>,
6030        }
6031
6032        impl<___T> NodeControllerServer<___T>
6033        where
6034            ___T: ::fidl_next::Transport,
6035        {
6036            #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6037
6038            pub fn on_bind_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6039            where
6040                ___R: ::fidl_next::Encode<
6041                        <super::OnBind as ::fidl_next::Method>::Request,
6042                        <___T as ::fidl_next::Transport>::SendBuffer,
6043                    >,
6044            {
6045                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6046                    5905369594807853098,
6047                    <super::OnBind as ::fidl_next::Method>::FLEXIBILITY,
6048                    request,
6049                ))
6050            }
6051        }
6052    }
6053}
6054
6055#[diagnostic::on_unimplemented(
6056    note = "If {Self} implements the non-local NodeControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6057)]
6058
6059/// A client handler for the NodeController protocol.
6060///
6061/// See [`NodeController`] for more details.
6062pub trait NodeControllerLocalClientHandler<
6063    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6064    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6065>
6066{
6067    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6068    fn on_bind(
6069        &mut self,
6070
6071        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6072    ) -> impl ::core::future::Future<Output = ()>;
6073
6074    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6075        ::core::future::ready(())
6076    }
6077}
6078
6079impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeController
6080where
6081    ___H: NodeControllerLocalClientHandler<___T>,
6082    ___T: ::fidl_next::Transport,
6083    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6084            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6085            Constraint = (),
6086        >,
6087{
6088    async fn on_event(
6089        handler: &mut ___H,
6090        mut message: ::fidl_next::Message<___T>,
6091    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6092        match *message.header().ordinal {
6093            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6094                Ok(decoded) => {
6095                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6096                    Ok(())
6097                }
6098                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6099                    ordinal: 5905369594807853098,
6100                    error,
6101                }),
6102            },
6103
6104            ordinal => {
6105                handler.on_unknown_interaction(ordinal).await;
6106                if ::core::matches!(
6107                    message.header().flexibility(),
6108                    ::fidl_next::protocol::Flexibility::Strict
6109                ) {
6110                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6111                } else {
6112                    Ok(())
6113                }
6114            }
6115        }
6116    }
6117}
6118
6119#[diagnostic::on_unimplemented(
6120    note = "If {Self} implements the non-local NodeControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6121)]
6122
6123/// A server handler for the NodeController protocol.
6124///
6125/// See [`NodeController`] for more details.
6126pub trait NodeControllerLocalServerHandler<
6127    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6128    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6129>
6130{
6131    #[doc = " Removes the node and all of its children.\n"]
6132    fn remove(&mut self) -> impl ::core::future::Future<Output = ()>;
6133
6134    #[doc = " Request that the framework attempts to bind a driver to this node.\n This is an *additional* request for binding as the framework attempts to bind a node once\n when the node is created.\n * error `ZX_ERR_ALREADY_BOUND` if the node is already bound and `force_rebind` is false.\n * error `ZX_ERR_ALREADY_EXISTS` if the node has an outstanding |RequestBind| call which has\n not completed.\n"]
6135    fn request_bind(
6136        &mut self,
6137
6138        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6139
6140        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6141    ) -> impl ::core::future::Future<Output = ()>;
6142
6143    #[doc = " Hanging get style call that returns a terminal state for the associated `Node`,\n or the composite node that is parented by this node.\n For a successfully started driver this returns immediately with the token of the\n node that the driver started on.\n If an error happens we wait until bootup is complete, which is when all drivers that\n can bind and start have done so, before returning the error.\n"]
6144    fn wait_for_driver(
6145        &mut self,
6146
6147        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6148    ) -> impl ::core::future::Future<Output = ()>;
6149
6150    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6151        ::core::future::ready(())
6152    }
6153}
6154
6155impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeController
6156where
6157    ___H: NodeControllerLocalServerHandler<___T>,
6158    ___T: ::fidl_next::Transport,
6159    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6160            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6161            Constraint = (),
6162        >,
6163{
6164    async fn on_one_way(
6165        handler: &mut ___H,
6166        mut message: ::fidl_next::Message<___T>,
6167    ) -> ::core::result::Result<
6168        (),
6169        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6170    > {
6171        match *message.header().ordinal {
6172            6123359741742396225 => {
6173                handler.remove().await;
6174                Ok(())
6175            }
6176
6177            ordinal => {
6178                handler.on_unknown_interaction(ordinal).await;
6179                if ::core::matches!(
6180                    message.header().flexibility(),
6181                    ::fidl_next::protocol::Flexibility::Strict
6182                ) {
6183                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6184                } else {
6185                    Ok(())
6186                }
6187            }
6188        }
6189    }
6190
6191    async fn on_two_way(
6192        handler: &mut ___H,
6193        mut message: ::fidl_next::Message<___T>,
6194        responder: ::fidl_next::protocol::Responder<___T>,
6195    ) -> ::core::result::Result<
6196        (),
6197        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6198    > {
6199        match *message.header().ordinal {
6200            4735909333556220047 => {
6201                let responder = ::fidl_next::Responder::from_untyped(responder);
6202
6203                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6204                    Ok(decoded) => {
6205                        handler
6206                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6207                            .await;
6208                        Ok(())
6209                    }
6210                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6211                        ordinal: 4735909333556220047,
6212                        error,
6213                    }),
6214                }
6215            }
6216
6217            7635589759067755399 => {
6218                let responder = ::fidl_next::Responder::from_untyped(responder);
6219
6220                handler.wait_for_driver(responder).await;
6221                Ok(())
6222            }
6223
6224            ordinal => {
6225                handler.on_unknown_interaction(ordinal).await;
6226                if ::core::matches!(
6227                    message.header().flexibility(),
6228                    ::fidl_next::protocol::Flexibility::Strict
6229                ) {
6230                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6231                } else {
6232                    responder
6233                        .respond_framework_error(
6234                            ordinal,
6235                            ::fidl_next::FrameworkError::UnknownMethod,
6236                        )
6237                        .expect("encoding a framework error should never fail")
6238                        .await?;
6239                    Ok(())
6240                }
6241            }
6242        }
6243    }
6244}
6245
6246/// A client handler for the NodeController protocol.
6247///
6248/// See [`NodeController`] for more details.
6249pub trait NodeControllerClientHandler<
6250    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6251    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6252>
6253{
6254    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6255    fn on_bind(
6256        &mut self,
6257
6258        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6259    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6260
6261    fn on_unknown_interaction(
6262        &mut self,
6263        ordinal: u64,
6264    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6265        ::core::future::ready(())
6266    }
6267}
6268
6269impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeController
6270where
6271    ___H: NodeControllerClientHandler<___T> + ::core::marker::Send,
6272    ___T: ::fidl_next::Transport,
6273    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6274            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6275            Constraint = (),
6276        >,
6277{
6278    async fn on_event(
6279        handler: &mut ___H,
6280        mut message: ::fidl_next::Message<___T>,
6281    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6282        match *message.header().ordinal {
6283            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6284                Ok(decoded) => {
6285                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6286                    Ok(())
6287                }
6288                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6289                    ordinal: 5905369594807853098,
6290                    error,
6291                }),
6292            },
6293
6294            ordinal => {
6295                handler.on_unknown_interaction(ordinal).await;
6296                if ::core::matches!(
6297                    message.header().flexibility(),
6298                    ::fidl_next::protocol::Flexibility::Strict
6299                ) {
6300                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6301                } else {
6302                    Ok(())
6303                }
6304            }
6305        }
6306    }
6307}
6308
6309/// A server handler for the NodeController protocol.
6310///
6311/// See [`NodeController`] for more details.
6312pub trait NodeControllerServerHandler<
6313    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6314    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6315>
6316{
6317    #[doc = " Removes the node and all of its children.\n"]
6318    fn remove(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6319
6320    #[doc = " Request that the framework attempts to bind a driver to this node.\n This is an *additional* request for binding as the framework attempts to bind a node once\n when the node is created.\n * error `ZX_ERR_ALREADY_BOUND` if the node is already bound and `force_rebind` is false.\n * error `ZX_ERR_ALREADY_EXISTS` if the node has an outstanding |RequestBind| call which has\n not completed.\n"]
6321    fn request_bind(
6322        &mut self,
6323
6324        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6325
6326        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6327    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6328
6329    #[doc = " Hanging get style call that returns a terminal state for the associated `Node`,\n or the composite node that is parented by this node.\n For a successfully started driver this returns immediately with the token of the\n node that the driver started on.\n If an error happens we wait until bootup is complete, which is when all drivers that\n can bind and start have done so, before returning the error.\n"]
6330    fn wait_for_driver(
6331        &mut self,
6332
6333        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6334    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6335
6336    fn on_unknown_interaction(
6337        &mut self,
6338        ordinal: u64,
6339    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6340        ::core::future::ready(())
6341    }
6342}
6343
6344impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeController
6345where
6346    ___H: NodeControllerServerHandler<___T> + ::core::marker::Send,
6347    ___T: ::fidl_next::Transport,
6348    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6349            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6350            Constraint = (),
6351        >,
6352{
6353    async fn on_one_way(
6354        handler: &mut ___H,
6355        mut message: ::fidl_next::Message<___T>,
6356    ) -> ::core::result::Result<
6357        (),
6358        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6359    > {
6360        match *message.header().ordinal {
6361            6123359741742396225 => {
6362                handler.remove().await;
6363                Ok(())
6364            }
6365
6366            ordinal => {
6367                handler.on_unknown_interaction(ordinal).await;
6368                if ::core::matches!(
6369                    message.header().flexibility(),
6370                    ::fidl_next::protocol::Flexibility::Strict
6371                ) {
6372                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6373                } else {
6374                    Ok(())
6375                }
6376            }
6377        }
6378    }
6379
6380    async fn on_two_way(
6381        handler: &mut ___H,
6382        mut message: ::fidl_next::Message<___T>,
6383        responder: ::fidl_next::protocol::Responder<___T>,
6384    ) -> ::core::result::Result<
6385        (),
6386        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6387    > {
6388        match *message.header().ordinal {
6389            4735909333556220047 => {
6390                let responder = ::fidl_next::Responder::from_untyped(responder);
6391
6392                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6393                    Ok(decoded) => {
6394                        handler
6395                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6396                            .await;
6397                        Ok(())
6398                    }
6399                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6400                        ordinal: 4735909333556220047,
6401                        error,
6402                    }),
6403                }
6404            }
6405
6406            7635589759067755399 => {
6407                let responder = ::fidl_next::Responder::from_untyped(responder);
6408
6409                handler.wait_for_driver(responder).await;
6410                Ok(())
6411            }
6412
6413            ordinal => {
6414                handler.on_unknown_interaction(ordinal).await;
6415                if ::core::matches!(
6416                    message.header().flexibility(),
6417                    ::fidl_next::protocol::Flexibility::Strict
6418                ) {
6419                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6420                } else {
6421                    responder
6422                        .respond_framework_error(
6423                            ordinal,
6424                            ::fidl_next::FrameworkError::UnknownMethod,
6425                        )
6426                        .expect("encoding a framework error should never fail")
6427                        .await?;
6428                    Ok(())
6429                }
6430            }
6431        }
6432    }
6433}
6434
6435impl<___T> NodeControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
6436where
6437    ___T: ::fidl_next::Transport,
6438{
6439    async fn on_bind(&mut self, _: ::fidl_next::Request<node_controller::OnBind, ___T>) {}
6440
6441    async fn on_unknown_interaction(&mut self, _: u64) {}
6442}
6443
6444impl<___H, ___T> NodeControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
6445where
6446    ___H: NodeControllerClientHandler<___T>,
6447    ___T: ::fidl_next::Transport,
6448{
6449    async fn on_bind(&mut self, request: ::fidl_next::Request<node_controller::OnBind, ___T>) {
6450        ___H::on_bind(&mut self.0, request).await
6451    }
6452
6453    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6454        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6455    }
6456}
6457
6458impl<___H, ___T> NodeControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
6459where
6460    ___H: NodeControllerServerHandler<___T>,
6461    ___T: ::fidl_next::Transport,
6462{
6463    async fn remove(&mut self) {
6464        ___H::remove(&mut self.0).await
6465    }
6466
6467    async fn request_bind(
6468        &mut self,
6469
6470        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6471
6472        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6473    ) {
6474        ___H::request_bind(&mut self.0, request, responder).await
6475    }
6476
6477    async fn wait_for_driver(
6478        &mut self,
6479
6480        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6481    ) {
6482        ___H::wait_for_driver(&mut self.0, responder).await
6483    }
6484
6485    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6486        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6487    }
6488}
6489
6490pub use fidl_next_common_fuchsia_driver_framework::*;