fidl_next_fuchsia_device_fs/
fidl_next_fuchsia_device_fs.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    ::fidl_next::bitflags::bitflags! {
8        #[derive(
9            Clone,
10            Copy,
11            Debug,
12            PartialEq,
13            Eq,
14            Hash,
15        )]
16        pub struct ConnectionType: u8 {
17            #[doc = " Represents the fuchsia.io/Node protocol.\n"]const NODE = 1;
18            #[doc = " Represents the fuchsia.device/Controller protocol.\n"]const CONTROLLER = 2;
19            #[doc = " Represents the device specific FIDL.\n"]const DEVICE = 4;
20            const _ = !0;
21        }
22    }
23
24    impl ::fidl_next::Encodable for ConnectionType {
25        type Encoded = crate::wire::ConnectionType;
26    }
27
28    unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectionType
29    where
30        ___E: ?Sized,
31    {
32        #[inline]
33        fn encode(
34            self,
35            encoder: &mut ___E,
36            out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
37            _: (),
38        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
39            ::fidl_next::EncodeRef::encode_ref(&self, encoder, out, ())
40        }
41    }
42
43    unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ConnectionType
44    where
45        ___E: ?Sized,
46    {
47        #[inline]
48        fn encode_ref(
49            &self,
50            _: &mut ___E,
51            out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
52            _: (),
53        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54            ::fidl_next::munge!(let crate::wire::ConnectionType { value } = out);
55
56            let _ = value.write(u8::from(self.bits()));
57            Ok(())
58        }
59    }
60
61    impl ::core::convert::From<crate::wire::ConnectionType> for ConnectionType {
62        fn from(wire: crate::wire::ConnectionType) -> Self {
63            Self::from_bits_retain(u8::from(wire.value))
64        }
65    }
66
67    impl ::fidl_next::FromWire<crate::wire::ConnectionType> for ConnectionType {
68        #[inline]
69        fn from_wire(wire: crate::wire::ConnectionType) -> Self {
70            Self::from(wire)
71        }
72    }
73
74    impl ::fidl_next::FromWireRef<crate::wire::ConnectionType> for ConnectionType {
75        #[inline]
76        fn from_wire_ref(wire: &crate::wire::ConnectionType) -> Self {
77            Self::from(*wire)
78        }
79    }
80
81    #[derive(PartialEq, Debug)]
82    #[repr(C)]
83    pub struct ConnectorConnectRequest {
84        pub server: ::fidl_next::fuchsia::zx::Channel,
85    }
86
87    impl ::fidl_next::Encodable for ConnectorConnectRequest {
88        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
89            Self,
90            crate::wire::ConnectorConnectRequest,
91        > = unsafe {
92            ::fidl_next::CopyOptimization::enable_if(
93            true
94
95                && <
96                    ::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encodable
97                >::COPY_OPTIMIZATION.is_enabled()
98
99        )
100        };
101
102        type Encoded = crate::wire::ConnectorConnectRequest;
103    }
104
105    unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectorConnectRequest
106    where
107        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
108        ___E: ::fidl_next::fuchsia::HandleEncoder,
109    {
110        #[inline]
111        fn encode(
112            self,
113            encoder_: &mut ___E,
114            out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
115            _: (),
116        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
117            ::fidl_next::munge! {
118                let Self::Encoded {
119                    server,
120
121                } = out_;
122            }
123
124            ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
125
126            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(server.as_mut_ptr()) };
127
128            Ok(())
129        }
130    }
131
132    impl ::fidl_next::EncodableOption for ConnectorConnectRequest {
133        type EncodedOption = ::fidl_next::WireBox<'static, crate::wire::ConnectorConnectRequest>;
134    }
135
136    unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ConnectorConnectRequest
137    where
138        ___E: ::fidl_next::Encoder + ?Sized,
139        ConnectorConnectRequest: ::fidl_next::Encode<___E>,
140    {
141        #[inline]
142        fn encode_option(
143            this: ::core::option::Option<Self>,
144            encoder: &mut ___E,
145            out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
146            _: (),
147        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
148            if let Some(inner) = this {
149                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
150                ::fidl_next::WireBox::encode_present(out);
151            } else {
152                ::fidl_next::WireBox::encode_absent(out);
153            }
154
155            Ok(())
156        }
157    }
158
159    impl ::fidl_next::FromWire<crate::wire::ConnectorConnectRequest> for ConnectorConnectRequest {
160        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
161            crate::wire::ConnectorConnectRequest,
162            Self,
163        > = unsafe {
164            ::fidl_next::CopyOptimization::enable_if(
165                true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
166                    ::fidl_next::fuchsia::WireChannel,
167                >>::COPY_OPTIMIZATION
168                    .is_enabled(),
169            )
170        };
171
172        #[inline]
173        fn from_wire(wire: crate::wire::ConnectorConnectRequest) -> Self {
174            Self { server: ::fidl_next::FromWire::from_wire(wire.server) }
175        }
176    }
177
178    #[derive(PartialEq, Debug, Default)]
179    pub struct DevfsAddArgs {
180        pub connector: ::core::option::Option<
181            ::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::zx::Channel>,
182        >,
183
184        pub class_name: ::core::option::Option<::std::string::String>,
185
186        pub inspect: ::core::option::Option<::fidl_next::fuchsia::zx::Vmo>,
187
188        pub connector_supports: ::core::option::Option<crate::natural::ConnectionType>,
189
190        pub controller_connector: ::core::option::Option<
191            ::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::zx::Channel>,
192        >,
193    }
194
195    impl DevfsAddArgs {
196        fn __max_ordinal(&self) -> usize {
197            if self.controller_connector.is_some() {
198                return 5;
199            }
200
201            if self.connector_supports.is_some() {
202                return 4;
203            }
204
205            if self.inspect.is_some() {
206                return 3;
207            }
208
209            if self.class_name.is_some() {
210                return 2;
211            }
212
213            if self.connector.is_some() {
214                return 1;
215            }
216
217            0
218        }
219    }
220
221    impl ::fidl_next::Encodable for DevfsAddArgs {
222        type Encoded = crate::wire::DevfsAddArgs<'static>;
223    }
224
225    unsafe impl<___E> ::fidl_next::Encode<___E> for DevfsAddArgs
226    where
227        ___E: ::fidl_next::Encoder + ?Sized,
228        ___E: ::fidl_next::fuchsia::HandleEncoder,
229    {
230        #[inline]
231        fn encode(
232            mut self,
233            encoder: &mut ___E,
234            out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
235            _: (),
236        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
237            ::fidl_next::munge!(let crate::wire::DevfsAddArgs { table } = out);
238
239            let max_ord = self.__max_ordinal();
240
241            let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
242            ::fidl_next::Wire::zero_padding(&mut out);
243
244            let mut preallocated =
245                ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
246
247            for i in 1..=max_ord {
248                match i {
249                    5 => {
250                        if let Some(value) = self.controller_connector.take() {
251                            ::fidl_next::WireEnvelope::encode_value(
252                                value,
253                                preallocated.encoder,
254                                &mut out,
255                                (),
256                            )?;
257                        } else {
258                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
259                        }
260                    }
261
262                    4 => {
263                        if let Some(value) = self.connector_supports.take() {
264                            ::fidl_next::WireEnvelope::encode_value(
265                                value,
266                                preallocated.encoder,
267                                &mut out,
268                                (),
269                            )?;
270                        } else {
271                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
272                        }
273                    }
274
275                    3 => {
276                        if let Some(value) = self.inspect.take() {
277                            ::fidl_next::WireEnvelope::encode_value(
278                                value,
279                                preallocated.encoder,
280                                &mut out,
281                                (),
282                            )?;
283                        } else {
284                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
285                        }
286                    }
287
288                    2 => {
289                        if let Some(value) = self.class_name.take() {
290                            ::fidl_next::WireEnvelope::encode_value(
291                                value,
292                                preallocated.encoder,
293                                &mut out,
294                                255,
295                            )?;
296                        } else {
297                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
298                        }
299                    }
300
301                    1 => {
302                        if let Some(value) = self.connector.take() {
303                            ::fidl_next::WireEnvelope::encode_value(
304                                value,
305                                preallocated.encoder,
306                                &mut out,
307                                (),
308                            )?;
309                        } else {
310                            ::fidl_next::WireEnvelope::encode_zero(&mut out)
311                        }
312                    }
313
314                    _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
315                }
316                unsafe {
317                    preallocated.write_next(out.assume_init_ref());
318                }
319            }
320
321            ::fidl_next::WireTable::encode_len(table, max_ord);
322
323            Ok(())
324        }
325    }
326
327    impl<'de> ::fidl_next::FromWire<crate::wire::DevfsAddArgs<'de>> for DevfsAddArgs {
328        #[inline]
329        fn from_wire(wire_: crate::wire::DevfsAddArgs<'de>) -> Self {
330            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
331
332            let connector = wire_.table.get(1);
333
334            let class_name = wire_.table.get(2);
335
336            let inspect = wire_.table.get(3);
337
338            let connector_supports = wire_.table.get(4);
339
340            let controller_connector = wire_.table.get(5);
341
342            Self {
343                connector: connector.map(|envelope| {
344                    ::fidl_next::FromWire::from_wire(unsafe {
345                        envelope.read_unchecked::<::fidl_next::ClientEnd<
346                            crate::Connector,
347                            ::fidl_next::fuchsia::WireChannel,
348                        >>()
349                    })
350                }),
351
352                class_name: class_name.map(|envelope| {
353                    ::fidl_next::FromWire::from_wire(unsafe {
354                        envelope.read_unchecked::<::fidl_next::WireString<'de>>()
355                    })
356                }),
357
358                inspect: inspect.map(|envelope| {
359                    ::fidl_next::FromWire::from_wire(unsafe {
360                        envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
361                    })
362                }),
363
364                connector_supports: connector_supports.map(|envelope| {
365                    ::fidl_next::FromWire::from_wire(unsafe {
366                        envelope.read_unchecked::<crate::wire::ConnectionType>()
367                    })
368                }),
369
370                controller_connector: controller_connector.map(|envelope| {
371                    ::fidl_next::FromWire::from_wire(unsafe {
372                        envelope.read_unchecked::<::fidl_next::ClientEnd<
373                            crate::Connector,
374                            ::fidl_next::fuchsia::WireChannel,
375                        >>()
376                    })
377                }),
378            }
379        }
380    }
381
382    #[derive(PartialEq, Clone, Debug)]
383    pub struct TopologicalPathGetTopologicalPathResponse {
384        pub path: ::std::string::String,
385    }
386
387    impl ::fidl_next::Encodable for TopologicalPathGetTopologicalPathResponse {
388        type Encoded = crate::wire::TopologicalPathGetTopologicalPathResponse<'static>;
389    }
390
391    unsafe impl<___E> ::fidl_next::Encode<___E> for TopologicalPathGetTopologicalPathResponse
392    where
393        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
394        ___E: ::fidl_next::Encoder,
395    {
396        #[inline]
397        fn encode(
398            self,
399            encoder_: &mut ___E,
400            out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
401            _: (),
402        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
403            ::fidl_next::munge! {
404                let Self::Encoded {
405                    path,
406
407                } = out_;
408            }
409
410            ::fidl_next::Encode::encode(self.path, encoder_, path, 1024)?;
411
412            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
413            ::fidl_next::Constrained::validate(_field, 1024)?;
414
415            Ok(())
416        }
417    }
418
419    unsafe impl<___E> ::fidl_next::EncodeRef<___E> for TopologicalPathGetTopologicalPathResponse
420    where
421        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
422        ___E: ::fidl_next::Encoder,
423    {
424        #[inline]
425        fn encode_ref(
426            &self,
427            encoder_: &mut ___E,
428            out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
429            _: (),
430        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
431            ::fidl_next::munge! {
432                let Self::Encoded {
433
434                    path,
435
436                } = out_;
437            }
438
439            ::fidl_next::EncodeRef::encode_ref(&self.path, encoder_, path, 1024)?;
440
441            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(path.as_mut_ptr()) };
442            ::fidl_next::Constrained::validate(_field, 1024)?;
443
444            Ok(())
445        }
446    }
447
448    impl ::fidl_next::EncodableOption for TopologicalPathGetTopologicalPathResponse {
449        type EncodedOption = ::fidl_next::WireBox<
450            'static,
451            crate::wire::TopologicalPathGetTopologicalPathResponse<'static>,
452        >;
453    }
454
455    unsafe impl<___E> ::fidl_next::EncodeOption<___E> for TopologicalPathGetTopologicalPathResponse
456    where
457        ___E: ::fidl_next::Encoder + ?Sized,
458        TopologicalPathGetTopologicalPathResponse: ::fidl_next::Encode<___E>,
459    {
460        #[inline]
461        fn encode_option(
462            this: ::core::option::Option<Self>,
463            encoder: &mut ___E,
464            out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
465            _: (),
466        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
467            if let Some(inner) = this {
468                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
469                ::fidl_next::WireBox::encode_present(out);
470            } else {
471                ::fidl_next::WireBox::encode_absent(out);
472            }
473
474            Ok(())
475        }
476    }
477
478    unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for TopologicalPathGetTopologicalPathResponse
479    where
480        ___E: ::fidl_next::Encoder + ?Sized,
481        TopologicalPathGetTopologicalPathResponse: ::fidl_next::EncodeRef<___E>,
482    {
483        #[inline]
484        fn encode_option_ref(
485            this: ::core::option::Option<&Self>,
486            encoder: &mut ___E,
487            out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
488            _: (),
489        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
490            if let Some(inner) = this {
491                ::fidl_next::EncoderExt::encode_next(encoder, inner, ())?;
492                ::fidl_next::WireBox::encode_present(out);
493            } else {
494                ::fidl_next::WireBox::encode_absent(out);
495            }
496
497            Ok(())
498        }
499    }
500
501    impl<'de> ::fidl_next::FromWire<crate::wire::TopologicalPathGetTopologicalPathResponse<'de>>
502        for TopologicalPathGetTopologicalPathResponse
503    {
504        #[inline]
505        fn from_wire(wire: crate::wire::TopologicalPathGetTopologicalPathResponse<'de>) -> Self {
506            Self { path: ::fidl_next::FromWire::from_wire(wire.path) }
507        }
508    }
509
510    impl<'de> ::fidl_next::FromWireRef<crate::wire::TopologicalPathGetTopologicalPathResponse<'de>>
511        for TopologicalPathGetTopologicalPathResponse
512    {
513        #[inline]
514        fn from_wire_ref(
515            wire: &crate::wire::TopologicalPathGetTopologicalPathResponse<'de>,
516        ) -> Self {
517            Self { path: ::fidl_next::FromWireRef::from_wire_ref(&wire.path) }
518        }
519    }
520}
521
522pub mod wire {
523
524    /// The wire type corresponding to [`ConnectionType`](crate::natural::ConnectionType).
525    #[derive(Clone, Copy, Debug)]
526    #[repr(transparent)]
527    pub struct ConnectionType {
528        pub(crate) value: u8,
529    }
530
531    unsafe impl ::fidl_next::Wire for ConnectionType {
532        type Decoded<'de> = Self;
533
534        #[inline]
535        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
536            // Wire bits have no padding
537        }
538    }
539
540    unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectionType
541    where
542        ___D: ?Sized,
543    {
544        fn decode(
545            slot: ::fidl_next::Slot<'_, Self>,
546            _: &mut ___D,
547            _: (),
548        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
549            Ok(())
550        }
551    }
552
553    impl ::core::convert::From<crate::natural::ConnectionType> for ConnectionType {
554        fn from(natural: crate::natural::ConnectionType) -> Self {
555            Self { value: u8::from(natural.bits()) }
556        }
557    }
558
559    impl ::fidl_next::IntoNatural for ConnectionType {
560        type Natural = crate::natural::ConnectionType;
561    }
562
563    impl ::fidl_next::Unconstrained for ConnectionType {}
564
565    /// The wire type corresponding to [`ConnectorConnectRequest`].
566    #[derive(Debug)]
567    #[repr(C)]
568    pub struct ConnectorConnectRequest {
569        pub server: ::fidl_next::fuchsia::WireChannel,
570    }
571
572    static_assertions::const_assert_eq!(std::mem::size_of::<ConnectorConnectRequest>(), 4);
573    static_assertions::const_assert_eq!(std::mem::align_of::<ConnectorConnectRequest>(), 4);
574
575    static_assertions::const_assert_eq!(std::mem::offset_of!(ConnectorConnectRequest, server), 0);
576
577    unsafe impl ::fidl_next::Wire for ConnectorConnectRequest {
578        type Decoded<'de> = ConnectorConnectRequest;
579
580        #[inline]
581        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
582            ::fidl_next::munge! {
583                let Self {
584
585                    server,
586
587                } = &mut *out_;
588            }
589
590            ::fidl_next::Wire::zero_padding(server);
591        }
592    }
593
594    unsafe impl<___D> ::fidl_next::Decode<___D> for ConnectorConnectRequest
595    where
596        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
597        ___D: ::fidl_next::fuchsia::HandleDecoder,
598    {
599        fn decode(
600            slot_: ::fidl_next::Slot<'_, Self>,
601            decoder_: &mut ___D,
602            _: (),
603        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
604            ::fidl_next::munge! {
605                let Self {
606
607                    mut server,
608
609                } = slot_;
610            }
611
612            let _field = server.as_mut();
613
614            ::fidl_next::Decode::decode(server.as_mut(), decoder_, ())?;
615
616            Ok(())
617        }
618    }
619
620    impl ::fidl_next::IntoNatural for ConnectorConnectRequest {
621        type Natural = crate::natural::ConnectorConnectRequest;
622    }
623
624    impl ::fidl_next::Unconstrained for ConnectorConnectRequest {}
625
626    /// The wire type corresponding to [`DevfsAddArgs`].
627    #[repr(C)]
628    pub struct DevfsAddArgs<'de> {
629        pub(crate) table: ::fidl_next::WireTable<'de>,
630    }
631
632    impl<'de> Drop for DevfsAddArgs<'de> {
633        fn drop(&mut self) {
634            let _ = self.table.get(1)
635                .map(|envelope| unsafe {
636                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::WireChannel>>()
637                });
638
639            let _ = self.table.get(2).map(|envelope| unsafe {
640                envelope.read_unchecked::<::fidl_next::WireString<'de>>()
641            });
642
643            let _ = self.table.get(3).map(|envelope| unsafe {
644                envelope.read_unchecked::<::fidl_next::fuchsia::WireVmo>()
645            });
646
647            let _ = self.table.get(4).map(|envelope| unsafe {
648                envelope.read_unchecked::<crate::wire::ConnectionType>()
649            });
650
651            let _ = self.table.get(5)
652                .map(|envelope| unsafe {
653                    envelope.read_unchecked::<::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::WireChannel>>()
654                });
655        }
656    }
657
658    unsafe impl ::fidl_next::Wire for DevfsAddArgs<'static> {
659        type Decoded<'de> = DevfsAddArgs<'de>;
660
661        #[inline]
662        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
663            ::fidl_next::munge!(let Self { table } = out);
664            ::fidl_next::WireTable::zero_padding(table);
665        }
666    }
667
668    unsafe impl<___D> ::fidl_next::Decode<___D> for DevfsAddArgs<'static>
669    where
670        ___D: ::fidl_next::Decoder + ?Sized,
671        ___D: ::fidl_next::fuchsia::HandleDecoder,
672    {
673        fn decode(
674            slot: ::fidl_next::Slot<'_, Self>,
675            decoder: &mut ___D,
676            _: (),
677        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
678            ::fidl_next::munge!(let Self { table } = slot);
679
680            ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
681                match ordinal {
682                    0 => unsafe { ::core::hint::unreachable_unchecked() },
683
684                    1 => {
685                        ::fidl_next::WireEnvelope::decode_as::<
686                            ___D,
687                            ::fidl_next::ClientEnd<
688                                crate::Connector,
689                                ::fidl_next::fuchsia::WireChannel,
690                            >,
691                        >(slot.as_mut(), decoder, ())?;
692
693                        Ok(())
694                    }
695
696                    2 => {
697                        ::fidl_next::WireEnvelope::decode_as::<
698                            ___D,
699                            ::fidl_next::WireString<'static>,
700                        >(slot.as_mut(), decoder, 255)?;
701
702                        let value = unsafe {
703                            slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
704                        };
705
706                        if value.len() > 255 {
707                            return Err(::fidl_next::DecodeError::VectorTooLong {
708                                size: value.len() as u64,
709                                limit: 255,
710                            });
711                        }
712
713                        Ok(())
714                    }
715
716                    3 => {
717                        ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireVmo>(
718                            slot.as_mut(),
719                            decoder,
720                            (),
721                        )?;
722
723                        Ok(())
724                    }
725
726                    4 => {
727                        ::fidl_next::WireEnvelope::decode_as::<___D, crate::wire::ConnectionType>(
728                            slot.as_mut(),
729                            decoder,
730                            (),
731                        )?;
732
733                        Ok(())
734                    }
735
736                    5 => {
737                        ::fidl_next::WireEnvelope::decode_as::<
738                            ___D,
739                            ::fidl_next::ClientEnd<
740                                crate::Connector,
741                                ::fidl_next::fuchsia::WireChannel,
742                            >,
743                        >(slot.as_mut(), decoder, ())?;
744
745                        Ok(())
746                    }
747
748                    _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
749                }
750            })
751        }
752    }
753
754    impl<'de> DevfsAddArgs<'de> {
755        pub fn connector(
756            &self,
757        ) -> ::core::option::Option<
758            &::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::WireChannel>,
759        > {
760            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
761        }
762
763        pub fn class_name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
764            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
765        }
766
767        pub fn inspect(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireVmo> {
768            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
769        }
770
771        pub fn connector_supports(&self) -> ::core::option::Option<&crate::wire::ConnectionType> {
772            unsafe { Some(self.table.get(4)?.deref_unchecked()) }
773        }
774
775        pub fn controller_connector(
776            &self,
777        ) -> ::core::option::Option<
778            &::fidl_next::ClientEnd<crate::Connector, ::fidl_next::fuchsia::WireChannel>,
779        > {
780            unsafe { Some(self.table.get(5)?.deref_unchecked()) }
781        }
782    }
783
784    impl<'de> ::core::fmt::Debug for DevfsAddArgs<'de> {
785        fn fmt(
786            &self,
787            f: &mut ::core::fmt::Formatter<'_>,
788        ) -> ::core::result::Result<(), ::core::fmt::Error> {
789            f.debug_struct("DevfsAddArgs")
790                .field("connector", &self.connector())
791                .field("class_name", &self.class_name())
792                .field("inspect", &self.inspect())
793                .field("connector_supports", &self.connector_supports())
794                .field("controller_connector", &self.controller_connector())
795                .finish()
796        }
797    }
798
799    impl<'de> ::fidl_next::IntoNatural for DevfsAddArgs<'de> {
800        type Natural = crate::natural::DevfsAddArgs;
801    }
802
803    impl ::fidl_next::Unconstrained for DevfsAddArgs<'_> {}
804
805    /// The wire type corresponding to [`TopologicalPathGetTopologicalPathResponse`].
806    #[derive(Debug)]
807    #[repr(C)]
808    pub struct TopologicalPathGetTopologicalPathResponse<'de> {
809        pub path: ::fidl_next::WireString<'de>,
810    }
811
812    static_assertions::const_assert_eq!(
813        std::mem::size_of::<TopologicalPathGetTopologicalPathResponse<'_>>(),
814        16
815    );
816    static_assertions::const_assert_eq!(
817        std::mem::align_of::<TopologicalPathGetTopologicalPathResponse<'_>>(),
818        8
819    );
820
821    static_assertions::const_assert_eq!(
822        std::mem::offset_of!(TopologicalPathGetTopologicalPathResponse<'_>, path),
823        0
824    );
825
826    unsafe impl ::fidl_next::Wire for TopologicalPathGetTopologicalPathResponse<'static> {
827        type Decoded<'de> = TopologicalPathGetTopologicalPathResponse<'de>;
828
829        #[inline]
830        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
831            ::fidl_next::munge! {
832                let Self {
833
834                    path,
835
836                } = &mut *out_;
837            }
838
839            ::fidl_next::Wire::zero_padding(path);
840        }
841    }
842
843    unsafe impl<___D> ::fidl_next::Decode<___D> for TopologicalPathGetTopologicalPathResponse<'static>
844    where
845        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
846        ___D: ::fidl_next::Decoder,
847    {
848        fn decode(
849            slot_: ::fidl_next::Slot<'_, Self>,
850            decoder_: &mut ___D,
851            _: (),
852        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
853            ::fidl_next::munge! {
854                let Self {
855
856                    mut path,
857
858                } = slot_;
859            }
860
861            let _field = path.as_mut();
862            ::fidl_next::Constrained::validate(_field, 1024)?;
863            ::fidl_next::Decode::decode(path.as_mut(), decoder_, 1024)?;
864
865            let path = unsafe { path.deref_unchecked() };
866
867            if path.len() > 1024 {
868                return Err(::fidl_next::DecodeError::VectorTooLong {
869                    size: path.len() as u64,
870                    limit: 1024,
871                });
872            }
873
874            Ok(())
875        }
876    }
877
878    impl<'de> ::fidl_next::IntoNatural for TopologicalPathGetTopologicalPathResponse<'de> {
879        type Natural = crate::natural::TopologicalPathGetTopologicalPathResponse;
880    }
881
882    impl ::fidl_next::Unconstrained for TopologicalPathGetTopologicalPathResponse<'static> {}
883}
884
885pub mod wire_optional {}
886
887pub use self::natural::*;
888
889/// The type corresponding to the Connector protocol.
890#[doc = " A connector lets a client forward the server end of a protocol.\n"]
891#[derive(PartialEq, Debug)]
892pub struct Connector;
893
894pub mod connector {
895    pub mod prelude {
896        pub use crate::{Connector, ConnectorClientHandler, ConnectorServerHandler, connector};
897
898        pub use crate::natural::ConnectorConnectRequest;
899    }
900
901    pub struct Connect;
902
903    impl ::fidl_next::Method for Connect {
904        const ORDINAL: u64 = 3169778387179902201;
905
906        type Protocol = crate::Connector;
907
908        type Request = crate::wire::ConnectorConnectRequest;
909
910        type Response = ::fidl_next::Never;
911    }
912
913    mod ___detail {
914
915        pub struct Connect<T0> {
916            server: T0,
917        }
918
919        impl<T0> ::fidl_next::Encodable for Connect<T0>
920        where
921            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireChannel>,
922        {
923            type Encoded = crate::wire::ConnectorConnectRequest;
924        }
925
926        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Connect<T0>
927        where
928            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
929            ___E: ::fidl_next::fuchsia::HandleEncoder,
930            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireChannel>,
931        {
932            #[inline]
933            fn encode(
934                self,
935                encoder_: &mut ___E,
936                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
937                _: (),
938            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
939                ::fidl_next::munge! {
940                    let Self::Encoded {
941                        server,
942
943                    } = out_;
944                }
945
946                ::fidl_next::Encode::encode(self.server, encoder_, server, ())?;
947
948                Ok(())
949            }
950        }
951
952        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Connector
953        where
954            ___T: ::fidl_next::Transport,
955        {
956            type Client = ConnectorClient<___T>;
957            type Server = ConnectorServer<___T>;
958        }
959
960        /// The client for the `Connector` protocol.
961        #[repr(transparent)]
962        pub struct ConnectorClient<___T: ::fidl_next::Transport> {
963            #[allow(dead_code)]
964            client: ::fidl_next::protocol::Client<___T>,
965        }
966
967        impl<___T> ConnectorClient<___T>
968        where
969            ___T: ::fidl_next::Transport,
970        {
971            #[doc = " Forward a server end of a protocol so that it can be connected.\n + request `server` the server end of the protocol to be served. The FIDL protocol that\n     this speaks is determined out-of-band.\n - response This function has no response. The function is one-way to match the pipelining\n     behaviors of other virtual filesystems.\n"]
972            pub fn connect(
973                &self,
974
975                server: impl ::fidl_next::Encode<
976                    <___T as ::fidl_next::Transport>::SendBuffer,
977                    Encoded = ::fidl_next::fuchsia::WireChannel,
978                >,
979            ) -> ::fidl_next::SendFuture<'_, ___T>
980            where
981                <___T as ::fidl_next::Transport>::SendBuffer:
982                    ::fidl_next::encoder::InternalHandleEncoder,
983                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
984            {
985                self.connect_with(Connect { server })
986            }
987
988            #[doc = " Forward a server end of a protocol so that it can be connected.\n + request `server` the server end of the protocol to be served. The FIDL protocol that\n     this speaks is determined out-of-band.\n - response This function has no response. The function is one-way to match the pipelining\n     behaviors of other virtual filesystems.\n"]
989            pub fn connect_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
990            where
991                ___R: ::fidl_next::Encode<
992                        <___T as ::fidl_next::Transport>::SendBuffer,
993                        Encoded = crate::wire::ConnectorConnectRequest,
994                    >,
995            {
996                ::fidl_next::SendFuture::from_untyped(
997                    self.client.send_one_way(3169778387179902201, request),
998                )
999            }
1000        }
1001
1002        /// The server for the `Connector` protocol.
1003        #[repr(transparent)]
1004        pub struct ConnectorServer<___T: ::fidl_next::Transport> {
1005            server: ::fidl_next::protocol::Server<___T>,
1006        }
1007
1008        impl<___T> ConnectorServer<___T> where ___T: ::fidl_next::Transport {}
1009    }
1010}
1011
1012/// A client handler for the Connector protocol.
1013///
1014/// See [`Connector`] for more details.
1015pub trait ConnectorClientHandler<
1016    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1017    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1018>
1019{
1020}
1021
1022impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Connector
1023where
1024    ___H: ConnectorClientHandler<___T> + ::core::marker::Send,
1025    ___T: ::fidl_next::Transport,
1026{
1027    async fn on_event(
1028        handler: &mut ___H,
1029        ordinal: u64,
1030        buffer: ___T::RecvBuffer,
1031    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1032        match ordinal {
1033            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1034        }
1035    }
1036}
1037
1038/// A server handler for the Connector protocol.
1039///
1040/// See [`Connector`] for more details.
1041pub trait ConnectorServerHandler<
1042    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1043    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1044>
1045{
1046    #[doc = " Forward a server end of a protocol so that it can be connected.\n + request `server` the server end of the protocol to be served. The FIDL protocol that\n     this speaks is determined out-of-band.\n - response This function has no response. The function is one-way to match the pipelining\n     behaviors of other virtual filesystems.\n"]
1047    fn connect(
1048        &mut self,
1049
1050        request: ::fidl_next::Request<connector::Connect, ___T>,
1051    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1052}
1053
1054impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Connector
1055where
1056    ___H: ConnectorServerHandler<___T> + ::core::marker::Send,
1057    ___T: ::fidl_next::Transport,
1058    <connector::Connect as ::fidl_next::Method>::Request:
1059        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1060{
1061    async fn on_one_way(
1062        handler: &mut ___H,
1063        ordinal: u64,
1064        buffer: ___T::RecvBuffer,
1065    ) -> ::core::result::Result<
1066        (),
1067        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1068    > {
1069        match ordinal {
1070            3169778387179902201 => match ::fidl_next::DecoderExt::decode(buffer) {
1071                Ok(decoded) => {
1072                    handler.connect(decoded).await;
1073                    Ok(())
1074                }
1075                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1076                    ordinal: 3169778387179902201,
1077                    error,
1078                }),
1079            },
1080
1081            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1082        }
1083    }
1084
1085    async fn on_two_way(
1086        handler: &mut ___H,
1087        ordinal: u64,
1088        buffer: ___T::RecvBuffer,
1089        responder: ::fidl_next::protocol::Responder<___T>,
1090    ) -> ::core::result::Result<
1091        (),
1092        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1093    > {
1094        match ordinal {
1095            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1096        }
1097    }
1098}
1099
1100#[doc = " This name is reserved for accessing the fuchsia.device/Controller protocol\n within /dev/. No devices can be created with this name.\n"]
1101pub const DEVICE_CONTROLLER_NAME: &str = "device_controller";
1102
1103#[doc = " This name is reserved for accessing the device specific protocol\n within /dev/. No devices can be created with this name.\n"]
1104pub const DEVICE_PROTOCOL_NAME: &str = "device_protocol";
1105
1106#[doc = " This name is reserved for accessing the fuchsia.device.fs/TopologicalPath protocol\n within /dev/. No devices can be created with this name.\n"]
1107pub const DEVICE_TOPOLOGY_NAME: &str = "device_topology";
1108
1109#[doc = " Maximum length of a device path\n"]
1110pub const MAX_DEVICE_PATH_LEN: u64 = 1024 as u64;
1111
1112#[doc = " Maximum length for a driver path\n"]
1113pub const MAX_DRIVER_PATH_LEN: u64 = 1024 as u64;
1114
1115/// The type corresponding to the TopologicalPath protocol.
1116#[derive(PartialEq, Debug)]
1117pub struct TopologicalPath;
1118
1119pub mod topological_path {
1120    pub mod prelude {
1121        pub use crate::{
1122            TopologicalPath, TopologicalPathClientHandler, TopologicalPathServerHandler,
1123            topological_path,
1124        };
1125
1126        pub use crate::natural::TopologicalPathGetTopologicalPathResponse;
1127    }
1128
1129    pub struct GetTopologicalPath;
1130
1131    impl ::fidl_next::Method for GetTopologicalPath {
1132        const ORDINAL: u64 = 6266213890697819096;
1133
1134        type Protocol = crate::TopologicalPath;
1135
1136        type Request = ();
1137
1138        type Response = ::fidl_next::WireResult<
1139            'static,
1140            crate::wire::TopologicalPathGetTopologicalPathResponse<'static>,
1141            ::fidl_next::WireI32,
1142        >;
1143    }
1144
1145    mod ___detail {
1146
1147        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::TopologicalPath
1148        where
1149            ___T: ::fidl_next::Transport,
1150        {
1151            type Client = TopologicalPathClient<___T>;
1152            type Server = TopologicalPathServer<___T>;
1153        }
1154
1155        /// The client for the `TopologicalPath` protocol.
1156        #[repr(transparent)]
1157        pub struct TopologicalPathClient<___T: ::fidl_next::Transport> {
1158            #[allow(dead_code)]
1159            client: ::fidl_next::protocol::Client<___T>,
1160        }
1161
1162        impl<___T> TopologicalPathClient<___T>
1163        where
1164            ___T: ::fidl_next::Transport,
1165        {
1166            #[doc = " Return the topological path for this device\n"]
1167            pub fn get_topological_path(
1168                &self,
1169            ) -> ::fidl_next::TwoWayFuture<'_, super::GetTopologicalPath, ___T> {
1170                ::fidl_next::TwoWayFuture::from_untyped(
1171                    self.client.send_two_way(6266213890697819096, ()),
1172                )
1173            }
1174        }
1175
1176        /// The server for the `TopologicalPath` protocol.
1177        #[repr(transparent)]
1178        pub struct TopologicalPathServer<___T: ::fidl_next::Transport> {
1179            server: ::fidl_next::protocol::Server<___T>,
1180        }
1181
1182        impl<___T> TopologicalPathServer<___T> where ___T: ::fidl_next::Transport {}
1183    }
1184}
1185
1186/// A client handler for the TopologicalPath protocol.
1187///
1188/// See [`TopologicalPath`] for more details.
1189pub trait TopologicalPathClientHandler<
1190    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1191    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1192>
1193{
1194}
1195
1196impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for TopologicalPath
1197where
1198    ___H: TopologicalPathClientHandler<___T> + ::core::marker::Send,
1199    ___T: ::fidl_next::Transport,
1200    <topological_path::GetTopologicalPath as ::fidl_next::Method>::Response:
1201        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
1202{
1203    async fn on_event(
1204        handler: &mut ___H,
1205        ordinal: u64,
1206        buffer: ___T::RecvBuffer,
1207    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1208        match ordinal {
1209            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1210        }
1211    }
1212}
1213
1214/// A server handler for the TopologicalPath protocol.
1215///
1216/// See [`TopologicalPath`] for more details.
1217pub trait TopologicalPathServerHandler<
1218    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
1219    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1220>
1221{
1222    #[doc = " Return the topological path for this device\n"]
1223    fn get_topological_path(
1224        &mut self,
1225
1226        responder: ::fidl_next::Responder<topological_path::GetTopologicalPath, ___T>,
1227    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1228}
1229
1230impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for TopologicalPath
1231where
1232    ___H: TopologicalPathServerHandler<___T> + ::core::marker::Send,
1233    ___T: ::fidl_next::Transport,
1234{
1235    async fn on_one_way(
1236        handler: &mut ___H,
1237        ordinal: u64,
1238        buffer: ___T::RecvBuffer,
1239    ) -> ::core::result::Result<
1240        (),
1241        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1242    > {
1243        match ordinal {
1244            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1245        }
1246    }
1247
1248    async fn on_two_way(
1249        handler: &mut ___H,
1250        ordinal: u64,
1251        buffer: ___T::RecvBuffer,
1252        responder: ::fidl_next::protocol::Responder<___T>,
1253    ) -> ::core::result::Result<
1254        (),
1255        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1256    > {
1257        match ordinal {
1258            6266213890697819096 => {
1259                let responder = ::fidl_next::Responder::from_untyped(responder);
1260
1261                handler.get_topological_path(responder).await;
1262                Ok(())
1263            }
1264
1265            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
1266        }
1267    }
1268}
1269
1270/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
1271pub mod compat {
1272
1273    impl ::fidl_next::CompatFrom<crate::ConnectionType> for ::fidl_fuchsia_device_fs::ConnectionType {
1274        fn compat_from(value: crate::ConnectionType) -> Self {
1275            Self::from_bits_retain(value.bits())
1276        }
1277    }
1278
1279    impl ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::ConnectionType> for crate::ConnectionType {
1280        fn compat_from(value: ::fidl_fuchsia_device_fs::ConnectionType) -> Self {
1281            Self::from_bits_retain(value.bits())
1282        }
1283    }
1284
1285    impl ::fidl_next::CompatFrom<crate::ConnectorConnectRequest>
1286        for ::fidl_fuchsia_device_fs::ConnectorConnectRequest
1287    {
1288        #[inline]
1289        fn compat_from(value: crate::ConnectorConnectRequest) -> Self {
1290            Self { server: ::fidl_next::CompatFrom::compat_from(value.server) }
1291        }
1292    }
1293
1294    impl ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::ConnectorConnectRequest>
1295        for crate::ConnectorConnectRequest
1296    {
1297        #[inline]
1298        fn compat_from(value: ::fidl_fuchsia_device_fs::ConnectorConnectRequest) -> Self {
1299            Self { server: ::fidl_next::CompatFrom::compat_from(value.server) }
1300        }
1301    }
1302
1303    #[cfg(target_os = "fuchsia")]
1304    /// An alias for a client over `zx::Channel` for the `Connector`
1305    /// protocol.
1306    pub type ConnectorProxy = ::fidl_next::Client<crate::Connector>;
1307
1308    impl ::fidl_next::CompatFrom<crate::Connector> for ::fidl_fuchsia_device_fs::ConnectorMarker {
1309        fn compat_from(_: crate::Connector) -> Self {
1310            Self
1311        }
1312    }
1313
1314    impl ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::ConnectorMarker> for crate::Connector {
1315        fn compat_from(_: ::fidl_fuchsia_device_fs::ConnectorMarker) -> Self {
1316            Self
1317        }
1318    }
1319
1320    #[cfg(target_os = "fuchsia")]
1321
1322    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_device_fs::ConnectorProxy> for crate::Connector {
1323        fn client_compat_from(
1324            proxy: ::fidl_fuchsia_device_fs::ConnectorProxy,
1325        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
1326            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
1327            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
1328            ::fidl_next::ClientDispatcher::new(client_end)
1329        }
1330    }
1331
1332    impl ::fidl_next::CompatFrom<crate::DevfsAddArgs> for ::fidl_fuchsia_device_fs::DevfsAddArgs {
1333        fn compat_from(value: crate::DevfsAddArgs) -> Self {
1334            Self {
1335                connector: ::fidl_next::CompatFrom::compat_from(value.connector),
1336
1337                class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
1338
1339                inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
1340
1341                connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
1342
1343                controller_connector: ::fidl_next::CompatFrom::compat_from(
1344                    value.controller_connector,
1345                ),
1346
1347                __source_breaking: ::fidl::marker::SourceBreaking,
1348            }
1349        }
1350    }
1351
1352    impl ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::DevfsAddArgs> for crate::DevfsAddArgs {
1353        fn compat_from(value: ::fidl_fuchsia_device_fs::DevfsAddArgs) -> Self {
1354            Self {
1355                connector: ::fidl_next::CompatFrom::compat_from(value.connector),
1356
1357                class_name: ::fidl_next::CompatFrom::compat_from(value.class_name),
1358
1359                inspect: ::fidl_next::CompatFrom::compat_from(value.inspect),
1360
1361                connector_supports: ::fidl_next::CompatFrom::compat_from(value.connector_supports),
1362
1363                controller_connector: ::fidl_next::CompatFrom::compat_from(
1364                    value.controller_connector,
1365                ),
1366            }
1367        }
1368    }
1369
1370    impl ::fidl_next::CompatFrom<crate::TopologicalPathGetTopologicalPathResponse>
1371        for ::fidl_fuchsia_device_fs::TopologicalPathGetTopologicalPathResponse
1372    {
1373        #[inline]
1374        fn compat_from(value: crate::TopologicalPathGetTopologicalPathResponse) -> Self {
1375            Self { path: ::fidl_next::CompatFrom::compat_from(value.path) }
1376        }
1377    }
1378
1379    impl
1380        ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::TopologicalPathGetTopologicalPathResponse>
1381        for crate::TopologicalPathGetTopologicalPathResponse
1382    {
1383        #[inline]
1384        fn compat_from(
1385            value: ::fidl_fuchsia_device_fs::TopologicalPathGetTopologicalPathResponse,
1386        ) -> Self {
1387            Self { path: ::fidl_next::CompatFrom::compat_from(value.path) }
1388        }
1389    }
1390
1391    #[cfg(target_os = "fuchsia")]
1392    /// An alias for a client over `zx::Channel` for the `TopologicalPath`
1393    /// protocol.
1394    pub type TopologicalPathProxy = ::fidl_next::Client<crate::TopologicalPath>;
1395
1396    impl ::fidl_next::CompatFrom<crate::TopologicalPath>
1397        for ::fidl_fuchsia_device_fs::TopologicalPathMarker
1398    {
1399        fn compat_from(_: crate::TopologicalPath) -> Self {
1400            Self
1401        }
1402    }
1403
1404    impl ::fidl_next::CompatFrom<::fidl_fuchsia_device_fs::TopologicalPathMarker>
1405        for crate::TopologicalPath
1406    {
1407        fn compat_from(_: ::fidl_fuchsia_device_fs::TopologicalPathMarker) -> Self {
1408            Self
1409        }
1410    }
1411
1412    #[cfg(target_os = "fuchsia")]
1413
1414    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_device_fs::TopologicalPathProxy>
1415        for crate::TopologicalPath
1416    {
1417        fn client_compat_from(
1418            proxy: ::fidl_fuchsia_device_fs::TopologicalPathProxy,
1419        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
1420            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
1421            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
1422            ::fidl_next::ClientDispatcher::new(client_end)
1423        }
1424    }
1425}