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