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 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DebugLogStackTraceRequest, ___E>
717 for &'a DebugLogStackTraceRequest<T0>
718 where
719 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
720 ___E: ::fidl_next::fuchsia::HandleEncoder,
721 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
722 {
723 #[inline]
724 fn encode(
725 self,
726 encoder_: &mut ___E,
727 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugLogStackTraceRequest>,
728 _: (),
729 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
730 ::fidl_next::munge! {
731 let crate::wire::DebugLogStackTraceRequest {
732 node_token,
733
734 } = out_;
735 }
736
737 ::fidl_next::Encode::encode(&self.node_token, encoder_, node_token, ())?;
738
739 Ok(())
740 }
741 }
742
743 pub struct DebugGetHostKoidRequest<T0> {
745 pub node_token: T0,
746 }
747
748 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::DebugGetHostKoidRequest, ___E>
749 for DebugGetHostKoidRequest<T0>
750 where
751 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
752 ___E: ::fidl_next::fuchsia::HandleEncoder,
753 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
754 {
755 #[inline]
756 fn encode(
757 self,
758 encoder_: &mut ___E,
759 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugGetHostKoidRequest>,
760 _: (),
761 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
762 ::fidl_next::munge! {
763 let crate::wire::DebugGetHostKoidRequest {
764 node_token,
765
766 } = out_;
767 }
768
769 ::fidl_next::Encode::encode(self.node_token, encoder_, node_token, ())?;
770
771 Ok(())
772 }
773 }
774
775 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::DebugGetHostKoidRequest, ___E>
776 for &'a DebugGetHostKoidRequest<T0>
777 where
778 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
779 ___E: ::fidl_next::fuchsia::HandleEncoder,
780 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
781 {
782 #[inline]
783 fn encode(
784 self,
785 encoder_: &mut ___E,
786 out_: &mut ::core::mem::MaybeUninit<crate::wire::DebugGetHostKoidRequest>,
787 _: (),
788 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
789 ::fidl_next::munge! {
790 let crate::wire::DebugGetHostKoidRequest {
791 node_token,
792
793 } = out_;
794 }
795
796 ::fidl_next::Encode::encode(&self.node_token, encoder_, node_token, ())?;
797
798 Ok(())
799 }
800 }
801
802 pub struct NodeBusTopologyGetRequest<T0> {
804 pub token: T0,
805 }
806
807 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeBusTopologyGetRequest, ___E>
808 for NodeBusTopologyGetRequest<T0>
809 where
810 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
811 ___E: ::fidl_next::fuchsia::HandleEncoder,
812 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
813 {
814 #[inline]
815 fn encode(
816 self,
817 encoder_: &mut ___E,
818 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeBusTopologyGetRequest>,
819 _: (),
820 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
821 ::fidl_next::munge! {
822 let crate::wire::NodeBusTopologyGetRequest {
823 token,
824
825 } = out_;
826 }
827
828 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
829
830 Ok(())
831 }
832 }
833
834 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NodeBusTopologyGetRequest, ___E>
835 for &'a NodeBusTopologyGetRequest<T0>
836 where
837 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
838 ___E: ::fidl_next::fuchsia::HandleEncoder,
839 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
840 {
841 #[inline]
842 fn encode(
843 self,
844 encoder_: &mut ___E,
845 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeBusTopologyGetRequest>,
846 _: (),
847 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
848 ::fidl_next::munge! {
849 let crate::wire::NodeBusTopologyGetRequest {
850 token,
851
852 } = out_;
853 }
854
855 ::fidl_next::Encode::encode(&self.token, encoder_, token, ())?;
856
857 Ok(())
858 }
859 }
860
861 pub struct NodeTokenGetResponse<T0> {
863 pub token: T0,
864 }
865
866 unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::NodeTokenGetResponse, ___E>
867 for NodeTokenGetResponse<T0>
868 where
869 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
870 ___E: ::fidl_next::fuchsia::HandleEncoder,
871 T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
872 {
873 #[inline]
874 fn encode(
875 self,
876 encoder_: &mut ___E,
877 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeTokenGetResponse>,
878 _: (),
879 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
880 ::fidl_next::munge! {
881 let crate::wire::NodeTokenGetResponse {
882 token,
883
884 } = out_;
885 }
886
887 ::fidl_next::Encode::encode(self.token, encoder_, token, ())?;
888
889 Ok(())
890 }
891 }
892
893 unsafe impl<'a, ___E, T0> ::fidl_next::Encode<crate::wire::NodeTokenGetResponse, ___E>
894 for &'a NodeTokenGetResponse<T0>
895 where
896 ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
897 ___E: ::fidl_next::fuchsia::HandleEncoder,
898 &'a T0: ::fidl_next::Encode<::fidl_next::wire::fuchsia::Event, ___E>,
899 {
900 #[inline]
901 fn encode(
902 self,
903 encoder_: &mut ___E,
904 out_: &mut ::core::mem::MaybeUninit<crate::wire::NodeTokenGetResponse>,
905 _: (),
906 ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
907 ::fidl_next::munge! {
908 let crate::wire::NodeTokenGetResponse {
909 token,
910
911 } = out_;
912 }
913
914 ::fidl_next::Encode::encode(&self.token, encoder_, token, ())?;
915
916 Ok(())
917 }
918 }
919}
920
921pub use self::natural::*;
922
923#[doc = " Requests to output driver info to persistent logs.\n"]
925#[derive(PartialEq, Debug)]
926pub struct Debug;
927
928impl ::fidl_next::Discoverable for Debug {
929 const PROTOCOL_NAME: &'static str = "fuchsia.driver.token.Debug";
930}
931
932#[cfg(target_os = "fuchsia")]
933impl ::fidl_next::HasTransport for Debug {
934 type Transport = ::fidl_next::fuchsia::zx::Channel;
935}
936
937pub mod debug {
938 pub mod prelude {
939 pub use crate::{
940 Debug, DebugClientHandler, DebugLocalClientHandler, DebugLocalServerHandler,
941 DebugServerHandler, debug,
942 };
943
944 pub use crate::natural::DebugGetHostKoidRequest;
945
946 pub use crate::natural::DebugLogStackTraceRequest;
947
948 pub use crate::natural::DebugGetHostKoidResponse;
949
950 pub use crate::natural::DebugLogStackTraceResponse;
951 }
952
953 pub struct LogStackTrace;
954
955 impl ::fidl_next::Method for LogStackTrace {
956 const ORDINAL: u64 = 7819263500138978785;
957 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
958 ::fidl_next::protocol::Flexibility::Flexible;
959
960 type Protocol = crate::Debug;
961
962 type Request = crate::wire::DebugLogStackTraceRequest;
963 }
964
965 impl ::fidl_next::TwoWayMethod for LogStackTrace {
966 type Response = ::fidl_next::wire::Result<
967 'static,
968 crate::wire::DebugLogStackTraceResponse,
969 ::fidl_next::wire::fuchsia::Status,
970 >;
971 }
972
973 impl<___R> ::fidl_next::Respond<___R> for LogStackTrace {
974 type Output = ::core::result::Result<___R, ::fidl_next::never::Never>;
975
976 fn respond(response: ___R) -> Self::Output {
977 ::core::result::Result::Ok(response)
978 }
979 }
980
981 impl<___R> ::fidl_next::RespondErr<___R> for LogStackTrace {
982 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
983
984 fn respond_err(response: ___R) -> Self::Output {
985 ::core::result::Result::Err(response)
986 }
987 }
988
989 pub struct GetHostKoid;
990
991 impl ::fidl_next::Method for GetHostKoid {
992 const ORDINAL: u64 = 2669385982938763036;
993 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
994 ::fidl_next::protocol::Flexibility::Flexible;
995
996 type Protocol = crate::Debug;
997
998 type Request = crate::wire::DebugGetHostKoidRequest;
999 }
1000
1001 impl ::fidl_next::TwoWayMethod for GetHostKoid {
1002 type Response = ::fidl_next::wire::Result<
1003 'static,
1004 crate::wire::DebugGetHostKoidResponse,
1005 ::fidl_next::wire::fuchsia::Status,
1006 >;
1007 }
1008
1009 impl<___R> ::fidl_next::Respond<___R> for GetHostKoid {
1010 type Output = ::core::result::Result<
1011 crate::generic::DebugGetHostKoidResponse<___R>,
1012 ::fidl_next::never::Never,
1013 >;
1014
1015 fn respond(response: ___R) -> Self::Output {
1016 ::core::result::Result::Ok(crate::generic::DebugGetHostKoidResponse {
1017 host_koid: response,
1018 })
1019 }
1020 }
1021
1022 impl<___R> ::fidl_next::RespondErr<___R> for GetHostKoid {
1023 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1024
1025 fn respond_err(response: ___R) -> Self::Output {
1026 ::core::result::Result::Err(response)
1027 }
1028 }
1029
1030 mod ___detail {
1031 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Debug
1032 where
1033 ___T: ::fidl_next::Transport,
1034 {
1035 type Client = DebugClient<___T>;
1036 type Server = DebugServer<___T>;
1037 }
1038
1039 #[repr(transparent)]
1041 pub struct DebugClient<___T: ::fidl_next::Transport> {
1042 #[allow(dead_code)]
1043 client: ::fidl_next::protocol::Client<___T>,
1044 }
1045
1046 impl<___T> DebugClient<___T>
1047 where
1048 ___T: ::fidl_next::Transport,
1049 {
1050 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1051 pub fn log_stack_trace(
1052 &self,
1053
1054 node_token: impl ::fidl_next::Encode<
1055 ::fidl_next::wire::fuchsia::Event,
1056 <___T as ::fidl_next::Transport>::SendBuffer,
1057 >,
1058 ) -> ::fidl_next::TwoWayFuture<'_, super::LogStackTrace, ___T>
1059 where
1060 <___T as ::fidl_next::Transport>::SendBuffer:
1061 ::fidl_next::encoder::InternalHandleEncoder,
1062 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1063 {
1064 self.log_stack_trace_with(crate::generic::DebugLogStackTraceRequest { node_token })
1065 }
1066
1067 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1068 pub fn log_stack_trace_with<___R>(
1069 &self,
1070 request: ___R,
1071 ) -> ::fidl_next::TwoWayFuture<'_, super::LogStackTrace, ___T>
1072 where
1073 ___R: ::fidl_next::Encode<
1074 crate::wire::DebugLogStackTraceRequest,
1075 <___T as ::fidl_next::Transport>::SendBuffer,
1076 >,
1077 {
1078 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1079 7819263500138978785,
1080 <super::LogStackTrace as ::fidl_next::Method>::FLEXIBILITY,
1081 request,
1082 ))
1083 }
1084
1085 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1086 pub fn get_host_koid(
1087 &self,
1088
1089 node_token: impl ::fidl_next::Encode<
1090 ::fidl_next::wire::fuchsia::Event,
1091 <___T as ::fidl_next::Transport>::SendBuffer,
1092 >,
1093 ) -> ::fidl_next::TwoWayFuture<'_, super::GetHostKoid, ___T>
1094 where
1095 <___T as ::fidl_next::Transport>::SendBuffer:
1096 ::fidl_next::encoder::InternalHandleEncoder,
1097 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1098 {
1099 self.get_host_koid_with(crate::generic::DebugGetHostKoidRequest { node_token })
1100 }
1101
1102 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1103 pub fn get_host_koid_with<___R>(
1104 &self,
1105 request: ___R,
1106 ) -> ::fidl_next::TwoWayFuture<'_, super::GetHostKoid, ___T>
1107 where
1108 ___R: ::fidl_next::Encode<
1109 crate::wire::DebugGetHostKoidRequest,
1110 <___T as ::fidl_next::Transport>::SendBuffer,
1111 >,
1112 {
1113 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1114 2669385982938763036,
1115 <super::GetHostKoid as ::fidl_next::Method>::FLEXIBILITY,
1116 request,
1117 ))
1118 }
1119 }
1120
1121 #[repr(transparent)]
1123 pub struct DebugServer<___T: ::fidl_next::Transport> {
1124 server: ::fidl_next::protocol::Server<___T>,
1125 }
1126
1127 impl<___T> DebugServer<___T> where ___T: ::fidl_next::Transport {}
1128 }
1129}
1130
1131#[diagnostic::on_unimplemented(
1132 note = "If {Self} implements the non-local DebugClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1133)]
1134
1135pub trait DebugLocalClientHandler<
1139 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1140 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1141>
1142{
1143 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1144 ::core::future::ready(())
1145 }
1146}
1147
1148impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Debug
1149where
1150 ___H: DebugLocalClientHandler<___T>,
1151 ___T: ::fidl_next::Transport,
1152{
1153 async fn on_event(
1154 handler: &mut ___H,
1155 mut message: ::fidl_next::Message<___T>,
1156 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1157 match *message.header().ordinal {
1158 ordinal => {
1159 handler.on_unknown_interaction(ordinal).await;
1160 if ::core::matches!(
1161 message.header().flexibility(),
1162 ::fidl_next::protocol::Flexibility::Strict
1163 ) {
1164 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1165 } else {
1166 Ok(())
1167 }
1168 }
1169 }
1170 }
1171}
1172
1173#[diagnostic::on_unimplemented(
1174 note = "If {Self} implements the non-local DebugServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1175)]
1176
1177pub trait DebugLocalServerHandler<
1181 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1182 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1183>
1184{
1185 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1186 fn log_stack_trace(
1187 &mut self,
1188
1189 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1190
1191 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1192 ) -> impl ::core::future::Future<Output = ()>;
1193
1194 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1195 fn get_host_koid(
1196 &mut self,
1197
1198 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1199
1200 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1201 ) -> impl ::core::future::Future<Output = ()>;
1202
1203 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1204 ::core::future::ready(())
1205 }
1206}
1207
1208impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Debug
1209where
1210 ___H: DebugLocalServerHandler<___T>,
1211 ___T: ::fidl_next::Transport,
1212 for<'de> crate::wire::DebugLogStackTraceRequest: ::fidl_next::Decode<
1213 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1214 Constraint = (),
1215 >,
1216 for<'de> crate::wire::DebugGetHostKoidRequest: ::fidl_next::Decode<
1217 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1218 Constraint = (),
1219 >,
1220{
1221 async fn on_one_way(
1222 handler: &mut ___H,
1223 mut message: ::fidl_next::Message<___T>,
1224 ) -> ::core::result::Result<
1225 (),
1226 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1227 > {
1228 match *message.header().ordinal {
1229 ordinal => {
1230 handler.on_unknown_interaction(ordinal).await;
1231 if ::core::matches!(
1232 message.header().flexibility(),
1233 ::fidl_next::protocol::Flexibility::Strict
1234 ) {
1235 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1236 } else {
1237 Ok(())
1238 }
1239 }
1240 }
1241 }
1242
1243 async fn on_two_way(
1244 handler: &mut ___H,
1245 mut message: ::fidl_next::Message<___T>,
1246 responder: ::fidl_next::protocol::Responder<___T>,
1247 ) -> ::core::result::Result<
1248 (),
1249 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1250 > {
1251 match *message.header().ordinal {
1252 7819263500138978785 => {
1253 let responder = ::fidl_next::Responder::from_untyped(responder);
1254
1255 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1256 Ok(decoded) => {
1257 handler
1258 .log_stack_trace(::fidl_next::Request::from_decoded(decoded), responder)
1259 .await;
1260 Ok(())
1261 }
1262 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1263 ordinal: 7819263500138978785,
1264 error,
1265 }),
1266 }
1267 }
1268
1269 2669385982938763036 => {
1270 let responder = ::fidl_next::Responder::from_untyped(responder);
1271
1272 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1273 Ok(decoded) => {
1274 handler
1275 .get_host_koid(::fidl_next::Request::from_decoded(decoded), responder)
1276 .await;
1277 Ok(())
1278 }
1279 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1280 ordinal: 2669385982938763036,
1281 error,
1282 }),
1283 }
1284 }
1285
1286 ordinal => {
1287 handler.on_unknown_interaction(ordinal).await;
1288 if ::core::matches!(
1289 message.header().flexibility(),
1290 ::fidl_next::protocol::Flexibility::Strict
1291 ) {
1292 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1293 } else {
1294 responder
1295 .respond_framework_error(
1296 ordinal,
1297 ::fidl_next::FrameworkError::UnknownMethod,
1298 )
1299 .expect("encoding a framework error should never fail")
1300 .await?;
1301 Ok(())
1302 }
1303 }
1304 }
1305 }
1306}
1307
1308pub trait DebugClientHandler<
1312 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1313 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1314>
1315{
1316 fn on_unknown_interaction(
1317 &mut self,
1318 ordinal: u64,
1319 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1320 ::core::future::ready(())
1321 }
1322}
1323
1324impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Debug
1325where
1326 ___H: DebugClientHandler<___T> + ::core::marker::Send,
1327 ___T: ::fidl_next::Transport,
1328{
1329 async fn on_event(
1330 handler: &mut ___H,
1331 mut message: ::fidl_next::Message<___T>,
1332 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1333 match *message.header().ordinal {
1334 ordinal => {
1335 handler.on_unknown_interaction(ordinal).await;
1336 if ::core::matches!(
1337 message.header().flexibility(),
1338 ::fidl_next::protocol::Flexibility::Strict
1339 ) {
1340 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1341 } else {
1342 Ok(())
1343 }
1344 }
1345 }
1346 }
1347}
1348
1349pub trait DebugServerHandler<
1353 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1354 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1355>
1356{
1357 #[doc = " Triggers a log of a full stack trace for the host corresponding to\n a node uniquely identified by `node_token`.\n"]
1358 fn log_stack_trace(
1359 &mut self,
1360
1361 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1362
1363 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1364 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1365
1366 #[doc = " Returns the KOID of the host process for the node uniquely identified\n by `node_token`.\n"]
1367 fn get_host_koid(
1368 &mut self,
1369
1370 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1371
1372 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1373 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1374
1375 fn on_unknown_interaction(
1376 &mut self,
1377 ordinal: u64,
1378 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1379 ::core::future::ready(())
1380 }
1381}
1382
1383impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Debug
1384where
1385 ___H: DebugServerHandler<___T> + ::core::marker::Send,
1386 ___T: ::fidl_next::Transport,
1387 for<'de> crate::wire::DebugLogStackTraceRequest: ::fidl_next::Decode<
1388 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1389 Constraint = (),
1390 >,
1391 for<'de> crate::wire::DebugGetHostKoidRequest: ::fidl_next::Decode<
1392 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1393 Constraint = (),
1394 >,
1395{
1396 async fn on_one_way(
1397 handler: &mut ___H,
1398 mut message: ::fidl_next::Message<___T>,
1399 ) -> ::core::result::Result<
1400 (),
1401 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1402 > {
1403 match *message.header().ordinal {
1404 ordinal => {
1405 handler.on_unknown_interaction(ordinal).await;
1406 if ::core::matches!(
1407 message.header().flexibility(),
1408 ::fidl_next::protocol::Flexibility::Strict
1409 ) {
1410 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1411 } else {
1412 Ok(())
1413 }
1414 }
1415 }
1416 }
1417
1418 async fn on_two_way(
1419 handler: &mut ___H,
1420 mut message: ::fidl_next::Message<___T>,
1421 responder: ::fidl_next::protocol::Responder<___T>,
1422 ) -> ::core::result::Result<
1423 (),
1424 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1425 > {
1426 match *message.header().ordinal {
1427 7819263500138978785 => {
1428 let responder = ::fidl_next::Responder::from_untyped(responder);
1429
1430 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1431 Ok(decoded) => {
1432 handler
1433 .log_stack_trace(::fidl_next::Request::from_decoded(decoded), responder)
1434 .await;
1435 Ok(())
1436 }
1437 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1438 ordinal: 7819263500138978785,
1439 error,
1440 }),
1441 }
1442 }
1443
1444 2669385982938763036 => {
1445 let responder = ::fidl_next::Responder::from_untyped(responder);
1446
1447 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1448 Ok(decoded) => {
1449 handler
1450 .get_host_koid(::fidl_next::Request::from_decoded(decoded), responder)
1451 .await;
1452 Ok(())
1453 }
1454 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1455 ordinal: 2669385982938763036,
1456 error,
1457 }),
1458 }
1459 }
1460
1461 ordinal => {
1462 handler.on_unknown_interaction(ordinal).await;
1463 if ::core::matches!(
1464 message.header().flexibility(),
1465 ::fidl_next::protocol::Flexibility::Strict
1466 ) {
1467 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1468 } else {
1469 responder
1470 .respond_framework_error(
1471 ordinal,
1472 ::fidl_next::FrameworkError::UnknownMethod,
1473 )
1474 .expect("encoding a framework error should never fail")
1475 .await?;
1476 Ok(())
1477 }
1478 }
1479 }
1480 }
1481}
1482
1483impl<___T> DebugClientHandler<___T> for ::fidl_next::IgnoreEvents
1484where
1485 ___T: ::fidl_next::Transport,
1486{
1487 async fn on_unknown_interaction(&mut self, _: u64) {}
1488}
1489
1490impl<___H, ___T> DebugLocalClientHandler<___T> for ::fidl_next::Local<___H>
1491where
1492 ___H: DebugClientHandler<___T>,
1493 ___T: ::fidl_next::Transport,
1494{
1495 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1496 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1497 }
1498}
1499
1500impl<___H, ___T> DebugLocalServerHandler<___T> for ::fidl_next::Local<___H>
1501where
1502 ___H: DebugServerHandler<___T>,
1503 ___T: ::fidl_next::Transport,
1504{
1505 async fn log_stack_trace(
1506 &mut self,
1507
1508 request: ::fidl_next::Request<debug::LogStackTrace, ___T>,
1509
1510 responder: ::fidl_next::Responder<debug::LogStackTrace, ___T>,
1511 ) {
1512 ___H::log_stack_trace(&mut self.0, request, responder).await
1513 }
1514
1515 async fn get_host_koid(
1516 &mut self,
1517
1518 request: ::fidl_next::Request<debug::GetHostKoid, ___T>,
1519
1520 responder: ::fidl_next::Responder<debug::GetHostKoid, ___T>,
1521 ) {
1522 ___H::get_host_koid(&mut self.0, request, responder).await
1523 }
1524
1525 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1526 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1527 }
1528}
1529
1530#[doc = " Provides the bus topology for the given node.\n"]
1532#[derive(PartialEq, Debug)]
1533pub struct NodeBusTopology;
1534
1535impl ::fidl_next::Discoverable for NodeBusTopology {
1536 const PROTOCOL_NAME: &'static str = "fuchsia.driver.token.NodeBusTopology";
1537}
1538
1539#[cfg(target_os = "fuchsia")]
1540impl ::fidl_next::HasTransport for NodeBusTopology {
1541 type Transport = ::fidl_next::fuchsia::zx::Channel;
1542}
1543
1544pub mod node_bus_topology {
1545 pub mod prelude {
1546 pub use crate::{
1547 NodeBusTopology, NodeBusTopologyClientHandler, NodeBusTopologyLocalClientHandler,
1548 NodeBusTopologyLocalServerHandler, NodeBusTopologyServerHandler, node_bus_topology,
1549 };
1550
1551 pub use crate::natural::NodeBusTopologyGetRequest;
1552
1553 pub use crate::natural::NodeBusTopologyGetResponse;
1554 }
1555
1556 pub struct Get;
1557
1558 impl ::fidl_next::Method for Get {
1559 const ORDINAL: u64 = 2248866930296616381;
1560 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
1561 ::fidl_next::protocol::Flexibility::Strict;
1562
1563 type Protocol = crate::NodeBusTopology;
1564
1565 type Request = crate::wire::NodeBusTopologyGetRequest;
1566 }
1567
1568 impl ::fidl_next::TwoWayMethod for Get {
1569 type Response = ::fidl_next::wire::Result<
1570 'static,
1571 crate::wire::NodeBusTopologyGetResponse<'static>,
1572 ::fidl_next::wire::fuchsia::Status,
1573 >;
1574 }
1575
1576 impl<___R> ::fidl_next::Respond<___R> for Get {
1577 type Output = ::core::result::Result<
1578 crate::generic::NodeBusTopologyGetResponse<___R>,
1579 ::fidl_next::never::Never,
1580 >;
1581
1582 fn respond(response: ___R) -> Self::Output {
1583 ::core::result::Result::Ok(crate::generic::NodeBusTopologyGetResponse {
1584 path: response,
1585 })
1586 }
1587 }
1588
1589 impl<___R> ::fidl_next::RespondErr<___R> for Get {
1590 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
1591
1592 fn respond_err(response: ___R) -> Self::Output {
1593 ::core::result::Result::Err(response)
1594 }
1595 }
1596
1597 mod ___detail {
1598 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeBusTopology
1599 where
1600 ___T: ::fidl_next::Transport,
1601 {
1602 type Client = NodeBusTopologyClient<___T>;
1603 type Server = NodeBusTopologyServer<___T>;
1604 }
1605
1606 #[repr(transparent)]
1608 pub struct NodeBusTopologyClient<___T: ::fidl_next::Transport> {
1609 #[allow(dead_code)]
1610 client: ::fidl_next::protocol::Client<___T>,
1611 }
1612
1613 impl<___T> NodeBusTopologyClient<___T>
1614 where
1615 ___T: ::fidl_next::Transport,
1616 {
1617 pub fn get(
1618 &self,
1619
1620 token: impl ::fidl_next::Encode<
1621 ::fidl_next::wire::fuchsia::Event,
1622 <___T as ::fidl_next::Transport>::SendBuffer,
1623 >,
1624 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
1625 where
1626 <___T as ::fidl_next::Transport>::SendBuffer:
1627 ::fidl_next::encoder::InternalHandleEncoder,
1628 <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1629 {
1630 self.get_with(crate::generic::NodeBusTopologyGetRequest { token })
1631 }
1632
1633 pub fn get_with<___R>(
1634 &self,
1635 request: ___R,
1636 ) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T>
1637 where
1638 ___R: ::fidl_next::Encode<
1639 crate::wire::NodeBusTopologyGetRequest,
1640 <___T as ::fidl_next::Transport>::SendBuffer,
1641 >,
1642 {
1643 ::fidl_next::TwoWayFuture::from_untyped(self.client.send_two_way(
1644 2248866930296616381,
1645 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
1646 request,
1647 ))
1648 }
1649 }
1650
1651 #[repr(transparent)]
1653 pub struct NodeBusTopologyServer<___T: ::fidl_next::Transport> {
1654 server: ::fidl_next::protocol::Server<___T>,
1655 }
1656
1657 impl<___T> NodeBusTopologyServer<___T> where ___T: ::fidl_next::Transport {}
1658 }
1659}
1660
1661#[diagnostic::on_unimplemented(
1662 note = "If {Self} implements the non-local NodeBusTopologyClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
1663)]
1664
1665pub trait NodeBusTopologyLocalClientHandler<
1669 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1670 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1671>
1672{
1673 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1674 ::core::future::ready(())
1675 }
1676}
1677
1678impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeBusTopology
1679where
1680 ___H: NodeBusTopologyLocalClientHandler<___T>,
1681 ___T: ::fidl_next::Transport,
1682{
1683 async fn on_event(
1684 handler: &mut ___H,
1685 mut message: ::fidl_next::Message<___T>,
1686 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1687 match *message.header().ordinal {
1688 ordinal => {
1689 handler.on_unknown_interaction(ordinal).await;
1690 if ::core::matches!(
1691 message.header().flexibility(),
1692 ::fidl_next::protocol::Flexibility::Strict
1693 ) {
1694 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1695 } else {
1696 Ok(())
1697 }
1698 }
1699 }
1700 }
1701}
1702
1703#[diagnostic::on_unimplemented(
1704 note = "If {Self} implements the non-local NodeBusTopologyServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
1705)]
1706
1707pub trait NodeBusTopologyLocalServerHandler<
1711 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1712 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1713>
1714{
1715 fn get(
1716 &mut self,
1717
1718 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1719
1720 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1721 ) -> impl ::core::future::Future<Output = ()>;
1722
1723 fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
1724 ::core::future::ready(())
1725 }
1726}
1727
1728impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeBusTopology
1729where
1730 ___H: NodeBusTopologyLocalServerHandler<___T>,
1731 ___T: ::fidl_next::Transport,
1732 for<'de> crate::wire::NodeBusTopologyGetRequest: ::fidl_next::Decode<
1733 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1734 Constraint = (),
1735 >,
1736{
1737 async fn on_one_way(
1738 handler: &mut ___H,
1739 mut message: ::fidl_next::Message<___T>,
1740 ) -> ::core::result::Result<
1741 (),
1742 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1743 > {
1744 match *message.header().ordinal {
1745 ordinal => {
1746 handler.on_unknown_interaction(ordinal).await;
1747 if ::core::matches!(
1748 message.header().flexibility(),
1749 ::fidl_next::protocol::Flexibility::Strict
1750 ) {
1751 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1752 } else {
1753 Ok(())
1754 }
1755 }
1756 }
1757 }
1758
1759 async fn on_two_way(
1760 handler: &mut ___H,
1761 mut message: ::fidl_next::Message<___T>,
1762 responder: ::fidl_next::protocol::Responder<___T>,
1763 ) -> ::core::result::Result<
1764 (),
1765 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1766 > {
1767 match *message.header().ordinal {
1768 2248866930296616381 => {
1769 let responder = ::fidl_next::Responder::from_untyped(responder);
1770
1771 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1772 Ok(decoded) => {
1773 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
1774 Ok(())
1775 }
1776 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1777 ordinal: 2248866930296616381,
1778 error,
1779 }),
1780 }
1781 }
1782
1783 ordinal => {
1784 handler.on_unknown_interaction(ordinal).await;
1785 if ::core::matches!(
1786 message.header().flexibility(),
1787 ::fidl_next::protocol::Flexibility::Strict
1788 ) {
1789 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1790 } else {
1791 responder
1792 .respond_framework_error(
1793 ordinal,
1794 ::fidl_next::FrameworkError::UnknownMethod,
1795 )
1796 .expect("encoding a framework error should never fail")
1797 .await?;
1798 Ok(())
1799 }
1800 }
1801 }
1802 }
1803}
1804
1805pub trait NodeBusTopologyClientHandler<
1809 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1810 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1811>
1812{
1813 fn on_unknown_interaction(
1814 &mut self,
1815 ordinal: u64,
1816 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1817 ::core::future::ready(())
1818 }
1819}
1820
1821impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeBusTopology
1822where
1823 ___H: NodeBusTopologyClientHandler<___T> + ::core::marker::Send,
1824 ___T: ::fidl_next::Transport,
1825{
1826 async fn on_event(
1827 handler: &mut ___H,
1828 mut message: ::fidl_next::Message<___T>,
1829 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
1830 match *message.header().ordinal {
1831 ordinal => {
1832 handler.on_unknown_interaction(ordinal).await;
1833 if ::core::matches!(
1834 message.header().flexibility(),
1835 ::fidl_next::protocol::Flexibility::Strict
1836 ) {
1837 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1838 } else {
1839 Ok(())
1840 }
1841 }
1842 }
1843 }
1844}
1845
1846pub trait NodeBusTopologyServerHandler<
1850 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
1851 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
1852>
1853{
1854 fn get(
1855 &mut self,
1856
1857 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1858
1859 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1860 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
1861
1862 fn on_unknown_interaction(
1863 &mut self,
1864 ordinal: u64,
1865 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
1866 ::core::future::ready(())
1867 }
1868}
1869
1870impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeBusTopology
1871where
1872 ___H: NodeBusTopologyServerHandler<___T> + ::core::marker::Send,
1873 ___T: ::fidl_next::Transport,
1874 for<'de> crate::wire::NodeBusTopologyGetRequest: ::fidl_next::Decode<
1875 <<___T as ::fidl_next::Transport>::RecvBuffer as ::fidl_next::AsDecoder<'de>>::Decoder,
1876 Constraint = (),
1877 >,
1878{
1879 async fn on_one_way(
1880 handler: &mut ___H,
1881 mut message: ::fidl_next::Message<___T>,
1882 ) -> ::core::result::Result<
1883 (),
1884 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1885 > {
1886 match *message.header().ordinal {
1887 ordinal => {
1888 handler.on_unknown_interaction(ordinal).await;
1889 if ::core::matches!(
1890 message.header().flexibility(),
1891 ::fidl_next::protocol::Flexibility::Strict
1892 ) {
1893 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1894 } else {
1895 Ok(())
1896 }
1897 }
1898 }
1899 }
1900
1901 async fn on_two_way(
1902 handler: &mut ___H,
1903 mut message: ::fidl_next::Message<___T>,
1904 responder: ::fidl_next::protocol::Responder<___T>,
1905 ) -> ::core::result::Result<
1906 (),
1907 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
1908 > {
1909 match *message.header().ordinal {
1910 2248866930296616381 => {
1911 let responder = ::fidl_next::Responder::from_untyped(responder);
1912
1913 match ::fidl_next::AsDecoderExt::into_decoded(message) {
1914 Ok(decoded) => {
1915 handler.get(::fidl_next::Request::from_decoded(decoded), responder).await;
1916 Ok(())
1917 }
1918 Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
1919 ordinal: 2248866930296616381,
1920 error,
1921 }),
1922 }
1923 }
1924
1925 ordinal => {
1926 handler.on_unknown_interaction(ordinal).await;
1927 if ::core::matches!(
1928 message.header().flexibility(),
1929 ::fidl_next::protocol::Flexibility::Strict
1930 ) {
1931 Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
1932 } else {
1933 responder
1934 .respond_framework_error(
1935 ordinal,
1936 ::fidl_next::FrameworkError::UnknownMethod,
1937 )
1938 .expect("encoding a framework error should never fail")
1939 .await?;
1940 Ok(())
1941 }
1942 }
1943 }
1944 }
1945}
1946
1947impl<___T> NodeBusTopologyClientHandler<___T> for ::fidl_next::IgnoreEvents
1948where
1949 ___T: ::fidl_next::Transport,
1950{
1951 async fn on_unknown_interaction(&mut self, _: u64) {}
1952}
1953
1954impl<___H, ___T> NodeBusTopologyLocalClientHandler<___T> for ::fidl_next::Local<___H>
1955where
1956 ___H: NodeBusTopologyClientHandler<___T>,
1957 ___T: ::fidl_next::Transport,
1958{
1959 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1960 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1961 }
1962}
1963
1964impl<___H, ___T> NodeBusTopologyLocalServerHandler<___T> for ::fidl_next::Local<___H>
1965where
1966 ___H: NodeBusTopologyServerHandler<___T>,
1967 ___T: ::fidl_next::Transport,
1968{
1969 async fn get(
1970 &mut self,
1971
1972 request: ::fidl_next::Request<node_bus_topology::Get, ___T>,
1973
1974 responder: ::fidl_next::Responder<node_bus_topology::Get, ___T>,
1975 ) {
1976 ___H::get(&mut self.0, request, responder).await
1977 }
1978
1979 async fn on_unknown_interaction(&mut self, ordinal: u64) {
1980 ___H::on_unknown_interaction(&mut self.0, ordinal).await
1981 }
1982}
1983
1984#[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"]
1986#[derive(PartialEq, Debug)]
1987pub struct NodeToken;
1988
1989#[cfg(target_os = "fuchsia")]
1990impl ::fidl_next::HasTransport for NodeToken {
1991 type Transport = ::fidl_next::fuchsia::zx::Channel;
1992}
1993
1994pub mod node_token {
1995 pub mod prelude {
1996 pub use crate::{
1997 NodeToken, NodeTokenClientHandler, NodeTokenLocalClientHandler,
1998 NodeTokenLocalServerHandler, NodeTokenServerHandler, node_token,
1999 };
2000
2001 pub use crate::natural::NodeTokenGetResponse;
2002 }
2003
2004 pub struct Get;
2005
2006 impl ::fidl_next::Method for Get {
2007 const ORDINAL: u64 = 7212073050437890521;
2008 const FLEXIBILITY: ::fidl_next::protocol::Flexibility =
2009 ::fidl_next::protocol::Flexibility::Strict;
2010
2011 type Protocol = crate::NodeToken;
2012
2013 type Request = ::fidl_next::wire::EmptyMessageBody;
2014 }
2015
2016 impl ::fidl_next::TwoWayMethod for Get {
2017 type Response = ::fidl_next::wire::Result<
2018 'static,
2019 crate::wire::NodeTokenGetResponse,
2020 ::fidl_next::wire::fuchsia::Status,
2021 >;
2022 }
2023
2024 impl<___R> ::fidl_next::Respond<___R> for Get {
2025 type Output = ::core::result::Result<
2026 crate::generic::NodeTokenGetResponse<___R>,
2027 ::fidl_next::never::Never,
2028 >;
2029
2030 fn respond(response: ___R) -> Self::Output {
2031 ::core::result::Result::Ok(crate::generic::NodeTokenGetResponse { token: response })
2032 }
2033 }
2034
2035 impl<___R> ::fidl_next::RespondErr<___R> for Get {
2036 type Output = ::core::result::Result<::fidl_next::never::Never, ___R>;
2037
2038 fn respond_err(response: ___R) -> Self::Output {
2039 ::core::result::Result::Err(response)
2040 }
2041 }
2042
2043 mod ___detail {
2044 unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::NodeToken
2045 where
2046 ___T: ::fidl_next::Transport,
2047 {
2048 type Client = NodeTokenClient<___T>;
2049 type Server = NodeTokenServer<___T>;
2050 }
2051
2052 #[repr(transparent)]
2054 pub struct NodeTokenClient<___T: ::fidl_next::Transport> {
2055 #[allow(dead_code)]
2056 client: ::fidl_next::protocol::Client<___T>,
2057 }
2058
2059 impl<___T> NodeTokenClient<___T>
2060 where
2061 ___T: ::fidl_next::Transport,
2062 {
2063 pub fn get(&self) -> ::fidl_next::TwoWayFuture<'_, super::Get, ___T> {
2064 ::fidl_next::TwoWayFuture::from_untyped(
2065 self.client.send_two_way::<::fidl_next::wire::EmptyMessageBody>(
2066 7212073050437890521,
2067 <super::Get as ::fidl_next::Method>::FLEXIBILITY,
2068 (),
2069 ),
2070 )
2071 }
2072 }
2073
2074 #[repr(transparent)]
2076 pub struct NodeTokenServer<___T: ::fidl_next::Transport> {
2077 server: ::fidl_next::protocol::Server<___T>,
2078 }
2079
2080 impl<___T> NodeTokenServer<___T> where ___T: ::fidl_next::Transport {}
2081 }
2082}
2083
2084#[diagnostic::on_unimplemented(
2085 note = "If {Self} implements the non-local NodeTokenClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
2086)]
2087
2088pub trait NodeTokenLocalClientHandler<
2092 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2093 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2094>
2095{
2096}
2097
2098impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for NodeToken
2099where
2100 ___H: NodeTokenLocalClientHandler<___T>,
2101 ___T: ::fidl_next::Transport,
2102{
2103 async fn on_event(
2104 handler: &mut ___H,
2105 mut message: ::fidl_next::Message<___T>,
2106 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2107 match *message.header().ordinal {
2108 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2109 }
2110 }
2111}
2112
2113#[diagnostic::on_unimplemented(
2114 note = "If {Self} implements the non-local NodeTokenServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
2115)]
2116
2117pub trait NodeTokenLocalServerHandler<
2121 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2122 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2123>
2124{
2125 fn get(
2126 &mut self,
2127
2128 responder: ::fidl_next::Responder<node_token::Get, ___T>,
2129 ) -> impl ::core::future::Future<Output = ()>;
2130}
2131
2132impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for NodeToken
2133where
2134 ___H: NodeTokenLocalServerHandler<___T>,
2135 ___T: ::fidl_next::Transport,
2136{
2137 async fn on_one_way(
2138 handler: &mut ___H,
2139 mut message: ::fidl_next::Message<___T>,
2140 ) -> ::core::result::Result<
2141 (),
2142 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2143 > {
2144 match *message.header().ordinal {
2145 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2146 }
2147 }
2148
2149 async fn on_two_way(
2150 handler: &mut ___H,
2151 mut message: ::fidl_next::Message<___T>,
2152 responder: ::fidl_next::protocol::Responder<___T>,
2153 ) -> ::core::result::Result<
2154 (),
2155 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2156 > {
2157 match *message.header().ordinal {
2158 7212073050437890521 => {
2159 let responder = ::fidl_next::Responder::from_untyped(responder);
2160
2161 handler.get(responder).await;
2162 Ok(())
2163 }
2164
2165 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2166 }
2167 }
2168}
2169
2170pub trait NodeTokenClientHandler<
2174 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2175 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2176>
2177{
2178}
2179
2180impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for NodeToken
2181where
2182 ___H: NodeTokenClientHandler<___T> + ::core::marker::Send,
2183 ___T: ::fidl_next::Transport,
2184{
2185 async fn on_event(
2186 handler: &mut ___H,
2187 mut message: ::fidl_next::Message<___T>,
2188 ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2189 match *message.header().ordinal {
2190 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2191 }
2192 }
2193}
2194
2195pub trait NodeTokenServerHandler<
2199 #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2200 #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
2201>
2202{
2203 fn get(
2204 &mut self,
2205
2206 responder: ::fidl_next::Responder<node_token::Get, ___T>,
2207 ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2208}
2209
2210impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for NodeToken
2211where
2212 ___H: NodeTokenServerHandler<___T> + ::core::marker::Send,
2213 ___T: ::fidl_next::Transport,
2214{
2215 async fn on_one_way(
2216 handler: &mut ___H,
2217 mut message: ::fidl_next::Message<___T>,
2218 ) -> ::core::result::Result<
2219 (),
2220 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2221 > {
2222 match *message.header().ordinal {
2223 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2224 }
2225 }
2226
2227 async fn on_two_way(
2228 handler: &mut ___H,
2229 mut message: ::fidl_next::Message<___T>,
2230 responder: ::fidl_next::protocol::Responder<___T>,
2231 ) -> ::core::result::Result<
2232 (),
2233 ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2234 > {
2235 match *message.header().ordinal {
2236 7212073050437890521 => {
2237 let responder = ::fidl_next::Responder::from_untyped(responder);
2238
2239 handler.get(responder).await;
2240 Ok(())
2241 }
2242
2243 ordinal => Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal)),
2244 }
2245 }
2246}
2247
2248impl<___T> NodeTokenClientHandler<___T> for ::fidl_next::IgnoreEvents where
2249 ___T: ::fidl_next::Transport
2250{
2251}
2252
2253impl<___H, ___T> NodeTokenLocalClientHandler<___T> for ::fidl_next::Local<___H>
2254where
2255 ___H: NodeTokenClientHandler<___T>,
2256 ___T: ::fidl_next::Transport,
2257{
2258}
2259
2260impl<___H, ___T> NodeTokenLocalServerHandler<___T> for ::fidl_next::Local<___H>
2261where
2262 ___H: NodeTokenServerHandler<___T>,
2263 ___T: ::fidl_next::Transport,
2264{
2265 async fn get(&mut self, responder: ::fidl_next::Responder<node_token::Get, ___T>) {
2266 ___H::get(&mut self.0, responder).await
2267 }
2268}
2269
2270pub use fidl_next_common_fuchsia_driver_token::*;