1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_driver_framework::natural::*;
8
9 #[derive(Debug, Default, PartialEq)]
10 pub struct DevfsAddArgs {
11 pub connector: ::core::option::Option<
12 ::fidl_next::ClientEnd<
13 ::fidl_next_fuchsia_device_fs::Connector,
14 ::fidl_next::fuchsia::zx::Channel,
15 >,
16 >,
17
18 pub class_name: ::core::option::Option<::std::string::String>,
19
20 pub inspect: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
21
22 pub connector_supports:
23 ::core::option::Option<::fidl_next_fuchsia_device_fs::natural::ConnectionType>,
24
25 pub controller_connector: ::core::option::Option<
26 ::fidl_next::ClientEnd<
27 ::fidl_next_fuchsia_device_fs::Connector,
28 ::fidl_next::fuchsia::zx::Channel,
29 >,
30 >,
31 }
32
33 impl DevfsAddArgs {
34 fn __max_ordinal(&self) -> usize {
35 if self.controller_connector.is_some() {
36 return 5;
37 }
38
39 if self.connector_supports.is_some() {
40 return 4;
41 }
42
43 if self.inspect.is_some() {
44 return 3;
45 }
46
47 if self.class_name.is_some() {
48 return 2;
49 }
50
51 if self.connector.is_some() {
52 return 1;
53 }
54
55 0
56 }
57 }
58
59 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DevfsAddArgs<'static>, ___E> for DevfsAddArgs
60 where
61 ___E: ::fidl_next::Encoder + ?Sized,
62 ___E: ::fidl_next::fuchsia::HandleEncoder,
63 {
64 #[inline]
65 fn encode(
66 mut self,
67 encoder: &mut ___E,
68 out: &mut ::core::mem::MaybeUninit<crate::wire::DevfsAddArgs<'static>>,
69 _: (),
70 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
71 ::fidl_next::munge!(let crate::wire::DevfsAddArgs { table } = out);
72
73 let max_ord = self.__max_ordinal();
74
75 let mut out = ::core::mem::MaybeUninit::<::fidl_next::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(Debug, Default, PartialEq)]
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(Debug, Default, PartialEq)]
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(Debug, PartialEq)]
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(Debug, PartialEq)]
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(Debug, Default, PartialEq)]
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 pub driver_host: ::core::option::Option<::std::string::String>,
1094 }
1095
1096 impl NodeAddArgs {
1097 fn __max_ordinal(&self) -> usize {
1098 if self.driver_host.is_some() {
1099 return 10;
1100 }
1101
1102 if self.offers_dictionary.is_some() {
1103 return 9;
1104 }
1105
1106 if self.properties2.is_some() {
1107 return 8;
1108 }
1109
1110 if self.bus_info.is_some() {
1111 return 7;
1112 }
1113
1114 if self.offers2.is_some() {
1115 return 6;
1116 }
1117
1118 if self.devfs_args.is_some() {
1119 return 5;
1120 }
1121
1122 if self.properties.is_some() {
1123 return 4;
1124 }
1125
1126 if self.symbols.is_some() {
1127 return 3;
1128 }
1129
1130 if self.name.is_some() {
1131 return 1;
1132 }
1133
1134 0
1135 }
1136 }
1137
1138 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E> for NodeAddArgs
1139 where
1140 ___E: ::fidl_next::Encoder + ?Sized,
1141 ___E: ::fidl_next::fuchsia::HandleEncoder,
1142 {
1143 #[inline]
1144 fn encode(
1145 mut self,
1146 encoder: &mut ___E,
1147 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddArgs<'static>>,
1148 _: (),
1149 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1150 ::fidl_next::munge!(let crate::wire::NodeAddArgs { table } = out);
1151
1152 let max_ord = self.__max_ordinal();
1153
1154 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1155 ::fidl_next::Wire::zero_padding(&mut out);
1156
1157 let mut preallocated =
1158 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1159
1160 for i in 1..=max_ord {
1161 match i {
1162 10 => {
1163 if let Some(value) = self.driver_host.take() {
1164 ::fidl_next::WireEnvelope::encode_value::<
1165 ::fidl_next::WireString<'static>,
1166 ___E,
1167 >(
1168 value, preallocated.encoder, &mut out, 128
1169 )?;
1170 } else {
1171 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1172 }
1173 }
1174
1175 9 => {
1176 if let Some(value) = self.offers_dictionary.take() {
1177 ::fidl_next::WireEnvelope::encode_value::<
1178 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
1179 ___E,
1180 >(
1181 value, preallocated.encoder, &mut out, ()
1182 )?;
1183 } else {
1184 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1185 }
1186 }
1187
1188 8 => {
1189 if let Some(value) = self.properties2.take() {
1190 ::fidl_next::WireEnvelope::encode_value::<
1191 ::fidl_next::WireVector<
1192 'static,
1193 crate::wire::NodeProperty2<'static>,
1194 >,
1195 ___E,
1196 >(
1197 value, preallocated.encoder, &mut out, (64, ())
1198 )?;
1199 } else {
1200 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1201 }
1202 }
1203
1204 7 => {
1205 if let Some(value) = self.bus_info.take() {
1206 ::fidl_next::WireEnvelope::encode_value::<
1207 crate::wire::BusInfo<'static>,
1208 ___E,
1209 >(
1210 value, preallocated.encoder, &mut out, ()
1211 )?;
1212 } else {
1213 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1214 }
1215 }
1216
1217 6 => {
1218 if let Some(value) = self.offers2.take() {
1219 ::fidl_next::WireEnvelope::encode_value::<
1220 ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
1221 ___E,
1222 >(
1223 value, preallocated.encoder, &mut out, (128, ())
1224 )?;
1225 } else {
1226 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1227 }
1228 }
1229
1230 5 => {
1231 if let Some(value) = self.devfs_args.take() {
1232 ::fidl_next::WireEnvelope::encode_value::<
1233 crate::wire::DevfsAddArgs<'static>,
1234 ___E,
1235 >(
1236 value, preallocated.encoder, &mut out, ()
1237 )?;
1238 } else {
1239 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1240 }
1241 }
1242
1243 4 => {
1244 if let Some(value) = self.properties.take() {
1245 ::fidl_next::WireEnvelope::encode_value::<
1246 ::fidl_next::WireVector<
1247 'static,
1248 crate::wire::NodeProperty<'static>,
1249 >,
1250 ___E,
1251 >(
1252 value, preallocated.encoder, &mut out, (64, ())
1253 )?;
1254 } else {
1255 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1256 }
1257 }
1258
1259 3 => {
1260 if let Some(value) = self.symbols.take() {
1261 ::fidl_next::WireEnvelope::encode_value::<
1262 ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
1263 ___E,
1264 >(
1265 value, preallocated.encoder, &mut out, (64, ())
1266 )?;
1267 } else {
1268 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1269 }
1270 }
1271
1272 1 => {
1273 if let Some(value) = self.name.take() {
1274 ::fidl_next::WireEnvelope::encode_value::<
1275 ::fidl_next::WireString<'static>,
1276 ___E,
1277 >(
1278 value, preallocated.encoder, &mut out, 128
1279 )?;
1280 } else {
1281 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1282 }
1283 }
1284
1285 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1286 }
1287 unsafe {
1288 preallocated.write_next(out.assume_init_ref());
1289 }
1290 }
1291
1292 ::fidl_next::WireTable::encode_len(table, max_ord);
1293
1294 Ok(())
1295 }
1296 }
1297
1298 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddArgs<'de>> for NodeAddArgs {
1299 #[inline]
1300 fn from_wire(wire_: crate::wire::NodeAddArgs<'de>) -> Self {
1301 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1302
1303 let name = wire_.table.get(1);
1304
1305 let symbols = wire_.table.get(3);
1306
1307 let properties = wire_.table.get(4);
1308
1309 let devfs_args = wire_.table.get(5);
1310
1311 let offers2 = wire_.table.get(6);
1312
1313 let bus_info = wire_.table.get(7);
1314
1315 let properties2 = wire_.table.get(8);
1316
1317 let offers_dictionary = wire_.table.get(9);
1318
1319 let driver_host = wire_.table.get(10);
1320
1321 Self {
1322
1323
1324 name: name.map(|envelope| ::fidl_next::FromWire::from_wire(
1325 unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
1326 )),
1327
1328
1329 symbols: symbols.map(|envelope| ::fidl_next::FromWire::from_wire(
1330 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>() }
1331 )),
1332
1333
1334 properties: properties.map(|envelope| ::fidl_next::FromWire::from_wire(
1335 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>() }
1336 )),
1337
1338
1339 devfs_args: devfs_args.map(|envelope| ::fidl_next::FromWire::from_wire(
1340 unsafe { envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>() }
1341 )),
1342
1343
1344 offers2: offers2.map(|envelope| ::fidl_next::FromWire::from_wire(
1345 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>() }
1346 )),
1347
1348
1349 bus_info: bus_info.map(|envelope| ::fidl_next::FromWire::from_wire(
1350 unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() }
1351 )),
1352
1353
1354 properties2: properties2.map(|envelope| ::fidl_next::FromWire::from_wire(
1355 unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>() }
1356 )),
1357
1358
1359 offers_dictionary: offers_dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1360 unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>() }
1361 )),
1362
1363
1364 driver_host: driver_host.map(|envelope| ::fidl_next::FromWire::from_wire(
1365 unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() }
1366 )),
1367
1368 }
1369 }
1370 }
1371
1372 #[derive(Debug, PartialEq)]
1373 pub struct NodeAddChildRequest {
1374 pub args: crate::natural::NodeAddArgs,
1375
1376 pub controller:
1377 ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::zx::Channel>,
1378
1379 pub node: ::core::option::Option<
1380 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::zx::Channel>,
1381 >,
1382 }
1383
1384 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
1385 for NodeAddChildRequest
1386 where
1387 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1388 ___E: ::fidl_next::Encoder,
1389 ___E: ::fidl_next::fuchsia::HandleEncoder,
1390 {
1391 #[inline]
1392 fn encode(
1393 self,
1394 encoder_: &mut ___E,
1395 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
1396 _: (),
1397 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1398 ::fidl_next::munge! {
1399 let crate::wire::NodeAddChildRequest {
1400 args,
1401 controller,
1402 node,
1403
1404 } = out_;
1405 }
1406
1407 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
1408
1409 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(args.as_mut_ptr()) };
1410
1411 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
1412
1413 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(controller.as_mut_ptr()) };
1414
1415 ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
1416
1417 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node.as_mut_ptr()) };
1418
1419 Ok(())
1420 }
1421 }
1422
1423 unsafe impl<___E>
1424 ::fidl_next::EncodeOption<
1425 ::fidl_next::WireBox<'static, crate::wire::NodeAddChildRequest<'static>>,
1426 ___E,
1427 > for NodeAddChildRequest
1428 where
1429 ___E: ::fidl_next::Encoder + ?Sized,
1430 NodeAddChildRequest: ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>,
1431 {
1432 #[inline]
1433 fn encode_option(
1434 this: ::core::option::Option<Self>,
1435 encoder: &mut ___E,
1436 out: &mut ::core::mem::MaybeUninit<
1437 ::fidl_next::WireBox<'static, crate::wire::NodeAddChildRequest<'static>>,
1438 >,
1439 _: (),
1440 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1441 if let Some(inner) = this {
1442 ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
1443 ::fidl_next::WireBox::encode_present(out);
1444 } else {
1445 ::fidl_next::WireBox::encode_absent(out);
1446 }
1447
1448 Ok(())
1449 }
1450 }
1451
1452 impl<'de> ::fidl_next::FromWire<crate::wire::NodeAddChildRequest<'de>> for NodeAddChildRequest {
1453 #[inline]
1454 fn from_wire(wire: crate::wire::NodeAddChildRequest<'de>) -> Self {
1455 Self {
1456 args: ::fidl_next::FromWire::from_wire(wire.args),
1457
1458 controller: ::fidl_next::FromWire::from_wire(wire.controller),
1459
1460 node: ::fidl_next::FromWire::from_wire(wire.node),
1461 }
1462 }
1463 }
1464
1465 #[derive(Debug, Default, PartialEq)]
1466 pub struct NodeControllerOnBindRequest {
1467 pub node_token: ::core::option::Option<::fidl_next::fuchsia::zx::Event>,
1468 }
1469
1470 impl NodeControllerOnBindRequest {
1471 fn __max_ordinal(&self) -> usize {
1472 if self.node_token.is_some() {
1473 return 1;
1474 }
1475
1476 0
1477 }
1478 }
1479
1480 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeControllerOnBindRequest<'static>, ___E>
1481 for NodeControllerOnBindRequest
1482 where
1483 ___E: ::fidl_next::Encoder + ?Sized,
1484 ___E: ::fidl_next::fuchsia::HandleEncoder,
1485 {
1486 #[inline]
1487 fn encode(
1488 mut self,
1489 encoder: &mut ___E,
1490 out: &mut ::core::mem::MaybeUninit<crate::wire::NodeControllerOnBindRequest<'static>>,
1491 _: (),
1492 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1493 ::fidl_next::munge!(let crate::wire::NodeControllerOnBindRequest { table } = out);
1494
1495 let max_ord = self.__max_ordinal();
1496
1497 let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1498 ::fidl_next::Wire::zero_padding(&mut out);
1499
1500 let mut preallocated =
1501 ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1502
1503 for i in 1..=max_ord {
1504 match i {
1505 1 => {
1506 if let Some(value) = self.node_token.take() {
1507 ::fidl_next::WireEnvelope::encode_value::<
1508 ::fidl_next::fuchsia::WireEvent,
1509 ___E,
1510 >(
1511 value, preallocated.encoder, &mut out, ()
1512 )?;
1513 } else {
1514 ::fidl_next::WireEnvelope::encode_zero(&mut out)
1515 }
1516 }
1517
1518 _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1519 }
1520 unsafe {
1521 preallocated.write_next(out.assume_init_ref());
1522 }
1523 }
1524
1525 ::fidl_next::WireTable::encode_len(table, max_ord);
1526
1527 Ok(())
1528 }
1529 }
1530
1531 impl<'de> ::fidl_next::FromWire<crate::wire::NodeControllerOnBindRequest<'de>>
1532 for NodeControllerOnBindRequest
1533 {
1534 #[inline]
1535 fn from_wire(wire_: crate::wire::NodeControllerOnBindRequest<'de>) -> Self {
1536 let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1537
1538 let node_token = wire_.table.get(1);
1539
1540 Self {
1541 node_token: node_token.map(|envelope| {
1542 ::fidl_next::FromWire::from_wire(unsafe {
1543 envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1544 })
1545 }),
1546 }
1547 }
1548 }
1549}
1550
1551pub mod wire {
1552
1553 pub use fidl_next_common_fuchsia_driver_framework::wire::*;
1554
1555 #[repr(C)]
1557 pub struct DevfsAddArgs<'de> {
1558 pub(crate) table: ::fidl_next::WireTable<'de>,
1559 }
1560
1561 impl<'de> Drop for DevfsAddArgs<'de> {
1562 fn drop(&mut self) {
1563 let _ = self.table.get(1).map(|envelope| unsafe {
1564 envelope.read_unchecked::<::fidl_next::ClientEnd<
1565 ::fidl_next_fuchsia_device_fs::Connector,
1566 ::fidl_next::fuchsia::WireChannel,
1567 >>()
1568 });
1569
1570 let _ = self.table.get(2).map(|envelope| unsafe {
1571 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1572 });
1573
1574 let _ = self.table.get(3).map(|envelope| unsafe {
1575 envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
1576 });
1577
1578 let _ = self.table.get(4).map(|envelope| unsafe {
1579 envelope.read_unchecked::<::fidl_next_fuchsia_device_fs::wire::ConnectionType>()
1580 });
1581
1582 let _ = self.table.get(5).map(|envelope| unsafe {
1583 envelope.read_unchecked::<::fidl_next::ClientEnd<
1584 ::fidl_next_fuchsia_device_fs::Connector,
1585 ::fidl_next::fuchsia::WireChannel,
1586 >>()
1587 });
1588 }
1589 }
1590
1591 unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
1592 type Owned<'de> = DevfsAddArgs<'de>;
1593
1594 #[inline]
1595 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1596 ::fidl_next::munge!(let Self { table } = out);
1597 ::fidl_next::WireTable::zero_padding(table);
1598 }
1599 }
1600
1601 unsafe impl<___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'static>
1602 where
1603 ___D: ::fidl_next::Decoder + ?Sized,
1604 ___D: ::fidl_next::fuchsia::HandleDecoder,
1605 {
1606 fn decode(
1607 slot: ::fidl_next::Slot<'_, Self>,
1608 decoder: &mut ___D,
1609 _: (),
1610 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1611 ::fidl_next::munge!(let Self { table } = slot);
1612
1613 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1614 match ordinal {
1615 0 => unsafe { ::core::hint::unreachable_unchecked() },
1616
1617 1 => {
1618 ::fidl_next::WireEnvelope::decode_as::<
1619 ___D,
1620 ::fidl_next::ClientEnd<
1621 ::fidl_next_fuchsia_device_fs::Connector,
1622 ::fidl_next::fuchsia::WireChannel,
1623 >,
1624 >(slot.as_mut(), decoder, ())?;
1625
1626 Ok(())
1627 }
1628
1629 2 => {
1630 ::fidl_next::WireEnvelope::decode_as::<
1631 ___D,
1632 ::fidl_next::WireString<'static>,
1633 >(slot.as_mut(), decoder, 255)?;
1634
1635 let value = unsafe {
1636 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1637 };
1638
1639 if value.len() > 255 {
1640 return Err(::fidl_next::DecodeError::VectorTooLong {
1641 size: value.len() as u64,
1642 limit: 255,
1643 });
1644 }
1645
1646 Ok(())
1647 }
1648
1649 3 => {
1650 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmo>(
1651 slot.as_mut(),
1652 decoder,
1653 (),
1654 )?;
1655
1656 Ok(())
1657 }
1658
1659 4 => {
1660 ::fidl_next::WireEnvelope::decode_as::<
1661 ___D,
1662 ::fidl_next_fuchsia_device_fs::wire::ConnectionType,
1663 >(slot.as_mut(), decoder, ())?;
1664
1665 Ok(())
1666 }
1667
1668 5 => {
1669 ::fidl_next::WireEnvelope::decode_as::<
1670 ___D,
1671 ::fidl_next::ClientEnd<
1672 ::fidl_next_fuchsia_device_fs::Connector,
1673 ::fidl_next::fuchsia::WireChannel,
1674 >,
1675 >(slot.as_mut(), decoder, ())?;
1676
1677 Ok(())
1678 }
1679
1680 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1681 }
1682 })
1683 }
1684 }
1685
1686 impl<'de> DevfsAddArgs<'de> {
1687 pub fn connector(
1688 &self,
1689 ) -> ::core::option::Option<
1690 &::fidl_next::ClientEnd<
1691 ::fidl_next_fuchsia_device_fs::Connector,
1692 ::fidl_next::fuchsia::WireChannel,
1693 >,
1694 > {
1695 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1696 }
1697
1698 pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
1699 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1700 }
1701
1702 pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmo> {
1703 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1704 }
1705
1706 pub fn connector_supports(
1707 &self,
1708 ) -> ::core::option::Option<&::fidl_next_fuchsia_device_fs::wire::ConnectionType> {
1709 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1710 }
1711
1712 pub fn controller_connector(
1713 &self,
1714 ) -> ::core::option::Option<
1715 &::fidl_next::ClientEnd<
1716 ::fidl_next_fuchsia_device_fs::Connector,
1717 ::fidl_next::fuchsia::WireChannel,
1718 >,
1719 > {
1720 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
1721 }
1722 }
1723
1724 impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
1725 fn fmt(
1726 &self,
1727 f: &mut ::core::fmt::Formatter<'_>,
1728 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1729 f.debug_struct("DevfsAddArgs")
1730 .field("connector", &self.connector())
1731 .field("class_name", &self.class_name())
1732 .field("inspect", &self.inspect())
1733 .field("connector_supports", &self.connector_supports())
1734 .field("controller_connector", &self.controller_connector())
1735 .finish()
1736 }
1737 }
1738
1739 impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
1740 type Natural = crate::natural::DevfsAddArgs;
1741 }
1742
1743 impl ::fidl_next::Unconstrained for DevfsAddArgs<'_> {}
1744
1745 #[repr(C)]
1747 pub struct PowerElementArgs<'de> {
1748 pub(crate) table: ::fidl_next::WireTable<'de>,
1749 }
1750
1751 impl<'de> Drop for PowerElementArgs<'de> {
1752 fn drop(&mut self) {
1753 let _ = self.table.get(1).map(|envelope| unsafe {
1754 envelope.read_unchecked::<::fidl_next::ClientEnd<
1755 ::fidl_next_fuchsia_power_broker::ElementControl,
1756 ::fidl_next::fuchsia::WireChannel,
1757 >>()
1758 });
1759
1760 let _ = self.table.get(2).map(|envelope| unsafe {
1761 envelope.read_unchecked::<::fidl_next::ServerEnd<
1762 ::fidl_next_fuchsia_power_broker::ElementRunner,
1763 ::fidl_next::fuchsia::WireChannel,
1764 >>()
1765 });
1766
1767 let _ = self.table.get(3).map(|envelope| unsafe {
1768 envelope.read_unchecked::<::fidl_next::ClientEnd<
1769 ::fidl_next_fuchsia_power_broker::Lessor,
1770 ::fidl_next::fuchsia::WireChannel,
1771 >>()
1772 });
1773
1774 let _ = self.table.get(4).map(|envelope| unsafe {
1775 envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1776 });
1777 }
1778 }
1779
1780 unsafe impl ::fidl_next::Wire for PowerElementArgs<'static> {
1781 type Owned<'de> = PowerElementArgs<'de>;
1782
1783 #[inline]
1784 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1785 ::fidl_next::munge!(let Self { table } = out);
1786 ::fidl_next::WireTable::zero_padding(table);
1787 }
1788 }
1789
1790 unsafe impl<___D> ::fidl_next::Decode<___D> for PowerElementArgs<'static>
1791 where
1792 ___D: ::fidl_next::Decoder + ?Sized,
1793 ___D: ::fidl_next::fuchsia::HandleDecoder,
1794 {
1795 fn decode(
1796 slot: ::fidl_next::Slot<'_, Self>,
1797 decoder: &mut ___D,
1798 _: (),
1799 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1800 ::fidl_next::munge!(let Self { table } = slot);
1801
1802 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1803 match ordinal {
1804 0 => unsafe { ::core::hint::unreachable_unchecked() },
1805
1806 1 => {
1807 ::fidl_next::WireEnvelope::decode_as::<
1808 ___D,
1809 ::fidl_next::ClientEnd<
1810 ::fidl_next_fuchsia_power_broker::ElementControl,
1811 ::fidl_next::fuchsia::WireChannel,
1812 >,
1813 >(slot.as_mut(), decoder, ())?;
1814
1815 Ok(())
1816 }
1817
1818 2 => {
1819 ::fidl_next::WireEnvelope::decode_as::<
1820 ___D,
1821 ::fidl_next::ServerEnd<
1822 ::fidl_next_fuchsia_power_broker::ElementRunner,
1823 ::fidl_next::fuchsia::WireChannel,
1824 >,
1825 >(slot.as_mut(), decoder, ())?;
1826
1827 Ok(())
1828 }
1829
1830 3 => {
1831 ::fidl_next::WireEnvelope::decode_as::<
1832 ___D,
1833 ::fidl_next::ClientEnd<
1834 ::fidl_next_fuchsia_power_broker::Lessor,
1835 ::fidl_next::fuchsia::WireChannel,
1836 >,
1837 >(slot.as_mut(), decoder, ())?;
1838
1839 Ok(())
1840 }
1841
1842 4 => {
1843 ::fidl_next::WireEnvelope::decode_as::<
1844 ___D,
1845 ::fidl_next::fuchsia::WireEvent,
1846 >(slot.as_mut(), decoder, ())?;
1847
1848 Ok(())
1849 }
1850
1851 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1852 }
1853 })
1854 }
1855 }
1856
1857 impl<'de> PowerElementArgs<'de> {
1858 pub fn control_client(
1859 &self,
1860 ) -> ::core::option::Option<
1861 &::fidl_next::ClientEnd<
1862 ::fidl_next_fuchsia_power_broker::ElementControl,
1863 ::fidl_next::fuchsia::WireChannel,
1864 >,
1865 > {
1866 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1867 }
1868
1869 pub fn runner_server(
1870 &self,
1871 ) -> ::core::option::Option<
1872 &::fidl_next::ServerEnd<
1873 ::fidl_next_fuchsia_power_broker::ElementRunner,
1874 ::fidl_next::fuchsia::WireChannel,
1875 >,
1876 > {
1877 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1878 }
1879
1880 pub fn lessor_client(
1881 &self,
1882 ) -> ::core::option::Option<
1883 &::fidl_next::ClientEnd<
1884 ::fidl_next_fuchsia_power_broker::Lessor,
1885 ::fidl_next::fuchsia::WireChannel,
1886 >,
1887 > {
1888 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1889 }
1890
1891 pub fn token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
1892 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
1893 }
1894 }
1895
1896 impl<'de> ::core::fmt::Debug for PowerElementArgs<'de> {
1897 fn fmt(
1898 &self,
1899 f: &mut ::core::fmt::Formatter<'_>,
1900 ) -> ::core::result::Result<(), ::core::fmt::Error> {
1901 f.debug_struct("PowerElementArgs")
1902 .field("control_client", &self.control_client())
1903 .field("runner_server", &self.runner_server())
1904 .field("lessor_client", &self.lessor_client())
1905 .field("token", &self.token())
1906 .finish()
1907 }
1908 }
1909
1910 impl<'de> ::fidl_next::IntoNatural for PowerElementArgs<'de> {
1911 type Natural = crate::natural::PowerElementArgs;
1912 }
1913
1914 impl ::fidl_next::Unconstrained for PowerElementArgs<'_> {}
1915
1916 #[repr(C)]
1918 pub struct DriverStartArgs<'de> {
1919 pub(crate) table: ::fidl_next::WireTable<'de>,
1920 }
1921
1922 impl<'de> Drop for DriverStartArgs<'de> {
1923 fn drop(&mut self) {
1924 let _ = self.table.get(1)
1925 .map(|envelope| unsafe {
1926 envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>>()
1927 });
1928
1929 let _ = self.table.get(2)
1930 .map(|envelope| unsafe {
1931 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>()
1932 });
1933
1934 let _ = self.table.get(3).map(|envelope| unsafe {
1935 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1936 });
1937
1938 let _ = self.table.get(4).map(|envelope| unsafe {
1939 envelope.read_unchecked::<::fidl_next_fuchsia_data::wire::Dictionary<'de>>()
1940 });
1941
1942 let _ = self.table.get(5).map(|envelope| unsafe {
1943 envelope.read_unchecked::<::fidl_next::WireVector<
1944 'de,
1945 ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
1946 >>()
1947 });
1948
1949 let _ = self.table.get(6).map(|envelope| unsafe {
1950 envelope.read_unchecked::<::fidl_next::ServerEnd<
1951 ::fidl_next_fuchsia_io::Directory,
1952 ::fidl_next::fuchsia::WireChannel,
1953 >>()
1954 });
1955
1956 let _ = self.table.get(7).map(|envelope| unsafe {
1957 envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
1958 });
1959
1960 let _ = self.table.get(8).map(|envelope| unsafe {
1961 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1962 });
1963
1964 let _ = self.table.get(9)
1965 .map(|envelope| unsafe {
1966 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry<'de>>>()
1967 });
1968
1969 let _ = self.table.get(10).map(|envelope| unsafe {
1970 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>()
1971 });
1972
1973 let _ = self.table.get(11).map(|envelope| unsafe {
1974 envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
1975 });
1976
1977 let _ = self.table.get(12)
1978 .map(|envelope| unsafe {
1979 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry2<'de>>>()
1980 });
1981
1982 let _ = self.table.get(13).map(|envelope| unsafe {
1983 envelope.read_unchecked::<::fidl_next::fuchsia::WireVmar>()
1984 });
1985
1986 let _ = self.table.get(14).map(|envelope| unsafe {
1987 envelope.read_unchecked::<crate::wire::PowerElementArgs<'de>>()
1988 });
1989 }
1990 }
1991
1992 unsafe impl ::fidl_next::Wire for DriverStartArgs<'static> {
1993 type Owned<'de> = DriverStartArgs<'de>;
1994
1995 #[inline]
1996 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1997 ::fidl_next::munge!(let Self { table } = out);
1998 ::fidl_next::WireTable::zero_padding(table);
1999 }
2000 }
2001
2002 unsafe impl<___D> ::fidl_next::Decode<___D> for DriverStartArgs<'static>
2003 where
2004 ___D: ::fidl_next::Decoder + ?Sized,
2005 ___D: ::fidl_next::fuchsia::HandleDecoder,
2006 {
2007 fn decode(
2008 slot: ::fidl_next::Slot<'_, Self>,
2009 decoder: &mut ___D,
2010 _: (),
2011 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2012 ::fidl_next::munge!(let Self { table } = slot);
2013
2014 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2015 match ordinal {
2016 0 => unsafe { ::core::hint::unreachable_unchecked() },
2017
2018 1 => {
2019 ::fidl_next::WireEnvelope::decode_as::<
2020 ___D,
2021 ::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>,
2022 >(slot.as_mut(), decoder, ())?;
2023
2024 Ok(())
2025 }
2026
2027 2 => {
2028 ::fidl_next::WireEnvelope::decode_as::<
2029 ___D,
2030 ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
2031 >(slot.as_mut(), decoder, (64, ()))?;
2032
2033 let value = unsafe {
2034 slot
2035 .deref_unchecked()
2036 .deref_unchecked::<
2037 ::fidl_next::WireVector<'_, crate::wire::NodeSymbol<'_>>
2038 >()
2039 };
2040
2041 if value.len() > 64 {
2042 return Err(::fidl_next::DecodeError::VectorTooLong {
2043 size: value.len() as u64,
2044 limit: 64,
2045 });
2046 }
2047
2048 Ok(())
2049 }
2050
2051 3 => {
2052 ::fidl_next::WireEnvelope::decode_as::<
2053 ___D,
2054 ::fidl_next::WireString<'static>,
2055 >(slot.as_mut(), decoder, 4096)?;
2056
2057 let value = unsafe {
2058 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2059 };
2060
2061 if value.len() > 4096 {
2062 return Err(::fidl_next::DecodeError::VectorTooLong {
2063 size: value.len() as u64,
2064 limit: 4096,
2065 });
2066 }
2067
2068 Ok(())
2069 }
2070
2071 4 => {
2072 ::fidl_next::WireEnvelope::decode_as::<
2073 ___D,
2074 ::fidl_next_fuchsia_data::wire::Dictionary<'static>,
2075 >(slot.as_mut(), decoder, ())?;
2076
2077 Ok(())
2078 }
2079
2080 5 => {
2081 ::fidl_next::WireEnvelope::decode_as::<
2082 ___D,
2083 ::fidl_next::WireVector<
2084 'static,
2085 ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2086 'static,
2087 >,
2088 >,
2089 >(slot.as_mut(), decoder, (32, ()))?;
2090
2091 let value = unsafe {
2092 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2093 '_,
2094 ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<
2095 '_,
2096 >,
2097 >>()
2098 };
2099
2100 if value.len() > 32 {
2101 return Err(::fidl_next::DecodeError::VectorTooLong {
2102 size: value.len() as u64,
2103 limit: 32,
2104 });
2105 }
2106
2107 Ok(())
2108 }
2109
2110 6 => {
2111 ::fidl_next::WireEnvelope::decode_as::<
2112 ___D,
2113 ::fidl_next::ServerEnd<
2114 ::fidl_next_fuchsia_io::Directory,
2115 ::fidl_next::fuchsia::WireChannel,
2116 >,
2117 >(slot.as_mut(), decoder, ())?;
2118
2119 Ok(())
2120 }
2121
2122 7 => {
2123 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmo>(
2124 slot.as_mut(),
2125 decoder,
2126 (),
2127 )?;
2128
2129 Ok(())
2130 }
2131
2132 8 => {
2133 ::fidl_next::WireEnvelope::decode_as::<
2134 ___D,
2135 ::fidl_next::WireString<'static>,
2136 >(slot.as_mut(), decoder, 4294967295)?;
2137
2138 Ok(())
2139 }
2140
2141 9 => {
2142 ::fidl_next::WireEnvelope::decode_as::<
2143 ___D,
2144 ::fidl_next::WireVector<
2145 'static,
2146 crate::wire::NodePropertyEntry<'static>,
2147 >,
2148 >(slot.as_mut(), decoder, (4294967295, ()))?;
2149
2150 Ok(())
2151 }
2152
2153 10 => {
2154 ::fidl_next::WireEnvelope::decode_as::<
2155 ___D,
2156 ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
2157 >(slot.as_mut(), decoder, (128, ()))?;
2158
2159 let value = unsafe {
2160 slot
2161 .deref_unchecked()
2162 .deref_unchecked::<
2163 ::fidl_next::WireVector<'_, crate::wire::Offer<'_>>
2164 >()
2165 };
2166
2167 if value.len() > 128 {
2168 return Err(::fidl_next::DecodeError::VectorTooLong {
2169 size: value.len() as u64,
2170 limit: 128,
2171 });
2172 }
2173
2174 Ok(())
2175 }
2176
2177 11 => {
2178 ::fidl_next::WireEnvelope::decode_as::<
2179 ___D,
2180 ::fidl_next::fuchsia::WireEvent,
2181 >(slot.as_mut(), decoder, ())?;
2182
2183 Ok(())
2184 }
2185
2186 12 => {
2187 ::fidl_next::WireEnvelope::decode_as::<
2188 ___D,
2189 ::fidl_next::WireVector<
2190 'static,
2191 crate::wire::NodePropertyEntry2<'static>,
2192 >,
2193 >(slot.as_mut(), decoder, (4294967295, ()))?;
2194
2195 Ok(())
2196 }
2197
2198 13 => {
2199 ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmar>(
2200 slot.as_mut(),
2201 decoder,
2202 (),
2203 )?;
2204
2205 Ok(())
2206 }
2207
2208 14 => {
2209 ::fidl_next::WireEnvelope::decode_as::<
2210 ___D,
2211 crate::wire::PowerElementArgs<'static>,
2212 >(slot.as_mut(), decoder, ())?;
2213
2214 Ok(())
2215 }
2216
2217 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2218 }
2219 })
2220 }
2221 }
2222
2223 impl<'de> DriverStartArgs<'de> {
2224 pub fn node(
2225 &self,
2226 ) -> ::core::option::Option<
2227 &::fidl_next::ClientEnd<crate::Node, ::fidl_next::fuchsia::WireChannel>,
2228 > {
2229 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2230 }
2231
2232 pub fn symbols(
2233 &self,
2234 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>
2235 {
2236 unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2237 }
2238
2239 pub fn url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2240 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2241 }
2242
2243 pub fn program(
2244 &self,
2245 ) -> ::core::option::Option<&::fidl_next_fuchsia_data::wire::Dictionary<'de>> {
2246 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2247 }
2248
2249 pub fn incoming(
2250 &self,
2251 ) -> ::core::option::Option<
2252 &::fidl_next::WireVector<
2253 'de,
2254 ::fidl_next_fuchsia_component_runner::wire::ComponentNamespaceEntry<'de>,
2255 >,
2256 > {
2257 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2258 }
2259
2260 pub fn outgoing_dir(
2261 &self,
2262 ) -> ::core::option::Option<
2263 &::fidl_next::ServerEnd<
2264 ::fidl_next_fuchsia_io::Directory,
2265 ::fidl_next::fuchsia::WireChannel,
2266 >,
2267 > {
2268 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2269 }
2270
2271 pub fn config(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmo> {
2272 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2273 }
2274
2275 pub fn node_name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2276 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2277 }
2278
2279 pub fn node_properties(
2280 &self,
2281 ) -> ::core::option::Option<
2282 &::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry<'de>>,
2283 > {
2284 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2285 }
2286
2287 pub fn node_offers(
2288 &self,
2289 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>
2290 {
2291 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2292 }
2293
2294 pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
2295 unsafe { Some(self.table.get(11)?.deref_unchecked()) }
2296 }
2297
2298 pub fn node_properties_2(
2299 &self,
2300 ) -> ::core::option::Option<
2301 &::fidl_next::WireVector<'de, crate::wire::NodePropertyEntry2<'de>>,
2302 > {
2303 unsafe { Some(self.table.get(12)?.deref_unchecked()) }
2304 }
2305
2306 pub fn vmar(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmar> {
2307 unsafe { Some(self.table.get(13)?.deref_unchecked()) }
2308 }
2309
2310 pub fn power_element_args(
2311 &self,
2312 ) -> ::core::option::Option<&crate::wire::PowerElementArgs<'de>> {
2313 unsafe { Some(self.table.get(14)?.deref_unchecked()) }
2314 }
2315 }
2316
2317 impl<'de> ::core::fmt::Debug for DriverStartArgs<'de> {
2318 fn fmt(
2319 &self,
2320 f: &mut ::core::fmt::Formatter<'_>,
2321 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2322 f.debug_struct("DriverStartArgs")
2323 .field("node", &self.node())
2324 .field("symbols", &self.symbols())
2325 .field("url", &self.url())
2326 .field("program", &self.program())
2327 .field("incoming", &self.incoming())
2328 .field("outgoing_dir", &self.outgoing_dir())
2329 .field("config", &self.config())
2330 .field("node_name", &self.node_name())
2331 .field("node_properties", &self.node_properties())
2332 .field("node_offers", &self.node_offers())
2333 .field("node_token", &self.node_token())
2334 .field("node_properties_2", &self.node_properties_2())
2335 .field("vmar", &self.vmar())
2336 .field("power_element_args", &self.power_element_args())
2337 .finish()
2338 }
2339 }
2340
2341 impl<'de> ::fidl_next::IntoNatural for DriverStartArgs<'de> {
2342 type Natural = crate::natural::DriverStartArgs;
2343 }
2344
2345 impl ::fidl_next::Unconstrained for DriverStartArgs<'_> {}
2346
2347 #[derive(Debug)]
2349 #[repr(C)]
2350 pub struct DriverStartRequest<'de> {
2351 pub start_args: crate::wire::DriverStartArgs<'de>,
2352 }
2353
2354 static_assertions::const_assert_eq!(std::mem::size_of::<DriverStartRequest<'_>>(), 16);
2355 static_assertions::const_assert_eq!(std::mem::align_of::<DriverStartRequest<'_>>(), 8);
2356
2357 static_assertions::const_assert_eq!(
2358 std::mem::offset_of!(DriverStartRequest<'_>, start_args),
2359 0
2360 );
2361
2362 unsafe impl ::fidl_next::Wire for DriverStartRequest<'static> {
2363 type Owned<'de> = DriverStartRequest<'de>;
2364
2365 #[inline]
2366 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2367 ::fidl_next::munge! {
2368 let Self {
2369
2370 start_args,
2371
2372 } = &mut *out_;
2373 }
2374
2375 ::fidl_next::Wire::zero_padding(start_args);
2376 }
2377 }
2378
2379 unsafe impl<___D> ::fidl_next::Decode<___D> for DriverStartRequest<'static>
2380 where
2381 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2382 ___D: ::fidl_next::Decoder,
2383 ___D: ::fidl_next::fuchsia::HandleDecoder,
2384 {
2385 fn decode(
2386 slot_: ::fidl_next::Slot<'_, Self>,
2387 decoder_: &mut ___D,
2388 _: (),
2389 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2390 ::fidl_next::munge! {
2391 let Self {
2392
2393 mut start_args,
2394
2395 } = slot_;
2396 }
2397
2398 let _field = start_args.as_mut();
2399
2400 ::fidl_next::Decode::decode(start_args.as_mut(), decoder_, ())?;
2401
2402 Ok(())
2403 }
2404 }
2405
2406 impl<'de> ::fidl_next::IntoNatural for DriverStartRequest<'de> {
2407 type Natural = crate::natural::DriverStartRequest;
2408 }
2409
2410 impl ::fidl_next::Unconstrained for DriverStartRequest<'static> {}
2411
2412 #[repr(transparent)]
2414 pub struct DriverResult<'de> {
2415 pub(crate) raw: ::fidl_next::RawWireUnion,
2416 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2417 }
2418
2419 impl<'de> Drop for DriverResult<'de> {
2420 fn drop(&mut self) {
2421 match self.raw.ordinal() {
2422 1 => {
2423 let _ = unsafe {
2424 self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2425 };
2426 }
2427
2428 2 => {
2429 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
2430 }
2431
2432 3 => {
2433 let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI32>() };
2434 }
2435
2436 _ => (),
2437 }
2438 }
2439 }
2440
2441 unsafe impl ::fidl_next::Wire for DriverResult<'static> {
2442 type Owned<'de> = DriverResult<'de>;
2443
2444 #[inline]
2445 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2446 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2447 ::fidl_next::RawWireUnion::zero_padding(raw);
2448 }
2449 }
2450
2451 pub mod driver_result {
2452 pub enum Ref<'de> {
2453 DriverStartedNodeToken(&'de ::fidl_next::fuchsia::WireEvent),
2454
2455 MatchError(&'de ::fidl_next::WireI32),
2456
2457 StartError(&'de ::fidl_next::WireI32),
2458
2459 UnknownOrdinal_(u64),
2460 }
2461 }
2462
2463 impl<'de> DriverResult<'de> {
2464 pub fn as_ref(&self) -> crate::wire::driver_result::Ref<'_> {
2465 match self.raw.ordinal() {
2466 1 => crate::wire::driver_result::Ref::DriverStartedNodeToken(unsafe {
2467 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireEvent>()
2468 }),
2469
2470 2 => crate::wire::driver_result::Ref::MatchError(unsafe {
2471 self.raw.get().deref_unchecked::<::fidl_next::WireI32>()
2472 }),
2473
2474 3 => crate::wire::driver_result::Ref::StartError(unsafe {
2475 self.raw.get().deref_unchecked::<::fidl_next::WireI32>()
2476 }),
2477
2478 unknown => crate::wire::driver_result::Ref::UnknownOrdinal_(unknown),
2479 }
2480 }
2481 }
2482
2483 unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResult<'static>
2484 where
2485 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2486 ___D: ::fidl_next::Decoder,
2487 ___D: ::fidl_next::fuchsia::HandleDecoder,
2488 {
2489 fn decode(
2490 mut slot: ::fidl_next::Slot<'_, Self>,
2491 decoder: &mut ___D,
2492 _: (),
2493 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2494 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
2495 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
2496 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireEvent>(
2497 raw,
2498 decoder,
2499 (),
2500 )?,
2501
2502 2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
2503 raw,
2504 decoder,
2505 (),
2506 )?,
2507
2508 3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
2509 raw,
2510 decoder,
2511 (),
2512 )?,
2513
2514 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
2515 }
2516
2517 Ok(())
2518 }
2519 }
2520
2521 impl<'de> ::core::fmt::Debug for DriverResult<'de> {
2522 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
2523 match self.raw.ordinal() {
2524 1 => unsafe {
2525 self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireEvent>().fmt(f)
2526 },
2527 2 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
2528 3 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI32>().fmt(f) },
2529 _ => unsafe { ::core::hint::unreachable_unchecked() },
2530 }
2531 }
2532 }
2533
2534 impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
2535 type Natural = crate::natural::DriverResult;
2536 }
2537
2538 impl ::fidl_next::Unconstrained for DriverResult<'static> {}
2539
2540 #[repr(C)]
2542 pub struct NodeAddArgs<'de> {
2543 pub(crate) table: ::fidl_next::WireTable<'de>,
2544 }
2545
2546 impl<'de> Drop for NodeAddArgs<'de> {
2547 fn drop(&mut self) {
2548 let _ = self.table.get(1).map(|envelope| unsafe {
2549 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2550 });
2551
2552 let _ = self.table.get(3)
2553 .map(|envelope| unsafe {
2554 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>()
2555 });
2556
2557 let _ = self.table.get(4).map(|envelope| unsafe {
2558 envelope
2559 .read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>(
2560 )
2561 });
2562
2563 let _ = self.table.get(5).map(|envelope| unsafe {
2564 envelope.read_unchecked::<crate::wire::DevfsAddArgs<'de>>()
2565 });
2566
2567 let _ = self.table.get(6).map(|envelope| unsafe {
2568 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>()
2569 });
2570
2571 let _ = self
2572 .table
2573 .get(7)
2574 .map(|envelope| unsafe { envelope.read_unchecked::<crate::wire::BusInfo<'de>>() });
2575
2576 let _ = self.table.get(8)
2577 .map(|envelope| unsafe {
2578 envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>()
2579 });
2580
2581 let _ = self.table.get(9)
2582 .map(|envelope| unsafe {
2583 envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>()
2584 });
2585
2586 let _ = self.table.get(10).map(|envelope| unsafe {
2587 envelope.read_unchecked::<::fidl_next::WireString<'de>>()
2588 });
2589 }
2590 }
2591
2592 unsafe impl ::fidl_next::Wire for NodeAddArgs<'static> {
2593 type Owned<'de> = NodeAddArgs<'de>;
2594
2595 #[inline]
2596 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2597 ::fidl_next::munge!(let Self { table } = out);
2598 ::fidl_next::WireTable::zero_padding(table);
2599 }
2600 }
2601
2602 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAddArgs<'static>
2603 where
2604 ___D: ::fidl_next::Decoder + ?Sized,
2605 ___D: ::fidl_next::fuchsia::HandleDecoder,
2606 {
2607 fn decode(
2608 slot: ::fidl_next::Slot<'_, Self>,
2609 decoder: &mut ___D,
2610 _: (),
2611 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2612 ::fidl_next::munge!(let Self { table } = slot);
2613
2614 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2615 match ordinal {
2616 0 => unsafe { ::core::hint::unreachable_unchecked() },
2617
2618 1 => {
2619 ::fidl_next::WireEnvelope::decode_as::<
2620 ___D,
2621 ::fidl_next::WireString<'static>,
2622 >(slot.as_mut(), decoder, 128)?;
2623
2624 let value = unsafe {
2625 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2626 };
2627
2628 if value.len() > 128 {
2629 return Err(::fidl_next::DecodeError::VectorTooLong {
2630 size: value.len() as u64,
2631 limit: 128,
2632 });
2633 }
2634
2635 Ok(())
2636 }
2637
2638 3 => {
2639 ::fidl_next::WireEnvelope::decode_as::<
2640 ___D,
2641 ::fidl_next::WireVector<'static, crate::wire::NodeSymbol<'static>>,
2642 >(slot.as_mut(), decoder, (64, ()))?;
2643
2644 let value = unsafe {
2645 slot
2646 .deref_unchecked()
2647 .deref_unchecked::<
2648 ::fidl_next::WireVector<'_, crate::wire::NodeSymbol<'_>>
2649 >()
2650 };
2651
2652 if value.len() > 64 {
2653 return Err(::fidl_next::DecodeError::VectorTooLong {
2654 size: value.len() as u64,
2655 limit: 64,
2656 });
2657 }
2658
2659 Ok(())
2660 }
2661
2662 4 => {
2663 ::fidl_next::WireEnvelope::decode_as::<
2664 ___D,
2665 ::fidl_next::WireVector<'static, crate::wire::NodeProperty<'static>>,
2666 >(slot.as_mut(), decoder, (64, ()))?;
2667
2668 let value = unsafe {
2669 slot
2670 .deref_unchecked()
2671 .deref_unchecked::<
2672 ::fidl_next::WireVector<'_, crate::wire::NodeProperty<'_>>
2673 >()
2674 };
2675
2676 if value.len() > 64 {
2677 return Err(::fidl_next::DecodeError::VectorTooLong {
2678 size: value.len() as u64,
2679 limit: 64,
2680 });
2681 }
2682
2683 Ok(())
2684 }
2685
2686 5 => {
2687 ::fidl_next::WireEnvelope::decode_as::<
2688 ___D,
2689 crate::wire::DevfsAddArgs<'static>,
2690 >(slot.as_mut(), decoder, ())?;
2691
2692 Ok(())
2693 }
2694
2695 6 => {
2696 ::fidl_next::WireEnvelope::decode_as::<
2697 ___D,
2698 ::fidl_next::WireVector<'static, crate::wire::Offer<'static>>,
2699 >(slot.as_mut(), decoder, (128, ()))?;
2700
2701 let value = unsafe {
2702 slot
2703 .deref_unchecked()
2704 .deref_unchecked::<
2705 ::fidl_next::WireVector<'_, crate::wire::Offer<'_>>
2706 >()
2707 };
2708
2709 if value.len() > 128 {
2710 return Err(::fidl_next::DecodeError::VectorTooLong {
2711 size: value.len() as u64,
2712 limit: 128,
2713 });
2714 }
2715
2716 Ok(())
2717 }
2718
2719 7 => {
2720 ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::BusInfo<'static>>(
2721 slot.as_mut(),
2722 decoder,
2723 (),
2724 )?;
2725
2726 Ok(())
2727 }
2728
2729 8 => {
2730 ::fidl_next::WireEnvelope::decode_as::<
2731 ___D,
2732 ::fidl_next::WireVector<'static, crate::wire::NodeProperty2<'static>>,
2733 >(slot.as_mut(), decoder, (64, ()))?;
2734
2735 let value = unsafe {
2736 slot
2737 .deref_unchecked()
2738 .deref_unchecked::<
2739 ::fidl_next::WireVector<'_, crate::wire::NodeProperty2<'_>>
2740 >()
2741 };
2742
2743 if value.len() > 64 {
2744 return Err(::fidl_next::DecodeError::VectorTooLong {
2745 size: value.len() as u64,
2746 limit: 64,
2747 });
2748 }
2749
2750 Ok(())
2751 }
2752
2753 9 => {
2754 ::fidl_next::WireEnvelope::decode_as::<
2755 ___D,
2756 ::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef,
2757 >(slot.as_mut(), decoder, ())?;
2758
2759 Ok(())
2760 }
2761
2762 10 => {
2763 ::fidl_next::WireEnvelope::decode_as::<
2764 ___D,
2765 ::fidl_next::WireString<'static>,
2766 >(slot.as_mut(), decoder, 128)?;
2767
2768 let value = unsafe {
2769 slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
2770 };
2771
2772 if value.len() > 128 {
2773 return Err(::fidl_next::DecodeError::VectorTooLong {
2774 size: value.len() as u64,
2775 limit: 128,
2776 });
2777 }
2778
2779 Ok(())
2780 }
2781
2782 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2783 }
2784 })
2785 }
2786 }
2787
2788 impl<'de> NodeAddArgs<'de> {
2789 pub fn name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2790 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2791 }
2792
2793 pub fn symbols(
2794 &self,
2795 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeSymbol<'de>>>
2796 {
2797 unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2798 }
2799
2800 pub fn properties(
2801 &self,
2802 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeProperty<'de>>>
2803 {
2804 unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2805 }
2806
2807 pub fn devfs_args(&self) -> ::core::option::Option<&crate::wire::DevfsAddArgs<'de>> {
2808 unsafe { Some(self.table.get(5)?.deref_unchecked()) }
2809 }
2810
2811 pub fn offers2(
2812 &self,
2813 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::Offer<'de>>>
2814 {
2815 unsafe { Some(self.table.get(6)?.deref_unchecked()) }
2816 }
2817
2818 pub fn bus_info(&self) -> ::core::option::Option<&crate::wire::BusInfo<'de>> {
2819 unsafe { Some(self.table.get(7)?.deref_unchecked()) }
2820 }
2821
2822 pub fn properties2(
2823 &self,
2824 ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::wire::NodeProperty2<'de>>>
2825 {
2826 unsafe { Some(self.table.get(8)?.deref_unchecked()) }
2827 }
2828
2829 pub fn offers_dictionary(
2830 &self,
2831 ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::wire::DictionaryRef>
2832 {
2833 unsafe { Some(self.table.get(9)?.deref_unchecked()) }
2834 }
2835
2836 pub fn driver_host(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
2837 unsafe { Some(self.table.get(10)?.deref_unchecked()) }
2838 }
2839 }
2840
2841 impl<'de> ::core::fmt::Debug for NodeAddArgs<'de> {
2842 fn fmt(
2843 &self,
2844 f: &mut ::core::fmt::Formatter<'_>,
2845 ) -> ::core::result::Result<(), ::core::fmt::Error> {
2846 f.debug_struct("NodeAddArgs")
2847 .field("name", &self.name())
2848 .field("symbols", &self.symbols())
2849 .field("properties", &self.properties())
2850 .field("devfs_args", &self.devfs_args())
2851 .field("offers2", &self.offers2())
2852 .field("bus_info", &self.bus_info())
2853 .field("properties2", &self.properties2())
2854 .field("offers_dictionary", &self.offers_dictionary())
2855 .field("driver_host", &self.driver_host())
2856 .finish()
2857 }
2858 }
2859
2860 impl<'de> ::fidl_next::IntoNatural for NodeAddArgs<'de> {
2861 type Natural = crate::natural::NodeAddArgs;
2862 }
2863
2864 impl ::fidl_next::Unconstrained for NodeAddArgs<'_> {}
2865
2866 #[derive(Debug)]
2868 #[repr(C)]
2869 pub struct NodeAddChildRequest<'de> {
2870 pub args: crate::wire::NodeAddArgs<'de>,
2871
2872 pub controller:
2873 ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::WireChannel>,
2874
2875 pub node: ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
2876 }
2877
2878 static_assertions::const_assert_eq!(std::mem::size_of::<NodeAddChildRequest<'_>>(), 24);
2879 static_assertions::const_assert_eq!(std::mem::align_of::<NodeAddChildRequest<'_>>(), 8);
2880
2881 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, args), 0);
2882
2883 static_assertions::const_assert_eq!(
2884 std::mem::offset_of!(NodeAddChildRequest<'_>, controller),
2885 16
2886 );
2887
2888 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeAddChildRequest<'_>, node), 20);
2889
2890 unsafe impl ::fidl_next::Wire for NodeAddChildRequest<'static> {
2891 type Owned<'de> = NodeAddChildRequest<'de>;
2892
2893 #[inline]
2894 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
2895 ::fidl_next::munge! {
2896 let Self {
2897
2898 args,
2899 controller,
2900 node,
2901
2902 } = &mut *out_;
2903 }
2904
2905 ::fidl_next::Wire::zero_padding(args);
2906
2907 ::fidl_next::Wire::zero_padding(controller);
2908
2909 ::fidl_next::Wire::zero_padding(node);
2910 }
2911 }
2912
2913 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeAddChildRequest<'static>
2914 where
2915 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2916 ___D: ::fidl_next::Decoder,
2917 ___D: ::fidl_next::fuchsia::HandleDecoder,
2918 {
2919 fn decode(
2920 slot_: ::fidl_next::Slot<'_, Self>,
2921 decoder_: &mut ___D,
2922 _: (),
2923 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2924 ::fidl_next::munge! {
2925 let Self {
2926
2927 mut args,
2928 mut controller,
2929 mut node,
2930
2931 } = slot_;
2932 }
2933
2934 let _field = args.as_mut();
2935
2936 ::fidl_next::Decode::decode(args.as_mut(), decoder_, ())?;
2937
2938 let _field = controller.as_mut();
2939
2940 ::fidl_next::Decode::decode(controller.as_mut(), decoder_, ())?;
2941
2942 let _field = node.as_mut();
2943
2944 ::fidl_next::Decode::decode(node.as_mut(), decoder_, ())?;
2945
2946 Ok(())
2947 }
2948 }
2949
2950 impl<'de> ::fidl_next::IntoNatural for NodeAddChildRequest<'de> {
2951 type Natural = crate::natural::NodeAddChildRequest;
2952 }
2953
2954 impl ::fidl_next::Unconstrained for NodeAddChildRequest<'static> {}
2955
2956 #[repr(C)]
2958 pub struct NodeControllerOnBindRequest<'de> {
2959 pub(crate) table: ::fidl_next::WireTable<'de>,
2960 }
2961
2962 impl<'de> Drop for NodeControllerOnBindRequest<'de> {
2963 fn drop(&mut self) {
2964 let _ = self.table.get(1).map(|envelope| unsafe {
2965 envelope.read_unchecked::<::fidl_next::fuchsia::WireEvent>()
2966 });
2967 }
2968 }
2969
2970 unsafe impl ::fidl_next::Wire for NodeControllerOnBindRequest<'static> {
2971 type Owned<'de> = NodeControllerOnBindRequest<'de>;
2972
2973 #[inline]
2974 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2975 ::fidl_next::munge!(let Self { table } = out);
2976 ::fidl_next::WireTable::zero_padding(table);
2977 }
2978 }
2979
2980 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeControllerOnBindRequest<'static>
2981 where
2982 ___D: ::fidl_next::Decoder + ?Sized,
2983 ___D: ::fidl_next::fuchsia::HandleDecoder,
2984 {
2985 fn decode(
2986 slot: ::fidl_next::Slot<'_, Self>,
2987 decoder: &mut ___D,
2988 _: (),
2989 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2990 ::fidl_next::munge!(let Self { table } = slot);
2991
2992 ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2993 match ordinal {
2994 0 => unsafe { ::core::hint::unreachable_unchecked() },
2995
2996 1 => {
2997 ::fidl_next::WireEnvelope::decode_as::<
2998 ___D,
2999 ::fidl_next::fuchsia::WireEvent,
3000 >(slot.as_mut(), decoder, ())?;
3001
3002 Ok(())
3003 }
3004
3005 _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3006 }
3007 })
3008 }
3009 }
3010
3011 impl<'de> NodeControllerOnBindRequest<'de> {
3012 pub fn node_token(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEvent> {
3013 unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3014 }
3015 }
3016
3017 impl<'de> ::core::fmt::Debug for NodeControllerOnBindRequest<'de> {
3018 fn fmt(
3019 &self,
3020 f: &mut ::core::fmt::Formatter<'_>,
3021 ) -> ::core::result::Result<(), ::core::fmt::Error> {
3022 f.debug_struct("NodeControllerOnBindRequest")
3023 .field("node_token", &self.node_token())
3024 .finish()
3025 }
3026 }
3027
3028 impl<'de> ::fidl_next::IntoNatural for NodeControllerOnBindRequest<'de> {
3029 type Natural = crate::natural::NodeControllerOnBindRequest;
3030 }
3031
3032 impl ::fidl_next::Unconstrained for NodeControllerOnBindRequest<'_> {}
3033}
3034
3035pub mod wire_optional {
3036
3037 pub use fidl_next_common_fuchsia_driver_framework::wire_optional::*;
3038
3039 #[repr(transparent)]
3040 pub struct DriverResult<'de> {
3041 pub(crate) raw: ::fidl_next::RawWireUnion,
3042 pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
3043 }
3044
3045 unsafe impl ::fidl_next::Wire for DriverResult<'static> {
3046 type Owned<'de> = DriverResult<'de>;
3047
3048 #[inline]
3049 fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3050 ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
3051 ::fidl_next::RawWireUnion::zero_padding(raw);
3052 }
3053 }
3054
3055 impl<'de> DriverResult<'de> {
3056 pub fn is_some(&self) -> bool {
3057 self.raw.is_some()
3058 }
3059
3060 pub fn is_none(&self) -> bool {
3061 self.raw.is_none()
3062 }
3063
3064 pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::DriverResult<'de>> {
3065 if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
3066 }
3067
3068 pub fn into_option(self) -> ::core::option::Option<crate::wire::DriverResult<'de>> {
3069 if self.is_some() {
3070 Some(crate::wire::DriverResult {
3071 raw: self.raw,
3072 _phantom: ::core::marker::PhantomData,
3073 })
3074 } else {
3075 None
3076 }
3077 }
3078 }
3079
3080 unsafe impl<___D> ::fidl_next::Decode<___D> for DriverResult<'static>
3081 where
3082 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3083 ___D: ::fidl_next::Decoder,
3084 ___D: ::fidl_next::fuchsia::HandleDecoder,
3085 {
3086 fn decode(
3087 mut slot: ::fidl_next::Slot<'_, Self>,
3088 decoder: &mut ___D,
3089 _: (),
3090 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3091 ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3092 match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
3093 1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireEvent>(
3094 raw,
3095 decoder,
3096 (),
3097 )?,
3098
3099 2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
3100 raw,
3101 decoder,
3102 (),
3103 )?,
3104
3105 3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI32>(
3106 raw,
3107 decoder,
3108 (),
3109 )?,
3110
3111 0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
3112 _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
3113 }
3114
3115 Ok(())
3116 }
3117 }
3118
3119 impl<'de> ::core::fmt::Debug for DriverResult<'de> {
3120 fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3121 self.as_ref().fmt(f)
3122 }
3123 }
3124
3125 impl<'de> ::fidl_next::IntoNatural for DriverResult<'de> {
3126 type Natural = ::core::option::Option<crate::natural::DriverResult>;
3127 }
3128
3129 impl ::fidl_next::Unconstrained for DriverResult<'static> {}
3130}
3131
3132pub mod generic {
3133
3134 pub use fidl_next_common_fuchsia_driver_framework::generic::*;
3135
3136 pub struct DriverStartRequest<T0> {
3137 pub start_args: T0,
3138 }
3139
3140 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DriverStartRequest<'static>, ___E>
3141 for DriverStartRequest<T0>
3142 where
3143 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3144 ___E: ::fidl_next::Encoder,
3145 ___E: ::fidl_next::fuchsia::HandleEncoder,
3146 T0: ::fidl_next::Encode<crate::wire::DriverStartArgs<'static>, ___E>,
3147 {
3148 #[inline]
3149 fn encode(
3150 self,
3151 encoder_: &mut ___E,
3152 out_: &mut ::core::mem::MaybeUninit<crate::wire::DriverStartRequest<'static>>,
3153 _: (),
3154 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3155 ::fidl_next::munge! {
3156 let crate::wire::DriverStartRequest {
3157
3158 start_args,
3159
3160 } = out_;
3161 }
3162
3163 ::fidl_next::Encode::encode(self.start_args, encoder_, start_args, ())?;
3164
3165 Ok(())
3166 }
3167 }
3168
3169 pub struct NodeAddChildRequest<T0, T1, T2> {
3170 pub args: T0,
3171
3172 pub controller: T1,
3173
3174 pub node: T2,
3175 }
3176
3177 unsafe impl<___E, T0, T1, T2>
3178 ::fidl_next::Encode<crate::wire::NodeAddChildRequest<'static>, ___E>
3179 for NodeAddChildRequest<T0, T1, T2>
3180 where
3181 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3182 ___E: ::fidl_next::Encoder,
3183 ___E: ::fidl_next::fuchsia::HandleEncoder,
3184 T0: ::fidl_next::Encode<crate::wire::NodeAddArgs<'static>, ___E>,
3185 T1: ::fidl_next::Encode<
3186 ::fidl_next::ServerEnd<crate::NodeController, ::fidl_next::fuchsia::WireChannel>,
3187 ___E,
3188 >,
3189 T2: ::fidl_next::Encode<
3190 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
3191 ___E,
3192 >,
3193 {
3194 #[inline]
3195 fn encode(
3196 self,
3197 encoder_: &mut ___E,
3198 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeAddChildRequest<'static>>,
3199 _: (),
3200 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3201 ::fidl_next::munge! {
3202 let crate::wire::NodeAddChildRequest {
3203
3204 args,
3205 controller,
3206 node,
3207
3208 } = out_;
3209 }
3210
3211 ::fidl_next::Encode::encode(self.args, encoder_, args, ())?;
3212
3213 ::fidl_next::Encode::encode(self.controller, encoder_, controller, ())?;
3214
3215 ::fidl_next::Encode::encode(self.node, encoder_, node, ())?;
3216
3217 Ok(())
3218 }
3219 }
3220}
3221
3222pub use self::natural::*;
3223
3224#[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"]
3226#[derive(PartialEq, Debug)]
3227pub struct Driver;
3228
3229#[cfg(feature = "driver")]
3230impl ::fidl_next::HasTransport for Driver {
3231 type Transport = ::fdf_fidl::DriverChannel;
3232}
3233
3234pub mod driver {
3235 pub mod prelude {
3236 pub use crate::{Driver, DriverClientHandler, DriverServerHandler, driver};
3237
3238 pub use crate::natural::DriverStartRequest;
3239
3240 pub use crate::natural::DriverStartResponse;
3241 }
3242
3243 pub struct Start;
3244
3245 impl ::fidl_next::Method for Start {
3246 const ORDINAL: u64 = 2863727161496985794;
3247 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3248 ::fidl_next::protocol::Flexibility::Flexible;
3249
3250 type Protocol = crate::Driver;
3251
3252 type Request = crate::wire::DriverStartRequest<'static>;
3253 }
3254
3255 impl ::fidl_next::TwoWayMethod for Start {
3256 type Response = ::fidl_next::WireFlexibleResult<
3257 'static,
3258 crate::wire::DriverStartResponse,
3259 ::fidl_next::WireI32,
3260 >;
3261 }
3262
3263 impl<___R> ::fidl_next::Respond<___R> for Start {
3264 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3265
3266 fn respond(response: ___R) -> Self::Output {
3267 ::fidl_next::FlexibleResult::Ok(response)
3268 }
3269 }
3270
3271 impl<___R> ::fidl_next::RespondErr<___R> for Start {
3272 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3273
3274 fn respond_err(response: ___R) -> Self::Output {
3275 ::fidl_next::FlexibleResult::Err(response)
3276 }
3277 }
3278
3279 pub struct Stop;
3280
3281 impl ::fidl_next::Method for Stop {
3282 const ORDINAL: u64 = 5446759044519003197;
3283 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3284 ::fidl_next::protocol::Flexibility::Flexible;
3285
3286 type Protocol = crate::Driver;
3287
3288 type Request = ();
3289 }
3290
3291 mod ___detail {
3292 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Driver
3293 where
3294 ___T: ::fidl_next::Transport,
3295 {
3296 type Client = DriverClient<___T>;
3297 type Server = DriverServer<___T>;
3298 }
3299
3300 #[repr(transparent)]
3302 pub struct DriverClient<___T: ::fidl_next::Transport> {
3303 #[allow(dead_code)]
3304 client: ::fidl_next::protocol::Client<___T>,
3305 }
3306
3307 impl<___T> DriverClient<___T>
3308 where
3309 ___T: ::fidl_next::Transport,
3310 {
3311 #[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"]
3312 pub fn start(
3313 &self,
3314
3315 start_args: impl ::fidl_next::Encode<
3316 crate::wire::DriverStartArgs<'static>,
3317 <___T as ::fidl_next::Transport>::SendBuffer,
3318 >,
3319 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
3320 where
3321 <___T as ::fidl_next::Transport>::SendBuffer:
3322 ::fidl_next::encoder::InternalHandleEncoder,
3323 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3324 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3325 {
3326 self.start_with(crate::generic::DriverStartRequest { start_args })
3327 }
3328
3329 #[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"]
3330 pub fn start_with<___R>(
3331 &self,
3332 request: ___R,
3333 ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
3334 where
3335 ___R: ::fidl_next::Encode<
3336 crate::wire::DriverStartRequest<'static>,
3337 <___T as ::fidl_next::Transport>::SendBuffer,
3338 >,
3339 {
3340 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3341 2863727161496985794,
3342 <super::Start as ::fidl_next::Method>::FLEXIBILITY,
3343 request,
3344 ))
3345 }
3346
3347 #[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"]
3348 pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3349 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3350 5446759044519003197,
3351 <super::Stop as ::fidl_next::Method>::FLEXIBILITY,
3352 (),
3353 ))
3354 }
3355 }
3356
3357 #[repr(transparent)]
3359 pub struct DriverServer<___T: ::fidl_next::Transport> {
3360 server: ::fidl_next::protocol::Server<___T>,
3361 }
3362
3363 impl<___T> DriverServer<___T> where ___T: ::fidl_next::Transport {}
3364 }
3365}
3366
3367pub trait DriverClientHandler<
3371 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3372 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3373>
3374{
3375 fn on_unknown_interaction(
3376 &mut self,
3377 ordinal: u64,
3378 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3379 ::core::future::ready(())
3380 }
3381}
3382
3383impl<___T> DriverClientHandler<___T> for ::fidl_next::IgnoreEvents
3384where
3385 ___T: ::fidl_next::Transport,
3386{
3387 async fn on_unknown_interaction(&mut self, _: u64) {}
3388}
3389
3390impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Driver
3391where
3392 ___H: DriverClientHandler<___T> + ::core::marker::Send,
3393 ___T: ::fidl_next::Transport,
3394{
3395 async fn on_event(
3396 handler: &mut ___H,
3397 ordinal: u64,
3398 flexibility: ::fidl_next::protocol::Flexibility,
3399 buffer: ___T::RecvBuffer,
3400 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3401 match ordinal {
3402 ordinal => {
3403 handler.on_unknown_interaction(ordinal).await;
3404 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3405 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3406 } else {
3407 Ok(())
3408 }
3409 }
3410 }
3411 }
3412}
3413
3414pub trait DriverServerHandler<
3418 #[cfg(feature = "driver")] ___T: ::fidl_next::Transport = ::fdf_fidl::DriverChannel,
3419 #[cfg(not(feature = "driver"))] ___T: ::fidl_next::Transport,
3420>
3421{
3422 #[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"]
3423 fn start(
3424 &mut self,
3425
3426 request: ::fidl_next::Request<driver::Start, ___T>,
3427
3428 responder: ::fidl_next::Responder<driver::Start, ___T>,
3429 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3430
3431 #[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"]
3432 fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3433
3434 fn on_unknown_interaction(
3435 &mut self,
3436 ordinal: u64,
3437 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3438 ::core::future::ready(())
3439 }
3440}
3441
3442impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Driver
3443where
3444 ___H: DriverServerHandler<___T> + ::core::marker::Send,
3445 ___T: ::fidl_next::Transport,
3446 <driver::Start as ::fidl_next::Method>::Request:
3447 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3448{
3449 async fn on_one_way(
3450 handler: &mut ___H,
3451 ordinal: u64,
3452 flexibility: ::fidl_next::protocol::Flexibility,
3453 buffer: ___T::RecvBuffer,
3454 ) -> ::core::result::Result<
3455 (),
3456 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3457 > {
3458 match ordinal {
3459 5446759044519003197 => {
3460 handler.stop().await;
3461 Ok(())
3462 }
3463
3464 ordinal => {
3465 handler.on_unknown_interaction(ordinal).await;
3466 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3467 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3468 } else {
3469 Ok(())
3470 }
3471 }
3472 }
3473 }
3474
3475 async fn on_two_way(
3476 handler: &mut ___H,
3477 ordinal: u64,
3478 flexibility: ::fidl_next::protocol::Flexibility,
3479 buffer: ___T::RecvBuffer,
3480 responder: ::fidl_next::protocol::Responder<___T>,
3481 ) -> ::core::result::Result<
3482 (),
3483 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3484 > {
3485 match ordinal {
3486 2863727161496985794 => {
3487 let responder = ::fidl_next::Responder::from_untyped(responder);
3488
3489 match ::fidl_next::DecoderExt::decode(buffer) {
3490 Ok(decoded) => {
3491 handler.start(::fidl_next::Request::from_decoded(decoded), responder).await;
3492 Ok(())
3493 }
3494 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3495 ordinal: 2863727161496985794,
3496 error,
3497 }),
3498 }
3499 }
3500
3501 ordinal => {
3502 handler.on_unknown_interaction(ordinal).await;
3503 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3504 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3505 } else {
3506 responder
3507 .respond(
3508 ordinal,
3509 flexibility,
3510 ::fidl_next::Flexible::<()>::FrameworkErr(
3511 ::fidl_next::FrameworkError::UnknownMethod,
3512 ),
3513 )
3514 .expect("encoding a framework error should never fail")
3515 .await?;
3516 Ok(())
3517 }
3518 }
3519 }
3520 }
3521}
3522
3523#[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"]
3525#[derive(PartialEq, Debug)]
3526pub struct Node;
3527
3528#[cfg(target_os = "fuchsia")]
3529impl ::fidl_next::HasTransport for Node {
3530 type Transport = ::fidl_next::fuchsia::zx::Channel;
3531}
3532
3533pub mod node {
3534 pub mod prelude {
3535 pub use crate::{Node, NodeClientHandler, NodeServerHandler, node};
3536
3537 pub use crate::natural::NodeAddChildRequest;
3538
3539 pub use crate::natural::NodeError;
3540
3541 pub use crate::natural::NodeAddChildResponse;
3542 }
3543
3544 pub struct AddChild;
3545
3546 impl ::fidl_next::Method for AddChild {
3547 const ORDINAL: u64 = 8633697350522413353;
3548 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3549 ::fidl_next::protocol::Flexibility::Flexible;
3550
3551 type Protocol = crate::Node;
3552
3553 type Request = crate::wire::NodeAddChildRequest<'static>;
3554 }
3555
3556 impl ::fidl_next::TwoWayMethod for AddChild {
3557 type Response = ::fidl_next::WireFlexibleResult<
3558 'static,
3559 crate::wire::NodeAddChildResponse,
3560 crate::wire::NodeError,
3561 >;
3562 }
3563
3564 impl<___R> ::fidl_next::Respond<___R> for AddChild {
3565 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3566
3567 fn respond(response: ___R) -> Self::Output {
3568 ::fidl_next::FlexibleResult::Ok(response)
3569 }
3570 }
3571
3572 impl<___R> ::fidl_next::RespondErr<___R> for AddChild {
3573 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3574
3575 fn respond_err(response: ___R) -> Self::Output {
3576 ::fidl_next::FlexibleResult::Err(response)
3577 }
3578 }
3579
3580 mod ___detail {
3581 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Node
3582 where
3583 ___T: ::fidl_next::Transport,
3584 {
3585 type Client = NodeClient<___T>;
3586 type Server = NodeServer<___T>;
3587 }
3588
3589 #[repr(transparent)]
3591 pub struct NodeClient<___T: ::fidl_next::Transport> {
3592 #[allow(dead_code)]
3593 client: ::fidl_next::protocol::Client<___T>,
3594 }
3595
3596 impl<___T> NodeClient<___T>
3597 where
3598 ___T: ::fidl_next::Transport,
3599 {
3600 #[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"]
3601 pub fn add_child(
3602 &self,
3603
3604 args: impl ::fidl_next::Encode<
3605 crate::wire::NodeAddArgs<'static>,
3606 <___T as ::fidl_next::Transport>::SendBuffer,
3607 >,
3608
3609 controller: impl ::fidl_next::Encode<
3610 ::fidl_next::ServerEnd<
3611 crate::NodeController,
3612 ::fidl_next::fuchsia::WireChannel,
3613 >,
3614 <___T as ::fidl_next::Transport>::SendBuffer,
3615 >,
3616
3617 node: impl ::fidl_next::Encode<
3618 ::fidl_next::ServerEnd<crate::Node, ::fidl_next::fuchsia::WireOptionalChannel>,
3619 <___T as ::fidl_next::Transport>::SendBuffer,
3620 >,
3621 ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
3622 where
3623 <___T as ::fidl_next::Transport>::SendBuffer:
3624 ::fidl_next::encoder::InternalHandleEncoder,
3625 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
3626 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
3627 {
3628 self.add_child_with(crate::generic::NodeAddChildRequest { args, controller, node })
3629 }
3630
3631 #[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"]
3632 pub fn add_child_with<___R>(
3633 &self,
3634 request: ___R,
3635 ) -> ::fidl_next::TwoWayFuture<'_, super::AddChild, ___T>
3636 where
3637 ___R: ::fidl_next::Encode<
3638 crate::wire::NodeAddChildRequest<'static>,
3639 <___T as ::fidl_next::Transport>::SendBuffer,
3640 >,
3641 {
3642 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3643 8633697350522413353,
3644 <super::AddChild as ::fidl_next::Method>::FLEXIBILITY,
3645 request,
3646 ))
3647 }
3648 }
3649
3650 #[repr(transparent)]
3652 pub struct NodeServer<___T: ::fidl_next::Transport> {
3653 server: ::fidl_next::protocol::Server<___T>,
3654 }
3655
3656 impl<___T> NodeServer<___T> where ___T: ::fidl_next::Transport {}
3657 }
3658}
3659
3660pub trait NodeClientHandler<
3664 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3665 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3666>
3667{
3668 fn on_unknown_interaction(
3669 &mut self,
3670 ordinal: u64,
3671 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3672 ::core::future::ready(())
3673 }
3674}
3675
3676impl<___T> NodeClientHandler<___T> for ::fidl_next::IgnoreEvents
3677where
3678 ___T: ::fidl_next::Transport,
3679{
3680 async fn on_unknown_interaction(&mut self, _: u64) {}
3681}
3682
3683impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Node
3684where
3685 ___H: NodeClientHandler<___T> + ::core::marker::Send,
3686 ___T: ::fidl_next::Transport,
3687{
3688 async fn on_event(
3689 handler: &mut ___H,
3690 ordinal: u64,
3691 flexibility: ::fidl_next::protocol::Flexibility,
3692 buffer: ___T::RecvBuffer,
3693 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
3694 match ordinal {
3695 ordinal => {
3696 handler.on_unknown_interaction(ordinal).await;
3697 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3698 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3699 } else {
3700 Ok(())
3701 }
3702 }
3703 }
3704 }
3705}
3706
3707pub trait NodeServerHandler<
3711 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
3712 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
3713>
3714{
3715 #[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"]
3716 fn add_child(
3717 &mut self,
3718
3719 request: ::fidl_next::Request<node::AddChild, ___T>,
3720
3721 responder: ::fidl_next::Responder<node::AddChild, ___T>,
3722 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
3723
3724 fn on_unknown_interaction(
3725 &mut self,
3726 ordinal: u64,
3727 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
3728 ::core::future::ready(())
3729 }
3730}
3731
3732impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Node
3733where
3734 ___H: NodeServerHandler<___T> + ::core::marker::Send,
3735 ___T: ::fidl_next::Transport,
3736 <node::AddChild as ::fidl_next::Method>::Request:
3737 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
3738{
3739 async fn on_one_way(
3740 handler: &mut ___H,
3741 ordinal: u64,
3742 flexibility: ::fidl_next::protocol::Flexibility,
3743 buffer: ___T::RecvBuffer,
3744 ) -> ::core::result::Result<
3745 (),
3746 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3747 > {
3748 match ordinal {
3749 ordinal => {
3750 handler.on_unknown_interaction(ordinal).await;
3751 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3752 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3753 } else {
3754 Ok(())
3755 }
3756 }
3757 }
3758 }
3759
3760 async fn on_two_way(
3761 handler: &mut ___H,
3762 ordinal: u64,
3763 flexibility: ::fidl_next::protocol::Flexibility,
3764 buffer: ___T::RecvBuffer,
3765 responder: ::fidl_next::protocol::Responder<___T>,
3766 ) -> ::core::result::Result<
3767 (),
3768 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
3769 > {
3770 match ordinal {
3771 8633697350522413353 => {
3772 let responder = ::fidl_next::Responder::from_untyped(responder);
3773
3774 match ::fidl_next::DecoderExt::decode(buffer) {
3775 Ok(decoded) => {
3776 handler
3777 .add_child(::fidl_next::Request::from_decoded(decoded), responder)
3778 .await;
3779 Ok(())
3780 }
3781 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
3782 ordinal: 8633697350522413353,
3783 error,
3784 }),
3785 }
3786 }
3787
3788 ordinal => {
3789 handler.on_unknown_interaction(ordinal).await;
3790 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
3791 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
3792 } else {
3793 responder
3794 .respond(
3795 ordinal,
3796 flexibility,
3797 ::fidl_next::Flexible::<()>::FrameworkErr(
3798 ::fidl_next::FrameworkError::UnknownMethod,
3799 ),
3800 )
3801 .expect("encoding a framework error should never fail")
3802 .await?;
3803 Ok(())
3804 }
3805 }
3806 }
3807 }
3808}
3809
3810#[doc = " Protocol through which a parent node controls one of its children.\n"]
3812#[derive(PartialEq, Debug)]
3813pub struct NodeController;
3814
3815#[cfg(target_os = "fuchsia")]
3816impl ::fidl_next::HasTransport for NodeController {
3817 type Transport = ::fidl_next::fuchsia::zx::Channel;
3818}
3819
3820pub mod node_controller {
3821 pub mod prelude {
3822 pub use crate::{
3823 NodeController, NodeControllerClientHandler, NodeControllerServerHandler,
3824 node_controller,
3825 };
3826
3827 pub use crate::natural::DriverResult;
3828
3829 pub use crate::natural::NodeControllerOnBindRequest;
3830
3831 pub use crate::natural::NodeControllerRequestBindRequest;
3832
3833 pub use crate::natural::NodeControllerRequestBindResponse;
3834 }
3835
3836 pub struct Remove;
3837
3838 impl ::fidl_next::Method for Remove {
3839 const ORDINAL: u64 = 6123359741742396225;
3840 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3841 ::fidl_next::protocol::Flexibility::Flexible;
3842
3843 type Protocol = crate::NodeController;
3844
3845 type Request = ();
3846 }
3847
3848 pub struct RequestBind;
3849
3850 impl ::fidl_next::Method for RequestBind {
3851 const ORDINAL: u64 = 4735909333556220047;
3852 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3853 ::fidl_next::protocol::Flexibility::Flexible;
3854
3855 type Protocol = crate::NodeController;
3856
3857 type Request = crate::wire::NodeControllerRequestBindRequest<'static>;
3858 }
3859
3860 impl ::fidl_next::TwoWayMethod for RequestBind {
3861 type Response = ::fidl_next::WireFlexibleResult<
3862 'static,
3863 crate::wire::NodeControllerRequestBindResponse,
3864 ::fidl_next::WireI32,
3865 >;
3866 }
3867
3868 impl<___R> ::fidl_next::Respond<___R> for RequestBind {
3869 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3870
3871 fn respond(response: ___R) -> Self::Output {
3872 ::fidl_next::FlexibleResult::Ok(response)
3873 }
3874 }
3875
3876 impl<___R> ::fidl_next::RespondErr<___R> for RequestBind {
3877 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3878
3879 fn respond_err(response: ___R) -> Self::Output {
3880 ::fidl_next::FlexibleResult::Err(response)
3881 }
3882 }
3883
3884 pub struct OnBind;
3885
3886 impl ::fidl_next::Method for OnBind {
3887 const ORDINAL: u64 = 5905369594807853098;
3888 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3889 ::fidl_next::protocol::Flexibility::Flexible;
3890
3891 type Protocol = crate::NodeController;
3892
3893 type Request = crate::wire::NodeControllerOnBindRequest<'static>;
3894 }
3895
3896 pub struct WaitForDriver;
3897
3898 impl ::fidl_next::Method for WaitForDriver {
3899 const ORDINAL: u64 = 7635589759067755399;
3900 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
3901 ::fidl_next::protocol::Flexibility::Flexible;
3902
3903 type Protocol = crate::NodeController;
3904
3905 type Request = ();
3906 }
3907
3908 impl ::fidl_next::TwoWayMethod for WaitForDriver {
3909 type Response = ::fidl_next::WireFlexibleResult<
3910 'static,
3911 crate::wire::DriverResult<'static>,
3912 ::fidl_next::WireI32,
3913 >;
3914 }
3915
3916 impl<___R> ::fidl_next::Respond<___R> for WaitForDriver {
3917 type Output = ::fidl_next::FlexibleResult<___R, ::fidl_next::util::Never>;
3918
3919 fn respond(response: ___R) -> Self::Output {
3920 ::fidl_next::FlexibleResult::Ok(response)
3921 }
3922 }
3923
3924 impl<___R> ::fidl_next::RespondErr<___R> for WaitForDriver {
3925 type Output = ::fidl_next::FlexibleResult<::fidl_next::util::Never, ___R>;
3926
3927 fn respond_err(response: ___R) -> Self::Output {
3928 ::fidl_next::FlexibleResult::Err(response)
3929 }
3930 }
3931
3932 mod ___detail {
3933 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeController
3934 where
3935 ___T: ::fidl_next::Transport,
3936 {
3937 type Client = NodeControllerClient<___T>;
3938 type Server = NodeControllerServer<___T>;
3939 }
3940
3941 #[repr(transparent)]
3943 pub struct NodeControllerClient<___T: ::fidl_next::Transport> {
3944 #[allow(dead_code)]
3945 client: ::fidl_next::protocol::Client<___T>,
3946 }
3947
3948 impl<___T> NodeControllerClient<___T>
3949 where
3950 ___T: ::fidl_next::Transport,
3951 {
3952 #[doc = " Removes the node and all of its children.\n"]
3953 pub fn remove(&self) -> ::fidl_next::SendFuture<'_, ___T> {
3954 ::fidl_next::SendFuture::from_untyped(self.client.send_one_way(
3955 6123359741742396225,
3956 <super::Remove as ::fidl_next::Method>::FLEXIBILITY,
3957 (),
3958 ))
3959 }
3960
3961 #[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"]
3962 pub fn request_bind_with<___R>(
3963 &self,
3964 request: ___R,
3965 ) -> ::fidl_next::TwoWayFuture<'_, super::RequestBind, ___T>
3966 where
3967 ___R: ::fidl_next::Encode<
3968 crate::wire::NodeControllerRequestBindRequest<'static>,
3969 <___T as ::fidl_next::Transport>::SendBuffer,
3970 >,
3971 {
3972 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3973 4735909333556220047,
3974 <super::RequestBind as ::fidl_next::Method>::FLEXIBILITY,
3975 request,
3976 ))
3977 }
3978
3979 #[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"]
3980 pub fn wait_for_driver(
3981 &self,
3982 ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForDriver, ___T> {
3983 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
3984 7635589759067755399,
3985 <super::WaitForDriver as ::fidl_next::Method>::FLEXIBILITY,
3986 (),
3987 ))
3988 }
3989 }
3990
3991 #[repr(transparent)]
3993 pub struct NodeControllerServer<___T: ::fidl_next::Transport> {
3994 server: ::fidl_next::protocol::Server<___T>,
3995 }
3996
3997 impl<___T> NodeControllerServer<___T>
3998 where
3999 ___T: ::fidl_next::Transport,
4000 {
4001 #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
4002
4003 pub fn on_bind_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
4004 where
4005 ___R: ::fidl_next::Encode<
4006 <super::OnBind as ::fidl_next::Method>::Request,
4007 <___T as ::fidl_next::Transport>::SendBuffer,
4008 >,
4009 {
4010 ::fidl_next::SendFuture::from_untyped(self.server.send_event(
4011 5905369594807853098,
4012 <super::OnBind as ::fidl_next::Method>::FLEXIBILITY,
4013 request,
4014 ))
4015 }
4016 }
4017 }
4018}
4019
4020pub trait NodeControllerClientHandler<
4024 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4025 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4026>
4027{
4028 #[doc = " Event that is triggered when the associated `Node` is bound to a driver.\n Replaced with WaitForDriver.\n"]
4029 fn on_bind(
4030 &mut self,
4031
4032 request: ::fidl_next::Request<node_controller::OnBind, ___T>,
4033 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4034
4035 fn on_unknown_interaction(
4036 &mut self,
4037 ordinal: u64,
4038 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4039 ::core::future::ready(())
4040 }
4041}
4042
4043impl<___T> NodeControllerClientHandler<___T> for ::fidl_next::IgnoreEvents
4044where
4045 ___T: ::fidl_next::Transport,
4046{
4047 async fn on_bind(&mut self, _: ::fidl_next::Request<node_controller::OnBind, ___T>) {}
4048
4049 async fn on_unknown_interaction(&mut self, _: u64) {}
4050}
4051
4052impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeController
4053where
4054 ___H: NodeControllerClientHandler<___T> + ::core::marker::Send,
4055 ___T: ::fidl_next::Transport,
4056 <node_controller::OnBind as ::fidl_next::Method>::Request:
4057 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
4058{
4059 async fn on_event(
4060 handler: &mut ___H,
4061 ordinal: u64,
4062 flexibility: ::fidl_next::protocol::Flexibility,
4063 buffer: ___T::RecvBuffer,
4064 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
4065 match ordinal {
4066 5905369594807853098 => match ::fidl_next::DecoderExt::decode(buffer) {
4067 Ok(decoded) => {
4068 handler.on_bind(::fidl_next::Request::from_decoded(decoded)).await;
4069 Ok(())
4070 }
4071 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4072 ordinal: 5905369594807853098,
4073 error,
4074 }),
4075 },
4076
4077 ordinal => {
4078 handler.on_unknown_interaction(ordinal).await;
4079 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4080 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4081 } else {
4082 Ok(())
4083 }
4084 }
4085 }
4086 }
4087}
4088
4089pub trait NodeControllerServerHandler<
4093 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
4094 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
4095>
4096{
4097 #[doc = " Removes the node and all of its children.\n"]
4098 fn remove(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4099
4100 #[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"]
4101 fn request_bind(
4102 &mut self,
4103
4104 request: ::fidl_next::Request<node_controller::RequestBind, ___T>,
4105
4106 responder: ::fidl_next::Responder<node_controller::RequestBind, ___T>,
4107 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4108
4109 #[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"]
4110 fn wait_for_driver(
4111 &mut self,
4112
4113 responder: ::fidl_next::Responder<node_controller::WaitForDriver, ___T>,
4114 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
4115
4116 fn on_unknown_interaction(
4117 &mut self,
4118 ordinal: u64,
4119 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
4120 ::core::future::ready(())
4121 }
4122}
4123
4124impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeController
4125where
4126 ___H: NodeControllerServerHandler<___T> + ::core::marker::Send,
4127 ___T: ::fidl_next::Transport,
4128 <node_controller::RequestBind as ::fidl_next::Method>::Request:
4129 ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
4130{
4131 async fn on_one_way(
4132 handler: &mut ___H,
4133 ordinal: u64,
4134 flexibility: ::fidl_next::protocol::Flexibility,
4135 buffer: ___T::RecvBuffer,
4136 ) -> ::core::result::Result<
4137 (),
4138 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4139 > {
4140 match ordinal {
4141 6123359741742396225 => {
4142 handler.remove().await;
4143 Ok(())
4144 }
4145
4146 ordinal => {
4147 handler.on_unknown_interaction(ordinal).await;
4148 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4149 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4150 } else {
4151 Ok(())
4152 }
4153 }
4154 }
4155 }
4156
4157 async fn on_two_way(
4158 handler: &mut ___H,
4159 ordinal: u64,
4160 flexibility: ::fidl_next::protocol::Flexibility,
4161 buffer: ___T::RecvBuffer,
4162 responder: ::fidl_next::protocol::Responder<___T>,
4163 ) -> ::core::result::Result<
4164 (),
4165 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
4166 > {
4167 match ordinal {
4168 4735909333556220047 => {
4169 let responder = ::fidl_next::Responder::from_untyped(responder);
4170
4171 match ::fidl_next::DecoderExt::decode(buffer) {
4172 Ok(decoded) => {
4173 handler
4174 .request_bind(::fidl_next::Request::from_decoded(decoded), responder)
4175 .await;
4176 Ok(())
4177 }
4178 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
4179 ordinal: 4735909333556220047,
4180 error,
4181 }),
4182 }
4183 }
4184
4185 7635589759067755399 => {
4186 let responder = ::fidl_next::Responder::from_untyped(responder);
4187
4188 handler.wait_for_driver(responder).await;
4189 Ok(())
4190 }
4191
4192 ordinal => {
4193 handler.on_unknown_interaction(ordinal).await;
4194 if ::core::matches!(flexibility, ::fidl_next::protocol::Flexibility::Strict) {
4195 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
4196 } else {
4197 responder
4198 .respond(
4199 ordinal,
4200 flexibility,
4201 ::fidl_next::Flexible::<()>::FrameworkErr(
4202 ::fidl_next::FrameworkError::UnknownMethod,
4203 ),
4204 )
4205 .expect("encoding a framework error should never fail")
4206 .await?;
4207 Ok(())
4208 }
4209 }
4210 }
4211 }
4212}
4213
4214pub use fidl_next_common_fuchsia_driver_framework::*;
4215
4216pub mod compat {
4218
4219 pub use fidl_next_common_fuchsia_driver_framework::compat::*;
4220
4221 impl ::fidl_next::CompatFrom<crate::DevfsAddArgs>
4222 for ::fidl_fuchsia_driver_framework::DevfsAddArgs
4223 {
4224 fn compat_from(value: crate::DevfsAddArgs) -> Self {
4225 Self {
4226 connector: ::fidl_next::CompatFrom::compat_from(value.connector),
4227
4228 class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
4229
4230 inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
4231
4232 connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
4233
4234 controller_connector: ::fidl_next::CompatFrom::compat_from(
4235 value.controller_connector,
4236 ),
4237
4238 __source_breaking: ::fidl::marker::SourceBreaking,
4239 }
4240 }
4241 }
4242
4243 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DevfsAddArgs>
4244 for crate::DevfsAddArgs
4245 {
4246 fn compat_from(value: ::fidl_fuchsia_driver_framework::DevfsAddArgs) -> Self {
4247 Self {
4248 connector: ::fidl_next::CompatFrom::compat_from(value.connector),
4249
4250 class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
4251
4252 inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
4253
4254 connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
4255
4256 controller_connector: ::fidl_next::CompatFrom::compat_from(
4257 value.controller_connector,
4258 ),
4259 }
4260 }
4261 }
4262
4263 impl ::fidl_next::CompatFrom<crate::PowerElementArgs>
4264 for ::fidl_fuchsia_driver_framework::PowerElementArgs
4265 {
4266 fn compat_from(value: crate::PowerElementArgs) -> Self {
4267 Self {
4268 control_client: ::fidl_next::CompatFrom::compat_from(value.control_client),
4269
4270 runner_server: ::fidl_next::CompatFrom::compat_from(value.runner_server),
4271
4272 lessor_client: ::fidl_next::CompatFrom::compat_from(value.lessor_client),
4273
4274 token: ::fidl_next::CompatFrom::compat_from(value.token),
4275
4276 __source_breaking: ::fidl::marker::SourceBreaking,
4277 }
4278 }
4279 }
4280
4281 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::PowerElementArgs>
4282 for crate::PowerElementArgs
4283 {
4284 fn compat_from(value: ::fidl_fuchsia_driver_framework::PowerElementArgs) -> Self {
4285 Self {
4286 control_client: ::fidl_next::CompatFrom::compat_from(value.control_client),
4287
4288 runner_server: ::fidl_next::CompatFrom::compat_from(value.runner_server),
4289
4290 lessor_client: ::fidl_next::CompatFrom::compat_from(value.lessor_client),
4291
4292 token: ::fidl_next::CompatFrom::compat_from(value.token),
4293 }
4294 }
4295 }
4296
4297 impl ::fidl_next::CompatFrom<crate::DriverStartArgs>
4298 for ::fidl_fuchsia_driver_framework::DriverStartArgs
4299 {
4300 fn compat_from(value: crate::DriverStartArgs) -> Self {
4301 Self {
4302 node: ::fidl_next::CompatFrom::compat_from(value.node),
4303
4304 symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4305
4306 url: ::fidl_next::CompatFrom::compat_from(value.url),
4307
4308 program: ::fidl_next::CompatFrom::compat_from(value.program),
4309
4310 incoming: ::fidl_next::CompatFrom::compat_from(value.incoming),
4311
4312 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
4313
4314 config: ::fidl_next::CompatFrom::compat_from(value.config),
4315
4316 node_name: ::fidl_next::CompatFrom::compat_from(value.node_name),
4317
4318 node_properties: ::fidl_next::CompatFrom::compat_from(value.node_properties),
4319
4320 node_offers: ::fidl_next::CompatFrom::compat_from(value.node_offers),
4321
4322 node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4323
4324 node_properties_2: ::fidl_next::CompatFrom::compat_from(value.node_properties_2),
4325
4326 vmar: ::fidl_next::CompatFrom::compat_from(value.vmar),
4327
4328 power_element_args: ::fidl_next::CompatFrom::compat_from(value.power_element_args),
4329
4330 __source_breaking: ::fidl::marker::SourceBreaking,
4331 }
4332 }
4333 }
4334
4335 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverStartArgs>
4336 for crate::DriverStartArgs
4337 {
4338 fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverStartArgs) -> Self {
4339 Self {
4340 node: ::fidl_next::CompatFrom::compat_from(value.node),
4341
4342 symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4343
4344 url: ::fidl_next::CompatFrom::compat_from(value.url),
4345
4346 program: ::fidl_next::CompatFrom::compat_from(value.program),
4347
4348 incoming: ::fidl_next::CompatFrom::compat_from(value.incoming),
4349
4350 outgoing_dir: ::fidl_next::CompatFrom::compat_from(value.outgoing_dir),
4351
4352 config: ::fidl_next::CompatFrom::compat_from(value.config),
4353
4354 node_name: ::fidl_next::CompatFrom::compat_from(value.node_name),
4355
4356 node_properties: ::fidl_next::CompatFrom::compat_from(value.node_properties),
4357
4358 node_offers: ::fidl_next::CompatFrom::compat_from(value.node_offers),
4359
4360 node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4361
4362 node_properties_2: ::fidl_next::CompatFrom::compat_from(value.node_properties_2),
4363
4364 vmar: ::fidl_next::CompatFrom::compat_from(value.vmar),
4365
4366 power_element_args: ::fidl_next::CompatFrom::compat_from(value.power_element_args),
4367 }
4368 }
4369 }
4370
4371 #[cfg(feature = "driver")]
4372 impl ::fidl_next::CompatFrom<crate::DriverStartRequest>
4373 for ::fidl_fuchsia_driver_framework::DriverStartRequest
4374 {
4375 #[inline]
4376 fn compat_from(value: crate::DriverStartRequest) -> Self {
4377 Self { start_args: ::fidl_next::CompatFrom::compat_from(value.start_args) }
4378 }
4379 }
4380
4381 #[cfg(feature = "driver")]
4382 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverStartRequest>
4383 for crate::DriverStartRequest
4384 {
4385 #[inline]
4386 fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverStartRequest) -> Self {
4387 Self { start_args: ::fidl_next::CompatFrom::compat_from(value.start_args) }
4388 }
4389 }
4390
4391 #[cfg(target_os = "fuchsia")]
4392 pub type DriverProxy = ::fidl_next::Client<crate::Driver>;
4395
4396 #[cfg(feature = "driver")]
4397 impl ::fidl_next::CompatFrom<crate::Driver> for ::fidl_fuchsia_driver_framework::DriverMarker {
4398 fn compat_from(_: crate::Driver) -> Self {
4399 Self
4400 }
4401 }
4402
4403 #[cfg(feature = "driver")]
4404 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverMarker> for crate::Driver {
4405 fn compat_from(_: ::fidl_fuchsia_driver_framework::DriverMarker) -> Self {
4406 Self
4407 }
4408 }
4409
4410 impl ::fidl_next::CompatFrom<crate::DriverResult>
4411 for ::fidl_fuchsia_driver_framework::DriverResult
4412 {
4413 fn compat_from(value: crate::DriverResult) -> Self {
4414 match value {
4415 crate::DriverResult::DriverStartedNodeToken(value) => {
4416 Self::DriverStartedNodeToken(::fidl_next::CompatFrom::compat_from(value))
4417 }
4418
4419 crate::DriverResult::MatchError(value) => {
4420 Self::MatchError(::fidl_next::CompatFrom::compat_from(value))
4421 }
4422
4423 crate::DriverResult::StartError(value) => {
4424 Self::StartError(::fidl_next::CompatFrom::compat_from(value))
4425 }
4426
4427 crate::DriverResult::UnknownOrdinal_(unknown_ordinal) => {
4428 Self::__SourceBreaking { unknown_ordinal }
4429 }
4430 }
4431 }
4432 }
4433
4434 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::DriverResult>
4435 for crate::DriverResult
4436 {
4437 fn compat_from(value: ::fidl_fuchsia_driver_framework::DriverResult) -> Self {
4438 match value {
4439 ::fidl_fuchsia_driver_framework::DriverResult::DriverStartedNodeToken(value) => {
4440 Self::DriverStartedNodeToken(::fidl_next::CompatFrom::compat_from(value))
4441 }
4442
4443 ::fidl_fuchsia_driver_framework::DriverResult::MatchError(value) => {
4444 Self::MatchError(::fidl_next::CompatFrom::compat_from(value))
4445 }
4446
4447 ::fidl_fuchsia_driver_framework::DriverResult::StartError(value) => {
4448 Self::StartError(::fidl_next::CompatFrom::compat_from(value))
4449 }
4450
4451 ::fidl_fuchsia_driver_framework::DriverResult::__SourceBreaking {
4452 unknown_ordinal,
4453 } => Self::UnknownOrdinal_(unknown_ordinal),
4454 }
4455 }
4456 }
4457
4458 impl ::fidl_next::CompatFrom<crate::NodeAddArgs> for ::fidl_fuchsia_driver_framework::NodeAddArgs {
4459 fn compat_from(value: crate::NodeAddArgs) -> Self {
4460 Self {
4461 name: ::fidl_next::CompatFrom::compat_from(value.name),
4462
4463 symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4464
4465 properties: ::fidl_next::CompatFrom::compat_from(value.properties),
4466
4467 devfs_args: ::fidl_next::CompatFrom::compat_from(value.devfs_args),
4468
4469 offers2: ::fidl_next::CompatFrom::compat_from(value.offers2),
4470
4471 bus_info: ::fidl_next::CompatFrom::compat_from(value.bus_info),
4472
4473 properties2: ::fidl_next::CompatFrom::compat_from(value.properties2),
4474
4475 offers_dictionary: ::fidl_next::CompatFrom::compat_from(value.offers_dictionary),
4476
4477 driver_host: ::fidl_next::CompatFrom::compat_from(value.driver_host),
4478
4479 __source_breaking: ::fidl::marker::SourceBreaking,
4480 }
4481 }
4482 }
4483
4484 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeAddArgs> for crate::NodeAddArgs {
4485 fn compat_from(value: ::fidl_fuchsia_driver_framework::NodeAddArgs) -> Self {
4486 Self {
4487 name: ::fidl_next::CompatFrom::compat_from(value.name),
4488
4489 symbols: ::fidl_next::CompatFrom::compat_from(value.symbols),
4490
4491 properties: ::fidl_next::CompatFrom::compat_from(value.properties),
4492
4493 devfs_args: ::fidl_next::CompatFrom::compat_from(value.devfs_args),
4494
4495 offers2: ::fidl_next::CompatFrom::compat_from(value.offers2),
4496
4497 bus_info: ::fidl_next::CompatFrom::compat_from(value.bus_info),
4498
4499 properties2: ::fidl_next::CompatFrom::compat_from(value.properties2),
4500
4501 offers_dictionary: ::fidl_next::CompatFrom::compat_from(value.offers_dictionary),
4502
4503 driver_host: ::fidl_next::CompatFrom::compat_from(value.driver_host),
4504 }
4505 }
4506 }
4507
4508 impl ::fidl_next::CompatFrom<crate::NodeAddChildRequest>
4509 for ::fidl_fuchsia_driver_framework::NodeAddChildRequest
4510 {
4511 #[inline]
4512 fn compat_from(value: crate::NodeAddChildRequest) -> Self {
4513 Self {
4514 args: ::fidl_next::CompatFrom::compat_from(value.args),
4515
4516 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4517
4518 node: ::fidl_next::CompatFrom::compat_from(value.node),
4519 }
4520 }
4521 }
4522
4523 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeAddChildRequest>
4524 for crate::NodeAddChildRequest
4525 {
4526 #[inline]
4527 fn compat_from(value: ::fidl_fuchsia_driver_framework::NodeAddChildRequest) -> Self {
4528 Self {
4529 args: ::fidl_next::CompatFrom::compat_from(value.args),
4530
4531 controller: ::fidl_next::CompatFrom::compat_from(value.controller),
4532
4533 node: ::fidl_next::CompatFrom::compat_from(value.node),
4534 }
4535 }
4536 }
4537
4538 #[cfg(target_os = "fuchsia")]
4539 pub type NodeProxy = ::fidl_next::Client<crate::Node>;
4542
4543 impl ::fidl_next::CompatFrom<crate::Node> for ::fidl_fuchsia_driver_framework::NodeMarker {
4544 fn compat_from(_: crate::Node) -> Self {
4545 Self
4546 }
4547 }
4548
4549 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeMarker> for crate::Node {
4550 fn compat_from(_: ::fidl_fuchsia_driver_framework::NodeMarker) -> Self {
4551 Self
4552 }
4553 }
4554
4555 #[cfg(target_os = "fuchsia")]
4556
4557 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_driver_framework::NodeProxy> for crate::Node {
4558 fn client_compat_from(
4559 proxy: ::fidl_fuchsia_driver_framework::NodeProxy,
4560 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4561 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4562 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4563 ::fidl_next::ClientDispatcher::new(client_end)
4564 }
4565 }
4566
4567 impl ::fidl_next::CompatFrom<crate::NodeControllerOnBindRequest>
4568 for ::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest
4569 {
4570 fn compat_from(value: crate::NodeControllerOnBindRequest) -> Self {
4571 Self {
4572 node_token: ::fidl_next::CompatFrom::compat_from(value.node_token),
4573
4574 __source_breaking: ::fidl::marker::SourceBreaking,
4575 }
4576 }
4577 }
4578
4579 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest>
4580 for crate::NodeControllerOnBindRequest
4581 {
4582 fn compat_from(
4583 value: ::fidl_fuchsia_driver_framework::NodeControllerOnBindRequest,
4584 ) -> Self {
4585 Self { node_token: ::fidl_next::CompatFrom::compat_from(value.node_token) }
4586 }
4587 }
4588
4589 #[cfg(target_os = "fuchsia")]
4590 pub type NodeControllerProxy = ::fidl_next::Client<crate::NodeController>;
4593
4594 impl ::fidl_next::CompatFrom<crate::NodeController>
4595 for ::fidl_fuchsia_driver_framework::NodeControllerMarker
4596 {
4597 fn compat_from(_: crate::NodeController) -> Self {
4598 Self
4599 }
4600 }
4601
4602 impl ::fidl_next::CompatFrom<::fidl_fuchsia_driver_framework::NodeControllerMarker>
4603 for crate::NodeController
4604 {
4605 fn compat_from(_: ::fidl_fuchsia_driver_framework::NodeControllerMarker) -> Self {
4606 Self
4607 }
4608 }
4609
4610 #[cfg(target_os = "fuchsia")]
4611
4612 impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_driver_framework::NodeControllerProxy>
4613 for crate::NodeController
4614 {
4615 fn client_compat_from(
4616 proxy: ::fidl_fuchsia_driver_framework::NodeControllerProxy,
4617 ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
4618 let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
4619 let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
4620 ::fidl_next::ClientDispatcher::new(client_end)
4621 }
4622 }
4623}