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    #[derive(Debug, PartialEq)]
1951    pub struct NodeManagerAddNodeRequest {
1952        pub node: crate::natural::Node2,
1953
1954        pub controller:
1955            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1956
1957        pub node_ref: ::core::option::Option<
1958            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1959        >,
1960    }
1961
1962    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>
1963        for NodeManagerAddNodeRequest
1964    where
1965        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1966        ___E: ::fidl_next::Encoder,
1967        ___E: ::fidl_next::fuchsia::HandleEncoder,
1968    {
1969        #[inline]
1970        fn encode(
1971            self,
1972            encoder_: &mut ___E,
1973            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeManagerAddNodeRequest<'static>>,
1974            _: (),
1975        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1976            ::fidl_next::munge! {
1977                let crate::wire::NodeManagerAddNodeRequest {
1978                    node,
1979                    controller,
1980                    node_ref,
1981
1982                } = out_;
1983            }
1984
1985            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1986
1987            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1988
1989            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1990
1991            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1992
1993            ::fidl_next::Encode::encode(self.node_ref, encoder_, node_ref, ())?;
1994
1995            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_ref.as_mut_ptr()) };
1996
1997            Ok(())
1998        }
1999    }
2000
2001    unsafe impl<___E>
2002        ::fidl_next::EncodeOption<
2003            ::fidl_next::wire::Box<'static, crate::wire::NodeManagerAddNodeRequest<'static>>,
2004            ___E,
2005        > for NodeManagerAddNodeRequest
2006    where
2007        ___E: ::fidl_next::Encoder + ?Sized,
2008        NodeManagerAddNodeRequest:
2009            ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>,
2010    {
2011        #[inline]
2012        fn encode_option(
2013            this: ::core::option::Option<Self>,
2014            encoder: &mut ___E,
2015            out: &mut ::core::mem::MaybeUninit<
2016                ::fidl_next::wire::Box<'static, crate::wire::NodeManagerAddNodeRequest<'static>>,
2017            >,
2018            _: (),
2019        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2020            if let Some(inner) = this {
2021                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2022                ::fidl_next::wire::Box::encode_present(out);
2023            } else {
2024                ::fidl_next::wire::Box::encode_absent(out);
2025            }
2026
2027            Ok(())
2028        }
2029    }
2030
2031    impl<'de> ::fidl_next::FromWire<crate::wire::NodeManagerAddNodeRequest<'de>>
2032        for NodeManagerAddNodeRequest
2033    {
2034        #[inline]
2035        fn from_wire(wire: crate::wire::NodeManagerAddNodeRequest<'de>) -> Self {
2036            Self {
2037                node: ::fidl_next::FromWire::from_wire(wire.node),
2038
2039                controller: ::fidl_next::FromWire::from_wire(wire.controller),
2040
2041                node_ref: ::fidl_next::FromWire::from_wire(wire.node_ref),
2042            }
2043        }
2044    }
2045}
2046
2047pub mod wire {
2048
2049    pub use fidl_next_common_fuchsia_driver_framework::wire::*;
2050
2051    /// The wire type corresponding to [`DevfsAddArgs`].
2052    #[repr(C)]
2053    pub struct DevfsAddArgs<'de> {
2054        pub(crate) table: ::fidl_next::wire::Table<'de>,
2055    }
2056
2057    impl<'de> Drop for DevfsAddArgs<'de> {
2058        fn drop(&mut self) {
2059            let _ = self.table.get(1).map(|envelope| unsafe {
2060                envelope.read_unchecked::<::fidl_next::ClientEnd<
2061                    ::fidl_next_fuchsia_device_fs::Connector,
2062                    ::fidl_next::wire::fuchsia::Channel,
2063                >>()
2064            });
2065
2066            let _ = self.table.get(2).map(|envelope| unsafe {
2067                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2068            });
2069
2070            let _ = self.table.get(3).map(|envelope| unsafe {
2071                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2072            });
2073
2074            let _ = self.table.get(4).map(|envelope| unsafe {
2075                envelope.read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
2076            });
2077
2078            let _ = self.table.get(5).map(|envelope| unsafe {
2079                envelope.read_unchecked::<::fidl_next::ClientEnd<
2080                    ::fidl_next_fuchsia_device_fs::Connector,
2081                    ::fidl_next::wire::fuchsia::Channel,
2082                >>()
2083            });
2084        }
2085    }
2086
2087    impl ::fidl_next::Constrained for DevfsAddArgs<'_> {
2088        type Constraint = ();
2089
2090        fn validate(
2091            _: ::fidl_next::Slot<'_, Self>,
2092            _: Self::Constraint,
2093        ) -> Result<(), ::fidl_next::ValidationError> {
2094            Ok(())
2095        }
2096    }
2097
2098    unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
2099        type Narrowed<'de> = DevfsAddArgs<'de>;
2100
2101        #[inline]
2102        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2103            ::fidl_next::munge!(let Self { table } = out);
2104            ::fidl_next::wire::Table::zero_padding(table);
2105        }
2106    }
2107
2108    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'de>
2109    where
2110        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2111        ___D: ::fidl_next::fuchsia::HandleDecoder,
2112    {
2113        fn decode(
2114            slot: ::fidl_next::Slot<'_, Self>,
2115            decoder: &mut ___D,
2116            _: (),
2117        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2118            ::fidl_next::munge!(let Self { table } = slot);
2119
2120            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2121                match ordinal {
2122                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2123
2124                    1 => {
2125                        ::fidl_next::wire::Envelope::decode_as::<
2126                            ___D,
2127                            ::fidl_next::ClientEnd<
2128                                ::fidl_next_fuchsia_device_fs::Connector,
2129                                ::fidl_next::wire::fuchsia::Channel,
2130                            >,
2131                        >(slot.as_mut(), decoder, ())?;
2132
2133                        Ok(())
2134                    }
2135
2136                    2 => {
2137                        ::fidl_next::wire::Envelope::decode_as::<
2138                            ___D,
2139                            ::fidl_next::wire::String<'de>,
2140                        >(slot.as_mut(), decoder, 255)?;
2141
2142                        let value = unsafe {
2143                            slot.deref_unchecked()
2144                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2145                        };
2146
2147                        if value.len() > 255 {
2148                            return Err(::fidl_next::DecodeError::VectorTooLong {
2149                                size: value.len() as u64,
2150                                limit: 255,
2151                            });
2152                        }
2153
2154                        Ok(())
2155                    }
2156
2157                    3 => {
2158                        ::fidl_next::wire::Envelope::decode_as::<
2159                            ___D,
2160                            ::fidl_next::wire::fuchsia::Vmo,
2161                        >(slot.as_mut(), decoder, ())?;
2162
2163                        Ok(())
2164                    }
2165
2166                    4 => {
2167                        ::fidl_next::wire::Envelope::decode_as::<
2168                            ___D,
2169                            ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
2170                        >(slot.as_mut(), decoder, ())?;
2171
2172                        Ok(())
2173                    }
2174
2175                    5 => {
2176                        ::fidl_next::wire::Envelope::decode_as::<
2177                            ___D,
2178                            ::fidl_next::ClientEnd<
2179                                ::fidl_next_fuchsia_device_fs::Connector,
2180                                ::fidl_next::wire::fuchsia::Channel,
2181                            >,
2182                        >(slot.as_mut(), decoder, ())?;
2183
2184                        Ok(())
2185                    }
2186
2187                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2188                }
2189            })
2190        }
2191    }
2192
2193    impl<'de> DevfsAddArgs<'de> {
2194        pub fn connector(
2195            &self,
2196        ) -> ::core::option::Option<
2197            &::fidl_next::ClientEnd<
2198                ::fidl_next_fuchsia_device_fs::Connector,
2199                ::fidl_next::wire::fuchsia::Channel,
2200            >,
2201        > {
2202            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2203        }
2204
2205        pub fn take_connector(
2206            &mut self,
2207        ) -> ::core::option::Option<
2208            ::fidl_next::ClientEnd<
2209                ::fidl_next_fuchsia_device_fs::Connector,
2210                ::fidl_next::wire::fuchsia::Channel,
2211            >,
2212        > {
2213            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2214        }
2215
2216        pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2217            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2218        }
2219
2220        pub fn take_class_name(
2221            &mut self,
2222        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2223            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2224        }
2225
2226        pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2227            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2228        }
2229
2230        pub fn take_inspect(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2231            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2232        }
2233
2234        pub fn connector_supports(
2235            &self,
2236        ) -> ::core::option::Option<&::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2237            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2238        }
2239
2240        pub fn take_connector_supports(
2241            &mut self,
2242        ) -> ::core::option::Option<::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2243            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2244        }
2245
2246        pub fn controller_connector(
2247            &self,
2248        ) -> ::core::option::Option<
2249            &::fidl_next::ClientEnd<
2250                ::fidl_next_fuchsia_device_fs::Connector,
2251                ::fidl_next::wire::fuchsia::Channel,
2252            >,
2253        > {
2254            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2255        }
2256
2257        pub fn take_controller_connector(
2258            &mut self,
2259        ) -> ::core::option::Option<
2260            ::fidl_next::ClientEnd<
2261                ::fidl_next_fuchsia_device_fs::Connector,
2262                ::fidl_next::wire::fuchsia::Channel,
2263            >,
2264        > {
2265            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2266        }
2267    }
2268
2269    impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
2270        fn fmt(
2271            &self,
2272            f: &mut ::core::fmt::Formatter<'_>,
2273        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2274            f.debug_struct("DevfsAddArgs")
2275                .field("connector", &self.connector())
2276                .field("class_name", &self.class_name())
2277                .field("inspect", &self.inspect())
2278                .field("connector_supports", &self.connector_supports())
2279                .field("controller_connector", &self.controller_connector())
2280                .finish()
2281        }
2282    }
2283
2284    impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
2285        type Natural = crate::natural::DevfsAddArgs;
2286    }
2287
2288    /// The wire type corresponding to [`PowerElementArgs`].
2289    #[repr(C)]
2290    pub struct PowerElementArgs<'de> {
2291        pub(crate) table: ::fidl_next::wire::Table<'de>,
2292    }
2293
2294    impl<'de> Drop for PowerElementArgs<'de> {
2295        fn drop(&mut self) {
2296            let _ = self.table.get(1).map(|envelope| unsafe {
2297                envelope.read_unchecked::<::fidl_next::ClientEnd<
2298                    ::fidl_next_fuchsia_power_broker::ElementControl,
2299                    ::fidl_next::wire::fuchsia::Channel,
2300                >>()
2301            });
2302
2303            let _ = self.table.get(2).map(|envelope| unsafe {
2304                envelope.read_unchecked::<::fidl_next::ServerEnd<
2305                    ::fidl_next_fuchsia_power_broker::ElementRunner,
2306                    ::fidl_next::wire::fuchsia::Channel,
2307                >>()
2308            });
2309
2310            let _ = self.table.get(3).map(|envelope| unsafe {
2311                envelope.read_unchecked::<::fidl_next::ClientEnd<
2312                    ::fidl_next_fuchsia_power_broker::Lessor,
2313                    ::fidl_next::wire::fuchsia::Channel,
2314                >>()
2315            });
2316
2317            let _ = self.table.get(4).map(|envelope| unsafe {
2318                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2319            });
2320        }
2321    }
2322
2323    impl ::fidl_next::Constrained for PowerElementArgs<'_> {
2324        type Constraint = ();
2325
2326        fn validate(
2327            _: ::fidl_next::Slot<'_, Self>,
2328            _: Self::Constraint,
2329        ) -> Result<(), ::fidl_next::ValidationError> {
2330            Ok(())
2331        }
2332    }
2333
2334    unsafe impl ::fidl_next::Wire for PowerElementArgs<'static> {
2335        type Narrowed<'de> = PowerElementArgs<'de>;
2336
2337        #[inline]
2338        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2339            ::fidl_next::munge!(let Self { table } = out);
2340            ::fidl_next::wire::Table::zero_padding(table);
2341        }
2342    }
2343
2344    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PowerElementArgs<'de>
2345    where
2346        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2347        ___D: ::fidl_next::fuchsia::HandleDecoder,
2348    {
2349        fn decode(
2350            slot: ::fidl_next::Slot<'_, Self>,
2351            decoder: &mut ___D,
2352            _: (),
2353        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2354            ::fidl_next::munge!(let Self { table } = slot);
2355
2356            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2357                match ordinal {
2358                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2359
2360                    1 => {
2361                        ::fidl_next::wire::Envelope::decode_as::<
2362                            ___D,
2363                            ::fidl_next::ClientEnd<
2364                                ::fidl_next_fuchsia_power_broker::ElementControl,
2365                                ::fidl_next::wire::fuchsia::Channel,
2366                            >,
2367                        >(slot.as_mut(), decoder, ())?;
2368
2369                        Ok(())
2370                    }
2371
2372                    2 => {
2373                        ::fidl_next::wire::Envelope::decode_as::<
2374                            ___D,
2375                            ::fidl_next::ServerEnd<
2376                                ::fidl_next_fuchsia_power_broker::ElementRunner,
2377                                ::fidl_next::wire::fuchsia::Channel,
2378                            >,
2379                        >(slot.as_mut(), decoder, ())?;
2380
2381                        Ok(())
2382                    }
2383
2384                    3 => {
2385                        ::fidl_next::wire::Envelope::decode_as::<
2386                            ___D,
2387                            ::fidl_next::ClientEnd<
2388                                ::fidl_next_fuchsia_power_broker::Lessor,
2389                                ::fidl_next::wire::fuchsia::Channel,
2390                            >,
2391                        >(slot.as_mut(), decoder, ())?;
2392
2393                        Ok(())
2394                    }
2395
2396                    4 => {
2397                        ::fidl_next::wire::Envelope::decode_as::<
2398                            ___D,
2399                            ::fidl_next::wire::fuchsia::Event,
2400                        >(slot.as_mut(), decoder, ())?;
2401
2402                        Ok(())
2403                    }
2404
2405                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2406                }
2407            })
2408        }
2409    }
2410
2411    impl<'de> PowerElementArgs<'de> {
2412        pub fn control_client(
2413            &self,
2414        ) -> ::core::option::Option<
2415            &::fidl_next::ClientEnd<
2416                ::fidl_next_fuchsia_power_broker::ElementControl,
2417                ::fidl_next::wire::fuchsia::Channel,
2418            >,
2419        > {
2420            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2421        }
2422
2423        pub fn take_control_client(
2424            &mut self,
2425        ) -> ::core::option::Option<
2426            ::fidl_next::ClientEnd<
2427                ::fidl_next_fuchsia_power_broker::ElementControl,
2428                ::fidl_next::wire::fuchsia::Channel,
2429            >,
2430        > {
2431            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2432        }
2433
2434        pub fn runner_server(
2435            &self,
2436        ) -> ::core::option::Option<
2437            &::fidl_next::ServerEnd<
2438                ::fidl_next_fuchsia_power_broker::ElementRunner,
2439                ::fidl_next::wire::fuchsia::Channel,
2440            >,
2441        > {
2442            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2443        }
2444
2445        pub fn take_runner_server(
2446            &mut self,
2447        ) -> ::core::option::Option<
2448            ::fidl_next::ServerEnd<
2449                ::fidl_next_fuchsia_power_broker::ElementRunner,
2450                ::fidl_next::wire::fuchsia::Channel,
2451            >,
2452        > {
2453            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2454        }
2455
2456        pub fn lessor_client(
2457            &self,
2458        ) -> ::core::option::Option<
2459            &::fidl_next::ClientEnd<
2460                ::fidl_next_fuchsia_power_broker::Lessor,
2461                ::fidl_next::wire::fuchsia::Channel,
2462            >,
2463        > {
2464            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2465        }
2466
2467        pub fn take_lessor_client(
2468            &mut self,
2469        ) -> ::core::option::Option<
2470            ::fidl_next::ClientEnd<
2471                ::fidl_next_fuchsia_power_broker::Lessor,
2472                ::fidl_next::wire::fuchsia::Channel,
2473            >,
2474        > {
2475            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2476        }
2477
2478        pub fn token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2479            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2480        }
2481
2482        pub fn take_token(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2483            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2484        }
2485    }
2486
2487    impl<'de> ::core::fmt::Debug for PowerElementArgs<'de> {
2488        fn fmt(
2489            &self,
2490            f: &mut ::core::fmt::Formatter<'_>,
2491        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2492            f.debug_struct("PowerElementArgs")
2493                .field("control_client", &self.control_client())
2494                .field("runner_server", &self.runner_server())
2495                .field("lessor_client", &self.lessor_client())
2496                .field("token", &self.token())
2497                .finish()
2498        }
2499    }
2500
2501    impl<'de> ::fidl_next::IntoNatural for PowerElementArgs<'de> {
2502        type Natural = crate::natural::PowerElementArgs;
2503    }
2504
2505    /// The wire type corresponding to [`DriverResumeRequest`].
2506    #[derive(Debug)]
2507    #[repr(C)]
2508    pub struct DriverResumeRequest {
2509        pub power_element_lease: ::fidl_next::wire::fuchsia::OptionalEventPair,
2510    }
2511
2512    static_assertions::const_assert_eq!(std::mem::size_of::<DriverResumeRequest>(), 4);
2513    static_assertions::const_assert_eq!(std::mem::align_of::<DriverResumeRequest>(), 4);
2514
2515    static_assertions::const_assert_eq!(
2516        std::mem::offset_of!(DriverResumeRequest, power_element_lease),
2517        0
2518    );
2519
2520    impl ::fidl_next::Constrained for DriverResumeRequest {
2521        type Constraint = ();
2522
2523        fn validate(
2524            _: ::fidl_next::Slot<'_, Self>,
2525            _: Self::Constraint,
2526        ) -> Result<(), ::fidl_next::ValidationError> {
2527            Ok(())
2528        }
2529    }
2530
2531    unsafe impl ::fidl_next::Wire for DriverResumeRequest {
2532        type Narrowed<'de> = DriverResumeRequest;
2533
2534        #[inline]
2535        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2536            ::fidl_next::munge! {
2537                let Self {
2538                    power_element_lease,
2539
2540                } = &mut *out_;
2541            }
2542
2543            ::fidl_next::Wire::zero_padding(power_element_lease);
2544        }
2545    }
2546
2547    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResumeRequest
2548    where
2549        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2550        ___D: ::fidl_next::fuchsia::HandleDecoder,
2551    {
2552        fn decode(
2553            slot_: ::fidl_next::Slot<'_, Self>,
2554            decoder_: &mut ___D,
2555            _: (),
2556        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2557            ::fidl_next::munge! {
2558                let Self {
2559                    mut power_element_lease,
2560
2561                } = slot_;
2562            }
2563
2564            let _field = power_element_lease.as_mut();
2565
2566            ::fidl_next::Decode::decode(power_element_lease.as_mut(), decoder_, ())?;
2567
2568            Ok(())
2569        }
2570    }
2571
2572    impl ::fidl_next::IntoNatural for DriverResumeRequest {
2573        type Natural = crate::natural::DriverResumeRequest;
2574    }
2575
2576    /// The wire type corresponding to [`DriverStartArgs`].
2577    #[repr(C)]
2578    pub struct DriverStartArgs<'de> {
2579        pub(crate) table: ::fidl_next::wire::Table<'de>,
2580    }
2581
2582    impl<'de> Drop for DriverStartArgs<'de> {
2583        fn drop(&mut self) {
2584            let _ = self.table.get(1)
2585                .map(|envelope| unsafe {
2586                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>()
2587                });
2588
2589            let _ = self.table.get(2).map(|envelope| unsafe {
2590                envelope
2591                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
2592                    )
2593            });
2594
2595            let _ = self.table.get(3).map(|envelope| unsafe {
2596                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2597            });
2598
2599            let _ = self.table.get(4).map(|envelope| unsafe {
2600                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2601            });
2602
2603            let _ = self.table.get(5).map(|envelope| unsafe {
2604                envelope.read_unchecked::<::fidl_next::wire::Vector<
2605                    'de,
2606                    ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2607                >>()
2608            });
2609
2610            let _ = self.table.get(6).map(|envelope| unsafe {
2611                envelope.read_unchecked::<::fidl_next::ServerEnd<
2612                    ::fidl_next_fuchsia_io::Directory,
2613                    ::fidl_next::wire::fuchsia::Channel,
2614                >>()
2615            });
2616
2617            let _ = self.table.get(7).map(|envelope| unsafe {
2618                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2619            });
2620
2621            let _ = self.table.get(8).map(|envelope| unsafe {
2622                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2623            });
2624
2625            let _ = self.table.get(9)
2626                .map(|envelope| unsafe {
2627                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>>()
2628                });
2629
2630            let _ = self.table.get(10).map(|envelope| unsafe {
2631                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
2632            });
2633
2634            let _ = self.table.get(11).map(|envelope| unsafe {
2635                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2636            });
2637
2638            let _ = self.table.get(12)
2639                .map(|envelope| unsafe {
2640                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>>()
2641                });
2642
2643            let _ = self.table.get(13).map(|envelope| unsafe {
2644                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmar>()
2645            });
2646
2647            let _ = self.table.get(14).map(|envelope| unsafe {
2648                envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>()
2649            });
2650
2651            let _ = self.table.get(15).map(|envelope| unsafe {
2652                envelope.read_unchecked::<::fidl_next::ClientEnd<
2653                    ::fidl_next_fuchsia_logger::LogSink,
2654                    ::fidl_next::wire::fuchsia::Channel,
2655                >>()
2656            });
2657        }
2658    }
2659
2660    impl ::fidl_next::Constrained for DriverStartArgs<'_> {
2661        type Constraint = ();
2662
2663        fn validate(
2664            _: ::fidl_next::Slot<'_, Self>,
2665            _: Self::Constraint,
2666        ) -> Result<(), ::fidl_next::ValidationError> {
2667            Ok(())
2668        }
2669    }
2670
2671    unsafe impl ::fidl_next::Wire for DriverStartArgs<'static> {
2672        type Narrowed<'de> = DriverStartArgs<'de>;
2673
2674        #[inline]
2675        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2676            ::fidl_next::munge!(let Self { table } = out);
2677            ::fidl_next::wire::Table::zero_padding(table);
2678        }
2679    }
2680
2681    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartArgs<'de>
2682    where
2683        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2684        ___D: ::fidl_next::fuchsia::HandleDecoder,
2685    {
2686        fn decode(
2687            slot: ::fidl_next::Slot<'_, Self>,
2688            decoder: &mut ___D,
2689            _: (),
2690        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2691            ::fidl_next::munge!(let Self { table } = slot);
2692
2693            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2694                match ordinal {
2695                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2696
2697                    1 => {
2698                        ::fidl_next::wire::Envelope::decode_as::<
2699                            ___D,
2700                            ::fidl_next::ClientEnd<
2701                                crate::Node,
2702                                ::fidl_next::wire::fuchsia::Channel,
2703                            >,
2704                        >(slot.as_mut(), decoder, ())?;
2705
2706                        Ok(())
2707                    }
2708
2709                    2 => {
2710                        ::fidl_next::wire::Envelope::decode_as::<
2711                            ___D,
2712                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
2713                        >(slot.as_mut(), decoder, (64, ()))?;
2714
2715                        let value = unsafe {
2716                            slot
2717                                            .deref_unchecked()
2718                                            .deref_unchecked::<
2719                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
2720                                            >()
2721                        };
2722
2723                        if value.len() > 64 {
2724                            return Err(::fidl_next::DecodeError::VectorTooLong {
2725                                size: value.len() as u64,
2726                                limit: 64,
2727                            });
2728                        }
2729
2730                        Ok(())
2731                    }
2732
2733                    3 => {
2734                        ::fidl_next::wire::Envelope::decode_as::<
2735                            ___D,
2736                            ::fidl_next::wire::String<'de>,
2737                        >(slot.as_mut(), decoder, 4096)?;
2738
2739                        let value = unsafe {
2740                            slot.deref_unchecked()
2741                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2742                        };
2743
2744                        if value.len() > 4096 {
2745                            return Err(::fidl_next::DecodeError::VectorTooLong {
2746                                size: value.len() as u64,
2747                                limit: 4096,
2748                            });
2749                        }
2750
2751                        Ok(())
2752                    }
2753
2754                    4 => {
2755                        ::fidl_next::wire::Envelope::decode_as::<
2756                            ___D,
2757                            ::fidl_next_fuchsia_data::wire::Dictionary<'de>,
2758                        >(slot.as_mut(), decoder, ())?;
2759
2760                        Ok(())
2761                    }
2762
2763                    5 => {
2764                        ::fidl_next::wire::Envelope::decode_as::<
2765                            ___D,
2766                            ::fidl_next::wire::Vector<
2767                                'de,
2768                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2769                                    'de,
2770                                >,
2771                            >,
2772                        >(slot.as_mut(), decoder, (32, ()))?;
2773
2774                        let value = unsafe {
2775                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
2776                                '_,
2777                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2778                                    '_,
2779                                >,
2780                            >>()
2781                        };
2782
2783                        if value.len() > 32 {
2784                            return Err(::fidl_next::DecodeError::VectorTooLong {
2785                                size: value.len() as u64,
2786                                limit: 32,
2787                            });
2788                        }
2789
2790                        Ok(())
2791                    }
2792
2793                    6 => {
2794                        ::fidl_next::wire::Envelope::decode_as::<
2795                            ___D,
2796                            ::fidl_next::ServerEnd<
2797                                ::fidl_next_fuchsia_io::Directory,
2798                                ::fidl_next::wire::fuchsia::Channel,
2799                            >,
2800                        >(slot.as_mut(), decoder, ())?;
2801
2802                        Ok(())
2803                    }
2804
2805                    7 => {
2806                        ::fidl_next::wire::Envelope::decode_as::<
2807                            ___D,
2808                            ::fidl_next::wire::fuchsia::Vmo,
2809                        >(slot.as_mut(), decoder, ())?;
2810
2811                        Ok(())
2812                    }
2813
2814                    8 => {
2815                        ::fidl_next::wire::Envelope::decode_as::<
2816                            ___D,
2817                            ::fidl_next::wire::String<'de>,
2818                        >(slot.as_mut(), decoder, 4294967295)?;
2819
2820                        Ok(())
2821                    }
2822
2823                    9 => {
2824                        ::fidl_next::wire::Envelope::decode_as::<
2825                            ___D,
2826                            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
2827                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2828
2829                        Ok(())
2830                    }
2831
2832                    10 => {
2833                        ::fidl_next::wire::Envelope::decode_as::<
2834                            ___D,
2835                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
2836                        >(slot.as_mut(), decoder, (128, ()))?;
2837
2838                        let value = unsafe {
2839                            slot
2840                                            .deref_unchecked()
2841                                            .deref_unchecked::<
2842                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
2843                                            >()
2844                        };
2845
2846                        if value.len() > 128 {
2847                            return Err(::fidl_next::DecodeError::VectorTooLong {
2848                                size: value.len() as u64,
2849                                limit: 128,
2850                            });
2851                        }
2852
2853                        Ok(())
2854                    }
2855
2856                    11 => {
2857                        ::fidl_next::wire::Envelope::decode_as::<
2858                            ___D,
2859                            ::fidl_next::wire::fuchsia::Event,
2860                        >(slot.as_mut(), decoder, ())?;
2861
2862                        Ok(())
2863                    }
2864
2865                    12 => {
2866                        ::fidl_next::wire::Envelope::decode_as::<
2867                            ___D,
2868                            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2869                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2870
2871                        Ok(())
2872                    }
2873
2874                    13 => {
2875                        ::fidl_next::wire::Envelope::decode_as::<
2876                            ___D,
2877                            ::fidl_next::wire::fuchsia::Vmar,
2878                        >(slot.as_mut(), decoder, ())?;
2879
2880                        Ok(())
2881                    }
2882
2883                    14 => {
2884                        ::fidl_next::wire::Envelope::decode_as::<
2885                            ___D,
2886                            crate::wire::PowerElementArgs<'de>,
2887                        >(slot.as_mut(), decoder, ())?;
2888
2889                        Ok(())
2890                    }
2891
2892                    15 => {
2893                        ::fidl_next::wire::Envelope::decode_as::<
2894                            ___D,
2895                            ::fidl_next::ClientEnd<
2896                                ::fidl_next_fuchsia_logger::LogSink,
2897                                ::fidl_next::wire::fuchsia::Channel,
2898                            >,
2899                        >(slot.as_mut(), decoder, ())?;
2900
2901                        Ok(())
2902                    }
2903
2904                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2905                }
2906            })
2907        }
2908    }
2909
2910    impl<'de> DriverStartArgs<'de> {
2911        pub fn node(
2912            &self,
2913        ) -> ::core::option::Option<
2914            &::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2915        > {
2916            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2917        }
2918
2919        pub fn take_node(
2920            &mut self,
2921        ) -> ::core::option::Option<
2922            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2923        > {
2924            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2925        }
2926
2927        pub fn symbols(
2928            &self,
2929        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2930        {
2931            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2932        }
2933
2934        pub fn take_symbols(
2935            &mut self,
2936        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2937        {
2938            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2939        }
2940
2941        pub fn url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2942            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2943        }
2944
2945        pub fn take_url(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2946            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2947        }
2948
2949        pub fn program(
2950            &self,
2951        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2952            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2953        }
2954
2955        pub fn take_program(
2956            &mut self,
2957        ) -> ::core::option::Option<::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2958            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2959        }
2960
2961        pub fn incoming(
2962            &self,
2963        ) -> ::core::option::Option<
2964            &::fidl_next::wire::Vector<
2965                'de,
2966                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2967            >,
2968        > {
2969            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2970        }
2971
2972        pub fn take_incoming(
2973            &mut self,
2974        ) -> ::core::option::Option<
2975            ::fidl_next::wire::Vector<
2976                'de,
2977                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2978            >,
2979        > {
2980            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2981        }
2982
2983        pub fn outgoing_dir(
2984            &self,
2985        ) -> ::core::option::Option<
2986            &::fidl_next::ServerEnd<
2987                ::fidl_next_fuchsia_io::Directory,
2988                ::fidl_next::wire::fuchsia::Channel,
2989            >,
2990        > {
2991            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2992        }
2993
2994        pub fn take_outgoing_dir(
2995            &mut self,
2996        ) -> ::core::option::Option<
2997            ::fidl_next::ServerEnd<
2998                ::fidl_next_fuchsia_io::Directory,
2999                ::fidl_next::wire::fuchsia::Channel,
3000            >,
3001        > {
3002            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
3003        }
3004
3005        pub fn config(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
3006            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
3007        }
3008
3009        pub fn take_config(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
3010            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
3011        }
3012
3013        pub fn node_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3014            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
3015        }
3016
3017        pub fn take_node_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3018            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
3019        }
3020
3021        pub fn node_properties(
3022            &self,
3023        ) -> ::core::option::Option<
3024            &::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
3025        > {
3026            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
3027        }
3028
3029        pub fn take_node_properties(
3030            &mut self,
3031        ) -> ::core::option::Option<
3032            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry<'de>>,
3033        > {
3034            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
3035        }
3036
3037        pub fn node_offers(
3038            &self,
3039        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3040        {
3041            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
3042        }
3043
3044        pub fn take_node_offers(
3045            &mut self,
3046        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3047        {
3048            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
3049        }
3050
3051        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
3052            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
3053        }
3054
3055        pub fn take_node_token(
3056            &mut self,
3057        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
3058            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
3059        }
3060
3061        pub fn node_properties_2(
3062            &self,
3063        ) -> ::core::option::Option<
3064            &::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
3065        > {
3066            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
3067        }
3068
3069        pub fn take_node_properties_2(
3070            &mut self,
3071        ) -> ::core::option::Option<
3072            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
3073        > {
3074            unsafe { Some(self.table.get_mut(12)?.take_unchecked()) }
3075        }
3076
3077        pub fn vmar(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmar> {
3078            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
3079        }
3080
3081        pub fn take_vmar(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmar> {
3082            unsafe { Some(self.table.get_mut(13)?.take_unchecked()) }
3083        }
3084
3085        pub fn power_element_args(
3086            &self,
3087        ) -> ::core::option::Option<&crate::wire::PowerElementArgs<'de>> {
3088            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
3089        }
3090
3091        pub fn take_power_element_args(
3092            &mut self,
3093        ) -> ::core::option::Option<crate::wire::PowerElementArgs<'de>> {
3094            unsafe { Some(self.table.get_mut(14)?.take_unchecked()) }
3095        }
3096
3097        pub fn log_sink(
3098            &self,
3099        ) -> ::core::option::Option<
3100            &::fidl_next::ClientEnd<
3101                ::fidl_next_fuchsia_logger::LogSink,
3102                ::fidl_next::wire::fuchsia::Channel,
3103            >,
3104        > {
3105            unsafe { Some(self.table.get(15)?.deref_unchecked()) }
3106        }
3107
3108        pub fn take_log_sink(
3109            &mut self,
3110        ) -> ::core::option::Option<
3111            ::fidl_next::ClientEnd<
3112                ::fidl_next_fuchsia_logger::LogSink,
3113                ::fidl_next::wire::fuchsia::Channel,
3114            >,
3115        > {
3116            unsafe { Some(self.table.get_mut(15)?.take_unchecked()) }
3117        }
3118    }
3119
3120    impl<'de> ::core::fmt::Debug for DriverStartArgs<'de> {
3121        fn fmt(
3122            &self,
3123            f: &mut ::core::fmt::Formatter<'_>,
3124        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3125            f.debug_struct("DriverStartArgs")
3126                .field("node", &self.node())
3127                .field("symbols", &self.symbols())
3128                .field("url", &self.url())
3129                .field("program", &self.program())
3130                .field("incoming", &self.incoming())
3131                .field("outgoing_dir", &self.outgoing_dir())
3132                .field("config", &self.config())
3133                .field("node_name", &self.node_name())
3134                .field("node_properties", &self.node_properties())
3135                .field("node_offers", &self.node_offers())
3136                .field("node_token", &self.node_token())
3137                .field("node_properties_2", &self.node_properties_2())
3138                .field("vmar", &self.vmar())
3139                .field("power_element_args", &self.power_element_args())
3140                .field("log_sink", &self.log_sink())
3141                .finish()
3142        }
3143    }
3144
3145    impl<'de> ::fidl_next::IntoNatural for DriverStartArgs<'de> {
3146        type Natural = crate::natural::DriverStartArgs;
3147    }
3148
3149    /// The wire type corresponding to [`DriverStartRequest`].
3150    #[derive(Debug)]
3151    #[repr(C)]
3152    pub struct DriverStartRequest<'de> {
3153        pub start_args: crate::wire::DriverStartArgs<'de>,
3154    }
3155
3156    static_assertions::const_assert_eq!(std::mem::size_of::<DriverStartRequest<'_>>(), 16);
3157    static_assertions::const_assert_eq!(std::mem::align_of::<DriverStartRequest<'_>>(), 8);
3158
3159    static_assertions::const_assert_eq!(
3160        std::mem::offset_of!(DriverStartRequest<'_>, start_args),
3161        0
3162    );
3163
3164    impl ::fidl_next::Constrained for DriverStartRequest<'_> {
3165        type Constraint = ();
3166
3167        fn validate(
3168            _: ::fidl_next::Slot<'_, Self>,
3169            _: Self::Constraint,
3170        ) -> Result<(), ::fidl_next::ValidationError> {
3171            Ok(())
3172        }
3173    }
3174
3175    unsafe impl ::fidl_next::Wire for DriverStartRequest<'static> {
3176        type Narrowed<'de> = DriverStartRequest<'de>;
3177
3178        #[inline]
3179        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3180            ::fidl_next::munge! {
3181                let Self {
3182                    start_args,
3183
3184                } = &mut *out_;
3185            }
3186
3187            ::fidl_next::Wire::zero_padding(start_args);
3188        }
3189    }
3190
3191    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartRequest<'de>
3192    where
3193        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3194        ___D: ::fidl_next::Decoder<'de>,
3195        ___D: ::fidl_next::fuchsia::HandleDecoder,
3196    {
3197        fn decode(
3198            slot_: ::fidl_next::Slot<'_, Self>,
3199            decoder_: &mut ___D,
3200            _: (),
3201        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3202            ::fidl_next::munge! {
3203                let Self {
3204                    mut start_args,
3205
3206                } = slot_;
3207            }
3208
3209            let _field = start_args.as_mut();
3210
3211            ::fidl_next::Decode::decode(start_args.as_mut(), decoder_, ())?;
3212
3213            Ok(())
3214        }
3215    }
3216
3217    impl<'de> ::fidl_next::IntoNatural for DriverStartRequest<'de> {
3218        type Natural = crate::natural::DriverStartRequest;
3219    }
3220
3221    /// The wire type corresponding to [`DriverResult`].
3222    #[repr(transparent)]
3223    pub struct DriverResult<'de> {
3224        pub(crate) raw: ::fidl_next::wire::Union,
3225        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3226    }
3227
3228    impl<'de> Drop for DriverResult<'de> {
3229        fn drop(&mut self) {
3230            match self.raw.ordinal() {
3231                1 => {
3232                    let _ = unsafe {
3233                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3234                    };
3235                }
3236
3237                2 => {
3238                    let _ = unsafe {
3239                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3240                    };
3241                }
3242
3243                3 => {
3244                    let _ = unsafe {
3245                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3246                    };
3247                }
3248
3249                _ => (),
3250            }
3251        }
3252    }
3253
3254    impl ::fidl_next::Constrained for DriverResult<'_> {
3255        type Constraint = ();
3256
3257        fn validate(
3258            _: ::fidl_next::Slot<'_, Self>,
3259            _: Self::Constraint,
3260        ) -> Result<(), ::fidl_next::ValidationError> {
3261            Ok(())
3262        }
3263    }
3264
3265    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
3266        type Narrowed<'de> = DriverResult<'de>;
3267
3268        #[inline]
3269        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3270            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3271            ::fidl_next::wire::Union::zero_padding(raw);
3272        }
3273    }
3274
3275    pub mod driver_result {
3276        pub enum Ref<'de> {
3277            DriverStartedNodeToken(&'de ::fidl_next::wire::fuchsia::Event),
3278
3279            MatchError(&'de ::fidl_next::wire::fuchsia::Status),
3280
3281            StartError(&'de ::fidl_next::wire::fuchsia::Status),
3282
3283            UnknownOrdinal_(u64),
3284        }
3285
3286        pub enum Value {
3287            DriverStartedNodeToken(::fidl_next::wire::fuchsia::Event),
3288
3289            MatchError(::fidl_next::wire::fuchsia::Status),
3290
3291            StartError(::fidl_next::wire::fuchsia::Status),
3292
3293            UnknownOrdinal_(u64),
3294        }
3295    }
3296
3297    impl<'de> DriverResult<'de> {
3298        pub fn as_ref(&self) -> crate::wire::driver_result::Ref<'_> {
3299            match self.raw.ordinal() {
3300                1 => crate::wire::driver_result::Ref::DriverStartedNodeToken(unsafe {
3301                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>()
3302                }),
3303
3304                2 => crate::wire::driver_result::Ref::MatchError(unsafe {
3305                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>()
3306                }),
3307
3308                3 => crate::wire::driver_result::Ref::StartError(unsafe {
3309                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>()
3310                }),
3311
3312                unknown => crate::wire::driver_result::Ref::UnknownOrdinal_(unknown),
3313            }
3314        }
3315
3316        pub fn into_inner(self) -> crate::wire::driver_result::Value {
3317            let this = ::core::mem::ManuallyDrop::new(self);
3318
3319            match this.raw.ordinal() {
3320                1 => crate::wire::driver_result::Value::DriverStartedNodeToken(unsafe {
3321                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3322                }),
3323
3324                2 => crate::wire::driver_result::Value::MatchError(unsafe {
3325                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3326                }),
3327
3328                3 => crate::wire::driver_result::Value::StartError(unsafe {
3329                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Status>()
3330                }),
3331
3332                unknown => crate::wire::driver_result::Value::UnknownOrdinal_(unknown),
3333            }
3334        }
3335    }
3336
3337    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
3338    where
3339        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3340        ___D: ::fidl_next::Decoder<'de>,
3341        ___D: ::fidl_next::fuchsia::HandleDecoder,
3342    {
3343        fn decode(
3344            mut slot: ::fidl_next::Slot<'_, Self>,
3345            decoder: &mut ___D,
3346            _: (),
3347        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3348            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3349            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3350                1 => {
3351                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
3352                        raw,
3353                        decoder,
3354                        (),
3355                    )?
3356                }
3357
3358                2 => {
3359                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
3360                        raw,
3361                        decoder,
3362                        (),
3363                    )?
3364                }
3365
3366                3 => {
3367                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
3368                        raw,
3369                        decoder,
3370                        (),
3371                    )?
3372                }
3373
3374                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3375            }
3376
3377            Ok(())
3378        }
3379    }
3380
3381    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
3382        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3383            match self.raw.ordinal() {
3384                1 => unsafe {
3385                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>().fmt(f)
3386                },
3387                2 => unsafe {
3388                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>().fmt(f)
3389                },
3390                3 => unsafe {
3391                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Status>().fmt(f)
3392                },
3393                _ => unsafe { ::core::hint::unreachable_unchecked() },
3394            }
3395        }
3396    }
3397
3398    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
3399        type Natural = crate::natural::DriverResult;
3400    }
3401
3402    /// The wire type corresponding to [`NodeAddArgs`].
3403    #[repr(C)]
3404    pub struct NodeAddArgs<'de> {
3405        pub(crate) table: ::fidl_next::wire::Table<'de>,
3406    }
3407
3408    impl<'de> Drop for NodeAddArgs<'de> {
3409        fn drop(&mut self) {
3410            let _ = self.table.get(1).map(|envelope| unsafe {
3411                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3412            });
3413
3414            let _ = self.table.get(3).map(|envelope| unsafe {
3415                envelope
3416                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
3417                    )
3418            });
3419
3420            let _ = self.table.get(4)
3421                .map(|envelope| unsafe {
3422                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>()
3423                });
3424
3425            let _ = self.table.get(5).map(|envelope| unsafe {
3426                envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>()
3427            });
3428
3429            let _ = self.table.get(6).map(|envelope| unsafe {
3430                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3431            });
3432
3433            let _ = self
3434                .table
3435                .get(7)
3436                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3437
3438            let _ = self.table.get(8)
3439                .map(|envelope| unsafe {
3440                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3441                });
3442
3443            let _ = self.table.get(9)
3444                .map(|envelope| unsafe {
3445                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3446                });
3447
3448            let _ = self.table.get(10).map(|envelope| unsafe {
3449                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3450            });
3451        }
3452    }
3453
3454    impl ::fidl_next::Constrained for NodeAddArgs<'_> {
3455        type Constraint = ();
3456
3457        fn validate(
3458            _: ::fidl_next::Slot<'_, Self>,
3459            _: Self::Constraint,
3460        ) -> Result<(), ::fidl_next::ValidationError> {
3461            Ok(())
3462        }
3463    }
3464
3465    unsafe impl ::fidl_next::Wire for NodeAddArgs<'static> {
3466        type Narrowed<'de> = NodeAddArgs<'de>;
3467
3468        #[inline]
3469        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3470            ::fidl_next::munge!(let Self { table } = out);
3471            ::fidl_next::wire::Table::zero_padding(table);
3472        }
3473    }
3474
3475    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddArgs<'de>
3476    where
3477        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3478        ___D: ::fidl_next::fuchsia::HandleDecoder,
3479    {
3480        fn decode(
3481            slot: ::fidl_next::Slot<'_, Self>,
3482            decoder: &mut ___D,
3483            _: (),
3484        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3485            ::fidl_next::munge!(let Self { table } = slot);
3486
3487            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3488                match ordinal {
3489                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3490
3491                    1 => {
3492                        ::fidl_next::wire::Envelope::decode_as::<
3493                            ___D,
3494                            ::fidl_next::wire::String<'de>,
3495                        >(slot.as_mut(), decoder, 128)?;
3496
3497                        let value = unsafe {
3498                            slot.deref_unchecked()
3499                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3500                        };
3501
3502                        if value.len() > 128 {
3503                            return Err(::fidl_next::DecodeError::VectorTooLong {
3504                                size: value.len() as u64,
3505                                limit: 128,
3506                            });
3507                        }
3508
3509                        Ok(())
3510                    }
3511
3512                    3 => {
3513                        ::fidl_next::wire::Envelope::decode_as::<
3514                            ___D,
3515                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
3516                        >(slot.as_mut(), decoder, (64, ()))?;
3517
3518                        let value = unsafe {
3519                            slot
3520                                            .deref_unchecked()
3521                                            .deref_unchecked::<
3522                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
3523                                            >()
3524                        };
3525
3526                        if value.len() > 64 {
3527                            return Err(::fidl_next::DecodeError::VectorTooLong {
3528                                size: value.len() as u64,
3529                                limit: 64,
3530                            });
3531                        }
3532
3533                        Ok(())
3534                    }
3535
3536                    4 => {
3537                        ::fidl_next::wire::Envelope::decode_as::<
3538                            ___D,
3539                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>,
3540                        >(slot.as_mut(), decoder, (64, ()))?;
3541
3542                        let value = unsafe {
3543                            slot
3544                                            .deref_unchecked()
3545                                            .deref_unchecked::<
3546                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty<'_>>
3547                                            >()
3548                        };
3549
3550                        if value.len() > 64 {
3551                            return Err(::fidl_next::DecodeError::VectorTooLong {
3552                                size: value.len() as u64,
3553                                limit: 64,
3554                            });
3555                        }
3556
3557                        Ok(())
3558                    }
3559
3560                    5 => {
3561                        ::fidl_next::wire::Envelope::decode_as::<
3562                            ___D,
3563                            crate::wire::DevfsAddArgs<'de>,
3564                        >(slot.as_mut(), decoder, ())?;
3565
3566                        Ok(())
3567                    }
3568
3569                    6 => {
3570                        ::fidl_next::wire::Envelope::decode_as::<
3571                            ___D,
3572                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3573                        >(slot.as_mut(), decoder, (128, ()))?;
3574
3575                        let value = unsafe {
3576                            slot
3577                                            .deref_unchecked()
3578                                            .deref_unchecked::<
3579                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3580                                            >()
3581                        };
3582
3583                        if value.len() > 128 {
3584                            return Err(::fidl_next::DecodeError::VectorTooLong {
3585                                size: value.len() as u64,
3586                                limit: 128,
3587                            });
3588                        }
3589
3590                        Ok(())
3591                    }
3592
3593                    7 => {
3594                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3595                            slot.as_mut(),
3596                            decoder,
3597                            (),
3598                        )?;
3599
3600                        Ok(())
3601                    }
3602
3603                    8 => {
3604                        ::fidl_next::wire::Envelope::decode_as::<
3605                            ___D,
3606                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3607                        >(slot.as_mut(), decoder, (64, ()))?;
3608
3609                        let value = unsafe {
3610                            slot
3611                                            .deref_unchecked()
3612                                            .deref_unchecked::<
3613                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3614                                            >()
3615                        };
3616
3617                        if value.len() > 64 {
3618                            return Err(::fidl_next::DecodeError::VectorTooLong {
3619                                size: value.len() as u64,
3620                                limit: 64,
3621                            });
3622                        }
3623
3624                        Ok(())
3625                    }
3626
3627                    9 => {
3628                        ::fidl_next::wire::Envelope::decode_as::<
3629                            ___D,
3630                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3631                        >(slot.as_mut(), decoder, ())?;
3632
3633                        Ok(())
3634                    }
3635
3636                    10 => {
3637                        ::fidl_next::wire::Envelope::decode_as::<
3638                            ___D,
3639                            ::fidl_next::wire::String<'de>,
3640                        >(slot.as_mut(), decoder, 128)?;
3641
3642                        let value = unsafe {
3643                            slot.deref_unchecked()
3644                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3645                        };
3646
3647                        if value.len() > 128 {
3648                            return Err(::fidl_next::DecodeError::VectorTooLong {
3649                                size: value.len() as u64,
3650                                limit: 128,
3651                            });
3652                        }
3653
3654                        Ok(())
3655                    }
3656
3657                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3658                }
3659            })
3660        }
3661    }
3662
3663    impl<'de> NodeAddArgs<'de> {
3664        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3665            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3666        }
3667
3668        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3669            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3670        }
3671
3672        pub fn symbols(
3673            &self,
3674        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3675        {
3676            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3677        }
3678
3679        pub fn take_symbols(
3680            &mut self,
3681        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3682        {
3683            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3684        }
3685
3686        pub fn properties(
3687            &self,
3688        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>
3689        {
3690            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3691        }
3692
3693        pub fn take_properties(
3694            &mut self,
3695        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty<'de>>>
3696        {
3697            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3698        }
3699
3700        pub fn devfs_args(&self) -> ::core::option::Option<&crate::wire::DevfsAddArgs<'de>> {
3701            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
3702        }
3703
3704        pub fn take_devfs_args(
3705            &mut self,
3706        ) -> ::core::option::Option<crate::wire::DevfsAddArgs<'de>> {
3707            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
3708        }
3709
3710        pub fn offers2(
3711            &self,
3712        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3713        {
3714            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
3715        }
3716
3717        pub fn take_offers2(
3718            &mut self,
3719        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3720        {
3721            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
3722        }
3723
3724        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3725            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
3726        }
3727
3728        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3729            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
3730        }
3731
3732        pub fn properties2(
3733            &self,
3734        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3735        {
3736            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
3737        }
3738
3739        pub fn take_properties2(
3740            &mut self,
3741        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3742        {
3743            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
3744        }
3745
3746        pub fn offers_dictionary(
3747            &self,
3748        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3749        {
3750            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
3751        }
3752
3753        pub fn take_offers_dictionary(
3754            &mut self,
3755        ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3756        {
3757            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
3758        }
3759
3760        pub fn driver_host(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3761            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
3762        }
3763
3764        pub fn take_driver_host(
3765            &mut self,
3766        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3767            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
3768        }
3769    }
3770
3771    impl<'de> ::core::fmt::Debug for NodeAddArgs<'de> {
3772        fn fmt(
3773            &self,
3774            f: &mut ::core::fmt::Formatter<'_>,
3775        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3776            f.debug_struct("NodeAddArgs")
3777                .field("name", &self.name())
3778                .field("symbols", &self.symbols())
3779                .field("properties", &self.properties())
3780                .field("devfs_args", &self.devfs_args())
3781                .field("offers2", &self.offers2())
3782                .field("bus_info", &self.bus_info())
3783                .field("properties2", &self.properties2())
3784                .field("offers_dictionary", &self.offers_dictionary())
3785                .field("driver_host", &self.driver_host())
3786                .finish()
3787        }
3788    }
3789
3790    impl<'de> ::fidl_next::IntoNatural for NodeAddArgs<'de> {
3791        type Natural = crate::natural::NodeAddArgs;
3792    }
3793
3794    /// The wire type corresponding to [`ResourceArgs`].
3795    #[repr(C)]
3796    pub struct ResourceArgs<'de> {
3797        pub(crate) table: ::fidl_next::wire::Table<'de>,
3798    }
3799
3800    impl<'de> Drop for ResourceArgs<'de> {
3801        fn drop(&mut self) {
3802            let _ = self.table.get(1).map(|envelope| unsafe {
3803                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3804            });
3805
3806            let _ = self.table.get(2)
3807                .map(|envelope| unsafe {
3808                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3809                });
3810
3811            let _ = self.table.get(3).map(|envelope| unsafe {
3812                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3813            });
3814
3815            let _ = self
3816                .table
3817                .get(4)
3818                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3819        }
3820    }
3821
3822    impl ::fidl_next::Constrained for ResourceArgs<'_> {
3823        type Constraint = ();
3824
3825        fn validate(
3826            _: ::fidl_next::Slot<'_, Self>,
3827            _: Self::Constraint,
3828        ) -> Result<(), ::fidl_next::ValidationError> {
3829            Ok(())
3830        }
3831    }
3832
3833    unsafe impl ::fidl_next::Wire for ResourceArgs<'static> {
3834        type Narrowed<'de> = ResourceArgs<'de>;
3835
3836        #[inline]
3837        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3838            ::fidl_next::munge!(let Self { table } = out);
3839            ::fidl_next::wire::Table::zero_padding(table);
3840        }
3841    }
3842
3843    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResourceArgs<'de>
3844    where
3845        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3846        ___D: ::fidl_next::fuchsia::HandleDecoder,
3847    {
3848        fn decode(
3849            slot: ::fidl_next::Slot<'_, Self>,
3850            decoder: &mut ___D,
3851            _: (),
3852        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3853            ::fidl_next::munge!(let Self { table } = slot);
3854
3855            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3856                match ordinal {
3857                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3858
3859                    1 => {
3860                        ::fidl_next::wire::Envelope::decode_as::<
3861                            ___D,
3862                            ::fidl_next::wire::String<'de>,
3863                        >(slot.as_mut(), decoder, 128)?;
3864
3865                        let value = unsafe {
3866                            slot.deref_unchecked()
3867                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3868                        };
3869
3870                        if value.len() > 128 {
3871                            return Err(::fidl_next::DecodeError::VectorTooLong {
3872                                size: value.len() as u64,
3873                                limit: 128,
3874                            });
3875                        }
3876
3877                        Ok(())
3878                    }
3879
3880                    2 => {
3881                        ::fidl_next::wire::Envelope::decode_as::<
3882                            ___D,
3883                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3884                        >(slot.as_mut(), decoder, (64, ()))?;
3885
3886                        let value = unsafe {
3887                            slot
3888                                            .deref_unchecked()
3889                                            .deref_unchecked::<
3890                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3891                                            >()
3892                        };
3893
3894                        if value.len() > 64 {
3895                            return Err(::fidl_next::DecodeError::VectorTooLong {
3896                                size: value.len() as u64,
3897                                limit: 64,
3898                            });
3899                        }
3900
3901                        Ok(())
3902                    }
3903
3904                    3 => {
3905                        ::fidl_next::wire::Envelope::decode_as::<
3906                            ___D,
3907                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3908                        >(slot.as_mut(), decoder, (128, ()))?;
3909
3910                        let value = unsafe {
3911                            slot
3912                                            .deref_unchecked()
3913                                            .deref_unchecked::<
3914                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3915                                            >()
3916                        };
3917
3918                        if value.len() > 128 {
3919                            return Err(::fidl_next::DecodeError::VectorTooLong {
3920                                size: value.len() as u64,
3921                                limit: 128,
3922                            });
3923                        }
3924
3925                        Ok(())
3926                    }
3927
3928                    4 => {
3929                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3930                            slot.as_mut(),
3931                            decoder,
3932                            (),
3933                        )?;
3934
3935                        Ok(())
3936                    }
3937
3938                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3939                }
3940            })
3941        }
3942    }
3943
3944    impl<'de> ResourceArgs<'de> {
3945        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3946            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3947        }
3948
3949        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3950            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3951        }
3952
3953        pub fn properties(
3954            &self,
3955        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3956        {
3957            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3958        }
3959
3960        pub fn take_properties(
3961            &mut self,
3962        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3963        {
3964            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3965        }
3966
3967        pub fn offers(
3968            &self,
3969        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3970        {
3971            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3972        }
3973
3974        pub fn take_offers(
3975            &mut self,
3976        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3977        {
3978            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3979        }
3980
3981        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3982            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3983        }
3984
3985        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3986            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3987        }
3988    }
3989
3990    impl<'de> ::core::fmt::Debug for ResourceArgs<'de> {
3991        fn fmt(
3992            &self,
3993            f: &mut ::core::fmt::Formatter<'_>,
3994        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3995            f.debug_struct("ResourceArgs")
3996                .field("name", &self.name())
3997                .field("properties", &self.properties())
3998                .field("offers", &self.offers())
3999                .field("bus_info", &self.bus_info())
4000                .finish()
4001        }
4002    }
4003
4004    impl<'de> ::fidl_next::IntoNatural for ResourceArgs<'de> {
4005        type Natural = crate::natural::ResourceArgs;
4006    }
4007
4008    /// The wire type corresponding to [`NodeProvideResourceRequest`].
4009    #[derive(Debug)]
4010    #[repr(C)]
4011    pub struct NodeProvideResourceRequest<'de> {
4012        pub resource: crate::wire::ResourceArgs<'de>,
4013
4014        pub controller:
4015            ::fidl_next::ServerEnd<crate::ResourceController, ::fidl_next::wire::fuchsia::Channel>,
4016    }
4017
4018    static_assertions::const_assert_eq!(std::mem::size_of::<NodeProvideResourceRequest<'_>>(), 24);
4019    static_assertions::const_assert_eq!(std::mem::align_of::<NodeProvideResourceRequest<'_>>(), 8);
4020
4021    static_assertions::const_assert_eq!(
4022        std::mem::offset_of!(NodeProvideResourceRequest<'_>, resource),
4023        0
4024    );
4025
4026    static_assertions::const_assert_eq!(
4027        std::mem::offset_of!(NodeProvideResourceRequest<'_>, controller),
4028        16
4029    );
4030
4031    impl ::fidl_next::Constrained for NodeProvideResourceRequest<'_> {
4032        type Constraint = ();
4033
4034        fn validate(
4035            _: ::fidl_next::Slot<'_, Self>,
4036            _: Self::Constraint,
4037        ) -> Result<(), ::fidl_next::ValidationError> {
4038            Ok(())
4039        }
4040    }
4041
4042    unsafe impl ::fidl_next::Wire for NodeProvideResourceRequest<'static> {
4043        type Narrowed<'de> = NodeProvideResourceRequest<'de>;
4044
4045        #[inline]
4046        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4047            ::fidl_next::munge! {
4048                let Self {
4049                    resource,
4050                    controller,
4051
4052                } = &mut *out_;
4053            }
4054
4055            ::fidl_next::Wire::zero_padding(resource);
4056
4057            ::fidl_next::Wire::zero_padding(controller);
4058
4059            unsafe {
4060                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4061            }
4062        }
4063    }
4064
4065    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeProvideResourceRequest<'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            if slot_.as_bytes()[20..24] != [0u8; 4] {
4077                return Err(::fidl_next::DecodeError::InvalidPadding);
4078            }
4079
4080            ::fidl_next::munge! {
4081                let Self {
4082                    mut resource,
4083                    mut controller,
4084
4085                } = slot_;
4086            }
4087
4088            let _field = resource.as_mut();
4089
4090            ::fidl_next::Decode::decode(resource.as_mut(), decoder_, ())?;
4091
4092            let _field = controller.as_mut();
4093
4094            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4095
4096            Ok(())
4097        }
4098    }
4099
4100    impl<'de> ::fidl_next::IntoNatural for NodeProvideResourceRequest<'de> {
4101        type Natural = crate::natural::NodeProvideResourceRequest;
4102    }
4103
4104    /// The wire type corresponding to [`NodeAddChildRequest`].
4105    #[derive(Debug)]
4106    #[repr(C)]
4107    pub struct NodeAddChildRequest<'de> {
4108        pub args: crate::wire::NodeAddArgs<'de>,
4109
4110        pub controller:
4111            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4112
4113        pub node: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4114    }
4115
4116    static_assertions::const_assert_eq!(std::mem::size_of::<NodeAddChildRequest<'_>>(), 24);
4117    static_assertions::const_assert_eq!(std::mem::align_of::<NodeAddChildRequest<'_>>(), 8);
4118
4119    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, args), 0);
4120
4121    static_assertions::const_assert_eq!(
4122        std::mem::offset_of!(NodeAddChildRequest<'_>, controller),
4123        16
4124    );
4125
4126    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, node), 20);
4127
4128    impl ::fidl_next::Constrained for NodeAddChildRequest<'_> {
4129        type Constraint = ();
4130
4131        fn validate(
4132            _: ::fidl_next::Slot<'_, Self>,
4133            _: Self::Constraint,
4134        ) -> Result<(), ::fidl_next::ValidationError> {
4135            Ok(())
4136        }
4137    }
4138
4139    unsafe impl ::fidl_next::Wire for NodeAddChildRequest<'static> {
4140        type Narrowed<'de> = NodeAddChildRequest<'de>;
4141
4142        #[inline]
4143        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4144            ::fidl_next::munge! {
4145                let Self {
4146                    args,
4147                    controller,
4148                    node,
4149
4150                } = &mut *out_;
4151            }
4152
4153            ::fidl_next::Wire::zero_padding(args);
4154
4155            ::fidl_next::Wire::zero_padding(controller);
4156
4157            ::fidl_next::Wire::zero_padding(node);
4158        }
4159    }
4160
4161    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddChildRequest<'de>
4162    where
4163        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4164        ___D: ::fidl_next::Decoder<'de>,
4165        ___D: ::fidl_next::fuchsia::HandleDecoder,
4166    {
4167        fn decode(
4168            slot_: ::fidl_next::Slot<'_, Self>,
4169            decoder_: &mut ___D,
4170            _: (),
4171        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4172            ::fidl_next::munge! {
4173                let Self {
4174                    mut args,
4175                    mut controller,
4176                    mut node,
4177
4178                } = slot_;
4179            }
4180
4181            let _field = args.as_mut();
4182
4183            ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
4184
4185            let _field = controller.as_mut();
4186
4187            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4188
4189            let _field = node.as_mut();
4190
4191            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
4192
4193            Ok(())
4194        }
4195    }
4196
4197    impl<'de> ::fidl_next::IntoNatural for NodeAddChildRequest<'de> {
4198        type Natural = crate::natural::NodeAddChildRequest;
4199    }
4200
4201    /// The wire type corresponding to [`NodeControllerOnBindRequest`].
4202    #[repr(C)]
4203    pub struct NodeControllerOnBindRequest<'de> {
4204        pub(crate) table: ::fidl_next::wire::Table<'de>,
4205    }
4206
4207    impl<'de> Drop for NodeControllerOnBindRequest<'de> {
4208        fn drop(&mut self) {
4209            let _ = self.table.get(1).map(|envelope| unsafe {
4210                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
4211            });
4212        }
4213    }
4214
4215    impl ::fidl_next::Constrained for NodeControllerOnBindRequest<'_> {
4216        type Constraint = ();
4217
4218        fn validate(
4219            _: ::fidl_next::Slot<'_, Self>,
4220            _: Self::Constraint,
4221        ) -> Result<(), ::fidl_next::ValidationError> {
4222            Ok(())
4223        }
4224    }
4225
4226    unsafe impl ::fidl_next::Wire for NodeControllerOnBindRequest<'static> {
4227        type Narrowed<'de> = NodeControllerOnBindRequest<'de>;
4228
4229        #[inline]
4230        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4231            ::fidl_next::munge!(let Self { table } = out);
4232            ::fidl_next::wire::Table::zero_padding(table);
4233        }
4234    }
4235
4236    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeControllerOnBindRequest<'de>
4237    where
4238        ___D: ::fidl_next::Decoder<'de> + ?Sized,
4239        ___D: ::fidl_next::fuchsia::HandleDecoder,
4240    {
4241        fn decode(
4242            slot: ::fidl_next::Slot<'_, Self>,
4243            decoder: &mut ___D,
4244            _: (),
4245        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4246            ::fidl_next::munge!(let Self { table } = slot);
4247
4248            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4249                match ordinal {
4250                    0 => unsafe { ::core::hint::unreachable_unchecked() },
4251
4252                    1 => {
4253                        ::fidl_next::wire::Envelope::decode_as::<
4254                            ___D,
4255                            ::fidl_next::wire::fuchsia::Event,
4256                        >(slot.as_mut(), decoder, ())?;
4257
4258                        Ok(())
4259                    }
4260
4261                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4262                }
4263            })
4264        }
4265    }
4266
4267    impl<'de> NodeControllerOnBindRequest<'de> {
4268        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
4269            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4270        }
4271
4272        pub fn take_node_token(
4273            &mut self,
4274        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
4275            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4276        }
4277    }
4278
4279    impl<'de> ::core::fmt::Debug for NodeControllerOnBindRequest<'de> {
4280        fn fmt(
4281            &self,
4282            f: &mut ::core::fmt::Formatter<'_>,
4283        ) -> ::core::result::Result<(), ::core::fmt::Error> {
4284            f.debug_struct("NodeControllerOnBindRequest")
4285                .field("node_token", &self.node_token())
4286                .finish()
4287        }
4288    }
4289
4290    impl<'de> ::fidl_next::IntoNatural for NodeControllerOnBindRequest<'de> {
4291        type Natural = crate::natural::NodeControllerOnBindRequest;
4292    }
4293
4294    /// The wire type corresponding to [`NodeManagerAddNodeRequest`].
4295    #[derive(Debug)]
4296    #[repr(C)]
4297    pub struct NodeManagerAddNodeRequest<'de> {
4298        pub node: crate::wire::Node2<'de>,
4299
4300        pub controller:
4301            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4302
4303        pub node_ref:
4304            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4305    }
4306
4307    static_assertions::const_assert_eq!(std::mem::size_of::<NodeManagerAddNodeRequest<'_>>(), 24);
4308    static_assertions::const_assert_eq!(std::mem::align_of::<NodeManagerAddNodeRequest<'_>>(), 8);
4309
4310    static_assertions::const_assert_eq!(
4311        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, node),
4312        0
4313    );
4314
4315    static_assertions::const_assert_eq!(
4316        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, controller),
4317        16
4318    );
4319
4320    static_assertions::const_assert_eq!(
4321        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, node_ref),
4322        20
4323    );
4324
4325    impl ::fidl_next::Constrained for NodeManagerAddNodeRequest<'_> {
4326        type Constraint = ();
4327
4328        fn validate(
4329            _: ::fidl_next::Slot<'_, Self>,
4330            _: Self::Constraint,
4331        ) -> Result<(), ::fidl_next::ValidationError> {
4332            Ok(())
4333        }
4334    }
4335
4336    unsafe impl ::fidl_next::Wire for NodeManagerAddNodeRequest<'static> {
4337        type Narrowed<'de> = NodeManagerAddNodeRequest<'de>;
4338
4339        #[inline]
4340        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4341            ::fidl_next::munge! {
4342                let Self {
4343                    node,
4344                    controller,
4345                    node_ref,
4346
4347                } = &mut *out_;
4348            }
4349
4350            ::fidl_next::Wire::zero_padding(node);
4351
4352            ::fidl_next::Wire::zero_padding(controller);
4353
4354            ::fidl_next::Wire::zero_padding(node_ref);
4355        }
4356    }
4357
4358    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeManagerAddNodeRequest<'de>
4359    where
4360        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4361        ___D: ::fidl_next::Decoder<'de>,
4362        ___D: ::fidl_next::fuchsia::HandleDecoder,
4363    {
4364        fn decode(
4365            slot_: ::fidl_next::Slot<'_, Self>,
4366            decoder_: &mut ___D,
4367            _: (),
4368        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4369            ::fidl_next::munge! {
4370                let Self {
4371                    mut node,
4372                    mut controller,
4373                    mut node_ref,
4374
4375                } = slot_;
4376            }
4377
4378            let _field = node.as_mut();
4379
4380            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
4381
4382            let _field = controller.as_mut();
4383
4384            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4385
4386            let _field = node_ref.as_mut();
4387
4388            ::fidl_next::Decode::decode(node_ref.as_mut(), decoder_, ())?;
4389
4390            Ok(())
4391        }
4392    }
4393
4394    impl<'de> ::fidl_next::IntoNatural for NodeManagerAddNodeRequest<'de> {
4395        type Natural = crate::natural::NodeManagerAddNodeRequest;
4396    }
4397}
4398
4399pub mod wire_optional {
4400
4401    pub use fidl_next_common_fuchsia_driver_framework::wire_optional::*;
4402
4403    #[repr(transparent)]
4404    pub struct DriverResult<'de> {
4405        pub(crate) raw: ::fidl_next::wire::Union,
4406        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4407    }
4408
4409    impl ::fidl_next::Constrained for DriverResult<'_> {
4410        type Constraint = ();
4411
4412        fn validate(
4413            _: ::fidl_next::Slot<'_, Self>,
4414            _: Self::Constraint,
4415        ) -> Result<(), ::fidl_next::ValidationError> {
4416            Ok(())
4417        }
4418    }
4419
4420    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
4421        type Narrowed<'de> = DriverResult<'de>;
4422
4423        #[inline]
4424        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4425            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4426            ::fidl_next::wire::Union::zero_padding(raw);
4427        }
4428    }
4429
4430    impl<'de> DriverResult<'de> {
4431        pub fn is_some(&self) -> bool {
4432            self.raw.is_some()
4433        }
4434
4435        pub fn is_none(&self) -> bool {
4436            self.raw.is_none()
4437        }
4438
4439        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DriverResult<'de>> {
4440            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4441        }
4442
4443        pub fn into_option(self) -> ::core::option::Option<crate::wire::DriverResult<'de>> {
4444            if self.is_some() {
4445                Some(crate::wire::DriverResult {
4446                    raw: self.raw,
4447                    _phantom: ::core::marker::PhantomData,
4448                })
4449            } else {
4450                None
4451            }
4452        }
4453    }
4454
4455    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
4456    where
4457        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4458        ___D: ::fidl_next::Decoder<'de>,
4459        ___D: ::fidl_next::fuchsia::HandleDecoder,
4460    {
4461        fn decode(
4462            mut slot: ::fidl_next::Slot<'_, Self>,
4463            decoder: &mut ___D,
4464            _: (),
4465        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4466            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4467            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4468                1 => {
4469                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
4470                        raw,
4471                        decoder,
4472                        (),
4473                    )?
4474                }
4475
4476                2 => {
4477                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
4478                        raw,
4479                        decoder,
4480                        (),
4481                    )?
4482                }
4483
4484                3 => {
4485                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Status>(
4486                        raw,
4487                        decoder,
4488                        (),
4489                    )?
4490                }
4491
4492                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4493                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4494            }
4495
4496            Ok(())
4497        }
4498    }
4499
4500    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
4501        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4502            self.as_ref().fmt(f)
4503        }
4504    }
4505
4506    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
4507        type Natural = ::core::option::Option<crate::natural::DriverResult>;
4508    }
4509}
4510
4511pub mod generic {
4512
4513    pub use fidl_next_common_fuchsia_driver_framework::generic::*;
4514
4515    /// The generic type corresponding to [`DriverResumeRequest`].
4516    pub struct DriverResumeRequest<T0> {
4517        pub power_element_lease: T0,
4518    }
4519
4520    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>
4521        for DriverResumeRequest<T0>
4522    where
4523        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4524        ___E: ::fidl_next::fuchsia::HandleEncoder,
4525        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEventPair, ___E>,
4526    {
4527        #[inline]
4528        fn encode(
4529            self,
4530            encoder_: &mut ___E,
4531            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverResumeRequest>,
4532            _: (),
4533        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4534            ::fidl_next::munge! {
4535                let crate::wire::DriverResumeRequest {
4536                    power_element_lease,
4537
4538                } = out_;
4539            }
4540
4541            ::fidl_next::Encode::encode(
4542                self.power_element_lease,
4543                encoder_,
4544                power_element_lease,
4545                (),
4546            )?;
4547
4548            Ok(())
4549        }
4550    }
4551
4552    /// The generic type corresponding to [`DriverStartRequest`].
4553    pub struct DriverStartRequest<T0> {
4554        pub start_args: T0,
4555    }
4556
4557    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
4558        for DriverStartRequest<T0>
4559    where
4560        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4561        ___E: ::fidl_next::Encoder,
4562        ___E: ::fidl_next::fuchsia::HandleEncoder,
4563        T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
4564    {
4565        #[inline]
4566        fn encode(
4567            self,
4568            encoder_: &mut ___E,
4569            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
4570            _: (),
4571        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4572            ::fidl_next::munge! {
4573                let crate::wire::DriverStartRequest {
4574                    start_args,
4575
4576                } = out_;
4577            }
4578
4579            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
4580
4581            Ok(())
4582        }
4583    }
4584
4585    /// The generic type corresponding to [`NodeProvideResourceRequest`].
4586    pub struct NodeProvideResourceRequest<T0, T1> {
4587        pub resource: T0,
4588
4589        pub controller: T1,
4590    }
4591
4592    unsafe impl<___E, T0, T1>
4593        ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
4594        for NodeProvideResourceRequest<T0, T1>
4595    where
4596        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4597        ___E: ::fidl_next::Encoder,
4598        ___E: ::fidl_next::fuchsia::HandleEncoder,
4599        T0: ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E>,
4600        T1: ::fidl_next::Encode<
4601                ::fidl_next::ServerEnd<
4602                    crate::ResourceController,
4603                    ::fidl_next::wire::fuchsia::Channel,
4604                >,
4605                ___E,
4606            >,
4607    {
4608        #[inline]
4609        fn encode(
4610            self,
4611            encoder_: &mut ___E,
4612            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
4613            _: (),
4614        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4615            ::fidl_next::munge! {
4616                let crate::wire::NodeProvideResourceRequest {
4617                    resource,
4618                    controller,
4619
4620                } = out_;
4621            }
4622
4623            ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
4624
4625            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4626
4627            Ok(())
4628        }
4629    }
4630
4631    /// The generic type corresponding to [`NodeAddChildRequest`].
4632    pub struct NodeAddChildRequest<T0, T1, T2> {
4633        pub args: T0,
4634
4635        pub controller: T1,
4636
4637        pub node: T2,
4638    }
4639
4640    unsafe impl<___E, T0, T1, T2>
4641        ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
4642        for NodeAddChildRequest<T0, T1, T2>
4643    where
4644        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4645        ___E: ::fidl_next::Encoder,
4646        ___E: ::fidl_next::fuchsia::HandleEncoder,
4647        T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
4648        T1: ::fidl_next::Encode<
4649                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4650                ___E,
4651            >,
4652        T2: ::fidl_next::Encode<
4653                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4654                ___E,
4655            >,
4656    {
4657        #[inline]
4658        fn encode(
4659            self,
4660            encoder_: &mut ___E,
4661            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
4662            _: (),
4663        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4664            ::fidl_next::munge! {
4665                let crate::wire::NodeAddChildRequest {
4666                    args,
4667                    controller,
4668                    node,
4669
4670                } = out_;
4671            }
4672
4673            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
4674
4675            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4676
4677            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
4678
4679            Ok(())
4680        }
4681    }
4682
4683    /// The generic type corresponding to [`NodeManagerAddNodeRequest`].
4684    pub struct NodeManagerAddNodeRequest<T0, T1, T2> {
4685        pub node: T0,
4686
4687        pub controller: T1,
4688
4689        pub node_ref: T2,
4690    }
4691
4692    unsafe impl<___E, T0, T1, T2>
4693        ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>
4694        for NodeManagerAddNodeRequest<T0, T1, T2>
4695    where
4696        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4697        ___E: ::fidl_next::Encoder,
4698        ___E: ::fidl_next::fuchsia::HandleEncoder,
4699        T0: ::fidl_next::Encode<crate::wire::Node2<'static>, ___E>,
4700        T1: ::fidl_next::Encode<
4701                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4702                ___E,
4703            >,
4704        T2: ::fidl_next::Encode<
4705                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4706                ___E,
4707            >,
4708    {
4709        #[inline]
4710        fn encode(
4711            self,
4712            encoder_: &mut ___E,
4713            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeManagerAddNodeRequest<'static>>,
4714            _: (),
4715        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4716            ::fidl_next::munge! {
4717                let crate::wire::NodeManagerAddNodeRequest {
4718                    node,
4719                    controller,
4720                    node_ref,
4721
4722                } = out_;
4723            }
4724
4725            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
4726
4727            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4728
4729            ::fidl_next::Encode::encode(self.node_ref, encoder_, node_ref, ())?;
4730
4731            Ok(())
4732        }
4733    }
4734}
4735
4736pub use self::natural::*;
4737
4738/// The type corresponding to the Driver protocol.
4739#[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"]
4740#[derive(PartialEq, Debug)]
4741pub struct Driver;
4742
4743#[cfg(feature = "driver")]
4744impl ::fidl_next::HasTransport for Driver {
4745    type Transport = ::fdf_fidl::DriverChannel;
4746}
4747
4748pub mod driver {
4749    pub mod prelude {
4750        pub use crate::{
4751            Driver, DriverClientHandler, DriverLocalClientHandler, DriverLocalServerHandler,
4752            DriverServerHandler, driver,
4753        };
4754
4755        pub use crate::natural::DriverResumeRequest;
4756
4757        pub use crate::natural::DriverStartRequest;
4758
4759        pub use crate::natural::DriverResumeResponse;
4760
4761        pub use crate::natural::DriverStartResponse;
4762
4763        pub use crate::natural::DriverSuspendResponse;
4764    }
4765
4766    pub struct Start;
4767
4768    impl ::fidl_next::Method for Start {
4769        const ORDINAL: u64 = 2863727161496985794;
4770        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4771            ::fidl_next::protocol::Flexibility::Flexible;
4772
4773        type Protocol = crate::Driver;
4774
4775        type Request = crate::wire::DriverStartRequest<'static>;
4776    }
4777
4778    impl ::fidl_next::TwoWayMethod for Start {
4779        type Response = ::fidl_next::wire::Result<
4780            'static,
4781            crate::wire::DriverStartResponse,
4782            ::fidl_next::wire::fuchsia::Status,
4783        >;
4784    }
4785
4786    impl<___R> ::fidl_next::Respond<___R> for Start {
4787        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4788
4789        fn respond(response: ___R) -> Self::Output {
4790            ::core::result::Result::Ok(response)
4791        }
4792    }
4793
4794    impl<___R> ::fidl_next::RespondErr<___R> for Start {
4795        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4796
4797        fn respond_err(response: ___R) -> Self::Output {
4798            ::core::result::Result::Err(response)
4799        }
4800    }
4801
4802    pub struct Stop;
4803
4804    impl ::fidl_next::Method for Stop {
4805        const ORDINAL: u64 = 5446759044519003197;
4806        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4807            ::fidl_next::protocol::Flexibility::Flexible;
4808
4809        type Protocol = crate::Driver;
4810
4811        type Request = ::fidl_next::wire::EmptyMessageBody;
4812    }
4813
4814    pub struct Suspend;
4815
4816    impl ::fidl_next::Method for Suspend {
4817        const ORDINAL: u64 = 5542715003953095352;
4818        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4819            ::fidl_next::protocol::Flexibility::Flexible;
4820
4821        type Protocol = crate::Driver;
4822
4823        type Request = ::fidl_next::wire::EmptyMessageBody;
4824    }
4825
4826    impl ::fidl_next::TwoWayMethod for Suspend {
4827        type Response = ::fidl_next::wire::Result<
4828            'static,
4829            crate::wire::DriverSuspendResponse,
4830            ::fidl_next::wire::fuchsia::Status,
4831        >;
4832    }
4833
4834    impl<___R> ::fidl_next::Respond<___R> for Suspend {
4835        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4836
4837        fn respond(response: ___R) -> Self::Output {
4838            ::core::result::Result::Ok(response)
4839        }
4840    }
4841
4842    impl<___R> ::fidl_next::RespondErr<___R> for Suspend {
4843        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4844
4845        fn respond_err(response: ___R) -> Self::Output {
4846            ::core::result::Result::Err(response)
4847        }
4848    }
4849
4850    pub struct Resume;
4851
4852    impl ::fidl_next::Method for Resume {
4853        const ORDINAL: u64 = 2681111055565410632;
4854        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4855            ::fidl_next::protocol::Flexibility::Flexible;
4856
4857        type Protocol = crate::Driver;
4858
4859        type Request = crate::wire::DriverResumeRequest;
4860    }
4861
4862    impl ::fidl_next::TwoWayMethod for Resume {
4863        type Response = ::fidl_next::wire::Result<
4864            'static,
4865            crate::wire::DriverResumeResponse,
4866            ::fidl_next::wire::fuchsia::Status,
4867        >;
4868    }
4869
4870    impl<___R> ::fidl_next::Respond<___R> for Resume {
4871        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4872
4873        fn respond(response: ___R) -> Self::Output {
4874            ::core::result::Result::Ok(response)
4875        }
4876    }
4877
4878    impl<___R> ::fidl_next::RespondErr<___R> for Resume {
4879        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4880
4881        fn respond_err(response: ___R) -> Self::Output {
4882            ::core::result::Result::Err(response)
4883        }
4884    }
4885
4886    mod ___detail {
4887        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Driver
4888        where
4889            ___T: ::fidl_next::Transport,
4890        {
4891            type Client = DriverClient<___T>;
4892            type Server = DriverServer<___T>;
4893        }
4894
4895        /// The client for the `Driver` protocol.
4896        #[repr(transparent)]
4897        pub struct DriverClient<___T: ::fidl_next::Transport> {
4898            #[allow(dead_code)]
4899            client: ::fidl_next::protocol::Client<___T>,
4900        }
4901
4902        impl<___T> DriverClient<___T>
4903        where
4904            ___T: ::fidl_next::Transport,
4905        {
4906            #[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"]
4907            pub fn start(
4908                &self,
4909
4910                start_args: impl ::fidl_next::Encode<
4911                    crate::wire::DriverStartArgs<'static>,
4912                    <___T as ::fidl_next::Transport>::SendBuffer,
4913                >,
4914            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
4915            where
4916                <___T as ::fidl_next::Transport>::SendBuffer:
4917                    ::fidl_next::encoder::InternalHandleEncoder,
4918                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
4919                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4920            {
4921                self.start_with(crate::generic::DriverStartRequest { start_args })
4922            }
4923
4924            #[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"]
4925            pub fn start_with<___R>(
4926                &self,
4927                request: ___R,
4928            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
4929            where
4930                ___R: ::fidl_next::Encode<
4931                        crate::wire::DriverStartRequest<'static>,
4932                        <___T as ::fidl_next::Transport>::SendBuffer,
4933                    >,
4934            {
4935                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4936                    2863727161496985794,
4937                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
4938                    request,
4939                ))
4940            }
4941
4942            #[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"]
4943            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
4944                ::fidl_next::SendFuture::from_untyped(
4945                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
4946                        5446759044519003197,
4947                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
4948                        (),
4949                    ),
4950                )
4951            }
4952
4953            #[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"]
4954            pub fn suspend(&self) -> ::fidl_next::TwoWayFuture<'_, super::Suspend, ___T> {
4955                ::fidl_next::TwoWayFuture::from_untyped(
4956                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
4957                        5542715003953095352,
4958                        <super::Suspend as ::fidl_next::Method>::FLEXIBILITY,
4959                        (),
4960                    ),
4961                )
4962            }
4963
4964            #[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"]
4965            pub fn resume(
4966                &self,
4967
4968                power_element_lease: impl ::fidl_next::Encode<
4969                    ::fidl_next::wire::fuchsia::OptionalEventPair,
4970                    <___T as ::fidl_next::Transport>::SendBuffer,
4971                >,
4972            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
4973            where
4974                <___T as ::fidl_next::Transport>::SendBuffer:
4975                    ::fidl_next::encoder::InternalHandleEncoder,
4976                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
4977            {
4978                self.resume_with(crate::generic::DriverResumeRequest { power_element_lease })
4979            }
4980
4981            #[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"]
4982            pub fn resume_with<___R>(
4983                &self,
4984                request: ___R,
4985            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
4986            where
4987                ___R: ::fidl_next::Encode<
4988                        crate::wire::DriverResumeRequest,
4989                        <___T as ::fidl_next::Transport>::SendBuffer,
4990                    >,
4991            {
4992                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
4993                    2681111055565410632,
4994                    <super::Resume as ::fidl_next::Method>::FLEXIBILITY,
4995                    request,
4996                ))
4997            }
4998        }
4999
5000        /// The server for the `Driver` protocol.
5001        #[repr(transparent)]
5002        pub struct DriverServer<___T: ::fidl_next::Transport> {
5003            server: ::fidl_next::protocol::Server<___T>,
5004        }
5005
5006        impl<___T> DriverServer<___T> where ___T: ::fidl_next::Transport {}
5007    }
5008}
5009
5010#[diagnostic::on_unimplemented(
5011    note = "If {Self} implements the non-local DriverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5012)]
5013
5014/// A client handler for the Driver protocol.
5015///
5016/// See [`Driver`] for more details.
5017pub trait DriverLocalClientHandler<
5018    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5019    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5020>
5021{
5022    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5023        ::core::future::ready(())
5024    }
5025}
5026
5027impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Driver
5028where
5029    ___H: DriverLocalClientHandler<___T>,
5030    ___T: ::fidl_next::Transport,
5031{
5032    async fn on_event(
5033        handler: &mut ___H,
5034        mut message: ::fidl_next::Message<___T>,
5035    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5036        match *message.header().ordinal {
5037            ordinal => {
5038                handler.on_unknown_interaction(ordinal).await;
5039                if ::core::matches!(
5040                    message.header().flexibility(),
5041                    ::fidl_next::protocol::Flexibility::Strict
5042                ) {
5043                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5044                } else {
5045                    Ok(())
5046                }
5047            }
5048        }
5049    }
5050}
5051
5052#[diagnostic::on_unimplemented(
5053    note = "If {Self} implements the non-local DriverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5054)]
5055
5056/// A server handler for the Driver protocol.
5057///
5058/// See [`Driver`] for more details.
5059pub trait DriverLocalServerHandler<
5060    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5061    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5062>
5063{
5064    #[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"]
5065    fn start(
5066        &mut self,
5067
5068        request: ::fidl_next::Request<driver::Start, ___T>,
5069
5070        responder: ::fidl_next::Responder<driver::Start, ___T>,
5071    ) -> impl ::core::future::Future<Output = ()>;
5072
5073    #[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"]
5074    fn stop(&mut self) -> impl ::core::future::Future<Output = ()>;
5075
5076    #[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"]
5077    fn suspend(
5078        &mut self,
5079
5080        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
5081    ) -> impl ::core::future::Future<Output = ()>;
5082
5083    #[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"]
5084    fn resume(
5085        &mut self,
5086
5087        request: ::fidl_next::Request<driver::Resume, ___T>,
5088
5089        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5090    ) -> impl ::core::future::Future<Output = ()>;
5091
5092    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5093        ::core::future::ready(())
5094    }
5095}
5096
5097impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Driver
5098where
5099    ___H: DriverLocalServerHandler<___T>,
5100    ___T: ::fidl_next::Transport,
5101    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
5102            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5103            Constraint = (),
5104        >,
5105    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
5106            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5107            Constraint = (),
5108        >,
5109{
5110    async fn on_one_way(
5111        handler: &mut ___H,
5112        mut message: ::fidl_next::Message<___T>,
5113    ) -> ::core::result::Result<
5114        (),
5115        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5116    > {
5117        match *message.header().ordinal {
5118            5446759044519003197 => {
5119                handler.stop().await;
5120                Ok(())
5121            }
5122
5123            ordinal => {
5124                handler.on_unknown_interaction(ordinal).await;
5125                if ::core::matches!(
5126                    message.header().flexibility(),
5127                    ::fidl_next::protocol::Flexibility::Strict
5128                ) {
5129                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5130                } else {
5131                    Ok(())
5132                }
5133            }
5134        }
5135    }
5136
5137    async fn on_two_way(
5138        handler: &mut ___H,
5139        mut message: ::fidl_next::Message<___T>,
5140        responder: ::fidl_next::protocol::Responder<___T>,
5141    ) -> ::core::result::Result<
5142        (),
5143        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5144    > {
5145        match *message.header().ordinal {
5146            2863727161496985794 => {
5147                let responder = ::fidl_next::Responder::from_untyped(responder);
5148
5149                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5150                    Ok(decoded) => {
5151                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
5152                        Ok(())
5153                    }
5154                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5155                        ordinal: 2863727161496985794,
5156                        error,
5157                    }),
5158                }
5159            }
5160
5161            5542715003953095352 => {
5162                let responder = ::fidl_next::Responder::from_untyped(responder);
5163
5164                handler.suspend(responder).await;
5165                Ok(())
5166            }
5167
5168            2681111055565410632 => {
5169                let responder = ::fidl_next::Responder::from_untyped(responder);
5170
5171                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5172                    Ok(decoded) => {
5173                        handler
5174                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
5175                            .await;
5176                        Ok(())
5177                    }
5178                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5179                        ordinal: 2681111055565410632,
5180                        error,
5181                    }),
5182                }
5183            }
5184
5185            ordinal => {
5186                handler.on_unknown_interaction(ordinal).await;
5187                if ::core::matches!(
5188                    message.header().flexibility(),
5189                    ::fidl_next::protocol::Flexibility::Strict
5190                ) {
5191                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5192                } else {
5193                    responder
5194                        .respond_framework_error(
5195                            ordinal,
5196                            ::fidl_next::FrameworkError::UnknownMethod,
5197                        )
5198                        .expect("encoding a framework error should never fail")
5199                        .await?;
5200                    Ok(())
5201                }
5202            }
5203        }
5204    }
5205}
5206
5207/// A client handler for the Driver protocol.
5208///
5209/// See [`Driver`] for more details.
5210pub trait DriverClientHandler<
5211    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5212    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5213>
5214{
5215    fn on_unknown_interaction(
5216        &mut self,
5217        ordinal: u64,
5218    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5219        ::core::future::ready(())
5220    }
5221}
5222
5223impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Driver
5224where
5225    ___H: DriverClientHandler<___T> + ::core::marker::Send,
5226    ___T: ::fidl_next::Transport,
5227{
5228    async fn on_event(
5229        handler: &mut ___H,
5230        mut message: ::fidl_next::Message<___T>,
5231    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5232        match *message.header().ordinal {
5233            ordinal => {
5234                handler.on_unknown_interaction(ordinal).await;
5235                if ::core::matches!(
5236                    message.header().flexibility(),
5237                    ::fidl_next::protocol::Flexibility::Strict
5238                ) {
5239                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5240                } else {
5241                    Ok(())
5242                }
5243            }
5244        }
5245    }
5246}
5247
5248/// A server handler for the Driver protocol.
5249///
5250/// See [`Driver`] for more details.
5251pub trait DriverServerHandler<
5252    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5253    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5254>
5255{
5256    #[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"]
5257    fn start(
5258        &mut self,
5259
5260        request: ::fidl_next::Request<driver::Start, ___T>,
5261
5262        responder: ::fidl_next::Responder<driver::Start, ___T>,
5263    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5264
5265    #[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"]
5266    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5267
5268    #[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"]
5269    fn suspend(
5270        &mut self,
5271
5272        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
5273    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5274
5275    #[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"]
5276    fn resume(
5277        &mut self,
5278
5279        request: ::fidl_next::Request<driver::Resume, ___T>,
5280
5281        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5282    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5283
5284    fn on_unknown_interaction(
5285        &mut self,
5286        ordinal: u64,
5287    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5288        ::core::future::ready(())
5289    }
5290}
5291
5292impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Driver
5293where
5294    ___H: DriverServerHandler<___T> + ::core::marker::Send,
5295    ___T: ::fidl_next::Transport,
5296    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
5297            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5298            Constraint = (),
5299        >,
5300    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
5301            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5302            Constraint = (),
5303        >,
5304{
5305    async fn on_one_way(
5306        handler: &mut ___H,
5307        mut message: ::fidl_next::Message<___T>,
5308    ) -> ::core::result::Result<
5309        (),
5310        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5311    > {
5312        match *message.header().ordinal {
5313            5446759044519003197 => {
5314                handler.stop().await;
5315                Ok(())
5316            }
5317
5318            ordinal => {
5319                handler.on_unknown_interaction(ordinal).await;
5320                if ::core::matches!(
5321                    message.header().flexibility(),
5322                    ::fidl_next::protocol::Flexibility::Strict
5323                ) {
5324                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5325                } else {
5326                    Ok(())
5327                }
5328            }
5329        }
5330    }
5331
5332    async fn on_two_way(
5333        handler: &mut ___H,
5334        mut message: ::fidl_next::Message<___T>,
5335        responder: ::fidl_next::protocol::Responder<___T>,
5336    ) -> ::core::result::Result<
5337        (),
5338        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5339    > {
5340        match *message.header().ordinal {
5341            2863727161496985794 => {
5342                let responder = ::fidl_next::Responder::from_untyped(responder);
5343
5344                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5345                    Ok(decoded) => {
5346                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
5347                        Ok(())
5348                    }
5349                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5350                        ordinal: 2863727161496985794,
5351                        error,
5352                    }),
5353                }
5354            }
5355
5356            5542715003953095352 => {
5357                let responder = ::fidl_next::Responder::from_untyped(responder);
5358
5359                handler.suspend(responder).await;
5360                Ok(())
5361            }
5362
5363            2681111055565410632 => {
5364                let responder = ::fidl_next::Responder::from_untyped(responder);
5365
5366                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5367                    Ok(decoded) => {
5368                        handler
5369                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
5370                            .await;
5371                        Ok(())
5372                    }
5373                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5374                        ordinal: 2681111055565410632,
5375                        error,
5376                    }),
5377                }
5378            }
5379
5380            ordinal => {
5381                handler.on_unknown_interaction(ordinal).await;
5382                if ::core::matches!(
5383                    message.header().flexibility(),
5384                    ::fidl_next::protocol::Flexibility::Strict
5385                ) {
5386                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5387                } else {
5388                    responder
5389                        .respond_framework_error(
5390                            ordinal,
5391                            ::fidl_next::FrameworkError::UnknownMethod,
5392                        )
5393                        .expect("encoding a framework error should never fail")
5394                        .await?;
5395                    Ok(())
5396                }
5397            }
5398        }
5399    }
5400}
5401
5402impl<___T> DriverClientHandler<___T> for ::fidl_next::IgnoreEvents
5403where
5404    ___T: ::fidl_next::Transport,
5405{
5406    async fn on_unknown_interaction(&mut self, _: u64) {}
5407}
5408
5409impl<___H, ___T> DriverLocalClientHandler<___T> for ::fidl_next::Local<___H>
5410where
5411    ___H: DriverClientHandler<___T>,
5412    ___T: ::fidl_next::Transport,
5413{
5414    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5415        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5416    }
5417}
5418
5419impl<___H, ___T> DriverLocalServerHandler<___T> for ::fidl_next::Local<___H>
5420where
5421    ___H: DriverServerHandler<___T>,
5422    ___T: ::fidl_next::Transport,
5423{
5424    async fn start(
5425        &mut self,
5426
5427        request: ::fidl_next::Request<driver::Start, ___T>,
5428
5429        responder: ::fidl_next::Responder<driver::Start, ___T>,
5430    ) {
5431        ___H::start(&mut self.0, request, responder).await
5432    }
5433
5434    async fn stop(&mut self) {
5435        ___H::stop(&mut self.0).await
5436    }
5437
5438    async fn suspend(&mut self, responder: ::fidl_next::Responder<driver::Suspend, ___T>) {
5439        ___H::suspend(&mut self.0, responder).await
5440    }
5441
5442    async fn resume(
5443        &mut self,
5444
5445        request: ::fidl_next::Request<driver::Resume, ___T>,
5446
5447        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5448    ) {
5449        ___H::resume(&mut self.0, request, responder).await
5450    }
5451
5452    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5453        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5454    }
5455}
5456
5457/// The type corresponding to the Node protocol.
5458#[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"]
5459#[derive(PartialEq, Debug)]
5460pub struct Node;
5461
5462#[cfg(target_os = "fuchsia")]
5463impl ::fidl_next::HasTransport for Node {
5464    type Transport = ::fidl_next::fuchsia::zx::Channel;
5465}
5466
5467pub mod node {
5468    pub mod prelude {
5469        pub use crate::{
5470            Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
5471            NodeServerHandler, node,
5472        };
5473
5474        pub use crate::natural::NodeAddChildRequest;
5475
5476        pub use crate::natural::NodeError;
5477
5478        pub use crate::natural::NodeProvideResourceRequest;
5479
5480        pub use crate::natural::NodeAddChildResponse;
5481
5482        pub use crate::natural::NodeProvideResourceResponse;
5483    }
5484
5485    pub struct AddChild;
5486
5487    impl ::fidl_next::Method for AddChild {
5488        const ORDINAL: u64 = 8633697350522413353;
5489        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5490            ::fidl_next::protocol::Flexibility::Flexible;
5491
5492        type Protocol = crate::Node;
5493
5494        type Request = crate::wire::NodeAddChildRequest<'static>;
5495    }
5496
5497    impl ::fidl_next::TwoWayMethod for AddChild {
5498        type Response = ::fidl_next::wire::Result<
5499            'static,
5500            crate::wire::NodeAddChildResponse,
5501            crate::wire::NodeError,
5502        >;
5503    }
5504
5505    impl<___R> ::fidl_next::Respond<___R> for AddChild {
5506        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5507
5508        fn respond(response: ___R) -> Self::Output {
5509            ::core::result::Result::Ok(response)
5510        }
5511    }
5512
5513    impl<___R> ::fidl_next::RespondErr<___R> for AddChild {
5514        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5515
5516        fn respond_err(response: ___R) -> Self::Output {
5517            ::core::result::Result::Err(response)
5518        }
5519    }
5520
5521    pub struct ProvideResource;
5522
5523    impl ::fidl_next::Method for ProvideResource {
5524        const ORDINAL: u64 = 3144824145393523406;
5525        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5526            ::fidl_next::protocol::Flexibility::Flexible;
5527
5528        type Protocol = crate::Node;
5529
5530        type Request = crate::wire::NodeProvideResourceRequest<'static>;
5531    }
5532
5533    impl ::fidl_next::TwoWayMethod for ProvideResource {
5534        type Response = ::fidl_next::wire::Result<
5535            'static,
5536            crate::wire::NodeProvideResourceResponse,
5537            crate::wire::NodeError,
5538        >;
5539    }
5540
5541    impl<___R> ::fidl_next::Respond<___R> for ProvideResource {
5542        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5543
5544        fn respond(response: ___R) -> Self::Output {
5545            ::core::result::Result::Ok(response)
5546        }
5547    }
5548
5549    impl<___R> ::fidl_next::RespondErr<___R> for ProvideResource {
5550        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5551
5552        fn respond_err(response: ___R) -> Self::Output {
5553            ::core::result::Result::Err(response)
5554        }
5555    }
5556
5557    mod ___detail {
5558        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
5559        where
5560            ___T: ::fidl_next::Transport,
5561        {
5562            type Client = NodeClient<___T>;
5563            type Server = NodeServer<___T>;
5564        }
5565
5566        /// The client for the `Node` protocol.
5567        #[repr(transparent)]
5568        pub struct NodeClient<___T: ::fidl_next::Transport> {
5569            #[allow(dead_code)]
5570            client: ::fidl_next::protocol::Client<___T>,
5571        }
5572
5573        impl<___T> NodeClient<___T>
5574        where
5575            ___T: ::fidl_next::Transport,
5576        {
5577            #[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"]
5578            pub fn add_child(
5579                &self,
5580
5581                args: impl ::fidl_next::Encode<
5582                    crate::wire::NodeAddArgs<'static>,
5583                    <___T as ::fidl_next::Transport>::SendBuffer,
5584                >,
5585
5586                controller: impl ::fidl_next::Encode<
5587                    ::fidl_next::ServerEnd<
5588                        crate::NodeController,
5589                        ::fidl_next::wire::fuchsia::Channel,
5590                    >,
5591                    <___T as ::fidl_next::Transport>::SendBuffer,
5592                >,
5593
5594                node: impl ::fidl_next::Encode<
5595                    ::fidl_next::ServerEnd<
5596                        crate::Node,
5597                        ::fidl_next::wire::fuchsia::OptionalChannel,
5598                    >,
5599                    <___T as ::fidl_next::Transport>::SendBuffer,
5600                >,
5601            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5602            where
5603                <___T as ::fidl_next::Transport>::SendBuffer:
5604                    ::fidl_next::encoder::InternalHandleEncoder,
5605                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5606                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5607            {
5608                self.add_child_with(crate::generic::NodeAddChildRequest { args, controller, node })
5609            }
5610
5611            #[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"]
5612            pub fn add_child_with<___R>(
5613                &self,
5614                request: ___R,
5615            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5616            where
5617                ___R: ::fidl_next::Encode<
5618                        crate::wire::NodeAddChildRequest<'static>,
5619                        <___T as ::fidl_next::Transport>::SendBuffer,
5620                    >,
5621            {
5622                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5623                    8633697350522413353,
5624                    <super::AddChild as ::fidl_next::Method>::FLEXIBILITY,
5625                    request,
5626                ))
5627            }
5628
5629            #[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"]
5630            pub fn provide_resource(
5631                &self,
5632
5633                resource: impl ::fidl_next::Encode<
5634                    crate::wire::ResourceArgs<'static>,
5635                    <___T as ::fidl_next::Transport>::SendBuffer,
5636                >,
5637
5638                controller: impl ::fidl_next::Encode<
5639                    ::fidl_next::ServerEnd<
5640                        crate::ResourceController,
5641                        ::fidl_next::wire::fuchsia::Channel,
5642                    >,
5643                    <___T as ::fidl_next::Transport>::SendBuffer,
5644                >,
5645            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5646            where
5647                <___T as ::fidl_next::Transport>::SendBuffer:
5648                    ::fidl_next::encoder::InternalHandleEncoder,
5649                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5650                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5651            {
5652                self.provide_resource_with(crate::generic::NodeProvideResourceRequest {
5653                    resource,
5654
5655                    controller,
5656                })
5657            }
5658
5659            #[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"]
5660            pub fn provide_resource_with<___R>(
5661                &self,
5662                request: ___R,
5663            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5664            where
5665                ___R: ::fidl_next::Encode<
5666                        crate::wire::NodeProvideResourceRequest<'static>,
5667                        <___T as ::fidl_next::Transport>::SendBuffer,
5668                    >,
5669            {
5670                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5671                    3144824145393523406,
5672                    <super::ProvideResource as ::fidl_next::Method>::FLEXIBILITY,
5673                    request,
5674                ))
5675            }
5676        }
5677
5678        /// The server for the `Node` protocol.
5679        #[repr(transparent)]
5680        pub struct NodeServer<___T: ::fidl_next::Transport> {
5681            server: ::fidl_next::protocol::Server<___T>,
5682        }
5683
5684        impl<___T> NodeServer<___T> where ___T: ::fidl_next::Transport {}
5685    }
5686}
5687
5688#[diagnostic::on_unimplemented(
5689    note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5690)]
5691
5692/// A client handler for the Node protocol.
5693///
5694/// See [`Node`] for more details.
5695pub trait NodeLocalClientHandler<
5696    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5697    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5698>
5699{
5700    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5701        ::core::future::ready(())
5702    }
5703}
5704
5705impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
5706where
5707    ___H: NodeLocalClientHandler<___T>,
5708    ___T: ::fidl_next::Transport,
5709{
5710    async fn on_event(
5711        handler: &mut ___H,
5712        mut message: ::fidl_next::Message<___T>,
5713    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5714        match *message.header().ordinal {
5715            ordinal => {
5716                handler.on_unknown_interaction(ordinal).await;
5717                if ::core::matches!(
5718                    message.header().flexibility(),
5719                    ::fidl_next::protocol::Flexibility::Strict
5720                ) {
5721                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5722                } else {
5723                    Ok(())
5724                }
5725            }
5726        }
5727    }
5728}
5729
5730#[diagnostic::on_unimplemented(
5731    note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5732)]
5733
5734/// A server handler for the Node protocol.
5735///
5736/// See [`Node`] for more details.
5737pub trait NodeLocalServerHandler<
5738    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5739    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5740>
5741{
5742    #[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"]
5743    fn add_child(
5744        &mut self,
5745
5746        request: ::fidl_next::Request<node::AddChild, ___T>,
5747
5748        responder: ::fidl_next::Responder<node::AddChild, ___T>,
5749    ) -> impl ::core::future::Future<Output = ()>;
5750
5751    #[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"]
5752    fn provide_resource(
5753        &mut self,
5754
5755        request: ::fidl_next::Request<node::ProvideResource, ___T>,
5756
5757        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
5758    ) -> impl ::core::future::Future<Output = ()>;
5759
5760    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5761        ::core::future::ready(())
5762    }
5763}
5764
5765impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
5766where
5767    ___H: NodeLocalServerHandler<___T>,
5768    ___T: ::fidl_next::Transport,
5769    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
5770            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5771            Constraint = (),
5772        >,
5773    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
5774            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5775            Constraint = (),
5776        >,
5777{
5778    async fn on_one_way(
5779        handler: &mut ___H,
5780        mut message: ::fidl_next::Message<___T>,
5781    ) -> ::core::result::Result<
5782        (),
5783        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5784    > {
5785        match *message.header().ordinal {
5786            ordinal => {
5787                handler.on_unknown_interaction(ordinal).await;
5788                if ::core::matches!(
5789                    message.header().flexibility(),
5790                    ::fidl_next::protocol::Flexibility::Strict
5791                ) {
5792                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5793                } else {
5794                    Ok(())
5795                }
5796            }
5797        }
5798    }
5799
5800    async fn on_two_way(
5801        handler: &mut ___H,
5802        mut message: ::fidl_next::Message<___T>,
5803        responder: ::fidl_next::protocol::Responder<___T>,
5804    ) -> ::core::result::Result<
5805        (),
5806        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5807    > {
5808        match *message.header().ordinal {
5809            8633697350522413353 => {
5810                let responder = ::fidl_next::Responder::from_untyped(responder);
5811
5812                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5813                    Ok(decoded) => {
5814                        handler
5815                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
5816                            .await;
5817                        Ok(())
5818                    }
5819                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5820                        ordinal: 8633697350522413353,
5821                        error,
5822                    }),
5823                }
5824            }
5825
5826            3144824145393523406 => {
5827                let responder = ::fidl_next::Responder::from_untyped(responder);
5828
5829                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5830                    Ok(decoded) => {
5831                        handler
5832                            .provide_resource(
5833                                ::fidl_next::Request::from_decoded(decoded),
5834                                responder,
5835                            )
5836                            .await;
5837                        Ok(())
5838                    }
5839                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5840                        ordinal: 3144824145393523406,
5841                        error,
5842                    }),
5843                }
5844            }
5845
5846            ordinal => {
5847                handler.on_unknown_interaction(ordinal).await;
5848                if ::core::matches!(
5849                    message.header().flexibility(),
5850                    ::fidl_next::protocol::Flexibility::Strict
5851                ) {
5852                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5853                } else {
5854                    responder
5855                        .respond_framework_error(
5856                            ordinal,
5857                            ::fidl_next::FrameworkError::UnknownMethod,
5858                        )
5859                        .expect("encoding a framework error should never fail")
5860                        .await?;
5861                    Ok(())
5862                }
5863            }
5864        }
5865    }
5866}
5867
5868/// A client handler for the Node protocol.
5869///
5870/// See [`Node`] for more details.
5871pub trait NodeClientHandler<
5872    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5873    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5874>
5875{
5876    fn on_unknown_interaction(
5877        &mut self,
5878        ordinal: u64,
5879    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5880        ::core::future::ready(())
5881    }
5882}
5883
5884impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
5885where
5886    ___H: NodeClientHandler<___T> + ::core::marker::Send,
5887    ___T: ::fidl_next::Transport,
5888{
5889    async fn on_event(
5890        handler: &mut ___H,
5891        mut message: ::fidl_next::Message<___T>,
5892    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5893        match *message.header().ordinal {
5894            ordinal => {
5895                handler.on_unknown_interaction(ordinal).await;
5896                if ::core::matches!(
5897                    message.header().flexibility(),
5898                    ::fidl_next::protocol::Flexibility::Strict
5899                ) {
5900                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5901                } else {
5902                    Ok(())
5903                }
5904            }
5905        }
5906    }
5907}
5908
5909/// A server handler for the Node protocol.
5910///
5911/// See [`Node`] for more details.
5912pub trait NodeServerHandler<
5913    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5914    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5915>
5916{
5917    #[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"]
5918    fn add_child(
5919        &mut self,
5920
5921        request: ::fidl_next::Request<node::AddChild, ___T>,
5922
5923        responder: ::fidl_next::Responder<node::AddChild, ___T>,
5924    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5925
5926    #[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"]
5927    fn provide_resource(
5928        &mut self,
5929
5930        request: ::fidl_next::Request<node::ProvideResource, ___T>,
5931
5932        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
5933    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5934
5935    fn on_unknown_interaction(
5936        &mut self,
5937        ordinal: u64,
5938    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5939        ::core::future::ready(())
5940    }
5941}
5942
5943impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
5944where
5945    ___H: NodeServerHandler<___T> + ::core::marker::Send,
5946    ___T: ::fidl_next::Transport,
5947    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
5948            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5949            Constraint = (),
5950        >,
5951    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
5952            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5953            Constraint = (),
5954        >,
5955{
5956    async fn on_one_way(
5957        handler: &mut ___H,
5958        mut message: ::fidl_next::Message<___T>,
5959    ) -> ::core::result::Result<
5960        (),
5961        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5962    > {
5963        match *message.header().ordinal {
5964            ordinal => {
5965                handler.on_unknown_interaction(ordinal).await;
5966                if ::core::matches!(
5967                    message.header().flexibility(),
5968                    ::fidl_next::protocol::Flexibility::Strict
5969                ) {
5970                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5971                } else {
5972                    Ok(())
5973                }
5974            }
5975        }
5976    }
5977
5978    async fn on_two_way(
5979        handler: &mut ___H,
5980        mut message: ::fidl_next::Message<___T>,
5981        responder: ::fidl_next::protocol::Responder<___T>,
5982    ) -> ::core::result::Result<
5983        (),
5984        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5985    > {
5986        match *message.header().ordinal {
5987            8633697350522413353 => {
5988                let responder = ::fidl_next::Responder::from_untyped(responder);
5989
5990                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5991                    Ok(decoded) => {
5992                        handler
5993                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
5994                            .await;
5995                        Ok(())
5996                    }
5997                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5998                        ordinal: 8633697350522413353,
5999                        error,
6000                    }),
6001                }
6002            }
6003
6004            3144824145393523406 => {
6005                let responder = ::fidl_next::Responder::from_untyped(responder);
6006
6007                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6008                    Ok(decoded) => {
6009                        handler
6010                            .provide_resource(
6011                                ::fidl_next::Request::from_decoded(decoded),
6012                                responder,
6013                            )
6014                            .await;
6015                        Ok(())
6016                    }
6017                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6018                        ordinal: 3144824145393523406,
6019                        error,
6020                    }),
6021                }
6022            }
6023
6024            ordinal => {
6025                handler.on_unknown_interaction(ordinal).await;
6026                if ::core::matches!(
6027                    message.header().flexibility(),
6028                    ::fidl_next::protocol::Flexibility::Strict
6029                ) {
6030                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6031                } else {
6032                    responder
6033                        .respond_framework_error(
6034                            ordinal,
6035                            ::fidl_next::FrameworkError::UnknownMethod,
6036                        )
6037                        .expect("encoding a framework error should never fail")
6038                        .await?;
6039                    Ok(())
6040                }
6041            }
6042        }
6043    }
6044}
6045
6046impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
6047where
6048    ___T: ::fidl_next::Transport,
6049{
6050    async fn on_unknown_interaction(&mut self, _: u64) {}
6051}
6052
6053impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
6054where
6055    ___H: NodeClientHandler<___T>,
6056    ___T: ::fidl_next::Transport,
6057{
6058    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6059        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6060    }
6061}
6062
6063impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
6064where
6065    ___H: NodeServerHandler<___T>,
6066    ___T: ::fidl_next::Transport,
6067{
6068    async fn add_child(
6069        &mut self,
6070
6071        request: ::fidl_next::Request<node::AddChild, ___T>,
6072
6073        responder: ::fidl_next::Responder<node::AddChild, ___T>,
6074    ) {
6075        ___H::add_child(&mut self.0, request, responder).await
6076    }
6077
6078    async fn provide_resource(
6079        &mut self,
6080
6081        request: ::fidl_next::Request<node::ProvideResource, ___T>,
6082
6083        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
6084    ) {
6085        ___H::provide_resource(&mut self.0, request, responder).await
6086    }
6087
6088    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6089        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6090    }
6091}
6092
6093/// The type corresponding to the NodeController protocol.
6094#[doc = " Protocol through which a parent node controls one of its children.\n"]
6095#[derive(PartialEq, Debug)]
6096pub struct NodeController;
6097
6098#[cfg(target_os = "fuchsia")]
6099impl ::fidl_next::HasTransport for NodeController {
6100    type Transport = ::fidl_next::fuchsia::zx::Channel;
6101}
6102
6103pub mod node_controller {
6104    pub mod prelude {
6105        pub use crate::{
6106            NodeController, NodeControllerClientHandler, NodeControllerLocalClientHandler,
6107            NodeControllerLocalServerHandler, NodeControllerServerHandler, node_controller,
6108        };
6109
6110        pub use crate::natural::DriverResult;
6111
6112        pub use crate::natural::NodeControllerOnBindRequest;
6113
6114        pub use crate::natural::NodeControllerRequestBindRequest;
6115
6116        pub use crate::natural::NodeControllerRequestBindResponse;
6117    }
6118
6119    pub struct Remove;
6120
6121    impl ::fidl_next::Method for Remove {
6122        const ORDINAL: u64 = 6123359741742396225;
6123        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6124            ::fidl_next::protocol::Flexibility::Flexible;
6125
6126        type Protocol = crate::NodeController;
6127
6128        type Request = ::fidl_next::wire::EmptyMessageBody;
6129    }
6130
6131    pub struct RequestBind;
6132
6133    impl ::fidl_next::Method for RequestBind {
6134        const ORDINAL: u64 = 4735909333556220047;
6135        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6136            ::fidl_next::protocol::Flexibility::Flexible;
6137
6138        type Protocol = crate::NodeController;
6139
6140        type Request = crate::wire::NodeControllerRequestBindRequest<'static>;
6141    }
6142
6143    impl ::fidl_next::TwoWayMethod for RequestBind {
6144        type Response = ::fidl_next::wire::Result<
6145            'static,
6146            crate::wire::NodeControllerRequestBindResponse,
6147            ::fidl_next::wire::fuchsia::Status,
6148        >;
6149    }
6150
6151    impl<___R> ::fidl_next::Respond<___R> for RequestBind {
6152        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6153
6154        fn respond(response: ___R) -> Self::Output {
6155            ::core::result::Result::Ok(response)
6156        }
6157    }
6158
6159    impl<___R> ::fidl_next::RespondErr<___R> for RequestBind {
6160        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6161
6162        fn respond_err(response: ___R) -> Self::Output {
6163            ::core::result::Result::Err(response)
6164        }
6165    }
6166
6167    pub struct OnBind;
6168
6169    impl ::fidl_next::Method for OnBind {
6170        const ORDINAL: u64 = 5905369594807853098;
6171        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6172            ::fidl_next::protocol::Flexibility::Flexible;
6173
6174        type Protocol = crate::NodeController;
6175
6176        type Request = crate::wire::NodeControllerOnBindRequest<'static>;
6177    }
6178
6179    pub struct WaitForDriver;
6180
6181    impl ::fidl_next::Method for WaitForDriver {
6182        const ORDINAL: u64 = 7635589759067755399;
6183        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6184            ::fidl_next::protocol::Flexibility::Flexible;
6185
6186        type Protocol = crate::NodeController;
6187
6188        type Request = ::fidl_next::wire::EmptyMessageBody;
6189    }
6190
6191    impl ::fidl_next::TwoWayMethod for WaitForDriver {
6192        type Response = ::fidl_next::wire::Result<
6193            'static,
6194            crate::wire::DriverResult<'static>,
6195            ::fidl_next::wire::fuchsia::Status,
6196        >;
6197    }
6198
6199    impl<___R> ::fidl_next::Respond<___R> for WaitForDriver {
6200        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6201
6202        fn respond(response: ___R) -> Self::Output {
6203            ::core::result::Result::Ok(response)
6204        }
6205    }
6206
6207    impl<___R> ::fidl_next::RespondErr<___R> for WaitForDriver {
6208        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6209
6210        fn respond_err(response: ___R) -> Self::Output {
6211            ::core::result::Result::Err(response)
6212        }
6213    }
6214
6215    mod ___detail {
6216        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeController
6217        where
6218            ___T: ::fidl_next::Transport,
6219        {
6220            type Client = NodeControllerClient<___T>;
6221            type Server = NodeControllerServer<___T>;
6222        }
6223
6224        /// The client for the `NodeController` protocol.
6225        #[repr(transparent)]
6226        pub struct NodeControllerClient<___T: ::fidl_next::Transport> {
6227            #[allow(dead_code)]
6228            client: ::fidl_next::protocol::Client<___T>,
6229        }
6230
6231        impl<___T> NodeControllerClient<___T>
6232        where
6233            ___T: ::fidl_next::Transport,
6234        {
6235            #[doc = " Removes the node and all of its children.\n"]
6236            pub fn remove(&self) -> ::fidl_next::SendFuture<'_, ___T> {
6237                ::fidl_next::SendFuture::from_untyped(
6238                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
6239                        6123359741742396225,
6240                        <super::Remove as ::fidl_next::Method>::FLEXIBILITY,
6241                        (),
6242                    ),
6243                )
6244            }
6245
6246            #[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"]
6247            pub fn request_bind_with<___R>(
6248                &self,
6249                request: ___R,
6250            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestBind, ___T>
6251            where
6252                ___R: ::fidl_next::Encode<
6253                        crate::wire::NodeControllerRequestBindRequest<'static>,
6254                        <___T as ::fidl_next::Transport>::SendBuffer,
6255                    >,
6256            {
6257                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6258                    4735909333556220047,
6259                    <super::RequestBind as ::fidl_next::Method>::FLEXIBILITY,
6260                    request,
6261                ))
6262            }
6263
6264            #[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"]
6265            pub fn wait_for_driver(
6266                &self,
6267            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForDriver, ___T> {
6268                ::fidl_next::TwoWayFuture::from_untyped(
6269                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6270                        7635589759067755399,
6271                        <super::WaitForDriver as ::fidl_next::Method>::FLEXIBILITY,
6272                        (),
6273                    ),
6274                )
6275            }
6276        }
6277
6278        /// The server for the `NodeController` protocol.
6279        #[repr(transparent)]
6280        pub struct NodeControllerServer<___T: ::fidl_next::Transport> {
6281            server: ::fidl_next::protocol::Server<___T>,
6282        }
6283
6284        impl<___T> NodeControllerServer<___T>
6285        where
6286            ___T: ::fidl_next::Transport,
6287        {
6288            #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6289
6290            pub fn on_bind_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6291            where
6292                ___R: ::fidl_next::Encode<
6293                        <super::OnBind as ::fidl_next::Method>::Request,
6294                        <___T as ::fidl_next::Transport>::SendBuffer,
6295                    >,
6296            {
6297                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6298                    5905369594807853098,
6299                    <super::OnBind as ::fidl_next::Method>::FLEXIBILITY,
6300                    request,
6301                ))
6302            }
6303        }
6304    }
6305}
6306
6307#[diagnostic::on_unimplemented(
6308    note = "If {Self} implements the non-local NodeControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6309)]
6310
6311/// A client handler for the NodeController protocol.
6312///
6313/// See [`NodeController`] for more details.
6314pub trait NodeControllerLocalClientHandler<
6315    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6316    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6317>
6318{
6319    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6320    fn on_bind(
6321        &mut self,
6322
6323        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6324    ) -> impl ::core::future::Future<Output = ()>;
6325
6326    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6327        ::core::future::ready(())
6328    }
6329}
6330
6331impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeController
6332where
6333    ___H: NodeControllerLocalClientHandler<___T>,
6334    ___T: ::fidl_next::Transport,
6335    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6336            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6337            Constraint = (),
6338        >,
6339{
6340    async fn on_event(
6341        handler: &mut ___H,
6342        mut message: ::fidl_next::Message<___T>,
6343    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6344        match *message.header().ordinal {
6345            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6346                Ok(decoded) => {
6347                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6348                    Ok(())
6349                }
6350                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6351                    ordinal: 5905369594807853098,
6352                    error,
6353                }),
6354            },
6355
6356            ordinal => {
6357                handler.on_unknown_interaction(ordinal).await;
6358                if ::core::matches!(
6359                    message.header().flexibility(),
6360                    ::fidl_next::protocol::Flexibility::Strict
6361                ) {
6362                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6363                } else {
6364                    Ok(())
6365                }
6366            }
6367        }
6368    }
6369}
6370
6371#[diagnostic::on_unimplemented(
6372    note = "If {Self} implements the non-local NodeControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6373)]
6374
6375/// A server handler for the NodeController protocol.
6376///
6377/// See [`NodeController`] for more details.
6378pub trait NodeControllerLocalServerHandler<
6379    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6380    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6381>
6382{
6383    #[doc = " Removes the node and all of its children.\n"]
6384    fn remove(&mut self) -> impl ::core::future::Future<Output = ()>;
6385
6386    #[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"]
6387    fn request_bind(
6388        &mut self,
6389
6390        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6391
6392        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6393    ) -> impl ::core::future::Future<Output = ()>;
6394
6395    #[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"]
6396    fn wait_for_driver(
6397        &mut self,
6398
6399        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6400    ) -> impl ::core::future::Future<Output = ()>;
6401
6402    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6403        ::core::future::ready(())
6404    }
6405}
6406
6407impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeController
6408where
6409    ___H: NodeControllerLocalServerHandler<___T>,
6410    ___T: ::fidl_next::Transport,
6411    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6412            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6413            Constraint = (),
6414        >,
6415{
6416    async fn on_one_way(
6417        handler: &mut ___H,
6418        mut message: ::fidl_next::Message<___T>,
6419    ) -> ::core::result::Result<
6420        (),
6421        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6422    > {
6423        match *message.header().ordinal {
6424            6123359741742396225 => {
6425                handler.remove().await;
6426                Ok(())
6427            }
6428
6429            ordinal => {
6430                handler.on_unknown_interaction(ordinal).await;
6431                if ::core::matches!(
6432                    message.header().flexibility(),
6433                    ::fidl_next::protocol::Flexibility::Strict
6434                ) {
6435                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6436                } else {
6437                    Ok(())
6438                }
6439            }
6440        }
6441    }
6442
6443    async fn on_two_way(
6444        handler: &mut ___H,
6445        mut message: ::fidl_next::Message<___T>,
6446        responder: ::fidl_next::protocol::Responder<___T>,
6447    ) -> ::core::result::Result<
6448        (),
6449        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6450    > {
6451        match *message.header().ordinal {
6452            4735909333556220047 => {
6453                let responder = ::fidl_next::Responder::from_untyped(responder);
6454
6455                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6456                    Ok(decoded) => {
6457                        handler
6458                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6459                            .await;
6460                        Ok(())
6461                    }
6462                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6463                        ordinal: 4735909333556220047,
6464                        error,
6465                    }),
6466                }
6467            }
6468
6469            7635589759067755399 => {
6470                let responder = ::fidl_next::Responder::from_untyped(responder);
6471
6472                handler.wait_for_driver(responder).await;
6473                Ok(())
6474            }
6475
6476            ordinal => {
6477                handler.on_unknown_interaction(ordinal).await;
6478                if ::core::matches!(
6479                    message.header().flexibility(),
6480                    ::fidl_next::protocol::Flexibility::Strict
6481                ) {
6482                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6483                } else {
6484                    responder
6485                        .respond_framework_error(
6486                            ordinal,
6487                            ::fidl_next::FrameworkError::UnknownMethod,
6488                        )
6489                        .expect("encoding a framework error should never fail")
6490                        .await?;
6491                    Ok(())
6492                }
6493            }
6494        }
6495    }
6496}
6497
6498/// A client handler for the NodeController protocol.
6499///
6500/// See [`NodeController`] for more details.
6501pub trait NodeControllerClientHandler<
6502    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6503    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6504>
6505{
6506    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6507    fn on_bind(
6508        &mut self,
6509
6510        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6511    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6512
6513    fn on_unknown_interaction(
6514        &mut self,
6515        ordinal: u64,
6516    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6517        ::core::future::ready(())
6518    }
6519}
6520
6521impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeController
6522where
6523    ___H: NodeControllerClientHandler<___T> + ::core::marker::Send,
6524    ___T: ::fidl_next::Transport,
6525    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6526            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6527            Constraint = (),
6528        >,
6529{
6530    async fn on_event(
6531        handler: &mut ___H,
6532        mut message: ::fidl_next::Message<___T>,
6533    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6534        match *message.header().ordinal {
6535            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6536                Ok(decoded) => {
6537                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6538                    Ok(())
6539                }
6540                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6541                    ordinal: 5905369594807853098,
6542                    error,
6543                }),
6544            },
6545
6546            ordinal => {
6547                handler.on_unknown_interaction(ordinal).await;
6548                if ::core::matches!(
6549                    message.header().flexibility(),
6550                    ::fidl_next::protocol::Flexibility::Strict
6551                ) {
6552                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6553                } else {
6554                    Ok(())
6555                }
6556            }
6557        }
6558    }
6559}
6560
6561/// A server handler for the NodeController protocol.
6562///
6563/// See [`NodeController`] for more details.
6564pub trait NodeControllerServerHandler<
6565    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6566    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6567>
6568{
6569    #[doc = " Removes the node and all of its children.\n"]
6570    fn remove(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6571
6572    #[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"]
6573    fn request_bind(
6574        &mut self,
6575
6576        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6577
6578        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6579    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6580
6581    #[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"]
6582    fn wait_for_driver(
6583        &mut self,
6584
6585        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6586    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6587
6588    fn on_unknown_interaction(
6589        &mut self,
6590        ordinal: u64,
6591    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6592        ::core::future::ready(())
6593    }
6594}
6595
6596impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeController
6597where
6598    ___H: NodeControllerServerHandler<___T> + ::core::marker::Send,
6599    ___T: ::fidl_next::Transport,
6600    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6601            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6602            Constraint = (),
6603        >,
6604{
6605    async fn on_one_way(
6606        handler: &mut ___H,
6607        mut message: ::fidl_next::Message<___T>,
6608    ) -> ::core::result::Result<
6609        (),
6610        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6611    > {
6612        match *message.header().ordinal {
6613            6123359741742396225 => {
6614                handler.remove().await;
6615                Ok(())
6616            }
6617
6618            ordinal => {
6619                handler.on_unknown_interaction(ordinal).await;
6620                if ::core::matches!(
6621                    message.header().flexibility(),
6622                    ::fidl_next::protocol::Flexibility::Strict
6623                ) {
6624                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6625                } else {
6626                    Ok(())
6627                }
6628            }
6629        }
6630    }
6631
6632    async fn on_two_way(
6633        handler: &mut ___H,
6634        mut message: ::fidl_next::Message<___T>,
6635        responder: ::fidl_next::protocol::Responder<___T>,
6636    ) -> ::core::result::Result<
6637        (),
6638        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6639    > {
6640        match *message.header().ordinal {
6641            4735909333556220047 => {
6642                let responder = ::fidl_next::Responder::from_untyped(responder);
6643
6644                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6645                    Ok(decoded) => {
6646                        handler
6647                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6648                            .await;
6649                        Ok(())
6650                    }
6651                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6652                        ordinal: 4735909333556220047,
6653                        error,
6654                    }),
6655                }
6656            }
6657
6658            7635589759067755399 => {
6659                let responder = ::fidl_next::Responder::from_untyped(responder);
6660
6661                handler.wait_for_driver(responder).await;
6662                Ok(())
6663            }
6664
6665            ordinal => {
6666                handler.on_unknown_interaction(ordinal).await;
6667                if ::core::matches!(
6668                    message.header().flexibility(),
6669                    ::fidl_next::protocol::Flexibility::Strict
6670                ) {
6671                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6672                } else {
6673                    responder
6674                        .respond_framework_error(
6675                            ordinal,
6676                            ::fidl_next::FrameworkError::UnknownMethod,
6677                        )
6678                        .expect("encoding a framework error should never fail")
6679                        .await?;
6680                    Ok(())
6681                }
6682            }
6683        }
6684    }
6685}
6686
6687impl<___T> NodeControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
6688where
6689    ___T: ::fidl_next::Transport,
6690{
6691    async fn on_bind(&mut self, _: ::fidl_next::Request<node_controller::OnBind, ___T>) {}
6692
6693    async fn on_unknown_interaction(&mut self, _: u64) {}
6694}
6695
6696impl<___H, ___T> NodeControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
6697where
6698    ___H: NodeControllerClientHandler<___T>,
6699    ___T: ::fidl_next::Transport,
6700{
6701    async fn on_bind(&mut self, request: ::fidl_next::Request<node_controller::OnBind, ___T>) {
6702        ___H::on_bind(&mut self.0, request).await
6703    }
6704
6705    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6706        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6707    }
6708}
6709
6710impl<___H, ___T> NodeControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
6711where
6712    ___H: NodeControllerServerHandler<___T>,
6713    ___T: ::fidl_next::Transport,
6714{
6715    async fn remove(&mut self) {
6716        ___H::remove(&mut self.0).await
6717    }
6718
6719    async fn request_bind(
6720        &mut self,
6721
6722        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6723
6724        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6725    ) {
6726        ___H::request_bind(&mut self.0, request, responder).await
6727    }
6728
6729    async fn wait_for_driver(
6730        &mut self,
6731
6732        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6733    ) {
6734        ___H::wait_for_driver(&mut self.0, responder).await
6735    }
6736
6737    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6738        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6739    }
6740}
6741
6742/// The type corresponding to the NodeManager protocol.
6743#[doc = " Protocol through which a client can add a Node2 to the driver topology.\n"]
6744#[derive(PartialEq, Debug)]
6745pub struct NodeManager;
6746
6747impl ::fidl_next::Discoverable for NodeManager {
6748    const PROTOCOL_NAME: &'static str = "fuchsia.driver.framework.NodeManager";
6749}
6750
6751#[cfg(target_os = "fuchsia")]
6752impl ::fidl_next::HasTransport for NodeManager {
6753    type Transport = ::fidl_next::fuchsia::zx::Channel;
6754}
6755
6756pub mod node_manager {
6757    pub mod prelude {
6758        pub use crate::{
6759            NodeManager, NodeManagerClientHandler, NodeManagerLocalClientHandler,
6760            NodeManagerLocalServerHandler, NodeManagerServerHandler, node_manager,
6761        };
6762
6763        pub use crate::natural::NodeError;
6764
6765        pub use crate::natural::NodeManagerAddNodeRequest;
6766
6767        pub use crate::natural::NodeManagerAddNodeResponse;
6768    }
6769
6770    pub struct AddNode;
6771
6772    impl ::fidl_next::Method for AddNode {
6773        const ORDINAL: u64 = 8180576435965990653;
6774        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6775            ::fidl_next::protocol::Flexibility::Flexible;
6776
6777        type Protocol = crate::NodeManager;
6778
6779        type Request = crate::wire::NodeManagerAddNodeRequest<'static>;
6780    }
6781
6782    impl ::fidl_next::TwoWayMethod for AddNode {
6783        type Response = ::fidl_next::wire::Result<
6784            'static,
6785            crate::wire::NodeManagerAddNodeResponse,
6786            crate::wire::NodeError,
6787        >;
6788    }
6789
6790    impl<___R> ::fidl_next::Respond<___R> for AddNode {
6791        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6792
6793        fn respond(response: ___R) -> Self::Output {
6794            ::core::result::Result::Ok(response)
6795        }
6796    }
6797
6798    impl<___R> ::fidl_next::RespondErr<___R> for AddNode {
6799        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6800
6801        fn respond_err(response: ___R) -> Self::Output {
6802            ::core::result::Result::Err(response)
6803        }
6804    }
6805
6806    mod ___detail {
6807        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeManager
6808        where
6809            ___T: ::fidl_next::Transport,
6810        {
6811            type Client = NodeManagerClient<___T>;
6812            type Server = NodeManagerServer<___T>;
6813        }
6814
6815        /// The client for the `NodeManager` protocol.
6816        #[repr(transparent)]
6817        pub struct NodeManagerClient<___T: ::fidl_next::Transport> {
6818            #[allow(dead_code)]
6819            client: ::fidl_next::protocol::Client<___T>,
6820        }
6821
6822        impl<___T> NodeManagerClient<___T>
6823        where
6824            ___T: ::fidl_next::Transport,
6825        {
6826            #[doc = " Adds a Node2 to the driver framework.\n"]
6827            pub fn add_node(
6828                &self,
6829
6830                node: impl ::fidl_next::Encode<
6831                    crate::wire::Node2<'static>,
6832                    <___T as ::fidl_next::Transport>::SendBuffer,
6833                >,
6834
6835                controller: impl ::fidl_next::Encode<
6836                    ::fidl_next::ServerEnd<
6837                        crate::NodeController,
6838                        ::fidl_next::wire::fuchsia::Channel,
6839                    >,
6840                    <___T as ::fidl_next::Transport>::SendBuffer,
6841                >,
6842
6843                node_ref: impl ::fidl_next::Encode<
6844                    ::fidl_next::ServerEnd<
6845                        crate::Node,
6846                        ::fidl_next::wire::fuchsia::OptionalChannel,
6847                    >,
6848                    <___T as ::fidl_next::Transport>::SendBuffer,
6849                >,
6850            ) -> ::fidl_next::TwoWayFuture<'_, super::AddNode, ___T>
6851            where
6852                <___T as ::fidl_next::Transport>::SendBuffer:
6853                    ::fidl_next::encoder::InternalHandleEncoder,
6854                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6855                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6856            {
6857                self.add_node_with(crate::generic::NodeManagerAddNodeRequest {
6858                    node,
6859
6860                    controller,
6861
6862                    node_ref,
6863                })
6864            }
6865
6866            #[doc = " Adds a Node2 to the driver framework.\n"]
6867            pub fn add_node_with<___R>(
6868                &self,
6869                request: ___R,
6870            ) -> ::fidl_next::TwoWayFuture<'_, super::AddNode, ___T>
6871            where
6872                ___R: ::fidl_next::Encode<
6873                        crate::wire::NodeManagerAddNodeRequest<'static>,
6874                        <___T as ::fidl_next::Transport>::SendBuffer,
6875                    >,
6876            {
6877                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6878                    8180576435965990653,
6879                    <super::AddNode as ::fidl_next::Method>::FLEXIBILITY,
6880                    request,
6881                ))
6882            }
6883        }
6884
6885        /// The server for the `NodeManager` protocol.
6886        #[repr(transparent)]
6887        pub struct NodeManagerServer<___T: ::fidl_next::Transport> {
6888            server: ::fidl_next::protocol::Server<___T>,
6889        }
6890
6891        impl<___T> NodeManagerServer<___T> where ___T: ::fidl_next::Transport {}
6892    }
6893}
6894
6895#[diagnostic::on_unimplemented(
6896    note = "If {Self} implements the non-local NodeManagerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6897)]
6898
6899/// A client handler for the NodeManager protocol.
6900///
6901/// See [`NodeManager`] for more details.
6902pub trait NodeManagerLocalClientHandler<
6903    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6904    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6905>
6906{
6907    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6908        ::core::future::ready(())
6909    }
6910}
6911
6912impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeManager
6913where
6914    ___H: NodeManagerLocalClientHandler<___T>,
6915    ___T: ::fidl_next::Transport,
6916{
6917    async fn on_event(
6918        handler: &mut ___H,
6919        mut message: ::fidl_next::Message<___T>,
6920    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6921        match *message.header().ordinal {
6922            ordinal => {
6923                handler.on_unknown_interaction(ordinal).await;
6924                if ::core::matches!(
6925                    message.header().flexibility(),
6926                    ::fidl_next::protocol::Flexibility::Strict
6927                ) {
6928                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6929                } else {
6930                    Ok(())
6931                }
6932            }
6933        }
6934    }
6935}
6936
6937#[diagnostic::on_unimplemented(
6938    note = "If {Self} implements the non-local NodeManagerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6939)]
6940
6941/// A server handler for the NodeManager protocol.
6942///
6943/// See [`NodeManager`] for more details.
6944pub trait NodeManagerLocalServerHandler<
6945    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6946    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6947>
6948{
6949    #[doc = " Adds a Node2 to the driver framework.\n"]
6950    fn add_node(
6951        &mut self,
6952
6953        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
6954
6955        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
6956    ) -> impl ::core::future::Future<Output = ()>;
6957
6958    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6959        ::core::future::ready(())
6960    }
6961}
6962
6963impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeManager
6964where
6965    ___H: NodeManagerLocalServerHandler<___T>,
6966    ___T: ::fidl_next::Transport,
6967    for<'de> crate::wire::NodeManagerAddNodeRequest<'de>: ::fidl_next::Decode<
6968            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6969            Constraint = (),
6970        >,
6971{
6972    async fn on_one_way(
6973        handler: &mut ___H,
6974        mut message: ::fidl_next::Message<___T>,
6975    ) -> ::core::result::Result<
6976        (),
6977        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6978    > {
6979        match *message.header().ordinal {
6980            ordinal => {
6981                handler.on_unknown_interaction(ordinal).await;
6982                if ::core::matches!(
6983                    message.header().flexibility(),
6984                    ::fidl_next::protocol::Flexibility::Strict
6985                ) {
6986                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6987                } else {
6988                    Ok(())
6989                }
6990            }
6991        }
6992    }
6993
6994    async fn on_two_way(
6995        handler: &mut ___H,
6996        mut message: ::fidl_next::Message<___T>,
6997        responder: ::fidl_next::protocol::Responder<___T>,
6998    ) -> ::core::result::Result<
6999        (),
7000        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7001    > {
7002        match *message.header().ordinal {
7003            8180576435965990653 => {
7004                let responder = ::fidl_next::Responder::from_untyped(responder);
7005
7006                match ::fidl_next::AsDecoderExt::into_decoded(message) {
7007                    Ok(decoded) => {
7008                        handler
7009                            .add_node(::fidl_next::Request::from_decoded(decoded), responder)
7010                            .await;
7011                        Ok(())
7012                    }
7013                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7014                        ordinal: 8180576435965990653,
7015                        error,
7016                    }),
7017                }
7018            }
7019
7020            ordinal => {
7021                handler.on_unknown_interaction(ordinal).await;
7022                if ::core::matches!(
7023                    message.header().flexibility(),
7024                    ::fidl_next::protocol::Flexibility::Strict
7025                ) {
7026                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7027                } else {
7028                    responder
7029                        .respond_framework_error(
7030                            ordinal,
7031                            ::fidl_next::FrameworkError::UnknownMethod,
7032                        )
7033                        .expect("encoding a framework error should never fail")
7034                        .await?;
7035                    Ok(())
7036                }
7037            }
7038        }
7039    }
7040}
7041
7042/// A client handler for the NodeManager protocol.
7043///
7044/// See [`NodeManager`] for more details.
7045pub trait NodeManagerClientHandler<
7046    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7047    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7048>
7049{
7050    fn on_unknown_interaction(
7051        &mut self,
7052        ordinal: u64,
7053    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7054        ::core::future::ready(())
7055    }
7056}
7057
7058impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeManager
7059where
7060    ___H: NodeManagerClientHandler<___T> + ::core::marker::Send,
7061    ___T: ::fidl_next::Transport,
7062{
7063    async fn on_event(
7064        handler: &mut ___H,
7065        mut message: ::fidl_next::Message<___T>,
7066    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7067        match *message.header().ordinal {
7068            ordinal => {
7069                handler.on_unknown_interaction(ordinal).await;
7070                if ::core::matches!(
7071                    message.header().flexibility(),
7072                    ::fidl_next::protocol::Flexibility::Strict
7073                ) {
7074                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7075                } else {
7076                    Ok(())
7077                }
7078            }
7079        }
7080    }
7081}
7082
7083/// A server handler for the NodeManager protocol.
7084///
7085/// See [`NodeManager`] for more details.
7086pub trait NodeManagerServerHandler<
7087    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7088    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7089>
7090{
7091    #[doc = " Adds a Node2 to the driver framework.\n"]
7092    fn add_node(
7093        &mut self,
7094
7095        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
7096
7097        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
7098    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7099
7100    fn on_unknown_interaction(
7101        &mut self,
7102        ordinal: u64,
7103    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7104        ::core::future::ready(())
7105    }
7106}
7107
7108impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeManager
7109where
7110    ___H: NodeManagerServerHandler<___T> + ::core::marker::Send,
7111    ___T: ::fidl_next::Transport,
7112    for<'de> crate::wire::NodeManagerAddNodeRequest<'de>: ::fidl_next::Decode<
7113            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7114            Constraint = (),
7115        >,
7116{
7117    async fn on_one_way(
7118        handler: &mut ___H,
7119        mut message: ::fidl_next::Message<___T>,
7120    ) -> ::core::result::Result<
7121        (),
7122        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7123    > {
7124        match *message.header().ordinal {
7125            ordinal => {
7126                handler.on_unknown_interaction(ordinal).await;
7127                if ::core::matches!(
7128                    message.header().flexibility(),
7129                    ::fidl_next::protocol::Flexibility::Strict
7130                ) {
7131                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7132                } else {
7133                    Ok(())
7134                }
7135            }
7136        }
7137    }
7138
7139    async fn on_two_way(
7140        handler: &mut ___H,
7141        mut message: ::fidl_next::Message<___T>,
7142        responder: ::fidl_next::protocol::Responder<___T>,
7143    ) -> ::core::result::Result<
7144        (),
7145        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7146    > {
7147        match *message.header().ordinal {
7148            8180576435965990653 => {
7149                let responder = ::fidl_next::Responder::from_untyped(responder);
7150
7151                match ::fidl_next::AsDecoderExt::into_decoded(message) {
7152                    Ok(decoded) => {
7153                        handler
7154                            .add_node(::fidl_next::Request::from_decoded(decoded), responder)
7155                            .await;
7156                        Ok(())
7157                    }
7158                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7159                        ordinal: 8180576435965990653,
7160                        error,
7161                    }),
7162                }
7163            }
7164
7165            ordinal => {
7166                handler.on_unknown_interaction(ordinal).await;
7167                if ::core::matches!(
7168                    message.header().flexibility(),
7169                    ::fidl_next::protocol::Flexibility::Strict
7170                ) {
7171                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7172                } else {
7173                    responder
7174                        .respond_framework_error(
7175                            ordinal,
7176                            ::fidl_next::FrameworkError::UnknownMethod,
7177                        )
7178                        .expect("encoding a framework error should never fail")
7179                        .await?;
7180                    Ok(())
7181                }
7182            }
7183        }
7184    }
7185}
7186
7187impl<___T> NodeManagerClientHandler<___T> for ::fidl_next::IgnoreEvents
7188where
7189    ___T: ::fidl_next::Transport,
7190{
7191    async fn on_unknown_interaction(&mut self, _: u64) {}
7192}
7193
7194impl<___H, ___T> NodeManagerLocalClientHandler<___T> for ::fidl_next::Local<___H>
7195where
7196    ___H: NodeManagerClientHandler<___T>,
7197    ___T: ::fidl_next::Transport,
7198{
7199    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7200        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7201    }
7202}
7203
7204impl<___H, ___T> NodeManagerLocalServerHandler<___T> for ::fidl_next::Local<___H>
7205where
7206    ___H: NodeManagerServerHandler<___T>,
7207    ___T: ::fidl_next::Transport,
7208{
7209    async fn add_node(
7210        &mut self,
7211
7212        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
7213
7214        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
7215    ) {
7216        ___H::add_node(&mut self.0, request, responder).await
7217    }
7218
7219    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7220        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7221    }
7222}
7223
7224pub use fidl_next_common_fuchsia_driver_framework::*;