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_offers: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
555
556        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
557
558        pub node_properties_2:
559            ::core::option::Option<::std::vec::Vec<crate::natural::NodePropertyEntry2>>,
560
561        pub vmar: ::core::option::Option<::fidl_next::fuchsia::zx::Vmar>,
562
563        pub power_element_args: ::core::option::Option<crate::natural::PowerElementArgs>,
564
565        pub log_sink: ::core::option::Option<
566            ::fidl_next::ClientEnd<
567                ::fidl_next_fuchsia_logger::LogSink,
568                ::fidl_next::fuchsia::zx::Channel,
569            >,
570        >,
571    }
572
573    impl DriverStartArgs {
574        fn __max_ordinal(&self) -> usize {
575            if self.log_sink.is_some() {
576                return 15;
577            }
578
579            if self.power_element_args.is_some() {
580                return 14;
581            }
582
583            if self.vmar.is_some() {
584                return 13;
585            }
586
587            if self.node_properties_2.is_some() {
588                return 12;
589            }
590
591            if self.node_token.is_some() {
592                return 11;
593            }
594
595            if self.node_offers.is_some() {
596                return 10;
597            }
598
599            if self.node_name.is_some() {
600                return 8;
601            }
602
603            if self.config.is_some() {
604                return 7;
605            }
606
607            if self.outgoing_dir.is_some() {
608                return 6;
609            }
610
611            if self.incoming.is_some() {
612                return 5;
613            }
614
615            if self.program.is_some() {
616                return 4;
617            }
618
619            if self.url.is_some() {
620                return 3;
621            }
622
623            if self.symbols.is_some() {
624                return 2;
625            }
626
627            if self.node.is_some() {
628                return 1;
629            }
630
631            0
632        }
633    }
634
635    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>
636        for DriverStartArgs
637    where
638        ___E: ::fidl_next::Encoder + ?Sized,
639        ___E: ::fidl_next::fuchsia::HandleEncoder,
640    {
641        #[inline]
642        fn encode(
643            mut self,
644            encoder: &mut ___E,
645            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartArgs<'static>>,
646            _: (),
647        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
648            ::fidl_next::munge!(let crate::wire::DriverStartArgs { table } = out);
649
650            let max_ord = self.__max_ordinal();
651
652            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
653            ::fidl_next::Wire::zero_padding(&mut out);
654
655            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
656                ::fidl_next::wire::Envelope,
657            >(encoder, max_ord);
658
659            for i in 1..=max_ord {
660                match i {
661                    15 => {
662                        if let Some(value) = self.log_sink.take() {
663                            ::fidl_next::wire::Envelope::encode_value::<
664                                ::fidl_next::ClientEnd<
665                                    ::fidl_next_fuchsia_logger::LogSink,
666                                    ::fidl_next::wire::fuchsia::Channel,
667                                >,
668                                ___E,
669                            >(
670                                value, preallocated.encoder, &mut out, ()
671                            )?;
672                        } else {
673                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
674                        }
675                    }
676
677                    14 => {
678                        if let Some(value) = self.power_element_args.take() {
679                            ::fidl_next::wire::Envelope::encode_value::<
680                                crate::wire::PowerElementArgs<'static>,
681                                ___E,
682                            >(
683                                value, preallocated.encoder, &mut out, ()
684                            )?;
685                        } else {
686                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
687                        }
688                    }
689
690                    13 => {
691                        if let Some(value) = self.vmar.take() {
692                            ::fidl_next::wire::Envelope::encode_value::<
693                                ::fidl_next::wire::fuchsia::Vmar,
694                                ___E,
695                            >(
696                                value, preallocated.encoder, &mut out, ()
697                            )?;
698                        } else {
699                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
700                        }
701                    }
702
703                    12 => {
704                        if let Some(value) = self.node_properties_2.take() {
705                            ::fidl_next::wire::Envelope::encode_value::<
706                                ::fidl_next::wire::Vector<
707                                    'static,
708                                    crate::wire::NodePropertyEntry2<'static>,
709                                >,
710                                ___E,
711                            >(
712                                value, preallocated.encoder, &mut out, (4294967295, ())
713                            )?;
714                        } else {
715                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
716                        }
717                    }
718
719                    11 => {
720                        if let Some(value) = self.node_token.take() {
721                            ::fidl_next::wire::Envelope::encode_value::<
722                                ::fidl_next::wire::fuchsia::Event,
723                                ___E,
724                            >(
725                                value, preallocated.encoder, &mut out, ()
726                            )?;
727                        } else {
728                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
729                        }
730                    }
731
732                    10 => {
733                        if let Some(value) = self.node_offers.take() {
734                            ::fidl_next::wire::Envelope::encode_value::<
735                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
736                                ___E,
737                            >(
738                                value, preallocated.encoder, &mut out, (128, ())
739                            )?;
740                        } else {
741                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
742                        }
743                    }
744
745                    8 => {
746                        if let Some(value) = self.node_name.take() {
747                            ::fidl_next::wire::Envelope::encode_value::<
748                                ::fidl_next::wire::String<'static>,
749                                ___E,
750                            >(
751                                value, preallocated.encoder, &mut out, 4294967295
752                            )?;
753                        } else {
754                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
755                        }
756                    }
757
758                    7 => {
759                        if let Some(value) = self.config.take() {
760                            ::fidl_next::wire::Envelope::encode_value::<
761                                ::fidl_next::wire::fuchsia::Vmo,
762                                ___E,
763                            >(
764                                value, preallocated.encoder, &mut out, ()
765                            )?;
766                        } else {
767                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
768                        }
769                    }
770
771                    6 => {
772                        if let Some(value) = self.outgoing_dir.take() {
773                            ::fidl_next::wire::Envelope::encode_value::<
774                                ::fidl_next::ServerEnd<
775                                    ::fidl_next_fuchsia_io::Directory,
776                                    ::fidl_next::wire::fuchsia::Channel,
777                                >,
778                                ___E,
779                            >(
780                                value, preallocated.encoder, &mut out, ()
781                            )?;
782                        } else {
783                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
784                        }
785                    }
786
787                    5 => {
788                        if let Some(value) = self.incoming.take() {
789                            ::fidl_next::wire::Envelope::encode_value::<::fidl_next::wire::Vector<'static, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'static>>, ___E>(
790                            value,
791                            preallocated.encoder,
792                            &mut out,
793                            (32, ()),
794                        )?;
795                        } else {
796                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
797                        }
798                    }
799
800                    4 => {
801                        if let Some(value) = self.program.take() {
802                            ::fidl_next::wire::Envelope::encode_value::<
803                                ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
804                                ___E,
805                            >(
806                                value, preallocated.encoder, &mut out, ()
807                            )?;
808                        } else {
809                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
810                        }
811                    }
812
813                    3 => {
814                        if let Some(value) = self.url.take() {
815                            ::fidl_next::wire::Envelope::encode_value::<
816                                ::fidl_next::wire::String<'static>,
817                                ___E,
818                            >(
819                                value, preallocated.encoder, &mut out, 4096
820                            )?;
821                        } else {
822                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
823                        }
824                    }
825
826                    2 => {
827                        if let Some(value) = self.symbols.take() {
828                            ::fidl_next::wire::Envelope::encode_value::<
829                                ::fidl_next::wire::Vector<
830                                    'static,
831                                    crate::wire::NodeSymbol<'static>,
832                                >,
833                                ___E,
834                            >(
835                                value, preallocated.encoder, &mut out, (64, ())
836                            )?;
837                        } else {
838                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
839                        }
840                    }
841
842                    1 => {
843                        if let Some(value) = self.node.take() {
844                            ::fidl_next::wire::Envelope::encode_value::<
845                                ::fidl_next::ClientEnd<
846                                    crate::Node,
847                                    ::fidl_next::wire::fuchsia::Channel,
848                                >,
849                                ___E,
850                            >(
851                                value, preallocated.encoder, &mut out, ()
852                            )?;
853                        } else {
854                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
855                        }
856                    }
857
858                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
859                }
860                unsafe {
861                    preallocated.write_next(out.assume_init_ref());
862                }
863            }
864
865            ::fidl_next::wire::Table::encode_len(table, max_ord);
866
867            Ok(())
868        }
869    }
870
871    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartArgs<'de>> for DriverStartArgs {
872        #[inline]
873        fn from_wire(wire_: crate::wire::DriverStartArgs<'de>) -> Self {
874            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
875
876            let node = wire_.table.get(1);
877
878            let symbols = wire_.table.get(2);
879
880            let url = wire_.table.get(3);
881
882            let program = wire_.table.get(4);
883
884            let incoming = wire_.table.get(5);
885
886            let outgoing_dir = wire_.table.get(6);
887
888            let config = wire_.table.get(7);
889
890            let node_name = wire_.table.get(8);
891
892            let node_offers = wire_.table.get(10);
893
894            let node_token = wire_.table.get(11);
895
896            let node_properties_2 = wire_.table.get(12);
897
898            let vmar = wire_.table.get(13);
899
900            let power_element_args = wire_.table.get(14);
901
902            let log_sink = wire_.table.get(15);
903
904            Self {
905
906
907                node: node.map(|envelope| ::fidl_next::FromWire::from_wire(
908                    unsafe { envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>() }
909                )),
910
911
912                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
913                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>() }
914                )),
915
916
917                url: url.map(|envelope| ::fidl_next::FromWire::from_wire(
918                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
919                )),
920
921
922                program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
923                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
924                )),
925
926
927                incoming: incoming.map(|envelope| ::fidl_next::FromWire::from_wire(
928                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>>>() }
929                )),
930
931
932                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
933                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::wire::fuchsia::Channel>>() }
934                )),
935
936
937                config: config.map(|envelope| ::fidl_next::FromWire::from_wire(
938                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>() }
939                )),
940
941
942                node_name: node_name.map(|envelope| ::fidl_next::FromWire::from_wire(
943                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
944                )),
945
946
947                node_offers: node_offers.map(|envelope| ::fidl_next::FromWire::from_wire(
948                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
949                )),
950
951
952                node_token: node_token.map(|envelope| ::fidl_next::FromWire::from_wire(
953                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>() }
954                )),
955
956
957                node_properties_2: node_properties_2.map(|envelope| ::fidl_next::FromWire::from_wire(
958                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>>() }
959                )),
960
961
962                vmar: vmar.map(|envelope| ::fidl_next::FromWire::from_wire(
963                    unsafe { envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmar>() }
964                )),
965
966
967                power_element_args: power_element_args.map(|envelope| ::fidl_next::FromWire::from_wire(
968                    unsafe { envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>() }
969                )),
970
971
972                log_sink: log_sink.map(|envelope| ::fidl_next::FromWire::from_wire(
973                    unsafe { envelope.read_unchecked::<::fidl_next::ClientEnd<::fidl_next_fuchsia_logger::LogSink, ::fidl_next::wire::fuchsia::Channel>>() }
974                )),
975
976        }
977        }
978    }
979
980    #[derive(Debug, PartialEq)]
981    pub struct DriverStartRequest {
982        pub start_args: crate::natural::DriverStartArgs,
983    }
984
985    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
986        for DriverStartRequest
987    where
988        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
989        ___E: ::fidl_next::Encoder,
990        ___E: ::fidl_next::fuchsia::HandleEncoder,
991    {
992        #[inline]
993        fn encode(
994            self,
995            encoder_: &mut ___E,
996            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
997            _: (),
998        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
999            ::fidl_next::munge! {
1000                let crate::wire::DriverStartRequest {
1001                    start_args,
1002
1003                } = out_;
1004            }
1005
1006            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
1007
1008            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_args.as_mut_ptr()) };
1009
1010            Ok(())
1011        }
1012    }
1013
1014    unsafe impl<___E>
1015        ::fidl_next::EncodeOption<
1016            ::fidl_next::wire::Box<'static, crate::wire::DriverStartRequest<'static>>,
1017            ___E,
1018        > for DriverStartRequest
1019    where
1020        ___E: ::fidl_next::Encoder + ?Sized,
1021        DriverStartRequest: ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>,
1022    {
1023        #[inline]
1024        fn encode_option(
1025            this: ::core::option::Option<Self>,
1026            encoder: &mut ___E,
1027            out: &mut ::core::mem::MaybeUninit<
1028                ::fidl_next::wire::Box<'static, crate::wire::DriverStartRequest<'static>>,
1029            >,
1030            _: (),
1031        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1032            if let Some(inner) = this {
1033                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1034                ::fidl_next::wire::Box::encode_present(out);
1035            } else {
1036                ::fidl_next::wire::Box::encode_absent(out);
1037            }
1038
1039            Ok(())
1040        }
1041    }
1042
1043    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartRequest<'de>> for DriverStartRequest {
1044        #[inline]
1045        fn from_wire(wire: crate::wire::DriverStartRequest<'de>) -> Self {
1046            Self { start_args: ::fidl_next::FromWire::from_wire(wire.start_args) }
1047        }
1048    }
1049
1050    #[derive(Debug, PartialEq)]
1051    pub enum DriverResult {
1052        DriverStartedNodeToken(::fidl_next::fuchsia::zx::Event),
1053
1054        MatchError(::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>),
1055
1056        StartError(::core::result::Result<(), ::fidl_next::fuchsia::zx::Status>),
1057
1058        UnknownOrdinal_(u64),
1059    }
1060
1061    impl DriverResult {
1062        pub fn is_unknown(&self) -> bool {
1063            #[allow(unreachable_patterns)]
1064            match self {
1065                Self::UnknownOrdinal_(_) => true,
1066                _ => false,
1067            }
1068        }
1069    }
1070
1071    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E> for DriverResult
1072    where
1073        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1074        ___E: ::fidl_next::Encoder,
1075        ___E: ::fidl_next::fuchsia::HandleEncoder,
1076    {
1077        #[inline]
1078        fn encode(
1079            self,
1080            encoder: &mut ___E,
1081            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverResult<'static>>,
1082            _: (),
1083        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1084            ::fidl_next::munge!(let crate::wire::DriverResult { raw, _phantom: _ } = out);
1085
1086            match self {
1087                Self::DriverStartedNodeToken(value) => ::fidl_next::wire::Union::encode_as::<
1088                    ___E,
1089                    ::fidl_next::wire::fuchsia::Event,
1090                >(
1091                    value, 1, encoder, raw, ()
1092                )?,
1093
1094                Self::MatchError(value) => ::fidl_next::wire::Union::encode_as::<
1095                    ___E,
1096                    ::fidl_next::wire::fuchsia::StatusResult,
1097                >(value, 2, encoder, raw, ())?,
1098
1099                Self::StartError(value) => ::fidl_next::wire::Union::encode_as::<
1100                    ___E,
1101                    ::fidl_next::wire::fuchsia::StatusResult,
1102                >(value, 3, encoder, raw, ())?,
1103
1104                Self::UnknownOrdinal_(ordinal) => {
1105                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1106                }
1107            }
1108
1109            Ok(())
1110        }
1111    }
1112
1113    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::DriverResult<'static>, ___E>
1114        for DriverResult
1115    where
1116        ___E: ?Sized,
1117        DriverResult: ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E>,
1118    {
1119        #[inline]
1120        fn encode_option(
1121            this: ::core::option::Option<Self>,
1122            encoder: &mut ___E,
1123            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DriverResult<'static>>,
1124            _: (),
1125        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1126            ::fidl_next::munge!(let crate::wire_optional::DriverResult { raw, _phantom: _ } = &mut *out);
1127
1128            if let Some(inner) = this {
1129                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1130                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1131            } else {
1132                ::fidl_next::wire::Union::encode_absent(raw);
1133            }
1134
1135            Ok(())
1136        }
1137    }
1138
1139    impl<'de> ::fidl_next::FromWire<crate::wire::DriverResult<'de>> for DriverResult {
1140        #[inline]
1141        fn from_wire(wire: crate::wire::DriverResult<'de>) -> Self {
1142            let wire = ::core::mem::ManuallyDrop::new(wire);
1143            match wire.raw.ordinal() {
1144                1 => Self::DriverStartedNodeToken(::fidl_next::FromWire::from_wire(unsafe {
1145                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1146                })),
1147
1148                2 => Self::MatchError(::fidl_next::FromWire::from_wire(unsafe {
1149                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
1150                })),
1151
1152                3 => Self::StartError(::fidl_next::FromWire::from_wire(unsafe {
1153                    wire.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
1154                })),
1155
1156                ord => return Self::UnknownOrdinal_(ord as u64),
1157            }
1158        }
1159    }
1160
1161    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>> for DriverResult {
1162        #[inline]
1163        fn from_wire_option(
1164            wire: crate::wire_optional::DriverResult<'de>,
1165        ) -> ::core::option::Option<Self> {
1166            if let Some(inner) = wire.into_option() {
1167                Some(::fidl_next::FromWire::from_wire(inner))
1168            } else {
1169                None
1170            }
1171        }
1172    }
1173
1174    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1175        for Box<DriverResult>
1176    {
1177        #[inline]
1178        fn from_wire_option(
1179            wire: crate::wire_optional::DriverResult<'de>,
1180        ) -> ::core::option::Option<Self> {
1181            <
1182            DriverResult as ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1183        >::from_wire_option(wire).map(Box::new)
1184        }
1185    }
1186
1187    #[doc = " Arguments for adding a node.\n"]
1188    #[derive(Debug, Default, PartialEq)]
1189    pub struct NodeAddArgs {
1190        pub name: ::core::option::Option<::std::string::String>,
1191
1192        pub symbols: ::core::option::Option<::std::vec::Vec<crate::natural::NodeSymbol>>,
1193
1194        pub devfs_args: ::core::option::Option<crate::natural::DevfsAddArgs>,
1195
1196        pub offers2: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
1197
1198        pub bus_info: ::core::option::Option<crate::natural::BusInfo>,
1199
1200        pub properties2: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty2>>,
1201
1202        pub offers_dictionary:
1203            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
1204
1205        pub driver_host: ::core::option::Option<::std::string::String>,
1206    }
1207
1208    impl NodeAddArgs {
1209        fn __max_ordinal(&self) -> usize {
1210            if self.driver_host.is_some() {
1211                return 10;
1212            }
1213
1214            if self.offers_dictionary.is_some() {
1215                return 9;
1216            }
1217
1218            if self.properties2.is_some() {
1219                return 8;
1220            }
1221
1222            if self.bus_info.is_some() {
1223                return 7;
1224            }
1225
1226            if self.offers2.is_some() {
1227                return 6;
1228            }
1229
1230            if self.devfs_args.is_some() {
1231                return 5;
1232            }
1233
1234            if self.symbols.is_some() {
1235                return 3;
1236            }
1237
1238            if self.name.is_some() {
1239                return 1;
1240            }
1241
1242            0
1243        }
1244    }
1245
1246    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E> for NodeAddArgs
1247    where
1248        ___E: ::fidl_next::Encoder + ?Sized,
1249        ___E: ::fidl_next::fuchsia::HandleEncoder,
1250    {
1251        #[inline]
1252        fn encode(
1253            mut self,
1254            encoder: &mut ___E,
1255            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddArgs<'static>>,
1256            _: (),
1257        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1258            ::fidl_next::munge!(let crate::wire::NodeAddArgs { table } = out);
1259
1260            let max_ord = self.__max_ordinal();
1261
1262            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1263            ::fidl_next::Wire::zero_padding(&mut out);
1264
1265            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1266                ::fidl_next::wire::Envelope,
1267            >(encoder, max_ord);
1268
1269            for i in 1..=max_ord {
1270                match i {
1271                    10 => {
1272                        if let Some(value) = self.driver_host.take() {
1273                            ::fidl_next::wire::Envelope::encode_value::<
1274                                ::fidl_next::wire::String<'static>,
1275                                ___E,
1276                            >(
1277                                value, preallocated.encoder, &mut out, 128
1278                            )?;
1279                        } else {
1280                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1281                        }
1282                    }
1283
1284                    9 => {
1285                        if let Some(value) = self.offers_dictionary.take() {
1286                            ::fidl_next::wire::Envelope::encode_value::<
1287                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1288                                ___E,
1289                            >(
1290                                value, preallocated.encoder, &mut out, ()
1291                            )?;
1292                        } else {
1293                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1294                        }
1295                    }
1296
1297                    8 => {
1298                        if let Some(value) = self.properties2.take() {
1299                            ::fidl_next::wire::Envelope::encode_value::<
1300                                ::fidl_next::wire::Vector<
1301                                    'static,
1302                                    crate::wire::NodeProperty2<'static>,
1303                                >,
1304                                ___E,
1305                            >(
1306                                value, preallocated.encoder, &mut out, (64, ())
1307                            )?;
1308                        } else {
1309                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1310                        }
1311                    }
1312
1313                    7 => {
1314                        if let Some(value) = self.bus_info.take() {
1315                            ::fidl_next::wire::Envelope::encode_value::<
1316                                crate::wire::BusInfo<'static>,
1317                                ___E,
1318                            >(
1319                                value, preallocated.encoder, &mut out, ()
1320                            )?;
1321                        } else {
1322                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1323                        }
1324                    }
1325
1326                    6 => {
1327                        if let Some(value) = self.offers2.take() {
1328                            ::fidl_next::wire::Envelope::encode_value::<
1329                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
1330                                ___E,
1331                            >(
1332                                value, preallocated.encoder, &mut out, (128, ())
1333                            )?;
1334                        } else {
1335                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1336                        }
1337                    }
1338
1339                    5 => {
1340                        if let Some(value) = self.devfs_args.take() {
1341                            ::fidl_next::wire::Envelope::encode_value::<
1342                                crate::wire::DevfsAddArgs<'static>,
1343                                ___E,
1344                            >(
1345                                value, preallocated.encoder, &mut out, ()
1346                            )?;
1347                        } else {
1348                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1349                        }
1350                    }
1351
1352                    3 => {
1353                        if let Some(value) = self.symbols.take() {
1354                            ::fidl_next::wire::Envelope::encode_value::<
1355                                ::fidl_next::wire::Vector<
1356                                    'static,
1357                                    crate::wire::NodeSymbol<'static>,
1358                                >,
1359                                ___E,
1360                            >(
1361                                value, preallocated.encoder, &mut out, (64, ())
1362                            )?;
1363                        } else {
1364                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1365                        }
1366                    }
1367
1368                    1 => {
1369                        if let Some(value) = self.name.take() {
1370                            ::fidl_next::wire::Envelope::encode_value::<
1371                                ::fidl_next::wire::String<'static>,
1372                                ___E,
1373                            >(
1374                                value, preallocated.encoder, &mut out, 128
1375                            )?;
1376                        } else {
1377                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1378                        }
1379                    }
1380
1381                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1382                }
1383                unsafe {
1384                    preallocated.write_next(out.assume_init_ref());
1385                }
1386            }
1387
1388            ::fidl_next::wire::Table::encode_len(table, max_ord);
1389
1390            Ok(())
1391        }
1392    }
1393
1394    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddArgs<'de>> for NodeAddArgs {
1395        #[inline]
1396        fn from_wire(wire_: crate::wire::NodeAddArgs<'de>) -> Self {
1397            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1398
1399            let name = wire_.table.get(1);
1400
1401            let symbols = wire_.table.get(3);
1402
1403            let devfs_args = wire_.table.get(5);
1404
1405            let offers2 = wire_.table.get(6);
1406
1407            let bus_info = wire_.table.get(7);
1408
1409            let properties2 = wire_.table.get(8);
1410
1411            let offers_dictionary = wire_.table.get(9);
1412
1413            let driver_host = wire_.table.get(10);
1414
1415            Self {
1416
1417
1418                name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1419                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1420                )),
1421
1422
1423                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
1424                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>() }
1425                )),
1426
1427
1428                devfs_args: devfs_args.map(|envelope| ::fidl_next::FromWire::from_wire(
1429                    unsafe { envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>() }
1430                )),
1431
1432
1433                offers2: offers2.map(|envelope| ::fidl_next::FromWire::from_wire(
1434                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
1435                )),
1436
1437
1438                bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1439                    unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1440                )),
1441
1442
1443                properties2: properties2.map(|envelope| ::fidl_next::FromWire::from_wire(
1444                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>() }
1445                )),
1446
1447
1448                offers_dictionary: offers_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1449                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1450                )),
1451
1452
1453                driver_host: driver_host.map(|envelope| ::fidl_next::FromWire::from_wire(
1454                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1455                )),
1456
1457        }
1458        }
1459    }
1460
1461    #[derive(Debug, PartialEq)]
1462    pub struct NodeAddChildRequest {
1463        pub args: crate::natural::NodeAddArgs,
1464
1465        pub controller:
1466            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1467
1468        pub node: ::core::option::Option<
1469            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1470        >,
1471    }
1472
1473    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
1474        for NodeAddChildRequest
1475    where
1476        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1477        ___E: ::fidl_next::Encoder,
1478        ___E: ::fidl_next::fuchsia::HandleEncoder,
1479    {
1480        #[inline]
1481        fn encode(
1482            self,
1483            encoder_: &mut ___E,
1484            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
1485            _: (),
1486        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1487            ::fidl_next::munge! {
1488                let crate::wire::NodeAddChildRequest {
1489                    args,
1490                    controller,
1491                    node,
1492
1493                } = out_;
1494            }
1495
1496            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
1497
1498            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
1499
1500            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1501
1502            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1503
1504            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1505
1506            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1507
1508            Ok(())
1509        }
1510    }
1511
1512    unsafe impl<___E>
1513        ::fidl_next::EncodeOption<
1514            ::fidl_next::wire::Box<'static, crate::wire::NodeAddChildRequest<'static>>,
1515            ___E,
1516        > for NodeAddChildRequest
1517    where
1518        ___E: ::fidl_next::Encoder + ?Sized,
1519        NodeAddChildRequest: ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>,
1520    {
1521        #[inline]
1522        fn encode_option(
1523            this: ::core::option::Option<Self>,
1524            encoder: &mut ___E,
1525            out: &mut ::core::mem::MaybeUninit<
1526                ::fidl_next::wire::Box<'static, crate::wire::NodeAddChildRequest<'static>>,
1527            >,
1528            _: (),
1529        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1530            if let Some(inner) = this {
1531                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1532                ::fidl_next::wire::Box::encode_present(out);
1533            } else {
1534                ::fidl_next::wire::Box::encode_absent(out);
1535            }
1536
1537            Ok(())
1538        }
1539    }
1540
1541    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddChildRequest<'de>> for NodeAddChildRequest {
1542        #[inline]
1543        fn from_wire(wire: crate::wire::NodeAddChildRequest<'de>) -> Self {
1544            Self {
1545                args: ::fidl_next::FromWire::from_wire(wire.args),
1546
1547                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1548
1549                node: ::fidl_next::FromWire::from_wire(wire.node),
1550            }
1551        }
1552    }
1553
1554    #[doc = " Arguments for providing a resource.\n"]
1555    #[derive(Debug, Default, Clone, PartialEq)]
1556    pub struct ResourceArgs {
1557        pub name: ::core::option::Option<::std::string::String>,
1558
1559        pub properties: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty2>>,
1560
1561        pub offers: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
1562
1563        pub bus_info: ::core::option::Option<crate::natural::BusInfo>,
1564    }
1565
1566    impl ResourceArgs {
1567        fn __max_ordinal(&self) -> usize {
1568            if self.bus_info.is_some() {
1569                return 4;
1570            }
1571
1572            if self.offers.is_some() {
1573                return 3;
1574            }
1575
1576            if self.properties.is_some() {
1577                return 2;
1578            }
1579
1580            if self.name.is_some() {
1581                return 1;
1582            }
1583
1584            0
1585        }
1586    }
1587
1588    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E> for ResourceArgs
1589    where
1590        ___E: ::fidl_next::Encoder + ?Sized,
1591        ___E: ::fidl_next::fuchsia::HandleEncoder,
1592    {
1593        #[inline]
1594        fn encode(
1595            mut self,
1596            encoder: &mut ___E,
1597            out: &mut ::core::mem::MaybeUninit<crate::wire::ResourceArgs<'static>>,
1598            _: (),
1599        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1600            ::fidl_next::munge!(let crate::wire::ResourceArgs { table } = out);
1601
1602            let max_ord = self.__max_ordinal();
1603
1604            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1605            ::fidl_next::Wire::zero_padding(&mut out);
1606
1607            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1608                ::fidl_next::wire::Envelope,
1609            >(encoder, max_ord);
1610
1611            for i in 1..=max_ord {
1612                match i {
1613                    4 => {
1614                        if let Some(value) = self.bus_info.take() {
1615                            ::fidl_next::wire::Envelope::encode_value::<
1616                                crate::wire::BusInfo<'static>,
1617                                ___E,
1618                            >(
1619                                value, preallocated.encoder, &mut out, ()
1620                            )?;
1621                        } else {
1622                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1623                        }
1624                    }
1625
1626                    3 => {
1627                        if let Some(value) = self.offers.take() {
1628                            ::fidl_next::wire::Envelope::encode_value::<
1629                                ::fidl_next::wire::Vector<'static, crate::wire::Offer<'static>>,
1630                                ___E,
1631                            >(
1632                                value, preallocated.encoder, &mut out, (128, ())
1633                            )?;
1634                        } else {
1635                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1636                        }
1637                    }
1638
1639                    2 => {
1640                        if let Some(value) = self.properties.take() {
1641                            ::fidl_next::wire::Envelope::encode_value::<
1642                                ::fidl_next::wire::Vector<
1643                                    'static,
1644                                    crate::wire::NodeProperty2<'static>,
1645                                >,
1646                                ___E,
1647                            >(
1648                                value, preallocated.encoder, &mut out, (64, ())
1649                            )?;
1650                        } else {
1651                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1652                        }
1653                    }
1654
1655                    1 => {
1656                        if let Some(value) = self.name.take() {
1657                            ::fidl_next::wire::Envelope::encode_value::<
1658                                ::fidl_next::wire::String<'static>,
1659                                ___E,
1660                            >(
1661                                value, preallocated.encoder, &mut out, 128
1662                            )?;
1663                        } else {
1664                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1665                        }
1666                    }
1667
1668                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1669                }
1670                unsafe {
1671                    preallocated.write_next(out.assume_init_ref());
1672                }
1673            }
1674
1675            ::fidl_next::wire::Table::encode_len(table, max_ord);
1676
1677            Ok(())
1678        }
1679    }
1680
1681    impl<'de> ::fidl_next::FromWire<crate::wire::ResourceArgs<'de>> for ResourceArgs {
1682        #[inline]
1683        fn from_wire(wire_: crate::wire::ResourceArgs<'de>) -> Self {
1684            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1685
1686            let name = wire_.table.get(1);
1687
1688            let properties = wire_.table.get(2);
1689
1690            let offers = wire_.table.get(3);
1691
1692            let bus_info = wire_.table.get(4);
1693
1694            Self {
1695
1696
1697                name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1698                    unsafe { envelope.read_unchecked::<::fidl_next::wire::String<'de>>() }
1699                )),
1700
1701
1702                properties: properties.map(|envelope| ::fidl_next::FromWire::from_wire(
1703                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>() }
1704                )),
1705
1706
1707                offers: offers.map(|envelope| ::fidl_next::FromWire::from_wire(
1708                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>() }
1709                )),
1710
1711
1712                bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1713                    unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1714                )),
1715
1716        }
1717        }
1718    }
1719
1720    #[derive(Debug, PartialEq)]
1721    pub struct NodeProvideResourceRequest {
1722        pub resource: crate::natural::ResourceArgs,
1723
1724        pub controller:
1725            ::fidl_next::ServerEnd<crate::ResourceController, ::fidl_next::fuchsia::zx::Channel>,
1726    }
1727
1728    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
1729        for NodeProvideResourceRequest
1730    where
1731        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1732        ___E: ::fidl_next::Encoder,
1733        ___E: ::fidl_next::fuchsia::HandleEncoder,
1734    {
1735        #[inline]
1736        fn encode(
1737            self,
1738            encoder_: &mut ___E,
1739            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
1740            _: (),
1741        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1742            ::fidl_next::munge! {
1743                let crate::wire::NodeProvideResourceRequest {
1744                    resource,
1745                    controller,
1746
1747                } = out_;
1748            }
1749
1750            ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
1751
1752            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(resource.as_mut_ptr()) };
1753
1754            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1755
1756            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1757
1758            Ok(())
1759        }
1760    }
1761
1762    unsafe impl<___E>
1763        ::fidl_next::EncodeOption<
1764            ::fidl_next::wire::Box<'static, crate::wire::NodeProvideResourceRequest<'static>>,
1765            ___E,
1766        > for NodeProvideResourceRequest
1767    where
1768        ___E: ::fidl_next::Encoder + ?Sized,
1769        NodeProvideResourceRequest:
1770            ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>,
1771    {
1772        #[inline]
1773        fn encode_option(
1774            this: ::core::option::Option<Self>,
1775            encoder: &mut ___E,
1776            out: &mut ::core::mem::MaybeUninit<
1777                ::fidl_next::wire::Box<'static, crate::wire::NodeProvideResourceRequest<'static>>,
1778            >,
1779            _: (),
1780        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1781            if let Some(inner) = this {
1782                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1783                ::fidl_next::wire::Box::encode_present(out);
1784            } else {
1785                ::fidl_next::wire::Box::encode_absent(out);
1786            }
1787
1788            Ok(())
1789        }
1790    }
1791
1792    impl<'de> ::fidl_next::FromWire<crate::wire::NodeProvideResourceRequest<'de>>
1793        for NodeProvideResourceRequest
1794    {
1795        #[inline]
1796        fn from_wire(wire: crate::wire::NodeProvideResourceRequest<'de>) -> Self {
1797            Self {
1798                resource: ::fidl_next::FromWire::from_wire(wire.resource),
1799
1800                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1801            }
1802        }
1803    }
1804
1805    #[derive(Debug, Default, PartialEq)]
1806    pub struct NodeControllerOnBindRequest {
1807        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
1808    }
1809
1810    impl NodeControllerOnBindRequest {
1811        fn __max_ordinal(&self) -> usize {
1812            if self.node_token.is_some() {
1813                return 1;
1814            }
1815
1816            0
1817        }
1818    }
1819
1820    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeControllerOnBindRequest<'static>, ___E>
1821        for NodeControllerOnBindRequest
1822    where
1823        ___E: ::fidl_next::Encoder + ?Sized,
1824        ___E: ::fidl_next::fuchsia::HandleEncoder,
1825    {
1826        #[inline]
1827        fn encode(
1828            mut self,
1829            encoder: &mut ___E,
1830            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeControllerOnBindRequest<'static>>,
1831            _: (),
1832        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1833            ::fidl_next::munge!(let crate::wire::NodeControllerOnBindRequest { table } = out);
1834
1835            let max_ord = self.__max_ordinal();
1836
1837            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
1838            ::fidl_next::Wire::zero_padding(&mut out);
1839
1840            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
1841                ::fidl_next::wire::Envelope,
1842            >(encoder, max_ord);
1843
1844            for i in 1..=max_ord {
1845                match i {
1846                    1 => {
1847                        if let Some(value) = self.node_token.take() {
1848                            ::fidl_next::wire::Envelope::encode_value::<
1849                                ::fidl_next::wire::fuchsia::Event,
1850                                ___E,
1851                            >(
1852                                value, preallocated.encoder, &mut out, ()
1853                            )?;
1854                        } else {
1855                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
1856                        }
1857                    }
1858
1859                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
1860                }
1861                unsafe {
1862                    preallocated.write_next(out.assume_init_ref());
1863                }
1864            }
1865
1866            ::fidl_next::wire::Table::encode_len(table, max_ord);
1867
1868            Ok(())
1869        }
1870    }
1871
1872    impl<'de> ::fidl_next::FromWire<crate::wire::NodeControllerOnBindRequest<'de>>
1873        for NodeControllerOnBindRequest
1874    {
1875        #[inline]
1876        fn from_wire(wire_: crate::wire::NodeControllerOnBindRequest<'de>) -> Self {
1877            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1878
1879            let node_token = wire_.table.get(1);
1880
1881            Self {
1882                node_token: node_token.map(|envelope| {
1883                    ::fidl_next::FromWire::from_wire(unsafe {
1884                        envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
1885                    })
1886                }),
1887            }
1888        }
1889    }
1890
1891    #[derive(Debug, PartialEq)]
1892    pub struct NodeManagerAddNodeRequest {
1893        pub node: crate::natural::Node2,
1894
1895        pub controller:
1896            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1897
1898        pub node_ref: ::core::option::Option<
1899            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1900        >,
1901    }
1902
1903    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>
1904        for NodeManagerAddNodeRequest
1905    where
1906        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1907        ___E: ::fidl_next::Encoder,
1908        ___E: ::fidl_next::fuchsia::HandleEncoder,
1909    {
1910        #[inline]
1911        fn encode(
1912            self,
1913            encoder_: &mut ___E,
1914            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeManagerAddNodeRequest<'static>>,
1915            _: (),
1916        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1917            ::fidl_next::munge! {
1918                let crate::wire::NodeManagerAddNodeRequest {
1919                    node,
1920                    controller,
1921                    node_ref,
1922
1923                } = out_;
1924            }
1925
1926            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1927
1928            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1929
1930            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1931
1932            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1933
1934            ::fidl_next::Encode::encode(self.node_ref, encoder_, node_ref, ())?;
1935
1936            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_ref.as_mut_ptr()) };
1937
1938            Ok(())
1939        }
1940    }
1941
1942    unsafe impl<___E>
1943        ::fidl_next::EncodeOption<
1944            ::fidl_next::wire::Box<'static, crate::wire::NodeManagerAddNodeRequest<'static>>,
1945            ___E,
1946        > for NodeManagerAddNodeRequest
1947    where
1948        ___E: ::fidl_next::Encoder + ?Sized,
1949        NodeManagerAddNodeRequest:
1950            ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>,
1951    {
1952        #[inline]
1953        fn encode_option(
1954            this: ::core::option::Option<Self>,
1955            encoder: &mut ___E,
1956            out: &mut ::core::mem::MaybeUninit<
1957                ::fidl_next::wire::Box<'static, crate::wire::NodeManagerAddNodeRequest<'static>>,
1958            >,
1959            _: (),
1960        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1961            if let Some(inner) = this {
1962                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1963                ::fidl_next::wire::Box::encode_present(out);
1964            } else {
1965                ::fidl_next::wire::Box::encode_absent(out);
1966            }
1967
1968            Ok(())
1969        }
1970    }
1971
1972    impl<'de> ::fidl_next::FromWire<crate::wire::NodeManagerAddNodeRequest<'de>>
1973        for NodeManagerAddNodeRequest
1974    {
1975        #[inline]
1976        fn from_wire(wire: crate::wire::NodeManagerAddNodeRequest<'de>) -> Self {
1977            Self {
1978                node: ::fidl_next::FromWire::from_wire(wire.node),
1979
1980                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1981
1982                node_ref: ::fidl_next::FromWire::from_wire(wire.node_ref),
1983            }
1984        }
1985    }
1986}
1987
1988pub mod wire {
1989
1990    pub use fidl_next_common_fuchsia_driver_framework::wire::*;
1991
1992    /// The wire type corresponding to [`DevfsAddArgs`].
1993    #[repr(C)]
1994    pub struct DevfsAddArgs<'de> {
1995        pub(crate) table: ::fidl_next::wire::Table<'de>,
1996    }
1997
1998    impl<'de> Drop for DevfsAddArgs<'de> {
1999        fn drop(&mut self) {
2000            let _ = self.table.get(1).map(|envelope| unsafe {
2001                envelope.read_unchecked::<::fidl_next::ClientEnd<
2002                    ::fidl_next_fuchsia_device_fs::Connector,
2003                    ::fidl_next::wire::fuchsia::Channel,
2004                >>()
2005            });
2006
2007            let _ = self.table.get(2).map(|envelope| unsafe {
2008                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2009            });
2010
2011            let _ = self.table.get(3).map(|envelope| unsafe {
2012                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2013            });
2014
2015            let _ = self.table.get(4).map(|envelope| unsafe {
2016                envelope.read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
2017            });
2018
2019            let _ = self.table.get(5).map(|envelope| unsafe {
2020                envelope.read_unchecked::<::fidl_next::ClientEnd<
2021                    ::fidl_next_fuchsia_device_fs::Connector,
2022                    ::fidl_next::wire::fuchsia::Channel,
2023                >>()
2024            });
2025        }
2026    }
2027
2028    impl ::fidl_next::Constrained for DevfsAddArgs<'_> {
2029        type Constraint = ();
2030
2031        fn validate(
2032            _: ::fidl_next::Slot<'_, Self>,
2033            _: Self::Constraint,
2034        ) -> Result<(), ::fidl_next::ValidationError> {
2035            Ok(())
2036        }
2037    }
2038
2039    unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
2040        type Narrowed<'de> = DevfsAddArgs<'de>;
2041
2042        #[inline]
2043        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2044            ::fidl_next::munge!(let Self { table } = out);
2045            ::fidl_next::wire::Table::zero_padding(table);
2046        }
2047    }
2048
2049    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'de>
2050    where
2051        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2052        ___D: ::fidl_next::fuchsia::HandleDecoder,
2053    {
2054        fn decode(
2055            slot: ::fidl_next::Slot<'_, Self>,
2056            decoder: &mut ___D,
2057            _: (),
2058        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2059            ::fidl_next::munge!(let Self { table } = slot);
2060
2061            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2062                match ordinal {
2063                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2064
2065                    1 => {
2066                        ::fidl_next::wire::Envelope::decode_as::<
2067                            ___D,
2068                            ::fidl_next::ClientEnd<
2069                                ::fidl_next_fuchsia_device_fs::Connector,
2070                                ::fidl_next::wire::fuchsia::Channel,
2071                            >,
2072                        >(slot.as_mut(), decoder, ())?;
2073
2074                        Ok(())
2075                    }
2076
2077                    2 => {
2078                        ::fidl_next::wire::Envelope::decode_as::<
2079                            ___D,
2080                            ::fidl_next::wire::String<'de>,
2081                        >(slot.as_mut(), decoder, 255)?;
2082
2083                        let value = unsafe {
2084                            slot.deref_unchecked()
2085                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2086                        };
2087
2088                        if value.len() > 255 {
2089                            return Err(::fidl_next::DecodeError::VectorTooLong {
2090                                size: value.len() as u64,
2091                                limit: 255,
2092                            });
2093                        }
2094
2095                        Ok(())
2096                    }
2097
2098                    3 => {
2099                        ::fidl_next::wire::Envelope::decode_as::<
2100                            ___D,
2101                            ::fidl_next::wire::fuchsia::Vmo,
2102                        >(slot.as_mut(), decoder, ())?;
2103
2104                        Ok(())
2105                    }
2106
2107                    4 => {
2108                        ::fidl_next::wire::Envelope::decode_as::<
2109                            ___D,
2110                            ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
2111                        >(slot.as_mut(), decoder, ())?;
2112
2113                        Ok(())
2114                    }
2115
2116                    5 => {
2117                        ::fidl_next::wire::Envelope::decode_as::<
2118                            ___D,
2119                            ::fidl_next::ClientEnd<
2120                                ::fidl_next_fuchsia_device_fs::Connector,
2121                                ::fidl_next::wire::fuchsia::Channel,
2122                            >,
2123                        >(slot.as_mut(), decoder, ())?;
2124
2125                        Ok(())
2126                    }
2127
2128                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2129                }
2130            })
2131        }
2132    }
2133
2134    impl<'de> DevfsAddArgs<'de> {
2135        pub fn connector(
2136            &self,
2137        ) -> ::core::option::Option<
2138            &::fidl_next::ClientEnd<
2139                ::fidl_next_fuchsia_device_fs::Connector,
2140                ::fidl_next::wire::fuchsia::Channel,
2141            >,
2142        > {
2143            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2144        }
2145
2146        pub fn take_connector(
2147            &mut self,
2148        ) -> ::core::option::Option<
2149            ::fidl_next::ClientEnd<
2150                ::fidl_next_fuchsia_device_fs::Connector,
2151                ::fidl_next::wire::fuchsia::Channel,
2152            >,
2153        > {
2154            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2155        }
2156
2157        pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2158            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2159        }
2160
2161        pub fn take_class_name(
2162            &mut self,
2163        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2164            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2165        }
2166
2167        pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2168            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2169        }
2170
2171        pub fn take_inspect(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2172            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2173        }
2174
2175        pub fn connector_supports(
2176            &self,
2177        ) -> ::core::option::Option<&::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2178            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2179        }
2180
2181        pub fn take_connector_supports(
2182            &mut self,
2183        ) -> ::core::option::Option<::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
2184            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2185        }
2186
2187        pub fn controller_connector(
2188            &self,
2189        ) -> ::core::option::Option<
2190            &::fidl_next::ClientEnd<
2191                ::fidl_next_fuchsia_device_fs::Connector,
2192                ::fidl_next::wire::fuchsia::Channel,
2193            >,
2194        > {
2195            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2196        }
2197
2198        pub fn take_controller_connector(
2199            &mut self,
2200        ) -> ::core::option::Option<
2201            ::fidl_next::ClientEnd<
2202                ::fidl_next_fuchsia_device_fs::Connector,
2203                ::fidl_next::wire::fuchsia::Channel,
2204            >,
2205        > {
2206            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2207        }
2208    }
2209
2210    impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
2211        fn fmt(
2212            &self,
2213            f: &mut ::core::fmt::Formatter<'_>,
2214        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2215            f.debug_struct("DevfsAddArgs")
2216                .field("connector", &self.connector())
2217                .field("class_name", &self.class_name())
2218                .field("inspect", &self.inspect())
2219                .field("connector_supports", &self.connector_supports())
2220                .field("controller_connector", &self.controller_connector())
2221                .finish()
2222        }
2223    }
2224
2225    impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
2226        type Natural = crate::natural::DevfsAddArgs;
2227    }
2228
2229    /// The wire type corresponding to [`PowerElementArgs`].
2230    #[repr(C)]
2231    pub struct PowerElementArgs<'de> {
2232        pub(crate) table: ::fidl_next::wire::Table<'de>,
2233    }
2234
2235    impl<'de> Drop for PowerElementArgs<'de> {
2236        fn drop(&mut self) {
2237            let _ = self.table.get(1).map(|envelope| unsafe {
2238                envelope.read_unchecked::<::fidl_next::ClientEnd<
2239                    ::fidl_next_fuchsia_power_broker::ElementControl,
2240                    ::fidl_next::wire::fuchsia::Channel,
2241                >>()
2242            });
2243
2244            let _ = self.table.get(2).map(|envelope| unsafe {
2245                envelope.read_unchecked::<::fidl_next::ServerEnd<
2246                    ::fidl_next_fuchsia_power_broker::ElementRunner,
2247                    ::fidl_next::wire::fuchsia::Channel,
2248                >>()
2249            });
2250
2251            let _ = self.table.get(3).map(|envelope| unsafe {
2252                envelope.read_unchecked::<::fidl_next::ClientEnd<
2253                    ::fidl_next_fuchsia_power_broker::Lessor,
2254                    ::fidl_next::wire::fuchsia::Channel,
2255                >>()
2256            });
2257
2258            let _ = self.table.get(4).map(|envelope| unsafe {
2259                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2260            });
2261        }
2262    }
2263
2264    impl ::fidl_next::Constrained for PowerElementArgs<'_> {
2265        type Constraint = ();
2266
2267        fn validate(
2268            _: ::fidl_next::Slot<'_, Self>,
2269            _: Self::Constraint,
2270        ) -> Result<(), ::fidl_next::ValidationError> {
2271            Ok(())
2272        }
2273    }
2274
2275    unsafe impl ::fidl_next::Wire for PowerElementArgs<'static> {
2276        type Narrowed<'de> = PowerElementArgs<'de>;
2277
2278        #[inline]
2279        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2280            ::fidl_next::munge!(let Self { table } = out);
2281            ::fidl_next::wire::Table::zero_padding(table);
2282        }
2283    }
2284
2285    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for PowerElementArgs<'de>
2286    where
2287        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2288        ___D: ::fidl_next::fuchsia::HandleDecoder,
2289    {
2290        fn decode(
2291            slot: ::fidl_next::Slot<'_, Self>,
2292            decoder: &mut ___D,
2293            _: (),
2294        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2295            ::fidl_next::munge!(let Self { table } = slot);
2296
2297            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2298                match ordinal {
2299                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2300
2301                    1 => {
2302                        ::fidl_next::wire::Envelope::decode_as::<
2303                            ___D,
2304                            ::fidl_next::ClientEnd<
2305                                ::fidl_next_fuchsia_power_broker::ElementControl,
2306                                ::fidl_next::wire::fuchsia::Channel,
2307                            >,
2308                        >(slot.as_mut(), decoder, ())?;
2309
2310                        Ok(())
2311                    }
2312
2313                    2 => {
2314                        ::fidl_next::wire::Envelope::decode_as::<
2315                            ___D,
2316                            ::fidl_next::ServerEnd<
2317                                ::fidl_next_fuchsia_power_broker::ElementRunner,
2318                                ::fidl_next::wire::fuchsia::Channel,
2319                            >,
2320                        >(slot.as_mut(), decoder, ())?;
2321
2322                        Ok(())
2323                    }
2324
2325                    3 => {
2326                        ::fidl_next::wire::Envelope::decode_as::<
2327                            ___D,
2328                            ::fidl_next::ClientEnd<
2329                                ::fidl_next_fuchsia_power_broker::Lessor,
2330                                ::fidl_next::wire::fuchsia::Channel,
2331                            >,
2332                        >(slot.as_mut(), decoder, ())?;
2333
2334                        Ok(())
2335                    }
2336
2337                    4 => {
2338                        ::fidl_next::wire::Envelope::decode_as::<
2339                            ___D,
2340                            ::fidl_next::wire::fuchsia::Event,
2341                        >(slot.as_mut(), decoder, ())?;
2342
2343                        Ok(())
2344                    }
2345
2346                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2347                }
2348            })
2349        }
2350    }
2351
2352    impl<'de> PowerElementArgs<'de> {
2353        pub fn control_client(
2354            &self,
2355        ) -> ::core::option::Option<
2356            &::fidl_next::ClientEnd<
2357                ::fidl_next_fuchsia_power_broker::ElementControl,
2358                ::fidl_next::wire::fuchsia::Channel,
2359            >,
2360        > {
2361            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2362        }
2363
2364        pub fn take_control_client(
2365            &mut self,
2366        ) -> ::core::option::Option<
2367            ::fidl_next::ClientEnd<
2368                ::fidl_next_fuchsia_power_broker::ElementControl,
2369                ::fidl_next::wire::fuchsia::Channel,
2370            >,
2371        > {
2372            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2373        }
2374
2375        pub fn runner_server(
2376            &self,
2377        ) -> ::core::option::Option<
2378            &::fidl_next::ServerEnd<
2379                ::fidl_next_fuchsia_power_broker::ElementRunner,
2380                ::fidl_next::wire::fuchsia::Channel,
2381            >,
2382        > {
2383            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2384        }
2385
2386        pub fn take_runner_server(
2387            &mut self,
2388        ) -> ::core::option::Option<
2389            ::fidl_next::ServerEnd<
2390                ::fidl_next_fuchsia_power_broker::ElementRunner,
2391                ::fidl_next::wire::fuchsia::Channel,
2392            >,
2393        > {
2394            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2395        }
2396
2397        pub fn lessor_client(
2398            &self,
2399        ) -> ::core::option::Option<
2400            &::fidl_next::ClientEnd<
2401                ::fidl_next_fuchsia_power_broker::Lessor,
2402                ::fidl_next::wire::fuchsia::Channel,
2403            >,
2404        > {
2405            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2406        }
2407
2408        pub fn take_lessor_client(
2409            &mut self,
2410        ) -> ::core::option::Option<
2411            ::fidl_next::ClientEnd<
2412                ::fidl_next_fuchsia_power_broker::Lessor,
2413                ::fidl_next::wire::fuchsia::Channel,
2414            >,
2415        > {
2416            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2417        }
2418
2419        pub fn token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2420            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2421        }
2422
2423        pub fn take_token(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2424            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2425        }
2426    }
2427
2428    impl<'de> ::core::fmt::Debug for PowerElementArgs<'de> {
2429        fn fmt(
2430            &self,
2431            f: &mut ::core::fmt::Formatter<'_>,
2432        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2433            f.debug_struct("PowerElementArgs")
2434                .field("control_client", &self.control_client())
2435                .field("runner_server", &self.runner_server())
2436                .field("lessor_client", &self.lessor_client())
2437                .field("token", &self.token())
2438                .finish()
2439        }
2440    }
2441
2442    impl<'de> ::fidl_next::IntoNatural for PowerElementArgs<'de> {
2443        type Natural = crate::natural::PowerElementArgs;
2444    }
2445
2446    /// The wire type corresponding to [`DriverResumeRequest`].
2447    #[derive(Debug)]
2448    #[repr(C)]
2449    pub struct DriverResumeRequest {
2450        pub power_element_lease: ::fidl_next::wire::fuchsia::OptionalEventPair,
2451    }
2452
2453    static_assertions::const_assert_eq!(std::mem::size_of::<DriverResumeRequest>(), 4);
2454    static_assertions::const_assert_eq!(std::mem::align_of::<DriverResumeRequest>(), 4);
2455
2456    static_assertions::const_assert_eq!(
2457        std::mem::offset_of!(DriverResumeRequest, power_element_lease),
2458        0
2459    );
2460
2461    impl ::fidl_next::Constrained for DriverResumeRequest {
2462        type Constraint = ();
2463
2464        fn validate(
2465            _: ::fidl_next::Slot<'_, Self>,
2466            _: Self::Constraint,
2467        ) -> Result<(), ::fidl_next::ValidationError> {
2468            Ok(())
2469        }
2470    }
2471
2472    unsafe impl ::fidl_next::Wire for DriverResumeRequest {
2473        type Narrowed<'de> = DriverResumeRequest;
2474
2475        #[inline]
2476        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2477            ::fidl_next::munge! {
2478                let Self {
2479                    power_element_lease,
2480
2481                } = &mut *out_;
2482            }
2483
2484            ::fidl_next::Wire::zero_padding(power_element_lease);
2485        }
2486    }
2487
2488    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResumeRequest
2489    where
2490        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2491        ___D: ::fidl_next::fuchsia::HandleDecoder,
2492    {
2493        fn decode(
2494            slot_: ::fidl_next::Slot<'_, Self>,
2495            decoder_: &mut ___D,
2496            _: (),
2497        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2498            ::fidl_next::munge! {
2499                let Self {
2500                    mut power_element_lease,
2501
2502                } = slot_;
2503            }
2504
2505            let _field = power_element_lease.as_mut();
2506
2507            ::fidl_next::Decode::decode(power_element_lease.as_mut(), decoder_, ())?;
2508
2509            Ok(())
2510        }
2511    }
2512
2513    impl ::fidl_next::IntoNatural for DriverResumeRequest {
2514        type Natural = crate::natural::DriverResumeRequest;
2515    }
2516
2517    /// The wire type corresponding to [`DriverStartArgs`].
2518    #[repr(C)]
2519    pub struct DriverStartArgs<'de> {
2520        pub(crate) table: ::fidl_next::wire::Table<'de>,
2521    }
2522
2523    impl<'de> Drop for DriverStartArgs<'de> {
2524        fn drop(&mut self) {
2525            let _ = self.table.get(1)
2526                .map(|envelope| unsafe {
2527                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>>()
2528                });
2529
2530            let _ = self.table.get(2).map(|envelope| unsafe {
2531                envelope
2532                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
2533                    )
2534            });
2535
2536            let _ = self.table.get(3).map(|envelope| unsafe {
2537                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2538            });
2539
2540            let _ = self.table.get(4).map(|envelope| unsafe {
2541                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
2542            });
2543
2544            let _ = self.table.get(5).map(|envelope| unsafe {
2545                envelope.read_unchecked::<::fidl_next::wire::Vector<
2546                    'de,
2547                    ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2548                >>()
2549            });
2550
2551            let _ = self.table.get(6).map(|envelope| unsafe {
2552                envelope.read_unchecked::<::fidl_next::ServerEnd<
2553                    ::fidl_next_fuchsia_io::Directory,
2554                    ::fidl_next::wire::fuchsia::Channel,
2555                >>()
2556            });
2557
2558            let _ = self.table.get(7).map(|envelope| unsafe {
2559                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmo>()
2560            });
2561
2562            let _ = self.table.get(8).map(|envelope| unsafe {
2563                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
2564            });
2565
2566            let _ = self.table.get(10).map(|envelope| unsafe {
2567                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
2568            });
2569
2570            let _ = self.table.get(11).map(|envelope| unsafe {
2571                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
2572            });
2573
2574            let _ = self.table.get(12)
2575                .map(|envelope| unsafe {
2576                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>>()
2577                });
2578
2579            let _ = self.table.get(13).map(|envelope| unsafe {
2580                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Vmar>()
2581            });
2582
2583            let _ = self.table.get(14).map(|envelope| unsafe {
2584                envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>()
2585            });
2586
2587            let _ = self.table.get(15).map(|envelope| unsafe {
2588                envelope.read_unchecked::<::fidl_next::ClientEnd<
2589                    ::fidl_next_fuchsia_logger::LogSink,
2590                    ::fidl_next::wire::fuchsia::Channel,
2591                >>()
2592            });
2593        }
2594    }
2595
2596    impl ::fidl_next::Constrained for DriverStartArgs<'_> {
2597        type Constraint = ();
2598
2599        fn validate(
2600            _: ::fidl_next::Slot<'_, Self>,
2601            _: Self::Constraint,
2602        ) -> Result<(), ::fidl_next::ValidationError> {
2603            Ok(())
2604        }
2605    }
2606
2607    unsafe impl ::fidl_next::Wire for DriverStartArgs<'static> {
2608        type Narrowed<'de> = DriverStartArgs<'de>;
2609
2610        #[inline]
2611        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2612            ::fidl_next::munge!(let Self { table } = out);
2613            ::fidl_next::wire::Table::zero_padding(table);
2614        }
2615    }
2616
2617    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartArgs<'de>
2618    where
2619        ___D: ::fidl_next::Decoder<'de> + ?Sized,
2620        ___D: ::fidl_next::fuchsia::HandleDecoder,
2621    {
2622        fn decode(
2623            slot: ::fidl_next::Slot<'_, Self>,
2624            decoder: &mut ___D,
2625            _: (),
2626        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2627            ::fidl_next::munge!(let Self { table } = slot);
2628
2629            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2630                match ordinal {
2631                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2632
2633                    1 => {
2634                        ::fidl_next::wire::Envelope::decode_as::<
2635                            ___D,
2636                            ::fidl_next::ClientEnd<
2637                                crate::Node,
2638                                ::fidl_next::wire::fuchsia::Channel,
2639                            >,
2640                        >(slot.as_mut(), decoder, ())?;
2641
2642                        Ok(())
2643                    }
2644
2645                    2 => {
2646                        ::fidl_next::wire::Envelope::decode_as::<
2647                            ___D,
2648                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
2649                        >(slot.as_mut(), decoder, (64, ()))?;
2650
2651                        let value = unsafe {
2652                            slot
2653                                            .deref_unchecked()
2654                                            .deref_unchecked::<
2655                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
2656                                            >()
2657                        };
2658
2659                        if value.len() > 64 {
2660                            return Err(::fidl_next::DecodeError::VectorTooLong {
2661                                size: value.len() as u64,
2662                                limit: 64,
2663                            });
2664                        }
2665
2666                        Ok(())
2667                    }
2668
2669                    3 => {
2670                        ::fidl_next::wire::Envelope::decode_as::<
2671                            ___D,
2672                            ::fidl_next::wire::String<'de>,
2673                        >(slot.as_mut(), decoder, 4096)?;
2674
2675                        let value = unsafe {
2676                            slot.deref_unchecked()
2677                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
2678                        };
2679
2680                        if value.len() > 4096 {
2681                            return Err(::fidl_next::DecodeError::VectorTooLong {
2682                                size: value.len() as u64,
2683                                limit: 4096,
2684                            });
2685                        }
2686
2687                        Ok(())
2688                    }
2689
2690                    4 => {
2691                        ::fidl_next::wire::Envelope::decode_as::<
2692                            ___D,
2693                            ::fidl_next_fuchsia_data::wire::Dictionary<'de>,
2694                        >(slot.as_mut(), decoder, ())?;
2695
2696                        Ok(())
2697                    }
2698
2699                    5 => {
2700                        ::fidl_next::wire::Envelope::decode_as::<
2701                            ___D,
2702                            ::fidl_next::wire::Vector<
2703                                'de,
2704                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2705                                    'de,
2706                                >,
2707                            >,
2708                        >(slot.as_mut(), decoder, (32, ()))?;
2709
2710                        let value = unsafe {
2711                            slot.deref_unchecked().deref_unchecked::<::fidl_next::wire::Vector<
2712                                '_,
2713                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2714                                    '_,
2715                                >,
2716                            >>()
2717                        };
2718
2719                        if value.len() > 32 {
2720                            return Err(::fidl_next::DecodeError::VectorTooLong {
2721                                size: value.len() as u64,
2722                                limit: 32,
2723                            });
2724                        }
2725
2726                        Ok(())
2727                    }
2728
2729                    6 => {
2730                        ::fidl_next::wire::Envelope::decode_as::<
2731                            ___D,
2732                            ::fidl_next::ServerEnd<
2733                                ::fidl_next_fuchsia_io::Directory,
2734                                ::fidl_next::wire::fuchsia::Channel,
2735                            >,
2736                        >(slot.as_mut(), decoder, ())?;
2737
2738                        Ok(())
2739                    }
2740
2741                    7 => {
2742                        ::fidl_next::wire::Envelope::decode_as::<
2743                            ___D,
2744                            ::fidl_next::wire::fuchsia::Vmo,
2745                        >(slot.as_mut(), decoder, ())?;
2746
2747                        Ok(())
2748                    }
2749
2750                    8 => {
2751                        ::fidl_next::wire::Envelope::decode_as::<
2752                            ___D,
2753                            ::fidl_next::wire::String<'de>,
2754                        >(slot.as_mut(), decoder, 4294967295)?;
2755
2756                        Ok(())
2757                    }
2758
2759                    10 => {
2760                        ::fidl_next::wire::Envelope::decode_as::<
2761                            ___D,
2762                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
2763                        >(slot.as_mut(), decoder, (128, ()))?;
2764
2765                        let value = unsafe {
2766                            slot
2767                                            .deref_unchecked()
2768                                            .deref_unchecked::<
2769                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
2770                                            >()
2771                        };
2772
2773                        if value.len() > 128 {
2774                            return Err(::fidl_next::DecodeError::VectorTooLong {
2775                                size: value.len() as u64,
2776                                limit: 128,
2777                            });
2778                        }
2779
2780                        Ok(())
2781                    }
2782
2783                    11 => {
2784                        ::fidl_next::wire::Envelope::decode_as::<
2785                            ___D,
2786                            ::fidl_next::wire::fuchsia::Event,
2787                        >(slot.as_mut(), decoder, ())?;
2788
2789                        Ok(())
2790                    }
2791
2792                    12 => {
2793                        ::fidl_next::wire::Envelope::decode_as::<
2794                            ___D,
2795                            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2796                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2797
2798                        Ok(())
2799                    }
2800
2801                    13 => {
2802                        ::fidl_next::wire::Envelope::decode_as::<
2803                            ___D,
2804                            ::fidl_next::wire::fuchsia::Vmar,
2805                        >(slot.as_mut(), decoder, ())?;
2806
2807                        Ok(())
2808                    }
2809
2810                    14 => {
2811                        ::fidl_next::wire::Envelope::decode_as::<
2812                            ___D,
2813                            crate::wire::PowerElementArgs<'de>,
2814                        >(slot.as_mut(), decoder, ())?;
2815
2816                        Ok(())
2817                    }
2818
2819                    15 => {
2820                        ::fidl_next::wire::Envelope::decode_as::<
2821                            ___D,
2822                            ::fidl_next::ClientEnd<
2823                                ::fidl_next_fuchsia_logger::LogSink,
2824                                ::fidl_next::wire::fuchsia::Channel,
2825                            >,
2826                        >(slot.as_mut(), decoder, ())?;
2827
2828                        Ok(())
2829                    }
2830
2831                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
2832                }
2833            })
2834        }
2835    }
2836
2837    impl<'de> DriverStartArgs<'de> {
2838        pub fn node(
2839            &self,
2840        ) -> ::core::option::Option<
2841            &::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2842        > {
2843            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2844        }
2845
2846        pub fn take_node(
2847            &mut self,
2848        ) -> ::core::option::Option<
2849            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::wire::fuchsia::Channel>,
2850        > {
2851            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
2852        }
2853
2854        pub fn symbols(
2855            &self,
2856        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2857        {
2858            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2859        }
2860
2861        pub fn take_symbols(
2862            &mut self,
2863        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
2864        {
2865            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
2866        }
2867
2868        pub fn url(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2869            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2870        }
2871
2872        pub fn take_url(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2873            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
2874        }
2875
2876        pub fn program(
2877            &self,
2878        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2879            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2880        }
2881
2882        pub fn take_program(
2883            &mut self,
2884        ) -> ::core::option::Option<::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2885            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
2886        }
2887
2888        pub fn incoming(
2889            &self,
2890        ) -> ::core::option::Option<
2891            &::fidl_next::wire::Vector<
2892                'de,
2893                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2894            >,
2895        > {
2896            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2897        }
2898
2899        pub fn take_incoming(
2900            &mut self,
2901        ) -> ::core::option::Option<
2902            ::fidl_next::wire::Vector<
2903                'de,
2904                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2905            >,
2906        > {
2907            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
2908        }
2909
2910        pub fn outgoing_dir(
2911            &self,
2912        ) -> ::core::option::Option<
2913            &::fidl_next::ServerEnd<
2914                ::fidl_next_fuchsia_io::Directory,
2915                ::fidl_next::wire::fuchsia::Channel,
2916            >,
2917        > {
2918            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2919        }
2920
2921        pub fn take_outgoing_dir(
2922            &mut self,
2923        ) -> ::core::option::Option<
2924            ::fidl_next::ServerEnd<
2925                ::fidl_next_fuchsia_io::Directory,
2926                ::fidl_next::wire::fuchsia::Channel,
2927            >,
2928        > {
2929            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
2930        }
2931
2932        pub fn config(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmo> {
2933            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2934        }
2935
2936        pub fn take_config(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmo> {
2937            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
2938        }
2939
2940        pub fn node_name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
2941            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2942        }
2943
2944        pub fn take_node_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
2945            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
2946        }
2947
2948        pub fn node_offers(
2949            &self,
2950        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
2951        {
2952            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2953        }
2954
2955        pub fn take_node_offers(
2956            &mut self,
2957        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
2958        {
2959            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
2960        }
2961
2962        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
2963            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2964        }
2965
2966        pub fn take_node_token(
2967            &mut self,
2968        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
2969            unsafe { Some(self.table.get_mut(11)?.take_unchecked()) }
2970        }
2971
2972        pub fn node_properties_2(
2973            &self,
2974        ) -> ::core::option::Option<
2975            &::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2976        > {
2977            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
2978        }
2979
2980        pub fn take_node_properties_2(
2981            &mut self,
2982        ) -> ::core::option::Option<
2983            ::fidl_next::wire::Vector<'de, crate::wire::NodePropertyEntry2<'de>>,
2984        > {
2985            unsafe { Some(self.table.get_mut(12)?.take_unchecked()) }
2986        }
2987
2988        pub fn vmar(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Vmar> {
2989            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
2990        }
2991
2992        pub fn take_vmar(&mut self) -> ::core::option::Option<::fidl_next::wire::fuchsia::Vmar> {
2993            unsafe { Some(self.table.get_mut(13)?.take_unchecked()) }
2994        }
2995
2996        pub fn power_element_args(
2997            &self,
2998        ) -> ::core::option::Option<&crate::wire::PowerElementArgs<'de>> {
2999            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
3000        }
3001
3002        pub fn take_power_element_args(
3003            &mut self,
3004        ) -> ::core::option::Option<crate::wire::PowerElementArgs<'de>> {
3005            unsafe { Some(self.table.get_mut(14)?.take_unchecked()) }
3006        }
3007
3008        pub fn log_sink(
3009            &self,
3010        ) -> ::core::option::Option<
3011            &::fidl_next::ClientEnd<
3012                ::fidl_next_fuchsia_logger::LogSink,
3013                ::fidl_next::wire::fuchsia::Channel,
3014            >,
3015        > {
3016            unsafe { Some(self.table.get(15)?.deref_unchecked()) }
3017        }
3018
3019        pub fn take_log_sink(
3020            &mut self,
3021        ) -> ::core::option::Option<
3022            ::fidl_next::ClientEnd<
3023                ::fidl_next_fuchsia_logger::LogSink,
3024                ::fidl_next::wire::fuchsia::Channel,
3025            >,
3026        > {
3027            unsafe { Some(self.table.get_mut(15)?.take_unchecked()) }
3028        }
3029    }
3030
3031    impl<'de> ::core::fmt::Debug for DriverStartArgs<'de> {
3032        fn fmt(
3033            &self,
3034            f: &mut ::core::fmt::Formatter<'_>,
3035        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3036            f.debug_struct("DriverStartArgs")
3037                .field("node", &self.node())
3038                .field("symbols", &self.symbols())
3039                .field("url", &self.url())
3040                .field("program", &self.program())
3041                .field("incoming", &self.incoming())
3042                .field("outgoing_dir", &self.outgoing_dir())
3043                .field("config", &self.config())
3044                .field("node_name", &self.node_name())
3045                .field("node_offers", &self.node_offers())
3046                .field("node_token", &self.node_token())
3047                .field("node_properties_2", &self.node_properties_2())
3048                .field("vmar", &self.vmar())
3049                .field("power_element_args", &self.power_element_args())
3050                .field("log_sink", &self.log_sink())
3051                .finish()
3052        }
3053    }
3054
3055    impl<'de> ::fidl_next::IntoNatural for DriverStartArgs<'de> {
3056        type Natural = crate::natural::DriverStartArgs;
3057    }
3058
3059    /// The wire type corresponding to [`DriverStartRequest`].
3060    #[derive(Debug)]
3061    #[repr(C)]
3062    pub struct DriverStartRequest<'de> {
3063        pub start_args: crate::wire::DriverStartArgs<'de>,
3064    }
3065
3066    static_assertions::const_assert_eq!(std::mem::size_of::<DriverStartRequest<'_>>(), 16);
3067    static_assertions::const_assert_eq!(std::mem::align_of::<DriverStartRequest<'_>>(), 8);
3068
3069    static_assertions::const_assert_eq!(
3070        std::mem::offset_of!(DriverStartRequest<'_>, start_args),
3071        0
3072    );
3073
3074    impl ::fidl_next::Constrained for DriverStartRequest<'_> {
3075        type Constraint = ();
3076
3077        fn validate(
3078            _: ::fidl_next::Slot<'_, Self>,
3079            _: Self::Constraint,
3080        ) -> Result<(), ::fidl_next::ValidationError> {
3081            Ok(())
3082        }
3083    }
3084
3085    unsafe impl ::fidl_next::Wire for DriverStartRequest<'static> {
3086        type Narrowed<'de> = DriverStartRequest<'de>;
3087
3088        #[inline]
3089        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3090            ::fidl_next::munge! {
3091                let Self {
3092                    start_args,
3093
3094                } = &mut *out_;
3095            }
3096
3097            ::fidl_next::Wire::zero_padding(start_args);
3098        }
3099    }
3100
3101    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverStartRequest<'de>
3102    where
3103        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3104        ___D: ::fidl_next::Decoder<'de>,
3105        ___D: ::fidl_next::fuchsia::HandleDecoder,
3106    {
3107        fn decode(
3108            slot_: ::fidl_next::Slot<'_, Self>,
3109            decoder_: &mut ___D,
3110            _: (),
3111        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3112            ::fidl_next::munge! {
3113                let Self {
3114                    mut start_args,
3115
3116                } = slot_;
3117            }
3118
3119            let _field = start_args.as_mut();
3120
3121            ::fidl_next::Decode::decode(start_args.as_mut(), decoder_, ())?;
3122
3123            Ok(())
3124        }
3125    }
3126
3127    impl<'de> ::fidl_next::IntoNatural for DriverStartRequest<'de> {
3128        type Natural = crate::natural::DriverStartRequest;
3129    }
3130
3131    /// The wire type corresponding to [`DriverResult`].
3132    #[repr(transparent)]
3133    pub struct DriverResult<'de> {
3134        pub(crate) raw: ::fidl_next::wire::Union,
3135        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3136    }
3137
3138    impl<'de> Drop for DriverResult<'de> {
3139        fn drop(&mut self) {
3140            match self.raw.ordinal() {
3141                1 => {
3142                    let _ = unsafe {
3143                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3144                    };
3145                }
3146
3147                2 => {
3148                    let _ = unsafe {
3149                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3150                    };
3151                }
3152
3153                3 => {
3154                    let _ = unsafe {
3155                        self.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3156                    };
3157                }
3158
3159                _ => (),
3160            }
3161        }
3162    }
3163
3164    impl ::fidl_next::Constrained for DriverResult<'_> {
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 DriverResult<'static> {
3176        type Narrowed<'de> = DriverResult<'de>;
3177
3178        #[inline]
3179        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3180            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3181            ::fidl_next::wire::Union::zero_padding(raw);
3182        }
3183    }
3184
3185    pub mod driver_result {
3186        pub enum Ref<'de> {
3187            DriverStartedNodeToken(&'de ::fidl_next::wire::fuchsia::Event),
3188
3189            MatchError(&'de ::fidl_next::wire::fuchsia::StatusResult),
3190
3191            StartError(&'de ::fidl_next::wire::fuchsia::StatusResult),
3192
3193            UnknownOrdinal_(u64),
3194        }
3195
3196        pub enum Value {
3197            DriverStartedNodeToken(::fidl_next::wire::fuchsia::Event),
3198
3199            MatchError(::fidl_next::wire::fuchsia::StatusResult),
3200
3201            StartError(::fidl_next::wire::fuchsia::StatusResult),
3202
3203            UnknownOrdinal_(u64),
3204        }
3205    }
3206
3207    impl<'de> DriverResult<'de> {
3208        pub fn as_ref(&self) -> crate::wire::driver_result::Ref<'_> {
3209            match self.raw.ordinal() {
3210                1 => crate::wire::driver_result::Ref::DriverStartedNodeToken(unsafe {
3211                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>()
3212                }),
3213
3214                2 => crate::wire::driver_result::Ref::MatchError(unsafe {
3215                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3216                }),
3217
3218                3 => crate::wire::driver_result::Ref::StartError(unsafe {
3219                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3220                }),
3221
3222                unknown => crate::wire::driver_result::Ref::UnknownOrdinal_(unknown),
3223            }
3224        }
3225
3226        pub fn into_inner(self) -> crate::wire::driver_result::Value {
3227            let this = ::core::mem::ManuallyDrop::new(self);
3228
3229            match this.raw.ordinal() {
3230                1 => crate::wire::driver_result::Value::DriverStartedNodeToken(unsafe {
3231                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::Event>()
3232                }),
3233
3234                2 => crate::wire::driver_result::Value::MatchError(unsafe {
3235                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3236                }),
3237
3238                3 => crate::wire::driver_result::Value::StartError(unsafe {
3239                    this.raw.get().read_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3240                }),
3241
3242                unknown => crate::wire::driver_result::Value::UnknownOrdinal_(unknown),
3243            }
3244        }
3245    }
3246
3247    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
3248    where
3249        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3250        ___D: ::fidl_next::Decoder<'de>,
3251        ___D: ::fidl_next::fuchsia::HandleDecoder,
3252    {
3253        fn decode(
3254            mut slot: ::fidl_next::Slot<'_, Self>,
3255            decoder: &mut ___D,
3256            _: (),
3257        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3258            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3259            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3260                1 => {
3261                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
3262                        raw,
3263                        decoder,
3264                        (),
3265                    )?
3266                }
3267
3268                2 => ::fidl_next::wire::Union::decode_as::<
3269                    ___D,
3270                    ::fidl_next::wire::fuchsia::StatusResult,
3271                >(raw, decoder, ())?,
3272
3273                3 => ::fidl_next::wire::Union::decode_as::<
3274                    ___D,
3275                    ::fidl_next::wire::fuchsia::StatusResult,
3276                >(raw, decoder, ())?,
3277
3278                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3279            }
3280
3281            Ok(())
3282        }
3283    }
3284
3285    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
3286        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3287            match self.raw.ordinal() {
3288                1 => unsafe {
3289                    self.raw.get().deref_unchecked::<::fidl_next::wire::fuchsia::Event>().fmt(f)
3290                },
3291                2 => unsafe {
3292                    self.raw
3293                        .get()
3294                        .deref_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3295                        .fmt(f)
3296                },
3297                3 => unsafe {
3298                    self.raw
3299                        .get()
3300                        .deref_unchecked::<::fidl_next::wire::fuchsia::StatusResult>()
3301                        .fmt(f)
3302                },
3303                _ => unsafe { ::core::hint::unreachable_unchecked() },
3304            }
3305        }
3306    }
3307
3308    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
3309        type Natural = crate::natural::DriverResult;
3310    }
3311
3312    /// The wire type corresponding to [`NodeAddArgs`].
3313    #[repr(C)]
3314    pub struct NodeAddArgs<'de> {
3315        pub(crate) table: ::fidl_next::wire::Table<'de>,
3316    }
3317
3318    impl<'de> Drop for NodeAddArgs<'de> {
3319        fn drop(&mut self) {
3320            let _ = self.table.get(1).map(|envelope| unsafe {
3321                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3322            });
3323
3324            let _ = self.table.get(3).map(|envelope| unsafe {
3325                envelope
3326                    .read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>(
3327                    )
3328            });
3329
3330            let _ = self.table.get(5).map(|envelope| unsafe {
3331                envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>()
3332            });
3333
3334            let _ = self.table.get(6).map(|envelope| unsafe {
3335                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3336            });
3337
3338            let _ = self
3339                .table
3340                .get(7)
3341                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3342
3343            let _ = self.table.get(8)
3344                .map(|envelope| unsafe {
3345                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3346                });
3347
3348            let _ = self.table.get(9)
3349                .map(|envelope| unsafe {
3350                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
3351                });
3352
3353            let _ = self.table.get(10).map(|envelope| unsafe {
3354                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3355            });
3356        }
3357    }
3358
3359    impl ::fidl_next::Constrained for NodeAddArgs<'_> {
3360        type Constraint = ();
3361
3362        fn validate(
3363            _: ::fidl_next::Slot<'_, Self>,
3364            _: Self::Constraint,
3365        ) -> Result<(), ::fidl_next::ValidationError> {
3366            Ok(())
3367        }
3368    }
3369
3370    unsafe impl ::fidl_next::Wire for NodeAddArgs<'static> {
3371        type Narrowed<'de> = NodeAddArgs<'de>;
3372
3373        #[inline]
3374        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3375            ::fidl_next::munge!(let Self { table } = out);
3376            ::fidl_next::wire::Table::zero_padding(table);
3377        }
3378    }
3379
3380    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddArgs<'de>
3381    where
3382        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3383        ___D: ::fidl_next::fuchsia::HandleDecoder,
3384    {
3385        fn decode(
3386            slot: ::fidl_next::Slot<'_, Self>,
3387            decoder: &mut ___D,
3388            _: (),
3389        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3390            ::fidl_next::munge!(let Self { table } = slot);
3391
3392            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3393                match ordinal {
3394                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3395
3396                    1 => {
3397                        ::fidl_next::wire::Envelope::decode_as::<
3398                            ___D,
3399                            ::fidl_next::wire::String<'de>,
3400                        >(slot.as_mut(), decoder, 128)?;
3401
3402                        let value = unsafe {
3403                            slot.deref_unchecked()
3404                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3405                        };
3406
3407                        if value.len() > 128 {
3408                            return Err(::fidl_next::DecodeError::VectorTooLong {
3409                                size: value.len() as u64,
3410                                limit: 128,
3411                            });
3412                        }
3413
3414                        Ok(())
3415                    }
3416
3417                    3 => {
3418                        ::fidl_next::wire::Envelope::decode_as::<
3419                            ___D,
3420                            ::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>,
3421                        >(slot.as_mut(), decoder, (64, ()))?;
3422
3423                        let value = unsafe {
3424                            slot
3425                                            .deref_unchecked()
3426                                            .deref_unchecked::<
3427                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeSymbol<'_>>
3428                                            >()
3429                        };
3430
3431                        if value.len() > 64 {
3432                            return Err(::fidl_next::DecodeError::VectorTooLong {
3433                                size: value.len() as u64,
3434                                limit: 64,
3435                            });
3436                        }
3437
3438                        Ok(())
3439                    }
3440
3441                    5 => {
3442                        ::fidl_next::wire::Envelope::decode_as::<
3443                            ___D,
3444                            crate::wire::DevfsAddArgs<'de>,
3445                        >(slot.as_mut(), decoder, ())?;
3446
3447                        Ok(())
3448                    }
3449
3450                    6 => {
3451                        ::fidl_next::wire::Envelope::decode_as::<
3452                            ___D,
3453                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3454                        >(slot.as_mut(), decoder, (128, ()))?;
3455
3456                        let value = unsafe {
3457                            slot
3458                                            .deref_unchecked()
3459                                            .deref_unchecked::<
3460                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3461                                            >()
3462                        };
3463
3464                        if value.len() > 128 {
3465                            return Err(::fidl_next::DecodeError::VectorTooLong {
3466                                size: value.len() as u64,
3467                                limit: 128,
3468                            });
3469                        }
3470
3471                        Ok(())
3472                    }
3473
3474                    7 => {
3475                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3476                            slot.as_mut(),
3477                            decoder,
3478                            (),
3479                        )?;
3480
3481                        Ok(())
3482                    }
3483
3484                    8 => {
3485                        ::fidl_next::wire::Envelope::decode_as::<
3486                            ___D,
3487                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3488                        >(slot.as_mut(), decoder, (64, ()))?;
3489
3490                        let value = unsafe {
3491                            slot
3492                                            .deref_unchecked()
3493                                            .deref_unchecked::<
3494                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3495                                            >()
3496                        };
3497
3498                        if value.len() > 64 {
3499                            return Err(::fidl_next::DecodeError::VectorTooLong {
3500                                size: value.len() as u64,
3501                                limit: 64,
3502                            });
3503                        }
3504
3505                        Ok(())
3506                    }
3507
3508                    9 => {
3509                        ::fidl_next::wire::Envelope::decode_as::<
3510                            ___D,
3511                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
3512                        >(slot.as_mut(), decoder, ())?;
3513
3514                        Ok(())
3515                    }
3516
3517                    10 => {
3518                        ::fidl_next::wire::Envelope::decode_as::<
3519                            ___D,
3520                            ::fidl_next::wire::String<'de>,
3521                        >(slot.as_mut(), decoder, 128)?;
3522
3523                        let value = unsafe {
3524                            slot.deref_unchecked()
3525                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3526                        };
3527
3528                        if value.len() > 128 {
3529                            return Err(::fidl_next::DecodeError::VectorTooLong {
3530                                size: value.len() as u64,
3531                                limit: 128,
3532                            });
3533                        }
3534
3535                        Ok(())
3536                    }
3537
3538                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3539                }
3540            })
3541        }
3542    }
3543
3544    impl<'de> NodeAddArgs<'de> {
3545        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3546            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3547        }
3548
3549        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3550            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3551        }
3552
3553        pub fn symbols(
3554            &self,
3555        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3556        {
3557            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3558        }
3559
3560        pub fn take_symbols(
3561            &mut self,
3562        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeSymbol<'de>>>
3563        {
3564            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3565        }
3566
3567        pub fn devfs_args(&self) -> ::core::option::Option<&crate::wire::DevfsAddArgs<'de>> {
3568            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
3569        }
3570
3571        pub fn take_devfs_args(
3572            &mut self,
3573        ) -> ::core::option::Option<crate::wire::DevfsAddArgs<'de>> {
3574            unsafe { Some(self.table.get_mut(5)?.take_unchecked()) }
3575        }
3576
3577        pub fn offers2(
3578            &self,
3579        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3580        {
3581            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
3582        }
3583
3584        pub fn take_offers2(
3585            &mut self,
3586        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3587        {
3588            unsafe { Some(self.table.get_mut(6)?.take_unchecked()) }
3589        }
3590
3591        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3592            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
3593        }
3594
3595        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3596            unsafe { Some(self.table.get_mut(7)?.take_unchecked()) }
3597        }
3598
3599        pub fn properties2(
3600            &self,
3601        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3602        {
3603            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
3604        }
3605
3606        pub fn take_properties2(
3607            &mut self,
3608        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3609        {
3610            unsafe { Some(self.table.get_mut(8)?.take_unchecked()) }
3611        }
3612
3613        pub fn offers_dictionary(
3614            &self,
3615        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3616        {
3617            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
3618        }
3619
3620        pub fn take_offers_dictionary(
3621            &mut self,
3622        ) -> ::core::option::Option<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
3623        {
3624            unsafe { Some(self.table.get_mut(9)?.take_unchecked()) }
3625        }
3626
3627        pub fn driver_host(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3628            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
3629        }
3630
3631        pub fn take_driver_host(
3632            &mut self,
3633        ) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3634            unsafe { Some(self.table.get_mut(10)?.take_unchecked()) }
3635        }
3636    }
3637
3638    impl<'de> ::core::fmt::Debug for NodeAddArgs<'de> {
3639        fn fmt(
3640            &self,
3641            f: &mut ::core::fmt::Formatter<'_>,
3642        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3643            f.debug_struct("NodeAddArgs")
3644                .field("name", &self.name())
3645                .field("symbols", &self.symbols())
3646                .field("devfs_args", &self.devfs_args())
3647                .field("offers2", &self.offers2())
3648                .field("bus_info", &self.bus_info())
3649                .field("properties2", &self.properties2())
3650                .field("offers_dictionary", &self.offers_dictionary())
3651                .field("driver_host", &self.driver_host())
3652                .finish()
3653        }
3654    }
3655
3656    impl<'de> ::fidl_next::IntoNatural for NodeAddArgs<'de> {
3657        type Natural = crate::natural::NodeAddArgs;
3658    }
3659
3660    /// The wire type corresponding to [`NodeAddChildRequest`].
3661    #[derive(Debug)]
3662    #[repr(C)]
3663    pub struct NodeAddChildRequest<'de> {
3664        pub args: crate::wire::NodeAddArgs<'de>,
3665
3666        pub controller:
3667            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
3668
3669        pub node: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
3670    }
3671
3672    static_assertions::const_assert_eq!(std::mem::size_of::<NodeAddChildRequest<'_>>(), 24);
3673    static_assertions::const_assert_eq!(std::mem::align_of::<NodeAddChildRequest<'_>>(), 8);
3674
3675    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, args), 0);
3676
3677    static_assertions::const_assert_eq!(
3678        std::mem::offset_of!(NodeAddChildRequest<'_>, controller),
3679        16
3680    );
3681
3682    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, node), 20);
3683
3684    impl ::fidl_next::Constrained for NodeAddChildRequest<'_> {
3685        type Constraint = ();
3686
3687        fn validate(
3688            _: ::fidl_next::Slot<'_, Self>,
3689            _: Self::Constraint,
3690        ) -> Result<(), ::fidl_next::ValidationError> {
3691            Ok(())
3692        }
3693    }
3694
3695    unsafe impl ::fidl_next::Wire for NodeAddChildRequest<'static> {
3696        type Narrowed<'de> = NodeAddChildRequest<'de>;
3697
3698        #[inline]
3699        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3700            ::fidl_next::munge! {
3701                let Self {
3702                    args,
3703                    controller,
3704                    node,
3705
3706                } = &mut *out_;
3707            }
3708
3709            ::fidl_next::Wire::zero_padding(args);
3710
3711            ::fidl_next::Wire::zero_padding(controller);
3712
3713            ::fidl_next::Wire::zero_padding(node);
3714        }
3715    }
3716
3717    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeAddChildRequest<'de>
3718    where
3719        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3720        ___D: ::fidl_next::Decoder<'de>,
3721        ___D: ::fidl_next::fuchsia::HandleDecoder,
3722    {
3723        fn decode(
3724            slot_: ::fidl_next::Slot<'_, Self>,
3725            decoder_: &mut ___D,
3726            _: (),
3727        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3728            ::fidl_next::munge! {
3729                let Self {
3730                    mut args,
3731                    mut controller,
3732                    mut node,
3733
3734                } = slot_;
3735            }
3736
3737            let _field = args.as_mut();
3738
3739            ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
3740
3741            let _field = controller.as_mut();
3742
3743            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
3744
3745            let _field = node.as_mut();
3746
3747            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
3748
3749            Ok(())
3750        }
3751    }
3752
3753    impl<'de> ::fidl_next::IntoNatural for NodeAddChildRequest<'de> {
3754        type Natural = crate::natural::NodeAddChildRequest;
3755    }
3756
3757    /// The wire type corresponding to [`ResourceArgs`].
3758    #[repr(C)]
3759    pub struct ResourceArgs<'de> {
3760        pub(crate) table: ::fidl_next::wire::Table<'de>,
3761    }
3762
3763    impl<'de> Drop for ResourceArgs<'de> {
3764        fn drop(&mut self) {
3765            let _ = self.table.get(1).map(|envelope| unsafe {
3766                envelope.read_unchecked::<::fidl_next::wire::String<'de>>()
3767            });
3768
3769            let _ = self.table.get(2)
3770                .map(|envelope| unsafe {
3771                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>()
3772                });
3773
3774            let _ = self.table.get(3).map(|envelope| unsafe {
3775                envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>()
3776            });
3777
3778            let _ = self
3779                .table
3780                .get(4)
3781                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
3782        }
3783    }
3784
3785    impl ::fidl_next::Constrained for ResourceArgs<'_> {
3786        type Constraint = ();
3787
3788        fn validate(
3789            _: ::fidl_next::Slot<'_, Self>,
3790            _: Self::Constraint,
3791        ) -> Result<(), ::fidl_next::ValidationError> {
3792            Ok(())
3793        }
3794    }
3795
3796    unsafe impl ::fidl_next::Wire for ResourceArgs<'static> {
3797        type Narrowed<'de> = ResourceArgs<'de>;
3798
3799        #[inline]
3800        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3801            ::fidl_next::munge!(let Self { table } = out);
3802            ::fidl_next::wire::Table::zero_padding(table);
3803        }
3804    }
3805
3806    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ResourceArgs<'de>
3807    where
3808        ___D: ::fidl_next::Decoder<'de> + ?Sized,
3809        ___D: ::fidl_next::fuchsia::HandleDecoder,
3810    {
3811        fn decode(
3812            slot: ::fidl_next::Slot<'_, Self>,
3813            decoder: &mut ___D,
3814            _: (),
3815        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3816            ::fidl_next::munge!(let Self { table } = slot);
3817
3818            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3819                match ordinal {
3820                    0 => unsafe { ::core::hint::unreachable_unchecked() },
3821
3822                    1 => {
3823                        ::fidl_next::wire::Envelope::decode_as::<
3824                            ___D,
3825                            ::fidl_next::wire::String<'de>,
3826                        >(slot.as_mut(), decoder, 128)?;
3827
3828                        let value = unsafe {
3829                            slot.deref_unchecked()
3830                                .deref_unchecked::<::fidl_next::wire::String<'_>>()
3831                        };
3832
3833                        if value.len() > 128 {
3834                            return Err(::fidl_next::DecodeError::VectorTooLong {
3835                                size: value.len() as u64,
3836                                limit: 128,
3837                            });
3838                        }
3839
3840                        Ok(())
3841                    }
3842
3843                    2 => {
3844                        ::fidl_next::wire::Envelope::decode_as::<
3845                            ___D,
3846                            ::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>,
3847                        >(slot.as_mut(), decoder, (64, ()))?;
3848
3849                        let value = unsafe {
3850                            slot
3851                                            .deref_unchecked()
3852                                            .deref_unchecked::<
3853                                                ::fidl_next::wire::Vector<'_, crate::wire::NodeProperty2<'_>>
3854                                            >()
3855                        };
3856
3857                        if value.len() > 64 {
3858                            return Err(::fidl_next::DecodeError::VectorTooLong {
3859                                size: value.len() as u64,
3860                                limit: 64,
3861                            });
3862                        }
3863
3864                        Ok(())
3865                    }
3866
3867                    3 => {
3868                        ::fidl_next::wire::Envelope::decode_as::<
3869                            ___D,
3870                            ::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>,
3871                        >(slot.as_mut(), decoder, (128, ()))?;
3872
3873                        let value = unsafe {
3874                            slot
3875                                            .deref_unchecked()
3876                                            .deref_unchecked::<
3877                                                ::fidl_next::wire::Vector<'_, crate::wire::Offer<'_>>
3878                                            >()
3879                        };
3880
3881                        if value.len() > 128 {
3882                            return Err(::fidl_next::DecodeError::VectorTooLong {
3883                                size: value.len() as u64,
3884                                limit: 128,
3885                            });
3886                        }
3887
3888                        Ok(())
3889                    }
3890
3891                    4 => {
3892                        ::fidl_next::wire::Envelope::decode_as::<___D, crate::wire::BusInfo<'de>>(
3893                            slot.as_mut(),
3894                            decoder,
3895                            (),
3896                        )?;
3897
3898                        Ok(())
3899                    }
3900
3901                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
3902                }
3903            })
3904        }
3905    }
3906
3907    impl<'de> ResourceArgs<'de> {
3908        pub fn name(&self) -> ::core::option::Option<&::fidl_next::wire::String<'de>> {
3909            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3910        }
3911
3912        pub fn take_name(&mut self) -> ::core::option::Option<::fidl_next::wire::String<'de>> {
3913            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
3914        }
3915
3916        pub fn properties(
3917            &self,
3918        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3919        {
3920            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3921        }
3922
3923        pub fn take_properties(
3924            &mut self,
3925        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::NodeProperty2<'de>>>
3926        {
3927            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
3928        }
3929
3930        pub fn offers(
3931            &self,
3932        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3933        {
3934            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
3935        }
3936
3937        pub fn take_offers(
3938            &mut self,
3939        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::Offer<'de>>>
3940        {
3941            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
3942        }
3943
3944        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
3945            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
3946        }
3947
3948        pub fn take_bus_info(&mut self) -> ::core::option::Option<crate::wire::BusInfo<'de>> {
3949            unsafe { Some(self.table.get_mut(4)?.take_unchecked()) }
3950        }
3951    }
3952
3953    impl<'de> ::core::fmt::Debug for ResourceArgs<'de> {
3954        fn fmt(
3955            &self,
3956            f: &mut ::core::fmt::Formatter<'_>,
3957        ) -> ::core::result::Result<(), ::core::fmt::Error> {
3958            f.debug_struct("ResourceArgs")
3959                .field("name", &self.name())
3960                .field("properties", &self.properties())
3961                .field("offers", &self.offers())
3962                .field("bus_info", &self.bus_info())
3963                .finish()
3964        }
3965    }
3966
3967    impl<'de> ::fidl_next::IntoNatural for ResourceArgs<'de> {
3968        type Natural = crate::natural::ResourceArgs;
3969    }
3970
3971    /// The wire type corresponding to [`NodeProvideResourceRequest`].
3972    #[derive(Debug)]
3973    #[repr(C)]
3974    pub struct NodeProvideResourceRequest<'de> {
3975        pub resource: crate::wire::ResourceArgs<'de>,
3976
3977        pub controller:
3978            ::fidl_next::ServerEnd<crate::ResourceController, ::fidl_next::wire::fuchsia::Channel>,
3979    }
3980
3981    static_assertions::const_assert_eq!(std::mem::size_of::<NodeProvideResourceRequest<'_>>(), 24);
3982    static_assertions::const_assert_eq!(std::mem::align_of::<NodeProvideResourceRequest<'_>>(), 8);
3983
3984    static_assertions::const_assert_eq!(
3985        std::mem::offset_of!(NodeProvideResourceRequest<'_>, resource),
3986        0
3987    );
3988
3989    static_assertions::const_assert_eq!(
3990        std::mem::offset_of!(NodeProvideResourceRequest<'_>, controller),
3991        16
3992    );
3993
3994    impl ::fidl_next::Constrained for NodeProvideResourceRequest<'_> {
3995        type Constraint = ();
3996
3997        fn validate(
3998            _: ::fidl_next::Slot<'_, Self>,
3999            _: Self::Constraint,
4000        ) -> Result<(), ::fidl_next::ValidationError> {
4001            Ok(())
4002        }
4003    }
4004
4005    unsafe impl ::fidl_next::Wire for NodeProvideResourceRequest<'static> {
4006        type Narrowed<'de> = NodeProvideResourceRequest<'de>;
4007
4008        #[inline]
4009        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4010            ::fidl_next::munge! {
4011                let Self {
4012                    resource,
4013                    controller,
4014
4015                } = &mut *out_;
4016            }
4017
4018            ::fidl_next::Wire::zero_padding(resource);
4019
4020            ::fidl_next::Wire::zero_padding(controller);
4021
4022            unsafe {
4023                out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
4024            }
4025        }
4026    }
4027
4028    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeProvideResourceRequest<'de>
4029    where
4030        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4031        ___D: ::fidl_next::Decoder<'de>,
4032        ___D: ::fidl_next::fuchsia::HandleDecoder,
4033    {
4034        fn decode(
4035            slot_: ::fidl_next::Slot<'_, Self>,
4036            decoder_: &mut ___D,
4037            _: (),
4038        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4039            if slot_.as_bytes()[20..24] != [0u8; 4] {
4040                return Err(::fidl_next::DecodeError::InvalidPadding);
4041            }
4042
4043            ::fidl_next::munge! {
4044                let Self {
4045                    mut resource,
4046                    mut controller,
4047
4048                } = slot_;
4049            }
4050
4051            let _field = resource.as_mut();
4052
4053            ::fidl_next::Decode::decode(resource.as_mut(), decoder_, ())?;
4054
4055            let _field = controller.as_mut();
4056
4057            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4058
4059            Ok(())
4060        }
4061    }
4062
4063    impl<'de> ::fidl_next::IntoNatural for NodeProvideResourceRequest<'de> {
4064        type Natural = crate::natural::NodeProvideResourceRequest;
4065    }
4066
4067    /// The wire type corresponding to [`NodeControllerOnBindRequest`].
4068    #[repr(C)]
4069    pub struct NodeControllerOnBindRequest<'de> {
4070        pub(crate) table: ::fidl_next::wire::Table<'de>,
4071    }
4072
4073    impl<'de> Drop for NodeControllerOnBindRequest<'de> {
4074        fn drop(&mut self) {
4075            let _ = self.table.get(1).map(|envelope| unsafe {
4076                envelope.read_unchecked::<::fidl_next::wire::fuchsia::Event>()
4077            });
4078        }
4079    }
4080
4081    impl ::fidl_next::Constrained for NodeControllerOnBindRequest<'_> {
4082        type Constraint = ();
4083
4084        fn validate(
4085            _: ::fidl_next::Slot<'_, Self>,
4086            _: Self::Constraint,
4087        ) -> Result<(), ::fidl_next::ValidationError> {
4088            Ok(())
4089        }
4090    }
4091
4092    unsafe impl ::fidl_next::Wire for NodeControllerOnBindRequest<'static> {
4093        type Narrowed<'de> = NodeControllerOnBindRequest<'de>;
4094
4095        #[inline]
4096        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4097            ::fidl_next::munge!(let Self { table } = out);
4098            ::fidl_next::wire::Table::zero_padding(table);
4099        }
4100    }
4101
4102    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeControllerOnBindRequest<'de>
4103    where
4104        ___D: ::fidl_next::Decoder<'de> + ?Sized,
4105        ___D: ::fidl_next::fuchsia::HandleDecoder,
4106    {
4107        fn decode(
4108            slot: ::fidl_next::Slot<'_, Self>,
4109            decoder: &mut ___D,
4110            _: (),
4111        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4112            ::fidl_next::munge!(let Self { table } = slot);
4113
4114            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4115                match ordinal {
4116                    0 => unsafe { ::core::hint::unreachable_unchecked() },
4117
4118                    1 => {
4119                        ::fidl_next::wire::Envelope::decode_as::<
4120                            ___D,
4121                            ::fidl_next::wire::fuchsia::Event,
4122                        >(slot.as_mut(), decoder, ())?;
4123
4124                        Ok(())
4125                    }
4126
4127                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
4128                }
4129            })
4130        }
4131    }
4132
4133    impl<'de> NodeControllerOnBindRequest<'de> {
4134        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::wire::fuchsia::Event> {
4135            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4136        }
4137
4138        pub fn take_node_token(
4139            &mut self,
4140        ) -> ::core::option::Option<::fidl_next::wire::fuchsia::Event> {
4141            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
4142        }
4143    }
4144
4145    impl<'de> ::core::fmt::Debug for NodeControllerOnBindRequest<'de> {
4146        fn fmt(
4147            &self,
4148            f: &mut ::core::fmt::Formatter<'_>,
4149        ) -> ::core::result::Result<(), ::core::fmt::Error> {
4150            f.debug_struct("NodeControllerOnBindRequest")
4151                .field("node_token", &self.node_token())
4152                .finish()
4153        }
4154    }
4155
4156    impl<'de> ::fidl_next::IntoNatural for NodeControllerOnBindRequest<'de> {
4157        type Natural = crate::natural::NodeControllerOnBindRequest;
4158    }
4159
4160    /// The wire type corresponding to [`NodeManagerAddNodeRequest`].
4161    #[derive(Debug)]
4162    #[repr(C)]
4163    pub struct NodeManagerAddNodeRequest<'de> {
4164        pub node: crate::wire::Node2<'de>,
4165
4166        pub controller:
4167            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4168
4169        pub node_ref:
4170            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4171    }
4172
4173    static_assertions::const_assert_eq!(std::mem::size_of::<NodeManagerAddNodeRequest<'_>>(), 24);
4174    static_assertions::const_assert_eq!(std::mem::align_of::<NodeManagerAddNodeRequest<'_>>(), 8);
4175
4176    static_assertions::const_assert_eq!(
4177        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, node),
4178        0
4179    );
4180
4181    static_assertions::const_assert_eq!(
4182        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, controller),
4183        16
4184    );
4185
4186    static_assertions::const_assert_eq!(
4187        std::mem::offset_of!(NodeManagerAddNodeRequest<'_>, node_ref),
4188        20
4189    );
4190
4191    impl ::fidl_next::Constrained for NodeManagerAddNodeRequest<'_> {
4192        type Constraint = ();
4193
4194        fn validate(
4195            _: ::fidl_next::Slot<'_, Self>,
4196            _: Self::Constraint,
4197        ) -> Result<(), ::fidl_next::ValidationError> {
4198            Ok(())
4199        }
4200    }
4201
4202    unsafe impl ::fidl_next::Wire for NodeManagerAddNodeRequest<'static> {
4203        type Narrowed<'de> = NodeManagerAddNodeRequest<'de>;
4204
4205        #[inline]
4206        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4207            ::fidl_next::munge! {
4208                let Self {
4209                    node,
4210                    controller,
4211                    node_ref,
4212
4213                } = &mut *out_;
4214            }
4215
4216            ::fidl_next::Wire::zero_padding(node);
4217
4218            ::fidl_next::Wire::zero_padding(controller);
4219
4220            ::fidl_next::Wire::zero_padding(node_ref);
4221        }
4222    }
4223
4224    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for NodeManagerAddNodeRequest<'de>
4225    where
4226        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4227        ___D: ::fidl_next::Decoder<'de>,
4228        ___D: ::fidl_next::fuchsia::HandleDecoder,
4229    {
4230        fn decode(
4231            slot_: ::fidl_next::Slot<'_, Self>,
4232            decoder_: &mut ___D,
4233            _: (),
4234        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4235            ::fidl_next::munge! {
4236                let Self {
4237                    mut node,
4238                    mut controller,
4239                    mut node_ref,
4240
4241                } = slot_;
4242            }
4243
4244            let _field = node.as_mut();
4245
4246            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
4247
4248            let _field = controller.as_mut();
4249
4250            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
4251
4252            let _field = node_ref.as_mut();
4253
4254            ::fidl_next::Decode::decode(node_ref.as_mut(), decoder_, ())?;
4255
4256            Ok(())
4257        }
4258    }
4259
4260    impl<'de> ::fidl_next::IntoNatural for NodeManagerAddNodeRequest<'de> {
4261        type Natural = crate::natural::NodeManagerAddNodeRequest;
4262    }
4263}
4264
4265pub mod wire_optional {
4266
4267    pub use fidl_next_common_fuchsia_driver_framework::wire_optional::*;
4268
4269    #[repr(transparent)]
4270    pub struct DriverResult<'de> {
4271        pub(crate) raw: ::fidl_next::wire::Union,
4272        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4273    }
4274
4275    impl ::fidl_next::Constrained for DriverResult<'_> {
4276        type Constraint = ();
4277
4278        fn validate(
4279            _: ::fidl_next::Slot<'_, Self>,
4280            _: Self::Constraint,
4281        ) -> Result<(), ::fidl_next::ValidationError> {
4282            Ok(())
4283        }
4284    }
4285
4286    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
4287        type Narrowed<'de> = DriverResult<'de>;
4288
4289        #[inline]
4290        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4291            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4292            ::fidl_next::wire::Union::zero_padding(raw);
4293        }
4294    }
4295
4296    impl<'de> DriverResult<'de> {
4297        pub fn is_some(&self) -> bool {
4298            self.raw.is_some()
4299        }
4300
4301        pub fn is_none(&self) -> bool {
4302            self.raw.is_none()
4303        }
4304
4305        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DriverResult<'de>> {
4306            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4307        }
4308
4309        pub fn into_option(self) -> ::core::option::Option<crate::wire::DriverResult<'de>> {
4310            if self.is_some() {
4311                Some(crate::wire::DriverResult {
4312                    raw: self.raw,
4313                    _phantom: ::core::marker::PhantomData,
4314                })
4315            } else {
4316                None
4317            }
4318        }
4319    }
4320
4321    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DriverResult<'de>
4322    where
4323        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4324        ___D: ::fidl_next::Decoder<'de>,
4325        ___D: ::fidl_next::fuchsia::HandleDecoder,
4326    {
4327        fn decode(
4328            mut slot: ::fidl_next::Slot<'_, Self>,
4329            decoder: &mut ___D,
4330            _: (),
4331        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4332            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4333            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4334                1 => {
4335                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::fuchsia::Event>(
4336                        raw,
4337                        decoder,
4338                        (),
4339                    )?
4340                }
4341
4342                2 => ::fidl_next::wire::Union::decode_as::<
4343                    ___D,
4344                    ::fidl_next::wire::fuchsia::StatusResult,
4345                >(raw, decoder, ())?,
4346
4347                3 => ::fidl_next::wire::Union::decode_as::<
4348                    ___D,
4349                    ::fidl_next::wire::fuchsia::StatusResult,
4350                >(raw, decoder, ())?,
4351
4352                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4353                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4354            }
4355
4356            Ok(())
4357        }
4358    }
4359
4360    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
4361        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4362            self.as_ref().fmt(f)
4363        }
4364    }
4365
4366    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
4367        type Natural = ::core::option::Option<crate::natural::DriverResult>;
4368    }
4369}
4370
4371pub mod generic {
4372
4373    pub use fidl_next_common_fuchsia_driver_framework::generic::*;
4374
4375    /// The generic type corresponding to [`DriverResumeRequest`].
4376    pub struct DriverResumeRequest<T0> {
4377        pub power_element_lease: T0,
4378    }
4379
4380    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>
4381        for DriverResumeRequest<T0>
4382    where
4383        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4384        ___E: ::fidl_next::fuchsia::HandleEncoder,
4385        T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEventPair, ___E>,
4386    {
4387        #[inline]
4388        fn encode(
4389            self,
4390            encoder_: &mut ___E,
4391            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverResumeRequest>,
4392            _: (),
4393        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4394            ::fidl_next::munge! {
4395                let crate::wire::DriverResumeRequest {
4396                    power_element_lease,
4397
4398                } = out_;
4399            }
4400
4401            ::fidl_next::Encode::encode(
4402                self.power_element_lease,
4403                encoder_,
4404                power_element_lease,
4405                (),
4406            )?;
4407
4408            Ok(())
4409        }
4410    }
4411
4412    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DriverResumeRequest, ___E>
4413        for &'a DriverResumeRequest<T0>
4414    where
4415        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4416        ___E: ::fidl_next::fuchsia::HandleEncoder,
4417        &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::OptionalEventPair, ___E>,
4418    {
4419        #[inline]
4420        fn encode(
4421            self,
4422            encoder_: &mut ___E,
4423            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverResumeRequest>,
4424            _: (),
4425        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4426            ::fidl_next::munge! {
4427                let crate::wire::DriverResumeRequest {
4428                    power_element_lease,
4429
4430                } = out_;
4431            }
4432
4433            ::fidl_next::Encode::encode(
4434                &self.power_element_lease,
4435                encoder_,
4436                power_element_lease,
4437                (),
4438            )?;
4439
4440            Ok(())
4441        }
4442    }
4443
4444    /// The generic type corresponding to [`DriverStartRequest`].
4445    pub struct DriverStartRequest<T0> {
4446        pub start_args: T0,
4447    }
4448
4449    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
4450        for DriverStartRequest<T0>
4451    where
4452        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4453        ___E: ::fidl_next::Encoder,
4454        ___E: ::fidl_next::fuchsia::HandleEncoder,
4455        T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
4456    {
4457        #[inline]
4458        fn encode(
4459            self,
4460            encoder_: &mut ___E,
4461            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
4462            _: (),
4463        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4464            ::fidl_next::munge! {
4465                let crate::wire::DriverStartRequest {
4466                    start_args,
4467
4468                } = out_;
4469            }
4470
4471            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
4472
4473            Ok(())
4474        }
4475    }
4476
4477    unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
4478        for &'a DriverStartRequest<T0>
4479    where
4480        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4481        ___E: ::fidl_next::Encoder,
4482        ___E: ::fidl_next::fuchsia::HandleEncoder,
4483        &'a T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
4484    {
4485        #[inline]
4486        fn encode(
4487            self,
4488            encoder_: &mut ___E,
4489            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
4490            _: (),
4491        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4492            ::fidl_next::munge! {
4493                let crate::wire::DriverStartRequest {
4494                    start_args,
4495
4496                } = out_;
4497            }
4498
4499            ::fidl_next::Encode::encode(&self.start_args, encoder_, start_args, ())?;
4500
4501            Ok(())
4502        }
4503    }
4504
4505    /// The generic type corresponding to [`NodeAddChildRequest`].
4506    pub struct NodeAddChildRequest<T0, T1, T2> {
4507        pub args: T0,
4508
4509        pub controller: T1,
4510
4511        pub node: T2,
4512    }
4513
4514    unsafe impl<___E, T0, T1, T2>
4515        ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
4516        for NodeAddChildRequest<T0, T1, T2>
4517    where
4518        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4519        ___E: ::fidl_next::Encoder,
4520        ___E: ::fidl_next::fuchsia::HandleEncoder,
4521        T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
4522        T1: ::fidl_next::Encode<
4523                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4524                ___E,
4525            >,
4526        T2: ::fidl_next::Encode<
4527                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4528                ___E,
4529            >,
4530    {
4531        #[inline]
4532        fn encode(
4533            self,
4534            encoder_: &mut ___E,
4535            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
4536            _: (),
4537        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4538            ::fidl_next::munge! {
4539                let crate::wire::NodeAddChildRequest {
4540                    args,
4541                    controller,
4542                    node,
4543
4544                } = out_;
4545            }
4546
4547            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
4548
4549            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4550
4551            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
4552
4553            Ok(())
4554        }
4555    }
4556
4557    unsafe impl<'a, ___E, T0, T1, T2>
4558        ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
4559        for &'a NodeAddChildRequest<T0, T1, T2>
4560    where
4561        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4562        ___E: ::fidl_next::Encoder,
4563        ___E: ::fidl_next::fuchsia::HandleEncoder,
4564        &'a T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
4565        &'a T1: ::fidl_next::Encode<
4566                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4567                ___E,
4568            >,
4569        &'a T2: ::fidl_next::Encode<
4570                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4571                ___E,
4572            >,
4573    {
4574        #[inline]
4575        fn encode(
4576            self,
4577            encoder_: &mut ___E,
4578            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
4579            _: (),
4580        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4581            ::fidl_next::munge! {
4582                let crate::wire::NodeAddChildRequest {
4583                    args,
4584                    controller,
4585                    node,
4586
4587                } = out_;
4588            }
4589
4590            ::fidl_next::Encode::encode(&self.args, encoder_, args, ())?;
4591
4592            ::fidl_next::Encode::encode(&self.controller, encoder_, controller, ())?;
4593
4594            ::fidl_next::Encode::encode(&self.node, encoder_, node, ())?;
4595
4596            Ok(())
4597        }
4598    }
4599
4600    /// The generic type corresponding to [`NodeProvideResourceRequest`].
4601    pub struct NodeProvideResourceRequest<T0, T1> {
4602        pub resource: T0,
4603
4604        pub controller: T1,
4605    }
4606
4607    unsafe impl<___E, T0, T1>
4608        ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
4609        for NodeProvideResourceRequest<T0, T1>
4610    where
4611        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4612        ___E: ::fidl_next::Encoder,
4613        ___E: ::fidl_next::fuchsia::HandleEncoder,
4614        T0: ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E>,
4615        T1: ::fidl_next::Encode<
4616                ::fidl_next::ServerEnd<
4617                    crate::ResourceController,
4618                    ::fidl_next::wire::fuchsia::Channel,
4619                >,
4620                ___E,
4621            >,
4622    {
4623        #[inline]
4624        fn encode(
4625            self,
4626            encoder_: &mut ___E,
4627            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
4628            _: (),
4629        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4630            ::fidl_next::munge! {
4631                let crate::wire::NodeProvideResourceRequest {
4632                    resource,
4633                    controller,
4634
4635                } = out_;
4636            }
4637
4638            ::fidl_next::Encode::encode(self.resource, encoder_, resource, ())?;
4639
4640            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4641
4642            Ok(())
4643        }
4644    }
4645
4646    unsafe impl<'a, ___E, T0, T1>
4647        ::fidl_next::Encode<crate::wire::NodeProvideResourceRequest<'static>, ___E>
4648        for &'a NodeProvideResourceRequest<T0, T1>
4649    where
4650        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4651        ___E: ::fidl_next::Encoder,
4652        ___E: ::fidl_next::fuchsia::HandleEncoder,
4653        &'a T0: ::fidl_next::Encode<crate::wire::ResourceArgs<'static>, ___E>,
4654        &'a T1: ::fidl_next::Encode<
4655                ::fidl_next::ServerEnd<
4656                    crate::ResourceController,
4657                    ::fidl_next::wire::fuchsia::Channel,
4658                >,
4659                ___E,
4660            >,
4661    {
4662        #[inline]
4663        fn encode(
4664            self,
4665            encoder_: &mut ___E,
4666            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeProvideResourceRequest<'static>>,
4667            _: (),
4668        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4669            ::fidl_next::munge! {
4670                let crate::wire::NodeProvideResourceRequest {
4671                    resource,
4672                    controller,
4673
4674                } = out_;
4675            }
4676
4677            ::fidl_next::Encode::encode(&self.resource, encoder_, resource, ())?;
4678
4679            ::fidl_next::Encode::encode(&self.controller, encoder_, controller, ())?;
4680
4681            Ok(())
4682        }
4683    }
4684
4685    /// The generic type corresponding to [`NodeManagerAddNodeRequest`].
4686    pub struct NodeManagerAddNodeRequest<T0, T1, T2> {
4687        pub node: T0,
4688
4689        pub controller: T1,
4690
4691        pub node_ref: T2,
4692    }
4693
4694    unsafe impl<___E, T0, T1, T2>
4695        ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>
4696        for NodeManagerAddNodeRequest<T0, T1, T2>
4697    where
4698        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4699        ___E: ::fidl_next::Encoder,
4700        ___E: ::fidl_next::fuchsia::HandleEncoder,
4701        T0: ::fidl_next::Encode<crate::wire::Node2<'static>, ___E>,
4702        T1: ::fidl_next::Encode<
4703                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4704                ___E,
4705            >,
4706        T2: ::fidl_next::Encode<
4707                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4708                ___E,
4709            >,
4710    {
4711        #[inline]
4712        fn encode(
4713            self,
4714            encoder_: &mut ___E,
4715            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeManagerAddNodeRequest<'static>>,
4716            _: (),
4717        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4718            ::fidl_next::munge! {
4719                let crate::wire::NodeManagerAddNodeRequest {
4720                    node,
4721                    controller,
4722                    node_ref,
4723
4724                } = out_;
4725            }
4726
4727            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
4728
4729            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
4730
4731            ::fidl_next::Encode::encode(self.node_ref, encoder_, node_ref, ())?;
4732
4733            Ok(())
4734        }
4735    }
4736
4737    unsafe impl<'a, ___E, T0, T1, T2>
4738        ::fidl_next::Encode<crate::wire::NodeManagerAddNodeRequest<'static>, ___E>
4739        for &'a NodeManagerAddNodeRequest<T0, T1, T2>
4740    where
4741        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4742        ___E: ::fidl_next::Encoder,
4743        ___E: ::fidl_next::fuchsia::HandleEncoder,
4744        &'a T0: ::fidl_next::Encode<crate::wire::Node2<'static>, ___E>,
4745        &'a T1: ::fidl_next::Encode<
4746                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::wire::fuchsia::Channel>,
4747                ___E,
4748            >,
4749        &'a T2: ::fidl_next::Encode<
4750                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::wire::fuchsia::OptionalChannel>,
4751                ___E,
4752            >,
4753    {
4754        #[inline]
4755        fn encode(
4756            self,
4757            encoder_: &mut ___E,
4758            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeManagerAddNodeRequest<'static>>,
4759            _: (),
4760        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4761            ::fidl_next::munge! {
4762                let crate::wire::NodeManagerAddNodeRequest {
4763                    node,
4764                    controller,
4765                    node_ref,
4766
4767                } = out_;
4768            }
4769
4770            ::fidl_next::Encode::encode(&self.node, encoder_, node, ())?;
4771
4772            ::fidl_next::Encode::encode(&self.controller, encoder_, controller, ())?;
4773
4774            ::fidl_next::Encode::encode(&self.node_ref, encoder_, node_ref, ())?;
4775
4776            Ok(())
4777        }
4778    }
4779}
4780
4781pub use self::natural::*;
4782
4783/// The type corresponding to the Driver protocol.
4784#[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"]
4785#[derive(PartialEq, Debug)]
4786pub struct Driver;
4787
4788#[cfg(feature = "driver")]
4789impl ::fidl_next::HasTransport for Driver {
4790    type Transport = ::fdf_fidl::DriverChannel;
4791}
4792
4793pub mod driver {
4794    pub mod prelude {
4795        pub use crate::{
4796            Driver, DriverClientHandler, DriverLocalClientHandler, DriverLocalServerHandler,
4797            DriverServerHandler, driver,
4798        };
4799
4800        pub use crate::natural::DriverResumeRequest;
4801
4802        pub use crate::natural::DriverStartRequest;
4803
4804        pub use crate::natural::DriverResumeResponse;
4805
4806        pub use crate::natural::DriverStartResponse;
4807
4808        pub use crate::natural::DriverSuspendResponse;
4809
4810        pub use crate::natural::HealthCheckError;
4811
4812        pub use crate::natural::HealthCheckResponse;
4813
4814        pub use crate::natural::HealthHealthCheckRequest;
4815
4816        pub use crate::natural::HealthOnHealthAlertRequest;
4817    }
4818
4819    pub struct HealthCheck;
4820
4821    impl ::fidl_next::Method for HealthCheck {
4822        const ORDINAL: u64 = 1509959980088103220;
4823        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4824            ::fidl_next::protocol::Flexibility::Flexible;
4825
4826        type Protocol = crate::Driver;
4827
4828        type Request = crate::wire::HealthHealthCheckRequest;
4829    }
4830
4831    impl ::fidl_next::TwoWayMethod for HealthCheck {
4832        type Response = ::fidl_next::wire::Result<
4833            'static,
4834            crate::wire::HealthCheckResponse<'static>,
4835            crate::wire::HealthCheckError,
4836        >;
4837    }
4838
4839    impl<___R> ::fidl_next::Respond<___R> for HealthCheck {
4840        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4841
4842        fn respond(response: ___R) -> Self::Output {
4843            ::core::result::Result::Ok(response)
4844        }
4845    }
4846
4847    impl<___R> ::fidl_next::RespondErr<___R> for HealthCheck {
4848        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4849
4850        fn respond_err(response: ___R) -> Self::Output {
4851            ::core::result::Result::Err(response)
4852        }
4853    }
4854
4855    pub struct OnHealthAlert;
4856
4857    impl ::fidl_next::Method for OnHealthAlert {
4858        const ORDINAL: u64 = 8692488848137434937;
4859        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4860            ::fidl_next::protocol::Flexibility::Flexible;
4861
4862        type Protocol = crate::Driver;
4863
4864        type Request = crate::wire::HealthOnHealthAlertRequest<'static>;
4865    }
4866
4867    pub struct Start;
4868
4869    impl ::fidl_next::Method for Start {
4870        const ORDINAL: u64 = 2863727161496985794;
4871        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4872            ::fidl_next::protocol::Flexibility::Flexible;
4873
4874        type Protocol = crate::Driver;
4875
4876        type Request = crate::wire::DriverStartRequest<'static>;
4877    }
4878
4879    impl ::fidl_next::TwoWayMethod for Start {
4880        type Response = ::fidl_next::wire::Result<
4881            'static,
4882            crate::wire::DriverStartResponse,
4883            ::fidl_next::wire::fuchsia::Status,
4884        >;
4885    }
4886
4887    impl<___R> ::fidl_next::Respond<___R> for Start {
4888        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4889
4890        fn respond(response: ___R) -> Self::Output {
4891            ::core::result::Result::Ok(response)
4892        }
4893    }
4894
4895    impl<___R> ::fidl_next::RespondErr<___R> for Start {
4896        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4897
4898        fn respond_err(response: ___R) -> Self::Output {
4899            ::core::result::Result::Err(response)
4900        }
4901    }
4902
4903    pub struct Stop;
4904
4905    impl ::fidl_next::Method for Stop {
4906        const ORDINAL: u64 = 5446759044519003197;
4907        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4908            ::fidl_next::protocol::Flexibility::Flexible;
4909
4910        type Protocol = crate::Driver;
4911
4912        type Request = ::fidl_next::wire::EmptyMessageBody;
4913    }
4914
4915    pub struct Suspend;
4916
4917    impl ::fidl_next::Method for Suspend {
4918        const ORDINAL: u64 = 5542715003953095352;
4919        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4920            ::fidl_next::protocol::Flexibility::Flexible;
4921
4922        type Protocol = crate::Driver;
4923
4924        type Request = ::fidl_next::wire::EmptyMessageBody;
4925    }
4926
4927    impl ::fidl_next::TwoWayMethod for Suspend {
4928        type Response = ::fidl_next::wire::Result<
4929            'static,
4930            crate::wire::DriverSuspendResponse,
4931            ::fidl_next::wire::fuchsia::Status,
4932        >;
4933    }
4934
4935    impl<___R> ::fidl_next::Respond<___R> for Suspend {
4936        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4937
4938        fn respond(response: ___R) -> Self::Output {
4939            ::core::result::Result::Ok(response)
4940        }
4941    }
4942
4943    impl<___R> ::fidl_next::RespondErr<___R> for Suspend {
4944        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4945
4946        fn respond_err(response: ___R) -> Self::Output {
4947            ::core::result::Result::Err(response)
4948        }
4949    }
4950
4951    pub struct Resume;
4952
4953    impl ::fidl_next::Method for Resume {
4954        const ORDINAL: u64 = 2681111055565410632;
4955        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
4956            ::fidl_next::protocol::Flexibility::Flexible;
4957
4958        type Protocol = crate::Driver;
4959
4960        type Request = crate::wire::DriverResumeRequest;
4961    }
4962
4963    impl ::fidl_next::TwoWayMethod for Resume {
4964        type Response = ::fidl_next::wire::Result<
4965            'static,
4966            crate::wire::DriverResumeResponse,
4967            ::fidl_next::wire::fuchsia::Status,
4968        >;
4969    }
4970
4971    impl<___R> ::fidl_next::Respond<___R> for Resume {
4972        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
4973
4974        fn respond(response: ___R) -> Self::Output {
4975            ::core::result::Result::Ok(response)
4976        }
4977    }
4978
4979    impl<___R> ::fidl_next::RespondErr<___R> for Resume {
4980        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
4981
4982        fn respond_err(response: ___R) -> Self::Output {
4983            ::core::result::Result::Err(response)
4984        }
4985    }
4986
4987    mod ___detail {
4988        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Driver
4989        where
4990            ___T: ::fidl_next::Transport,
4991        {
4992            type Client = DriverClient<___T>;
4993            type Server = DriverServer<___T>;
4994        }
4995
4996        /// The client for the `Driver` protocol.
4997        #[repr(transparent)]
4998        pub struct DriverClient<___T: ::fidl_next::Transport> {
4999            #[allow(dead_code)]
5000            client: ::fidl_next::protocol::Client<___T>,
5001        }
5002
5003        impl<___T> DriverClient<___T>
5004        where
5005            ___T: ::fidl_next::Transport,
5006        {
5007            #[doc = " Requests the driver to perform a self-diagnostic check.\n\n The Driver Host never issues `HealthCheck` between `Driver.Suspend` and\n the completion of `Driver.Resume`, answering\n `HealthCheckError.INVALID_STATE` itself while the driver is suspended or\n transitioning power states.\n"]
5008            pub fn health_check(
5009                &self,
5010
5011                request: impl ::fidl_next::Encode<
5012                    crate::wire::HealthCheckRequest,
5013                    <___T as ::fidl_next::Transport>::SendBuffer,
5014                >,
5015            ) -> ::fidl_next::TwoWayFuture<'_, super::HealthCheck, ___T>
5016            where
5017                <___T as ::fidl_next::Transport>::SendBuffer:
5018                    ::fidl_next::encoder::InternalHandleEncoder,
5019            {
5020                self.health_check_with(crate::generic::HealthHealthCheckRequest { request })
5021            }
5022
5023            #[doc = " Requests the driver to perform a self-diagnostic check.\n\n The Driver Host never issues `HealthCheck` between `Driver.Suspend` and\n the completion of `Driver.Resume`, answering\n `HealthCheckError.INVALID_STATE` itself while the driver is suspended or\n transitioning power states.\n"]
5024            pub fn health_check_with<___R>(
5025                &self,
5026                request: ___R,
5027            ) -> ::fidl_next::TwoWayFuture<'_, super::HealthCheck, ___T>
5028            where
5029                ___R: ::fidl_next::Encode<
5030                        crate::wire::HealthHealthCheckRequest,
5031                        <___T as ::fidl_next::Transport>::SendBuffer,
5032                    >,
5033            {
5034                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5035                    1509959980088103220,
5036                    <super::HealthCheck as ::fidl_next::Method>::FLEXIBILITY,
5037                    request,
5038                ))
5039            }
5040
5041            #[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"]
5042            pub fn start(
5043                &self,
5044
5045                start_args: impl ::fidl_next::Encode<
5046                    crate::wire::DriverStartArgs<'static>,
5047                    <___T as ::fidl_next::Transport>::SendBuffer,
5048                >,
5049            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
5050            where
5051                <___T as ::fidl_next::Transport>::SendBuffer:
5052                    ::fidl_next::encoder::InternalHandleEncoder,
5053                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5054                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5055            {
5056                self.start_with(crate::generic::DriverStartRequest { start_args })
5057            }
5058
5059            #[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"]
5060            pub fn start_with<___R>(
5061                &self,
5062                request: ___R,
5063            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
5064            where
5065                ___R: ::fidl_next::Encode<
5066                        crate::wire::DriverStartRequest<'static>,
5067                        <___T as ::fidl_next::Transport>::SendBuffer,
5068                    >,
5069            {
5070                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5071                    2863727161496985794,
5072                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
5073                    request,
5074                ))
5075            }
5076
5077            #[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"]
5078            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
5079                ::fidl_next::SendFuture::from_untyped(
5080                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
5081                        5446759044519003197,
5082                        <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
5083                        (),
5084                    ),
5085                )
5086            }
5087
5088            #[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"]
5089            pub fn suspend(&self) -> ::fidl_next::TwoWayFuture<'_, super::Suspend, ___T> {
5090                ::fidl_next::TwoWayFuture::from_untyped(
5091                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
5092                        5542715003953095352,
5093                        <super::Suspend as ::fidl_next::Method>::FLEXIBILITY,
5094                        (),
5095                    ),
5096                )
5097            }
5098
5099            #[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"]
5100            pub fn resume(
5101                &self,
5102
5103                power_element_lease: impl ::fidl_next::Encode<
5104                    ::fidl_next::wire::fuchsia::OptionalEventPair,
5105                    <___T as ::fidl_next::Transport>::SendBuffer,
5106                >,
5107            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
5108            where
5109                <___T as ::fidl_next::Transport>::SendBuffer:
5110                    ::fidl_next::encoder::InternalHandleEncoder,
5111                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5112            {
5113                self.resume_with(crate::generic::DriverResumeRequest { power_element_lease })
5114            }
5115
5116            #[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"]
5117            pub fn resume_with<___R>(
5118                &self,
5119                request: ___R,
5120            ) -> ::fidl_next::TwoWayFuture<'_, super::Resume, ___T>
5121            where
5122                ___R: ::fidl_next::Encode<
5123                        crate::wire::DriverResumeRequest,
5124                        <___T as ::fidl_next::Transport>::SendBuffer,
5125                    >,
5126            {
5127                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5128                    2681111055565410632,
5129                    <super::Resume as ::fidl_next::Method>::FLEXIBILITY,
5130                    request,
5131                ))
5132            }
5133        }
5134
5135        /// The server for the `Driver` protocol.
5136        #[repr(transparent)]
5137        pub struct DriverServer<___T: ::fidl_next::Transport> {
5138            server: ::fidl_next::protocol::Server<___T>,
5139        }
5140
5141        impl<___T> DriverServer<___T>
5142        where
5143            ___T: ::fidl_next::Transport,
5144        {
5145            #[doc = " Proactively emitted by the driver when it detects an asynchronous\n self-fault or suspects an upstream/downstream neighbor.\n"]
5146            pub fn on_health_alert(
5147                &self,
5148
5149                alert: impl ::fidl_next::Encode<
5150                    crate::wire::HealthAlert<'static>,
5151                    <___T as ::fidl_next::Transport>::SendBuffer,
5152                >,
5153            ) -> ::fidl_next::SendFuture<'_, ___T>
5154            where
5155                <___T as ::fidl_next::Transport>::SendBuffer:
5156                    ::fidl_next::encoder::InternalHandleEncoder,
5157                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5158            {
5159                self.on_health_alert_with(crate::generic::HealthOnHealthAlertRequest { alert })
5160            }
5161
5162            #[doc = " Proactively emitted by the driver when it detects an asynchronous\n self-fault or suspects an upstream/downstream neighbor.\n"]
5163
5164            pub fn on_health_alert_with<___R>(
5165                &self,
5166                request: ___R,
5167            ) -> ::fidl_next::SendFuture<'_, ___T>
5168            where
5169                ___R: ::fidl_next::Encode<
5170                        <super::OnHealthAlert as ::fidl_next::Method>::Request,
5171                        <___T as ::fidl_next::Transport>::SendBuffer,
5172                    >,
5173            {
5174                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
5175                    8692488848137434937,
5176                    <super::OnHealthAlert as ::fidl_next::Method>::FLEXIBILITY,
5177                    request,
5178                ))
5179            }
5180        }
5181    }
5182}
5183
5184#[diagnostic::on_unimplemented(
5185    note = "If {Self} implements the non-local DriverClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5186)]
5187
5188/// A client handler for the Driver protocol.
5189///
5190/// See [`Driver`] for more details.
5191pub trait DriverLocalClientHandler<
5192    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5193    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5194>
5195{
5196    #[doc = " Proactively emitted by the driver when it detects an asynchronous\n self-fault or suspects an upstream/downstream neighbor.\n"]
5197    fn on_health_alert(
5198        &mut self,
5199
5200        request: ::fidl_next::Request<driver::OnHealthAlert, ___T>,
5201    ) -> impl ::core::future::Future<Output = ()>;
5202
5203    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5204        ::core::future::ready(())
5205    }
5206}
5207
5208impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Driver
5209where
5210    ___H: DriverLocalClientHandler<___T>,
5211    ___T: ::fidl_next::Transport,
5212    for<'de> crate::wire::HealthOnHealthAlertRequest<'de>: ::fidl_next::Decode<
5213            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5214            Constraint = (),
5215        >,
5216{
5217    async fn on_event(
5218        handler: &mut ___H,
5219        mut message: ::fidl_next::Message<___T>,
5220    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5221        match *message.header().ordinal {
5222            8692488848137434937 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5223                Ok(decoded) => {
5224                    handler.on_health_alert(::fidl_next::Request::from_decoded(decoded)).await;
5225                    Ok(())
5226                }
5227                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5228                    ordinal: 8692488848137434937,
5229                    error,
5230                }),
5231            },
5232
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#[diagnostic::on_unimplemented(
5249    note = "If {Self} implements the non-local DriverServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5250)]
5251
5252/// A server handler for the Driver protocol.
5253///
5254/// See [`Driver`] for more details.
5255pub trait DriverLocalServerHandler<
5256    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5257    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5258>
5259{
5260    #[doc = " Requests the driver to perform a self-diagnostic check.\n\n The Driver Host never issues `HealthCheck` between `Driver.Suspend` and\n the completion of `Driver.Resume`, answering\n `HealthCheckError.INVALID_STATE` itself while the driver is suspended or\n transitioning power states.\n"]
5261    fn health_check(
5262        &mut self,
5263
5264        request: ::fidl_next::Request<driver::HealthCheck, ___T>,
5265
5266        responder: ::fidl_next::Responder<driver::HealthCheck, ___T>,
5267    ) -> impl ::core::future::Future<Output = ()>;
5268
5269    #[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"]
5270    fn start(
5271        &mut self,
5272
5273        request: ::fidl_next::Request<driver::Start, ___T>,
5274
5275        responder: ::fidl_next::Responder<driver::Start, ___T>,
5276    ) -> impl ::core::future::Future<Output = ()>;
5277
5278    #[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"]
5279    fn stop(&mut self) -> impl ::core::future::Future<Output = ()>;
5280
5281    #[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"]
5282    fn suspend(
5283        &mut self,
5284
5285        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
5286    ) -> impl ::core::future::Future<Output = ()>;
5287
5288    #[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"]
5289    fn resume(
5290        &mut self,
5291
5292        request: ::fidl_next::Request<driver::Resume, ___T>,
5293
5294        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5295    ) -> impl ::core::future::Future<Output = ()>;
5296
5297    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5298        ::core::future::ready(())
5299    }
5300}
5301
5302impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Driver
5303where
5304    ___H: DriverLocalServerHandler<___T>,
5305    ___T: ::fidl_next::Transport,
5306    for<'de> crate::wire::HealthHealthCheckRequest: ::fidl_next::Decode<
5307            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5308            Constraint = (),
5309        >,
5310    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
5311            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5312            Constraint = (),
5313        >,
5314    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
5315            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5316            Constraint = (),
5317        >,
5318{
5319    async fn on_one_way(
5320        handler: &mut ___H,
5321        mut message: ::fidl_next::Message<___T>,
5322    ) -> ::core::result::Result<
5323        (),
5324        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5325    > {
5326        match *message.header().ordinal {
5327            5446759044519003197 => {
5328                handler.stop().await;
5329                Ok(())
5330            }
5331
5332            ordinal => {
5333                handler.on_unknown_interaction(ordinal).await;
5334                if ::core::matches!(
5335                    message.header().flexibility(),
5336                    ::fidl_next::protocol::Flexibility::Strict
5337                ) {
5338                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5339                } else {
5340                    Ok(())
5341                }
5342            }
5343        }
5344    }
5345
5346    async fn on_two_way(
5347        handler: &mut ___H,
5348        mut message: ::fidl_next::Message<___T>,
5349        responder: ::fidl_next::protocol::Responder<___T>,
5350    ) -> ::core::result::Result<
5351        (),
5352        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5353    > {
5354        match *message.header().ordinal {
5355            1509959980088103220 => {
5356                let responder = ::fidl_next::Responder::from_untyped(responder);
5357
5358                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5359                    Ok(decoded) => {
5360                        handler
5361                            .health_check(::fidl_next::Request::from_decoded(decoded), responder)
5362                            .await;
5363                        Ok(())
5364                    }
5365                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5366                        ordinal: 1509959980088103220,
5367                        error,
5368                    }),
5369                }
5370            }
5371
5372            2863727161496985794 => {
5373                let responder = ::fidl_next::Responder::from_untyped(responder);
5374
5375                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5376                    Ok(decoded) => {
5377                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
5378                        Ok(())
5379                    }
5380                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5381                        ordinal: 2863727161496985794,
5382                        error,
5383                    }),
5384                }
5385            }
5386
5387            5542715003953095352 => {
5388                let responder = ::fidl_next::Responder::from_untyped(responder);
5389
5390                handler.suspend(responder).await;
5391                Ok(())
5392            }
5393
5394            2681111055565410632 => {
5395                let responder = ::fidl_next::Responder::from_untyped(responder);
5396
5397                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5398                    Ok(decoded) => {
5399                        handler
5400                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
5401                            .await;
5402                        Ok(())
5403                    }
5404                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5405                        ordinal: 2681111055565410632,
5406                        error,
5407                    }),
5408                }
5409            }
5410
5411            ordinal => {
5412                handler.on_unknown_interaction(ordinal).await;
5413                if ::core::matches!(
5414                    message.header().flexibility(),
5415                    ::fidl_next::protocol::Flexibility::Strict
5416                ) {
5417                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5418                } else {
5419                    responder
5420                        .respond_framework_error(
5421                            ordinal,
5422                            ::fidl_next::FrameworkError::UnknownMethod,
5423                        )
5424                        .expect("encoding a framework error should never fail")
5425                        .await?;
5426                    Ok(())
5427                }
5428            }
5429        }
5430    }
5431}
5432
5433/// A client handler for the Driver protocol.
5434///
5435/// See [`Driver`] for more details.
5436pub trait DriverClientHandler<
5437    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5438    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5439>
5440{
5441    #[doc = " Proactively emitted by the driver when it detects an asynchronous\n self-fault or suspects an upstream/downstream neighbor.\n"]
5442    fn on_health_alert(
5443        &mut self,
5444
5445        request: ::fidl_next::Request<driver::OnHealthAlert, ___T>,
5446    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5447
5448    fn on_unknown_interaction(
5449        &mut self,
5450        ordinal: u64,
5451    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5452        ::core::future::ready(())
5453    }
5454}
5455
5456impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Driver
5457where
5458    ___H: DriverClientHandler<___T> + ::core::marker::Send,
5459    ___T: ::fidl_next::Transport,
5460    for<'de> crate::wire::HealthOnHealthAlertRequest<'de>: ::fidl_next::Decode<
5461            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5462            Constraint = (),
5463        >,
5464{
5465    async fn on_event(
5466        handler: &mut ___H,
5467        mut message: ::fidl_next::Message<___T>,
5468    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5469        match *message.header().ordinal {
5470            8692488848137434937 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
5471                Ok(decoded) => {
5472                    handler.on_health_alert(::fidl_next::Request::from_decoded(decoded)).await;
5473                    Ok(())
5474                }
5475                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5476                    ordinal: 8692488848137434937,
5477                    error,
5478                }),
5479            },
5480
5481            ordinal => {
5482                handler.on_unknown_interaction(ordinal).await;
5483                if ::core::matches!(
5484                    message.header().flexibility(),
5485                    ::fidl_next::protocol::Flexibility::Strict
5486                ) {
5487                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5488                } else {
5489                    Ok(())
5490                }
5491            }
5492        }
5493    }
5494}
5495
5496/// A server handler for the Driver protocol.
5497///
5498/// See [`Driver`] for more details.
5499pub trait DriverServerHandler<
5500    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
5501    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
5502>
5503{
5504    #[doc = " Requests the driver to perform a self-diagnostic check.\n\n The Driver Host never issues `HealthCheck` between `Driver.Suspend` and\n the completion of `Driver.Resume`, answering\n `HealthCheckError.INVALID_STATE` itself while the driver is suspended or\n transitioning power states.\n"]
5505    fn health_check(
5506        &mut self,
5507
5508        request: ::fidl_next::Request<driver::HealthCheck, ___T>,
5509
5510        responder: ::fidl_next::Responder<driver::HealthCheck, ___T>,
5511    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5512
5513    #[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"]
5514    fn start(
5515        &mut self,
5516
5517        request: ::fidl_next::Request<driver::Start, ___T>,
5518
5519        responder: ::fidl_next::Responder<driver::Start, ___T>,
5520    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5521
5522    #[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"]
5523    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5524
5525    #[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"]
5526    fn suspend(
5527        &mut self,
5528
5529        responder: ::fidl_next::Responder<driver::Suspend, ___T>,
5530    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5531
5532    #[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"]
5533    fn resume(
5534        &mut self,
5535
5536        request: ::fidl_next::Request<driver::Resume, ___T>,
5537
5538        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5539    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5540
5541    fn on_unknown_interaction(
5542        &mut self,
5543        ordinal: u64,
5544    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5545        ::core::future::ready(())
5546    }
5547}
5548
5549impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Driver
5550where
5551    ___H: DriverServerHandler<___T> + ::core::marker::Send,
5552    ___T: ::fidl_next::Transport,
5553    for<'de> crate::wire::HealthHealthCheckRequest: ::fidl_next::Decode<
5554            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5555            Constraint = (),
5556        >,
5557    for<'de> crate::wire::DriverStartRequest<'de>: ::fidl_next::Decode<
5558            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5559            Constraint = (),
5560        >,
5561    for<'de> crate::wire::DriverResumeRequest: ::fidl_next::Decode<
5562            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
5563            Constraint = (),
5564        >,
5565{
5566    async fn on_one_way(
5567        handler: &mut ___H,
5568        mut message: ::fidl_next::Message<___T>,
5569    ) -> ::core::result::Result<
5570        (),
5571        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5572    > {
5573        match *message.header().ordinal {
5574            5446759044519003197 => {
5575                handler.stop().await;
5576                Ok(())
5577            }
5578
5579            ordinal => {
5580                handler.on_unknown_interaction(ordinal).await;
5581                if ::core::matches!(
5582                    message.header().flexibility(),
5583                    ::fidl_next::protocol::Flexibility::Strict
5584                ) {
5585                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5586                } else {
5587                    Ok(())
5588                }
5589            }
5590        }
5591    }
5592
5593    async fn on_two_way(
5594        handler: &mut ___H,
5595        mut message: ::fidl_next::Message<___T>,
5596        responder: ::fidl_next::protocol::Responder<___T>,
5597    ) -> ::core::result::Result<
5598        (),
5599        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5600    > {
5601        match *message.header().ordinal {
5602            1509959980088103220 => {
5603                let responder = ::fidl_next::Responder::from_untyped(responder);
5604
5605                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5606                    Ok(decoded) => {
5607                        handler
5608                            .health_check(::fidl_next::Request::from_decoded(decoded), responder)
5609                            .await;
5610                        Ok(())
5611                    }
5612                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5613                        ordinal: 1509959980088103220,
5614                        error,
5615                    }),
5616                }
5617            }
5618
5619            2863727161496985794 => {
5620                let responder = ::fidl_next::Responder::from_untyped(responder);
5621
5622                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5623                    Ok(decoded) => {
5624                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
5625                        Ok(())
5626                    }
5627                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5628                        ordinal: 2863727161496985794,
5629                        error,
5630                    }),
5631                }
5632            }
5633
5634            5542715003953095352 => {
5635                let responder = ::fidl_next::Responder::from_untyped(responder);
5636
5637                handler.suspend(responder).await;
5638                Ok(())
5639            }
5640
5641            2681111055565410632 => {
5642                let responder = ::fidl_next::Responder::from_untyped(responder);
5643
5644                match ::fidl_next::AsDecoderExt::into_decoded(message) {
5645                    Ok(decoded) => {
5646                        handler
5647                            .resume(::fidl_next::Request::from_decoded(decoded), responder)
5648                            .await;
5649                        Ok(())
5650                    }
5651                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
5652                        ordinal: 2681111055565410632,
5653                        error,
5654                    }),
5655                }
5656            }
5657
5658            ordinal => {
5659                handler.on_unknown_interaction(ordinal).await;
5660                if ::core::matches!(
5661                    message.header().flexibility(),
5662                    ::fidl_next::protocol::Flexibility::Strict
5663                ) {
5664                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5665                } else {
5666                    responder
5667                        .respond_framework_error(
5668                            ordinal,
5669                            ::fidl_next::FrameworkError::UnknownMethod,
5670                        )
5671                        .expect("encoding a framework error should never fail")
5672                        .await?;
5673                    Ok(())
5674                }
5675            }
5676        }
5677    }
5678}
5679
5680impl<___T> DriverClientHandler<___T> for ::fidl_next::IgnoreEvents
5681where
5682    ___T: ::fidl_next::Transport,
5683{
5684    async fn on_health_alert(&mut self, _: ::fidl_next::Request<driver::OnHealthAlert, ___T>) {}
5685
5686    async fn on_unknown_interaction(&mut self, _: u64) {}
5687}
5688
5689impl<___H, ___T> DriverLocalClientHandler<___T> for ::fidl_next::Local<___H>
5690where
5691    ___H: DriverClientHandler<___T>,
5692    ___T: ::fidl_next::Transport,
5693{
5694    async fn on_health_alert(
5695        &mut self,
5696
5697        request: ::fidl_next::Request<driver::OnHealthAlert, ___T>,
5698    ) {
5699        ___H::on_health_alert(&mut self.0, request).await
5700    }
5701
5702    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5703        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5704    }
5705}
5706
5707impl<___H, ___T> DriverLocalServerHandler<___T> for ::fidl_next::Local<___H>
5708where
5709    ___H: DriverServerHandler<___T>,
5710    ___T: ::fidl_next::Transport,
5711{
5712    async fn health_check(
5713        &mut self,
5714
5715        request: ::fidl_next::Request<driver::HealthCheck, ___T>,
5716
5717        responder: ::fidl_next::Responder<driver::HealthCheck, ___T>,
5718    ) {
5719        ___H::health_check(&mut self.0, request, responder).await
5720    }
5721
5722    async fn start(
5723        &mut self,
5724
5725        request: ::fidl_next::Request<driver::Start, ___T>,
5726
5727        responder: ::fidl_next::Responder<driver::Start, ___T>,
5728    ) {
5729        ___H::start(&mut self.0, request, responder).await
5730    }
5731
5732    async fn stop(&mut self) {
5733        ___H::stop(&mut self.0).await
5734    }
5735
5736    async fn suspend(&mut self, responder: ::fidl_next::Responder<driver::Suspend, ___T>) {
5737        ___H::suspend(&mut self.0, responder).await
5738    }
5739
5740    async fn resume(
5741        &mut self,
5742
5743        request: ::fidl_next::Request<driver::Resume, ___T>,
5744
5745        responder: ::fidl_next::Responder<driver::Resume, ___T>,
5746    ) {
5747        ___H::resume(&mut self.0, request, responder).await
5748    }
5749
5750    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5751        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5752    }
5753}
5754
5755/// The type corresponding to the Node protocol.
5756#[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"]
5757#[derive(PartialEq, Debug)]
5758pub struct Node;
5759
5760#[cfg(target_os = "fuchsia")]
5761impl ::fidl_next::HasTransport for Node {
5762    type Transport = ::fidl_next::fuchsia::zx::Channel;
5763}
5764
5765pub mod node {
5766    pub mod prelude {
5767        pub use crate::{
5768            Node, NodeClientHandler, NodeLocalClientHandler, NodeLocalServerHandler,
5769            NodeServerHandler, node,
5770        };
5771
5772        pub use crate::natural::NodeAddChildRequest;
5773
5774        pub use crate::natural::NodeError;
5775
5776        pub use crate::natural::NodeProvideResourceRequest;
5777
5778        pub use crate::natural::NodeAddChildResponse;
5779
5780        pub use crate::natural::NodeProvideResourceResponse;
5781    }
5782
5783    pub struct AddChild;
5784
5785    impl ::fidl_next::Method for AddChild {
5786        const ORDINAL: u64 = 8633697350522413353;
5787        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5788            ::fidl_next::protocol::Flexibility::Flexible;
5789
5790        type Protocol = crate::Node;
5791
5792        type Request = crate::wire::NodeAddChildRequest<'static>;
5793    }
5794
5795    impl ::fidl_next::TwoWayMethod for AddChild {
5796        type Response = ::fidl_next::wire::Result<
5797            'static,
5798            crate::wire::NodeAddChildResponse,
5799            crate::wire::NodeError,
5800        >;
5801    }
5802
5803    impl<___R> ::fidl_next::Respond<___R> for AddChild {
5804        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5805
5806        fn respond(response: ___R) -> Self::Output {
5807            ::core::result::Result::Ok(response)
5808        }
5809    }
5810
5811    impl<___R> ::fidl_next::RespondErr<___R> for AddChild {
5812        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5813
5814        fn respond_err(response: ___R) -> Self::Output {
5815            ::core::result::Result::Err(response)
5816        }
5817    }
5818
5819    pub struct ProvideResource;
5820
5821    impl ::fidl_next::Method for ProvideResource {
5822        const ORDINAL: u64 = 3144824145393523406;
5823        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
5824            ::fidl_next::protocol::Flexibility::Flexible;
5825
5826        type Protocol = crate::Node;
5827
5828        type Request = crate::wire::NodeProvideResourceRequest<'static>;
5829    }
5830
5831    impl ::fidl_next::TwoWayMethod for ProvideResource {
5832        type Response = ::fidl_next::wire::Result<
5833            'static,
5834            crate::wire::NodeProvideResourceResponse,
5835            crate::wire::NodeError,
5836        >;
5837    }
5838
5839    impl<___R> ::fidl_next::Respond<___R> for ProvideResource {
5840        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
5841
5842        fn respond(response: ___R) -> Self::Output {
5843            ::core::result::Result::Ok(response)
5844        }
5845    }
5846
5847    impl<___R> ::fidl_next::RespondErr<___R> for ProvideResource {
5848        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
5849
5850        fn respond_err(response: ___R) -> Self::Output {
5851            ::core::result::Result::Err(response)
5852        }
5853    }
5854
5855    mod ___detail {
5856        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
5857        where
5858            ___T: ::fidl_next::Transport,
5859        {
5860            type Client = NodeClient<___T>;
5861            type Server = NodeServer<___T>;
5862        }
5863
5864        /// The client for the `Node` protocol.
5865        #[repr(transparent)]
5866        pub struct NodeClient<___T: ::fidl_next::Transport> {
5867            #[allow(dead_code)]
5868            client: ::fidl_next::protocol::Client<___T>,
5869        }
5870
5871        impl<___T> NodeClient<___T>
5872        where
5873            ___T: ::fidl_next::Transport,
5874        {
5875            #[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"]
5876            pub fn add_child(
5877                &self,
5878
5879                args: impl ::fidl_next::Encode<
5880                    crate::wire::NodeAddArgs<'static>,
5881                    <___T as ::fidl_next::Transport>::SendBuffer,
5882                >,
5883
5884                controller: impl ::fidl_next::Encode<
5885                    ::fidl_next::ServerEnd<
5886                        crate::NodeController,
5887                        ::fidl_next::wire::fuchsia::Channel,
5888                    >,
5889                    <___T as ::fidl_next::Transport>::SendBuffer,
5890                >,
5891
5892                node: impl ::fidl_next::Encode<
5893                    ::fidl_next::ServerEnd<
5894                        crate::Node,
5895                        ::fidl_next::wire::fuchsia::OptionalChannel,
5896                    >,
5897                    <___T as ::fidl_next::Transport>::SendBuffer,
5898                >,
5899            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5900            where
5901                <___T as ::fidl_next::Transport>::SendBuffer:
5902                    ::fidl_next::encoder::InternalHandleEncoder,
5903                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5904                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5905            {
5906                self.add_child_with(crate::generic::NodeAddChildRequest { args, controller, node })
5907            }
5908
5909            #[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"]
5910            pub fn add_child_with<___R>(
5911                &self,
5912                request: ___R,
5913            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
5914            where
5915                ___R: ::fidl_next::Encode<
5916                        crate::wire::NodeAddChildRequest<'static>,
5917                        <___T as ::fidl_next::Transport>::SendBuffer,
5918                    >,
5919            {
5920                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5921                    8633697350522413353,
5922                    <super::AddChild as ::fidl_next::Method>::FLEXIBILITY,
5923                    request,
5924                ))
5925            }
5926
5927            #[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"]
5928            pub fn provide_resource(
5929                &self,
5930
5931                resource: impl ::fidl_next::Encode<
5932                    crate::wire::ResourceArgs<'static>,
5933                    <___T as ::fidl_next::Transport>::SendBuffer,
5934                >,
5935
5936                controller: impl ::fidl_next::Encode<
5937                    ::fidl_next::ServerEnd<
5938                        crate::ResourceController,
5939                        ::fidl_next::wire::fuchsia::Channel,
5940                    >,
5941                    <___T as ::fidl_next::Transport>::SendBuffer,
5942                >,
5943            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5944            where
5945                <___T as ::fidl_next::Transport>::SendBuffer:
5946                    ::fidl_next::encoder::InternalHandleEncoder,
5947                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5948                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
5949            {
5950                self.provide_resource_with(crate::generic::NodeProvideResourceRequest {
5951                    resource,
5952
5953                    controller,
5954                })
5955            }
5956
5957            #[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"]
5958            pub fn provide_resource_with<___R>(
5959                &self,
5960                request: ___R,
5961            ) -> ::fidl_next::TwoWayFuture<'_, super::ProvideResource, ___T>
5962            where
5963                ___R: ::fidl_next::Encode<
5964                        crate::wire::NodeProvideResourceRequest<'static>,
5965                        <___T as ::fidl_next::Transport>::SendBuffer,
5966                    >,
5967            {
5968                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
5969                    3144824145393523406,
5970                    <super::ProvideResource as ::fidl_next::Method>::FLEXIBILITY,
5971                    request,
5972                ))
5973            }
5974        }
5975
5976        /// The server for the `Node` protocol.
5977        #[repr(transparent)]
5978        pub struct NodeServer<___T: ::fidl_next::Transport> {
5979            server: ::fidl_next::protocol::Server<___T>,
5980        }
5981
5982        impl<___T> NodeServer<___T> where ___T: ::fidl_next::Transport {}
5983    }
5984}
5985
5986#[diagnostic::on_unimplemented(
5987    note = "If {Self} implements the non-local NodeClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5988)]
5989
5990/// A client handler for the Node protocol.
5991///
5992/// See [`Node`] for more details.
5993pub trait NodeLocalClientHandler<
5994    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5995    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5996>
5997{
5998    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5999        ::core::future::ready(())
6000    }
6001}
6002
6003impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Node
6004where
6005    ___H: NodeLocalClientHandler<___T>,
6006    ___T: ::fidl_next::Transport,
6007{
6008    async fn on_event(
6009        handler: &mut ___H,
6010        mut message: ::fidl_next::Message<___T>,
6011    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6012        match *message.header().ordinal {
6013            ordinal => {
6014                handler.on_unknown_interaction(ordinal).await;
6015                if ::core::matches!(
6016                    message.header().flexibility(),
6017                    ::fidl_next::protocol::Flexibility::Strict
6018                ) {
6019                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6020                } else {
6021                    Ok(())
6022                }
6023            }
6024        }
6025    }
6026}
6027
6028#[diagnostic::on_unimplemented(
6029    note = "If {Self} implements the non-local NodeServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6030)]
6031
6032/// A server handler for the Node protocol.
6033///
6034/// See [`Node`] for more details.
6035pub trait NodeLocalServerHandler<
6036    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6037    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6038>
6039{
6040    #[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"]
6041    fn add_child(
6042        &mut self,
6043
6044        request: ::fidl_next::Request<node::AddChild, ___T>,
6045
6046        responder: ::fidl_next::Responder<node::AddChild, ___T>,
6047    ) -> impl ::core::future::Future<Output = ()>;
6048
6049    #[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"]
6050    fn provide_resource(
6051        &mut self,
6052
6053        request: ::fidl_next::Request<node::ProvideResource, ___T>,
6054
6055        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
6056    ) -> impl ::core::future::Future<Output = ()>;
6057
6058    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6059        ::core::future::ready(())
6060    }
6061}
6062
6063impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Node
6064where
6065    ___H: NodeLocalServerHandler<___T>,
6066    ___T: ::fidl_next::Transport,
6067    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
6068            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6069            Constraint = (),
6070        >,
6071    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
6072            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6073            Constraint = (),
6074        >,
6075{
6076    async fn on_one_way(
6077        handler: &mut ___H,
6078        mut message: ::fidl_next::Message<___T>,
6079    ) -> ::core::result::Result<
6080        (),
6081        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6082    > {
6083        match *message.header().ordinal {
6084            ordinal => {
6085                handler.on_unknown_interaction(ordinal).await;
6086                if ::core::matches!(
6087                    message.header().flexibility(),
6088                    ::fidl_next::protocol::Flexibility::Strict
6089                ) {
6090                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6091                } else {
6092                    Ok(())
6093                }
6094            }
6095        }
6096    }
6097
6098    async fn on_two_way(
6099        handler: &mut ___H,
6100        mut message: ::fidl_next::Message<___T>,
6101        responder: ::fidl_next::protocol::Responder<___T>,
6102    ) -> ::core::result::Result<
6103        (),
6104        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6105    > {
6106        match *message.header().ordinal {
6107            8633697350522413353 => {
6108                let responder = ::fidl_next::Responder::from_untyped(responder);
6109
6110                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6111                    Ok(decoded) => {
6112                        handler
6113                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
6114                            .await;
6115                        Ok(())
6116                    }
6117                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6118                        ordinal: 8633697350522413353,
6119                        error,
6120                    }),
6121                }
6122            }
6123
6124            3144824145393523406 => {
6125                let responder = ::fidl_next::Responder::from_untyped(responder);
6126
6127                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6128                    Ok(decoded) => {
6129                        handler
6130                            .provide_resource(
6131                                ::fidl_next::Request::from_decoded(decoded),
6132                                responder,
6133                            )
6134                            .await;
6135                        Ok(())
6136                    }
6137                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6138                        ordinal: 3144824145393523406,
6139                        error,
6140                    }),
6141                }
6142            }
6143
6144            ordinal => {
6145                handler.on_unknown_interaction(ordinal).await;
6146                if ::core::matches!(
6147                    message.header().flexibility(),
6148                    ::fidl_next::protocol::Flexibility::Strict
6149                ) {
6150                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6151                } else {
6152                    responder
6153                        .respond_framework_error(
6154                            ordinal,
6155                            ::fidl_next::FrameworkError::UnknownMethod,
6156                        )
6157                        .expect("encoding a framework error should never fail")
6158                        .await?;
6159                    Ok(())
6160                }
6161            }
6162        }
6163    }
6164}
6165
6166/// A client handler for the Node protocol.
6167///
6168/// See [`Node`] for more details.
6169pub trait NodeClientHandler<
6170    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6171    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6172>
6173{
6174    fn on_unknown_interaction(
6175        &mut self,
6176        ordinal: u64,
6177    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6178        ::core::future::ready(())
6179    }
6180}
6181
6182impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
6183where
6184    ___H: NodeClientHandler<___T> + ::core::marker::Send,
6185    ___T: ::fidl_next::Transport,
6186{
6187    async fn on_event(
6188        handler: &mut ___H,
6189        mut message: ::fidl_next::Message<___T>,
6190    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6191        match *message.header().ordinal {
6192            ordinal => {
6193                handler.on_unknown_interaction(ordinal).await;
6194                if ::core::matches!(
6195                    message.header().flexibility(),
6196                    ::fidl_next::protocol::Flexibility::Strict
6197                ) {
6198                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6199                } else {
6200                    Ok(())
6201                }
6202            }
6203        }
6204    }
6205}
6206
6207/// A server handler for the Node protocol.
6208///
6209/// See [`Node`] for more details.
6210pub trait NodeServerHandler<
6211    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6212    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6213>
6214{
6215    #[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"]
6216    fn add_child(
6217        &mut self,
6218
6219        request: ::fidl_next::Request<node::AddChild, ___T>,
6220
6221        responder: ::fidl_next::Responder<node::AddChild, ___T>,
6222    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6223
6224    #[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"]
6225    fn provide_resource(
6226        &mut self,
6227
6228        request: ::fidl_next::Request<node::ProvideResource, ___T>,
6229
6230        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
6231    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6232
6233    fn on_unknown_interaction(
6234        &mut self,
6235        ordinal: u64,
6236    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6237        ::core::future::ready(())
6238    }
6239}
6240
6241impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
6242where
6243    ___H: NodeServerHandler<___T> + ::core::marker::Send,
6244    ___T: ::fidl_next::Transport,
6245    for<'de> crate::wire::NodeAddChildRequest<'de>: ::fidl_next::Decode<
6246            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6247            Constraint = (),
6248        >,
6249    for<'de> crate::wire::NodeProvideResourceRequest<'de>: ::fidl_next::Decode<
6250            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6251            Constraint = (),
6252        >,
6253{
6254    async fn on_one_way(
6255        handler: &mut ___H,
6256        mut message: ::fidl_next::Message<___T>,
6257    ) -> ::core::result::Result<
6258        (),
6259        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6260    > {
6261        match *message.header().ordinal {
6262            ordinal => {
6263                handler.on_unknown_interaction(ordinal).await;
6264                if ::core::matches!(
6265                    message.header().flexibility(),
6266                    ::fidl_next::protocol::Flexibility::Strict
6267                ) {
6268                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6269                } else {
6270                    Ok(())
6271                }
6272            }
6273        }
6274    }
6275
6276    async fn on_two_way(
6277        handler: &mut ___H,
6278        mut message: ::fidl_next::Message<___T>,
6279        responder: ::fidl_next::protocol::Responder<___T>,
6280    ) -> ::core::result::Result<
6281        (),
6282        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6283    > {
6284        match *message.header().ordinal {
6285            8633697350522413353 => {
6286                let responder = ::fidl_next::Responder::from_untyped(responder);
6287
6288                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6289                    Ok(decoded) => {
6290                        handler
6291                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
6292                            .await;
6293                        Ok(())
6294                    }
6295                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6296                        ordinal: 8633697350522413353,
6297                        error,
6298                    }),
6299                }
6300            }
6301
6302            3144824145393523406 => {
6303                let responder = ::fidl_next::Responder::from_untyped(responder);
6304
6305                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6306                    Ok(decoded) => {
6307                        handler
6308                            .provide_resource(
6309                                ::fidl_next::Request::from_decoded(decoded),
6310                                responder,
6311                            )
6312                            .await;
6313                        Ok(())
6314                    }
6315                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6316                        ordinal: 3144824145393523406,
6317                        error,
6318                    }),
6319                }
6320            }
6321
6322            ordinal => {
6323                handler.on_unknown_interaction(ordinal).await;
6324                if ::core::matches!(
6325                    message.header().flexibility(),
6326                    ::fidl_next::protocol::Flexibility::Strict
6327                ) {
6328                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6329                } else {
6330                    responder
6331                        .respond_framework_error(
6332                            ordinal,
6333                            ::fidl_next::FrameworkError::UnknownMethod,
6334                        )
6335                        .expect("encoding a framework error should never fail")
6336                        .await?;
6337                    Ok(())
6338                }
6339            }
6340        }
6341    }
6342}
6343
6344impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
6345where
6346    ___T: ::fidl_next::Transport,
6347{
6348    async fn on_unknown_interaction(&mut self, _: u64) {}
6349}
6350
6351impl<___H, ___T> NodeLocalClientHandler<___T> for ::fidl_next::Local<___H>
6352where
6353    ___H: NodeClientHandler<___T>,
6354    ___T: ::fidl_next::Transport,
6355{
6356    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6357        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6358    }
6359}
6360
6361impl<___H, ___T> NodeLocalServerHandler<___T> for ::fidl_next::Local<___H>
6362where
6363    ___H: NodeServerHandler<___T>,
6364    ___T: ::fidl_next::Transport,
6365{
6366    async fn add_child(
6367        &mut self,
6368
6369        request: ::fidl_next::Request<node::AddChild, ___T>,
6370
6371        responder: ::fidl_next::Responder<node::AddChild, ___T>,
6372    ) {
6373        ___H::add_child(&mut self.0, request, responder).await
6374    }
6375
6376    async fn provide_resource(
6377        &mut self,
6378
6379        request: ::fidl_next::Request<node::ProvideResource, ___T>,
6380
6381        responder: ::fidl_next::Responder<node::ProvideResource, ___T>,
6382    ) {
6383        ___H::provide_resource(&mut self.0, request, responder).await
6384    }
6385
6386    async fn on_unknown_interaction(&mut self, ordinal: u64) {
6387        ___H::on_unknown_interaction(&mut self.0, ordinal).await
6388    }
6389}
6390
6391/// The type corresponding to the NodeController protocol.
6392#[doc = " Protocol through which a parent node controls one of its children.\n"]
6393#[derive(PartialEq, Debug)]
6394pub struct NodeController;
6395
6396#[cfg(target_os = "fuchsia")]
6397impl ::fidl_next::HasTransport for NodeController {
6398    type Transport = ::fidl_next::fuchsia::zx::Channel;
6399}
6400
6401pub mod node_controller {
6402    pub mod prelude {
6403        pub use crate::{
6404            NodeController, NodeControllerClientHandler, NodeControllerLocalClientHandler,
6405            NodeControllerLocalServerHandler, NodeControllerServerHandler, node_controller,
6406        };
6407
6408        pub use crate::natural::DriverResult;
6409
6410        pub use crate::natural::NodeControllerOnBindRequest;
6411
6412        pub use crate::natural::NodeControllerRequestBindRequest;
6413
6414        pub use crate::natural::NodeControllerRequestBindResponse;
6415    }
6416
6417    pub struct Remove;
6418
6419    impl ::fidl_next::Method for Remove {
6420        const ORDINAL: u64 = 6123359741742396225;
6421        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6422            ::fidl_next::protocol::Flexibility::Flexible;
6423
6424        type Protocol = crate::NodeController;
6425
6426        type Request = ::fidl_next::wire::EmptyMessageBody;
6427    }
6428
6429    pub struct RequestBind;
6430
6431    impl ::fidl_next::Method for RequestBind {
6432        const ORDINAL: u64 = 4735909333556220047;
6433        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6434            ::fidl_next::protocol::Flexibility::Flexible;
6435
6436        type Protocol = crate::NodeController;
6437
6438        type Request = crate::wire::NodeControllerRequestBindRequest<'static>;
6439    }
6440
6441    impl ::fidl_next::TwoWayMethod for RequestBind {
6442        type Response = ::fidl_next::wire::Result<
6443            'static,
6444            crate::wire::NodeControllerRequestBindResponse,
6445            ::fidl_next::wire::fuchsia::Status,
6446        >;
6447    }
6448
6449    impl<___R> ::fidl_next::Respond<___R> for RequestBind {
6450        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6451
6452        fn respond(response: ___R) -> Self::Output {
6453            ::core::result::Result::Ok(response)
6454        }
6455    }
6456
6457    impl<___R> ::fidl_next::RespondErr<___R> for RequestBind {
6458        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6459
6460        fn respond_err(response: ___R) -> Self::Output {
6461            ::core::result::Result::Err(response)
6462        }
6463    }
6464
6465    pub struct OnBind;
6466
6467    impl ::fidl_next::Method for OnBind {
6468        const ORDINAL: u64 = 5905369594807853098;
6469        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6470            ::fidl_next::protocol::Flexibility::Flexible;
6471
6472        type Protocol = crate::NodeController;
6473
6474        type Request = crate::wire::NodeControllerOnBindRequest<'static>;
6475    }
6476
6477    pub struct WaitForDriver;
6478
6479    impl ::fidl_next::Method for WaitForDriver {
6480        const ORDINAL: u64 = 7635589759067755399;
6481        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
6482            ::fidl_next::protocol::Flexibility::Flexible;
6483
6484        type Protocol = crate::NodeController;
6485
6486        type Request = ::fidl_next::wire::EmptyMessageBody;
6487    }
6488
6489    impl ::fidl_next::TwoWayMethod for WaitForDriver {
6490        type Response = ::fidl_next::wire::Result<
6491            'static,
6492            crate::wire::DriverResult<'static>,
6493            ::fidl_next::wire::fuchsia::Status,
6494        >;
6495    }
6496
6497    impl<___R> ::fidl_next::Respond<___R> for WaitForDriver {
6498        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
6499
6500        fn respond(response: ___R) -> Self::Output {
6501            ::core::result::Result::Ok(response)
6502        }
6503    }
6504
6505    impl<___R> ::fidl_next::RespondErr<___R> for WaitForDriver {
6506        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
6507
6508        fn respond_err(response: ___R) -> Self::Output {
6509            ::core::result::Result::Err(response)
6510        }
6511    }
6512
6513    mod ___detail {
6514        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeController
6515        where
6516            ___T: ::fidl_next::Transport,
6517        {
6518            type Client = NodeControllerClient<___T>;
6519            type Server = NodeControllerServer<___T>;
6520        }
6521
6522        /// The client for the `NodeController` protocol.
6523        #[repr(transparent)]
6524        pub struct NodeControllerClient<___T: ::fidl_next::Transport> {
6525            #[allow(dead_code)]
6526            client: ::fidl_next::protocol::Client<___T>,
6527        }
6528
6529        impl<___T> NodeControllerClient<___T>
6530        where
6531            ___T: ::fidl_next::Transport,
6532        {
6533            #[doc = " Removes the node and all of its children.\n"]
6534            pub fn remove(&self) -> ::fidl_next::SendFuture<'_, ___T> {
6535                ::fidl_next::SendFuture::from_untyped(
6536                    self.client.send_one_way::<::fidl_next::wire::EmptyMessageBody>(
6537                        6123359741742396225,
6538                        <super::Remove as ::fidl_next::Method>::FLEXIBILITY,
6539                        (),
6540                    ),
6541                )
6542            }
6543
6544            #[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"]
6545            pub fn request_bind_with<___R>(
6546                &self,
6547                request: ___R,
6548            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestBind, ___T>
6549            where
6550                ___R: ::fidl_next::Encode<
6551                        crate::wire::NodeControllerRequestBindRequest<'static>,
6552                        <___T as ::fidl_next::Transport>::SendBuffer,
6553                    >,
6554            {
6555                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
6556                    4735909333556220047,
6557                    <super::RequestBind as ::fidl_next::Method>::FLEXIBILITY,
6558                    request,
6559                ))
6560            }
6561
6562            #[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"]
6563            pub fn wait_for_driver(
6564                &self,
6565            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForDriver, ___T> {
6566                ::fidl_next::TwoWayFuture::from_untyped(
6567                    self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
6568                        7635589759067755399,
6569                        <super::WaitForDriver as ::fidl_next::Method>::FLEXIBILITY,
6570                        (),
6571                    ),
6572                )
6573            }
6574        }
6575
6576        /// The server for the `NodeController` protocol.
6577        #[repr(transparent)]
6578        pub struct NodeControllerServer<___T: ::fidl_next::Transport> {
6579            server: ::fidl_next::protocol::Server<___T>,
6580        }
6581
6582        impl<___T> NodeControllerServer<___T>
6583        where
6584            ___T: ::fidl_next::Transport,
6585        {
6586            #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6587
6588            pub fn on_bind_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6589            where
6590                ___R: ::fidl_next::Encode<
6591                        <super::OnBind as ::fidl_next::Method>::Request,
6592                        <___T as ::fidl_next::Transport>::SendBuffer,
6593                    >,
6594            {
6595                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
6596                    5905369594807853098,
6597                    <super::OnBind as ::fidl_next::Method>::FLEXIBILITY,
6598                    request,
6599                ))
6600            }
6601        }
6602    }
6603}
6604
6605#[diagnostic::on_unimplemented(
6606    note = "If {Self} implements the non-local NodeControllerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
6607)]
6608
6609/// A client handler for the NodeController protocol.
6610///
6611/// See [`NodeController`] for more details.
6612pub trait NodeControllerLocalClientHandler<
6613    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6614    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6615>
6616{
6617    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6618    fn on_bind(
6619        &mut self,
6620
6621        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6622    ) -> impl ::core::future::Future<Output = ()>;
6623
6624    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6625        ::core::future::ready(())
6626    }
6627}
6628
6629impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeController
6630where
6631    ___H: NodeControllerLocalClientHandler<___T>,
6632    ___T: ::fidl_next::Transport,
6633    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6634            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6635            Constraint = (),
6636        >,
6637{
6638    async fn on_event(
6639        handler: &mut ___H,
6640        mut message: ::fidl_next::Message<___T>,
6641    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6642        match *message.header().ordinal {
6643            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6644                Ok(decoded) => {
6645                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6646                    Ok(())
6647                }
6648                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6649                    ordinal: 5905369594807853098,
6650                    error,
6651                }),
6652            },
6653
6654            ordinal => {
6655                handler.on_unknown_interaction(ordinal).await;
6656                if ::core::matches!(
6657                    message.header().flexibility(),
6658                    ::fidl_next::protocol::Flexibility::Strict
6659                ) {
6660                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6661                } else {
6662                    Ok(())
6663                }
6664            }
6665        }
6666    }
6667}
6668
6669#[diagnostic::on_unimplemented(
6670    note = "If {Self} implements the non-local NodeControllerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
6671)]
6672
6673/// A server handler for the NodeController protocol.
6674///
6675/// See [`NodeController`] for more details.
6676pub trait NodeControllerLocalServerHandler<
6677    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6678    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6679>
6680{
6681    #[doc = " Removes the node and all of its children.\n"]
6682    fn remove(&mut self) -> impl ::core::future::Future<Output = ()>;
6683
6684    #[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"]
6685    fn request_bind(
6686        &mut self,
6687
6688        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6689
6690        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6691    ) -> impl ::core::future::Future<Output = ()>;
6692
6693    #[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"]
6694    fn wait_for_driver(
6695        &mut self,
6696
6697        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6698    ) -> impl ::core::future::Future<Output = ()>;
6699
6700    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
6701        ::core::future::ready(())
6702    }
6703}
6704
6705impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeController
6706where
6707    ___H: NodeControllerLocalServerHandler<___T>,
6708    ___T: ::fidl_next::Transport,
6709    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6710            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6711            Constraint = (),
6712        >,
6713{
6714    async fn on_one_way(
6715        handler: &mut ___H,
6716        mut message: ::fidl_next::Message<___T>,
6717    ) -> ::core::result::Result<
6718        (),
6719        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6720    > {
6721        match *message.header().ordinal {
6722            6123359741742396225 => {
6723                handler.remove().await;
6724                Ok(())
6725            }
6726
6727            ordinal => {
6728                handler.on_unknown_interaction(ordinal).await;
6729                if ::core::matches!(
6730                    message.header().flexibility(),
6731                    ::fidl_next::protocol::Flexibility::Strict
6732                ) {
6733                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6734                } else {
6735                    Ok(())
6736                }
6737            }
6738        }
6739    }
6740
6741    async fn on_two_way(
6742        handler: &mut ___H,
6743        mut message: ::fidl_next::Message<___T>,
6744        responder: ::fidl_next::protocol::Responder<___T>,
6745    ) -> ::core::result::Result<
6746        (),
6747        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6748    > {
6749        match *message.header().ordinal {
6750            4735909333556220047 => {
6751                let responder = ::fidl_next::Responder::from_untyped(responder);
6752
6753                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6754                    Ok(decoded) => {
6755                        handler
6756                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6757                            .await;
6758                        Ok(())
6759                    }
6760                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6761                        ordinal: 4735909333556220047,
6762                        error,
6763                    }),
6764                }
6765            }
6766
6767            7635589759067755399 => {
6768                let responder = ::fidl_next::Responder::from_untyped(responder);
6769
6770                handler.wait_for_driver(responder).await;
6771                Ok(())
6772            }
6773
6774            ordinal => {
6775                handler.on_unknown_interaction(ordinal).await;
6776                if ::core::matches!(
6777                    message.header().flexibility(),
6778                    ::fidl_next::protocol::Flexibility::Strict
6779                ) {
6780                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6781                } else {
6782                    responder
6783                        .respond_framework_error(
6784                            ordinal,
6785                            ::fidl_next::FrameworkError::UnknownMethod,
6786                        )
6787                        .expect("encoding a framework error should never fail")
6788                        .await?;
6789                    Ok(())
6790                }
6791            }
6792        }
6793    }
6794}
6795
6796/// A client handler for the NodeController protocol.
6797///
6798/// See [`NodeController`] for more details.
6799pub trait NodeControllerClientHandler<
6800    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6801    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6802>
6803{
6804    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
6805    fn on_bind(
6806        &mut self,
6807
6808        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
6809    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6810
6811    fn on_unknown_interaction(
6812        &mut self,
6813        ordinal: u64,
6814    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6815        ::core::future::ready(())
6816    }
6817}
6818
6819impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeController
6820where
6821    ___H: NodeControllerClientHandler<___T> + ::core::marker::Send,
6822    ___T: ::fidl_next::Transport,
6823    for<'de> crate::wire::NodeControllerOnBindRequest<'de>: ::fidl_next::Decode<
6824            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6825            Constraint = (),
6826        >,
6827{
6828    async fn on_event(
6829        handler: &mut ___H,
6830        mut message: ::fidl_next::Message<___T>,
6831    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6832        match *message.header().ordinal {
6833            5905369594807853098 => match ::fidl_next::AsDecoderExt::into_decoded(message) {
6834                Ok(decoded) => {
6835                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
6836                    Ok(())
6837                }
6838                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6839                    ordinal: 5905369594807853098,
6840                    error,
6841                }),
6842            },
6843
6844            ordinal => {
6845                handler.on_unknown_interaction(ordinal).await;
6846                if ::core::matches!(
6847                    message.header().flexibility(),
6848                    ::fidl_next::protocol::Flexibility::Strict
6849                ) {
6850                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6851                } else {
6852                    Ok(())
6853                }
6854            }
6855        }
6856    }
6857}
6858
6859/// A server handler for the NodeController protocol.
6860///
6861/// See [`NodeController`] for more details.
6862pub trait NodeControllerServerHandler<
6863    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6864    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
6865>
6866{
6867    #[doc = " Removes the node and all of its children.\n"]
6868    fn remove(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6869
6870    #[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"]
6871    fn request_bind(
6872        &mut self,
6873
6874        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
6875
6876        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
6877    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6878
6879    #[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"]
6880    fn wait_for_driver(
6881        &mut self,
6882
6883        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
6884    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6885
6886    fn on_unknown_interaction(
6887        &mut self,
6888        ordinal: u64,
6889    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6890        ::core::future::ready(())
6891    }
6892}
6893
6894impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeController
6895where
6896    ___H: NodeControllerServerHandler<___T> + ::core::marker::Send,
6897    ___T: ::fidl_next::Transport,
6898    for<'de> crate::wire::NodeControllerRequestBindRequest<'de>: ::fidl_next::Decode<
6899            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
6900            Constraint = (),
6901        >,
6902{
6903    async fn on_one_way(
6904        handler: &mut ___H,
6905        mut message: ::fidl_next::Message<___T>,
6906    ) -> ::core::result::Result<
6907        (),
6908        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6909    > {
6910        match *message.header().ordinal {
6911            6123359741742396225 => {
6912                handler.remove().await;
6913                Ok(())
6914            }
6915
6916            ordinal => {
6917                handler.on_unknown_interaction(ordinal).await;
6918                if ::core::matches!(
6919                    message.header().flexibility(),
6920                    ::fidl_next::protocol::Flexibility::Strict
6921                ) {
6922                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6923                } else {
6924                    Ok(())
6925                }
6926            }
6927        }
6928    }
6929
6930    async fn on_two_way(
6931        handler: &mut ___H,
6932        mut message: ::fidl_next::Message<___T>,
6933        responder: ::fidl_next::protocol::Responder<___T>,
6934    ) -> ::core::result::Result<
6935        (),
6936        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6937    > {
6938        match *message.header().ordinal {
6939            4735909333556220047 => {
6940                let responder = ::fidl_next::Responder::from_untyped(responder);
6941
6942                match ::fidl_next::AsDecoderExt::into_decoded(message) {
6943                    Ok(decoded) => {
6944                        handler
6945                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
6946                            .await;
6947                        Ok(())
6948                    }
6949                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6950                        ordinal: 4735909333556220047,
6951                        error,
6952                    }),
6953                }
6954            }
6955
6956            7635589759067755399 => {
6957                let responder = ::fidl_next::Responder::from_untyped(responder);
6958
6959                handler.wait_for_driver(responder).await;
6960                Ok(())
6961            }
6962
6963            ordinal => {
6964                handler.on_unknown_interaction(ordinal).await;
6965                if ::core::matches!(
6966                    message.header().flexibility(),
6967                    ::fidl_next::protocol::Flexibility::Strict
6968                ) {
6969                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
6970                } else {
6971                    responder
6972                        .respond_framework_error(
6973                            ordinal,
6974                            ::fidl_next::FrameworkError::UnknownMethod,
6975                        )
6976                        .expect("encoding a framework error should never fail")
6977                        .await?;
6978                    Ok(())
6979                }
6980            }
6981        }
6982    }
6983}
6984
6985impl<___T> NodeControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
6986where
6987    ___T: ::fidl_next::Transport,
6988{
6989    async fn on_bind(&mut self, _: ::fidl_next::Request<node_controller::OnBind, ___T>) {}
6990
6991    async fn on_unknown_interaction(&mut self, _: u64) {}
6992}
6993
6994impl<___H, ___T> NodeControllerLocalClientHandler<___T> for ::fidl_next::Local<___H>
6995where
6996    ___H: NodeControllerClientHandler<___T>,
6997    ___T: ::fidl_next::Transport,
6998{
6999    async fn on_bind(&mut self, request: ::fidl_next::Request<node_controller::OnBind, ___T>) {
7000        ___H::on_bind(&mut self.0, request).await
7001    }
7002
7003    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7004        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7005    }
7006}
7007
7008impl<___H, ___T> NodeControllerLocalServerHandler<___T> for ::fidl_next::Local<___H>
7009where
7010    ___H: NodeControllerServerHandler<___T>,
7011    ___T: ::fidl_next::Transport,
7012{
7013    async fn remove(&mut self) {
7014        ___H::remove(&mut self.0).await
7015    }
7016
7017    async fn request_bind(
7018        &mut self,
7019
7020        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
7021
7022        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
7023    ) {
7024        ___H::request_bind(&mut self.0, request, responder).await
7025    }
7026
7027    async fn wait_for_driver(
7028        &mut self,
7029
7030        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
7031    ) {
7032        ___H::wait_for_driver(&mut self.0, responder).await
7033    }
7034
7035    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7036        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7037    }
7038}
7039
7040/// The type corresponding to the NodeManager protocol.
7041#[doc = " Protocol through which a client can add a Node2 to the driver topology.\n"]
7042#[derive(PartialEq, Debug)]
7043pub struct NodeManager;
7044
7045impl ::fidl_next::Discoverable for NodeManager {
7046    const PROTOCOL_NAME: &'static str = "fuchsia.driver.framework.NodeManager";
7047}
7048
7049#[cfg(target_os = "fuchsia")]
7050impl ::fidl_next::HasTransport for NodeManager {
7051    type Transport = ::fidl_next::fuchsia::zx::Channel;
7052}
7053
7054pub mod node_manager {
7055    pub mod prelude {
7056        pub use crate::{
7057            NodeManager, NodeManagerClientHandler, NodeManagerLocalClientHandler,
7058            NodeManagerLocalServerHandler, NodeManagerServerHandler, node_manager,
7059        };
7060
7061        pub use crate::natural::NodeError;
7062
7063        pub use crate::natural::NodeManagerAddNodeRequest;
7064
7065        pub use crate::natural::NodeManagerAddNodeResponse;
7066    }
7067
7068    pub struct AddNode;
7069
7070    impl ::fidl_next::Method for AddNode {
7071        const ORDINAL: u64 = 8180576435965990653;
7072        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
7073            ::fidl_next::protocol::Flexibility::Flexible;
7074
7075        type Protocol = crate::NodeManager;
7076
7077        type Request = crate::wire::NodeManagerAddNodeRequest<'static>;
7078    }
7079
7080    impl ::fidl_next::TwoWayMethod for AddNode {
7081        type Response = ::fidl_next::wire::Result<
7082            'static,
7083            crate::wire::NodeManagerAddNodeResponse,
7084            crate::wire::NodeError,
7085        >;
7086    }
7087
7088    impl<___R> ::fidl_next::Respond<___R> for AddNode {
7089        type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
7090
7091        fn respond(response: ___R) -> Self::Output {
7092            ::core::result::Result::Ok(response)
7093        }
7094    }
7095
7096    impl<___R> ::fidl_next::RespondErr<___R> for AddNode {
7097        type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
7098
7099        fn respond_err(response: ___R) -> Self::Output {
7100            ::core::result::Result::Err(response)
7101        }
7102    }
7103
7104    mod ___detail {
7105        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeManager
7106        where
7107            ___T: ::fidl_next::Transport,
7108        {
7109            type Client = NodeManagerClient<___T>;
7110            type Server = NodeManagerServer<___T>;
7111        }
7112
7113        /// The client for the `NodeManager` protocol.
7114        #[repr(transparent)]
7115        pub struct NodeManagerClient<___T: ::fidl_next::Transport> {
7116            #[allow(dead_code)]
7117            client: ::fidl_next::protocol::Client<___T>,
7118        }
7119
7120        impl<___T> NodeManagerClient<___T>
7121        where
7122            ___T: ::fidl_next::Transport,
7123        {
7124            #[doc = " Adds a Node2 to the driver framework.\n"]
7125            pub fn add_node(
7126                &self,
7127
7128                node: impl ::fidl_next::Encode<
7129                    crate::wire::Node2<'static>,
7130                    <___T as ::fidl_next::Transport>::SendBuffer,
7131                >,
7132
7133                controller: impl ::fidl_next::Encode<
7134                    ::fidl_next::ServerEnd<
7135                        crate::NodeController,
7136                        ::fidl_next::wire::fuchsia::Channel,
7137                    >,
7138                    <___T as ::fidl_next::Transport>::SendBuffer,
7139                >,
7140
7141                node_ref: impl ::fidl_next::Encode<
7142                    ::fidl_next::ServerEnd<
7143                        crate::Node,
7144                        ::fidl_next::wire::fuchsia::OptionalChannel,
7145                    >,
7146                    <___T as ::fidl_next::Transport>::SendBuffer,
7147                >,
7148            ) -> ::fidl_next::TwoWayFuture<'_, super::AddNode, ___T>
7149            where
7150                <___T as ::fidl_next::Transport>::SendBuffer:
7151                    ::fidl_next::encoder::InternalHandleEncoder,
7152                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7153                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7154            {
7155                self.add_node_with(crate::generic::NodeManagerAddNodeRequest {
7156                    node,
7157
7158                    controller,
7159
7160                    node_ref,
7161                })
7162            }
7163
7164            #[doc = " Adds a Node2 to the driver framework.\n"]
7165            pub fn add_node_with<___R>(
7166                &self,
7167                request: ___R,
7168            ) -> ::fidl_next::TwoWayFuture<'_, super::AddNode, ___T>
7169            where
7170                ___R: ::fidl_next::Encode<
7171                        crate::wire::NodeManagerAddNodeRequest<'static>,
7172                        <___T as ::fidl_next::Transport>::SendBuffer,
7173                    >,
7174            {
7175                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
7176                    8180576435965990653,
7177                    <super::AddNode as ::fidl_next::Method>::FLEXIBILITY,
7178                    request,
7179                ))
7180            }
7181        }
7182
7183        /// The server for the `NodeManager` protocol.
7184        #[repr(transparent)]
7185        pub struct NodeManagerServer<___T: ::fidl_next::Transport> {
7186            server: ::fidl_next::protocol::Server<___T>,
7187        }
7188
7189        impl<___T> NodeManagerServer<___T> where ___T: ::fidl_next::Transport {}
7190    }
7191}
7192
7193#[diagnostic::on_unimplemented(
7194    note = "If {Self} implements the non-local NodeManagerClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
7195)]
7196
7197/// A client handler for the NodeManager protocol.
7198///
7199/// See [`NodeManager`] for more details.
7200pub trait NodeManagerLocalClientHandler<
7201    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7202    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7203>
7204{
7205    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7206        ::core::future::ready(())
7207    }
7208}
7209
7210impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeManager
7211where
7212    ___H: NodeManagerLocalClientHandler<___T>,
7213    ___T: ::fidl_next::Transport,
7214{
7215    async fn on_event(
7216        handler: &mut ___H,
7217        mut message: ::fidl_next::Message<___T>,
7218    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7219        match *message.header().ordinal {
7220            ordinal => {
7221                handler.on_unknown_interaction(ordinal).await;
7222                if ::core::matches!(
7223                    message.header().flexibility(),
7224                    ::fidl_next::protocol::Flexibility::Strict
7225                ) {
7226                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7227                } else {
7228                    Ok(())
7229                }
7230            }
7231        }
7232    }
7233}
7234
7235#[diagnostic::on_unimplemented(
7236    note = "If {Self} implements the non-local NodeManagerServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
7237)]
7238
7239/// A server handler for the NodeManager protocol.
7240///
7241/// See [`NodeManager`] for more details.
7242pub trait NodeManagerLocalServerHandler<
7243    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7244    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7245>
7246{
7247    #[doc = " Adds a Node2 to the driver framework.\n"]
7248    fn add_node(
7249        &mut self,
7250
7251        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
7252
7253        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
7254    ) -> impl ::core::future::Future<Output = ()>;
7255
7256    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
7257        ::core::future::ready(())
7258    }
7259}
7260
7261impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeManager
7262where
7263    ___H: NodeManagerLocalServerHandler<___T>,
7264    ___T: ::fidl_next::Transport,
7265    for<'de> crate::wire::NodeManagerAddNodeRequest<'de>: ::fidl_next::Decode<
7266            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7267            Constraint = (),
7268        >,
7269{
7270    async fn on_one_way(
7271        handler: &mut ___H,
7272        mut message: ::fidl_next::Message<___T>,
7273    ) -> ::core::result::Result<
7274        (),
7275        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7276    > {
7277        match *message.header().ordinal {
7278            ordinal => {
7279                handler.on_unknown_interaction(ordinal).await;
7280                if ::core::matches!(
7281                    message.header().flexibility(),
7282                    ::fidl_next::protocol::Flexibility::Strict
7283                ) {
7284                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7285                } else {
7286                    Ok(())
7287                }
7288            }
7289        }
7290    }
7291
7292    async fn on_two_way(
7293        handler: &mut ___H,
7294        mut message: ::fidl_next::Message<___T>,
7295        responder: ::fidl_next::protocol::Responder<___T>,
7296    ) -> ::core::result::Result<
7297        (),
7298        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7299    > {
7300        match *message.header().ordinal {
7301            8180576435965990653 => {
7302                let responder = ::fidl_next::Responder::from_untyped(responder);
7303
7304                match ::fidl_next::AsDecoderExt::into_decoded(message) {
7305                    Ok(decoded) => {
7306                        handler
7307                            .add_node(::fidl_next::Request::from_decoded(decoded), responder)
7308                            .await;
7309                        Ok(())
7310                    }
7311                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7312                        ordinal: 8180576435965990653,
7313                        error,
7314                    }),
7315                }
7316            }
7317
7318            ordinal => {
7319                handler.on_unknown_interaction(ordinal).await;
7320                if ::core::matches!(
7321                    message.header().flexibility(),
7322                    ::fidl_next::protocol::Flexibility::Strict
7323                ) {
7324                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7325                } else {
7326                    responder
7327                        .respond_framework_error(
7328                            ordinal,
7329                            ::fidl_next::FrameworkError::UnknownMethod,
7330                        )
7331                        .expect("encoding a framework error should never fail")
7332                        .await?;
7333                    Ok(())
7334                }
7335            }
7336        }
7337    }
7338}
7339
7340/// A client handler for the NodeManager protocol.
7341///
7342/// See [`NodeManager`] for more details.
7343pub trait NodeManagerClientHandler<
7344    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7345    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7346>
7347{
7348    fn on_unknown_interaction(
7349        &mut self,
7350        ordinal: u64,
7351    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7352        ::core::future::ready(())
7353    }
7354}
7355
7356impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeManager
7357where
7358    ___H: NodeManagerClientHandler<___T> + ::core::marker::Send,
7359    ___T: ::fidl_next::Transport,
7360{
7361    async fn on_event(
7362        handler: &mut ___H,
7363        mut message: ::fidl_next::Message<___T>,
7364    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7365        match *message.header().ordinal {
7366            ordinal => {
7367                handler.on_unknown_interaction(ordinal).await;
7368                if ::core::matches!(
7369                    message.header().flexibility(),
7370                    ::fidl_next::protocol::Flexibility::Strict
7371                ) {
7372                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7373                } else {
7374                    Ok(())
7375                }
7376            }
7377        }
7378    }
7379}
7380
7381/// A server handler for the NodeManager protocol.
7382///
7383/// See [`NodeManager`] for more details.
7384pub trait NodeManagerServerHandler<
7385    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7386    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
7387>
7388{
7389    #[doc = " Adds a Node2 to the driver framework.\n"]
7390    fn add_node(
7391        &mut self,
7392
7393        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
7394
7395        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
7396    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7397
7398    fn on_unknown_interaction(
7399        &mut self,
7400        ordinal: u64,
7401    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7402        ::core::future::ready(())
7403    }
7404}
7405
7406impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeManager
7407where
7408    ___H: NodeManagerServerHandler<___T> + ::core::marker::Send,
7409    ___T: ::fidl_next::Transport,
7410    for<'de> crate::wire::NodeManagerAddNodeRequest<'de>: ::fidl_next::Decode<
7411            <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
7412            Constraint = (),
7413        >,
7414{
7415    async fn on_one_way(
7416        handler: &mut ___H,
7417        mut message: ::fidl_next::Message<___T>,
7418    ) -> ::core::result::Result<
7419        (),
7420        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7421    > {
7422        match *message.header().ordinal {
7423            ordinal => {
7424                handler.on_unknown_interaction(ordinal).await;
7425                if ::core::matches!(
7426                    message.header().flexibility(),
7427                    ::fidl_next::protocol::Flexibility::Strict
7428                ) {
7429                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7430                } else {
7431                    Ok(())
7432                }
7433            }
7434        }
7435    }
7436
7437    async fn on_two_way(
7438        handler: &mut ___H,
7439        mut message: ::fidl_next::Message<___T>,
7440        responder: ::fidl_next::protocol::Responder<___T>,
7441    ) -> ::core::result::Result<
7442        (),
7443        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7444    > {
7445        match *message.header().ordinal {
7446            8180576435965990653 => {
7447                let responder = ::fidl_next::Responder::from_untyped(responder);
7448
7449                match ::fidl_next::AsDecoderExt::into_decoded(message) {
7450                    Ok(decoded) => {
7451                        handler
7452                            .add_node(::fidl_next::Request::from_decoded(decoded), responder)
7453                            .await;
7454                        Ok(())
7455                    }
7456                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7457                        ordinal: 8180576435965990653,
7458                        error,
7459                    }),
7460                }
7461            }
7462
7463            ordinal => {
7464                handler.on_unknown_interaction(ordinal).await;
7465                if ::core::matches!(
7466                    message.header().flexibility(),
7467                    ::fidl_next::protocol::Flexibility::Strict
7468                ) {
7469                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
7470                } else {
7471                    responder
7472                        .respond_framework_error(
7473                            ordinal,
7474                            ::fidl_next::FrameworkError::UnknownMethod,
7475                        )
7476                        .expect("encoding a framework error should never fail")
7477                        .await?;
7478                    Ok(())
7479                }
7480            }
7481        }
7482    }
7483}
7484
7485impl<___T> NodeManagerClientHandler<___T> for ::fidl_next::IgnoreEvents
7486where
7487    ___T: ::fidl_next::Transport,
7488{
7489    async fn on_unknown_interaction(&mut self, _: u64) {}
7490}
7491
7492impl<___H, ___T> NodeManagerLocalClientHandler<___T> for ::fidl_next::Local<___H>
7493where
7494    ___H: NodeManagerClientHandler<___T>,
7495    ___T: ::fidl_next::Transport,
7496{
7497    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7498        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7499    }
7500}
7501
7502impl<___H, ___T> NodeManagerLocalServerHandler<___T> for ::fidl_next::Local<___H>
7503where
7504    ___H: NodeManagerServerHandler<___T>,
7505    ___T: ::fidl_next::Transport,
7506{
7507    async fn add_node(
7508        &mut self,
7509
7510        request: ::fidl_next::Request<node_manager::AddNode, ___T>,
7511
7512        responder: ::fidl_next::Responder<node_manager::AddNode, ___T>,
7513    ) {
7514        ___H::add_node(&mut self.0, request, responder).await
7515    }
7516
7517    async fn on_unknown_interaction(&mut self, ordinal: u64) {
7518        ___H::on_unknown_interaction(&mut self.0, ordinal).await
7519    }
7520}
7521
7522pub use fidl_next_common_fuchsia_driver_framework::*;