Skip to main content

fidl_next_common_fuchsia_hardware_mailbox/
fidl_next_common_fuchsia_hardware_mailbox.rs

1// DO NOT EDIT: This file is machine-generated by fidlgen
2#![warn(clippy::all)]
3#![allow(unused_parens, unused_variables, unused_mut, unused_imports, unreachable_code)]
4
5pub mod natural {
6
7    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
8    pub struct ChannelSendMessageRequest {
9        pub message: ::std::vec::Vec<u8>,
10    }
11
12    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelSendMessageRequest<'static>, ___E>
13        for ChannelSendMessageRequest
14    where
15        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
16        ___E: ::fidl_next::Encoder,
17    {
18        #[inline]
19        fn encode(
20            self,
21            encoder_: &mut ___E,
22            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendMessageRequest<'static>>,
23            _: (),
24        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
25            ::fidl_next::munge! {
26                let crate::wire::ChannelSendMessageRequest {
27                    message,
28
29                } = out_;
30            }
31
32            ::fidl_next::Encode::encode(self.message, encoder_, message, (4294967295, ()))?;
33
34            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(message.as_mut_ptr()) };
35            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
36
37            Ok(())
38        }
39    }
40
41    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelSendMessageRequest<'static>, ___E>
42        for &'a ChannelSendMessageRequest
43    where
44        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
45        ___E: ::fidl_next::Encoder,
46    {
47        #[inline]
48        fn encode(
49            self,
50            encoder_: &mut ___E,
51            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendMessageRequest<'static>>,
52            _: (),
53        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
54            ::fidl_next::munge! {
55                let crate::wire::ChannelSendMessageRequest {
56                    message,
57
58                } = out_;
59            }
60
61            ::fidl_next::Encode::encode(&self.message, encoder_, message, (4294967295, ()))?;
62
63            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(message.as_mut_ptr()) };
64            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
65
66            Ok(())
67        }
68    }
69
70    unsafe impl<___E>
71        ::fidl_next::EncodeOption<
72            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendMessageRequest<'static>>,
73            ___E,
74        > for ChannelSendMessageRequest
75    where
76        ___E: ::fidl_next::Encoder + ?Sized,
77        ChannelSendMessageRequest:
78            ::fidl_next::Encode<crate::wire::ChannelSendMessageRequest<'static>, ___E>,
79    {
80        #[inline]
81        fn encode_option(
82            this: ::core::option::Option<Self>,
83            encoder: &mut ___E,
84            out: &mut ::core::mem::MaybeUninit<
85                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendMessageRequest<'static>>,
86            >,
87            _: (),
88        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
89            if let Some(inner) = this {
90                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
91                ::fidl_next::wire::Box::encode_present(out);
92            } else {
93                ::fidl_next::wire::Box::encode_absent(out);
94            }
95
96            Ok(())
97        }
98    }
99
100    unsafe impl<'a, ___E>
101        ::fidl_next::EncodeOption<
102            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendMessageRequest<'static>>,
103            ___E,
104        > for &'a ChannelSendMessageRequest
105    where
106        ___E: ::fidl_next::Encoder + ?Sized,
107        &'a ChannelSendMessageRequest:
108            ::fidl_next::Encode<crate::wire::ChannelSendMessageRequest<'static>, ___E>,
109    {
110        #[inline]
111        fn encode_option(
112            this: ::core::option::Option<Self>,
113            encoder: &mut ___E,
114            out: &mut ::core::mem::MaybeUninit<
115                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendMessageRequest<'static>>,
116            >,
117            _: (),
118        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
119            if let Some(inner) = this {
120                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
121                ::fidl_next::wire::Box::encode_present(out);
122            } else {
123                ::fidl_next::wire::Box::encode_absent(out);
124            }
125
126            Ok(())
127        }
128    }
129
130    impl<'de> ::fidl_next::FromWire<crate::wire::ChannelSendMessageRequest<'de>>
131        for ChannelSendMessageRequest
132    {
133        #[inline]
134        fn from_wire(wire: crate::wire::ChannelSendMessageRequest<'de>) -> Self {
135            Self { message: ::fidl_next::FromWire::from_wire(wire.message) }
136        }
137    }
138
139    impl<'de> ::fidl_next::FromWireRef<crate::wire::ChannelSendMessageRequest<'de>>
140        for ChannelSendMessageRequest
141    {
142        #[inline]
143        fn from_wire_ref(wire: &crate::wire::ChannelSendMessageRequest<'de>) -> Self {
144            Self { message: ::fidl_next::FromWireRef::from_wire_ref(&wire.message) }
145        }
146    }
147
148    pub type ChannelSendMessageResponse = ();
149
150    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
151    pub struct ChannelSendRequestRequest {
152        pub request: ::std::vec::Vec<u8>,
153    }
154
155    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelSendRequestRequest<'static>, ___E>
156        for ChannelSendRequestRequest
157    where
158        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
159        ___E: ::fidl_next::Encoder,
160    {
161        #[inline]
162        fn encode(
163            self,
164            encoder_: &mut ___E,
165            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestRequest<'static>>,
166            _: (),
167        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
168            ::fidl_next::munge! {
169                let crate::wire::ChannelSendRequestRequest {
170                    request,
171
172                } = out_;
173            }
174
175            ::fidl_next::Encode::encode(self.request, encoder_, request, (4294967295, ()))?;
176
177            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
178            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
179
180            Ok(())
181        }
182    }
183
184    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelSendRequestRequest<'static>, ___E>
185        for &'a ChannelSendRequestRequest
186    where
187        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
188        ___E: ::fidl_next::Encoder,
189    {
190        #[inline]
191        fn encode(
192            self,
193            encoder_: &mut ___E,
194            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestRequest<'static>>,
195            _: (),
196        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
197            ::fidl_next::munge! {
198                let crate::wire::ChannelSendRequestRequest {
199                    request,
200
201                } = out_;
202            }
203
204            ::fidl_next::Encode::encode(&self.request, encoder_, request, (4294967295, ()))?;
205
206            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(request.as_mut_ptr()) };
207            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
208
209            Ok(())
210        }
211    }
212
213    unsafe impl<___E>
214        ::fidl_next::EncodeOption<
215            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestRequest<'static>>,
216            ___E,
217        > for ChannelSendRequestRequest
218    where
219        ___E: ::fidl_next::Encoder + ?Sized,
220        ChannelSendRequestRequest:
221            ::fidl_next::Encode<crate::wire::ChannelSendRequestRequest<'static>, ___E>,
222    {
223        #[inline]
224        fn encode_option(
225            this: ::core::option::Option<Self>,
226            encoder: &mut ___E,
227            out: &mut ::core::mem::MaybeUninit<
228                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestRequest<'static>>,
229            >,
230            _: (),
231        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
232            if let Some(inner) = this {
233                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
234                ::fidl_next::wire::Box::encode_present(out);
235            } else {
236                ::fidl_next::wire::Box::encode_absent(out);
237            }
238
239            Ok(())
240        }
241    }
242
243    unsafe impl<'a, ___E>
244        ::fidl_next::EncodeOption<
245            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestRequest<'static>>,
246            ___E,
247        > for &'a ChannelSendRequestRequest
248    where
249        ___E: ::fidl_next::Encoder + ?Sized,
250        &'a ChannelSendRequestRequest:
251            ::fidl_next::Encode<crate::wire::ChannelSendRequestRequest<'static>, ___E>,
252    {
253        #[inline]
254        fn encode_option(
255            this: ::core::option::Option<Self>,
256            encoder: &mut ___E,
257            out: &mut ::core::mem::MaybeUninit<
258                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestRequest<'static>>,
259            >,
260            _: (),
261        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
262            if let Some(inner) = this {
263                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
264                ::fidl_next::wire::Box::encode_present(out);
265            } else {
266                ::fidl_next::wire::Box::encode_absent(out);
267            }
268
269            Ok(())
270        }
271    }
272
273    impl<'de> ::fidl_next::FromWire<crate::wire::ChannelSendRequestRequest<'de>>
274        for ChannelSendRequestRequest
275    {
276        #[inline]
277        fn from_wire(wire: crate::wire::ChannelSendRequestRequest<'de>) -> Self {
278            Self { request: ::fidl_next::FromWire::from_wire(wire.request) }
279        }
280    }
281
282    impl<'de> ::fidl_next::FromWireRef<crate::wire::ChannelSendRequestRequest<'de>>
283        for ChannelSendRequestRequest
284    {
285        #[inline]
286        fn from_wire_ref(wire: &crate::wire::ChannelSendRequestRequest<'de>) -> Self {
287            Self { request: ::fidl_next::FromWireRef::from_wire_ref(&wire.request) }
288        }
289    }
290
291    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
292    pub struct ChannelSendRequestResponse {
293        pub response: ::std::vec::Vec<u8>,
294    }
295
296    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelSendRequestResponse<'static>, ___E>
297        for ChannelSendRequestResponse
298    where
299        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
300        ___E: ::fidl_next::Encoder,
301    {
302        #[inline]
303        fn encode(
304            self,
305            encoder_: &mut ___E,
306            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestResponse<'static>>,
307            _: (),
308        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
309            ::fidl_next::munge! {
310                let crate::wire::ChannelSendRequestResponse {
311                    response,
312
313                } = out_;
314            }
315
316            ::fidl_next::Encode::encode(self.response, encoder_, response, (4294967295, ()))?;
317
318            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
319            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
320
321            Ok(())
322        }
323    }
324
325    unsafe impl<'a, ___E>
326        ::fidl_next::Encode<crate::wire::ChannelSendRequestResponse<'static>, ___E>
327        for &'a ChannelSendRequestResponse
328    where
329        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
330        ___E: ::fidl_next::Encoder,
331    {
332        #[inline]
333        fn encode(
334            self,
335            encoder_: &mut ___E,
336            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestResponse<'static>>,
337            _: (),
338        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
339            ::fidl_next::munge! {
340                let crate::wire::ChannelSendRequestResponse {
341                    response,
342
343                } = out_;
344            }
345
346            ::fidl_next::Encode::encode(&self.response, encoder_, response, (4294967295, ()))?;
347
348            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
349            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
350
351            Ok(())
352        }
353    }
354
355    unsafe impl<___E>
356        ::fidl_next::EncodeOption<
357            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestResponse<'static>>,
358            ___E,
359        > for ChannelSendRequestResponse
360    where
361        ___E: ::fidl_next::Encoder + ?Sized,
362        ChannelSendRequestResponse:
363            ::fidl_next::Encode<crate::wire::ChannelSendRequestResponse<'static>, ___E>,
364    {
365        #[inline]
366        fn encode_option(
367            this: ::core::option::Option<Self>,
368            encoder: &mut ___E,
369            out: &mut ::core::mem::MaybeUninit<
370                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestResponse<'static>>,
371            >,
372            _: (),
373        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
374            if let Some(inner) = this {
375                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
376                ::fidl_next::wire::Box::encode_present(out);
377            } else {
378                ::fidl_next::wire::Box::encode_absent(out);
379            }
380
381            Ok(())
382        }
383    }
384
385    unsafe impl<'a, ___E>
386        ::fidl_next::EncodeOption<
387            ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestResponse<'static>>,
388            ___E,
389        > for &'a ChannelSendRequestResponse
390    where
391        ___E: ::fidl_next::Encoder + ?Sized,
392        &'a ChannelSendRequestResponse:
393            ::fidl_next::Encode<crate::wire::ChannelSendRequestResponse<'static>, ___E>,
394    {
395        #[inline]
396        fn encode_option(
397            this: ::core::option::Option<Self>,
398            encoder: &mut ___E,
399            out: &mut ::core::mem::MaybeUninit<
400                ::fidl_next::wire::Box<'static, crate::wire::ChannelSendRequestResponse<'static>>,
401            >,
402            _: (),
403        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
404            if let Some(inner) = this {
405                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
406                ::fidl_next::wire::Box::encode_present(out);
407            } else {
408                ::fidl_next::wire::Box::encode_absent(out);
409            }
410
411            Ok(())
412        }
413    }
414
415    impl<'de> ::fidl_next::FromWire<crate::wire::ChannelSendRequestResponse<'de>>
416        for ChannelSendRequestResponse
417    {
418        #[inline]
419        fn from_wire(wire: crate::wire::ChannelSendRequestResponse<'de>) -> Self {
420            Self { response: ::fidl_next::FromWire::from_wire(wire.response) }
421        }
422    }
423
424    impl<'de> ::fidl_next::FromWireRef<crate::wire::ChannelSendRequestResponse<'de>>
425        for ChannelSendRequestResponse
426    {
427        #[inline]
428        fn from_wire_ref(wire: &crate::wire::ChannelSendRequestResponse<'de>) -> Self {
429            Self { response: ::fidl_next::FromWireRef::from_wire_ref(&wire.response) }
430        }
431    }
432
433    pub type ChannelRegisterListenerResponse = ();
434
435    #[derive(Debug, Default, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
436    pub struct ChannelInfo {
437        pub channel: ::core::option::Option<u32>,
438
439        pub client: ::core::option::Option<u32>,
440
441        pub id: ::core::option::Option<u32>,
442    }
443
444    impl ChannelInfo {
445        fn __max_ordinal(&self) -> usize {
446            if self.id.is_some() {
447                return 3;
448            }
449
450            if self.client.is_some() {
451                return 2;
452            }
453
454            if self.channel.is_some() {
455                return 1;
456            }
457
458            0
459        }
460    }
461
462    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ChannelInfo<'static>, ___E> for ChannelInfo
463    where
464        ___E: ::fidl_next::Encoder + ?Sized,
465    {
466        #[inline]
467        fn encode(
468            mut self,
469            encoder: &mut ___E,
470            out: &mut ::core::mem::MaybeUninit<crate::wire::ChannelInfo<'static>>,
471            _: (),
472        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
473            ::fidl_next::munge!(let crate::wire::ChannelInfo { table } = out);
474
475            let max_ord = self.__max_ordinal();
476
477            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
478            ::fidl_next::Wire::zero_padding(&mut out);
479
480            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
481                ::fidl_next::wire::Envelope,
482            >(encoder, max_ord);
483
484            for i in 1..=max_ord {
485                match i {
486                    3 => {
487                        if let Some(value) = self.id.take() {
488                            ::fidl_next::wire::Envelope::encode_value::<
489                                ::fidl_next::wire::Uint32,
490                                ___E,
491                            >(
492                                value, preallocated.encoder, &mut out, ()
493                            )?;
494                        } else {
495                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
496                        }
497                    }
498
499                    2 => {
500                        if let Some(value) = self.client.take() {
501                            ::fidl_next::wire::Envelope::encode_value::<
502                                ::fidl_next::wire::Uint32,
503                                ___E,
504                            >(
505                                value, preallocated.encoder, &mut out, ()
506                            )?;
507                        } else {
508                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
509                        }
510                    }
511
512                    1 => {
513                        if let Some(value) = self.channel.take() {
514                            ::fidl_next::wire::Envelope::encode_value::<
515                                ::fidl_next::wire::Uint32,
516                                ___E,
517                            >(
518                                value, preallocated.encoder, &mut out, ()
519                            )?;
520                        } else {
521                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
522                        }
523                    }
524
525                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
526                }
527                unsafe {
528                    preallocated.write_next(out.assume_init_ref());
529                }
530            }
531
532            ::fidl_next::wire::Table::encode_len(table, max_ord);
533
534            Ok(())
535        }
536    }
537
538    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ChannelInfo<'static>, ___E>
539        for &'a ChannelInfo
540    where
541        ___E: ::fidl_next::Encoder + ?Sized,
542    {
543        #[inline]
544        fn encode(
545            self,
546            encoder: &mut ___E,
547            out: &mut ::core::mem::MaybeUninit<crate::wire::ChannelInfo<'static>>,
548            _: (),
549        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
550            ::fidl_next::munge!(let crate::wire::ChannelInfo { table } = out);
551
552            let max_ord = self.__max_ordinal();
553
554            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
555            ::fidl_next::Wire::zero_padding(&mut out);
556
557            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
558                ::fidl_next::wire::Envelope,
559            >(encoder, max_ord);
560
561            for i in 1..=max_ord {
562                match i {
563                    3 => {
564                        if let Some(value) = &self.id {
565                            ::fidl_next::wire::Envelope::encode_value::<
566                                ::fidl_next::wire::Uint32,
567                                ___E,
568                            >(
569                                value, preallocated.encoder, &mut out, ()
570                            )?;
571                        } else {
572                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
573                        }
574                    }
575
576                    2 => {
577                        if let Some(value) = &self.client {
578                            ::fidl_next::wire::Envelope::encode_value::<
579                                ::fidl_next::wire::Uint32,
580                                ___E,
581                            >(
582                                value, preallocated.encoder, &mut out, ()
583                            )?;
584                        } else {
585                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
586                        }
587                    }
588
589                    1 => {
590                        if let Some(value) = &self.channel {
591                            ::fidl_next::wire::Envelope::encode_value::<
592                                ::fidl_next::wire::Uint32,
593                                ___E,
594                            >(
595                                value, preallocated.encoder, &mut out, ()
596                            )?;
597                        } else {
598                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
599                        }
600                    }
601
602                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
603                }
604                unsafe {
605                    preallocated.write_next(out.assume_init_ref());
606                }
607            }
608
609            ::fidl_next::wire::Table::encode_len(table, max_ord);
610
611            Ok(())
612        }
613    }
614
615    impl<'de> ::fidl_next::FromWire<crate::wire::ChannelInfo<'de>> for ChannelInfo {
616        #[inline]
617        fn from_wire(wire_: crate::wire::ChannelInfo<'de>) -> Self {
618            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
619
620            let channel = wire_.table.get(1);
621
622            let client = wire_.table.get(2);
623
624            let id = wire_.table.get(3);
625
626            Self {
627                channel: channel.map(|envelope| {
628                    ::fidl_next::FromWire::from_wire(unsafe {
629                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
630                    })
631                }),
632
633                client: client.map(|envelope| {
634                    ::fidl_next::FromWire::from_wire(unsafe {
635                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
636                    })
637                }),
638
639                id: id.map(|envelope| {
640                    ::fidl_next::FromWire::from_wire(unsafe {
641                        envelope.read_unchecked::<::fidl_next::wire::Uint32>()
642                    })
643                }),
644            }
645        }
646    }
647
648    impl<'de> ::fidl_next::FromWireRef<crate::wire::ChannelInfo<'de>> for ChannelInfo {
649        #[inline]
650        fn from_wire_ref(wire: &crate::wire::ChannelInfo<'de>) -> Self {
651            Self {
652                channel: wire.table.get(1).map(|envelope| {
653                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
654                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
655                    })
656                }),
657
658                client: wire.table.get(2).map(|envelope| {
659                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
660                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
661                    })
662                }),
663
664                id: wire.table.get(3).map(|envelope| {
665                    ::fidl_next::FromWireRef::from_wire_ref(unsafe {
666                        envelope.deref_unchecked::<::fidl_next::wire::Uint32>()
667                    })
668                }),
669            }
670        }
671    }
672
673    #[doc = " `ControllerInfo` is passed to mailbox controller drivers via metadata.\n"]
674    #[derive(Debug, Default, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
675    pub struct ControllerInfo {
676        pub id: ::core::option::Option<u32>,
677
678        pub channels: ::core::option::Option<::std::vec::Vec<crate::natural::ChannelInfo>>,
679    }
680
681    impl ControllerInfo {
682        fn __max_ordinal(&self) -> usize {
683            if self.channels.is_some() {
684                return 2;
685            }
686
687            if self.id.is_some() {
688                return 1;
689            }
690
691            0
692        }
693    }
694
695    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ControllerInfo<'static>, ___E> for ControllerInfo
696    where
697        ___E: ::fidl_next::Encoder + ?Sized,
698    {
699        #[inline]
700        fn encode(
701            mut self,
702            encoder: &mut ___E,
703            out: &mut ::core::mem::MaybeUninit<crate::wire::ControllerInfo<'static>>,
704            _: (),
705        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
706            ::fidl_next::munge!(let crate::wire::ControllerInfo { table } = out);
707
708            let max_ord = self.__max_ordinal();
709
710            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
711            ::fidl_next::Wire::zero_padding(&mut out);
712
713            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
714                ::fidl_next::wire::Envelope,
715            >(encoder, max_ord);
716
717            for i in 1..=max_ord {
718                match i {
719                    2 => {
720                        if let Some(value) = self.channels.take() {
721                            ::fidl_next::wire::Envelope::encode_value::<
722                                ::fidl_next::wire::Vector<
723                                    'static,
724                                    crate::wire::ChannelInfo<'static>,
725                                >,
726                                ___E,
727                            >(
728                                value, preallocated.encoder, &mut out, (4294967295, ())
729                            )?;
730                        } else {
731                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
732                        }
733                    }
734
735                    1 => {
736                        if let Some(value) = self.id.take() {
737                            ::fidl_next::wire::Envelope::encode_value::<
738                                ::fidl_next::wire::Uint32,
739                                ___E,
740                            >(
741                                value, preallocated.encoder, &mut out, ()
742                            )?;
743                        } else {
744                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
745                        }
746                    }
747
748                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
749                }
750                unsafe {
751                    preallocated.write_next(out.assume_init_ref());
752                }
753            }
754
755            ::fidl_next::wire::Table::encode_len(table, max_ord);
756
757            Ok(())
758        }
759    }
760
761    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ControllerInfo<'static>, ___E>
762        for &'a ControllerInfo
763    where
764        ___E: ::fidl_next::Encoder + ?Sized,
765    {
766        #[inline]
767        fn encode(
768            self,
769            encoder: &mut ___E,
770            out: &mut ::core::mem::MaybeUninit<crate::wire::ControllerInfo<'static>>,
771            _: (),
772        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
773            ::fidl_next::munge!(let crate::wire::ControllerInfo { table } = out);
774
775            let max_ord = self.__max_ordinal();
776
777            let mut out = ::core::mem::MaybeUninit::<::fidl_next::wire::Envelope>::uninit();
778            ::fidl_next::Wire::zero_padding(&mut out);
779
780            let mut preallocated = ::fidl_next::EncoderExt::preallocate::<
781                ::fidl_next::wire::Envelope,
782            >(encoder, max_ord);
783
784            for i in 1..=max_ord {
785                match i {
786                    2 => {
787                        if let Some(value) = &self.channels {
788                            ::fidl_next::wire::Envelope::encode_value::<
789                                ::fidl_next::wire::Vector<
790                                    'static,
791                                    crate::wire::ChannelInfo<'static>,
792                                >,
793                                ___E,
794                            >(
795                                value, preallocated.encoder, &mut out, (4294967295, ())
796                            )?;
797                        } else {
798                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
799                        }
800                    }
801
802                    1 => {
803                        if let Some(value) = &self.id {
804                            ::fidl_next::wire::Envelope::encode_value::<
805                                ::fidl_next::wire::Uint32,
806                                ___E,
807                            >(
808                                value, preallocated.encoder, &mut out, ()
809                            )?;
810                        } else {
811                            ::fidl_next::wire::Envelope::encode_zero(&mut out)
812                        }
813                    }
814
815                    _ => ::fidl_next::wire::Envelope::encode_zero(&mut out),
816                }
817                unsafe {
818                    preallocated.write_next(out.assume_init_ref());
819                }
820            }
821
822            ::fidl_next::wire::Table::encode_len(table, max_ord);
823
824            Ok(())
825        }
826    }
827
828    impl<'de> ::fidl_next::FromWire<crate::wire::ControllerInfo<'de>> for ControllerInfo {
829        #[inline]
830        fn from_wire(wire_: crate::wire::ControllerInfo<'de>) -> Self {
831            let wire_ = ::core::mem::ManuallyDrop::new(wire_);
832
833            let id = wire_.table.get(1);
834
835            let channels = wire_.table.get(2);
836
837            Self {
838
839
840                id: id.map(|envelope| ::fidl_next::FromWire::from_wire(
841                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() }
842                )),
843
844
845                channels: channels.map(|envelope| ::fidl_next::FromWire::from_wire(
846                    unsafe { envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>>() }
847                )),
848
849        }
850        }
851    }
852
853    impl<'de> ::fidl_next::FromWireRef<crate::wire::ControllerInfo<'de>> for ControllerInfo {
854        #[inline]
855        fn from_wire_ref(wire: &crate::wire::ControllerInfo<'de>) -> Self {
856            Self {
857
858
859                id: wire.table.get(1)
860                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
861                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Uint32>() }
862                    )),
863
864
865                channels: wire.table.get(2)
866                    .map(|envelope| ::fidl_next::FromWireRef::from_wire_ref(
867                        unsafe { envelope.deref_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>>() }
868                    )),
869
870        }
871        }
872    }
873
874    pub type ListenerOnMessageResponse = ();
875
876    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
877    pub struct ListenerOnRequestResponse {
878        pub response: ::std::vec::Vec<u8>,
879    }
880
881    unsafe impl<___E> ::fidl_next::Encode<crate::wire::ListenerOnRequestResponse<'static>, ___E>
882        for ListenerOnRequestResponse
883    where
884        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
885        ___E: ::fidl_next::Encoder,
886    {
887        #[inline]
888        fn encode(
889            self,
890            encoder_: &mut ___E,
891            out_: &mut ::core::mem::MaybeUninit<crate::wire::ListenerOnRequestResponse<'static>>,
892            _: (),
893        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
894            ::fidl_next::munge! {
895                let crate::wire::ListenerOnRequestResponse {
896                    response,
897
898                } = out_;
899            }
900
901            ::fidl_next::Encode::encode(self.response, encoder_, response, (4294967295, ()))?;
902
903            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
904            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
905
906            Ok(())
907        }
908    }
909
910    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::ListenerOnRequestResponse<'static>, ___E>
911        for &'a ListenerOnRequestResponse
912    where
913        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
914        ___E: ::fidl_next::Encoder,
915    {
916        #[inline]
917        fn encode(
918            self,
919            encoder_: &mut ___E,
920            out_: &mut ::core::mem::MaybeUninit<crate::wire::ListenerOnRequestResponse<'static>>,
921            _: (),
922        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
923            ::fidl_next::munge! {
924                let crate::wire::ListenerOnRequestResponse {
925                    response,
926
927                } = out_;
928            }
929
930            ::fidl_next::Encode::encode(&self.response, encoder_, response, (4294967295, ()))?;
931
932            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(response.as_mut_ptr()) };
933            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
934
935            Ok(())
936        }
937    }
938
939    unsafe impl<___E>
940        ::fidl_next::EncodeOption<
941            ::fidl_next::wire::Box<'static, crate::wire::ListenerOnRequestResponse<'static>>,
942            ___E,
943        > for ListenerOnRequestResponse
944    where
945        ___E: ::fidl_next::Encoder + ?Sized,
946        ListenerOnRequestResponse:
947            ::fidl_next::Encode<crate::wire::ListenerOnRequestResponse<'static>, ___E>,
948    {
949        #[inline]
950        fn encode_option(
951            this: ::core::option::Option<Self>,
952            encoder: &mut ___E,
953            out: &mut ::core::mem::MaybeUninit<
954                ::fidl_next::wire::Box<'static, crate::wire::ListenerOnRequestResponse<'static>>,
955            >,
956            _: (),
957        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
958            if let Some(inner) = this {
959                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
960                ::fidl_next::wire::Box::encode_present(out);
961            } else {
962                ::fidl_next::wire::Box::encode_absent(out);
963            }
964
965            Ok(())
966        }
967    }
968
969    unsafe impl<'a, ___E>
970        ::fidl_next::EncodeOption<
971            ::fidl_next::wire::Box<'static, crate::wire::ListenerOnRequestResponse<'static>>,
972            ___E,
973        > for &'a ListenerOnRequestResponse
974    where
975        ___E: ::fidl_next::Encoder + ?Sized,
976        &'a ListenerOnRequestResponse:
977            ::fidl_next::Encode<crate::wire::ListenerOnRequestResponse<'static>, ___E>,
978    {
979        #[inline]
980        fn encode_option(
981            this: ::core::option::Option<Self>,
982            encoder: &mut ___E,
983            out: &mut ::core::mem::MaybeUninit<
984                ::fidl_next::wire::Box<'static, crate::wire::ListenerOnRequestResponse<'static>>,
985            >,
986            _: (),
987        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
988            if let Some(inner) = this {
989                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
990                ::fidl_next::wire::Box::encode_present(out);
991            } else {
992                ::fidl_next::wire::Box::encode_absent(out);
993            }
994
995            Ok(())
996        }
997    }
998
999    impl<'de> ::fidl_next::FromWire<crate::wire::ListenerOnRequestResponse<'de>>
1000        for ListenerOnRequestResponse
1001    {
1002        #[inline]
1003        fn from_wire(wire: crate::wire::ListenerOnRequestResponse<'de>) -> Self {
1004            Self { response: ::fidl_next::FromWire::from_wire(wire.response) }
1005        }
1006    }
1007
1008    impl<'de> ::fidl_next::FromWireRef<crate::wire::ListenerOnRequestResponse<'de>>
1009        for ListenerOnRequestResponse
1010    {
1011        #[inline]
1012        fn from_wire_ref(wire: &crate::wire::ListenerOnRequestResponse<'de>) -> Self {
1013            Self { response: ::fidl_next::FromWireRef::from_wire_ref(&wire.response) }
1014        }
1015    }
1016}
1017
1018pub mod wire {
1019
1020    /// The wire type corresponding to [`ChannelSendMessageRequest`].
1021    #[derive(Debug)]
1022    #[repr(C)]
1023    pub struct ChannelSendMessageRequest<'de> {
1024        pub message: ::fidl_next::wire::Vector<'de, u8>,
1025    }
1026
1027    static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSendMessageRequest<'_>>(), 16);
1028    static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSendMessageRequest<'_>>(), 8);
1029
1030    static_assertions::const_assert_eq!(
1031        std::mem::offset_of!(ChannelSendMessageRequest<'_>, message),
1032        0
1033    );
1034
1035    impl ::fidl_next::Constrained for ChannelSendMessageRequest<'_> {
1036        type Constraint = ();
1037
1038        fn validate(
1039            _: ::fidl_next::Slot<'_, Self>,
1040            _: Self::Constraint,
1041        ) -> Result<(), ::fidl_next::ValidationError> {
1042            Ok(())
1043        }
1044    }
1045
1046    unsafe impl ::fidl_next::Wire for ChannelSendMessageRequest<'static> {
1047        type Narrowed<'de> = ChannelSendMessageRequest<'de>;
1048
1049        #[inline]
1050        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1051            ::fidl_next::munge! {
1052                let Self {
1053                    message,
1054
1055                } = &mut *out_;
1056            }
1057
1058            ::fidl_next::Wire::zero_padding(message);
1059        }
1060    }
1061
1062    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ChannelSendMessageRequest<'de>
1063    where
1064        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1065        ___D: ::fidl_next::Decoder<'de>,
1066    {
1067        fn decode(
1068            slot_: ::fidl_next::Slot<'_, Self>,
1069            decoder_: &mut ___D,
1070            _: (),
1071        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1072            ::fidl_next::munge! {
1073                let Self {
1074                    mut message,
1075
1076                } = slot_;
1077            }
1078
1079            let _field = message.as_mut();
1080            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1081            ::fidl_next::Decode::decode(message.as_mut(), decoder_, (4294967295, ()))?;
1082
1083            Ok(())
1084        }
1085    }
1086
1087    impl<'de> ::fidl_next::IntoNatural for ChannelSendMessageRequest<'de> {
1088        type Natural = crate::natural::ChannelSendMessageRequest;
1089    }
1090
1091    /// The wire type corresponding to [`ChannelSendMessageResponse`].
1092    pub type ChannelSendMessageResponse = ::fidl_next::wire::Unit;
1093
1094    /// The wire type corresponding to [`ChannelSendRequestRequest`].
1095    #[derive(Debug)]
1096    #[repr(C)]
1097    pub struct ChannelSendRequestRequest<'de> {
1098        pub request: ::fidl_next::wire::Vector<'de, u8>,
1099    }
1100
1101    static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSendRequestRequest<'_>>(), 16);
1102    static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSendRequestRequest<'_>>(), 8);
1103
1104    static_assertions::const_assert_eq!(
1105        std::mem::offset_of!(ChannelSendRequestRequest<'_>, request),
1106        0
1107    );
1108
1109    impl ::fidl_next::Constrained for ChannelSendRequestRequest<'_> {
1110        type Constraint = ();
1111
1112        fn validate(
1113            _: ::fidl_next::Slot<'_, Self>,
1114            _: Self::Constraint,
1115        ) -> Result<(), ::fidl_next::ValidationError> {
1116            Ok(())
1117        }
1118    }
1119
1120    unsafe impl ::fidl_next::Wire for ChannelSendRequestRequest<'static> {
1121        type Narrowed<'de> = ChannelSendRequestRequest<'de>;
1122
1123        #[inline]
1124        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1125            ::fidl_next::munge! {
1126                let Self {
1127                    request,
1128
1129                } = &mut *out_;
1130            }
1131
1132            ::fidl_next::Wire::zero_padding(request);
1133        }
1134    }
1135
1136    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ChannelSendRequestRequest<'de>
1137    where
1138        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1139        ___D: ::fidl_next::Decoder<'de>,
1140    {
1141        fn decode(
1142            slot_: ::fidl_next::Slot<'_, Self>,
1143            decoder_: &mut ___D,
1144            _: (),
1145        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1146            ::fidl_next::munge! {
1147                let Self {
1148                    mut request,
1149
1150                } = slot_;
1151            }
1152
1153            let _field = request.as_mut();
1154            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1155            ::fidl_next::Decode::decode(request.as_mut(), decoder_, (4294967295, ()))?;
1156
1157            Ok(())
1158        }
1159    }
1160
1161    impl<'de> ::fidl_next::IntoNatural for ChannelSendRequestRequest<'de> {
1162        type Natural = crate::natural::ChannelSendRequestRequest;
1163    }
1164
1165    /// The wire type corresponding to [`ChannelSendRequestResponse`].
1166    #[derive(Debug)]
1167    #[repr(C)]
1168    pub struct ChannelSendRequestResponse<'de> {
1169        pub response: ::fidl_next::wire::Vector<'de, u8>,
1170    }
1171
1172    static_assertions::const_assert_eq!(std::mem::size_of::<ChannelSendRequestResponse<'_>>(), 16);
1173    static_assertions::const_assert_eq!(std::mem::align_of::<ChannelSendRequestResponse<'_>>(), 8);
1174
1175    static_assertions::const_assert_eq!(
1176        std::mem::offset_of!(ChannelSendRequestResponse<'_>, response),
1177        0
1178    );
1179
1180    impl ::fidl_next::Constrained for ChannelSendRequestResponse<'_> {
1181        type Constraint = ();
1182
1183        fn validate(
1184            _: ::fidl_next::Slot<'_, Self>,
1185            _: Self::Constraint,
1186        ) -> Result<(), ::fidl_next::ValidationError> {
1187            Ok(())
1188        }
1189    }
1190
1191    unsafe impl ::fidl_next::Wire for ChannelSendRequestResponse<'static> {
1192        type Narrowed<'de> = ChannelSendRequestResponse<'de>;
1193
1194        #[inline]
1195        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1196            ::fidl_next::munge! {
1197                let Self {
1198                    response,
1199
1200                } = &mut *out_;
1201            }
1202
1203            ::fidl_next::Wire::zero_padding(response);
1204        }
1205    }
1206
1207    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ChannelSendRequestResponse<'de>
1208    where
1209        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1210        ___D: ::fidl_next::Decoder<'de>,
1211    {
1212        fn decode(
1213            slot_: ::fidl_next::Slot<'_, Self>,
1214            decoder_: &mut ___D,
1215            _: (),
1216        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1217            ::fidl_next::munge! {
1218                let Self {
1219                    mut response,
1220
1221                } = slot_;
1222            }
1223
1224            let _field = response.as_mut();
1225            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1226            ::fidl_next::Decode::decode(response.as_mut(), decoder_, (4294967295, ()))?;
1227
1228            Ok(())
1229        }
1230    }
1231
1232    impl<'de> ::fidl_next::IntoNatural for ChannelSendRequestResponse<'de> {
1233        type Natural = crate::natural::ChannelSendRequestResponse;
1234    }
1235
1236    /// The wire type corresponding to [`ChannelRegisterListenerResponse`].
1237    pub type ChannelRegisterListenerResponse = ::fidl_next::wire::Unit;
1238
1239    /// The wire type corresponding to [`ChannelInfo`].
1240    #[repr(C)]
1241    pub struct ChannelInfo<'de> {
1242        pub(crate) table: ::fidl_next::wire::Table<'de>,
1243    }
1244
1245    impl<'de> Drop for ChannelInfo<'de> {
1246        fn drop(&mut self) {
1247            let _ = self
1248                .table
1249                .get(1)
1250                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1251
1252            let _ = self
1253                .table
1254                .get(2)
1255                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1256
1257            let _ = self
1258                .table
1259                .get(3)
1260                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1261        }
1262    }
1263
1264    impl ::fidl_next::Constrained for ChannelInfo<'_> {
1265        type Constraint = ();
1266
1267        fn validate(
1268            _: ::fidl_next::Slot<'_, Self>,
1269            _: Self::Constraint,
1270        ) -> Result<(), ::fidl_next::ValidationError> {
1271            Ok(())
1272        }
1273    }
1274
1275    unsafe impl ::fidl_next::Wire for ChannelInfo<'static> {
1276        type Narrowed<'de> = ChannelInfo<'de>;
1277
1278        #[inline]
1279        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1280            ::fidl_next::munge!(let Self { table } = out);
1281            ::fidl_next::wire::Table::zero_padding(table);
1282        }
1283    }
1284
1285    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ChannelInfo<'de>
1286    where
1287        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1288    {
1289        fn decode(
1290            slot: ::fidl_next::Slot<'_, Self>,
1291            decoder: &mut ___D,
1292            _: (),
1293        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1294            ::fidl_next::munge!(let Self { table } = slot);
1295
1296            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1297                match ordinal {
1298                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1299
1300                    1 => {
1301                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1302                            slot.as_mut(),
1303                            decoder,
1304                            (),
1305                        )?;
1306
1307                        Ok(())
1308                    }
1309
1310                    2 => {
1311                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1312                            slot.as_mut(),
1313                            decoder,
1314                            (),
1315                        )?;
1316
1317                        Ok(())
1318                    }
1319
1320                    3 => {
1321                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1322                            slot.as_mut(),
1323                            decoder,
1324                            (),
1325                        )?;
1326
1327                        Ok(())
1328                    }
1329
1330                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1331                }
1332            })
1333        }
1334    }
1335
1336    impl<'de> ChannelInfo<'de> {
1337        pub fn channel(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1338            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1339        }
1340
1341        pub fn take_channel(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1342            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1343        }
1344
1345        pub fn client(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1346            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1347        }
1348
1349        pub fn take_client(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1350            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1351        }
1352
1353        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1354            unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1355        }
1356
1357        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1358            unsafe { Some(self.table.get_mut(3)?.take_unchecked()) }
1359        }
1360    }
1361
1362    impl<'de> ::core::fmt::Debug for ChannelInfo<'de> {
1363        fn fmt(
1364            &self,
1365            f: &mut ::core::fmt::Formatter<'_>,
1366        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1367            f.debug_struct("ChannelInfo")
1368                .field("channel", &self.channel())
1369                .field("client", &self.client())
1370                .field("id", &self.id())
1371                .finish()
1372        }
1373    }
1374
1375    impl<'de> ::fidl_next::IntoNatural for ChannelInfo<'de> {
1376        type Natural = crate::natural::ChannelInfo;
1377    }
1378
1379    /// The wire type corresponding to [`ControllerInfo`].
1380    #[repr(C)]
1381    pub struct ControllerInfo<'de> {
1382        pub(crate) table: ::fidl_next::wire::Table<'de>,
1383    }
1384
1385    impl<'de> Drop for ControllerInfo<'de> {
1386        fn drop(&mut self) {
1387            let _ = self
1388                .table
1389                .get(1)
1390                .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::wire::Uint32>() });
1391
1392            let _ = self.table.get(2)
1393                .map(|envelope| unsafe {
1394                    envelope.read_unchecked::<::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>>()
1395                });
1396        }
1397    }
1398
1399    impl ::fidl_next::Constrained for ControllerInfo<'_> {
1400        type Constraint = ();
1401
1402        fn validate(
1403            _: ::fidl_next::Slot<'_, Self>,
1404            _: Self::Constraint,
1405        ) -> Result<(), ::fidl_next::ValidationError> {
1406            Ok(())
1407        }
1408    }
1409
1410    unsafe impl ::fidl_next::Wire for ControllerInfo<'static> {
1411        type Narrowed<'de> = ControllerInfo<'de>;
1412
1413        #[inline]
1414        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1415            ::fidl_next::munge!(let Self { table } = out);
1416            ::fidl_next::wire::Table::zero_padding(table);
1417        }
1418    }
1419
1420    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ControllerInfo<'de>
1421    where
1422        ___D: ::fidl_next::Decoder<'de> + ?Sized,
1423    {
1424        fn decode(
1425            slot: ::fidl_next::Slot<'_, Self>,
1426            decoder: &mut ___D,
1427            _: (),
1428        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1429            ::fidl_next::munge!(let Self { table } = slot);
1430
1431            ::fidl_next::wire::Table::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1432                match ordinal {
1433                    0 => unsafe { ::core::hint::unreachable_unchecked() },
1434
1435                    1 => {
1436                        ::fidl_next::wire::Envelope::decode_as::<___D, ::fidl_next::wire::Uint32>(
1437                            slot.as_mut(),
1438                            decoder,
1439                            (),
1440                        )?;
1441
1442                        Ok(())
1443                    }
1444
1445                    2 => {
1446                        ::fidl_next::wire::Envelope::decode_as::<
1447                            ___D,
1448                            ::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>,
1449                        >(slot.as_mut(), decoder, (4294967295, ()))?;
1450
1451                        Ok(())
1452                    }
1453
1454                    _ => ::fidl_next::wire::Envelope::decode_unknown(slot, decoder),
1455                }
1456            })
1457        }
1458    }
1459
1460    impl<'de> ControllerInfo<'de> {
1461        pub fn id(&self) -> ::core::option::Option<&::fidl_next::wire::Uint32> {
1462            unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1463        }
1464
1465        pub fn take_id(&mut self) -> ::core::option::Option<::fidl_next::wire::Uint32> {
1466            unsafe { Some(self.table.get_mut(1)?.take_unchecked()) }
1467        }
1468
1469        pub fn channels(
1470            &self,
1471        ) -> ::core::option::Option<&::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>>
1472        {
1473            unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1474        }
1475
1476        pub fn take_channels(
1477            &mut self,
1478        ) -> ::core::option::Option<::fidl_next::wire::Vector<'de, crate::wire::ChannelInfo<'de>>>
1479        {
1480            unsafe { Some(self.table.get_mut(2)?.take_unchecked()) }
1481        }
1482    }
1483
1484    impl<'de> ::core::fmt::Debug for ControllerInfo<'de> {
1485        fn fmt(
1486            &self,
1487            f: &mut ::core::fmt::Formatter<'_>,
1488        ) -> ::core::result::Result<(), ::core::fmt::Error> {
1489            f.debug_struct("ControllerInfo")
1490                .field("id", &self.id())
1491                .field("channels", &self.channels())
1492                .finish()
1493        }
1494    }
1495
1496    impl<'de> ::fidl_next::IntoNatural for ControllerInfo<'de> {
1497        type Natural = crate::natural::ControllerInfo;
1498    }
1499
1500    /// The wire type corresponding to [`ListenerOnMessageResponse`].
1501    pub type ListenerOnMessageResponse = ::fidl_next::wire::Unit;
1502
1503    /// The wire type corresponding to [`ListenerOnRequestResponse`].
1504    #[derive(Debug)]
1505    #[repr(C)]
1506    pub struct ListenerOnRequestResponse<'de> {
1507        pub response: ::fidl_next::wire::Vector<'de, u8>,
1508    }
1509
1510    static_assertions::const_assert_eq!(std::mem::size_of::<ListenerOnRequestResponse<'_>>(), 16);
1511    static_assertions::const_assert_eq!(std::mem::align_of::<ListenerOnRequestResponse<'_>>(), 8);
1512
1513    static_assertions::const_assert_eq!(
1514        std::mem::offset_of!(ListenerOnRequestResponse<'_>, response),
1515        0
1516    );
1517
1518    impl ::fidl_next::Constrained for ListenerOnRequestResponse<'_> {
1519        type Constraint = ();
1520
1521        fn validate(
1522            _: ::fidl_next::Slot<'_, Self>,
1523            _: Self::Constraint,
1524        ) -> Result<(), ::fidl_next::ValidationError> {
1525            Ok(())
1526        }
1527    }
1528
1529    unsafe impl ::fidl_next::Wire for ListenerOnRequestResponse<'static> {
1530        type Narrowed<'de> = ListenerOnRequestResponse<'de>;
1531
1532        #[inline]
1533        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1534            ::fidl_next::munge! {
1535                let Self {
1536                    response,
1537
1538                } = &mut *out_;
1539            }
1540
1541            ::fidl_next::Wire::zero_padding(response);
1542        }
1543    }
1544
1545    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for ListenerOnRequestResponse<'de>
1546    where
1547        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1548        ___D: ::fidl_next::Decoder<'de>,
1549    {
1550        fn decode(
1551            slot_: ::fidl_next::Slot<'_, Self>,
1552            decoder_: &mut ___D,
1553            _: (),
1554        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1555            ::fidl_next::munge! {
1556                let Self {
1557                    mut response,
1558
1559                } = slot_;
1560            }
1561
1562            let _field = response.as_mut();
1563            ::fidl_next::Constrained::validate(_field, (4294967295, ()))?;
1564            ::fidl_next::Decode::decode(response.as_mut(), decoder_, (4294967295, ()))?;
1565
1566            Ok(())
1567        }
1568    }
1569
1570    impl<'de> ::fidl_next::IntoNatural for ListenerOnRequestResponse<'de> {
1571        type Natural = crate::natural::ListenerOnRequestResponse;
1572    }
1573}
1574
1575pub mod wire_optional {}
1576
1577pub mod generic {
1578
1579    /// The generic type corresponding to [`ChannelSendMessageRequest`].
1580    pub struct ChannelSendMessageRequest<T0> {
1581        pub message: T0,
1582    }
1583
1584    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChannelSendMessageRequest<'static>, ___E>
1585        for ChannelSendMessageRequest<T0>
1586    where
1587        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1588        ___E: ::fidl_next::Encoder,
1589        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
1590    {
1591        #[inline]
1592        fn encode(
1593            self,
1594            encoder_: &mut ___E,
1595            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendMessageRequest<'static>>,
1596            _: (),
1597        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1598            ::fidl_next::munge! {
1599                let crate::wire::ChannelSendMessageRequest {
1600                    message,
1601
1602                } = out_;
1603            }
1604
1605            ::fidl_next::Encode::encode(self.message, encoder_, message, (4294967295, ()))?;
1606
1607            Ok(())
1608        }
1609    }
1610
1611    /// The generic type corresponding to [`ChannelSendMessageResponse`].
1612    pub type ChannelSendMessageResponse = ();
1613
1614    /// The generic type corresponding to [`ChannelSendRequestRequest`].
1615    pub struct ChannelSendRequestRequest<T0> {
1616        pub request: T0,
1617    }
1618
1619    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ChannelSendRequestRequest<'static>, ___E>
1620        for ChannelSendRequestRequest<T0>
1621    where
1622        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1623        ___E: ::fidl_next::Encoder,
1624        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
1625    {
1626        #[inline]
1627        fn encode(
1628            self,
1629            encoder_: &mut ___E,
1630            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestRequest<'static>>,
1631            _: (),
1632        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1633            ::fidl_next::munge! {
1634                let crate::wire::ChannelSendRequestRequest {
1635                    request,
1636
1637                } = out_;
1638            }
1639
1640            ::fidl_next::Encode::encode(self.request, encoder_, request, (4294967295, ()))?;
1641
1642            Ok(())
1643        }
1644    }
1645
1646    /// The generic type corresponding to [`ChannelSendRequestResponse`].
1647    pub struct ChannelSendRequestResponse<T0> {
1648        pub response: T0,
1649    }
1650
1651    unsafe impl<___E, T0>
1652        ::fidl_next::Encode<crate::wire::ChannelSendRequestResponse<'static>, ___E>
1653        for ChannelSendRequestResponse<T0>
1654    where
1655        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1656        ___E: ::fidl_next::Encoder,
1657        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
1658    {
1659        #[inline]
1660        fn encode(
1661            self,
1662            encoder_: &mut ___E,
1663            out_: &mut ::core::mem::MaybeUninit<crate::wire::ChannelSendRequestResponse<'static>>,
1664            _: (),
1665        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1666            ::fidl_next::munge! {
1667                let crate::wire::ChannelSendRequestResponse {
1668                    response,
1669
1670                } = out_;
1671            }
1672
1673            ::fidl_next::Encode::encode(self.response, encoder_, response, (4294967295, ()))?;
1674
1675            Ok(())
1676        }
1677    }
1678
1679    /// The generic type corresponding to [`ChannelRegisterListenerResponse`].
1680    pub type ChannelRegisterListenerResponse = ();
1681
1682    /// The generic type corresponding to [`ListenerOnMessageResponse`].
1683    pub type ListenerOnMessageResponse = ();
1684
1685    /// The generic type corresponding to [`ListenerOnRequestResponse`].
1686    pub struct ListenerOnRequestResponse<T0> {
1687        pub response: T0,
1688    }
1689
1690    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::ListenerOnRequestResponse<'static>, ___E>
1691        for ListenerOnRequestResponse<T0>
1692    where
1693        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1694        ___E: ::fidl_next::Encoder,
1695        T0: ::fidl_next::Encode<::fidl_next::wire::Vector<'static, u8>, ___E>,
1696    {
1697        #[inline]
1698        fn encode(
1699            self,
1700            encoder_: &mut ___E,
1701            out_: &mut ::core::mem::MaybeUninit<crate::wire::ListenerOnRequestResponse<'static>>,
1702            _: (),
1703        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1704            ::fidl_next::munge! {
1705                let crate::wire::ListenerOnRequestResponse {
1706                    response,
1707
1708                } = out_;
1709            }
1710
1711            ::fidl_next::Encode::encode(self.response, encoder_, response, (4294967295, ()))?;
1712
1713            Ok(())
1714        }
1715    }
1716}
1717
1718pub use self::natural::*;