Skip to main content

fidl_next_common_fuchsia_hardware_interconnect/
fidl_next_common_fuchsia_hardware_interconnect.rs

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