1#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7 pub use fidl_next_common_fuchsia_driver_token::natural::*;
8
9 #[derive(Debug, PartialEq)]
10 #[repr(C)]
11 pub struct DebugLogStackTraceRequest {
12 pub node_token: ::fidl_next::fuchsia::zx::Event,
13 }
14
15 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DebugLogStackTraceRequest, ___E>
16 for DebugLogStackTraceRequest
17 where
18 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
19 ___E: ::fidl_next::fuchsia::HandleEncoder,
20 {
21 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
22 Self,
23 crate::wire::DebugLogStackTraceRequest,
24 > = unsafe {
25 ::fidl_next::CopyOptimization::enable_if(
26 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
27 ::fidl_next::wire::fuchsia::Event,
28 ___E,
29 >>::COPY_OPTIMIZATION
30 .is_enabled(),
31 )
32 };
33
34 #[inline]
35 fn encode(
36 self,
37 encoder_: &mut ___E,
38 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugLogStackTraceRequest>,
39 _: (),
40 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
41 ::fidl_next::munge! {
42 let crate::wire::DebugLogStackTraceRequest {
43 node_token,
44
45 } = out_;
46 }
47
48 ::fidl_next::Encode::encode(self.node_token, encoder_, node_token, ())?;
49
50 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_token.as_mut_ptr()) };
51
52 Ok(())
53 }
54 }
55
56 unsafe impl<___E>
57 ::fidl_next::EncodeOption<
58 ::fidl_next::wire::Box<'static, crate::wire::DebugLogStackTraceRequest>,
59 ___E,
60 > for DebugLogStackTraceRequest
61 where
62 ___E: ::fidl_next::Encoder + ?Sized,
63 DebugLogStackTraceRequest:
64 ::fidl_next::Encode<crate::wire::DebugLogStackTraceRequest, ___E>,
65 {
66 #[inline]
67 fn encode_option(
68 this: ::core::option::Option<Self>,
69 encoder: &mut ___E,
70 out: &mut ::core::mem::MaybeUninit<
71 ::fidl_next::wire::Box<'static, crate::wire::DebugLogStackTraceRequest>,
72 >,
73 _: (),
74 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
75 if let Some(inner) = this {
76 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
77 ::fidl_next::wire::Box::encode_present(out);
78 } else {
79 ::fidl_next::wire::Box::encode_absent(out);
80 }
81
82 Ok(())
83 }
84 }
85
86 impl ::fidl_next::FromWire<crate::wire::DebugLogStackTraceRequest> for DebugLogStackTraceRequest {
87 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
88 crate::wire::DebugLogStackTraceRequest,
89 Self,
90 > = unsafe {
91 ::fidl_next::CopyOptimization::enable_if(
92 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
93 ::fidl_next::wire::fuchsia::Event,
94 >>::COPY_OPTIMIZATION
95 .is_enabled(),
96 )
97 };
98
99 #[inline]
100 fn from_wire(wire: crate::wire::DebugLogStackTraceRequest) -> Self {
101 Self { node_token: ::fidl_next::FromWire::from_wire(wire.node_token) }
102 }
103 }
104
105 #[derive(Debug, PartialEq)]
106 #[repr(C)]
107 pub struct DebugGetHostKoidRequest {
108 pub node_token: ::fidl_next::fuchsia::zx::Event,
109 }
110
111 unsafe impl<___E> ::fidl_next::Encode<crate::wire::DebugGetHostKoidRequest, ___E>
112 for DebugGetHostKoidRequest
113 where
114 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
115 ___E: ::fidl_next::fuchsia::HandleEncoder,
116 {
117 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
118 Self,
119 crate::wire::DebugGetHostKoidRequest,
120 > = unsafe {
121 ::fidl_next::CopyOptimization::enable_if(
122 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
123 ::fidl_next::wire::fuchsia::Event,
124 ___E,
125 >>::COPY_OPTIMIZATION
126 .is_enabled(),
127 )
128 };
129
130 #[inline]
131 fn encode(
132 self,
133 encoder_: &mut ___E,
134 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugGetHostKoidRequest>,
135 _: (),
136 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
137 ::fidl_next::munge! {
138 let crate::wire::DebugGetHostKoidRequest {
139 node_token,
140
141 } = out_;
142 }
143
144 ::fidl_next::Encode::encode(self.node_token, encoder_, node_token, ())?;
145
146 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(node_token.as_mut_ptr()) };
147
148 Ok(())
149 }
150 }
151
152 unsafe impl<___E>
153 ::fidl_next::EncodeOption<
154 ::fidl_next::wire::Box<'static, crate::wire::DebugGetHostKoidRequest>,
155 ___E,
156 > for DebugGetHostKoidRequest
157 where
158 ___E: ::fidl_next::Encoder + ?Sized,
159 DebugGetHostKoidRequest: ::fidl_next::Encode<crate::wire::DebugGetHostKoidRequest, ___E>,
160 {
161 #[inline]
162 fn encode_option(
163 this: ::core::option::Option<Self>,
164 encoder: &mut ___E,
165 out: &mut ::core::mem::MaybeUninit<
166 ::fidl_next::wire::Box<'static, crate::wire::DebugGetHostKoidRequest>,
167 >,
168 _: (),
169 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
170 if let Some(inner) = this {
171 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
172 ::fidl_next::wire::Box::encode_present(out);
173 } else {
174 ::fidl_next::wire::Box::encode_absent(out);
175 }
176
177 Ok(())
178 }
179 }
180
181 impl ::fidl_next::FromWire<crate::wire::DebugGetHostKoidRequest> for DebugGetHostKoidRequest {
182 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
183 crate::wire::DebugGetHostKoidRequest,
184 Self,
185 > = unsafe {
186 ::fidl_next::CopyOptimization::enable_if(
187 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
188 ::fidl_next::wire::fuchsia::Event,
189 >>::COPY_OPTIMIZATION
190 .is_enabled(),
191 )
192 };
193
194 #[inline]
195 fn from_wire(wire: crate::wire::DebugGetHostKoidRequest) -> Self {
196 Self { node_token: ::fidl_next::FromWire::from_wire(wire.node_token) }
197 }
198 }
199
200 #[derive(Debug, PartialEq)]
201 #[repr(C)]
202 pub struct NodeBusTopologyGetRequest {
203 pub token: ::fidl_next::fuchsia::zx::Event,
204 }
205
206 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeBusTopologyGetRequest, ___E>
207 for NodeBusTopologyGetRequest
208 where
209 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
210 ___E: ::fidl_next::fuchsia::HandleEncoder,
211 {
212 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
213 Self,
214 crate::wire::NodeBusTopologyGetRequest,
215 > = unsafe {
216 ::fidl_next::CopyOptimization::enable_if(
217 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
218 ::fidl_next::wire::fuchsia::Event,
219 ___E,
220 >>::COPY_OPTIMIZATION
221 .is_enabled(),
222 )
223 };
224
225 #[inline]
226 fn encode(
227 self,
228 encoder_: &mut ___E,
229 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeBusTopologyGetRequest>,
230 _: (),
231 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
232 ::fidl_next::munge! {
233 let crate::wire::NodeBusTopologyGetRequest {
234 token,
235
236 } = out_;
237 }
238
239 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
240
241 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
242
243 Ok(())
244 }
245 }
246
247 unsafe impl<___E>
248 ::fidl_next::EncodeOption<
249 ::fidl_next::wire::Box<'static, crate::wire::NodeBusTopologyGetRequest>,
250 ___E,
251 > for NodeBusTopologyGetRequest
252 where
253 ___E: ::fidl_next::Encoder + ?Sized,
254 NodeBusTopologyGetRequest:
255 ::fidl_next::Encode<crate::wire::NodeBusTopologyGetRequest, ___E>,
256 {
257 #[inline]
258 fn encode_option(
259 this: ::core::option::Option<Self>,
260 encoder: &mut ___E,
261 out: &mut ::core::mem::MaybeUninit<
262 ::fidl_next::wire::Box<'static, crate::wire::NodeBusTopologyGetRequest>,
263 >,
264 _: (),
265 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
266 if let Some(inner) = this {
267 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
268 ::fidl_next::wire::Box::encode_present(out);
269 } else {
270 ::fidl_next::wire::Box::encode_absent(out);
271 }
272
273 Ok(())
274 }
275 }
276
277 impl ::fidl_next::FromWire<crate::wire::NodeBusTopologyGetRequest> for NodeBusTopologyGetRequest {
278 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
279 crate::wire::NodeBusTopologyGetRequest,
280 Self,
281 > = unsafe {
282 ::fidl_next::CopyOptimization::enable_if(
283 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
284 ::fidl_next::wire::fuchsia::Event,
285 >>::COPY_OPTIMIZATION
286 .is_enabled(),
287 )
288 };
289
290 #[inline]
291 fn from_wire(wire: crate::wire::NodeBusTopologyGetRequest) -> Self {
292 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
293 }
294 }
295
296 #[derive(Debug, PartialEq)]
297 #[repr(C)]
298 pub struct NodeTokenGetResponse {
299 pub token: ::fidl_next::fuchsia::zx::Event,
300 }
301
302 unsafe impl<___E> ::fidl_next::Encode<crate::wire::NodeTokenGetResponse, ___E>
303 for NodeTokenGetResponse
304 where
305 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
306 ___E: ::fidl_next::fuchsia::HandleEncoder,
307 {
308 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
309 Self,
310 crate::wire::NodeTokenGetResponse,
311 > = unsafe {
312 ::fidl_next::CopyOptimization::enable_if(
313 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encode<
314 ::fidl_next::wire::fuchsia::Event,
315 ___E,
316 >>::COPY_OPTIMIZATION
317 .is_enabled(),
318 )
319 };
320
321 #[inline]
322 fn encode(
323 self,
324 encoder_: &mut ___E,
325 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeTokenGetResponse>,
326 _: (),
327 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
328 ::fidl_next::munge! {
329 let crate::wire::NodeTokenGetResponse {
330 token,
331
332 } = out_;
333 }
334
335 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
336
337 let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(token.as_mut_ptr()) };
338
339 Ok(())
340 }
341 }
342
343 unsafe impl<___E>
344 ::fidl_next::EncodeOption<
345 ::fidl_next::wire::Box<'static, crate::wire::NodeTokenGetResponse>,
346 ___E,
347 > for NodeTokenGetResponse
348 where
349 ___E: ::fidl_next::Encoder + ?Sized,
350 NodeTokenGetResponse: ::fidl_next::Encode<crate::wire::NodeTokenGetResponse, ___E>,
351 {
352 #[inline]
353 fn encode_option(
354 this: ::core::option::Option<Self>,
355 encoder: &mut ___E,
356 out: &mut ::core::mem::MaybeUninit<
357 ::fidl_next::wire::Box<'static, crate::wire::NodeTokenGetResponse>,
358 >,
359 _: (),
360 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
361 if let Some(inner) = this {
362 ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
363 ::fidl_next::wire::Box::encode_present(out);
364 } else {
365 ::fidl_next::wire::Box::encode_absent(out);
366 }
367
368 Ok(())
369 }
370 }
371
372 impl ::fidl_next::FromWire<crate::wire::NodeTokenGetResponse> for NodeTokenGetResponse {
373 const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
374 crate::wire::NodeTokenGetResponse,
375 Self,
376 > = unsafe {
377 ::fidl_next::CopyOptimization::enable_if(
378 true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
379 ::fidl_next::wire::fuchsia::Event,
380 >>::COPY_OPTIMIZATION
381 .is_enabled(),
382 )
383 };
384
385 #[inline]
386 fn from_wire(wire: crate::wire::NodeTokenGetResponse) -> Self {
387 Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
388 }
389 }
390}
391
392pub mod wire {
393
394 pub use fidl_next_common_fuchsia_driver_token::wire::*;
395
396 #[derive(Debug)]
398 #[repr(C)]
399 pub struct DebugLogStackTraceRequest {
400 pub node_token: ::fidl_next::wire::fuchsia::Event,
401 }
402
403 static_assertions::const_assert_eq!(std::mem::size_of::<DebugLogStackTraceRequest>(), 4);
404 static_assertions::const_assert_eq!(std::mem::align_of::<DebugLogStackTraceRequest>(), 4);
405
406 static_assertions::const_assert_eq!(
407 std::mem::offset_of!(DebugLogStackTraceRequest, node_token),
408 0
409 );
410
411 impl ::fidl_next::Constrained for DebugLogStackTraceRequest {
412 type Constraint = ();
413
414 fn validate(
415 _: ::fidl_next::Slot<'_, Self>,
416 _: Self::Constraint,
417 ) -> Result<(), ::fidl_next::ValidationError> {
418 Ok(())
419 }
420 }
421
422 unsafe impl ::fidl_next::Wire for DebugLogStackTraceRequest {
423 type Narrowed<'de> = DebugLogStackTraceRequest;
424
425 #[inline]
426 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
427 ::fidl_next::munge! {
428 let Self {
429 node_token,
430
431 } = &mut *out_;
432 }
433
434 ::fidl_next::Wire::zero_padding(node_token);
435 }
436 }
437
438 unsafe impl<___D> ::fidl_next::Decode<___D> for DebugLogStackTraceRequest
439 where
440 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
441 ___D: ::fidl_next::fuchsia::HandleDecoder,
442 {
443 fn decode(
444 slot_: ::fidl_next::Slot<'_, Self>,
445 decoder_: &mut ___D,
446 _: (),
447 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
448 ::fidl_next::munge! {
449 let Self {
450 mut node_token,
451
452 } = slot_;
453 }
454
455 let _field = node_token.as_mut();
456
457 ::fidl_next::Decode::decode(node_token.as_mut(), decoder_, ())?;
458
459 Ok(())
460 }
461 }
462
463 impl ::fidl_next::IntoNatural for DebugLogStackTraceRequest {
464 type Natural = crate::natural::DebugLogStackTraceRequest;
465 }
466
467 #[derive(Debug)]
469 #[repr(C)]
470 pub struct DebugGetHostKoidRequest {
471 pub node_token: ::fidl_next::wire::fuchsia::Event,
472 }
473
474 static_assertions::const_assert_eq!(std::mem::size_of::<DebugGetHostKoidRequest>(), 4);
475 static_assertions::const_assert_eq!(std::mem::align_of::<DebugGetHostKoidRequest>(), 4);
476
477 static_assertions::const_assert_eq!(
478 std::mem::offset_of!(DebugGetHostKoidRequest, node_token),
479 0
480 );
481
482 impl ::fidl_next::Constrained for DebugGetHostKoidRequest {
483 type Constraint = ();
484
485 fn validate(
486 _: ::fidl_next::Slot<'_, Self>,
487 _: Self::Constraint,
488 ) -> Result<(), ::fidl_next::ValidationError> {
489 Ok(())
490 }
491 }
492
493 unsafe impl ::fidl_next::Wire for DebugGetHostKoidRequest {
494 type Narrowed<'de> = DebugGetHostKoidRequest;
495
496 #[inline]
497 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
498 ::fidl_next::munge! {
499 let Self {
500 node_token,
501
502 } = &mut *out_;
503 }
504
505 ::fidl_next::Wire::zero_padding(node_token);
506 }
507 }
508
509 unsafe impl<___D> ::fidl_next::Decode<___D> for DebugGetHostKoidRequest
510 where
511 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
512 ___D: ::fidl_next::fuchsia::HandleDecoder,
513 {
514 fn decode(
515 slot_: ::fidl_next::Slot<'_, Self>,
516 decoder_: &mut ___D,
517 _: (),
518 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
519 ::fidl_next::munge! {
520 let Self {
521 mut node_token,
522
523 } = slot_;
524 }
525
526 let _field = node_token.as_mut();
527
528 ::fidl_next::Decode::decode(node_token.as_mut(), decoder_, ())?;
529
530 Ok(())
531 }
532 }
533
534 impl ::fidl_next::IntoNatural for DebugGetHostKoidRequest {
535 type Natural = crate::natural::DebugGetHostKoidRequest;
536 }
537
538 #[derive(Debug)]
540 #[repr(C)]
541 pub struct NodeBusTopologyGetRequest {
542 pub token: ::fidl_next::wire::fuchsia::Event,
543 }
544
545 static_assertions::const_assert_eq!(std::mem::size_of::<NodeBusTopologyGetRequest>(), 4);
546 static_assertions::const_assert_eq!(std::mem::align_of::<NodeBusTopologyGetRequest>(), 4);
547
548 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeBusTopologyGetRequest, token), 0);
549
550 impl ::fidl_next::Constrained for NodeBusTopologyGetRequest {
551 type Constraint = ();
552
553 fn validate(
554 _: ::fidl_next::Slot<'_, Self>,
555 _: Self::Constraint,
556 ) -> Result<(), ::fidl_next::ValidationError> {
557 Ok(())
558 }
559 }
560
561 unsafe impl ::fidl_next::Wire for NodeBusTopologyGetRequest {
562 type Narrowed<'de> = NodeBusTopologyGetRequest;
563
564 #[inline]
565 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
566 ::fidl_next::munge! {
567 let Self {
568 token,
569
570 } = &mut *out_;
571 }
572
573 ::fidl_next::Wire::zero_padding(token);
574 }
575 }
576
577 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeBusTopologyGetRequest
578 where
579 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
580 ___D: ::fidl_next::fuchsia::HandleDecoder,
581 {
582 fn decode(
583 slot_: ::fidl_next::Slot<'_, Self>,
584 decoder_: &mut ___D,
585 _: (),
586 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
587 ::fidl_next::munge! {
588 let Self {
589 mut token,
590
591 } = slot_;
592 }
593
594 let _field = token.as_mut();
595
596 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
597
598 Ok(())
599 }
600 }
601
602 impl ::fidl_next::IntoNatural for NodeBusTopologyGetRequest {
603 type Natural = crate::natural::NodeBusTopologyGetRequest;
604 }
605
606 #[derive(Debug)]
608 #[repr(C)]
609 pub struct NodeTokenGetResponse {
610 pub token: ::fidl_next::wire::fuchsia::Event,
611 }
612
613 static_assertions::const_assert_eq!(std::mem::size_of::<NodeTokenGetResponse>(), 4);
614 static_assertions::const_assert_eq!(std::mem::align_of::<NodeTokenGetResponse>(), 4);
615
616 static_assertions::const_assert_eq!(std::mem::offset_of!(NodeTokenGetResponse, token), 0);
617
618 impl ::fidl_next::Constrained for NodeTokenGetResponse {
619 type Constraint = ();
620
621 fn validate(
622 _: ::fidl_next::Slot<'_, Self>,
623 _: Self::Constraint,
624 ) -> Result<(), ::fidl_next::ValidationError> {
625 Ok(())
626 }
627 }
628
629 unsafe impl ::fidl_next::Wire for NodeTokenGetResponse {
630 type Narrowed<'de> = NodeTokenGetResponse;
631
632 #[inline]
633 fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
634 ::fidl_next::munge! {
635 let Self {
636 token,
637
638 } = &mut *out_;
639 }
640
641 ::fidl_next::Wire::zero_padding(token);
642 }
643 }
644
645 unsafe impl<___D> ::fidl_next::Decode<___D> for NodeTokenGetResponse
646 where
647 ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
648 ___D: ::fidl_next::fuchsia::HandleDecoder,
649 {
650 fn decode(
651 slot_: ::fidl_next::Slot<'_, Self>,
652 decoder_: &mut ___D,
653 _: (),
654 ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
655 ::fidl_next::munge! {
656 let Self {
657 mut token,
658
659 } = slot_;
660 }
661
662 let _field = token.as_mut();
663
664 ::fidl_next::Decode::decode(token.as_mut(), decoder_, ())?;
665
666 Ok(())
667 }
668 }
669
670 impl ::fidl_next::IntoNatural for NodeTokenGetResponse {
671 type Natural = crate::natural::NodeTokenGetResponse;
672 }
673}
674
675pub mod wire_optional {
676
677 pub use fidl_next_common_fuchsia_driver_token::wire_optional::*;
678}
679
680pub mod generic {
681
682 pub use fidl_next_common_fuchsia_driver_token::generic::*;
683
684 pub struct DebugLogStackTraceRequest<T0> {
686 pub node_token: T0,
687 }
688
689 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DebugLogStackTraceRequest, ___E>
690 for DebugLogStackTraceRequest<T0>
691 where
692 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
693 ___E: ::fidl_next::fuchsia::HandleEncoder,
694 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
695 {
696 #[inline]
697 fn encode(
698 self,
699 encoder_: &mut ___E,
700 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugLogStackTraceRequest>,
701 _: (),
702 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
703 ::fidl_next::munge! {
704 let crate::wire::DebugLogStackTraceRequest {
705 node_token,
706
707 } = out_;
708 }
709
710 ::fidl_next::Encode::encode(self.node_token, encoder_, node_token, ())?;
711
712 Ok(())
713 }
714 }
715
716 pub struct DebugGetHostKoidRequest<T0> {
718 pub node_token: T0,
719 }
720
721 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DebugGetHostKoidRequest, ___E>
722 for DebugGetHostKoidRequest<T0>
723 where
724 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
725 ___E: ::fidl_next::fuchsia::HandleEncoder,
726 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
727 {
728 #[inline]
729 fn encode(
730 self,
731 encoder_: &mut ___E,
732 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugGetHostKoidRequest>,
733 _: (),
734 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
735 ::fidl_next::munge! {
736 let crate::wire::DebugGetHostKoidRequest {
737 node_token,
738
739 } = out_;
740 }
741
742 ::fidl_next::Encode::encode(self.node_token, encoder_, node_token, ())?;
743
744 Ok(())
745 }
746 }
747
748 pub struct NodeBusTopologyGetRequest<T0> {
750 pub token: T0,
751 }
752
753 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeBusTopologyGetRequest, ___E>
754 for NodeBusTopologyGetRequest<T0>
755 where
756 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
757 ___E: ::fidl_next::fuchsia::HandleEncoder,
758 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
759 {
760 #[inline]
761 fn encode(
762 self,
763 encoder_: &mut ___E,
764 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeBusTopologyGetRequest>,
765 _: (),
766 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
767 ::fidl_next::munge! {
768 let crate::wire::NodeBusTopologyGetRequest {
769 token,
770
771 } = out_;
772 }
773
774 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
775
776 Ok(())
777 }
778 }
779
780 pub struct NodeTokenGetResponse<T0> {
782 pub token: T0,
783 }
784
785 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeTokenGetResponse, ___E>
786 for NodeTokenGetResponse<T0>
787 where
788 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
789 ___E: ::fidl_next::fuchsia::HandleEncoder,
790 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
791 {
792 #[inline]
793 fn encode(
794 self,
795 encoder_: &mut ___E,
796 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeTokenGetResponse>,
797 _: (),
798 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
799 ::fidl_next::munge! {
800 let crate::wire::NodeTokenGetResponse {
801 token,
802
803 } = out_;
804 }
805
806 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
807
808 Ok(())
809 }
810 }
811}
812
813pub use self::natural::*;
814
815#[doc = " Requests to output driver info to persistent logs.\n"]
817#[derive(PartialEq, Debug)]
818pub struct Debug;
819
820impl ::fidl_next::Discoverable for Debug {
821 const PROTOCOL_NAME: &'static str = "fuchsia.driver.token.Debug";
822}
823
824#[cfg(target_os = "fuchsia")]
825impl ::fidl_next::HasTransport for Debug {
826 type Transport = ::fidl_next::fuchsia::zx::Channel;
827}
828
829pub mod debug {
830 pub mod prelude {
831 pub use crate::{
832 Debug, DebugClientHandler, DebugLocalClientHandler, DebugLocalServerHandler,
833 DebugServerHandler, debug,
834 };
835
836 pub use crate::natural::DebugGetHostKoidRequest;
837
838 pub use crate::natural::DebugLogStackTraceRequest;
839
840 pub use crate::natural::DebugGetHostKoidResponse;
841
842 pub use crate::natural::DebugLogStackTraceResponse;
843 }
844
845 pub struct LogStackTrace;
846
847 impl ::fidl_next::Method for LogStackTrace {
848 const ORDINAL: u64 = 7819263500138978785;
849 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
850 ::fidl_next::protocol::Flexibility::Flexible;
851
852 type Protocol = crate::Debug;
853
854 type Request = crate::wire::DebugLogStackTraceRequest;
855 }
856
857 impl ::fidl_next::TwoWayMethod for LogStackTrace {
858 type Response = ::fidl_next::wire::Result<
859 'static,
860 crate::wire::DebugLogStackTraceResponse,
861 ::fidl_next::wire::fuchsia::StatusResult,
862 >;
863 }
864
865 impl<___R> ::fidl_next::Respond<___R> for LogStackTrace {
866 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
867
868 fn respond(response: ___R) -> Self::Output {
869 ::core::result::Result::Ok(response)
870 }
871 }
872
873 impl<___R> ::fidl_next::RespondErr<___R> for LogStackTrace {
874 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
875
876 fn respond_err(response: ___R) -> Self::Output {
877 ::core::result::Result::Err(response)
878 }
879 }
880
881 pub struct GetHostKoid;
882
883 impl ::fidl_next::Method for GetHostKoid {
884 const ORDINAL: u64 = 2669385982938763036;
885 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
886 ::fidl_next::protocol::Flexibility::Flexible;
887
888 type Protocol = crate::Debug;
889
890 type Request = crate::wire::DebugGetHostKoidRequest;
891 }
892
893 impl ::fidl_next::TwoWayMethod for GetHostKoid {
894 type Response = ::fidl_next::wire::Result<
895 'static,
896 crate::wire::DebugGetHostKoidResponse,
897 ::fidl_next::wire::fuchsia::StatusResult,
898 >;
899 }
900
901 impl<___R> ::fidl_next::Respond<___R> for GetHostKoid {
902 type Output = ::core::result::Result<
903 crate::generic::DebugGetHostKoidResponse<___R>,
904 ::fidl_next::never::Never,
905 >;
906
907 fn respond(response: ___R) -> Self::Output {
908 ::core::result::Result::Ok(crate::generic::DebugGetHostKoidResponse {
909 host_koid: response,
910 })
911 }
912 }
913
914 impl<___R> ::fidl_next::RespondErr<___R> for GetHostKoid {
915 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
916
917 fn respond_err(response: ___R) -> Self::Output {
918 ::core::result::Result::Err(response)
919 }
920 }
921
922 mod ___detail {
923 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Debug
924 where
925 ___T: ::fidl_next::Transport,
926 {
927 type Client = DebugClient<___T>;
928 type Server = DebugServer<___T>;
929 }
930
931 #[repr(transparent)]
933 pub struct DebugClient<___T: ::fidl_next::Transport> {
934 #[allow(dead_code)]
935 client: ::fidl_next::protocol::Client<___T>,
936 }
937
938 impl<___T> DebugClient<___T>
939 where
940 ___T: ::fidl_next::Transport,
941 {
942 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
943 pub fn log_stack_trace(
944 &self,
945
946 node_token: impl ::fidl_next::Encode<
947 ::fidl_next::wire::fuchsia::Event,
948 <___T as ::fidl_next::Transport>::SendBuffer,
949 >,
950 ) -> ::fidl_next::TwoWayFuture<'_, super::LogStackTrace, ___T>
951 where
952 <___T as ::fidl_next::Transport>::SendBuffer:
953 ::fidl_next::encoder::InternalHandleEncoder,
954 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
955 {
956 self.log_stack_trace_with(crate::generic::DebugLogStackTraceRequest { node_token })
957 }
958
959 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
960 pub fn log_stack_trace_with<___R>(
961 &self,
962 request: ___R,
963 ) -> ::fidl_next::TwoWayFuture<'_, super::LogStackTrace, ___T>
964 where
965 ___R: ::fidl_next::Encode<
966 crate::wire::DebugLogStackTraceRequest,
967 <___T as ::fidl_next::Transport>::SendBuffer,
968 >,
969 {
970 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
971 7819263500138978785,
972 <super::LogStackTrace as ::fidl_next::Method>::FLEXIBILITY,
973 request,
974 ))
975 }
976
977 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
978 pub fn get_host_koid(
979 &self,
980
981 node_token: impl ::fidl_next::Encode<
982 ::fidl_next::wire::fuchsia::Event,
983 <___T as ::fidl_next::Transport>::SendBuffer,
984 >,
985 ) -> ::fidl_next::TwoWayFuture<'_, super::GetHostKoid, ___T>
986 where
987 <___T as ::fidl_next::Transport>::SendBuffer:
988 ::fidl_next::encoder::InternalHandleEncoder,
989 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
990 {
991 self.get_host_koid_with(crate::generic::DebugGetHostKoidRequest { node_token })
992 }
993
994 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
995 pub fn get_host_koid_with<___R>(
996 &self,
997 request: ___R,
998 ) -> ::fidl_next::TwoWayFuture<'_, super::GetHostKoid, ___T>
999 where
1000 ___R: ::fidl_next::Encode<
1001 crate::wire::DebugGetHostKoidRequest,
1002 <___T as ::fidl_next::Transport>::SendBuffer,
1003 >,
1004 {
1005 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1006 2669385982938763036,
1007 <super::GetHostKoid as ::fidl_next::Method>::FLEXIBILITY,
1008 request,
1009 ))
1010 }
1011 }
1012
1013 #[repr(transparent)]
1015 pub struct DebugServer<___T: ::fidl_next::Transport> {
1016 server: ::fidl_next::protocol::Server<___T>,
1017 }
1018
1019 impl<___T> DebugServer<___T> where ___T: ::fidl_next::Transport {}
1020 }
1021}
1022
1023#[diagnostic::on_unimplemented(
1024 note = "If {Self} implements the non-local DebugClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1025)]
1026
1027pub trait DebugLocalClientHandler<
1031 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1032 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1033>
1034{
1035 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1036 ::core::future::ready(())
1037 }
1038}
1039
1040impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Debug
1041where
1042 ___H: DebugLocalClientHandler<___T>,
1043 ___T: ::fidl_next::Transport,
1044{
1045 async fn on_event(
1046 handler: &mut ___H,
1047 mut message: ::fidl_next::Message<___T>,
1048 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1049 match *message.header().ordinal {
1050 ordinal => {
1051 handler.on_unknown_interaction(ordinal).await;
1052 if ::core::matches!(
1053 message.header().flexibility(),
1054 ::fidl_next::protocol::Flexibility::Strict
1055 ) {
1056 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1057 } else {
1058 Ok(())
1059 }
1060 }
1061 }
1062 }
1063}
1064
1065#[diagnostic::on_unimplemented(
1066 note = "If {Self} implements the non-local DebugServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1067)]
1068
1069pub trait DebugLocalServerHandler<
1073 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1074 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1075>
1076{
1077 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1078 fn log_stack_trace(
1079 &mut self,
1080
1081 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1082
1083 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1084 ) -> impl ::core::future::Future<Output = ()>;
1085
1086 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1087 fn get_host_koid(
1088 &mut self,
1089
1090 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1091
1092 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1093 ) -> impl ::core::future::Future<Output = ()>;
1094
1095 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1096 ::core::future::ready(())
1097 }
1098}
1099
1100impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Debug
1101where
1102 ___H: DebugLocalServerHandler<___T>,
1103 ___T: ::fidl_next::Transport,
1104 for<'de> crate::wire::DebugLogStackTraceRequest: ::fidl_next::Decode<
1105 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1106 Constraint = (),
1107 >,
1108 for<'de> crate::wire::DebugGetHostKoidRequest: ::fidl_next::Decode<
1109 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1110 Constraint = (),
1111 >,
1112{
1113 async fn on_one_way(
1114 handler: &mut ___H,
1115 mut message: ::fidl_next::Message<___T>,
1116 ) -> ::core::result::Result<
1117 (),
1118 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1119 > {
1120 match *message.header().ordinal {
1121 ordinal => {
1122 handler.on_unknown_interaction(ordinal).await;
1123 if ::core::matches!(
1124 message.header().flexibility(),
1125 ::fidl_next::protocol::Flexibility::Strict
1126 ) {
1127 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1128 } else {
1129 Ok(())
1130 }
1131 }
1132 }
1133 }
1134
1135 async fn on_two_way(
1136 handler: &mut ___H,
1137 mut message: ::fidl_next::Message<___T>,
1138 responder: ::fidl_next::protocol::Responder<___T>,
1139 ) -> ::core::result::Result<
1140 (),
1141 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1142 > {
1143 match *message.header().ordinal {
1144 7819263500138978785 => {
1145 let responder = ::fidl_next::Responder::from_untyped(responder);
1146
1147 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1148 Ok(decoded) => {
1149 handler
1150 .log_stack_trace(::fidl_next::Request::from_decoded(decoded), responder)
1151 .await;
1152 Ok(())
1153 }
1154 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1155 ordinal: 7819263500138978785,
1156 error,
1157 }),
1158 }
1159 }
1160
1161 2669385982938763036 => {
1162 let responder = ::fidl_next::Responder::from_untyped(responder);
1163
1164 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1165 Ok(decoded) => {
1166 handler
1167 .get_host_koid(::fidl_next::Request::from_decoded(decoded), responder)
1168 .await;
1169 Ok(())
1170 }
1171 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1172 ordinal: 2669385982938763036,
1173 error,
1174 }),
1175 }
1176 }
1177
1178 ordinal => {
1179 handler.on_unknown_interaction(ordinal).await;
1180 if ::core::matches!(
1181 message.header().flexibility(),
1182 ::fidl_next::protocol::Flexibility::Strict
1183 ) {
1184 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1185 } else {
1186 responder
1187 .respond_framework_error(
1188 ordinal,
1189 ::fidl_next::FrameworkError::UnknownMethod,
1190 )
1191 .expect("encoding a framework error should never fail")
1192 .await?;
1193 Ok(())
1194 }
1195 }
1196 }
1197 }
1198}
1199
1200pub trait DebugClientHandler<
1204 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1205 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1206>
1207{
1208 fn on_unknown_interaction(
1209 &mut self,
1210 ordinal: u64,
1211 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1212 ::core::future::ready(())
1213 }
1214}
1215
1216impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Debug
1217where
1218 ___H: DebugClientHandler<___T> + ::core::marker::Send,
1219 ___T: ::fidl_next::Transport,
1220{
1221 async fn on_event(
1222 handler: &mut ___H,
1223 mut message: ::fidl_next::Message<___T>,
1224 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1225 match *message.header().ordinal {
1226 ordinal => {
1227 handler.on_unknown_interaction(ordinal).await;
1228 if ::core::matches!(
1229 message.header().flexibility(),
1230 ::fidl_next::protocol::Flexibility::Strict
1231 ) {
1232 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1233 } else {
1234 Ok(())
1235 }
1236 }
1237 }
1238 }
1239}
1240
1241pub trait DebugServerHandler<
1245 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1246 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1247>
1248{
1249 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1250 fn log_stack_trace(
1251 &mut self,
1252
1253 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1254
1255 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1256 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1257
1258 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1259 fn get_host_koid(
1260 &mut self,
1261
1262 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1263
1264 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1265 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1266
1267 fn on_unknown_interaction(
1268 &mut self,
1269 ordinal: u64,
1270 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1271 ::core::future::ready(())
1272 }
1273}
1274
1275impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Debug
1276where
1277 ___H: DebugServerHandler<___T> + ::core::marker::Send,
1278 ___T: ::fidl_next::Transport,
1279 for<'de> crate::wire::DebugLogStackTraceRequest: ::fidl_next::Decode<
1280 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1281 Constraint = (),
1282 >,
1283 for<'de> crate::wire::DebugGetHostKoidRequest: ::fidl_next::Decode<
1284 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1285 Constraint = (),
1286 >,
1287{
1288 async fn on_one_way(
1289 handler: &mut ___H,
1290 mut message: ::fidl_next::Message<___T>,
1291 ) -> ::core::result::Result<
1292 (),
1293 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1294 > {
1295 match *message.header().ordinal {
1296 ordinal => {
1297 handler.on_unknown_interaction(ordinal).await;
1298 if ::core::matches!(
1299 message.header().flexibility(),
1300 ::fidl_next::protocol::Flexibility::Strict
1301 ) {
1302 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1303 } else {
1304 Ok(())
1305 }
1306 }
1307 }
1308 }
1309
1310 async fn on_two_way(
1311 handler: &mut ___H,
1312 mut message: ::fidl_next::Message<___T>,
1313 responder: ::fidl_next::protocol::Responder<___T>,
1314 ) -> ::core::result::Result<
1315 (),
1316 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1317 > {
1318 match *message.header().ordinal {
1319 7819263500138978785 => {
1320 let responder = ::fidl_next::Responder::from_untyped(responder);
1321
1322 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1323 Ok(decoded) => {
1324 handler
1325 .log_stack_trace(::fidl_next::Request::from_decoded(decoded), responder)
1326 .await;
1327 Ok(())
1328 }
1329 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1330 ordinal: 7819263500138978785,
1331 error,
1332 }),
1333 }
1334 }
1335
1336 2669385982938763036 => {
1337 let responder = ::fidl_next::Responder::from_untyped(responder);
1338
1339 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1340 Ok(decoded) => {
1341 handler
1342 .get_host_koid(::fidl_next::Request::from_decoded(decoded), responder)
1343 .await;
1344 Ok(())
1345 }
1346 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1347 ordinal: 2669385982938763036,
1348 error,
1349 }),
1350 }
1351 }
1352
1353 ordinal => {
1354 handler.on_unknown_interaction(ordinal).await;
1355 if ::core::matches!(
1356 message.header().flexibility(),
1357 ::fidl_next::protocol::Flexibility::Strict
1358 ) {
1359 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1360 } else {
1361 responder
1362 .respond_framework_error(
1363 ordinal,
1364 ::fidl_next::FrameworkError::UnknownMethod,
1365 )
1366 .expect("encoding a framework error should never fail")
1367 .await?;
1368 Ok(())
1369 }
1370 }
1371 }
1372 }
1373}
1374
1375impl<___T> DebugClientHandler<___T> for ::fidl_next::IgnoreEvents
1376where
1377 ___T: ::fidl_next::Transport,
1378{
1379 async fn on_unknown_interaction(&mut self, _: u64) {}
1380}
1381
1382impl<___H, ___T> DebugLocalClientHandler<___T> for ::fidl_next::Local<___H>
1383where
1384 ___H: DebugClientHandler<___T>,
1385 ___T: ::fidl_next::Transport,
1386{
1387 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1388 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1389 }
1390}
1391
1392impl<___H, ___T> DebugLocalServerHandler<___T> for ::fidl_next::Local<___H>
1393where
1394 ___H: DebugServerHandler<___T>,
1395 ___T: ::fidl_next::Transport,
1396{
1397 async fn log_stack_trace(
1398 &mut self,
1399
1400 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1401
1402 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1403 ) {
1404 ___H::log_stack_trace(&mut self.0, request, responder).await
1405 }
1406
1407 async fn get_host_koid(
1408 &mut self,
1409
1410 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1411
1412 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1413 ) {
1414 ___H::get_host_koid(&mut self.0, request, responder).await
1415 }
1416
1417 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1418 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1419 }
1420}
1421
1422#[doc = " Provides the bus topology for the given node.\n"]
1424#[derive(PartialEq, Debug)]
1425pub struct NodeBusTopology;
1426
1427impl ::fidl_next::Discoverable for NodeBusTopology {
1428 const PROTOCOL_NAME: &'static str = "fuchsia.driver.token.NodeBusTopology";
1429}
1430
1431#[cfg(target_os = "fuchsia")]
1432impl ::fidl_next::HasTransport for NodeBusTopology {
1433 type Transport = ::fidl_next::fuchsia::zx::Channel;
1434}
1435
1436pub mod node_bus_topology {
1437 pub mod prelude {
1438 pub use crate::{
1439 NodeBusTopology, NodeBusTopologyClientHandler, NodeBusTopologyLocalClientHandler,
1440 NodeBusTopologyLocalServerHandler, NodeBusTopologyServerHandler, node_bus_topology,
1441 };
1442
1443 pub use crate::natural::NodeBusTopologyGetRequest;
1444
1445 pub use crate::natural::NodeBusTopologyGetResponse;
1446 }
1447
1448 pub struct Get;
1449
1450 impl ::fidl_next::Method for Get {
1451 const ORDINAL: u64 = 2248866930296616381;
1452 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1453 ::fidl_next::protocol::Flexibility::Strict;
1454
1455 type Protocol = crate::NodeBusTopology;
1456
1457 type Request = crate::wire::NodeBusTopologyGetRequest;
1458 }
1459
1460 impl ::fidl_next::TwoWayMethod for Get {
1461 type Response = ::fidl_next::wire::Result<
1462 'static,
1463 crate::wire::NodeBusTopologyGetResponse<'static>,
1464 ::fidl_next::wire::fuchsia::StatusResult,
1465 >;
1466 }
1467
1468 impl<___R> ::fidl_next::Respond<___R> for Get {
1469 type Output = ::core::result::Result<
1470 crate::generic::NodeBusTopologyGetResponse<___R>,
1471 ::fidl_next::never::Never,
1472 >;
1473
1474 fn respond(response: ___R) -> Self::Output {
1475 ::core::result::Result::Ok(crate::generic::NodeBusTopologyGetResponse {
1476 path: response,
1477 })
1478 }
1479 }
1480
1481 impl<___R> ::fidl_next::RespondErr<___R> for Get {
1482 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1483
1484 fn respond_err(response: ___R) -> Self::Output {
1485 ::core::result::Result::Err(response)
1486 }
1487 }
1488
1489 mod ___detail {
1490 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeBusTopology
1491 where
1492 ___T: ::fidl_next::Transport,
1493 {
1494 type Client = NodeBusTopologyClient<___T>;
1495 type Server = NodeBusTopologyServer<___T>;
1496 }
1497
1498 #[repr(transparent)]
1500 pub struct NodeBusTopologyClient<___T: ::fidl_next::Transport> {
1501 #[allow(dead_code)]
1502 client: ::fidl_next::protocol::Client<___T>,
1503 }
1504
1505 impl<___T> NodeBusTopologyClient<___T>
1506 where
1507 ___T: ::fidl_next::Transport,
1508 {
1509 pub fn get(
1510 &self,
1511
1512 token: impl ::fidl_next::Encode<
1513 ::fidl_next::wire::fuchsia::Event,
1514 <___T as ::fidl_next::Transport>::SendBuffer,
1515 >,
1516 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
1517 where
1518 <___T as ::fidl_next::Transport>::SendBuffer:
1519 ::fidl_next::encoder::InternalHandleEncoder,
1520 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1521 {
1522 self.get_with(crate::generic::NodeBusTopologyGetRequest { token })
1523 }
1524
1525 pub fn get_with<___R>(
1526 &self,
1527 request: ___R,
1528 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
1529 where
1530 ___R: ::fidl_next::Encode<
1531 crate::wire::NodeBusTopologyGetRequest,
1532 <___T as ::fidl_next::Transport>::SendBuffer,
1533 >,
1534 {
1535 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1536 2248866930296616381,
1537 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
1538 request,
1539 ))
1540 }
1541 }
1542
1543 #[repr(transparent)]
1545 pub struct NodeBusTopologyServer<___T: ::fidl_next::Transport> {
1546 server: ::fidl_next::protocol::Server<___T>,
1547 }
1548
1549 impl<___T> NodeBusTopologyServer<___T> where ___T: ::fidl_next::Transport {}
1550 }
1551}
1552
1553#[diagnostic::on_unimplemented(
1554 note = "If {Self} implements the non-local NodeBusTopologyClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1555)]
1556
1557pub trait NodeBusTopologyLocalClientHandler<
1561 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1562 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1563>
1564{
1565 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1566 ::core::future::ready(())
1567 }
1568}
1569
1570impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeBusTopology
1571where
1572 ___H: NodeBusTopologyLocalClientHandler<___T>,
1573 ___T: ::fidl_next::Transport,
1574{
1575 async fn on_event(
1576 handler: &mut ___H,
1577 mut message: ::fidl_next::Message<___T>,
1578 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1579 match *message.header().ordinal {
1580 ordinal => {
1581 handler.on_unknown_interaction(ordinal).await;
1582 if ::core::matches!(
1583 message.header().flexibility(),
1584 ::fidl_next::protocol::Flexibility::Strict
1585 ) {
1586 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1587 } else {
1588 Ok(())
1589 }
1590 }
1591 }
1592 }
1593}
1594
1595#[diagnostic::on_unimplemented(
1596 note = "If {Self} implements the non-local NodeBusTopologyServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1597)]
1598
1599pub trait NodeBusTopologyLocalServerHandler<
1603 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1604 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1605>
1606{
1607 fn get(
1608 &mut self,
1609
1610 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1611
1612 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1613 ) -> impl ::core::future::Future<Output = ()>;
1614
1615 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1616 ::core::future::ready(())
1617 }
1618}
1619
1620impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeBusTopology
1621where
1622 ___H: NodeBusTopologyLocalServerHandler<___T>,
1623 ___T: ::fidl_next::Transport,
1624 for<'de> crate::wire::NodeBusTopologyGetRequest: ::fidl_next::Decode<
1625 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1626 Constraint = (),
1627 >,
1628{
1629 async fn on_one_way(
1630 handler: &mut ___H,
1631 mut message: ::fidl_next::Message<___T>,
1632 ) -> ::core::result::Result<
1633 (),
1634 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1635 > {
1636 match *message.header().ordinal {
1637 ordinal => {
1638 handler.on_unknown_interaction(ordinal).await;
1639 if ::core::matches!(
1640 message.header().flexibility(),
1641 ::fidl_next::protocol::Flexibility::Strict
1642 ) {
1643 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1644 } else {
1645 Ok(())
1646 }
1647 }
1648 }
1649 }
1650
1651 async fn on_two_way(
1652 handler: &mut ___H,
1653 mut message: ::fidl_next::Message<___T>,
1654 responder: ::fidl_next::protocol::Responder<___T>,
1655 ) -> ::core::result::Result<
1656 (),
1657 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1658 > {
1659 match *message.header().ordinal {
1660 2248866930296616381 => {
1661 let responder = ::fidl_next::Responder::from_untyped(responder);
1662
1663 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1664 Ok(decoded) => {
1665 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
1666 Ok(())
1667 }
1668 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1669 ordinal: 2248866930296616381,
1670 error,
1671 }),
1672 }
1673 }
1674
1675 ordinal => {
1676 handler.on_unknown_interaction(ordinal).await;
1677 if ::core::matches!(
1678 message.header().flexibility(),
1679 ::fidl_next::protocol::Flexibility::Strict
1680 ) {
1681 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1682 } else {
1683 responder
1684 .respond_framework_error(
1685 ordinal,
1686 ::fidl_next::FrameworkError::UnknownMethod,
1687 )
1688 .expect("encoding a framework error should never fail")
1689 .await?;
1690 Ok(())
1691 }
1692 }
1693 }
1694 }
1695}
1696
1697pub trait NodeBusTopologyClientHandler<
1701 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1702 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1703>
1704{
1705 fn on_unknown_interaction(
1706 &mut self,
1707 ordinal: u64,
1708 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1709 ::core::future::ready(())
1710 }
1711}
1712
1713impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeBusTopology
1714where
1715 ___H: NodeBusTopologyClientHandler<___T> + ::core::marker::Send,
1716 ___T: ::fidl_next::Transport,
1717{
1718 async fn on_event(
1719 handler: &mut ___H,
1720 mut message: ::fidl_next::Message<___T>,
1721 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1722 match *message.header().ordinal {
1723 ordinal => {
1724 handler.on_unknown_interaction(ordinal).await;
1725 if ::core::matches!(
1726 message.header().flexibility(),
1727 ::fidl_next::protocol::Flexibility::Strict
1728 ) {
1729 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1730 } else {
1731 Ok(())
1732 }
1733 }
1734 }
1735 }
1736}
1737
1738pub trait NodeBusTopologyServerHandler<
1742 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1743 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1744>
1745{
1746 fn get(
1747 &mut self,
1748
1749 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1750
1751 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1752 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1753
1754 fn on_unknown_interaction(
1755 &mut self,
1756 ordinal: u64,
1757 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1758 ::core::future::ready(())
1759 }
1760}
1761
1762impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeBusTopology
1763where
1764 ___H: NodeBusTopologyServerHandler<___T> + ::core::marker::Send,
1765 ___T: ::fidl_next::Transport,
1766 for<'de> crate::wire::NodeBusTopologyGetRequest: ::fidl_next::Decode<
1767 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1768 Constraint = (),
1769 >,
1770{
1771 async fn on_one_way(
1772 handler: &mut ___H,
1773 mut message: ::fidl_next::Message<___T>,
1774 ) -> ::core::result::Result<
1775 (),
1776 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1777 > {
1778 match *message.header().ordinal {
1779 ordinal => {
1780 handler.on_unknown_interaction(ordinal).await;
1781 if ::core::matches!(
1782 message.header().flexibility(),
1783 ::fidl_next::protocol::Flexibility::Strict
1784 ) {
1785 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1786 } else {
1787 Ok(())
1788 }
1789 }
1790 }
1791 }
1792
1793 async fn on_two_way(
1794 handler: &mut ___H,
1795 mut message: ::fidl_next::Message<___T>,
1796 responder: ::fidl_next::protocol::Responder<___T>,
1797 ) -> ::core::result::Result<
1798 (),
1799 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1800 > {
1801 match *message.header().ordinal {
1802 2248866930296616381 => {
1803 let responder = ::fidl_next::Responder::from_untyped(responder);
1804
1805 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1806 Ok(decoded) => {
1807 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
1808 Ok(())
1809 }
1810 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1811 ordinal: 2248866930296616381,
1812 error,
1813 }),
1814 }
1815 }
1816
1817 ordinal => {
1818 handler.on_unknown_interaction(ordinal).await;
1819 if ::core::matches!(
1820 message.header().flexibility(),
1821 ::fidl_next::protocol::Flexibility::Strict
1822 ) {
1823 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1824 } else {
1825 responder
1826 .respond_framework_error(
1827 ordinal,
1828 ::fidl_next::FrameworkError::UnknownMethod,
1829 )
1830 .expect("encoding a framework error should never fail")
1831 .await?;
1832 Ok(())
1833 }
1834 }
1835 }
1836 }
1837}
1838
1839impl<___T> NodeBusTopologyClientHandler<___T> for ::fidl_next::IgnoreEvents
1840where
1841 ___T: ::fidl_next::Transport,
1842{
1843 async fn on_unknown_interaction(&mut self, _: u64) {}
1844}
1845
1846impl<___H, ___T> NodeBusTopologyLocalClientHandler<___T> for ::fidl_next::Local<___H>
1847where
1848 ___H: NodeBusTopologyClientHandler<___T>,
1849 ___T: ::fidl_next::Transport,
1850{
1851 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1852 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1853 }
1854}
1855
1856impl<___H, ___T> NodeBusTopologyLocalServerHandler<___T> for ::fidl_next::Local<___H>
1857where
1858 ___H: NodeBusTopologyServerHandler<___T>,
1859 ___T: ::fidl_next::Transport,
1860{
1861 async fn get(
1862 &mut self,
1863
1864 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1865
1866 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1867 ) {
1868 ___H::get(&mut self.0, request, responder).await
1869 }
1870
1871 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1872 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1873 }
1874}
1875
1876#[doc = " A protocol that is meant to be composed into other protocols to allow driver\n clients to query the node token associated with the driver. This token can be\n exchanged with the driver framework via protocols such as\n `fuchsia.driver.token/NodeBusTopology.Get` to learn more information about the\n node.\n"]
1878#[derive(PartialEq, Debug)]
1879pub struct NodeToken;
1880
1881#[cfg(target_os = "fuchsia")]
1882impl ::fidl_next::HasTransport for NodeToken {
1883 type Transport = ::fidl_next::fuchsia::zx::Channel;
1884}
1885
1886pub mod node_token {
1887 pub mod prelude {
1888 pub use crate::{
1889 NodeToken, NodeTokenClientHandler, NodeTokenLocalClientHandler,
1890 NodeTokenLocalServerHandler, NodeTokenServerHandler, node_token,
1891 };
1892
1893 pub use crate::natural::NodeTokenGetResponse;
1894 }
1895
1896 pub struct Get;
1897
1898 impl ::fidl_next::Method for Get {
1899 const ORDINAL: u64 = 7212073050437890521;
1900 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1901 ::fidl_next::protocol::Flexibility::Strict;
1902
1903 type Protocol = crate::NodeToken;
1904
1905 type Request = ::fidl_next::wire::EmptyMessageBody;
1906 }
1907
1908 impl ::fidl_next::TwoWayMethod for Get {
1909 type Response = ::fidl_next::wire::Result<
1910 'static,
1911 crate::wire::NodeTokenGetResponse,
1912 ::fidl_next::wire::fuchsia::StatusResult,
1913 >;
1914 }
1915
1916 impl<___R> ::fidl_next::Respond<___R> for Get {
1917 type Output = ::core::result::Result<
1918 crate::generic::NodeTokenGetResponse<___R>,
1919 ::fidl_next::never::Never,
1920 >;
1921
1922 fn respond(response: ___R) -> Self::Output {
1923 ::core::result::Result::Ok(crate::generic::NodeTokenGetResponse { token: response })
1924 }
1925 }
1926
1927 impl<___R> ::fidl_next::RespondErr<___R> for Get {
1928 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1929
1930 fn respond_err(response: ___R) -> Self::Output {
1931 ::core::result::Result::Err(response)
1932 }
1933 }
1934
1935 mod ___detail {
1936 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeToken
1937 where
1938 ___T: ::fidl_next::Transport,
1939 {
1940 type Client = NodeTokenClient<___T>;
1941 type Server = NodeTokenServer<___T>;
1942 }
1943
1944 #[repr(transparent)]
1946 pub struct NodeTokenClient<___T: ::fidl_next::Transport> {
1947 #[allow(dead_code)]
1948 client: ::fidl_next::protocol::Client<___T>,
1949 }
1950
1951 impl<___T> NodeTokenClient<___T>
1952 where
1953 ___T: ::fidl_next::Transport,
1954 {
1955 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
1956 ::fidl_next::TwoWayFuture::from_untyped(
1957 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
1958 7212073050437890521,
1959 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
1960 (),
1961 ),
1962 )
1963 }
1964 }
1965
1966 #[repr(transparent)]
1968 pub struct NodeTokenServer<___T: ::fidl_next::Transport> {
1969 server: ::fidl_next::protocol::Server<___T>,
1970 }
1971
1972 impl<___T> NodeTokenServer<___T> where ___T: ::fidl_next::Transport {}
1973 }
1974}
1975
1976#[diagnostic::on_unimplemented(
1977 note = "If {Self} implements the non-local NodeTokenClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1978)]
1979
1980pub trait NodeTokenLocalClientHandler<
1984 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1985 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1986>
1987{
1988}
1989
1990impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeToken
1991where
1992 ___H: NodeTokenLocalClientHandler<___T>,
1993 ___T: ::fidl_next::Transport,
1994{
1995 async fn on_event(
1996 handler: &mut ___H,
1997 mut message: ::fidl_next::Message<___T>,
1998 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1999 match *message.header().ordinal {
2000 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2001 }
2002 }
2003}
2004
2005#[diagnostic::on_unimplemented(
2006 note = "If {Self} implements the non-local NodeTokenServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2007)]
2008
2009pub trait NodeTokenLocalServerHandler<
2013 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2014 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2015>
2016{
2017 fn get(
2018 &mut self,
2019
2020 responder: ::fidl_next::Responder<node_token::Get, ___T>,
2021 ) -> impl ::core::future::Future<Output = ()>;
2022}
2023
2024impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeToken
2025where
2026 ___H: NodeTokenLocalServerHandler<___T>,
2027 ___T: ::fidl_next::Transport,
2028{
2029 async fn on_one_way(
2030 handler: &mut ___H,
2031 mut message: ::fidl_next::Message<___T>,
2032 ) -> ::core::result::Result<
2033 (),
2034 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2035 > {
2036 match *message.header().ordinal {
2037 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2038 }
2039 }
2040
2041 async fn on_two_way(
2042 handler: &mut ___H,
2043 mut message: ::fidl_next::Message<___T>,
2044 responder: ::fidl_next::protocol::Responder<___T>,
2045 ) -> ::core::result::Result<
2046 (),
2047 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2048 > {
2049 match *message.header().ordinal {
2050 7212073050437890521 => {
2051 let responder = ::fidl_next::Responder::from_untyped(responder);
2052
2053 handler.get(responder).await;
2054 Ok(())
2055 }
2056
2057 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2058 }
2059 }
2060}
2061
2062pub trait NodeTokenClientHandler<
2066 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2067 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2068>
2069{
2070}
2071
2072impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeToken
2073where
2074 ___H: NodeTokenClientHandler<___T> + ::core::marker::Send,
2075 ___T: ::fidl_next::Transport,
2076{
2077 async fn on_event(
2078 handler: &mut ___H,
2079 mut message: ::fidl_next::Message<___T>,
2080 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2081 match *message.header().ordinal {
2082 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2083 }
2084 }
2085}
2086
2087pub trait NodeTokenServerHandler<
2091 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2092 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2093>
2094{
2095 fn get(
2096 &mut self,
2097
2098 responder: ::fidl_next::Responder<node_token::Get, ___T>,
2099 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2100}
2101
2102impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeToken
2103where
2104 ___H: NodeTokenServerHandler<___T> + ::core::marker::Send,
2105 ___T: ::fidl_next::Transport,
2106{
2107 async fn on_one_way(
2108 handler: &mut ___H,
2109 mut message: ::fidl_next::Message<___T>,
2110 ) -> ::core::result::Result<
2111 (),
2112 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2113 > {
2114 match *message.header().ordinal {
2115 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2116 }
2117 }
2118
2119 async fn on_two_way(
2120 handler: &mut ___H,
2121 mut message: ::fidl_next::Message<___T>,
2122 responder: ::fidl_next::protocol::Responder<___T>,
2123 ) -> ::core::result::Result<
2124 (),
2125 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2126 > {
2127 match *message.header().ordinal {
2128 7212073050437890521 => {
2129 let responder = ::fidl_next::Responder::from_untyped(responder);
2130
2131 handler.get(responder).await;
2132 Ok(())
2133 }
2134
2135 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2136 }
2137 }
2138}
2139
2140impl<___T> NodeTokenClientHandler<___T> for ::fidl_next::IgnoreEvents where
2141 ___T: ::fidl_next::Transport
2142{
2143}
2144
2145impl<___H, ___T> NodeTokenLocalClientHandler<___T> for ::fidl_next::Local<___H>
2146where
2147 ___H: NodeTokenClientHandler<___T>,
2148 ___T: ::fidl_next::Transport,
2149{
2150}
2151
2152impl<___H, ___T> NodeTokenLocalServerHandler<___T> for ::fidl_next::Local<___H>
2153where
2154 ___H: NodeTokenServerHandler<___T>,
2155 ___T: ::fidl_next::Transport,
2156{
2157 async fn get(&mut self, responder: ::fidl_next::Responder<node_token::Get, ___T>) {
2158 ___H::get(&mut self.0, responder).await
2159 }
2160}
2161
2162pub use fidl_next_common_fuchsia_driver_token::*;