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(PartialEq, Debug, Default)]
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::WireEnvelope>::uninit();
76            ::fidl_next::Wire::zero_padding(&mut out);
77
78            let mut preallocated =
79                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
80
81            for i in 1..=max_ord {
82                match i {
83                    5 => {
84                        if let Some(value) = self.controller_connector.take() {
85                            ::fidl_next::WireEnvelope::encode_value::<
86                                ::fidl_next::ClientEnd<
87                                    ::fidl_next_fuchsia_device_fs::Connector,
88                                    ::fidl_next::fuchsia::WireChannel,
89                                >,
90                                ___E,
91                            >(
92                                value, preallocated.encoder, &mut out, ()
93                            )?;
94                        } else {
95                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
96                        }
97                    }
98
99                    4 => {
100                        if let Some(value) = self.connector_supports.take() {
101                            ::fidl_next::WireEnvelope::encode_value::<
102                                ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
103                                ___E,
104                            >(
105                                value, preallocated.encoder, &mut out, ()
106                            )?;
107                        } else {
108                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
109                        }
110                    }
111
112                    3 => {
113                        if let Some(value) = self.inspect.take() {
114                            ::fidl_next::WireEnvelope::encode_value::<
115                                ::fidl_next::fuchsia::WireVmo,
116                                ___E,
117                            >(
118                                value, preallocated.encoder, &mut out, ()
119                            )?;
120                        } else {
121                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
122                        }
123                    }
124
125                    2 => {
126                        if let Some(value) = self.class_name.take() {
127                            ::fidl_next::WireEnvelope::encode_value::<
128                                ::fidl_next::WireString<'static>,
129                                ___E,
130                            >(
131                                value, preallocated.encoder, &mut out, 255
132                            )?;
133                        } else {
134                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
135                        }
136                    }
137
138                    1 => {
139                        if let Some(value) = self.connector.take() {
140                            ::fidl_next::WireEnvelope::encode_value::<
141                                ::fidl_next::ClientEnd<
142                                    ::fidl_next_fuchsia_device_fs::Connector,
143                                    ::fidl_next::fuchsia::WireChannel,
144                                >,
145                                ___E,
146                            >(
147                                value, preallocated.encoder, &mut out, ()
148                            )?;
149                        } else {
150                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
151                        }
152                    }
153
154                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
155                }
156                unsafe {
157                    preallocated.write_next(out.assume_init_ref());
158                }
159            }
160
161            ::fidl_next::WireTable::encode_len(table, max_ord);
162
163            Ok(())
164        }
165    }
166
167    impl<'de> ::fidl_next::FromWire<crate::wire::DevfsAddArgs<'de>> for DevfsAddArgs {
168        #[inline]
169        fn from_wire(wire_: crate::wire::DevfsAddArgs<'de>) -> Self {
170            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
171
172            let connector = wire_.table.get(1);
173
174            let class_name = wire_.table.get(2);
175
176            let inspect = wire_.table.get(3);
177
178            let connector_supports = wire_.table.get(4);
179
180            let controller_connector = wire_.table.get(5);
181
182            Self {
183                connector: connector.map(|envelope| {
184                    ::fidl_next::FromWire::from_wire(unsafe {
185                        envelope.read_unchecked::<::fidl_next::ClientEnd<
186                            ::fidl_next_fuchsia_device_fs::Connector,
187                            ::fidl_next::fuchsia::WireChannel,
188                        >>()
189                    })
190                }),
191
192                class_name: class_name.map(|envelope| {
193                    ::fidl_next::FromWire::from_wire(unsafe {
194                        envelope.read_unchecked::<::fidl_next::WireString<'de>>()
195                    })
196                }),
197
198                inspect: inspect.map(|envelope| {
199                    ::fidl_next::FromWire::from_wire(unsafe {
200                        envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
201                    })
202                }),
203
204                connector_supports: connector_supports.map(|envelope| {
205                    ::fidl_next::FromWire::from_wire(unsafe {
206                        envelope
207                            .read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
208                    })
209                }),
210
211                controller_connector: controller_connector.map(|envelope| {
212                    ::fidl_next::FromWire::from_wire(unsafe {
213                        envelope.read_unchecked::<::fidl_next::ClientEnd<
214                            ::fidl_next_fuchsia_device_fs::Connector,
215                            ::fidl_next::fuchsia::WireChannel,
216                        >>()
217                    })
218                }),
219            }
220        }
221    }
222
223    #[derive(PartialEq, Debug, Default)]
224    pub struct PowerElementArgs {
225        pub control_client: ::core::option::Option<
226            ::fidl_next::ClientEnd<
227                ::fidl_next_fuchsia_power_broker::ElementControl,
228                ::fidl_next::fuchsia::zx::Channel,
229            >,
230        >,
231
232        pub runner_server: ::core::option::Option<
233            ::fidl_next::ServerEnd<
234                ::fidl_next_fuchsia_power_broker::ElementRunner,
235                ::fidl_next::fuchsia::zx::Channel,
236            >,
237        >,
238
239        pub lessor_client: ::core::option::Option<
240            ::fidl_next::ClientEnd<
241                ::fidl_next_fuchsia_power_broker::Lessor,
242                ::fidl_next::fuchsia::zx::Channel,
243            >,
244        >,
245
246        pub token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
247    }
248
249    impl PowerElementArgs {
250        fn __max_ordinal(&self) -> usize {
251            if self.token.is_some() {
252                return 4;
253            }
254
255            if self.lessor_client.is_some() {
256                return 3;
257            }
258
259            if self.runner_server.is_some() {
260                return 2;
261            }
262
263            if self.control_client.is_some() {
264                return 1;
265            }
266
267            0
268        }
269    }
270
271    unsafe impl<___E> ::fidl_next::Encode<crate::wire::PowerElementArgs<'static>, ___E>
272        for PowerElementArgs
273    where
274        ___E: ::fidl_next::Encoder + ?Sized,
275        ___E: ::fidl_next::fuchsia::HandleEncoder,
276    {
277        #[inline]
278        fn encode(
279            mut self,
280            encoder: &mut ___E,
281            out: &mut ::core::mem::MaybeUninit<crate::wire::PowerElementArgs<'static>>,
282            _: (),
283        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
284            ::fidl_next::munge!(let crate::wire::PowerElementArgs { table } = out);
285
286            let max_ord = self.__max_ordinal();
287
288            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
289            ::fidl_next::Wire::zero_padding(&mut out);
290
291            let mut preallocated =
292                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
293
294            for i in 1..=max_ord {
295                match i {
296                    4 => {
297                        if let Some(value) = self.token.take() {
298                            ::fidl_next::WireEnvelope::encode_value::<
299                                ::fidl_next::fuchsia::WireEvent,
300                                ___E,
301                            >(
302                                value, preallocated.encoder, &mut out, ()
303                            )?;
304                        } else {
305                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
306                        }
307                    }
308
309                    3 => {
310                        if let Some(value) = self.lessor_client.take() {
311                            ::fidl_next::WireEnvelope::encode_value::<
312                                ::fidl_next::ClientEnd<
313                                    ::fidl_next_fuchsia_power_broker::Lessor,
314                                    ::fidl_next::fuchsia::WireChannel,
315                                >,
316                                ___E,
317                            >(
318                                value, preallocated.encoder, &mut out, ()
319                            )?;
320                        } else {
321                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
322                        }
323                    }
324
325                    2 => {
326                        if let Some(value) = self.runner_server.take() {
327                            ::fidl_next::WireEnvelope::encode_value::<
328                                ::fidl_next::ServerEnd<
329                                    ::fidl_next_fuchsia_power_broker::ElementRunner,
330                                    ::fidl_next::fuchsia::WireChannel,
331                                >,
332                                ___E,
333                            >(
334                                value, preallocated.encoder, &mut out, ()
335                            )?;
336                        } else {
337                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
338                        }
339                    }
340
341                    1 => {
342                        if let Some(value) = self.control_client.take() {
343                            ::fidl_next::WireEnvelope::encode_value::<
344                                ::fidl_next::ClientEnd<
345                                    ::fidl_next_fuchsia_power_broker::ElementControl,
346                                    ::fidl_next::fuchsia::WireChannel,
347                                >,
348                                ___E,
349                            >(
350                                value, preallocated.encoder, &mut out, ()
351                            )?;
352                        } else {
353                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
354                        }
355                    }
356
357                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
358                }
359                unsafe {
360                    preallocated.write_next(out.assume_init_ref());
361                }
362            }
363
364            ::fidl_next::WireTable::encode_len(table, max_ord);
365
366            Ok(())
367        }
368    }
369
370    impl<'de> ::fidl_next::FromWire<crate::wire::PowerElementArgs<'de>> for PowerElementArgs {
371        #[inline]
372        fn from_wire(wire_: crate::wire::PowerElementArgs<'de>) -> Self {
373            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
374
375            let control_client = wire_.table.get(1);
376
377            let runner_server = wire_.table.get(2);
378
379            let lessor_client = wire_.table.get(3);
380
381            let token = wire_.table.get(4);
382
383            Self {
384                control_client: control_client.map(|envelope| {
385                    ::fidl_next::FromWire::from_wire(unsafe {
386                        envelope.read_unchecked::<::fidl_next::ClientEnd<
387                            ::fidl_next_fuchsia_power_broker::ElementControl,
388                            ::fidl_next::fuchsia::WireChannel,
389                        >>()
390                    })
391                }),
392
393                runner_server: runner_server.map(|envelope| {
394                    ::fidl_next::FromWire::from_wire(unsafe {
395                        envelope.read_unchecked::<::fidl_next::ServerEnd<
396                            ::fidl_next_fuchsia_power_broker::ElementRunner,
397                            ::fidl_next::fuchsia::WireChannel,
398                        >>()
399                    })
400                }),
401
402                lessor_client: lessor_client.map(|envelope| {
403                    ::fidl_next::FromWire::from_wire(unsafe {
404                        envelope.read_unchecked::<::fidl_next::ClientEnd<
405                            ::fidl_next_fuchsia_power_broker::Lessor,
406                            ::fidl_next::fuchsia::WireChannel,
407                        >>()
408                    })
409                }),
410
411                token: token.map(|envelope| {
412                    ::fidl_next::FromWire::from_wire(unsafe {
413                        envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
414                    })
415                }),
416            }
417        }
418    }
419
420    #[doc = " Arguments for starting a driver.\n"]
421    #[derive(PartialEq, Debug, Default)]
422    pub struct DriverStartArgs {
423        pub node: ::core::option::Option<
424            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
425        >,
426
427        pub symbols: ::core::option::Option<::std::vec::Vec<crate::natural::NodeSymbol>>,
428
429        pub url: ::core::option::Option<::std::string::String>,
430
431        pub program: ::core::option::Option<::fidl_next_fuchsia_data::natural::Dictionary>,
432
433        pub incoming: ::core::option::Option<
434            ::std::vec::Vec<::fidl_next_fuchsia_component_runner::natural::ComponentNamespaceEntry>,
435        >,
436
437        pub outgoing_dir: ::core::option::Option<
438            ::fidl_next::ServerEnd<
439                ::fidl_next_fuchsia_io::Directory,
440                ::fidl_next::fuchsia::zx::Channel,
441            >,
442        >,
443
444        pub config: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
445
446        pub node_name: ::core::option::Option<::std::string::String>,
447
448        pub node_properties:
449            ::core::option::Option<::std::vec::Vec<crate::natural::NodePropertyEntry>>,
450
451        pub node_offers: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
452
453        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
454
455        pub node_properties_2:
456            ::core::option::Option<::std::vec::Vec<crate::natural::NodePropertyEntry2>>,
457
458        pub vmar: ::core::option::Option<::fidl_next::fuchsia::zx::Vmar>,
459
460        pub power_element_args: ::core::option::Option<crate::natural::PowerElementArgs>,
461    }
462
463    impl DriverStartArgs {
464        fn __max_ordinal(&self) -> usize {
465            if self.power_element_args.is_some() {
466                return 14;
467            }
468
469            if self.vmar.is_some() {
470                return 13;
471            }
472
473            if self.node_properties_2.is_some() {
474                return 12;
475            }
476
477            if self.node_token.is_some() {
478                return 11;
479            }
480
481            if self.node_offers.is_some() {
482                return 10;
483            }
484
485            if self.node_properties.is_some() {
486                return 9;
487            }
488
489            if self.node_name.is_some() {
490                return 8;
491            }
492
493            if self.config.is_some() {
494                return 7;
495            }
496
497            if self.outgoing_dir.is_some() {
498                return 6;
499            }
500
501            if self.incoming.is_some() {
502                return 5;
503            }
504
505            if self.program.is_some() {
506                return 4;
507            }
508
509            if self.url.is_some() {
510                return 3;
511            }
512
513            if self.symbols.is_some() {
514                return 2;
515            }
516
517            if self.node.is_some() {
518                return 1;
519            }
520
521            0
522        }
523    }
524
525    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>
526        for DriverStartArgs
527    where
528        ___E: ::fidl_next::Encoder + ?Sized,
529        ___E: ::fidl_next::fuchsia::HandleEncoder,
530    {
531        #[inline]
532        fn encode(
533            mut self,
534            encoder: &mut ___E,
535            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartArgs<'static>>,
536            _: (),
537        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
538            ::fidl_next::munge!(let crate::wire::DriverStartArgs { table } = out);
539
540            let max_ord = self.__max_ordinal();
541
542            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
543            ::fidl_next::Wire::zero_padding(&mut out);
544
545            let mut preallocated =
546                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
547
548            for i in 1..=max_ord {
549                match i {
550                    14 => {
551                        if let Some(value) = self.power_element_args.take() {
552                            ::fidl_next::WireEnvelope::encode_value::<
553                                crate::wire::PowerElementArgs<'static>,
554                                ___E,
555                            >(
556                                value, preallocated.encoder, &mut out, ()
557                            )?;
558                        } else {
559                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
560                        }
561                    }
562
563                    13 => {
564                        if let Some(value) = self.vmar.take() {
565                            ::fidl_next::WireEnvelope::encode_value::<
566                                ::fidl_next::fuchsia::WireVmar,
567                                ___E,
568                            >(
569                                value, preallocated.encoder, &mut out, ()
570                            )?;
571                        } else {
572                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
573                        }
574                    }
575
576                    12 => {
577                        if let Some(value) = self.node_properties_2.take() {
578                            ::fidl_next::WireEnvelope::encode_value::<
579                                ::fidl_next::WireVector<
580                                    'static,
581                                    crate::wire::NodePropertyEntry2<'static>,
582                                >,
583                                ___E,
584                            >(
585                                value, preallocated.encoder, &mut out, (4294967295, ())
586                            )?;
587                        } else {
588                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
589                        }
590                    }
591
592                    11 => {
593                        if let Some(value) = self.node_token.take() {
594                            ::fidl_next::WireEnvelope::encode_value::<
595                                ::fidl_next::fuchsia::WireEvent,
596                                ___E,
597                            >(
598                                value, preallocated.encoder, &mut out, ()
599                            )?;
600                        } else {
601                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
602                        }
603                    }
604
605                    10 => {
606                        if let Some(value) = self.node_offers.take() {
607                            ::fidl_next::WireEnvelope::encode_value::<
608                                ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
609                                ___E,
610                            >(
611                                value, preallocated.encoder, &mut out, (128, ())
612                            )?;
613                        } else {
614                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
615                        }
616                    }
617
618                    9 => {
619                        if let Some(value) = self.node_properties.take() {
620                            ::fidl_next::WireEnvelope::encode_value::<
621                                ::fidl_next::WireVector<
622                                    'static,
623                                    crate::wire::NodePropertyEntry<'static>,
624                                >,
625                                ___E,
626                            >(
627                                value, preallocated.encoder, &mut out, (4294967295, ())
628                            )?;
629                        } else {
630                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
631                        }
632                    }
633
634                    8 => {
635                        if let Some(value) = self.node_name.take() {
636                            ::fidl_next::WireEnvelope::encode_value::<
637                                ::fidl_next::WireString<'static>,
638                                ___E,
639                            >(
640                                value, preallocated.encoder, &mut out, 4294967295
641                            )?;
642                        } else {
643                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
644                        }
645                    }
646
647                    7 => {
648                        if let Some(value) = self.config.take() {
649                            ::fidl_next::WireEnvelope::encode_value::<
650                                ::fidl_next::fuchsia::WireVmo,
651                                ___E,
652                            >(
653                                value, preallocated.encoder, &mut out, ()
654                            )?;
655                        } else {
656                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
657                        }
658                    }
659
660                    6 => {
661                        if let Some(value) = self.outgoing_dir.take() {
662                            ::fidl_next::WireEnvelope::encode_value::<
663                                ::fidl_next::ServerEnd<
664                                    ::fidl_next_fuchsia_io::Directory,
665                                    ::fidl_next::fuchsia::WireChannel,
666                                >,
667                                ___E,
668                            >(
669                                value, preallocated.encoder, &mut out, ()
670                            )?;
671                        } else {
672                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
673                        }
674                    }
675
676                    5 => {
677                        if let Some(value) = self.incoming.take() {
678                            ::fidl_next::WireEnvelope::encode_value::<::fidl_next::WireVector<'static, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'static>>, ___E>(
679                            value,
680                            preallocated.encoder,
681                            &mut out,
682                            (32, ()),
683                        )?;
684                        } else {
685                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
686                        }
687                    }
688
689                    4 => {
690                        if let Some(value) = self.program.take() {
691                            ::fidl_next::WireEnvelope::encode_value::<
692                                ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
693                                ___E,
694                            >(
695                                value, preallocated.encoder, &mut out, ()
696                            )?;
697                        } else {
698                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
699                        }
700                    }
701
702                    3 => {
703                        if let Some(value) = self.url.take() {
704                            ::fidl_next::WireEnvelope::encode_value::<
705                                ::fidl_next::WireString<'static>,
706                                ___E,
707                            >(
708                                value, preallocated.encoder, &mut out, 4096
709                            )?;
710                        } else {
711                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
712                        }
713                    }
714
715                    2 => {
716                        if let Some(value) = self.symbols.take() {
717                            ::fidl_next::WireEnvelope::encode_value::<
718                                ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
719                                ___E,
720                            >(
721                                value, preallocated.encoder, &mut out, (64, ())
722                            )?;
723                        } else {
724                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
725                        }
726                    }
727
728                    1 => {
729                        if let Some(value) = self.node.take() {
730                            ::fidl_next::WireEnvelope::encode_value::<
731                                ::fidl_next::ClientEnd<
732                                    crate::Node,
733                                    ::fidl_next::fuchsia::WireChannel,
734                                >,
735                                ___E,
736                            >(
737                                value, preallocated.encoder, &mut out, ()
738                            )?;
739                        } else {
740                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
741                        }
742                    }
743
744                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
745                }
746                unsafe {
747                    preallocated.write_next(out.assume_init_ref());
748                }
749            }
750
751            ::fidl_next::WireTable::encode_len(table, max_ord);
752
753            Ok(())
754        }
755    }
756
757    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartArgs<'de>> for DriverStartArgs {
758        #[inline]
759        fn from_wire(wire_: crate::wire::DriverStartArgs<'de>) -> Self {
760            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
761
762            let node = wire_.table.get(1);
763
764            let symbols = wire_.table.get(2);
765
766            let url = wire_.table.get(3);
767
768            let program = wire_.table.get(4);
769
770            let incoming = wire_.table.get(5);
771
772            let outgoing_dir = wire_.table.get(6);
773
774            let config = wire_.table.get(7);
775
776            let node_name = wire_.table.get(8);
777
778            let node_properties = wire_.table.get(9);
779
780            let node_offers = wire_.table.get(10);
781
782            let node_token = wire_.table.get(11);
783
784            let node_properties_2 = wire_.table.get(12);
785
786            let vmar = wire_.table.get(13);
787
788            let power_element_args = wire_.table.get(14);
789
790            Self {
791
792
793                node: node.map(|envelope| ::fidl_next::FromWire::from_wire(
794                    unsafe { envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>>() }
795                )),
796
797
798                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
799                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>() }
800                )),
801
802
803                url: url.map(|envelope| ::fidl_next::FromWire::from_wire(
804                    unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
805                )),
806
807
808                program: program.map(|envelope| ::fidl_next::FromWire::from_wire(
809                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>() }
810                )),
811
812
813                incoming: incoming.map(|envelope| ::fidl_next::FromWire::from_wire(
814                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>>>() }
815                )),
816
817
818                outgoing_dir: outgoing_dir.map(|envelope| ::fidl_next::FromWire::from_wire(
819                    unsafe { envelope.read_unchecked::<::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Directory, ::fidl_next::fuchsia::WireChannel>>() }
820                )),
821
822
823                config: config.map(|envelope| ::fidl_next::FromWire::from_wire(
824                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>() }
825                )),
826
827
828                node_name: node_name.map(|envelope| ::fidl_next::FromWire::from_wire(
829                    unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
830                )),
831
832
833                node_properties: node_properties.map(|envelope| ::fidl_next::FromWire::from_wire(
834                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry<'de>>>() }
835                )),
836
837
838                node_offers: node_offers.map(|envelope| ::fidl_next::FromWire::from_wire(
839                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>() }
840                )),
841
842
843                node_token: node_token.map(|envelope| ::fidl_next::FromWire::from_wire(
844                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>() }
845                )),
846
847
848                node_properties_2: node_properties_2.map(|envelope| ::fidl_next::FromWire::from_wire(
849                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry2<'de>>>() }
850                )),
851
852
853                vmar: vmar.map(|envelope| ::fidl_next::FromWire::from_wire(
854                    unsafe { envelope.read_unchecked::<::fidl_next::fuchsia::WireVmar>() }
855                )),
856
857
858                power_element_args: power_element_args.map(|envelope| ::fidl_next::FromWire::from_wire(
859                    unsafe { envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>() }
860                )),
861
862        }
863        }
864    }
865
866    #[derive(PartialEq, Debug)]
867    pub struct DriverStartRequest {
868        pub start_args: crate::natural::DriverStartArgs,
869    }
870
871    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
872        for DriverStartRequest
873    where
874        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
875        ___E: ::fidl_next::Encoder,
876        ___E: ::fidl_next::fuchsia::HandleEncoder,
877    {
878        #[inline]
879        fn encode(
880            self,
881            encoder_: &mut ___E,
882            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
883            _: (),
884        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
885            ::fidl_next::munge! {
886                let crate::wire::DriverStartRequest {
887                    start_args,
888
889                } = out_;
890            }
891
892            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
893
894            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_args.as_mut_ptr()) };
895
896            Ok(())
897        }
898    }
899
900    unsafe impl<___E>
901        ::fidl_next::EncodeOption<
902            ::fidl_next::WireBox<'static, crate::wire::DriverStartRequest<'static>>,
903            ___E,
904        > for DriverStartRequest
905    where
906        ___E: ::fidl_next::Encoder + ?Sized,
907        DriverStartRequest: ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>,
908    {
909        #[inline]
910        fn encode_option(
911            this: ::core::option::Option<Self>,
912            encoder: &mut ___E,
913            out: &mut ::core::mem::MaybeUninit<
914                ::fidl_next::WireBox<'static, crate::wire::DriverStartRequest<'static>>,
915            >,
916            _: (),
917        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
918            if let Some(inner) = this {
919                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
920                ::fidl_next::WireBox::encode_present(out);
921            } else {
922                ::fidl_next::WireBox::encode_absent(out);
923            }
924
925            Ok(())
926        }
927    }
928
929    impl<'de> ::fidl_next::FromWire<crate::wire::DriverStartRequest<'de>> for DriverStartRequest {
930        #[inline]
931        fn from_wire(wire: crate::wire::DriverStartRequest<'de>) -> Self {
932            Self { start_args: ::fidl_next::FromWire::from_wire(wire.start_args) }
933        }
934    }
935
936    #[derive(PartialEq, Debug)]
937    pub enum DriverResult {
938        DriverStartedNodeToken(::fidl_next::fuchsia::zx::Event),
939
940        MatchError(i32),
941
942        StartError(i32),
943
944        UnknownOrdinal_(u64),
945    }
946
947    impl DriverResult {
948        pub fn is_unknown(&self) -> bool {
949            #[allow(unreachable_patterns)]
950            match self {
951                Self::UnknownOrdinal_(_) => true,
952                _ => false,
953            }
954        }
955    }
956
957    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E> for DriverResult
958    where
959        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
960        ___E: ::fidl_next::Encoder,
961        ___E: ::fidl_next::fuchsia::HandleEncoder,
962    {
963        #[inline]
964        fn encode(
965            self,
966            encoder: &mut ___E,
967            out: &mut ::core::mem::MaybeUninit<crate::wire::DriverResult<'static>>,
968            _: (),
969        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
970            ::fidl_next::munge!(let crate::wire::DriverResult { raw, _phantom: _ } = out);
971
972            match self {
973                Self::DriverStartedNodeToken(value) => ::fidl_next::RawWireUnion::encode_as::<
974                    ___E,
975                    ::fidl_next::fuchsia::WireEvent,
976                >(
977                    value, 1, encoder, raw, ()
978                )?,
979
980                Self::MatchError(value) => ::fidl_next::RawWireUnion::encode_as::<
981                    ___E,
982                    ::fidl_next::WireI32,
983                >(value, 2, encoder, raw, ())?,
984
985                Self::StartError(value) => ::fidl_next::RawWireUnion::encode_as::<
986                    ___E,
987                    ::fidl_next::WireI32,
988                >(value, 3, encoder, raw, ())?,
989
990                Self::UnknownOrdinal_(ordinal) => {
991                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
992                }
993            }
994
995            Ok(())
996        }
997    }
998
999    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::DriverResult<'static>, ___E>
1000        for DriverResult
1001    where
1002        ___E: ?Sized,
1003        DriverResult: ::fidl_next::Encode<crate::wire::DriverResult<'static>, ___E>,
1004    {
1005        #[inline]
1006        fn encode_option(
1007            this: ::core::option::Option<Self>,
1008            encoder: &mut ___E,
1009            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::DriverResult<'static>>,
1010            _: (),
1011        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1012            ::fidl_next::munge!(let crate::wire_optional::DriverResult { raw, _phantom: _ } = &mut *out);
1013
1014            if let Some(inner) = this {
1015                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1016                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
1017            } else {
1018                ::fidl_next::RawWireUnion::encode_absent(raw);
1019            }
1020
1021            Ok(())
1022        }
1023    }
1024
1025    impl<'de> ::fidl_next::FromWire<crate::wire::DriverResult<'de>> for DriverResult {
1026        #[inline]
1027        fn from_wire(wire: crate::wire::DriverResult<'de>) -> Self {
1028            let wire = ::core::mem::ManuallyDrop::new(wire);
1029            match wire.raw.ordinal() {
1030                1 => Self::DriverStartedNodeToken(::fidl_next::FromWire::from_wire(unsafe {
1031                    wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1032                })),
1033
1034                2 => Self::MatchError(::fidl_next::FromWire::from_wire(unsafe {
1035                    wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
1036                })),
1037
1038                3 => Self::StartError(::fidl_next::FromWire::from_wire(unsafe {
1039                    wire.raw.get().read_unchecked::<::fidl_next::WireI32>()
1040                })),
1041
1042                ord => return Self::UnknownOrdinal_(ord as u64),
1043            }
1044        }
1045    }
1046
1047    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>> for DriverResult {
1048        #[inline]
1049        fn from_wire_option(
1050            wire: crate::wire_optional::DriverResult<'de>,
1051        ) -> ::core::option::Option<Self> {
1052            if let Some(inner) = wire.into_option() {
1053                Some(::fidl_next::FromWire::from_wire(inner))
1054            } else {
1055                None
1056            }
1057        }
1058    }
1059
1060    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1061        for Box<DriverResult>
1062    {
1063        #[inline]
1064        fn from_wire_option(
1065            wire: crate::wire_optional::DriverResult<'de>,
1066        ) -> ::core::option::Option<Self> {
1067            <
1068            DriverResult as ::fidl_next::FromWireOption<crate::wire_optional::DriverResult<'de>>
1069        >::from_wire_option(wire).map(Box::new)
1070        }
1071    }
1072
1073    #[doc = " Arguments for adding a node.\n"]
1074    #[derive(PartialEq, Debug, Default)]
1075    pub struct NodeAddArgs {
1076        pub name: ::core::option::Option<::std::string::String>,
1077
1078        pub symbols: ::core::option::Option<::std::vec::Vec<crate::natural::NodeSymbol>>,
1079
1080        pub properties: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty>>,
1081
1082        pub devfs_args: ::core::option::Option<crate::natural::DevfsAddArgs>,
1083
1084        pub offers2: ::core::option::Option<::std::vec::Vec<crate::natural::Offer>>,
1085
1086        pub bus_info: ::core::option::Option<crate::natural::BusInfo>,
1087
1088        pub properties2: ::core::option::Option<::std::vec::Vec<crate::natural::NodeProperty2>>,
1089
1090        pub offers_dictionary:
1091            ::core::option::Option<::fidl_next_fuchsia_component_sandbox::natural::DictionaryRef>,
1092    }
1093
1094    impl NodeAddArgs {
1095        fn __max_ordinal(&self) -> usize {
1096            if self.offers_dictionary.is_some() {
1097                return 9;
1098            }
1099
1100            if self.properties2.is_some() {
1101                return 8;
1102            }
1103
1104            if self.bus_info.is_some() {
1105                return 7;
1106            }
1107
1108            if self.offers2.is_some() {
1109                return 6;
1110            }
1111
1112            if self.devfs_args.is_some() {
1113                return 5;
1114            }
1115
1116            if self.properties.is_some() {
1117                return 4;
1118            }
1119
1120            if self.symbols.is_some() {
1121                return 3;
1122            }
1123
1124            if self.name.is_some() {
1125                return 1;
1126            }
1127
1128            0
1129        }
1130    }
1131
1132    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E> for NodeAddArgs
1133    where
1134        ___E: ::fidl_next::Encoder + ?Sized,
1135        ___E: ::fidl_next::fuchsia::HandleEncoder,
1136    {
1137        #[inline]
1138        fn encode(
1139            mut self,
1140            encoder: &mut ___E,
1141            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddArgs<'static>>,
1142            _: (),
1143        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1144            ::fidl_next::munge!(let crate::wire::NodeAddArgs { table } = out);
1145
1146            let max_ord = self.__max_ordinal();
1147
1148            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1149            ::fidl_next::Wire::zero_padding(&mut out);
1150
1151            let mut preallocated =
1152                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1153
1154            for i in 1..=max_ord {
1155                match i {
1156                    9 => {
1157                        if let Some(value) = self.offers_dictionary.take() {
1158                            ::fidl_next::WireEnvelope::encode_value::<
1159                                ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1160                                ___E,
1161                            >(
1162                                value, preallocated.encoder, &mut out, ()
1163                            )?;
1164                        } else {
1165                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1166                        }
1167                    }
1168
1169                    8 => {
1170                        if let Some(value) = self.properties2.take() {
1171                            ::fidl_next::WireEnvelope::encode_value::<
1172                                ::fidl_next::WireVector<
1173                                    'static,
1174                                    crate::wire::NodeProperty2<'static>,
1175                                >,
1176                                ___E,
1177                            >(
1178                                value, preallocated.encoder, &mut out, (64, ())
1179                            )?;
1180                        } else {
1181                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1182                        }
1183                    }
1184
1185                    7 => {
1186                        if let Some(value) = self.bus_info.take() {
1187                            ::fidl_next::WireEnvelope::encode_value::<
1188                                crate::wire::BusInfo<'static>,
1189                                ___E,
1190                            >(
1191                                value, preallocated.encoder, &mut out, ()
1192                            )?;
1193                        } else {
1194                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1195                        }
1196                    }
1197
1198                    6 => {
1199                        if let Some(value) = self.offers2.take() {
1200                            ::fidl_next::WireEnvelope::encode_value::<
1201                                ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
1202                                ___E,
1203                            >(
1204                                value, preallocated.encoder, &mut out, (128, ())
1205                            )?;
1206                        } else {
1207                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1208                        }
1209                    }
1210
1211                    5 => {
1212                        if let Some(value) = self.devfs_args.take() {
1213                            ::fidl_next::WireEnvelope::encode_value::<
1214                                crate::wire::DevfsAddArgs<'static>,
1215                                ___E,
1216                            >(
1217                                value, preallocated.encoder, &mut out, ()
1218                            )?;
1219                        } else {
1220                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1221                        }
1222                    }
1223
1224                    4 => {
1225                        if let Some(value) = self.properties.take() {
1226                            ::fidl_next::WireEnvelope::encode_value::<
1227                                ::fidl_next::WireVector<
1228                                    'static,
1229                                    crate::wire::NodeProperty<'static>,
1230                                >,
1231                                ___E,
1232                            >(
1233                                value, preallocated.encoder, &mut out, (64, ())
1234                            )?;
1235                        } else {
1236                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1237                        }
1238                    }
1239
1240                    3 => {
1241                        if let Some(value) = self.symbols.take() {
1242                            ::fidl_next::WireEnvelope::encode_value::<
1243                                ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
1244                                ___E,
1245                            >(
1246                                value, preallocated.encoder, &mut out, (64, ())
1247                            )?;
1248                        } else {
1249                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1250                        }
1251                    }
1252
1253                    1 => {
1254                        if let Some(value) = self.name.take() {
1255                            ::fidl_next::WireEnvelope::encode_value::<
1256                                ::fidl_next::WireString<'static>,
1257                                ___E,
1258                            >(
1259                                value, preallocated.encoder, &mut out, 128
1260                            )?;
1261                        } else {
1262                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1263                        }
1264                    }
1265
1266                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1267                }
1268                unsafe {
1269                    preallocated.write_next(out.assume_init_ref());
1270                }
1271            }
1272
1273            ::fidl_next::WireTable::encode_len(table, max_ord);
1274
1275            Ok(())
1276        }
1277    }
1278
1279    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddArgs<'de>> for NodeAddArgs {
1280        #[inline]
1281        fn from_wire(wire_: crate::wire::NodeAddArgs<'de>) -> Self {
1282            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1283
1284            let name = wire_.table.get(1);
1285
1286            let symbols = wire_.table.get(3);
1287
1288            let properties = wire_.table.get(4);
1289
1290            let devfs_args = wire_.table.get(5);
1291
1292            let offers2 = wire_.table.get(6);
1293
1294            let bus_info = wire_.table.get(7);
1295
1296            let properties2 = wire_.table.get(8);
1297
1298            let offers_dictionary = wire_.table.get(9);
1299
1300            Self {
1301
1302
1303                name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1304                    unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
1305                )),
1306
1307
1308                symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
1309                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>() }
1310                )),
1311
1312
1313                properties: properties.map(|envelope| ::fidl_next::FromWire::from_wire(
1314                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>() }
1315                )),
1316
1317
1318                devfs_args: devfs_args.map(|envelope| ::fidl_next::FromWire::from_wire(
1319                    unsafe { envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>() }
1320                )),
1321
1322
1323                offers2: offers2.map(|envelope| ::fidl_next::FromWire::from_wire(
1324                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>() }
1325                )),
1326
1327
1328                bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1329                    unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1330                )),
1331
1332
1333                properties2: properties2.map(|envelope| ::fidl_next::FromWire::from_wire(
1334                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>() }
1335                )),
1336
1337
1338                offers_dictionary: offers_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1339                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1340                )),
1341
1342        }
1343        }
1344    }
1345
1346    #[derive(PartialEq, Debug)]
1347    pub struct NodeAddChildRequest {
1348        pub args: crate::natural::NodeAddArgs,
1349
1350        pub controller:
1351            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1352
1353        pub node: ::core::option::Option<
1354            ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1355        >,
1356    }
1357
1358    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
1359        for NodeAddChildRequest
1360    where
1361        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1362        ___E: ::fidl_next::Encoder,
1363        ___E: ::fidl_next::fuchsia::HandleEncoder,
1364    {
1365        #[inline]
1366        fn encode(
1367            self,
1368            encoder_: &mut ___E,
1369            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
1370            _: (),
1371        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1372            ::fidl_next::munge! {
1373                let crate::wire::NodeAddChildRequest {
1374                    args,
1375                    controller,
1376                    node,
1377
1378                } = out_;
1379            }
1380
1381            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
1382
1383            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
1384
1385            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1386
1387            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1388
1389            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1390
1391            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1392
1393            Ok(())
1394        }
1395    }
1396
1397    unsafe impl<___E>
1398        ::fidl_next::EncodeOption<
1399            ::fidl_next::WireBox<'static, crate::wire::NodeAddChildRequest<'static>>,
1400            ___E,
1401        > for NodeAddChildRequest
1402    where
1403        ___E: ::fidl_next::Encoder + ?Sized,
1404        NodeAddChildRequest: ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>,
1405    {
1406        #[inline]
1407        fn encode_option(
1408            this: ::core::option::Option<Self>,
1409            encoder: &mut ___E,
1410            out: &mut ::core::mem::MaybeUninit<
1411                ::fidl_next::WireBox<'static, crate::wire::NodeAddChildRequest<'static>>,
1412            >,
1413            _: (),
1414        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1415            if let Some(inner) = this {
1416                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1417                ::fidl_next::WireBox::encode_present(out);
1418            } else {
1419                ::fidl_next::WireBox::encode_absent(out);
1420            }
1421
1422            Ok(())
1423        }
1424    }
1425
1426    impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddChildRequest<'de>> for NodeAddChildRequest {
1427        #[inline]
1428        fn from_wire(wire: crate::wire::NodeAddChildRequest<'de>) -> Self {
1429            Self {
1430                args: ::fidl_next::FromWire::from_wire(wire.args),
1431
1432                controller: ::fidl_next::FromWire::from_wire(wire.controller),
1433
1434                node: ::fidl_next::FromWire::from_wire(wire.node),
1435            }
1436        }
1437    }
1438
1439    #[derive(PartialEq, Debug, Default)]
1440    pub struct NodeControllerOnBindRequest {
1441        pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
1442    }
1443
1444    impl NodeControllerOnBindRequest {
1445        fn __max_ordinal(&self) -> usize {
1446            if self.node_token.is_some() {
1447                return 1;
1448            }
1449
1450            0
1451        }
1452    }
1453
1454    unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeControllerOnBindRequest<'static>, ___E>
1455        for NodeControllerOnBindRequest
1456    where
1457        ___E: ::fidl_next::Encoder + ?Sized,
1458        ___E: ::fidl_next::fuchsia::HandleEncoder,
1459    {
1460        #[inline]
1461        fn encode(
1462            mut self,
1463            encoder: &mut ___E,
1464            out: &mut ::core::mem::MaybeUninit<crate::wire::NodeControllerOnBindRequest<'static>>,
1465            _: (),
1466        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1467            ::fidl_next::munge!(let crate::wire::NodeControllerOnBindRequest { table } = out);
1468
1469            let max_ord = self.__max_ordinal();
1470
1471            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1472            ::fidl_next::Wire::zero_padding(&mut out);
1473
1474            let mut preallocated =
1475                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1476
1477            for i in 1..=max_ord {
1478                match i {
1479                    1 => {
1480                        if let Some(value) = self.node_token.take() {
1481                            ::fidl_next::WireEnvelope::encode_value::<
1482                                ::fidl_next::fuchsia::WireEvent,
1483                                ___E,
1484                            >(
1485                                value, preallocated.encoder, &mut out, ()
1486                            )?;
1487                        } else {
1488                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
1489                        }
1490                    }
1491
1492                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1493                }
1494                unsafe {
1495                    preallocated.write_next(out.assume_init_ref());
1496                }
1497            }
1498
1499            ::fidl_next::WireTable::encode_len(table, max_ord);
1500
1501            Ok(())
1502        }
1503    }
1504
1505    impl<'de> ::fidl_next::FromWire<crate::wire::NodeControllerOnBindRequest<'de>>
1506        for NodeControllerOnBindRequest
1507    {
1508        #[inline]
1509        fn from_wire(wire_: crate::wire::NodeControllerOnBindRequest<'de>) -> Self {
1510            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1511
1512            let node_token = wire_.table.get(1);
1513
1514            Self {
1515                node_token: node_token.map(|envelope| {
1516                    ::fidl_next::FromWire::from_wire(unsafe {
1517                        envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1518                    })
1519                }),
1520            }
1521        }
1522    }
1523}
1524
1525pub mod wire {
1526
1527    pub use fidl_next_common_fuchsia_driver_framework::wire::*;
1528
1529    /// The wire type corresponding to [`DevfsAddArgs`].
1530    #[repr(C)]
1531    pub struct DevfsAddArgs<'de> {
1532        pub(crate) table: ::fidl_next::WireTable<'de>,
1533    }
1534
1535    impl<'de> Drop for DevfsAddArgs<'de> {
1536        fn drop(&mut self) {
1537            let _ = self.table.get(1).map(|envelope| unsafe {
1538                envelope.read_unchecked::<::fidl_next::ClientEnd<
1539                    ::fidl_next_fuchsia_device_fs::Connector,
1540                    ::fidl_next::fuchsia::WireChannel,
1541                >>()
1542            });
1543
1544            let _ = self.table.get(2).map(|envelope| unsafe {
1545                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1546            });
1547
1548            let _ = self.table.get(3).map(|envelope| unsafe {
1549                envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
1550            });
1551
1552            let _ = self.table.get(4).map(|envelope| unsafe {
1553                envelope.read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
1554            });
1555
1556            let _ = self.table.get(5).map(|envelope| unsafe {
1557                envelope.read_unchecked::<::fidl_next::ClientEnd<
1558                    ::fidl_next_fuchsia_device_fs::Connector,
1559                    ::fidl_next::fuchsia::WireChannel,
1560                >>()
1561            });
1562        }
1563    }
1564
1565    unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
1566        type Owned<'de> = DevfsAddArgs<'de>;
1567
1568        #[inline]
1569        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1570            ::fidl_next::munge!(let Self { table } = out);
1571            ::fidl_next::WireTable::zero_padding(table);
1572        }
1573    }
1574
1575    unsafe impl<___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'static>
1576    where
1577        ___D: ::fidl_next::Decoder + ?Sized,
1578        ___D: ::fidl_next::fuchsia::HandleDecoder,
1579    {
1580        fn decode(
1581            slot: ::fidl_next::Slot<'_, Self>,
1582            decoder: &mut ___D,
1583            _: (),
1584        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1585            ::fidl_next::munge!(let Self { table } = slot);
1586
1587            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1588                match ordinal {
1589                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1590
1591                    1 => {
1592                        ::fidl_next::WireEnvelope::decode_as::<
1593                            ___D,
1594                            ::fidl_next::ClientEnd<
1595                                ::fidl_next_fuchsia_device_fs::Connector,
1596                                ::fidl_next::fuchsia::WireChannel,
1597                            >,
1598                        >(slot.as_mut(), decoder, ())?;
1599
1600                        Ok(())
1601                    }
1602
1603                    2 => {
1604                        ::fidl_next::WireEnvelope::decode_as::<
1605                            ___D,
1606                            ::fidl_next::WireString<'static>,
1607                        >(slot.as_mut(), decoder, 255)?;
1608
1609                        let value = unsafe {
1610                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1611                        };
1612
1613                        if value.len() > 255 {
1614                            return Err(::fidl_next::DecodeError::VectorTooLong {
1615                                size: value.len() as u64,
1616                                limit: 255,
1617                            });
1618                        }
1619
1620                        Ok(())
1621                    }
1622
1623                    3 => {
1624                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmo>(
1625                            slot.as_mut(),
1626                            decoder,
1627                            (),
1628                        )?;
1629
1630                        Ok(())
1631                    }
1632
1633                    4 => {
1634                        ::fidl_next::WireEnvelope::decode_as::<
1635                            ___D,
1636                            ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
1637                        >(slot.as_mut(), decoder, ())?;
1638
1639                        Ok(())
1640                    }
1641
1642                    5 => {
1643                        ::fidl_next::WireEnvelope::decode_as::<
1644                            ___D,
1645                            ::fidl_next::ClientEnd<
1646                                ::fidl_next_fuchsia_device_fs::Connector,
1647                                ::fidl_next::fuchsia::WireChannel,
1648                            >,
1649                        >(slot.as_mut(), decoder, ())?;
1650
1651                        Ok(())
1652                    }
1653
1654                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1655                }
1656            })
1657        }
1658    }
1659
1660    impl<'de> DevfsAddArgs<'de> {
1661        pub fn connector(
1662            &self,
1663        ) -> ::core::option::Option<
1664            &::fidl_next::ClientEnd<
1665                ::fidl_next_fuchsia_device_fs::Connector,
1666                ::fidl_next::fuchsia::WireChannel,
1667            >,
1668        > {
1669            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1670        }
1671
1672        pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
1673            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1674        }
1675
1676        pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmo> {
1677            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1678        }
1679
1680        pub fn connector_supports(
1681            &self,
1682        ) -> ::core::option::Option<&::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
1683            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1684        }
1685
1686        pub fn controller_connector(
1687            &self,
1688        ) -> ::core::option::Option<
1689            &::fidl_next::ClientEnd<
1690                ::fidl_next_fuchsia_device_fs::Connector,
1691                ::fidl_next::fuchsia::WireChannel,
1692            >,
1693        > {
1694            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1695        }
1696    }
1697
1698    impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
1699        fn fmt(
1700            &self,
1701            f: &mut ::core::fmt::Formatter<'_>,
1702        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1703            f.debug_struct("DevfsAddArgs")
1704                .field("connector", &self.connector())
1705                .field("class_name", &self.class_name())
1706                .field("inspect", &self.inspect())
1707                .field("connector_supports", &self.connector_supports())
1708                .field("controller_connector", &self.controller_connector())
1709                .finish()
1710        }
1711    }
1712
1713    impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
1714        type Natural = crate::natural::DevfsAddArgs;
1715    }
1716
1717    impl ::fidl_next::Unconstrained for DevfsAddArgs<'_> {}
1718
1719    /// The wire type corresponding to [`PowerElementArgs`].
1720    #[repr(C)]
1721    pub struct PowerElementArgs<'de> {
1722        pub(crate) table: ::fidl_next::WireTable<'de>,
1723    }
1724
1725    impl<'de> Drop for PowerElementArgs<'de> {
1726        fn drop(&mut self) {
1727            let _ = self.table.get(1).map(|envelope| unsafe {
1728                envelope.read_unchecked::<::fidl_next::ClientEnd<
1729                    ::fidl_next_fuchsia_power_broker::ElementControl,
1730                    ::fidl_next::fuchsia::WireChannel,
1731                >>()
1732            });
1733
1734            let _ = self.table.get(2).map(|envelope| unsafe {
1735                envelope.read_unchecked::<::fidl_next::ServerEnd<
1736                    ::fidl_next_fuchsia_power_broker::ElementRunner,
1737                    ::fidl_next::fuchsia::WireChannel,
1738                >>()
1739            });
1740
1741            let _ = self.table.get(3).map(|envelope| unsafe {
1742                envelope.read_unchecked::<::fidl_next::ClientEnd<
1743                    ::fidl_next_fuchsia_power_broker::Lessor,
1744                    ::fidl_next::fuchsia::WireChannel,
1745                >>()
1746            });
1747
1748            let _ = self.table.get(4).map(|envelope| unsafe {
1749                envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1750            });
1751        }
1752    }
1753
1754    unsafe impl ::fidl_next::Wire for PowerElementArgs<'static> {
1755        type Owned<'de> = PowerElementArgs<'de>;
1756
1757        #[inline]
1758        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1759            ::fidl_next::munge!(let Self { table } = out);
1760            ::fidl_next::WireTable::zero_padding(table);
1761        }
1762    }
1763
1764    unsafe impl<___D> ::fidl_next::Decode<___D> for PowerElementArgs<'static>
1765    where
1766        ___D: ::fidl_next::Decoder + ?Sized,
1767        ___D: ::fidl_next::fuchsia::HandleDecoder,
1768    {
1769        fn decode(
1770            slot: ::fidl_next::Slot<'_, Self>,
1771            decoder: &mut ___D,
1772            _: (),
1773        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1774            ::fidl_next::munge!(let Self { table } = slot);
1775
1776            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1777                match ordinal {
1778                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1779
1780                    1 => {
1781                        ::fidl_next::WireEnvelope::decode_as::<
1782                            ___D,
1783                            ::fidl_next::ClientEnd<
1784                                ::fidl_next_fuchsia_power_broker::ElementControl,
1785                                ::fidl_next::fuchsia::WireChannel,
1786                            >,
1787                        >(slot.as_mut(), decoder, ())?;
1788
1789                        Ok(())
1790                    }
1791
1792                    2 => {
1793                        ::fidl_next::WireEnvelope::decode_as::<
1794                            ___D,
1795                            ::fidl_next::ServerEnd<
1796                                ::fidl_next_fuchsia_power_broker::ElementRunner,
1797                                ::fidl_next::fuchsia::WireChannel,
1798                            >,
1799                        >(slot.as_mut(), decoder, ())?;
1800
1801                        Ok(())
1802                    }
1803
1804                    3 => {
1805                        ::fidl_next::WireEnvelope::decode_as::<
1806                            ___D,
1807                            ::fidl_next::ClientEnd<
1808                                ::fidl_next_fuchsia_power_broker::Lessor,
1809                                ::fidl_next::fuchsia::WireChannel,
1810                            >,
1811                        >(slot.as_mut(), decoder, ())?;
1812
1813                        Ok(())
1814                    }
1815
1816                    4 => {
1817                        ::fidl_next::WireEnvelope::decode_as::<
1818                            ___D,
1819                            ::fidl_next::fuchsia::WireEvent,
1820                        >(slot.as_mut(), decoder, ())?;
1821
1822                        Ok(())
1823                    }
1824
1825                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1826                }
1827            })
1828        }
1829    }
1830
1831    impl<'de> PowerElementArgs<'de> {
1832        pub fn control_client(
1833            &self,
1834        ) -> ::core::option::Option<
1835            &::fidl_next::ClientEnd<
1836                ::fidl_next_fuchsia_power_broker::ElementControl,
1837                ::fidl_next::fuchsia::WireChannel,
1838            >,
1839        > {
1840            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1841        }
1842
1843        pub fn runner_server(
1844            &self,
1845        ) -> ::core::option::Option<
1846            &::fidl_next::ServerEnd<
1847                ::fidl_next_fuchsia_power_broker::ElementRunner,
1848                ::fidl_next::fuchsia::WireChannel,
1849            >,
1850        > {
1851            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1852        }
1853
1854        pub fn lessor_client(
1855            &self,
1856        ) -> ::core::option::Option<
1857            &::fidl_next::ClientEnd<
1858                ::fidl_next_fuchsia_power_broker::Lessor,
1859                ::fidl_next::fuchsia::WireChannel,
1860            >,
1861        > {
1862            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1863        }
1864
1865        pub fn token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
1866            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1867        }
1868    }
1869
1870    impl<'de> ::core::fmt::Debug for PowerElementArgs<'de> {
1871        fn fmt(
1872            &self,
1873            f: &mut ::core::fmt::Formatter<'_>,
1874        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1875            f.debug_struct("PowerElementArgs")
1876                .field("control_client", &self.control_client())
1877                .field("runner_server", &self.runner_server())
1878                .field("lessor_client", &self.lessor_client())
1879                .field("token", &self.token())
1880                .finish()
1881        }
1882    }
1883
1884    impl<'de> ::fidl_next::IntoNatural for PowerElementArgs<'de> {
1885        type Natural = crate::natural::PowerElementArgs;
1886    }
1887
1888    impl ::fidl_next::Unconstrained for PowerElementArgs<'_> {}
1889
1890    /// The wire type corresponding to [`DriverStartArgs`].
1891    #[repr(C)]
1892    pub struct DriverStartArgs<'de> {
1893        pub(crate) table: ::fidl_next::WireTable<'de>,
1894    }
1895
1896    impl<'de> Drop for DriverStartArgs<'de> {
1897        fn drop(&mut self) {
1898            let _ = self.table.get(1)
1899                .map(|envelope| unsafe {
1900                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>>()
1901                });
1902
1903            let _ = self.table.get(2)
1904                .map(|envelope| unsafe {
1905                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>()
1906                });
1907
1908            let _ = self.table.get(3).map(|envelope| unsafe {
1909                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1910            });
1911
1912            let _ = self.table.get(4).map(|envelope| unsafe {
1913                envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
1914            });
1915
1916            let _ = self.table.get(5).map(|envelope| unsafe {
1917                envelope.read_unchecked::<::fidl_next::WireVector<
1918                    'de,
1919                    ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
1920                >>()
1921            });
1922
1923            let _ = self.table.get(6).map(|envelope| unsafe {
1924                envelope.read_unchecked::<::fidl_next::ServerEnd<
1925                    ::fidl_next_fuchsia_io::Directory,
1926                    ::fidl_next::fuchsia::WireChannel,
1927                >>()
1928            });
1929
1930            let _ = self.table.get(7).map(|envelope| unsafe {
1931                envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
1932            });
1933
1934            let _ = self.table.get(8).map(|envelope| unsafe {
1935                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1936            });
1937
1938            let _ = self.table.get(9)
1939                .map(|envelope| unsafe {
1940                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry<'de>>>()
1941                });
1942
1943            let _ = self.table.get(10).map(|envelope| unsafe {
1944                envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>()
1945            });
1946
1947            let _ = self.table.get(11).map(|envelope| unsafe {
1948                envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1949            });
1950
1951            let _ = self.table.get(12)
1952                .map(|envelope| unsafe {
1953                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry2<'de>>>()
1954                });
1955
1956            let _ = self.table.get(13).map(|envelope| unsafe {
1957                envelope.read_unchecked::<::fidl_next::fuchsia::WireVmar>()
1958            });
1959
1960            let _ = self.table.get(14).map(|envelope| unsafe {
1961                envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>()
1962            });
1963        }
1964    }
1965
1966    unsafe impl ::fidl_next::Wire for DriverStartArgs<'static> {
1967        type Owned<'de> = DriverStartArgs<'de>;
1968
1969        #[inline]
1970        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1971            ::fidl_next::munge!(let Self { table } = out);
1972            ::fidl_next::WireTable::zero_padding(table);
1973        }
1974    }
1975
1976    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverStartArgs<'static>
1977    where
1978        ___D: ::fidl_next::Decoder + ?Sized,
1979        ___D: ::fidl_next::fuchsia::HandleDecoder,
1980    {
1981        fn decode(
1982            slot: ::fidl_next::Slot<'_, Self>,
1983            decoder: &mut ___D,
1984            _: (),
1985        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1986            ::fidl_next::munge!(let Self { table } = slot);
1987
1988            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1989                match ordinal {
1990                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1991
1992                    1 => {
1993                        ::fidl_next::WireEnvelope::decode_as::<
1994                            ___D,
1995                            ::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>,
1996                        >(slot.as_mut(), decoder, ())?;
1997
1998                        Ok(())
1999                    }
2000
2001                    2 => {
2002                        ::fidl_next::WireEnvelope::decode_as::<
2003                            ___D,
2004                            ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
2005                        >(slot.as_mut(), decoder, (64, ()))?;
2006
2007                        let value = unsafe {
2008                            slot
2009                                            .deref_unchecked()
2010                                            .deref_unchecked::<
2011                                                ::fidl_next::WireVector<'_, crate::wire::NodeSymbol<'_>>
2012                                            >()
2013                        };
2014
2015                        if value.len() > 64 {
2016                            return Err(::fidl_next::DecodeError::VectorTooLong {
2017                                size: value.len() as u64,
2018                                limit: 64,
2019                            });
2020                        }
2021
2022                        Ok(())
2023                    }
2024
2025                    3 => {
2026                        ::fidl_next::WireEnvelope::decode_as::<
2027                            ___D,
2028                            ::fidl_next::WireString<'static>,
2029                        >(slot.as_mut(), decoder, 4096)?;
2030
2031                        let value = unsafe {
2032                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2033                        };
2034
2035                        if value.len() > 4096 {
2036                            return Err(::fidl_next::DecodeError::VectorTooLong {
2037                                size: value.len() as u64,
2038                                limit: 4096,
2039                            });
2040                        }
2041
2042                        Ok(())
2043                    }
2044
2045                    4 => {
2046                        ::fidl_next::WireEnvelope::decode_as::<
2047                            ___D,
2048                            ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
2049                        >(slot.as_mut(), decoder, ())?;
2050
2051                        Ok(())
2052                    }
2053
2054                    5 => {
2055                        ::fidl_next::WireEnvelope::decode_as::<
2056                            ___D,
2057                            ::fidl_next::WireVector<
2058                                'static,
2059                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2060                                    'static,
2061                                >,
2062                            >,
2063                        >(slot.as_mut(), decoder, (32, ()))?;
2064
2065                        let value = unsafe {
2066                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2067                                '_,
2068                                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2069                                    '_,
2070                                >,
2071                            >>()
2072                        };
2073
2074                        if value.len() > 32 {
2075                            return Err(::fidl_next::DecodeError::VectorTooLong {
2076                                size: value.len() as u64,
2077                                limit: 32,
2078                            });
2079                        }
2080
2081                        Ok(())
2082                    }
2083
2084                    6 => {
2085                        ::fidl_next::WireEnvelope::decode_as::<
2086                            ___D,
2087                            ::fidl_next::ServerEnd<
2088                                ::fidl_next_fuchsia_io::Directory,
2089                                ::fidl_next::fuchsia::WireChannel,
2090                            >,
2091                        >(slot.as_mut(), decoder, ())?;
2092
2093                        Ok(())
2094                    }
2095
2096                    7 => {
2097                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmo>(
2098                            slot.as_mut(),
2099                            decoder,
2100                            (),
2101                        )?;
2102
2103                        Ok(())
2104                    }
2105
2106                    8 => {
2107                        ::fidl_next::WireEnvelope::decode_as::<
2108                            ___D,
2109                            ::fidl_next::WireString<'static>,
2110                        >(slot.as_mut(), decoder, 4294967295)?;
2111
2112                        Ok(())
2113                    }
2114
2115                    9 => {
2116                        ::fidl_next::WireEnvelope::decode_as::<
2117                            ___D,
2118                            ::fidl_next::WireVector<
2119                                'static,
2120                                crate::wire::NodePropertyEntry<'static>,
2121                            >,
2122                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2123
2124                        Ok(())
2125                    }
2126
2127                    10 => {
2128                        ::fidl_next::WireEnvelope::decode_as::<
2129                            ___D,
2130                            ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
2131                        >(slot.as_mut(), decoder, (128, ()))?;
2132
2133                        let value = unsafe {
2134                            slot
2135                                            .deref_unchecked()
2136                                            .deref_unchecked::<
2137                                                ::fidl_next::WireVector<'_, crate::wire::Offer<'_>>
2138                                            >()
2139                        };
2140
2141                        if value.len() > 128 {
2142                            return Err(::fidl_next::DecodeError::VectorTooLong {
2143                                size: value.len() as u64,
2144                                limit: 128,
2145                            });
2146                        }
2147
2148                        Ok(())
2149                    }
2150
2151                    11 => {
2152                        ::fidl_next::WireEnvelope::decode_as::<
2153                            ___D,
2154                            ::fidl_next::fuchsia::WireEvent,
2155                        >(slot.as_mut(), decoder, ())?;
2156
2157                        Ok(())
2158                    }
2159
2160                    12 => {
2161                        ::fidl_next::WireEnvelope::decode_as::<
2162                            ___D,
2163                            ::fidl_next::WireVector<
2164                                'static,
2165                                crate::wire::NodePropertyEntry2<'static>,
2166                            >,
2167                        >(slot.as_mut(), decoder, (4294967295, ()))?;
2168
2169                        Ok(())
2170                    }
2171
2172                    13 => {
2173                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmar>(
2174                            slot.as_mut(),
2175                            decoder,
2176                            (),
2177                        )?;
2178
2179                        Ok(())
2180                    }
2181
2182                    14 => {
2183                        ::fidl_next::WireEnvelope::decode_as::<
2184                            ___D,
2185                            crate::wire::PowerElementArgs<'static>,
2186                        >(slot.as_mut(), decoder, ())?;
2187
2188                        Ok(())
2189                    }
2190
2191                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2192                }
2193            })
2194        }
2195    }
2196
2197    impl<'de> DriverStartArgs<'de> {
2198        pub fn node(
2199            &self,
2200        ) -> ::core::option::Option<
2201            &::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>,
2202        > {
2203            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2204        }
2205
2206        pub fn symbols(
2207            &self,
2208        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>
2209        {
2210            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2211        }
2212
2213        pub fn url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2214            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2215        }
2216
2217        pub fn program(
2218            &self,
2219        ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2220            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2221        }
2222
2223        pub fn incoming(
2224            &self,
2225        ) -> ::core::option::Option<
2226            &::fidl_next::WireVector<
2227                'de,
2228                ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2229            >,
2230        > {
2231            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2232        }
2233
2234        pub fn outgoing_dir(
2235            &self,
2236        ) -> ::core::option::Option<
2237            &::fidl_next::ServerEnd<
2238                ::fidl_next_fuchsia_io::Directory,
2239                ::fidl_next::fuchsia::WireChannel,
2240            >,
2241        > {
2242            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2243        }
2244
2245        pub fn config(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmo> {
2246            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2247        }
2248
2249        pub fn node_name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2250            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2251        }
2252
2253        pub fn node_properties(
2254            &self,
2255        ) -> ::core::option::Option<
2256            &::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry<'de>>,
2257        > {
2258            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2259        }
2260
2261        pub fn node_offers(
2262            &self,
2263        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>
2264        {
2265            unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2266        }
2267
2268        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
2269            unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2270        }
2271
2272        pub fn node_properties_2(
2273            &self,
2274        ) -> ::core::option::Option<
2275            &::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry2<'de>>,
2276        > {
2277            unsafe { Some(self.table.get(12)?.deref_unchecked()) }
2278        }
2279
2280        pub fn vmar(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmar> {
2281            unsafe { Some(self.table.get(13)?.deref_unchecked()) }
2282        }
2283
2284        pub fn power_element_args(
2285            &self,
2286        ) -> ::core::option::Option<&crate::wire::PowerElementArgs<'de>> {
2287            unsafe { Some(self.table.get(14)?.deref_unchecked()) }
2288        }
2289    }
2290
2291    impl<'de> ::core::fmt::Debug for DriverStartArgs<'de> {
2292        fn fmt(
2293            &self,
2294            f: &mut ::core::fmt::Formatter<'_>,
2295        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2296            f.debug_struct("DriverStartArgs")
2297                .field("node", &self.node())
2298                .field("symbols", &self.symbols())
2299                .field("url", &self.url())
2300                .field("program", &self.program())
2301                .field("incoming", &self.incoming())
2302                .field("outgoing_dir", &self.outgoing_dir())
2303                .field("config", &self.config())
2304                .field("node_name", &self.node_name())
2305                .field("node_properties", &self.node_properties())
2306                .field("node_offers", &self.node_offers())
2307                .field("node_token", &self.node_token())
2308                .field("node_properties_2", &self.node_properties_2())
2309                .field("vmar", &self.vmar())
2310                .field("power_element_args", &self.power_element_args())
2311                .finish()
2312        }
2313    }
2314
2315    impl<'de> ::fidl_next::IntoNatural for DriverStartArgs<'de> {
2316        type Natural = crate::natural::DriverStartArgs;
2317    }
2318
2319    impl ::fidl_next::Unconstrained for DriverStartArgs<'_> {}
2320
2321    /// The wire type corresponding to [`DriverStartRequest`].
2322    #[derive(Debug)]
2323    #[repr(C)]
2324    pub struct DriverStartRequest<'de> {
2325        pub start_args: crate::wire::DriverStartArgs<'de>,
2326    }
2327
2328    static_assertions::const_assert_eq!(std::mem::size_of::<DriverStartRequest<'_>>(), 16);
2329    static_assertions::const_assert_eq!(std::mem::align_of::<DriverStartRequest<'_>>(), 8);
2330
2331    static_assertions::const_assert_eq!(
2332        std::mem::offset_of!(DriverStartRequest<'_>, start_args),
2333        0
2334    );
2335
2336    unsafe impl ::fidl_next::Wire for DriverStartRequest<'static> {
2337        type Owned<'de> = DriverStartRequest<'de>;
2338
2339        #[inline]
2340        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2341            ::fidl_next::munge! {
2342                let Self {
2343
2344                    start_args,
2345
2346                } = &mut *out_;
2347            }
2348
2349            ::fidl_next::Wire::zero_padding(start_args);
2350        }
2351    }
2352
2353    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverStartRequest<'static>
2354    where
2355        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2356        ___D: ::fidl_next::Decoder,
2357        ___D: ::fidl_next::fuchsia::HandleDecoder,
2358    {
2359        fn decode(
2360            slot_: ::fidl_next::Slot<'_, Self>,
2361            decoder_: &mut ___D,
2362            _: (),
2363        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2364            ::fidl_next::munge! {
2365                let Self {
2366
2367                    mut start_args,
2368
2369                } = slot_;
2370            }
2371
2372            let _field = start_args.as_mut();
2373
2374            ::fidl_next::Decode::decode(start_args.as_mut(), decoder_, ())?;
2375
2376            Ok(())
2377        }
2378    }
2379
2380    impl<'de> ::fidl_next::IntoNatural for DriverStartRequest<'de> {
2381        type Natural = crate::natural::DriverStartRequest;
2382    }
2383
2384    impl ::fidl_next::Unconstrained for DriverStartRequest<'static> {}
2385
2386    /// The wire type corresponding to [`DriverResult`].
2387    #[repr(transparent)]
2388    pub struct DriverResult<'de> {
2389        pub(crate) raw: ::fidl_next::RawWireUnion,
2390        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2391    }
2392
2393    impl<'de> Drop for DriverResult<'de> {
2394        fn drop(&mut self) {
2395            match self.raw.ordinal() {
2396                1 => {
2397                    let _ = unsafe {
2398                        self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2399                    };
2400                }
2401
2402                2 => {
2403                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
2404                }
2405
2406                3 => {
2407                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
2408                }
2409
2410                _ => (),
2411            }
2412        }
2413    }
2414
2415    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
2416        type Owned<'de> = DriverResult<'de>;
2417
2418        #[inline]
2419        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2420            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2421            ::fidl_next::RawWireUnion::zero_padding(raw);
2422        }
2423    }
2424
2425    pub mod driver_result {
2426        pub enum Ref<'de> {
2427            DriverStartedNodeToken(&'de ::fidl_next::fuchsia::WireEvent),
2428
2429            MatchError(&'de ::fidl_next::WireI32),
2430
2431            StartError(&'de ::fidl_next::WireI32),
2432
2433            UnknownOrdinal_(u64),
2434        }
2435    }
2436
2437    impl<'de> DriverResult<'de> {
2438        pub fn as_ref(&self) -> crate::wire::driver_result::Ref<'_> {
2439            match self.raw.ordinal() {
2440                1 => crate::wire::driver_result::Ref::DriverStartedNodeToken(unsafe {
2441                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireEvent>()
2442                }),
2443
2444                2 => crate::wire::driver_result::Ref::MatchError(unsafe {
2445                    self.raw.get().deref_unchecked::<::fidl_next::WireI32>()
2446                }),
2447
2448                3 => crate::wire::driver_result::Ref::StartError(unsafe {
2449                    self.raw.get().deref_unchecked::<::fidl_next::WireI32>()
2450                }),
2451
2452                unknown => crate::wire::driver_result::Ref::UnknownOrdinal_(unknown),
2453            }
2454        }
2455    }
2456
2457    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResult<'static>
2458    where
2459        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2460        ___D: ::fidl_next::Decoder,
2461        ___D: ::fidl_next::fuchsia::HandleDecoder,
2462    {
2463        fn decode(
2464            mut slot: ::fidl_next::Slot<'_, Self>,
2465            decoder: &mut ___D,
2466            _: (),
2467        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2468            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2469            match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
2470                1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireEvent>(
2471                    raw,
2472                    decoder,
2473                    (),
2474                )?,
2475
2476                2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
2477                    raw,
2478                    decoder,
2479                    (),
2480                )?,
2481
2482                3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
2483                    raw,
2484                    decoder,
2485                    (),
2486                )?,
2487
2488                _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
2489            }
2490
2491            Ok(())
2492        }
2493    }
2494
2495    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
2496        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2497            match self.raw.ordinal() {
2498                1 => unsafe {
2499                    self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireEvent>().fmt(f)
2500                },
2501                2 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
2502                3 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
2503                _ => unsafe { ::core::hint::unreachable_unchecked() },
2504            }
2505        }
2506    }
2507
2508    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
2509        type Natural = crate::natural::DriverResult;
2510    }
2511
2512    impl ::fidl_next::Unconstrained for DriverResult<'static> {}
2513
2514    /// The wire type corresponding to [`NodeAddArgs`].
2515    #[repr(C)]
2516    pub struct NodeAddArgs<'de> {
2517        pub(crate) table: ::fidl_next::WireTable<'de>,
2518    }
2519
2520    impl<'de> Drop for NodeAddArgs<'de> {
2521        fn drop(&mut self) {
2522            let _ = self.table.get(1).map(|envelope| unsafe {
2523                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2524            });
2525
2526            let _ = self.table.get(3)
2527                .map(|envelope| unsafe {
2528                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>()
2529                });
2530
2531            let _ = self.table.get(4).map(|envelope| unsafe {
2532                envelope
2533                    .read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>(
2534                    )
2535            });
2536
2537            let _ = self.table.get(5).map(|envelope| unsafe {
2538                envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>()
2539            });
2540
2541            let _ = self.table.get(6).map(|envelope| unsafe {
2542                envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>()
2543            });
2544
2545            let _ = self
2546                .table
2547                .get(7)
2548                .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
2549
2550            let _ = self.table.get(8)
2551                .map(|envelope| unsafe {
2552                    envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>()
2553                });
2554
2555            let _ = self.table.get(9)
2556                .map(|envelope| unsafe {
2557                    envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
2558                });
2559        }
2560    }
2561
2562    unsafe impl ::fidl_next::Wire for NodeAddArgs<'static> {
2563        type Owned<'de> = NodeAddArgs<'de>;
2564
2565        #[inline]
2566        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2567            ::fidl_next::munge!(let Self { table } = out);
2568            ::fidl_next::WireTable::zero_padding(table);
2569        }
2570    }
2571
2572    unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAddArgs<'static>
2573    where
2574        ___D: ::fidl_next::Decoder + ?Sized,
2575        ___D: ::fidl_next::fuchsia::HandleDecoder,
2576    {
2577        fn decode(
2578            slot: ::fidl_next::Slot<'_, Self>,
2579            decoder: &mut ___D,
2580            _: (),
2581        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2582            ::fidl_next::munge!(let Self { table } = slot);
2583
2584            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2585                match ordinal {
2586                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2587
2588                    1 => {
2589                        ::fidl_next::WireEnvelope::decode_as::<
2590                            ___D,
2591                            ::fidl_next::WireString<'static>,
2592                        >(slot.as_mut(), decoder, 128)?;
2593
2594                        let value = unsafe {
2595                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2596                        };
2597
2598                        if value.len() > 128 {
2599                            return Err(::fidl_next::DecodeError::VectorTooLong {
2600                                size: value.len() as u64,
2601                                limit: 128,
2602                            });
2603                        }
2604
2605                        Ok(())
2606                    }
2607
2608                    3 => {
2609                        ::fidl_next::WireEnvelope::decode_as::<
2610                            ___D,
2611                            ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
2612                        >(slot.as_mut(), decoder, (64, ()))?;
2613
2614                        let value = unsafe {
2615                            slot
2616                                            .deref_unchecked()
2617                                            .deref_unchecked::<
2618                                                ::fidl_next::WireVector<'_, crate::wire::NodeSymbol<'_>>
2619                                            >()
2620                        };
2621
2622                        if value.len() > 64 {
2623                            return Err(::fidl_next::DecodeError::VectorTooLong {
2624                                size: value.len() as u64,
2625                                limit: 64,
2626                            });
2627                        }
2628
2629                        Ok(())
2630                    }
2631
2632                    4 => {
2633                        ::fidl_next::WireEnvelope::decode_as::<
2634                            ___D,
2635                            ::fidl_next::WireVector<'static, crate::wire::NodeProperty<'static>>,
2636                        >(slot.as_mut(), decoder, (64, ()))?;
2637
2638                        let value = unsafe {
2639                            slot
2640                                            .deref_unchecked()
2641                                            .deref_unchecked::<
2642                                                ::fidl_next::WireVector<'_, crate::wire::NodeProperty<'_>>
2643                                            >()
2644                        };
2645
2646                        if value.len() > 64 {
2647                            return Err(::fidl_next::DecodeError::VectorTooLong {
2648                                size: value.len() as u64,
2649                                limit: 64,
2650                            });
2651                        }
2652
2653                        Ok(())
2654                    }
2655
2656                    5 => {
2657                        ::fidl_next::WireEnvelope::decode_as::<
2658                            ___D,
2659                            crate::wire::DevfsAddArgs<'static>,
2660                        >(slot.as_mut(), decoder, ())?;
2661
2662                        Ok(())
2663                    }
2664
2665                    6 => {
2666                        ::fidl_next::WireEnvelope::decode_as::<
2667                            ___D,
2668                            ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
2669                        >(slot.as_mut(), decoder, (128, ()))?;
2670
2671                        let value = unsafe {
2672                            slot
2673                                            .deref_unchecked()
2674                                            .deref_unchecked::<
2675                                                ::fidl_next::WireVector<'_, crate::wire::Offer<'_>>
2676                                            >()
2677                        };
2678
2679                        if value.len() > 128 {
2680                            return Err(::fidl_next::DecodeError::VectorTooLong {
2681                                size: value.len() as u64,
2682                                limit: 128,
2683                            });
2684                        }
2685
2686                        Ok(())
2687                    }
2688
2689                    7 => {
2690                        ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::BusInfo<'static>>(
2691                            slot.as_mut(),
2692                            decoder,
2693                            (),
2694                        )?;
2695
2696                        Ok(())
2697                    }
2698
2699                    8 => {
2700                        ::fidl_next::WireEnvelope::decode_as::<
2701                            ___D,
2702                            ::fidl_next::WireVector<'static, crate::wire::NodeProperty2<'static>>,
2703                        >(slot.as_mut(), decoder, (64, ()))?;
2704
2705                        let value = unsafe {
2706                            slot
2707                                            .deref_unchecked()
2708                                            .deref_unchecked::<
2709                                                ::fidl_next::WireVector<'_, crate::wire::NodeProperty2<'_>>
2710                                            >()
2711                        };
2712
2713                        if value.len() > 64 {
2714                            return Err(::fidl_next::DecodeError::VectorTooLong {
2715                                size: value.len() as u64,
2716                                limit: 64,
2717                            });
2718                        }
2719
2720                        Ok(())
2721                    }
2722
2723                    9 => {
2724                        ::fidl_next::WireEnvelope::decode_as::<
2725                            ___D,
2726                            ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2727                        >(slot.as_mut(), decoder, ())?;
2728
2729                        Ok(())
2730                    }
2731
2732                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2733                }
2734            })
2735        }
2736    }
2737
2738    impl<'de> NodeAddArgs<'de> {
2739        pub fn name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2740            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2741        }
2742
2743        pub fn symbols(
2744            &self,
2745        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>
2746        {
2747            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2748        }
2749
2750        pub fn properties(
2751            &self,
2752        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>
2753        {
2754            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2755        }
2756
2757        pub fn devfs_args(&self) -> ::core::option::Option<&crate::wire::DevfsAddArgs<'de>> {
2758            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2759        }
2760
2761        pub fn offers2(
2762            &self,
2763        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>
2764        {
2765            unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2766        }
2767
2768        pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
2769            unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2770        }
2771
2772        pub fn properties2(
2773            &self,
2774        ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>
2775        {
2776            unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2777        }
2778
2779        pub fn offers_dictionary(
2780            &self,
2781        ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2782        {
2783            unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2784        }
2785    }
2786
2787    impl<'de> ::core::fmt::Debug for NodeAddArgs<'de> {
2788        fn fmt(
2789            &self,
2790            f: &mut ::core::fmt::Formatter<'_>,
2791        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2792            f.debug_struct("NodeAddArgs")
2793                .field("name", &self.name())
2794                .field("symbols", &self.symbols())
2795                .field("properties", &self.properties())
2796                .field("devfs_args", &self.devfs_args())
2797                .field("offers2", &self.offers2())
2798                .field("bus_info", &self.bus_info())
2799                .field("properties2", &self.properties2())
2800                .field("offers_dictionary", &self.offers_dictionary())
2801                .finish()
2802        }
2803    }
2804
2805    impl<'de> ::fidl_next::IntoNatural for NodeAddArgs<'de> {
2806        type Natural = crate::natural::NodeAddArgs;
2807    }
2808
2809    impl ::fidl_next::Unconstrained for NodeAddArgs<'_> {}
2810
2811    /// The wire type corresponding to [`NodeAddChildRequest`].
2812    #[derive(Debug)]
2813    #[repr(C)]
2814    pub struct NodeAddChildRequest<'de> {
2815        pub args: crate::wire::NodeAddArgs<'de>,
2816
2817        pub controller:
2818            ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::WireChannel>,
2819
2820        pub node: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
2821    }
2822
2823    static_assertions::const_assert_eq!(std::mem::size_of::<NodeAddChildRequest<'_>>(), 24);
2824    static_assertions::const_assert_eq!(std::mem::align_of::<NodeAddChildRequest<'_>>(), 8);
2825
2826    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, args), 0);
2827
2828    static_assertions::const_assert_eq!(
2829        std::mem::offset_of!(NodeAddChildRequest<'_>, controller),
2830        16
2831    );
2832
2833    static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, node), 20);
2834
2835    unsafe impl ::fidl_next::Wire for NodeAddChildRequest<'static> {
2836        type Owned<'de> = NodeAddChildRequest<'de>;
2837
2838        #[inline]
2839        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2840            ::fidl_next::munge! {
2841                let Self {
2842
2843                    args,
2844                    controller,
2845                    node,
2846
2847                } = &mut *out_;
2848            }
2849
2850            ::fidl_next::Wire::zero_padding(args);
2851
2852            ::fidl_next::Wire::zero_padding(controller);
2853
2854            ::fidl_next::Wire::zero_padding(node);
2855        }
2856    }
2857
2858    unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAddChildRequest<'static>
2859    where
2860        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2861        ___D: ::fidl_next::Decoder,
2862        ___D: ::fidl_next::fuchsia::HandleDecoder,
2863    {
2864        fn decode(
2865            slot_: ::fidl_next::Slot<'_, Self>,
2866            decoder_: &mut ___D,
2867            _: (),
2868        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2869            ::fidl_next::munge! {
2870                let Self {
2871
2872                    mut args,
2873                    mut controller,
2874                    mut node,
2875
2876                } = slot_;
2877            }
2878
2879            let _field = args.as_mut();
2880
2881            ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
2882
2883            let _field = controller.as_mut();
2884
2885            ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
2886
2887            let _field = node.as_mut();
2888
2889            ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
2890
2891            Ok(())
2892        }
2893    }
2894
2895    impl<'de> ::fidl_next::IntoNatural for NodeAddChildRequest<'de> {
2896        type Natural = crate::natural::NodeAddChildRequest;
2897    }
2898
2899    impl ::fidl_next::Unconstrained for NodeAddChildRequest<'static> {}
2900
2901    /// The wire type corresponding to [`NodeControllerOnBindRequest`].
2902    #[repr(C)]
2903    pub struct NodeControllerOnBindRequest<'de> {
2904        pub(crate) table: ::fidl_next::WireTable<'de>,
2905    }
2906
2907    impl<'de> Drop for NodeControllerOnBindRequest<'de> {
2908        fn drop(&mut self) {
2909            let _ = self.table.get(1).map(|envelope| unsafe {
2910                envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2911            });
2912        }
2913    }
2914
2915    unsafe impl ::fidl_next::Wire for NodeControllerOnBindRequest<'static> {
2916        type Owned<'de> = NodeControllerOnBindRequest<'de>;
2917
2918        #[inline]
2919        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2920            ::fidl_next::munge!(let Self { table } = out);
2921            ::fidl_next::WireTable::zero_padding(table);
2922        }
2923    }
2924
2925    unsafe impl<___D> ::fidl_next::Decode<___D> for NodeControllerOnBindRequest<'static>
2926    where
2927        ___D: ::fidl_next::Decoder + ?Sized,
2928        ___D: ::fidl_next::fuchsia::HandleDecoder,
2929    {
2930        fn decode(
2931            slot: ::fidl_next::Slot<'_, Self>,
2932            decoder: &mut ___D,
2933            _: (),
2934        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2935            ::fidl_next::munge!(let Self { table } = slot);
2936
2937            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2938                match ordinal {
2939                    0 => unsafe { ::core::hint::unreachable_unchecked() },
2940
2941                    1 => {
2942                        ::fidl_next::WireEnvelope::decode_as::<
2943                            ___D,
2944                            ::fidl_next::fuchsia::WireEvent,
2945                        >(slot.as_mut(), decoder, ())?;
2946
2947                        Ok(())
2948                    }
2949
2950                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2951                }
2952            })
2953        }
2954    }
2955
2956    impl<'de> NodeControllerOnBindRequest<'de> {
2957        pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
2958            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2959        }
2960    }
2961
2962    impl<'de> ::core::fmt::Debug for NodeControllerOnBindRequest<'de> {
2963        fn fmt(
2964            &self,
2965            f: &mut ::core::fmt::Formatter<'_>,
2966        ) -> ::core::result::Result<(), ::core::fmt::Error> {
2967            f.debug_struct("NodeControllerOnBindRequest")
2968                .field("node_token", &self.node_token())
2969                .finish()
2970        }
2971    }
2972
2973    impl<'de> ::fidl_next::IntoNatural for NodeControllerOnBindRequest<'de> {
2974        type Natural = crate::natural::NodeControllerOnBindRequest;
2975    }
2976
2977    impl ::fidl_next::Unconstrained for NodeControllerOnBindRequest<'_> {}
2978}
2979
2980pub mod wire_optional {
2981
2982    pub use fidl_next_common_fuchsia_driver_framework::wire_optional::*;
2983
2984    #[repr(transparent)]
2985    pub struct DriverResult<'de> {
2986        pub(crate) raw: ::fidl_next::RawWireUnion,
2987        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2988    }
2989
2990    unsafe impl ::fidl_next::Wire for DriverResult<'static> {
2991        type Owned<'de> = DriverResult<'de>;
2992
2993        #[inline]
2994        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2995            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2996            ::fidl_next::RawWireUnion::zero_padding(raw);
2997        }
2998    }
2999
3000    impl<'de> DriverResult<'de> {
3001        pub fn is_some(&self) -> bool {
3002            self.raw.is_some()
3003        }
3004
3005        pub fn is_none(&self) -> bool {
3006            self.raw.is_none()
3007        }
3008
3009        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DriverResult<'de>> {
3010            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3011        }
3012
3013        pub fn into_option(self) -> ::core::option::Option<crate::wire::DriverResult<'de>> {
3014            if self.is_some() {
3015                Some(crate::wire::DriverResult {
3016                    raw: self.raw,
3017                    _phantom: ::core::marker::PhantomData,
3018                })
3019            } else {
3020                None
3021            }
3022        }
3023    }
3024
3025    unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResult<'static>
3026    where
3027        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3028        ___D: ::fidl_next::Decoder,
3029        ___D: ::fidl_next::fuchsia::HandleDecoder,
3030    {
3031        fn decode(
3032            mut slot: ::fidl_next::Slot<'_, Self>,
3033            decoder: &mut ___D,
3034            _: (),
3035        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3036            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3037            match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
3038                1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireEvent>(
3039                    raw,
3040                    decoder,
3041                    (),
3042                )?,
3043
3044                2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
3045                    raw,
3046                    decoder,
3047                    (),
3048                )?,
3049
3050                3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
3051                    raw,
3052                    decoder,
3053                    (),
3054                )?,
3055
3056                0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
3057                _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
3058            }
3059
3060            Ok(())
3061        }
3062    }
3063
3064    impl<'de> ::core::fmt::Debug for DriverResult<'de> {
3065        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3066            self.as_ref().fmt(f)
3067        }
3068    }
3069
3070    impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
3071        type Natural = ::core::option::Option<crate::natural::DriverResult>;
3072    }
3073
3074    impl ::fidl_next::Unconstrained for DriverResult<'static> {}
3075}
3076
3077pub mod generic {
3078
3079    pub use fidl_next_common_fuchsia_driver_framework::generic::*;
3080
3081    pub struct DriverStartRequest<T0> {
3082        pub start_args: T0,
3083    }
3084
3085    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
3086        for DriverStartRequest<T0>
3087    where
3088        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3089        ___E: ::fidl_next::Encoder,
3090        ___E: ::fidl_next::fuchsia::HandleEncoder,
3091        T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
3092    {
3093        #[inline]
3094        fn encode(
3095            self,
3096            encoder_: &mut ___E,
3097            out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
3098            _: (),
3099        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3100            ::fidl_next::munge! {
3101                let crate::wire::DriverStartRequest {
3102
3103                    start_args,
3104
3105                } = out_;
3106            }
3107
3108            ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
3109
3110            Ok(())
3111        }
3112    }
3113
3114    pub struct NodeAddChildRequest<T0, T1, T2> {
3115        pub args: T0,
3116
3117        pub controller: T1,
3118
3119        pub node: T2,
3120    }
3121
3122    unsafe impl<___E, T0, T1, T2>
3123        ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
3124        for NodeAddChildRequest<T0, T1, T2>
3125    where
3126        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3127        ___E: ::fidl_next::Encoder,
3128        ___E: ::fidl_next::fuchsia::HandleEncoder,
3129        T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
3130        T1: ::fidl_next::Encode<
3131                ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::WireChannel>,
3132                ___E,
3133            >,
3134        T2: ::fidl_next::Encode<
3135                ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
3136                ___E,
3137            >,
3138    {
3139        #[inline]
3140        fn encode(
3141            self,
3142            encoder_: &mut ___E,
3143            out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
3144            _: (),
3145        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3146            ::fidl_next::munge! {
3147                let crate::wire::NodeAddChildRequest {
3148
3149                    args,
3150                    controller,
3151                    node,
3152
3153                } = out_;
3154            }
3155
3156            ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
3157
3158            ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
3159
3160            ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
3161
3162            Ok(())
3163        }
3164    }
3165}
3166
3167pub use self::natural::*;
3168
3169/// The type corresponding to the Driver protocol.
3170#[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"]
3171#[derive(PartialEq, Debug)]
3172pub struct Driver;
3173
3174#[cfg(feature = "driver")]
3175impl ::fidl_next::HasTransport for Driver {
3176    type Transport = ::fdf_fidl::DriverChannel;
3177}
3178
3179pub mod driver {
3180    pub mod prelude {
3181        pub use crate::{Driver, DriverClientHandler, DriverServerHandler, driver};
3182
3183        pub use crate::natural::DriverStartRequest;
3184
3185        pub use crate::natural::DriverStartResponse;
3186    }
3187
3188    pub struct Start;
3189
3190    impl ::fidl_next::Method for Start {
3191        const ORDINAL: u64 = 2863727161496985794;
3192        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3193            ::fidl_next::protocol::Flexibility::Flexible;
3194
3195        type Protocol = crate::Driver;
3196
3197        type Request = crate::wire::DriverStartRequest<'static>;
3198    }
3199
3200    impl ::fidl_next::TwoWayMethod for Start {
3201        type Response = ::fidl_next::WireFlexibleResult<
3202            'static,
3203            crate::wire::DriverStartResponse,
3204            ::fidl_next::WireI32,
3205        >;
3206    }
3207
3208    impl<___R> ::fidl_next::Respond<___R> for Start {
3209        type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3210
3211        fn respond(response: ___R) -> Self::Output {
3212            ::fidl_next::FlexibleResult::Ok(response)
3213        }
3214    }
3215
3216    impl<___R> ::fidl_next::RespondErr<___R> for Start {
3217        type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3218
3219        fn respond_err(response: ___R) -> Self::Output {
3220            ::fidl_next::FlexibleResult::Err(response)
3221        }
3222    }
3223
3224    pub struct Stop;
3225
3226    impl ::fidl_next::Method for Stop {
3227        const ORDINAL: u64 = 5446759044519003197;
3228        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3229            ::fidl_next::protocol::Flexibility::Flexible;
3230
3231        type Protocol = crate::Driver;
3232
3233        type Request = ();
3234    }
3235
3236    mod ___detail {
3237        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Driver
3238        where
3239            ___T: ::fidl_next::Transport,
3240        {
3241            type Client = DriverClient<___T>;
3242            type Server = DriverServer<___T>;
3243        }
3244
3245        /// The client for the `Driver` protocol.
3246        #[repr(transparent)]
3247        pub struct DriverClient<___T: ::fidl_next::Transport> {
3248            #[allow(dead_code)]
3249            client: ::fidl_next::protocol::Client<___T>,
3250        }
3251
3252        impl<___T> DriverClient<___T>
3253        where
3254            ___T: ::fidl_next::Transport,
3255        {
3256            #[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"]
3257            pub fn start(
3258                &self,
3259
3260                start_args: impl ::fidl_next::Encode<
3261                    crate::wire::DriverStartArgs<'static>,
3262                    <___T as ::fidl_next::Transport>::SendBuffer,
3263                >,
3264            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
3265            where
3266                <___T as ::fidl_next::Transport>::SendBuffer:
3267                    ::fidl_next::encoder::InternalHandleEncoder,
3268                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3269                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3270            {
3271                self.start_with(crate::generic::DriverStartRequest { start_args })
3272            }
3273
3274            #[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"]
3275            pub fn start_with<___R>(
3276                &self,
3277                request: ___R,
3278            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
3279            where
3280                ___R: ::fidl_next::Encode<
3281                        crate::wire::DriverStartRequest<'static>,
3282                        <___T as ::fidl_next::Transport>::SendBuffer,
3283                    >,
3284            {
3285                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3286                    2863727161496985794,
3287                    <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3288                    request,
3289                ))
3290            }
3291
3292            #[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"]
3293            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3294                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3295                    5446759044519003197,
3296                    <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
3297                    (),
3298                ))
3299            }
3300        }
3301
3302        /// The server for the `Driver` protocol.
3303        #[repr(transparent)]
3304        pub struct DriverServer<___T: ::fidl_next::Transport> {
3305            server: ::fidl_next::protocol::Server<___T>,
3306        }
3307
3308        impl<___T> DriverServer<___T> where ___T: ::fidl_next::Transport {}
3309    }
3310}
3311
3312/// A client handler for the Driver protocol.
3313///
3314/// See [`Driver`] for more details.
3315pub trait DriverClientHandler<
3316    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3317    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3318>
3319{
3320    fn on_unknown_interaction(
3321        &mut self,
3322        ordinal: u64,
3323    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3324        ::core::future::ready(())
3325    }
3326}
3327
3328impl<___T> DriverClientHandler<___T> for ::fidl_next::IgnoreEvents
3329where
3330    ___T: ::fidl_next::Transport,
3331{
3332    async fn on_unknown_interaction(&mut self, _: u64) {}
3333}
3334
3335impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Driver
3336where
3337    ___H: DriverClientHandler<___T> + ::core::marker::Send,
3338    ___T: ::fidl_next::Transport,
3339{
3340    async fn on_event(
3341        handler: &mut ___H,
3342        ordinal: u64,
3343        flexibility: ::fidl_next::protocol::Flexibility,
3344        buffer: ___T::RecvBuffer,
3345    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3346        match ordinal {
3347            ordinal => {
3348                handler.on_unknown_interaction(ordinal).await;
3349                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3350                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3351                } else {
3352                    Ok(())
3353                }
3354            }
3355        }
3356    }
3357}
3358
3359/// A server handler for the Driver protocol.
3360///
3361/// See [`Driver`] for more details.
3362pub trait DriverServerHandler<
3363    #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3364    #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3365>
3366{
3367    #[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"]
3368    fn start(
3369        &mut self,
3370
3371        request: ::fidl_next::Request<driver::Start, ___T>,
3372
3373        responder: ::fidl_next::Responder<driver::Start, ___T>,
3374    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3375
3376    #[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"]
3377    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3378
3379    fn on_unknown_interaction(
3380        &mut self,
3381        ordinal: u64,
3382    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3383        ::core::future::ready(())
3384    }
3385}
3386
3387impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Driver
3388where
3389    ___H: DriverServerHandler<___T> + ::core::marker::Send,
3390    ___T: ::fidl_next::Transport,
3391    <driver::Start as ::fidl_next::Method>::Request:
3392        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3393{
3394    async fn on_one_way(
3395        handler: &mut ___H,
3396        ordinal: u64,
3397        flexibility: ::fidl_next::protocol::Flexibility,
3398        buffer: ___T::RecvBuffer,
3399    ) -> ::core::result::Result<
3400        (),
3401        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3402    > {
3403        match ordinal {
3404            5446759044519003197 => {
3405                handler.stop().await;
3406                Ok(())
3407            }
3408
3409            ordinal => {
3410                handler.on_unknown_interaction(ordinal).await;
3411                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3412                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3413                } else {
3414                    Ok(())
3415                }
3416            }
3417        }
3418    }
3419
3420    async fn on_two_way(
3421        handler: &mut ___H,
3422        ordinal: u64,
3423        flexibility: ::fidl_next::protocol::Flexibility,
3424        buffer: ___T::RecvBuffer,
3425        responder: ::fidl_next::protocol::Responder<___T>,
3426    ) -> ::core::result::Result<
3427        (),
3428        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3429    > {
3430        match ordinal {
3431            2863727161496985794 => {
3432                let responder = ::fidl_next::Responder::from_untyped(responder);
3433
3434                match ::fidl_next::DecoderExt::decode(buffer) {
3435                    Ok(decoded) => {
3436                        handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
3437                        Ok(())
3438                    }
3439                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3440                        ordinal: 2863727161496985794,
3441                        error,
3442                    }),
3443                }
3444            }
3445
3446            ordinal => {
3447                handler.on_unknown_interaction(ordinal).await;
3448                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3449                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3450                } else {
3451                    responder
3452                        .respond(
3453                            ordinal,
3454                            flexibility,
3455                            ::fidl_next::Flexible::<()>::FrameworkErr(
3456                                ::fidl_next::FrameworkError::UnknownMethod,
3457                            ),
3458                        )
3459                        .expect("encoding a framework error should never fail")
3460                        .await?;
3461                    Ok(())
3462                }
3463            }
3464        }
3465    }
3466}
3467
3468/// The type corresponding to the Node protocol.
3469#[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"]
3470#[derive(PartialEq, Debug)]
3471pub struct Node;
3472
3473#[cfg(target_os = "fuchsia")]
3474impl ::fidl_next::HasTransport for Node {
3475    type Transport = ::fidl_next::fuchsia::zx::Channel;
3476}
3477
3478pub mod node {
3479    pub mod prelude {
3480        pub use crate::{Node, NodeClientHandler, NodeServerHandler, node};
3481
3482        pub use crate::natural::NodeAddChildRequest;
3483
3484        pub use crate::natural::NodeError;
3485
3486        pub use crate::natural::NodeAddChildResponse;
3487    }
3488
3489    pub struct AddChild;
3490
3491    impl ::fidl_next::Method for AddChild {
3492        const ORDINAL: u64 = 8633697350522413353;
3493        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3494            ::fidl_next::protocol::Flexibility::Flexible;
3495
3496        type Protocol = crate::Node;
3497
3498        type Request = crate::wire::NodeAddChildRequest<'static>;
3499    }
3500
3501    impl ::fidl_next::TwoWayMethod for AddChild {
3502        type Response = ::fidl_next::WireFlexibleResult<
3503            'static,
3504            crate::wire::NodeAddChildResponse,
3505            crate::wire::NodeError,
3506        >;
3507    }
3508
3509    impl<___R> ::fidl_next::Respond<___R> for AddChild {
3510        type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3511
3512        fn respond(response: ___R) -> Self::Output {
3513            ::fidl_next::FlexibleResult::Ok(response)
3514        }
3515    }
3516
3517    impl<___R> ::fidl_next::RespondErr<___R> for AddChild {
3518        type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3519
3520        fn respond_err(response: ___R) -> Self::Output {
3521            ::fidl_next::FlexibleResult::Err(response)
3522        }
3523    }
3524
3525    mod ___detail {
3526        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
3527        where
3528            ___T: ::fidl_next::Transport,
3529        {
3530            type Client = NodeClient<___T>;
3531            type Server = NodeServer<___T>;
3532        }
3533
3534        /// The client for the `Node` protocol.
3535        #[repr(transparent)]
3536        pub struct NodeClient<___T: ::fidl_next::Transport> {
3537            #[allow(dead_code)]
3538            client: ::fidl_next::protocol::Client<___T>,
3539        }
3540
3541        impl<___T> NodeClient<___T>
3542        where
3543            ___T: ::fidl_next::Transport,
3544        {
3545            #[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"]
3546            pub fn add_child(
3547                &self,
3548
3549                args: impl ::fidl_next::Encode<
3550                    crate::wire::NodeAddArgs<'static>,
3551                    <___T as ::fidl_next::Transport>::SendBuffer,
3552                >,
3553
3554                controller: impl ::fidl_next::Encode<
3555                    ::fidl_next::ServerEnd<
3556                        crate::NodeController,
3557                        ::fidl_next::fuchsia::WireChannel,
3558                    >,
3559                    <___T as ::fidl_next::Transport>::SendBuffer,
3560                >,
3561
3562                node: impl ::fidl_next::Encode<
3563                    ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
3564                    <___T as ::fidl_next::Transport>::SendBuffer,
3565                >,
3566            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
3567            where
3568                <___T as ::fidl_next::Transport>::SendBuffer:
3569                    ::fidl_next::encoder::InternalHandleEncoder,
3570                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3571                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3572            {
3573                self.add_child_with(crate::generic::NodeAddChildRequest { args, controller, node })
3574            }
3575
3576            #[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"]
3577            pub fn add_child_with<___R>(
3578                &self,
3579                request: ___R,
3580            ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
3581            where
3582                ___R: ::fidl_next::Encode<
3583                        crate::wire::NodeAddChildRequest<'static>,
3584                        <___T as ::fidl_next::Transport>::SendBuffer,
3585                    >,
3586            {
3587                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3588                    8633697350522413353,
3589                    <super::AddChild as ::fidl_next::Method>::FLEXIBILITY,
3590                    request,
3591                ))
3592            }
3593        }
3594
3595        /// The server for the `Node` protocol.
3596        #[repr(transparent)]
3597        pub struct NodeServer<___T: ::fidl_next::Transport> {
3598            server: ::fidl_next::protocol::Server<___T>,
3599        }
3600
3601        impl<___T> NodeServer<___T> where ___T: ::fidl_next::Transport {}
3602    }
3603}
3604
3605/// A client handler for the Node protocol.
3606///
3607/// See [`Node`] for more details.
3608pub trait NodeClientHandler<
3609    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3610    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3611>
3612{
3613    fn on_unknown_interaction(
3614        &mut self,
3615        ordinal: u64,
3616    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3617        ::core::future::ready(())
3618    }
3619}
3620
3621impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
3622where
3623    ___T: ::fidl_next::Transport,
3624{
3625    async fn on_unknown_interaction(&mut self, _: u64) {}
3626}
3627
3628impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
3629where
3630    ___H: NodeClientHandler<___T> + ::core::marker::Send,
3631    ___T: ::fidl_next::Transport,
3632{
3633    async fn on_event(
3634        handler: &mut ___H,
3635        ordinal: u64,
3636        flexibility: ::fidl_next::protocol::Flexibility,
3637        buffer: ___T::RecvBuffer,
3638    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3639        match ordinal {
3640            ordinal => {
3641                handler.on_unknown_interaction(ordinal).await;
3642                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3643                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3644                } else {
3645                    Ok(())
3646                }
3647            }
3648        }
3649    }
3650}
3651
3652/// A server handler for the Node protocol.
3653///
3654/// See [`Node`] for more details.
3655pub trait NodeServerHandler<
3656    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3657    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3658>
3659{
3660    #[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"]
3661    fn add_child(
3662        &mut self,
3663
3664        request: ::fidl_next::Request<node::AddChild, ___T>,
3665
3666        responder: ::fidl_next::Responder<node::AddChild, ___T>,
3667    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3668
3669    fn on_unknown_interaction(
3670        &mut self,
3671        ordinal: u64,
3672    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3673        ::core::future::ready(())
3674    }
3675}
3676
3677impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
3678where
3679    ___H: NodeServerHandler<___T> + ::core::marker::Send,
3680    ___T: ::fidl_next::Transport,
3681    <node::AddChild as ::fidl_next::Method>::Request:
3682        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3683{
3684    async fn on_one_way(
3685        handler: &mut ___H,
3686        ordinal: u64,
3687        flexibility: ::fidl_next::protocol::Flexibility,
3688        buffer: ___T::RecvBuffer,
3689    ) -> ::core::result::Result<
3690        (),
3691        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3692    > {
3693        match ordinal {
3694            ordinal => {
3695                handler.on_unknown_interaction(ordinal).await;
3696                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3697                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3698                } else {
3699                    Ok(())
3700                }
3701            }
3702        }
3703    }
3704
3705    async fn on_two_way(
3706        handler: &mut ___H,
3707        ordinal: u64,
3708        flexibility: ::fidl_next::protocol::Flexibility,
3709        buffer: ___T::RecvBuffer,
3710        responder: ::fidl_next::protocol::Responder<___T>,
3711    ) -> ::core::result::Result<
3712        (),
3713        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3714    > {
3715        match ordinal {
3716            8633697350522413353 => {
3717                let responder = ::fidl_next::Responder::from_untyped(responder);
3718
3719                match ::fidl_next::DecoderExt::decode(buffer) {
3720                    Ok(decoded) => {
3721                        handler
3722                            .add_child(::fidl_next::Request::from_decoded(decoded), responder)
3723                            .await;
3724                        Ok(())
3725                    }
3726                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3727                        ordinal: 8633697350522413353,
3728                        error,
3729                    }),
3730                }
3731            }
3732
3733            ordinal => {
3734                handler.on_unknown_interaction(ordinal).await;
3735                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3736                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3737                } else {
3738                    responder
3739                        .respond(
3740                            ordinal,
3741                            flexibility,
3742                            ::fidl_next::Flexible::<()>::FrameworkErr(
3743                                ::fidl_next::FrameworkError::UnknownMethod,
3744                            ),
3745                        )
3746                        .expect("encoding a framework error should never fail")
3747                        .await?;
3748                    Ok(())
3749                }
3750            }
3751        }
3752    }
3753}
3754
3755/// The type corresponding to the NodeController protocol.
3756#[doc = " Protocol through which a parent node controls one of its children.\n"]
3757#[derive(PartialEq, Debug)]
3758pub struct NodeController;
3759
3760#[cfg(target_os = "fuchsia")]
3761impl ::fidl_next::HasTransport for NodeController {
3762    type Transport = ::fidl_next::fuchsia::zx::Channel;
3763}
3764
3765pub mod node_controller {
3766    pub mod prelude {
3767        pub use crate::{
3768            NodeController, NodeControllerClientHandler, NodeControllerServerHandler,
3769            node_controller,
3770        };
3771
3772        pub use crate::natural::DriverResult;
3773
3774        pub use crate::natural::NodeControllerOnBindRequest;
3775
3776        pub use crate::natural::NodeControllerRequestBindRequest;
3777
3778        pub use crate::natural::NodeControllerRequestBindResponse;
3779    }
3780
3781    pub struct Remove;
3782
3783    impl ::fidl_next::Method for Remove {
3784        const ORDINAL: u64 = 6123359741742396225;
3785        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3786            ::fidl_next::protocol::Flexibility::Flexible;
3787
3788        type Protocol = crate::NodeController;
3789
3790        type Request = ();
3791    }
3792
3793    pub struct RequestBind;
3794
3795    impl ::fidl_next::Method for RequestBind {
3796        const ORDINAL: u64 = 4735909333556220047;
3797        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3798            ::fidl_next::protocol::Flexibility::Flexible;
3799
3800        type Protocol = crate::NodeController;
3801
3802        type Request = crate::wire::NodeControllerRequestBindRequest<'static>;
3803    }
3804
3805    impl ::fidl_next::TwoWayMethod for RequestBind {
3806        type Response = ::fidl_next::WireFlexibleResult<
3807            'static,
3808            crate::wire::NodeControllerRequestBindResponse,
3809            ::fidl_next::WireI32,
3810        >;
3811    }
3812
3813    impl<___R> ::fidl_next::Respond<___R> for RequestBind {
3814        type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3815
3816        fn respond(response: ___R) -> Self::Output {
3817            ::fidl_next::FlexibleResult::Ok(response)
3818        }
3819    }
3820
3821    impl<___R> ::fidl_next::RespondErr<___R> for RequestBind {
3822        type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3823
3824        fn respond_err(response: ___R) -> Self::Output {
3825            ::fidl_next::FlexibleResult::Err(response)
3826        }
3827    }
3828
3829    pub struct OnBind;
3830
3831    impl ::fidl_next::Method for OnBind {
3832        const ORDINAL: u64 = 5905369594807853098;
3833        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3834            ::fidl_next::protocol::Flexibility::Flexible;
3835
3836        type Protocol = crate::NodeController;
3837
3838        type Request = crate::wire::NodeControllerOnBindRequest<'static>;
3839    }
3840
3841    pub struct WaitForDriver;
3842
3843    impl ::fidl_next::Method for WaitForDriver {
3844        const ORDINAL: u64 = 7635589759067755399;
3845        const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3846            ::fidl_next::protocol::Flexibility::Flexible;
3847
3848        type Protocol = crate::NodeController;
3849
3850        type Request = ();
3851    }
3852
3853    impl ::fidl_next::TwoWayMethod for WaitForDriver {
3854        type Response = ::fidl_next::WireFlexibleResult<
3855            'static,
3856            crate::wire::DriverResult<'static>,
3857            ::fidl_next::WireI32,
3858        >;
3859    }
3860
3861    impl<___R> ::fidl_next::Respond<___R> for WaitForDriver {
3862        type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3863
3864        fn respond(response: ___R) -> Self::Output {
3865            ::fidl_next::FlexibleResult::Ok(response)
3866        }
3867    }
3868
3869    impl<___R> ::fidl_next::RespondErr<___R> for WaitForDriver {
3870        type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3871
3872        fn respond_err(response: ___R) -> Self::Output {
3873            ::fidl_next::FlexibleResult::Err(response)
3874        }
3875    }
3876
3877    mod ___detail {
3878        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeController
3879        where
3880            ___T: ::fidl_next::Transport,
3881        {
3882            type Client = NodeControllerClient<___T>;
3883            type Server = NodeControllerServer<___T>;
3884        }
3885
3886        /// The client for the `NodeController` protocol.
3887        #[repr(transparent)]
3888        pub struct NodeControllerClient<___T: ::fidl_next::Transport> {
3889            #[allow(dead_code)]
3890            client: ::fidl_next::protocol::Client<___T>,
3891        }
3892
3893        impl<___T> NodeControllerClient<___T>
3894        where
3895            ___T: ::fidl_next::Transport,
3896        {
3897            #[doc = " Removes the node and all of its children.\n"]
3898            pub fn remove(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3899                ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3900                    6123359741742396225,
3901                    <super::Remove as ::fidl_next::Method>::FLEXIBILITY,
3902                    (),
3903                ))
3904            }
3905
3906            #[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"]
3907            pub fn request_bind_with<___R>(
3908                &self,
3909                request: ___R,
3910            ) -> ::fidl_next::TwoWayFuture<'_, super::RequestBind, ___T>
3911            where
3912                ___R: ::fidl_next::Encode<
3913                        crate::wire::NodeControllerRequestBindRequest<'static>,
3914                        <___T as ::fidl_next::Transport>::SendBuffer,
3915                    >,
3916            {
3917                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3918                    4735909333556220047,
3919                    <super::RequestBind as ::fidl_next::Method>::FLEXIBILITY,
3920                    request,
3921                ))
3922            }
3923
3924            #[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"]
3925            pub fn wait_for_driver(
3926                &self,
3927            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForDriver, ___T> {
3928                ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3929                    7635589759067755399,
3930                    <super::WaitForDriver as ::fidl_next::Method>::FLEXIBILITY,
3931                    (),
3932                ))
3933            }
3934        }
3935
3936        /// The server for the `NodeController` protocol.
3937        #[repr(transparent)]
3938        pub struct NodeControllerServer<___T: ::fidl_next::Transport> {
3939            server: ::fidl_next::protocol::Server<___T>,
3940        }
3941
3942        impl<___T> NodeControllerServer<___T>
3943        where
3944            ___T: ::fidl_next::Transport,
3945        {
3946            #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
3947
3948            pub fn on_bind_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
3949            where
3950                ___R: ::fidl_next::Encode<
3951                        <super::OnBind as ::fidl_next::Method>::Request,
3952                        <___T as ::fidl_next::Transport>::SendBuffer,
3953                    >,
3954            {
3955                ::fidl_next::SendFuture::from_untyped(self.server.send_event(
3956                    5905369594807853098,
3957                    <super::OnBind as ::fidl_next::Method>::FLEXIBILITY,
3958                    request,
3959                ))
3960            }
3961        }
3962    }
3963}
3964
3965/// A client handler for the NodeController protocol.
3966///
3967/// See [`NodeController`] for more details.
3968pub trait NodeControllerClientHandler<
3969    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3970    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3971>
3972{
3973    #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
3974    fn on_bind(
3975        &mut self,
3976
3977        request: ::fidl_next::Request<node_controller::OnBind, ___T>,
3978    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3979
3980    fn on_unknown_interaction(
3981        &mut self,
3982        ordinal: u64,
3983    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3984        ::core::future::ready(())
3985    }
3986}
3987
3988impl<___T> NodeControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
3989where
3990    ___T: ::fidl_next::Transport,
3991{
3992    async fn on_bind(&mut self, _: ::fidl_next::Request<node_controller::OnBind, ___T>) {}
3993
3994    async fn on_unknown_interaction(&mut self, _: u64) {}
3995}
3996
3997impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeController
3998where
3999    ___H: NodeControllerClientHandler<___T> + ::core::marker::Send,
4000    ___T: ::fidl_next::Transport,
4001    <node_controller::OnBind as ::fidl_next::Method>::Request:
4002        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
4003{
4004    async fn on_event(
4005        handler: &mut ___H,
4006        ordinal: u64,
4007        flexibility: ::fidl_next::protocol::Flexibility,
4008        buffer: ___T::RecvBuffer,
4009    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4010        match ordinal {
4011            5905369594807853098 => match ::fidl_next::DecoderExt::decode(buffer) {
4012                Ok(decoded) => {
4013                    handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
4014                    Ok(())
4015                }
4016                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4017                    ordinal: 5905369594807853098,
4018                    error,
4019                }),
4020            },
4021
4022            ordinal => {
4023                handler.on_unknown_interaction(ordinal).await;
4024                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4025                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4026                } else {
4027                    Ok(())
4028                }
4029            }
4030        }
4031    }
4032}
4033
4034/// A server handler for the NodeController protocol.
4035///
4036/// See [`NodeController`] for more details.
4037pub trait NodeControllerServerHandler<
4038    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4039    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4040>
4041{
4042    #[doc = " Removes the node and all of its children.\n"]
4043    fn remove(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4044
4045    #[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"]
4046    fn request_bind(
4047        &mut self,
4048
4049        request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
4050
4051        responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
4052    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4053
4054    #[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"]
4055    fn wait_for_driver(
4056        &mut self,
4057
4058        responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
4059    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4060
4061    fn on_unknown_interaction(
4062        &mut self,
4063        ordinal: u64,
4064    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4065        ::core::future::ready(())
4066    }
4067}
4068
4069impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeController
4070where
4071    ___H: NodeControllerServerHandler<___T> + ::core::marker::Send,
4072    ___T: ::fidl_next::Transport,
4073    <node_controller::RequestBind as ::fidl_next::Method>::Request:
4074        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
4075{
4076    async fn on_one_way(
4077        handler: &mut ___H,
4078        ordinal: u64,
4079        flexibility: ::fidl_next::protocol::Flexibility,
4080        buffer: ___T::RecvBuffer,
4081    ) -> ::core::result::Result<
4082        (),
4083        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4084    > {
4085        match ordinal {
4086            6123359741742396225 => {
4087                handler.remove().await;
4088                Ok(())
4089            }
4090
4091            ordinal => {
4092                handler.on_unknown_interaction(ordinal).await;
4093                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4094                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4095                } else {
4096                    Ok(())
4097                }
4098            }
4099        }
4100    }
4101
4102    async fn on_two_way(
4103        handler: &mut ___H,
4104        ordinal: u64,
4105        flexibility: ::fidl_next::protocol::Flexibility,
4106        buffer: ___T::RecvBuffer,
4107        responder: ::fidl_next::protocol::Responder<___T>,
4108    ) -> ::core::result::Result<
4109        (),
4110        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4111    > {
4112        match ordinal {
4113            4735909333556220047 => {
4114                let responder = ::fidl_next::Responder::from_untyped(responder);
4115
4116                match ::fidl_next::DecoderExt::decode(buffer) {
4117                    Ok(decoded) => {
4118                        handler
4119                            .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
4120                            .await;
4121                        Ok(())
4122                    }
4123                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4124                        ordinal: 4735909333556220047,
4125                        error,
4126                    }),
4127                }
4128            }
4129
4130            7635589759067755399 => {
4131                let responder = ::fidl_next::Responder::from_untyped(responder);
4132
4133                handler.wait_for_driver(responder).await;
4134                Ok(())
4135            }
4136
4137            ordinal => {
4138                handler.on_unknown_interaction(ordinal).await;
4139                if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4140                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4141                } else {
4142                    responder
4143                        .respond(
4144                            ordinal,
4145                            flexibility,
4146                            ::fidl_next::Flexible::<()>::FrameworkErr(
4147                                ::fidl_next::FrameworkError::UnknownMethod,
4148                            ),
4149                        )
4150                        .expect("encoding a framework error should never fail")
4151                        .await?;
4152                    Ok(())
4153                }
4154            }
4155        }
4156    }
4157}
4158
4159pub use fidl_next_common_fuchsia_driver_framework::*;
4160
4161/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
4162pub mod compat {
4163
4164    pub use fidl_next_common_fuchsia_driver_framework::compat::*;
4165
4166    impl ::fidl_next::CompatFrom<crate::DevfsAddArgs>
4167        for ::fidl_fuchsia_driver_framework::DevfsAddArgs
4168    {
4169        fn compat_from(value: crate::DevfsAddArgs) -> Self {
4170            Self {
4171                connector: ::fidl_next::CompatFrom::compat_from(value.connector),
4172
4173                class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
4174
4175                inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
4176
4177                connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
4178
4179                controller_connector: ::fidl_next::CompatFrom::compat_from(
4180                    value.controller_connector,
4181                ),
4182
4183                __source_breaking: ::fidl::marker::SourceBreaking,
4184            }
4185        }
4186    }
4187
4188    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DevfsAddArgs>
4189        for crate::DevfsAddArgs
4190    {
4191        fn compat_from(value: ::fidl_fuchsia_driver_framework::DevfsAddArgs) -> Self {
4192            Self {
4193                connector: ::fidl_next::CompatFrom::compat_from(value.connector),
4194
4195                class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
4196
4197                inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
4198
4199                connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
4200
4201                controller_connector: ::fidl_next::CompatFrom::compat_from(
4202                    value.controller_connector,
4203                ),
4204            }
4205        }
4206    }
4207
4208    impl ::fidl_next::CompatFrom<crate::PowerElementArgs>
4209        for ::fidl_fuchsia_driver_framework::PowerElementArgs
4210    {
4211        fn compat_from(value: crate::PowerElementArgs) -> Self {
4212            Self {
4213                control_client: ::fidl_next::CompatFrom::compat_from(value.control_client),
4214
4215                runner_server: ::fidl_next::CompatFrom::compat_from(value.runner_server),
4216
4217                lessor_client: ::fidl_next::CompatFrom::compat_from(value.lessor_client),
4218
4219                token: ::fidl_next::CompatFrom::compat_from(value.token),
4220
4221                __source_breaking: ::fidl::marker::SourceBreaking,
4222            }
4223        }
4224    }
4225
4226    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::PowerElementArgs>
4227        for crate::PowerElementArgs
4228    {
4229        fn compat_from(value: ::fidl_fuchsia_driver_framework::PowerElementArgs) -> Self {
4230            Self {
4231                control_client: ::fidl_next::CompatFrom::compat_from(value.control_client),
4232
4233                runner_server: ::fidl_next::CompatFrom::compat_from(value.runner_server),
4234
4235                lessor_client: ::fidl_next::CompatFrom::compat_from(value.lessor_client),
4236
4237                token: ::fidl_next::CompatFrom::compat_from(value.token),
4238            }
4239        }
4240    }
4241
4242    impl ::fidl_next::CompatFrom<crate::DriverStartArgs>
4243        for ::fidl_fuchsia_driver_framework::DriverStartArgs
4244    {
4245        fn compat_from(value: crate::DriverStartArgs) -> Self {
4246            Self {
4247                node: ::fidl_next::CompatFrom::compat_from(value.node),
4248
4249                symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4250
4251                url: ::fidl_next::CompatFrom::compat_from(value.url),
4252
4253                program: ::fidl_next::CompatFrom::compat_from(value.program),
4254
4255                incoming: ::fidl_next::CompatFrom::compat_from(value.incoming),
4256
4257                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
4258
4259                config: ::fidl_next::CompatFrom::compat_from(value.config),
4260
4261                node_name: ::fidl_next::CompatFrom::compat_from(value.node_name),
4262
4263                node_properties: ::fidl_next::CompatFrom::compat_from(value.node_properties),
4264
4265                node_offers: ::fidl_next::CompatFrom::compat_from(value.node_offers),
4266
4267                node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4268
4269                node_properties_2: ::fidl_next::CompatFrom::compat_from(value.node_properties_2),
4270
4271                vmar: ::fidl_next::CompatFrom::compat_from(value.vmar),
4272
4273                power_element_args: ::fidl_next::CompatFrom::compat_from(value.power_element_args),
4274
4275                __source_breaking: ::fidl::marker::SourceBreaking,
4276            }
4277        }
4278    }
4279
4280    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverStartArgs>
4281        for crate::DriverStartArgs
4282    {
4283        fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverStartArgs) -> Self {
4284            Self {
4285                node: ::fidl_next::CompatFrom::compat_from(value.node),
4286
4287                symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4288
4289                url: ::fidl_next::CompatFrom::compat_from(value.url),
4290
4291                program: ::fidl_next::CompatFrom::compat_from(value.program),
4292
4293                incoming: ::fidl_next::CompatFrom::compat_from(value.incoming),
4294
4295                outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
4296
4297                config: ::fidl_next::CompatFrom::compat_from(value.config),
4298
4299                node_name: ::fidl_next::CompatFrom::compat_from(value.node_name),
4300
4301                node_properties: ::fidl_next::CompatFrom::compat_from(value.node_properties),
4302
4303                node_offers: ::fidl_next::CompatFrom::compat_from(value.node_offers),
4304
4305                node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4306
4307                node_properties_2: ::fidl_next::CompatFrom::compat_from(value.node_properties_2),
4308
4309                vmar: ::fidl_next::CompatFrom::compat_from(value.vmar),
4310
4311                power_element_args: ::fidl_next::CompatFrom::compat_from(value.power_element_args),
4312            }
4313        }
4314    }
4315
4316    #[cfg(feature = "driver")]
4317    impl ::fidl_next::CompatFrom<crate::DriverStartRequest>
4318        for ::fidl_fuchsia_driver_framework::DriverStartRequest
4319    {
4320        #[inline]
4321        fn compat_from(value: crate::DriverStartRequest) -> Self {
4322            Self { start_args: ::fidl_next::CompatFrom::compat_from(value.start_args) }
4323        }
4324    }
4325
4326    #[cfg(feature = "driver")]
4327    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverStartRequest>
4328        for crate::DriverStartRequest
4329    {
4330        #[inline]
4331        fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverStartRequest) -> Self {
4332            Self { start_args: ::fidl_next::CompatFrom::compat_from(value.start_args) }
4333        }
4334    }
4335
4336    #[cfg(target_os = "fuchsia")]
4337    /// An alias for a client over `zx::Channel` for the `Driver`
4338    /// protocol.
4339    pub type DriverProxy = ::fidl_next::Client<crate::Driver>;
4340
4341    #[cfg(feature = "driver")]
4342    impl ::fidl_next::CompatFrom<crate::Driver> for ::fidl_fuchsia_driver_framework::DriverMarker {
4343        fn compat_from(_: crate::Driver) -> Self {
4344            Self
4345        }
4346    }
4347
4348    #[cfg(feature = "driver")]
4349    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverMarker> for crate::Driver {
4350        fn compat_from(_: ::fidl_fuchsia_driver_framework::DriverMarker) -> Self {
4351            Self
4352        }
4353    }
4354
4355    impl ::fidl_next::CompatFrom<crate::DriverResult>
4356        for ::fidl_fuchsia_driver_framework::DriverResult
4357    {
4358        fn compat_from(value: crate::DriverResult) -> Self {
4359            match value {
4360                crate::DriverResult::DriverStartedNodeToken(value) => {
4361                    Self::DriverStartedNodeToken(::fidl_next::CompatFrom::compat_from(value))
4362                }
4363
4364                crate::DriverResult::MatchError(value) => {
4365                    Self::MatchError(::fidl_next::CompatFrom::compat_from(value))
4366                }
4367
4368                crate::DriverResult::StartError(value) => {
4369                    Self::StartError(::fidl_next::CompatFrom::compat_from(value))
4370                }
4371
4372                crate::DriverResult::UnknownOrdinal_(unknown_ordinal) => {
4373                    Self::__SourceBreaking { unknown_ordinal }
4374                }
4375            }
4376        }
4377    }
4378
4379    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverResult>
4380        for crate::DriverResult
4381    {
4382        fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverResult) -> Self {
4383            match value {
4384                ::fidl_fuchsia_driver_framework::DriverResult::DriverStartedNodeToken(value) => {
4385                    Self::DriverStartedNodeToken(::fidl_next::CompatFrom::compat_from(value))
4386                }
4387
4388                ::fidl_fuchsia_driver_framework::DriverResult::MatchError(value) => {
4389                    Self::MatchError(::fidl_next::CompatFrom::compat_from(value))
4390                }
4391
4392                ::fidl_fuchsia_driver_framework::DriverResult::StartError(value) => {
4393                    Self::StartError(::fidl_next::CompatFrom::compat_from(value))
4394                }
4395
4396                ::fidl_fuchsia_driver_framework::DriverResult::__SourceBreaking {
4397                    unknown_ordinal,
4398                } => Self::UnknownOrdinal_(unknown_ordinal),
4399            }
4400        }
4401    }
4402
4403    impl ::fidl_next::CompatFrom<crate::NodeAddArgs> for ::fidl_fuchsia_driver_framework::NodeAddArgs {
4404        fn compat_from(value: crate::NodeAddArgs) -> Self {
4405            Self {
4406                name: ::fidl_next::CompatFrom::compat_from(value.name),
4407
4408                symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4409
4410                properties: ::fidl_next::CompatFrom::compat_from(value.properties),
4411
4412                devfs_args: ::fidl_next::CompatFrom::compat_from(value.devfs_args),
4413
4414                offers2: ::fidl_next::CompatFrom::compat_from(value.offers2),
4415
4416                bus_info: ::fidl_next::CompatFrom::compat_from(value.bus_info),
4417
4418                properties2: ::fidl_next::CompatFrom::compat_from(value.properties2),
4419
4420                offers_dictionary: ::fidl_next::CompatFrom::compat_from(value.offers_dictionary),
4421
4422                __source_breaking: ::fidl::marker::SourceBreaking,
4423            }
4424        }
4425    }
4426
4427    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeAddArgs> for crate::NodeAddArgs {
4428        fn compat_from(value: ::fidl_fuchsia_driver_framework::NodeAddArgs) -> Self {
4429            Self {
4430                name: ::fidl_next::CompatFrom::compat_from(value.name),
4431
4432                symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4433
4434                properties: ::fidl_next::CompatFrom::compat_from(value.properties),
4435
4436                devfs_args: ::fidl_next::CompatFrom::compat_from(value.devfs_args),
4437
4438                offers2: ::fidl_next::CompatFrom::compat_from(value.offers2),
4439
4440                bus_info: ::fidl_next::CompatFrom::compat_from(value.bus_info),
4441
4442                properties2: ::fidl_next::CompatFrom::compat_from(value.properties2),
4443
4444                offers_dictionary: ::fidl_next::CompatFrom::compat_from(value.offers_dictionary),
4445            }
4446        }
4447    }
4448
4449    impl ::fidl_next::CompatFrom<crate::NodeAddChildRequest>
4450        for ::fidl_fuchsia_driver_framework::NodeAddChildRequest
4451    {
4452        #[inline]
4453        fn compat_from(value: crate::NodeAddChildRequest) -> Self {
4454            Self {
4455                args: ::fidl_next::CompatFrom::compat_from(value.args),
4456
4457                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4458
4459                node: ::fidl_next::CompatFrom::compat_from(value.node),
4460            }
4461        }
4462    }
4463
4464    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeAddChildRequest>
4465        for crate::NodeAddChildRequest
4466    {
4467        #[inline]
4468        fn compat_from(value: ::fidl_fuchsia_driver_framework::NodeAddChildRequest) -> Self {
4469            Self {
4470                args: ::fidl_next::CompatFrom::compat_from(value.args),
4471
4472                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4473
4474                node: ::fidl_next::CompatFrom::compat_from(value.node),
4475            }
4476        }
4477    }
4478
4479    #[cfg(target_os = "fuchsia")]
4480    /// An alias for a client over `zx::Channel` for the `Node`
4481    /// protocol.
4482    pub type NodeProxy = ::fidl_next::Client<crate::Node>;
4483
4484    impl ::fidl_next::CompatFrom<crate::Node> for ::fidl_fuchsia_driver_framework::NodeMarker {
4485        fn compat_from(_: crate::Node) -> Self {
4486            Self
4487        }
4488    }
4489
4490    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeMarker> for crate::Node {
4491        fn compat_from(_: ::fidl_fuchsia_driver_framework::NodeMarker) -> Self {
4492            Self
4493        }
4494    }
4495
4496    #[cfg(target_os = "fuchsia")]
4497
4498    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_driver_framework::NodeProxy> for crate::Node {
4499        fn client_compat_from(
4500            proxy: ::fidl_fuchsia_driver_framework::NodeProxy,
4501        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4502            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4503            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4504            ::fidl_next::ClientDispatcher::new(client_end)
4505        }
4506    }
4507
4508    impl ::fidl_next::CompatFrom<crate::NodeControllerOnBindRequest>
4509        for ::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest
4510    {
4511        fn compat_from(value: crate::NodeControllerOnBindRequest) -> Self {
4512            Self {
4513                node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4514
4515                __source_breaking: ::fidl::marker::SourceBreaking,
4516            }
4517        }
4518    }
4519
4520    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest>
4521        for crate::NodeControllerOnBindRequest
4522    {
4523        fn compat_from(
4524            value: ::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest,
4525        ) -> Self {
4526            Self { node_token: ::fidl_next::CompatFrom::compat_from(value.node_token) }
4527        }
4528    }
4529
4530    #[cfg(target_os = "fuchsia")]
4531    /// An alias for a client over `zx::Channel` for the `NodeController`
4532    /// protocol.
4533    pub type NodeControllerProxy = ::fidl_next::Client<crate::NodeController>;
4534
4535    impl ::fidl_next::CompatFrom<crate::NodeController>
4536        for ::fidl_fuchsia_driver_framework::NodeControllerMarker
4537    {
4538        fn compat_from(_: crate::NodeController) -> Self {
4539            Self
4540        }
4541    }
4542
4543    impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeControllerMarker>
4544        for crate::NodeController
4545    {
4546        fn compat_from(_: ::fidl_fuchsia_driver_framework::NodeControllerMarker) -> Self {
4547            Self
4548        }
4549    }
4550
4551    #[cfg(target_os = "fuchsia")]
4552
4553    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_driver_framework::NodeControllerProxy>
4554        for crate::NodeController
4555    {
4556        fn client_compat_from(
4557            proxy: ::fidl_fuchsia_driver_framework::NodeControllerProxy,
4558        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4559            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4560            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4561            ::fidl_next::ClientDispatcher::new(client_end)
4562        }
4563    }
4564}