fidl_next_fuchsia_component/
fidl_next_fuchsia_component.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
5/// The type corresponding to the Binder protocol.
6#[doc = " A framework-provided protocol that allows components that use it to bind to\n the component that exposes it. The act of connecting to this protocol will\n trigger the bind. Thus, this protocol contains no methods. For more details\n on binding, see\n https://fuchsia.dev/fuchsia-src/concepts/components/v2/lifecycle#binding.\n\n When a component connects to protocol, the component exposing this capability\n will be started if it\'s not already running. Upon a failure to start, the\n component framework will close the server end of the channel with a\n zx.Status epitaph.\n"]
7#[derive(Debug)]
8pub struct Binder;
9
10impl ::fidl_next::Discoverable for Binder {
11    const PROTOCOL_NAME: &'static str = "fuchsia.component.Binder";
12}
13
14pub mod binder {
15    pub mod prelude {
16        pub use crate::{binder, Binder, BinderClientHandler, BinderServerHandler};
17    }
18
19    mod ___detail {
20
21        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Binder
22        where
23            ___T: ::fidl_next::Transport,
24        {
25            type ClientSender = BinderClientSender<___T>;
26            type ServerSender = BinderServerSender<___T>;
27        }
28
29        /// The client sender for the `Binder` protocol.
30        pub struct BinderClientSender<___T: ::fidl_next::Transport> {
31            #[allow(dead_code)]
32            sender: ::fidl_next::protocol::ClientSender<___T>,
33        }
34
35        impl<___T> BinderClientSender<___T> where ___T: ::fidl_next::Transport {}
36
37        /// The server sender for the `Binder` protocol.
38        #[repr(transparent)]
39        pub struct BinderServerSender<___T: ::fidl_next::Transport> {
40            sender: ::fidl_next::protocol::ServerSender<___T>,
41        }
42
43        impl<___T> BinderServerSender<___T> where ___T: ::fidl_next::Transport {}
44    }
45}
46
47/// A client handler for the Binder protocol.
48///
49/// See [`Binder`] for more details.
50pub trait BinderClientHandler<___T: ::fidl_next::Transport> {}
51
52impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for Binder
53where
54    ___H: BinderClientHandler<___T> + Send,
55    ___T: ::fidl_next::Transport,
56{
57    async fn on_event(
58        handler: &mut ___H,
59        sender: &::fidl_next::ClientSender<Self, ___T>,
60        ordinal: u64,
61        buffer: ___T::RecvBuffer,
62    ) {
63        match ordinal {
64            ordinal => {
65                sender.close();
66            }
67        }
68    }
69}
70
71/// A server handler for the Binder protocol.
72///
73/// See [`Binder`] for more details.
74pub trait BinderServerHandler<___T: ::fidl_next::Transport> {}
75
76impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for Binder
77where
78    ___H: BinderServerHandler<___T> + Send,
79    ___T: ::fidl_next::Transport,
80{
81    async fn on_one_way(
82        handler: &mut ___H,
83        sender: &::fidl_next::ServerSender<Self, ___T>,
84        ordinal: u64,
85        buffer: ___T::RecvBuffer,
86    ) {
87        match ordinal {
88            ordinal => {
89                sender.close();
90            }
91        }
92    }
93
94    async fn on_two_way(
95        handler: &mut ___H,
96        sender: &::fidl_next::ServerSender<Self, ___T>,
97        ordinal: u64,
98        buffer: ___T::RecvBuffer,
99        responder: ::fidl_next::protocol::Responder,
100    ) {
101        match ordinal {
102            ordinal => {
103                sender.close();
104            }
105        }
106    }
107}
108
109pub const MAX_NAME_LENGTH: u64 = 255;
110
111pub type Name = String;
112
113/// The wire type corresponding to [`Name`].
114pub type WireName<'de> = ::fidl_next::WireString<'de>;
115
116#[doc = " Payload for CapabilityRequested events\n"]
117#[derive(Debug, Default)]
118pub struct CapabilityRequestedPayload {
119    pub name: Option<String>,
120
121    pub capability: Option<::fidl_next::fuchsia::zx::Handle>,
122}
123
124impl CapabilityRequestedPayload {
125    fn __max_ordinal(&self) -> usize {
126        if self.capability.is_some() {
127            return 2;
128        }
129
130        if self.name.is_some() {
131            return 1;
132        }
133
134        0
135    }
136}
137
138impl ::fidl_next::Encodable for CapabilityRequestedPayload {
139    type Encoded = WireCapabilityRequestedPayload<'static>;
140}
141
142unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityRequestedPayload
143where
144    ___E: ::fidl_next::Encoder + ?Sized,
145
146    ___E: ::fidl_next::fuchsia::HandleEncoder,
147{
148    #[inline]
149    fn encode(
150        mut self,
151        encoder: &mut ___E,
152        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
153    ) -> Result<(), ::fidl_next::EncodeError> {
154        ::fidl_next::munge!(let WireCapabilityRequestedPayload { table } = out);
155
156        let max_ord = self.__max_ordinal();
157
158        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
159        ::fidl_next::Wire::zero_padding(&mut out);
160
161        let mut preallocated =
162            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
163
164        for i in 1..=max_ord {
165            match i {
166                2 => {
167                    if let Some(capability) = self.capability.take() {
168                        ::fidl_next::WireEnvelope::encode_value(
169                            capability,
170                            preallocated.encoder,
171                            &mut out,
172                        )?;
173                    } else {
174                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
175                    }
176                }
177
178                1 => {
179                    if let Some(name) = self.name.take() {
180                        ::fidl_next::WireEnvelope::encode_value(
181                            name,
182                            preallocated.encoder,
183                            &mut out,
184                        )?;
185                    } else {
186                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
187                    }
188                }
189
190                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
191            }
192            unsafe {
193                preallocated.write_next(out.assume_init_ref());
194            }
195        }
196
197        ::fidl_next::WireTable::encode_len(table, max_ord);
198
199        Ok(())
200    }
201}
202
203impl<'de> ::fidl_next::FromWire<WireCapabilityRequestedPayload<'de>>
204    for CapabilityRequestedPayload
205{
206    #[inline]
207    fn from_wire(wire: WireCapabilityRequestedPayload<'de>) -> Self {
208        let wire = ::core::mem::ManuallyDrop::new(wire);
209
210        let name = wire.table.get(1);
211
212        let capability = wire.table.get(2);
213
214        Self {
215            name: name.map(|envelope| {
216                ::fidl_next::FromWire::from_wire(unsafe {
217                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
218                })
219            }),
220
221            capability: capability.map(|envelope| {
222                ::fidl_next::FromWire::from_wire(unsafe {
223                    envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
224                })
225            }),
226        }
227    }
228}
229
230/// The wire type corresponding to [`CapabilityRequestedPayload`].
231#[repr(C)]
232pub struct WireCapabilityRequestedPayload<'de> {
233    table: ::fidl_next::WireTable<'de>,
234}
235
236impl<'de> Drop for WireCapabilityRequestedPayload<'de> {
237    fn drop(&mut self) {
238        let _ = self
239            .table
240            .get(1)
241            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
242
243        let _ = self.table.get(2).map(|envelope| unsafe {
244            envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
245        });
246    }
247}
248
249unsafe impl ::fidl_next::Wire for WireCapabilityRequestedPayload<'static> {
250    type Decoded<'de> = WireCapabilityRequestedPayload<'de>;
251
252    #[inline]
253    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
254        ::fidl_next::munge!(let Self { table } = out);
255        ::fidl_next::WireTable::zero_padding(table);
256    }
257}
258
259unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityRequestedPayload<'static>
260where
261    ___D: ::fidl_next::Decoder + ?Sized,
262
263    ___D: ::fidl_next::fuchsia::HandleDecoder,
264{
265    fn decode(
266        slot: ::fidl_next::Slot<'_, Self>,
267        decoder: &mut ___D,
268    ) -> Result<(), ::fidl_next::DecodeError> {
269        ::fidl_next::munge!(let Self { table } = slot);
270
271        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
272            match ordinal {
273                0 => unsafe { ::core::hint::unreachable_unchecked() },
274
275                1 => {
276                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
277                        slot.as_mut(),
278                        decoder,
279                    )?;
280
281                    let name = unsafe {
282                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
283                    };
284
285                    if name.len() > 255 {
286                        return Err(::fidl_next::DecodeError::VectorTooLong {
287                            size: name.len() as u64,
288                            limit: 255,
289                        });
290                    }
291
292                    Ok(())
293                }
294
295                2 => {
296                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
297                        slot.as_mut(),
298                        decoder,
299                    )?;
300
301                    Ok(())
302                }
303
304                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
305            }
306        })
307    }
308}
309
310impl<'de> WireCapabilityRequestedPayload<'de> {
311    pub fn name(&self) -> Option<&::fidl_next::WireString<'de>> {
312        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
313    }
314
315    pub fn capability(&self) -> Option<&::fidl_next::fuchsia::WireHandle> {
316        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
317    }
318}
319
320impl<'de> ::core::fmt::Debug for WireCapabilityRequestedPayload<'de> {
321    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
322        f.debug_struct("CapabilityRequestedPayload")
323            .field("name", &self.name())
324            .field("capability", &self.capability())
325            .finish()
326    }
327}
328
329#[doc = " The maximum number of children that the a call `ChildIterator.Next`\n can return.\n Note, this is not a limit on the number of children that can be added\n to a component. This is merely a limit for a single invocation of the\n `Next` method.\n"]
330pub const MAX_CHILD_COUNT: u32 = 128;
331
332#[derive(Clone, Debug)]
333pub struct ChildIteratorNextResponse {
334    pub children: Vec<::fidl_next_fuchsia_component_decl::ChildRef>,
335}
336
337impl ::fidl_next::Encodable for ChildIteratorNextResponse {
338    type Encoded = WireChildIteratorNextResponse<'static>;
339}
340
341unsafe impl<___E> ::fidl_next::Encode<___E> for ChildIteratorNextResponse
342where
343    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
344
345    ___E: ::fidl_next::Encoder,
346{
347    #[inline]
348    fn encode(
349        self,
350        encoder: &mut ___E,
351        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
352    ) -> Result<(), ::fidl_next::EncodeError> {
353        ::fidl_next::munge! {
354            let Self::Encoded {
355                children,
356
357            } = out;
358        }
359
360        ::fidl_next::Encode::encode(self.children, encoder, children)?;
361
362        Ok(())
363    }
364}
365
366unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ChildIteratorNextResponse
367where
368    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
369
370    ___E: ::fidl_next::Encoder,
371{
372    #[inline]
373    fn encode_ref(
374        &self,
375        encoder: &mut ___E,
376        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
377    ) -> Result<(), ::fidl_next::EncodeError> {
378        ::fidl_next::munge! {
379            let Self::Encoded {
380                children,
381
382            } = out;
383        }
384
385        ::fidl_next::EncodeRef::encode_ref(&self.children, encoder, children)?;
386
387        Ok(())
388    }
389}
390
391impl ::fidl_next::EncodableOption for ChildIteratorNextResponse {
392    type EncodedOption = ::fidl_next::WireBox<'static, WireChildIteratorNextResponse<'static>>;
393}
394
395unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ChildIteratorNextResponse
396where
397    ___E: ::fidl_next::Encoder + ?Sized,
398    ChildIteratorNextResponse: ::fidl_next::Encode<___E>,
399{
400    #[inline]
401    fn encode_option(
402        this: Option<Self>,
403        encoder: &mut ___E,
404        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
405    ) -> Result<(), ::fidl_next::EncodeError> {
406        if let Some(inner) = this {
407            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
408            ::fidl_next::WireBox::encode_present(out);
409        } else {
410            ::fidl_next::WireBox::encode_absent(out);
411        }
412
413        Ok(())
414    }
415}
416
417unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ChildIteratorNextResponse
418where
419    ___E: ::fidl_next::Encoder + ?Sized,
420    ChildIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
421{
422    #[inline]
423    fn encode_option_ref(
424        this: Option<&Self>,
425        encoder: &mut ___E,
426        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
427    ) -> Result<(), ::fidl_next::EncodeError> {
428        if let Some(inner) = this {
429            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
430            ::fidl_next::WireBox::encode_present(out);
431        } else {
432            ::fidl_next::WireBox::encode_absent(out);
433        }
434
435        Ok(())
436    }
437}
438
439impl<'de> ::fidl_next::FromWire<WireChildIteratorNextResponse<'de>> for ChildIteratorNextResponse {
440    #[inline]
441    fn from_wire(wire: WireChildIteratorNextResponse<'de>) -> Self {
442        Self { children: ::fidl_next::FromWire::from_wire(wire.children) }
443    }
444}
445
446impl<'de> ::fidl_next::FromWireRef<WireChildIteratorNextResponse<'de>>
447    for ChildIteratorNextResponse
448{
449    #[inline]
450    fn from_wire_ref(wire: &WireChildIteratorNextResponse<'de>) -> Self {
451        Self { children: ::fidl_next::FromWireRef::from_wire_ref(&wire.children) }
452    }
453}
454
455/// The wire type corresponding to [`ChildIteratorNextResponse`].
456#[derive(Debug)]
457#[repr(C)]
458pub struct WireChildIteratorNextResponse<'de> {
459    pub children:
460        ::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireChildRef<'de>>,
461}
462
463unsafe impl ::fidl_next::Wire for WireChildIteratorNextResponse<'static> {
464    type Decoded<'de> = WireChildIteratorNextResponse<'de>;
465
466    #[inline]
467    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
468}
469
470unsafe impl<___D> ::fidl_next::Decode<___D> for WireChildIteratorNextResponse<'static>
471where
472    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
473
474    ___D: ::fidl_next::Decoder,
475{
476    fn decode(
477        slot: ::fidl_next::Slot<'_, Self>,
478        decoder: &mut ___D,
479    ) -> Result<(), ::fidl_next::DecodeError> {
480        ::fidl_next::munge! {
481            let Self {
482                mut children,
483
484            } = slot;
485        }
486
487        ::fidl_next::Decode::decode(children.as_mut(), decoder)?;
488
489        let children = unsafe { children.deref_unchecked() };
490
491        if children.len() > 128 {
492            return Err(::fidl_next::DecodeError::VectorTooLong {
493                size: children.len() as u64,
494                limit: 128,
495            });
496        }
497
498        Ok(())
499    }
500}
501
502/// The type corresponding to the ChildIterator protocol.
503#[doc = " A protocol to iterate over the list of children in a realm.\n"]
504#[derive(Debug)]
505pub struct ChildIterator;
506
507pub mod child_iterator {
508    pub mod prelude {
509        pub use crate::{
510            child_iterator, ChildIterator, ChildIteratorClientHandler, ChildIteratorServerHandler,
511        };
512
513        pub use crate::ChildIteratorNextResponse;
514    }
515
516    pub struct Next;
517
518    impl ::fidl_next::Method for Next {
519        const ORDINAL: u64 = 4676077302722137352;
520
521        type Protocol = crate::ChildIterator;
522
523        type Request = ();
524
525        type Response = crate::WireChildIteratorNextResponse<'static>;
526    }
527
528    mod ___detail {
529
530        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ChildIterator
531        where
532            ___T: ::fidl_next::Transport,
533        {
534            type ClientSender = ChildIteratorClientSender<___T>;
535            type ServerSender = ChildIteratorServerSender<___T>;
536        }
537
538        /// The client sender for the `ChildIterator` protocol.
539        pub struct ChildIteratorClientSender<___T: ::fidl_next::Transport> {
540            #[allow(dead_code)]
541            sender: ::fidl_next::protocol::ClientSender<___T>,
542        }
543
544        impl<___T> ChildIteratorClientSender<___T>
545        where
546            ___T: ::fidl_next::Transport,
547        {
548            #[doc = " Advance the iterator and return the next batch of children.\n\n Returns a vector of `ChildRef`. Returns an empty vector when there are\n no more children.\n"]
549            pub fn next(
550                &self,
551            ) -> Result<::fidl_next::ResponseFuture<'_, super::Next, ___T>, ::fidl_next::EncodeError>
552            {
553                self.sender
554                    .send_two_way(4676077302722137352, ())
555                    .map(::fidl_next::ResponseFuture::from_untyped)
556            }
557        }
558
559        /// The server sender for the `ChildIterator` protocol.
560        #[repr(transparent)]
561        pub struct ChildIteratorServerSender<___T: ::fidl_next::Transport> {
562            sender: ::fidl_next::protocol::ServerSender<___T>,
563        }
564
565        impl<___T> ChildIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
566    }
567}
568
569/// A client handler for the ChildIterator protocol.
570///
571/// See [`ChildIterator`] for more details.
572pub trait ChildIteratorClientHandler<___T: ::fidl_next::Transport> {}
573
574impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for ChildIterator
575where
576    ___H: ChildIteratorClientHandler<___T> + Send,
577    ___T: ::fidl_next::Transport,
578
579    <child_iterator::Next as ::fidl_next::Method>::Response:
580        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
581{
582    async fn on_event(
583        handler: &mut ___H,
584        sender: &::fidl_next::ClientSender<Self, ___T>,
585        ordinal: u64,
586        buffer: ___T::RecvBuffer,
587    ) {
588        match ordinal {
589            ordinal => {
590                sender.close();
591            }
592        }
593    }
594}
595
596/// A server handler for the ChildIterator protocol.
597///
598/// See [`ChildIterator`] for more details.
599pub trait ChildIteratorServerHandler<___T: ::fidl_next::Transport> {
600    #[doc = " Advance the iterator and return the next batch of children.\n\n Returns a vector of `ChildRef`. Returns an empty vector when there are\n no more children.\n"]
601    fn next(
602        &mut self,
603        sender: &::fidl_next::ServerSender<ChildIterator, ___T>,
604
605        responder: ::fidl_next::Responder<child_iterator::Next>,
606    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
607}
608
609impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for ChildIterator
610where
611    ___H: ChildIteratorServerHandler<___T> + Send,
612    ___T: ::fidl_next::Transport,
613{
614    async fn on_one_way(
615        handler: &mut ___H,
616        sender: &::fidl_next::ServerSender<Self, ___T>,
617        ordinal: u64,
618        buffer: ___T::RecvBuffer,
619    ) {
620        match ordinal {
621            ordinal => {
622                sender.close();
623            }
624        }
625    }
626
627    async fn on_two_way(
628        handler: &mut ___H,
629        sender: &::fidl_next::ServerSender<Self, ___T>,
630        ordinal: u64,
631        buffer: ___T::RecvBuffer,
632        responder: ::fidl_next::protocol::Responder,
633    ) {
634        match ordinal {
635            4676077302722137352 => {
636                let responder = ::fidl_next::Responder::from_untyped(responder);
637
638                handler.next(sender, responder).await;
639            }
640
641            ordinal => {
642                sender.close();
643            }
644        }
645    }
646}
647
648#[doc = " The maximum number of handles that can be passed to a created component.\n"]
649pub const MAX_HANDLE_COUNT: u32 = 128;
650
651pub const MAX_NAMESPACE_COUNT: u32 = 32;
652
653pub type ControllerStartResponse = ();
654
655/// The wire type corresponding to [`ControllerStartResponse`].
656pub type WireControllerStartResponse = ();
657
658#[derive(Debug)]
659#[repr(C)]
660pub struct ControllerIsStartedResponse {
661    pub is_started: bool,
662}
663
664impl ::fidl_next::Encodable for ControllerIsStartedResponse {
665    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireControllerIsStartedResponse> = unsafe {
666        ::fidl_next::CopyOptimization::enable_if(
667            true && <bool as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
668        )
669    };
670
671    type Encoded = WireControllerIsStartedResponse;
672}
673
674unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerIsStartedResponse
675where
676    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
677
678    ___E: ::fidl_next::fuchsia::HandleEncoder,
679{
680    #[inline]
681    fn encode(
682        self,
683        encoder: &mut ___E,
684        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
685    ) -> Result<(), ::fidl_next::EncodeError> {
686        ::fidl_next::munge! {
687            let Self::Encoded {
688                is_started,
689
690            } = out;
691        }
692
693        ::fidl_next::Encode::encode(self.is_started, encoder, is_started)?;
694
695        Ok(())
696    }
697}
698
699impl ::fidl_next::EncodableOption for ControllerIsStartedResponse {
700    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerIsStartedResponse>;
701}
702
703unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerIsStartedResponse
704where
705    ___E: ::fidl_next::Encoder + ?Sized,
706    ControllerIsStartedResponse: ::fidl_next::Encode<___E>,
707{
708    #[inline]
709    fn encode_option(
710        this: Option<Self>,
711        encoder: &mut ___E,
712        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
713    ) -> Result<(), ::fidl_next::EncodeError> {
714        if let Some(inner) = this {
715            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
716            ::fidl_next::WireBox::encode_present(out);
717        } else {
718            ::fidl_next::WireBox::encode_absent(out);
719        }
720
721        Ok(())
722    }
723}
724
725impl ::fidl_next::FromWire<WireControllerIsStartedResponse> for ControllerIsStartedResponse {
726    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireControllerIsStartedResponse, Self> = unsafe {
727        ::fidl_next::CopyOptimization::enable_if(
728            true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
729        )
730    };
731
732    #[inline]
733    fn from_wire(wire: WireControllerIsStartedResponse) -> Self {
734        Self { is_started: ::fidl_next::FromWire::from_wire(wire.is_started) }
735    }
736}
737
738/// The wire type corresponding to [`ControllerIsStartedResponse`].
739#[derive(Debug)]
740#[repr(C)]
741pub struct WireControllerIsStartedResponse {
742    pub is_started: bool,
743}
744
745unsafe impl ::fidl_next::Wire for WireControllerIsStartedResponse {
746    type Decoded<'de> = WireControllerIsStartedResponse;
747
748    #[inline]
749    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
750}
751
752unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerIsStartedResponse
753where
754    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
755
756    ___D: ::fidl_next::fuchsia::HandleDecoder,
757{
758    fn decode(
759        slot: ::fidl_next::Slot<'_, Self>,
760        decoder: &mut ___D,
761    ) -> Result<(), ::fidl_next::DecodeError> {
762        ::fidl_next::munge! {
763            let Self {
764                mut is_started,
765
766            } = slot;
767        }
768
769        ::fidl_next::Decode::decode(is_started.as_mut(), decoder)?;
770
771        Ok(())
772    }
773}
774
775pub const MAX_PATH_LENGTH: u64 = 4095;
776
777#[doc = " Standard error codes for component framework protocols.\n"]
778#[derive(Clone, Copy, Debug, PartialEq, Eq)]
779#[repr(u32)]
780pub enum Error {
781    Internal = 1,
782    InvalidArguments = 2,
783    Unsupported = 3,
784    AccessDenied = 4,
785    InstanceNotFound = 5,
786    InstanceAlreadyExists = 6,
787    InstanceCannotStart = 7,
788    InstanceCannotResolve = 8,
789    CollectionNotFound = 9,
790    ResourceUnavailable = 10,
791    InstanceDied = 11,
792    ResourceNotFound = 12,
793    InstanceCannotUnresolve = 13,
794    InstanceAlreadyStarted = 14,
795    UnknownOrdinal_(u32),
796}
797
798impl ::fidl_next::Encodable for Error {
799    type Encoded = WireError;
800}
801impl ::std::convert::From<u32> for Error {
802    fn from(value: u32) -> Self {
803        match value {
804            1 => Self::Internal,
805            2 => Self::InvalidArguments,
806            3 => Self::Unsupported,
807            4 => Self::AccessDenied,
808            5 => Self::InstanceNotFound,
809            6 => Self::InstanceAlreadyExists,
810            7 => Self::InstanceCannotStart,
811            8 => Self::InstanceCannotResolve,
812            9 => Self::CollectionNotFound,
813            10 => Self::ResourceUnavailable,
814            11 => Self::InstanceDied,
815            12 => Self::ResourceNotFound,
816            13 => Self::InstanceCannotUnresolve,
817            14 => Self::InstanceAlreadyStarted,
818
819            _ => Self::UnknownOrdinal_(value),
820        }
821    }
822}
823
824unsafe impl<___E> ::fidl_next::Encode<___E> for Error
825where
826    ___E: ?Sized,
827{
828    #[inline]
829    fn encode(
830        self,
831        encoder: &mut ___E,
832        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
833    ) -> Result<(), ::fidl_next::EncodeError> {
834        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
835    }
836}
837
838unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Error
839where
840    ___E: ?Sized,
841{
842    #[inline]
843    fn encode_ref(
844        &self,
845        encoder: &mut ___E,
846        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
847    ) -> Result<(), ::fidl_next::EncodeError> {
848        ::fidl_next::munge!(let WireError { value } = out);
849        let _ = value.write(::fidl_next::WireU32::from(match *self {
850            Self::Internal => 1,
851
852            Self::InvalidArguments => 2,
853
854            Self::Unsupported => 3,
855
856            Self::AccessDenied => 4,
857
858            Self::InstanceNotFound => 5,
859
860            Self::InstanceAlreadyExists => 6,
861
862            Self::InstanceCannotStart => 7,
863
864            Self::InstanceCannotResolve => 8,
865
866            Self::CollectionNotFound => 9,
867
868            Self::ResourceUnavailable => 10,
869
870            Self::InstanceDied => 11,
871
872            Self::ResourceNotFound => 12,
873
874            Self::InstanceCannotUnresolve => 13,
875
876            Self::InstanceAlreadyStarted => 14,
877
878            Self::UnknownOrdinal_(value) => value,
879        }));
880
881        Ok(())
882    }
883}
884
885impl ::core::convert::From<WireError> for Error {
886    fn from(wire: WireError) -> Self {
887        match u32::from(wire.value) {
888            1 => Self::Internal,
889
890            2 => Self::InvalidArguments,
891
892            3 => Self::Unsupported,
893
894            4 => Self::AccessDenied,
895
896            5 => Self::InstanceNotFound,
897
898            6 => Self::InstanceAlreadyExists,
899
900            7 => Self::InstanceCannotStart,
901
902            8 => Self::InstanceCannotResolve,
903
904            9 => Self::CollectionNotFound,
905
906            10 => Self::ResourceUnavailable,
907
908            11 => Self::InstanceDied,
909
910            12 => Self::ResourceNotFound,
911
912            13 => Self::InstanceCannotUnresolve,
913
914            14 => Self::InstanceAlreadyStarted,
915
916            value => Self::UnknownOrdinal_(value),
917        }
918    }
919}
920
921impl ::fidl_next::FromWire<WireError> for Error {
922    #[inline]
923    fn from_wire(wire: WireError) -> Self {
924        Self::from(wire)
925    }
926}
927
928impl ::fidl_next::FromWireRef<WireError> for Error {
929    #[inline]
930    fn from_wire_ref(wire: &WireError) -> Self {
931        Self::from(*wire)
932    }
933}
934
935/// The wire type corresponding to [`Error`].
936#[derive(Clone, Copy, Debug, PartialEq, Eq)]
937#[repr(transparent)]
938pub struct WireError {
939    value: ::fidl_next::WireU32,
940}
941
942unsafe impl ::fidl_next::Wire for WireError {
943    type Decoded<'de> = Self;
944
945    #[inline]
946    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
947        // Wire enums have no padding
948    }
949}
950
951impl WireError {
952    pub const INTERNAL: WireError = WireError { value: ::fidl_next::WireU32(1) };
953
954    pub const INVALID_ARGUMENTS: WireError = WireError { value: ::fidl_next::WireU32(2) };
955
956    pub const UNSUPPORTED: WireError = WireError { value: ::fidl_next::WireU32(3) };
957
958    pub const ACCESS_DENIED: WireError = WireError { value: ::fidl_next::WireU32(4) };
959
960    pub const INSTANCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(5) };
961
962    pub const INSTANCE_ALREADY_EXISTS: WireError = WireError { value: ::fidl_next::WireU32(6) };
963
964    pub const INSTANCE_CANNOT_START: WireError = WireError { value: ::fidl_next::WireU32(7) };
965
966    pub const INSTANCE_CANNOT_RESOLVE: WireError = WireError { value: ::fidl_next::WireU32(8) };
967
968    pub const COLLECTION_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(9) };
969
970    pub const RESOURCE_UNAVAILABLE: WireError = WireError { value: ::fidl_next::WireU32(10) };
971
972    pub const INSTANCE_DIED: WireError = WireError { value: ::fidl_next::WireU32(11) };
973
974    pub const RESOURCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(12) };
975
976    pub const INSTANCE_CANNOT_UNRESOLVE: WireError = WireError { value: ::fidl_next::WireU32(13) };
977
978    pub const INSTANCE_ALREADY_STARTED: WireError = WireError { value: ::fidl_next::WireU32(14) };
979}
980
981unsafe impl<___D> ::fidl_next::Decode<___D> for WireError
982where
983    ___D: ?Sized,
984{
985    fn decode(
986        slot: ::fidl_next::Slot<'_, Self>,
987        _: &mut ___D,
988    ) -> Result<(), ::fidl_next::DecodeError> {
989        Ok(())
990    }
991}
992
993impl ::core::convert::From<Error> for WireError {
994    fn from(natural: Error) -> Self {
995        match natural {
996            Error::Internal => WireError::INTERNAL,
997
998            Error::InvalidArguments => WireError::INVALID_ARGUMENTS,
999
1000            Error::Unsupported => WireError::UNSUPPORTED,
1001
1002            Error::AccessDenied => WireError::ACCESS_DENIED,
1003
1004            Error::InstanceNotFound => WireError::INSTANCE_NOT_FOUND,
1005
1006            Error::InstanceAlreadyExists => WireError::INSTANCE_ALREADY_EXISTS,
1007
1008            Error::InstanceCannotStart => WireError::INSTANCE_CANNOT_START,
1009
1010            Error::InstanceCannotResolve => WireError::INSTANCE_CANNOT_RESOLVE,
1011
1012            Error::CollectionNotFound => WireError::COLLECTION_NOT_FOUND,
1013
1014            Error::ResourceUnavailable => WireError::RESOURCE_UNAVAILABLE,
1015
1016            Error::InstanceDied => WireError::INSTANCE_DIED,
1017
1018            Error::ResourceNotFound => WireError::RESOURCE_NOT_FOUND,
1019
1020            Error::InstanceCannotUnresolve => WireError::INSTANCE_CANNOT_UNRESOLVE,
1021
1022            Error::InstanceAlreadyStarted => WireError::INSTANCE_ALREADY_STARTED,
1023
1024            Error::UnknownOrdinal_(value) => WireError { value: ::fidl_next::WireU32::from(value) },
1025        }
1026    }
1027}
1028
1029#[doc = " A single component namespace entry, which describes a namespace mount point\n (`path`) and the directory backing it (`directory`). This type is usually\n composed inside a vector.  See `ComponentStartInfo.ns` for more details.\n"]
1030#[derive(Debug, Default)]
1031pub struct NamespaceEntry {
1032    pub path: Option<String>,
1033
1034    pub directory: Option<
1035        ::fidl_next::ClientEnd<
1036            ::fidl_next_fuchsia_io::Directory,
1037            ::fidl_next::fuchsia::zx::Channel,
1038        >,
1039    >,
1040}
1041
1042impl NamespaceEntry {
1043    fn __max_ordinal(&self) -> usize {
1044        if self.directory.is_some() {
1045            return 2;
1046        }
1047
1048        if self.path.is_some() {
1049            return 1;
1050        }
1051
1052        0
1053    }
1054}
1055
1056impl ::fidl_next::Encodable for NamespaceEntry {
1057    type Encoded = WireNamespaceEntry<'static>;
1058}
1059
1060unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceEntry
1061where
1062    ___E: ::fidl_next::Encoder + ?Sized,
1063
1064    ___E: ::fidl_next::fuchsia::HandleEncoder,
1065{
1066    #[inline]
1067    fn encode(
1068        mut self,
1069        encoder: &mut ___E,
1070        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1071    ) -> Result<(), ::fidl_next::EncodeError> {
1072        ::fidl_next::munge!(let WireNamespaceEntry { table } = out);
1073
1074        let max_ord = self.__max_ordinal();
1075
1076        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1077        ::fidl_next::Wire::zero_padding(&mut out);
1078
1079        let mut preallocated =
1080            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1081
1082        for i in 1..=max_ord {
1083            match i {
1084                2 => {
1085                    if let Some(directory) = self.directory.take() {
1086                        ::fidl_next::WireEnvelope::encode_value(
1087                            directory,
1088                            preallocated.encoder,
1089                            &mut out,
1090                        )?;
1091                    } else {
1092                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1093                    }
1094                }
1095
1096                1 => {
1097                    if let Some(path) = self.path.take() {
1098                        ::fidl_next::WireEnvelope::encode_value(
1099                            path,
1100                            preallocated.encoder,
1101                            &mut out,
1102                        )?;
1103                    } else {
1104                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1105                    }
1106                }
1107
1108                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1109            }
1110            unsafe {
1111                preallocated.write_next(out.assume_init_ref());
1112            }
1113        }
1114
1115        ::fidl_next::WireTable::encode_len(table, max_ord);
1116
1117        Ok(())
1118    }
1119}
1120
1121impl<'de> ::fidl_next::FromWire<WireNamespaceEntry<'de>> for NamespaceEntry {
1122    #[inline]
1123    fn from_wire(wire: WireNamespaceEntry<'de>) -> Self {
1124        let wire = ::core::mem::ManuallyDrop::new(wire);
1125
1126        let path = wire.table.get(1);
1127
1128        let directory = wire.table.get(2);
1129
1130        Self {
1131            path: path.map(|envelope| {
1132                ::fidl_next::FromWire::from_wire(unsafe {
1133                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1134                })
1135            }),
1136
1137            directory: directory.map(|envelope| {
1138                ::fidl_next::FromWire::from_wire(unsafe {
1139                    envelope.read_unchecked::<::fidl_next::ClientEnd<
1140                        ::fidl_next_fuchsia_io::Directory,
1141                        ::fidl_next::fuchsia::WireChannel,
1142                    >>()
1143                })
1144            }),
1145        }
1146    }
1147}
1148
1149/// The wire type corresponding to [`NamespaceEntry`].
1150#[repr(C)]
1151pub struct WireNamespaceEntry<'de> {
1152    table: ::fidl_next::WireTable<'de>,
1153}
1154
1155impl<'de> Drop for WireNamespaceEntry<'de> {
1156    fn drop(&mut self) {
1157        let _ = self
1158            .table
1159            .get(1)
1160            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
1161
1162        let _ = self.table.get(2).map(|envelope| unsafe {
1163            envelope.read_unchecked::<::fidl_next::ClientEnd<
1164                ::fidl_next_fuchsia_io::Directory,
1165                ::fidl_next::fuchsia::WireChannel,
1166            >>()
1167        });
1168    }
1169}
1170
1171unsafe impl ::fidl_next::Wire for WireNamespaceEntry<'static> {
1172    type Decoded<'de> = WireNamespaceEntry<'de>;
1173
1174    #[inline]
1175    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1176        ::fidl_next::munge!(let Self { table } = out);
1177        ::fidl_next::WireTable::zero_padding(table);
1178    }
1179}
1180
1181unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceEntry<'static>
1182where
1183    ___D: ::fidl_next::Decoder + ?Sized,
1184
1185    ___D: ::fidl_next::fuchsia::HandleDecoder,
1186{
1187    fn decode(
1188        slot: ::fidl_next::Slot<'_, Self>,
1189        decoder: &mut ___D,
1190    ) -> Result<(), ::fidl_next::DecodeError> {
1191        ::fidl_next::munge!(let Self { table } = slot);
1192
1193        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1194            match ordinal {
1195                0 => unsafe { ::core::hint::unreachable_unchecked() },
1196
1197                1 => {
1198                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
1199                        slot.as_mut(),
1200                        decoder,
1201                    )?;
1202
1203                    let path = unsafe {
1204                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1205                    };
1206
1207                    if path.len() > 4095 {
1208                        return Err(::fidl_next::DecodeError::VectorTooLong {
1209                            size: path.len() as u64,
1210                            limit: 4095,
1211                        });
1212                    }
1213
1214                    Ok(())
1215                }
1216
1217                2 => {
1218                    ::fidl_next::WireEnvelope::decode_as::<
1219                        ___D,
1220                        ::fidl_next::ClientEnd<
1221                            ::fidl_next_fuchsia_io::Directory,
1222                            ::fidl_next::fuchsia::WireChannel,
1223                        >,
1224                    >(slot.as_mut(), decoder)?;
1225
1226                    Ok(())
1227                }
1228
1229                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1230            }
1231        })
1232    }
1233}
1234
1235impl<'de> WireNamespaceEntry<'de> {
1236    pub fn path(&self) -> Option<&::fidl_next::WireString<'de>> {
1237        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1238    }
1239
1240    pub fn directory(
1241        &self,
1242    ) -> Option<
1243        &::fidl_next::ClientEnd<
1244            ::fidl_next_fuchsia_io::Directory,
1245            ::fidl_next::fuchsia::WireChannel,
1246        >,
1247    > {
1248        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1249    }
1250}
1251
1252impl<'de> ::core::fmt::Debug for WireNamespaceEntry<'de> {
1253    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
1254        f.debug_struct("NamespaceEntry")
1255            .field("path", &self.path())
1256            .field("directory", &self.directory())
1257            .finish()
1258    }
1259}
1260
1261#[derive(Debug, Default)]
1262pub struct StartChildArgs {
1263    pub numbered_handles: Option<Vec<::fidl_next_fuchsia_process::HandleInfo>>,
1264
1265    pub namespace_entries: Option<Vec<crate::NamespaceEntry>>,
1266
1267    pub dictionary: Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
1268}
1269
1270impl StartChildArgs {
1271    fn __max_ordinal(&self) -> usize {
1272        if self.dictionary.is_some() {
1273            return 3;
1274        }
1275
1276        if self.namespace_entries.is_some() {
1277            return 2;
1278        }
1279
1280        if self.numbered_handles.is_some() {
1281            return 1;
1282        }
1283
1284        0
1285    }
1286}
1287
1288impl ::fidl_next::Encodable for StartChildArgs {
1289    type Encoded = WireStartChildArgs<'static>;
1290}
1291
1292unsafe impl<___E> ::fidl_next::Encode<___E> for StartChildArgs
1293where
1294    ___E: ::fidl_next::Encoder + ?Sized,
1295
1296    ___E: ::fidl_next::fuchsia::HandleEncoder,
1297{
1298    #[inline]
1299    fn encode(
1300        mut self,
1301        encoder: &mut ___E,
1302        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1303    ) -> Result<(), ::fidl_next::EncodeError> {
1304        ::fidl_next::munge!(let WireStartChildArgs { table } = out);
1305
1306        let max_ord = self.__max_ordinal();
1307
1308        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1309        ::fidl_next::Wire::zero_padding(&mut out);
1310
1311        let mut preallocated =
1312            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1313
1314        for i in 1..=max_ord {
1315            match i {
1316                3 => {
1317                    if let Some(dictionary) = self.dictionary.take() {
1318                        ::fidl_next::WireEnvelope::encode_value(
1319                            dictionary,
1320                            preallocated.encoder,
1321                            &mut out,
1322                        )?;
1323                    } else {
1324                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1325                    }
1326                }
1327
1328                2 => {
1329                    if let Some(namespace_entries) = self.namespace_entries.take() {
1330                        ::fidl_next::WireEnvelope::encode_value(
1331                            namespace_entries,
1332                            preallocated.encoder,
1333                            &mut out,
1334                        )?;
1335                    } else {
1336                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1337                    }
1338                }
1339
1340                1 => {
1341                    if let Some(numbered_handles) = self.numbered_handles.take() {
1342                        ::fidl_next::WireEnvelope::encode_value(
1343                            numbered_handles,
1344                            preallocated.encoder,
1345                            &mut out,
1346                        )?;
1347                    } else {
1348                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1349                    }
1350                }
1351
1352                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1353            }
1354            unsafe {
1355                preallocated.write_next(out.assume_init_ref());
1356            }
1357        }
1358
1359        ::fidl_next::WireTable::encode_len(table, max_ord);
1360
1361        Ok(())
1362    }
1363}
1364
1365impl<'de> ::fidl_next::FromWire<WireStartChildArgs<'de>> for StartChildArgs {
1366    #[inline]
1367    fn from_wire(wire: WireStartChildArgs<'de>) -> Self {
1368        let wire = ::core::mem::ManuallyDrop::new(wire);
1369
1370        let numbered_handles = wire.table.get(1);
1371
1372        let namespace_entries = wire.table.get(2);
1373
1374        let dictionary = wire.table.get(3);
1375
1376        Self {
1377
1378
1379                numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1380                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>() }
1381                )),
1382
1383
1384                namespace_entries: namespace_entries.map(|envelope| ::fidl_next::FromWire::from_wire(
1385                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>() }
1386                )),
1387
1388
1389                dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1390                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>() }
1391                )),
1392
1393        }
1394    }
1395}
1396
1397/// The wire type corresponding to [`StartChildArgs`].
1398#[repr(C)]
1399pub struct WireStartChildArgs<'de> {
1400    table: ::fidl_next::WireTable<'de>,
1401}
1402
1403impl<'de> Drop for WireStartChildArgs<'de> {
1404    fn drop(&mut self) {
1405        let _ = self.table.get(1)
1406                .map(|envelope| unsafe {
1407                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
1408                });
1409
1410        let _ = self.table.get(2).map(|envelope| unsafe {
1411            envelope
1412                .read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>()
1413        });
1414
1415        let _ = self.table.get(3).map(|envelope| unsafe {
1416            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
1417        });
1418    }
1419}
1420
1421unsafe impl ::fidl_next::Wire for WireStartChildArgs<'static> {
1422    type Decoded<'de> = WireStartChildArgs<'de>;
1423
1424    #[inline]
1425    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1426        ::fidl_next::munge!(let Self { table } = out);
1427        ::fidl_next::WireTable::zero_padding(table);
1428    }
1429}
1430
1431unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartChildArgs<'static>
1432where
1433    ___D: ::fidl_next::Decoder + ?Sized,
1434
1435    ___D: ::fidl_next::fuchsia::HandleDecoder,
1436{
1437    fn decode(
1438        slot: ::fidl_next::Slot<'_, Self>,
1439        decoder: &mut ___D,
1440    ) -> Result<(), ::fidl_next::DecodeError> {
1441        ::fidl_next::munge!(let Self { table } = slot);
1442
1443        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1444            match ordinal {
1445                0 => unsafe { ::core::hint::unreachable_unchecked() },
1446
1447                1 => {
1448                    ::fidl_next::WireEnvelope::decode_as::<
1449                        ___D,
1450                        ::fidl_next::WireVector<
1451                            'static,
1452                            ::fidl_next_fuchsia_process::WireHandleInfo,
1453                        >,
1454                    >(slot.as_mut(), decoder)?;
1455
1456                    let numbered_handles = unsafe {
1457                        slot
1458                                            .deref_unchecked()
1459                                            .deref_unchecked::<
1460                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
1461                                            >()
1462                    };
1463
1464                    if numbered_handles.len() > 128 {
1465                        return Err(::fidl_next::DecodeError::VectorTooLong {
1466                            size: numbered_handles.len() as u64,
1467                            limit: 128,
1468                        });
1469                    }
1470
1471                    Ok(())
1472                }
1473
1474                2 => {
1475                    ::fidl_next::WireEnvelope::decode_as::<
1476                        ___D,
1477                        ::fidl_next::WireVector<'static, crate::WireNamespaceEntry<'static>>,
1478                    >(slot.as_mut(), decoder)?;
1479
1480                    let namespace_entries = unsafe {
1481                        slot
1482                                            .deref_unchecked()
1483                                            .deref_unchecked::<
1484                                                ::fidl_next::WireVector<'_, crate::WireNamespaceEntry<'_>>
1485                                            >()
1486                    };
1487
1488                    if namespace_entries.len() > 32 {
1489                        return Err(::fidl_next::DecodeError::VectorTooLong {
1490                            size: namespace_entries.len() as u64,
1491                            limit: 32,
1492                        });
1493                    }
1494
1495                    Ok(())
1496                }
1497
1498                3 => {
1499                    ::fidl_next::WireEnvelope::decode_as::<
1500                        ___D,
1501                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1502                    >(slot.as_mut(), decoder)?;
1503
1504                    Ok(())
1505                }
1506
1507                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1508            }
1509        })
1510    }
1511}
1512
1513impl<'de> WireStartChildArgs<'de> {
1514    pub fn numbered_handles(
1515        &self,
1516    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>> {
1517        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1518    }
1519
1520    pub fn namespace_entries(
1521        &self,
1522    ) -> Option<&::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>> {
1523        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1524    }
1525
1526    pub fn dictionary(&self) -> Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
1527        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1528    }
1529}
1530
1531impl<'de> ::core::fmt::Debug for WireStartChildArgs<'de> {
1532    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
1533        f.debug_struct("StartChildArgs")
1534            .field("numbered_handles", &self.numbered_handles())
1535            .field("namespace_entries", &self.namespace_entries())
1536            .field("dictionary", &self.dictionary())
1537            .finish()
1538    }
1539}
1540
1541#[derive(Debug)]
1542pub struct ControllerStartRequest {
1543    pub args: crate::StartChildArgs,
1544
1545    pub execution_controller:
1546        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::zx::Channel>,
1547}
1548
1549impl ::fidl_next::Encodable for ControllerStartRequest {
1550    type Encoded = WireControllerStartRequest<'static>;
1551}
1552
1553unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerStartRequest
1554where
1555    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1556
1557    ___E: ::fidl_next::Encoder,
1558
1559    ___E: ::fidl_next::fuchsia::HandleEncoder,
1560{
1561    #[inline]
1562    fn encode(
1563        self,
1564        encoder: &mut ___E,
1565        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1566    ) -> Result<(), ::fidl_next::EncodeError> {
1567        ::fidl_next::munge! {
1568            let Self::Encoded {
1569                args,
1570                execution_controller,
1571
1572            } = out;
1573        }
1574
1575        ::fidl_next::Encode::encode(self.args, encoder, args)?;
1576
1577        ::fidl_next::Encode::encode(self.execution_controller, encoder, execution_controller)?;
1578
1579        Ok(())
1580    }
1581}
1582
1583impl ::fidl_next::EncodableOption for ControllerStartRequest {
1584    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerStartRequest<'static>>;
1585}
1586
1587unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerStartRequest
1588where
1589    ___E: ::fidl_next::Encoder + ?Sized,
1590    ControllerStartRequest: ::fidl_next::Encode<___E>,
1591{
1592    #[inline]
1593    fn encode_option(
1594        this: Option<Self>,
1595        encoder: &mut ___E,
1596        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1597    ) -> Result<(), ::fidl_next::EncodeError> {
1598        if let Some(inner) = this {
1599            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1600            ::fidl_next::WireBox::encode_present(out);
1601        } else {
1602            ::fidl_next::WireBox::encode_absent(out);
1603        }
1604
1605        Ok(())
1606    }
1607}
1608
1609impl<'de> ::fidl_next::FromWire<WireControllerStartRequest<'de>> for ControllerStartRequest {
1610    #[inline]
1611    fn from_wire(wire: WireControllerStartRequest<'de>) -> Self {
1612        Self {
1613            args: ::fidl_next::FromWire::from_wire(wire.args),
1614
1615            execution_controller: ::fidl_next::FromWire::from_wire(wire.execution_controller),
1616        }
1617    }
1618}
1619
1620/// The wire type corresponding to [`ControllerStartRequest`].
1621#[derive(Debug)]
1622#[repr(C)]
1623pub struct WireControllerStartRequest<'de> {
1624    pub args: crate::WireStartChildArgs<'de>,
1625
1626    pub execution_controller:
1627        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::WireChannel>,
1628}
1629
1630unsafe impl ::fidl_next::Wire for WireControllerStartRequest<'static> {
1631    type Decoded<'de> = WireControllerStartRequest<'de>;
1632
1633    #[inline]
1634    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1635        unsafe {
1636            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1637        }
1638    }
1639}
1640
1641unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerStartRequest<'static>
1642where
1643    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1644
1645    ___D: ::fidl_next::Decoder,
1646
1647    ___D: ::fidl_next::fuchsia::HandleDecoder,
1648{
1649    fn decode(
1650        slot: ::fidl_next::Slot<'_, Self>,
1651        decoder: &mut ___D,
1652    ) -> Result<(), ::fidl_next::DecodeError> {
1653        ::fidl_next::munge! {
1654            let Self {
1655                mut args,
1656                mut execution_controller,
1657
1658            } = slot;
1659        }
1660
1661        ::fidl_next::Decode::decode(args.as_mut(), decoder)?;
1662
1663        ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder)?;
1664
1665        Ok(())
1666    }
1667}
1668
1669#[derive(Debug)]
1670#[repr(C)]
1671pub struct ControllerGetExposedDictionaryResponse {
1672    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
1673}
1674
1675impl ::fidl_next::Encodable for ControllerGetExposedDictionaryResponse {
1676    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1677        Self,
1678        WireControllerGetExposedDictionaryResponse,
1679    > = unsafe {
1680        ::fidl_next::CopyOptimization::enable_if(
1681            true
1682
1683                && <
1684                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
1685                >::COPY_OPTIMIZATION.is_enabled()
1686
1687        )
1688    };
1689
1690    type Encoded = WireControllerGetExposedDictionaryResponse;
1691}
1692
1693unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerGetExposedDictionaryResponse
1694where
1695    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1696
1697    ___E: ::fidl_next::fuchsia::HandleEncoder,
1698{
1699    #[inline]
1700    fn encode(
1701        self,
1702        encoder: &mut ___E,
1703        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1704    ) -> Result<(), ::fidl_next::EncodeError> {
1705        ::fidl_next::munge! {
1706            let Self::Encoded {
1707                dictionary,
1708
1709            } = out;
1710        }
1711
1712        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
1713
1714        Ok(())
1715    }
1716}
1717
1718impl ::fidl_next::EncodableOption for ControllerGetExposedDictionaryResponse {
1719    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerGetExposedDictionaryResponse>;
1720}
1721
1722unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerGetExposedDictionaryResponse
1723where
1724    ___E: ::fidl_next::Encoder + ?Sized,
1725    ControllerGetExposedDictionaryResponse: ::fidl_next::Encode<___E>,
1726{
1727    #[inline]
1728    fn encode_option(
1729        this: Option<Self>,
1730        encoder: &mut ___E,
1731        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1732    ) -> Result<(), ::fidl_next::EncodeError> {
1733        if let Some(inner) = this {
1734            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1735            ::fidl_next::WireBox::encode_present(out);
1736        } else {
1737            ::fidl_next::WireBox::encode_absent(out);
1738        }
1739
1740        Ok(())
1741    }
1742}
1743
1744impl ::fidl_next::FromWire<WireControllerGetExposedDictionaryResponse>
1745    for ControllerGetExposedDictionaryResponse
1746{
1747    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1748        WireControllerGetExposedDictionaryResponse,
1749        Self,
1750    > = unsafe {
1751        ::fidl_next::CopyOptimization::enable_if(
1752            true
1753
1754                && <
1755                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
1756                >::COPY_OPTIMIZATION.is_enabled()
1757
1758        )
1759    };
1760
1761    #[inline]
1762    fn from_wire(wire: WireControllerGetExposedDictionaryResponse) -> Self {
1763        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
1764    }
1765}
1766
1767/// The wire type corresponding to [`ControllerGetExposedDictionaryResponse`].
1768#[derive(Debug)]
1769#[repr(C)]
1770pub struct WireControllerGetExposedDictionaryResponse {
1771    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1772}
1773
1774unsafe impl ::fidl_next::Wire for WireControllerGetExposedDictionaryResponse {
1775    type Decoded<'de> = WireControllerGetExposedDictionaryResponse;
1776
1777    #[inline]
1778    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1779}
1780
1781unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerGetExposedDictionaryResponse
1782where
1783    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1784
1785    ___D: ::fidl_next::fuchsia::HandleDecoder,
1786{
1787    fn decode(
1788        slot: ::fidl_next::Slot<'_, Self>,
1789        decoder: &mut ___D,
1790    ) -> Result<(), ::fidl_next::DecodeError> {
1791        ::fidl_next::munge! {
1792            let Self {
1793                mut dictionary,
1794
1795            } = slot;
1796        }
1797
1798        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
1799
1800        Ok(())
1801    }
1802}
1803
1804pub type ControllerDestroyResponse = ();
1805
1806/// The wire type corresponding to [`ControllerDestroyResponse`].
1807pub type WireControllerDestroyResponse = ();
1808
1809/// The type corresponding to the Controller protocol.
1810#[doc = " A protocol used to operate on a component.\n\n One may get access to a `Controller` when creating a component with the\n `Realm.CreateChild` method. You may also obtain a `Controller` for an\n existing child component with the `Realm.OpenController` method.\n"]
1811#[derive(Debug)]
1812pub struct Controller;
1813
1814pub mod controller {
1815    pub mod prelude {
1816        pub use crate::{controller, Controller, ControllerClientHandler, ControllerServerHandler};
1817
1818        pub use crate::ControllerStartRequest;
1819
1820        pub use crate::ControllerDestroyResponse;
1821
1822        pub use crate::ControllerGetExposedDictionaryResponse;
1823
1824        pub use crate::ControllerIsStartedResponse;
1825
1826        pub use crate::ControllerStartResponse;
1827
1828        pub use crate::Error;
1829    }
1830
1831    pub struct Start;
1832
1833    impl ::fidl_next::Method for Start {
1834        const ORDINAL: u64 = 7532130149195770565;
1835
1836        type Protocol = crate::Controller;
1837
1838        type Request = crate::WireControllerStartRequest<'static>;
1839
1840        type Response = ::fidl_next::WireFlexibleResult<
1841            'static,
1842            crate::WireControllerStartResponse,
1843            crate::WireError,
1844        >;
1845    }
1846
1847    pub struct IsStarted;
1848
1849    impl ::fidl_next::Method for IsStarted {
1850        const ORDINAL: u64 = 2402079833990398915;
1851
1852        type Protocol = crate::Controller;
1853
1854        type Request = ();
1855
1856        type Response = ::fidl_next::WireFlexibleResult<
1857            'static,
1858            crate::WireControllerIsStartedResponse,
1859            crate::WireError,
1860        >;
1861    }
1862
1863    pub struct GetExposedDictionary;
1864
1865    impl ::fidl_next::Method for GetExposedDictionary {
1866        const ORDINAL: u64 = 9099583788120940443;
1867
1868        type Protocol = crate::Controller;
1869
1870        type Request = ();
1871
1872        type Response = ::fidl_next::WireFlexibleResult<
1873            'static,
1874            crate::WireControllerGetExposedDictionaryResponse,
1875            crate::WireError,
1876        >;
1877    }
1878
1879    pub struct Destroy;
1880
1881    impl ::fidl_next::Method for Destroy {
1882        const ORDINAL: u64 = 8381937394141370177;
1883
1884        type Protocol = crate::Controller;
1885
1886        type Request = ();
1887
1888        type Response = ::fidl_next::WireFlexibleResult<
1889            'static,
1890            crate::WireControllerDestroyResponse,
1891            crate::WireError,
1892        >;
1893    }
1894
1895    mod ___detail {
1896
1897        pub struct Start<T0, T1> {
1898            args: T0,
1899
1900            execution_controller: T1,
1901        }
1902
1903        impl<T0, T1> ::fidl_next::Encodable for Start<T0, T1>
1904        where
1905            T0: ::fidl_next::Encodable<Encoded = crate::WireStartChildArgs<'static>>,
1906
1907            T1: ::fidl_next::Encodable<
1908                Encoded = ::fidl_next::ServerEnd<
1909                    crate::ExecutionController,
1910                    ::fidl_next::fuchsia::WireChannel,
1911                >,
1912            >,
1913        {
1914            type Encoded = crate::WireControllerStartRequest<'static>;
1915        }
1916
1917        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Start<T0, T1>
1918        where
1919            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1920
1921            ___E: ::fidl_next::Encoder,
1922
1923            ___E: ::fidl_next::fuchsia::HandleEncoder,
1924
1925            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStartChildArgs<'static>>,
1926
1927            T1: ::fidl_next::Encode<
1928                ___E,
1929                Encoded = ::fidl_next::ServerEnd<
1930                    crate::ExecutionController,
1931                    ::fidl_next::fuchsia::WireChannel,
1932                >,
1933            >,
1934        {
1935            #[inline]
1936            fn encode(
1937                self,
1938                encoder: &mut ___E,
1939                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1940            ) -> Result<(), ::fidl_next::EncodeError> {
1941                ::fidl_next::munge! {
1942                    let Self::Encoded {
1943                        args,
1944                        execution_controller,
1945
1946                    } = out;
1947                }
1948
1949                ::fidl_next::Encode::encode(self.args, encoder, args)?;
1950
1951                ::fidl_next::Encode::encode(
1952                    self.execution_controller,
1953                    encoder,
1954                    execution_controller,
1955                )?;
1956
1957                Ok(())
1958            }
1959        }
1960
1961        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Controller
1962        where
1963            ___T: ::fidl_next::Transport,
1964        {
1965            type ClientSender = ControllerClientSender<___T>;
1966            type ServerSender = ControllerServerSender<___T>;
1967        }
1968
1969        /// The client sender for the `Controller` protocol.
1970        pub struct ControllerClientSender<___T: ::fidl_next::Transport> {
1971            #[allow(dead_code)]
1972            sender: ::fidl_next::protocol::ClientSender<___T>,
1973        }
1974
1975        impl<___T> ControllerClientSender<___T>
1976        where
1977            ___T: ::fidl_next::Transport,
1978        {
1979            #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
1980            pub fn start(
1981                &self,
1982
1983                args: impl ::fidl_next::Encode<
1984                    <___T as ::fidl_next::Transport>::SendBuffer,
1985                    Encoded = crate::WireStartChildArgs<'static>,
1986                >,
1987
1988                execution_controller: impl ::fidl_next::Encode<
1989                    <___T as ::fidl_next::Transport>::SendBuffer,
1990                    Encoded = ::fidl_next::ServerEnd<
1991                        crate::ExecutionController,
1992                        ::fidl_next::fuchsia::WireChannel,
1993                    >,
1994                >,
1995            ) -> Result<::fidl_next::ResponseFuture<'_, super::Start, ___T>, ::fidl_next::EncodeError>
1996            where
1997                <___T as ::fidl_next::Transport>::SendBuffer:
1998                    ::fidl_next::encoder::InternalHandleEncoder,
1999
2000                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2001
2002                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2003            {
2004                self.start_with(Start { args, execution_controller })
2005            }
2006
2007            #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
2008            pub fn start_with<___R>(
2009                &self,
2010                request: ___R,
2011            ) -> Result<::fidl_next::ResponseFuture<'_, super::Start, ___T>, ::fidl_next::EncodeError>
2012            where
2013                ___R: ::fidl_next::Encode<
2014                    <___T as ::fidl_next::Transport>::SendBuffer,
2015                    Encoded = crate::WireControllerStartRequest<'static>,
2016                >,
2017            {
2018                self.sender
2019                    .send_two_way(7532130149195770565, request)
2020                    .map(::fidl_next::ResponseFuture::from_untyped)
2021            }
2022
2023            #[doc = " Returns true if this instance is currently running.\n"]
2024            pub fn is_started(
2025                &self,
2026            ) -> Result<
2027                ::fidl_next::ResponseFuture<'_, super::IsStarted, ___T>,
2028                ::fidl_next::EncodeError,
2029            > {
2030                self.sender
2031                    .send_two_way(2402079833990398915, ())
2032                    .map(::fidl_next::ResponseFuture::from_untyped)
2033            }
2034
2035            #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2036            pub fn get_exposed_dictionary(
2037                &self,
2038            ) -> Result<
2039                ::fidl_next::ResponseFuture<'_, super::GetExposedDictionary, ___T>,
2040                ::fidl_next::EncodeError,
2041            > {
2042                self.sender
2043                    .send_two_way(9099583788120940443, ())
2044                    .map(::fidl_next::ResponseFuture::from_untyped)
2045            }
2046
2047            #[doc = " Destroys this component. When this method returns, either:\n\n - Ok was returned, indicating destruction has begun.\n - An error was returned, and destruction will not be attempted.\n\n If Ok was returned, destruction will proceed in the background, but it\n hasn\'t necessarily completed yet. When it completes, the framework will\n close this [Controller] channel.\n\n Errors:\n\n - `ACCESS_DENIED`: Destruction of this component is not allowed.\n Currently, this can happen if the component is a static child of its\n parent.\n"]
2048            pub fn destroy(
2049                &self,
2050            ) -> Result<
2051                ::fidl_next::ResponseFuture<'_, super::Destroy, ___T>,
2052                ::fidl_next::EncodeError,
2053            > {
2054                self.sender
2055                    .send_two_way(8381937394141370177, ())
2056                    .map(::fidl_next::ResponseFuture::from_untyped)
2057            }
2058        }
2059
2060        /// The server sender for the `Controller` protocol.
2061        #[repr(transparent)]
2062        pub struct ControllerServerSender<___T: ::fidl_next::Transport> {
2063            sender: ::fidl_next::protocol::ServerSender<___T>,
2064        }
2065
2066        impl<___T> ControllerServerSender<___T> where ___T: ::fidl_next::Transport {}
2067    }
2068}
2069
2070/// A client handler for the Controller protocol.
2071///
2072/// See [`Controller`] for more details.
2073pub trait ControllerClientHandler<___T: ::fidl_next::Transport> {
2074    fn on_unknown_interaction(
2075        &mut self,
2076        sender: &::fidl_next::ClientSender<Controller, ___T>,
2077        ordinal: u64,
2078    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2079        sender.close();
2080        ::core::future::ready(())
2081    }
2082}
2083
2084impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for Controller
2085where
2086    ___H: ControllerClientHandler<___T> + Send,
2087    ___T: ::fidl_next::Transport,
2088
2089    <controller::Start as ::fidl_next::Method>::Response:
2090        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2091
2092    <controller::IsStarted as ::fidl_next::Method>::Response:
2093        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2094
2095    <controller::GetExposedDictionary as ::fidl_next::Method>::Response:
2096        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2097
2098    <controller::Destroy as ::fidl_next::Method>::Response:
2099        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2100{
2101    async fn on_event(
2102        handler: &mut ___H,
2103        sender: &::fidl_next::ClientSender<Self, ___T>,
2104        ordinal: u64,
2105        buffer: ___T::RecvBuffer,
2106    ) {
2107        match ordinal {
2108            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2109        }
2110    }
2111}
2112
2113/// A server handler for the Controller protocol.
2114///
2115/// See [`Controller`] for more details.
2116pub trait ControllerServerHandler<___T: ::fidl_next::Transport> {
2117    #[doc = " Start the component, optionally providing additional handles to be given\n to the component. Returns INSTANCE_ALREADY_RUNNING if the instance is\n currently running.\n"]
2118    fn start(
2119        &mut self,
2120        sender: &::fidl_next::ServerSender<Controller, ___T>,
2121
2122        request: ::fidl_next::Request<controller::Start, ___T>,
2123
2124        responder: ::fidl_next::Responder<controller::Start>,
2125    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2126
2127    #[doc = " Returns true if this instance is currently running.\n"]
2128    fn is_started(
2129        &mut self,
2130        sender: &::fidl_next::ServerSender<Controller, ___T>,
2131
2132        responder: ::fidl_next::Responder<controller::IsStarted>,
2133    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2134
2135    #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2136    fn get_exposed_dictionary(
2137        &mut self,
2138        sender: &::fidl_next::ServerSender<Controller, ___T>,
2139
2140        responder: ::fidl_next::Responder<controller::GetExposedDictionary>,
2141    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2142
2143    #[doc = " Destroys this component. When this method returns, either:\n\n - Ok was returned, indicating destruction has begun.\n - An error was returned, and destruction will not be attempted.\n\n If Ok was returned, destruction will proceed in the background, but it\n hasn\'t necessarily completed yet. When it completes, the framework will\n close this [Controller] channel.\n\n Errors:\n\n - `ACCESS_DENIED`: Destruction of this component is not allowed.\n Currently, this can happen if the component is a static child of its\n parent.\n"]
2144    fn destroy(
2145        &mut self,
2146        sender: &::fidl_next::ServerSender<Controller, ___T>,
2147
2148        responder: ::fidl_next::Responder<controller::Destroy>,
2149    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2150
2151    fn on_unknown_interaction(
2152        &mut self,
2153        sender: &::fidl_next::ServerSender<Controller, ___T>,
2154        ordinal: u64,
2155    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2156        sender.close();
2157        ::core::future::ready(())
2158    }
2159}
2160
2161impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for Controller
2162where
2163    ___H: ControllerServerHandler<___T> + Send,
2164    ___T: ::fidl_next::Transport,
2165
2166    <controller::Start as ::fidl_next::Method>::Request:
2167        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2168{
2169    async fn on_one_way(
2170        handler: &mut ___H,
2171        sender: &::fidl_next::ServerSender<Self, ___T>,
2172        ordinal: u64,
2173        buffer: ___T::RecvBuffer,
2174    ) {
2175        match ordinal {
2176            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2177        }
2178    }
2179
2180    async fn on_two_way(
2181        handler: &mut ___H,
2182        sender: &::fidl_next::ServerSender<Self, ___T>,
2183        ordinal: u64,
2184        buffer: ___T::RecvBuffer,
2185        responder: ::fidl_next::protocol::Responder,
2186    ) {
2187        match ordinal {
2188            7532130149195770565 => {
2189                let responder = ::fidl_next::Responder::from_untyped(responder);
2190
2191                match ::fidl_next::DecoderExt::decode(buffer) {
2192                    Ok(decoded) => handler.start(sender, decoded, responder).await,
2193                    Err(e) => {
2194                        sender.close();
2195                    }
2196                }
2197            }
2198
2199            2402079833990398915 => {
2200                let responder = ::fidl_next::Responder::from_untyped(responder);
2201
2202                handler.is_started(sender, responder).await;
2203            }
2204
2205            9099583788120940443 => {
2206                let responder = ::fidl_next::Responder::from_untyped(responder);
2207
2208                handler.get_exposed_dictionary(sender, responder).await;
2209            }
2210
2211            8381937394141370177 => {
2212                let responder = ::fidl_next::Responder::from_untyped(responder);
2213
2214                handler.destroy(sender, responder).await;
2215            }
2216
2217            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2218        }
2219    }
2220}
2221
2222#[doc = " The maximum number of dynamic offers that can target a created component.\n"]
2223pub const MAX_DYNAMIC_OFFER_COUNT: u32 = 128;
2224
2225#[derive(Debug, Default)]
2226pub struct CreateChildArgs {
2227    pub numbered_handles: Option<Vec<::fidl_next_fuchsia_process::HandleInfo>>,
2228
2229    pub dynamic_offers: Option<Vec<::fidl_next_fuchsia_component_decl::Offer>>,
2230
2231    pub controller:
2232        Option<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>>,
2233
2234    pub dictionary: Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
2235}
2236
2237impl CreateChildArgs {
2238    fn __max_ordinal(&self) -> usize {
2239        if self.dictionary.is_some() {
2240            return 4;
2241        }
2242
2243        if self.controller.is_some() {
2244            return 3;
2245        }
2246
2247        if self.dynamic_offers.is_some() {
2248            return 2;
2249        }
2250
2251        if self.numbered_handles.is_some() {
2252            return 1;
2253        }
2254
2255        0
2256    }
2257}
2258
2259impl ::fidl_next::Encodable for CreateChildArgs {
2260    type Encoded = WireCreateChildArgs<'static>;
2261}
2262
2263unsafe impl<___E> ::fidl_next::Encode<___E> for CreateChildArgs
2264where
2265    ___E: ::fidl_next::Encoder + ?Sized,
2266
2267    ___E: ::fidl_next::fuchsia::HandleEncoder,
2268{
2269    #[inline]
2270    fn encode(
2271        mut self,
2272        encoder: &mut ___E,
2273        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2274    ) -> Result<(), ::fidl_next::EncodeError> {
2275        ::fidl_next::munge!(let WireCreateChildArgs { table } = out);
2276
2277        let max_ord = self.__max_ordinal();
2278
2279        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2280        ::fidl_next::Wire::zero_padding(&mut out);
2281
2282        let mut preallocated =
2283            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2284
2285        for i in 1..=max_ord {
2286            match i {
2287                4 => {
2288                    if let Some(dictionary) = self.dictionary.take() {
2289                        ::fidl_next::WireEnvelope::encode_value(
2290                            dictionary,
2291                            preallocated.encoder,
2292                            &mut out,
2293                        )?;
2294                    } else {
2295                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2296                    }
2297                }
2298
2299                3 => {
2300                    if let Some(controller) = self.controller.take() {
2301                        ::fidl_next::WireEnvelope::encode_value(
2302                            controller,
2303                            preallocated.encoder,
2304                            &mut out,
2305                        )?;
2306                    } else {
2307                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2308                    }
2309                }
2310
2311                2 => {
2312                    if let Some(dynamic_offers) = self.dynamic_offers.take() {
2313                        ::fidl_next::WireEnvelope::encode_value(
2314                            dynamic_offers,
2315                            preallocated.encoder,
2316                            &mut out,
2317                        )?;
2318                    } else {
2319                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2320                    }
2321                }
2322
2323                1 => {
2324                    if let Some(numbered_handles) = self.numbered_handles.take() {
2325                        ::fidl_next::WireEnvelope::encode_value(
2326                            numbered_handles,
2327                            preallocated.encoder,
2328                            &mut out,
2329                        )?;
2330                    } else {
2331                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2332                    }
2333                }
2334
2335                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2336            }
2337            unsafe {
2338                preallocated.write_next(out.assume_init_ref());
2339            }
2340        }
2341
2342        ::fidl_next::WireTable::encode_len(table, max_ord);
2343
2344        Ok(())
2345    }
2346}
2347
2348impl<'de> ::fidl_next::FromWire<WireCreateChildArgs<'de>> for CreateChildArgs {
2349    #[inline]
2350    fn from_wire(wire: WireCreateChildArgs<'de>) -> Self {
2351        let wire = ::core::mem::ManuallyDrop::new(wire);
2352
2353        let numbered_handles = wire.table.get(1);
2354
2355        let dynamic_offers = wire.table.get(2);
2356
2357        let controller = wire.table.get(3);
2358
2359        let dictionary = wire.table.get(4);
2360
2361        Self {
2362            numbered_handles:
2363                numbered_handles.map(|envelope| {
2364                    ::fidl_next::FromWire::from_wire(unsafe {
2365                        envelope.read_unchecked::<::fidl_next::WireVector<
2366                            'de,
2367                            ::fidl_next_fuchsia_process::WireHandleInfo,
2368                        >>()
2369                    })
2370                }),
2371
2372            dynamic_offers: dynamic_offers.map(|envelope| {
2373                ::fidl_next::FromWire::from_wire(unsafe {
2374                    envelope.read_unchecked::<::fidl_next::WireVector<
2375                        'de,
2376                        ::fidl_next_fuchsia_component_decl::WireOffer<'de>,
2377                    >>()
2378                })
2379            }),
2380
2381            controller:
2382                controller.map(|envelope| {
2383                    ::fidl_next::FromWire::from_wire(unsafe {
2384                        envelope.read_unchecked::<::fidl_next::ServerEnd<
2385                            crate::Controller,
2386                            ::fidl_next::fuchsia::WireChannel,
2387                        >>()
2388                    })
2389                }),
2390
2391            dictionary: dictionary.map(|envelope| {
2392                ::fidl_next::FromWire::from_wire(unsafe {
2393                    envelope
2394                        .read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>(
2395                        )
2396                })
2397            }),
2398        }
2399    }
2400}
2401
2402/// The wire type corresponding to [`CreateChildArgs`].
2403#[repr(C)]
2404pub struct WireCreateChildArgs<'de> {
2405    table: ::fidl_next::WireTable<'de>,
2406}
2407
2408impl<'de> Drop for WireCreateChildArgs<'de> {
2409    fn drop(&mut self) {
2410        let _ = self.table.get(1)
2411                .map(|envelope| unsafe {
2412                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
2413                });
2414
2415        let _ = self.table.get(2)
2416                .map(|envelope| unsafe {
2417                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>>()
2418                });
2419
2420        let _ = self.table.get(3)
2421                .map(|envelope| unsafe {
2422                    envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>()
2423                });
2424
2425        let _ = self.table.get(4).map(|envelope| unsafe {
2426            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
2427        });
2428    }
2429}
2430
2431unsafe impl ::fidl_next::Wire for WireCreateChildArgs<'static> {
2432    type Decoded<'de> = WireCreateChildArgs<'de>;
2433
2434    #[inline]
2435    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2436        ::fidl_next::munge!(let Self { table } = out);
2437        ::fidl_next::WireTable::zero_padding(table);
2438    }
2439}
2440
2441unsafe impl<___D> ::fidl_next::Decode<___D> for WireCreateChildArgs<'static>
2442where
2443    ___D: ::fidl_next::Decoder + ?Sized,
2444
2445    ___D: ::fidl_next::fuchsia::HandleDecoder,
2446{
2447    fn decode(
2448        slot: ::fidl_next::Slot<'_, Self>,
2449        decoder: &mut ___D,
2450    ) -> Result<(), ::fidl_next::DecodeError> {
2451        ::fidl_next::munge!(let Self { table } = slot);
2452
2453        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2454            match ordinal {
2455                0 => unsafe { ::core::hint::unreachable_unchecked() },
2456
2457                1 => {
2458                    ::fidl_next::WireEnvelope::decode_as::<
2459                        ___D,
2460                        ::fidl_next::WireVector<
2461                            'static,
2462                            ::fidl_next_fuchsia_process::WireHandleInfo,
2463                        >,
2464                    >(slot.as_mut(), decoder)?;
2465
2466                    let numbered_handles = unsafe {
2467                        slot
2468                                            .deref_unchecked()
2469                                            .deref_unchecked::<
2470                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
2471                                            >()
2472                    };
2473
2474                    if numbered_handles.len() > 128 {
2475                        return Err(::fidl_next::DecodeError::VectorTooLong {
2476                            size: numbered_handles.len() as u64,
2477                            limit: 128,
2478                        });
2479                    }
2480
2481                    Ok(())
2482                }
2483
2484                2 => {
2485                    ::fidl_next::WireEnvelope::decode_as::<
2486                        ___D,
2487                        ::fidl_next::WireVector<
2488                            'static,
2489                            ::fidl_next_fuchsia_component_decl::WireOffer<'static>,
2490                        >,
2491                    >(slot.as_mut(), decoder)?;
2492
2493                    let dynamic_offers = unsafe {
2494                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2495                            '_,
2496                            ::fidl_next_fuchsia_component_decl::WireOffer<'_>,
2497                        >>()
2498                    };
2499
2500                    if dynamic_offers.len() > 128 {
2501                        return Err(::fidl_next::DecodeError::VectorTooLong {
2502                            size: dynamic_offers.len() as u64,
2503                            limit: 128,
2504                        });
2505                    }
2506
2507                    Ok(())
2508                }
2509
2510                3 => {
2511                    ::fidl_next::WireEnvelope::decode_as::<
2512                        ___D,
2513                        ::fidl_next::ServerEnd<
2514                            crate::Controller,
2515                            ::fidl_next::fuchsia::WireChannel,
2516                        >,
2517                    >(slot.as_mut(), decoder)?;
2518
2519                    Ok(())
2520                }
2521
2522                4 => {
2523                    ::fidl_next::WireEnvelope::decode_as::<
2524                        ___D,
2525                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
2526                    >(slot.as_mut(), decoder)?;
2527
2528                    Ok(())
2529                }
2530
2531                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2532            }
2533        })
2534    }
2535}
2536
2537impl<'de> WireCreateChildArgs<'de> {
2538    pub fn numbered_handles(
2539        &self,
2540    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>> {
2541        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2542    }
2543
2544    pub fn dynamic_offers(
2545        &self,
2546    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>>
2547    {
2548        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2549    }
2550
2551    pub fn controller(
2552        &self,
2553    ) -> Option<&::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>> {
2554        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2555    }
2556
2557    pub fn dictionary(&self) -> Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
2558        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2559    }
2560}
2561
2562impl<'de> ::core::fmt::Debug for WireCreateChildArgs<'de> {
2563    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
2564        f.debug_struct("CreateChildArgs")
2565            .field("numbered_handles", &self.numbered_handles())
2566            .field("dynamic_offers", &self.dynamic_offers())
2567            .field("controller", &self.controller())
2568            .field("dictionary", &self.dictionary())
2569            .finish()
2570    }
2571}
2572
2573#[doc = " Payload for DebugStarted events.\n"]
2574#[derive(Debug, Default)]
2575pub struct DebugStartedPayload {
2576    pub runtime_dir: Option<
2577        ::fidl_next::ClientEnd<
2578            ::fidl_next_fuchsia_io::Directory,
2579            ::fidl_next::fuchsia::zx::Channel,
2580        >,
2581    >,
2582
2583    pub break_on_start: Option<::fidl_next::fuchsia::zx::Handle>,
2584}
2585
2586impl DebugStartedPayload {
2587    fn __max_ordinal(&self) -> usize {
2588        if self.break_on_start.is_some() {
2589            return 2;
2590        }
2591
2592        if self.runtime_dir.is_some() {
2593            return 1;
2594        }
2595
2596        0
2597    }
2598}
2599
2600impl ::fidl_next::Encodable for DebugStartedPayload {
2601    type Encoded = WireDebugStartedPayload<'static>;
2602}
2603
2604unsafe impl<___E> ::fidl_next::Encode<___E> for DebugStartedPayload
2605where
2606    ___E: ::fidl_next::Encoder + ?Sized,
2607
2608    ___E: ::fidl_next::fuchsia::HandleEncoder,
2609{
2610    #[inline]
2611    fn encode(
2612        mut self,
2613        encoder: &mut ___E,
2614        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2615    ) -> Result<(), ::fidl_next::EncodeError> {
2616        ::fidl_next::munge!(let WireDebugStartedPayload { table } = out);
2617
2618        let max_ord = self.__max_ordinal();
2619
2620        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2621        ::fidl_next::Wire::zero_padding(&mut out);
2622
2623        let mut preallocated =
2624            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2625
2626        for i in 1..=max_ord {
2627            match i {
2628                2 => {
2629                    if let Some(break_on_start) = self.break_on_start.take() {
2630                        ::fidl_next::WireEnvelope::encode_value(
2631                            break_on_start,
2632                            preallocated.encoder,
2633                            &mut out,
2634                        )?;
2635                    } else {
2636                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2637                    }
2638                }
2639
2640                1 => {
2641                    if let Some(runtime_dir) = self.runtime_dir.take() {
2642                        ::fidl_next::WireEnvelope::encode_value(
2643                            runtime_dir,
2644                            preallocated.encoder,
2645                            &mut out,
2646                        )?;
2647                    } else {
2648                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2649                    }
2650                }
2651
2652                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2653            }
2654            unsafe {
2655                preallocated.write_next(out.assume_init_ref());
2656            }
2657        }
2658
2659        ::fidl_next::WireTable::encode_len(table, max_ord);
2660
2661        Ok(())
2662    }
2663}
2664
2665impl<'de> ::fidl_next::FromWire<WireDebugStartedPayload<'de>> for DebugStartedPayload {
2666    #[inline]
2667    fn from_wire(wire: WireDebugStartedPayload<'de>) -> Self {
2668        let wire = ::core::mem::ManuallyDrop::new(wire);
2669
2670        let runtime_dir = wire.table.get(1);
2671
2672        let break_on_start = wire.table.get(2);
2673
2674        Self {
2675            runtime_dir: runtime_dir.map(|envelope| {
2676                ::fidl_next::FromWire::from_wire(unsafe {
2677                    envelope.read_unchecked::<::fidl_next::ClientEnd<
2678                        ::fidl_next_fuchsia_io::Directory,
2679                        ::fidl_next::fuchsia::WireChannel,
2680                    >>()
2681                })
2682            }),
2683
2684            break_on_start: break_on_start.map(|envelope| {
2685                ::fidl_next::FromWire::from_wire(unsafe {
2686                    envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
2687                })
2688            }),
2689        }
2690    }
2691}
2692
2693/// The wire type corresponding to [`DebugStartedPayload`].
2694#[repr(C)]
2695pub struct WireDebugStartedPayload<'de> {
2696    table: ::fidl_next::WireTable<'de>,
2697}
2698
2699impl<'de> Drop for WireDebugStartedPayload<'de> {
2700    fn drop(&mut self) {
2701        let _ = self.table.get(1).map(|envelope| unsafe {
2702            envelope.read_unchecked::<::fidl_next::ClientEnd<
2703                ::fidl_next_fuchsia_io::Directory,
2704                ::fidl_next::fuchsia::WireChannel,
2705            >>()
2706        });
2707
2708        let _ = self.table.get(2).map(|envelope| unsafe {
2709            envelope.read_unchecked::<::fidl_next::fuchsia::WireHandle>()
2710        });
2711    }
2712}
2713
2714unsafe impl ::fidl_next::Wire for WireDebugStartedPayload<'static> {
2715    type Decoded<'de> = WireDebugStartedPayload<'de>;
2716
2717    #[inline]
2718    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2719        ::fidl_next::munge!(let Self { table } = out);
2720        ::fidl_next::WireTable::zero_padding(table);
2721    }
2722}
2723
2724unsafe impl<___D> ::fidl_next::Decode<___D> for WireDebugStartedPayload<'static>
2725where
2726    ___D: ::fidl_next::Decoder + ?Sized,
2727
2728    ___D: ::fidl_next::fuchsia::HandleDecoder,
2729{
2730    fn decode(
2731        slot: ::fidl_next::Slot<'_, Self>,
2732        decoder: &mut ___D,
2733    ) -> Result<(), ::fidl_next::DecodeError> {
2734        ::fidl_next::munge!(let Self { table } = slot);
2735
2736        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2737            match ordinal {
2738                0 => unsafe { ::core::hint::unreachable_unchecked() },
2739
2740                1 => {
2741                    ::fidl_next::WireEnvelope::decode_as::<
2742                        ___D,
2743                        ::fidl_next::ClientEnd<
2744                            ::fidl_next_fuchsia_io::Directory,
2745                            ::fidl_next::fuchsia::WireChannel,
2746                        >,
2747                    >(slot.as_mut(), decoder)?;
2748
2749                    Ok(())
2750                }
2751
2752                2 => {
2753                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
2754                        slot.as_mut(),
2755                        decoder,
2756                    )?;
2757
2758                    Ok(())
2759                }
2760
2761                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2762            }
2763        })
2764    }
2765}
2766
2767impl<'de> WireDebugStartedPayload<'de> {
2768    pub fn runtime_dir(
2769        &self,
2770    ) -> Option<
2771        &::fidl_next::ClientEnd<
2772            ::fidl_next_fuchsia_io::Directory,
2773            ::fidl_next::fuchsia::WireChannel,
2774        >,
2775    > {
2776        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2777    }
2778
2779    pub fn break_on_start(&self) -> Option<&::fidl_next::fuchsia::WireHandle> {
2780        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2781    }
2782}
2783
2784impl<'de> ::core::fmt::Debug for WireDebugStartedPayload<'de> {
2785    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
2786        f.debug_struct("DebugStartedPayload")
2787            .field("runtime_dir", &self.runtime_dir())
2788            .field("break_on_start", &self.break_on_start())
2789            .finish()
2790    }
2791}
2792
2793#[doc = " Payload for Destroyed events.\n"]
2794#[derive(Clone, Debug, Default)]
2795pub struct DestroyedPayload {}
2796
2797impl DestroyedPayload {
2798    fn __max_ordinal(&self) -> usize {
2799        0
2800    }
2801}
2802
2803impl ::fidl_next::Encodable for DestroyedPayload {
2804    type Encoded = WireDestroyedPayload<'static>;
2805}
2806
2807unsafe impl<___E> ::fidl_next::Encode<___E> for DestroyedPayload
2808where
2809    ___E: ::fidl_next::Encoder + ?Sized,
2810{
2811    #[inline]
2812    fn encode(
2813        mut self,
2814        encoder: &mut ___E,
2815        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2816    ) -> Result<(), ::fidl_next::EncodeError> {
2817        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
2818
2819        let max_ord = self.__max_ordinal();
2820
2821        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2822        ::fidl_next::Wire::zero_padding(&mut out);
2823
2824        let mut preallocated =
2825            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2826
2827        for i in 1..=max_ord {
2828            match i {
2829                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2830            }
2831            unsafe {
2832                preallocated.write_next(out.assume_init_ref());
2833            }
2834        }
2835
2836        ::fidl_next::WireTable::encode_len(table, max_ord);
2837
2838        Ok(())
2839    }
2840}
2841
2842unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DestroyedPayload
2843where
2844    ___E: ::fidl_next::Encoder + ?Sized,
2845{
2846    #[inline]
2847    fn encode_ref(
2848        &self,
2849        encoder: &mut ___E,
2850        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2851    ) -> Result<(), ::fidl_next::EncodeError> {
2852        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
2853
2854        let max_ord = self.__max_ordinal();
2855
2856        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2857        ::fidl_next::Wire::zero_padding(&mut out);
2858
2859        let mut preallocated =
2860            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2861
2862        for i in 1..=max_ord {
2863            match i {
2864                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2865            }
2866            unsafe {
2867                preallocated.write_next(out.assume_init_ref());
2868            }
2869        }
2870
2871        ::fidl_next::WireTable::encode_len(table, max_ord);
2872
2873        Ok(())
2874    }
2875}
2876
2877impl<'de> ::fidl_next::FromWire<WireDestroyedPayload<'de>> for DestroyedPayload {
2878    #[inline]
2879    fn from_wire(wire: WireDestroyedPayload<'de>) -> Self {
2880        let wire = ::core::mem::ManuallyDrop::new(wire);
2881
2882        Self {}
2883    }
2884}
2885
2886impl<'de> ::fidl_next::FromWireRef<WireDestroyedPayload<'de>> for DestroyedPayload {
2887    #[inline]
2888    fn from_wire_ref(wire: &WireDestroyedPayload<'de>) -> Self {
2889        Self {}
2890    }
2891}
2892
2893/// The wire type corresponding to [`DestroyedPayload`].
2894#[repr(C)]
2895pub struct WireDestroyedPayload<'de> {
2896    table: ::fidl_next::WireTable<'de>,
2897}
2898
2899impl<'de> Drop for WireDestroyedPayload<'de> {
2900    fn drop(&mut self) {}
2901}
2902
2903unsafe impl ::fidl_next::Wire for WireDestroyedPayload<'static> {
2904    type Decoded<'de> = WireDestroyedPayload<'de>;
2905
2906    #[inline]
2907    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2908        ::fidl_next::munge!(let Self { table } = out);
2909        ::fidl_next::WireTable::zero_padding(table);
2910    }
2911}
2912
2913unsafe impl<___D> ::fidl_next::Decode<___D> for WireDestroyedPayload<'static>
2914where
2915    ___D: ::fidl_next::Decoder + ?Sized,
2916{
2917    fn decode(
2918        slot: ::fidl_next::Slot<'_, Self>,
2919        decoder: &mut ___D,
2920    ) -> Result<(), ::fidl_next::DecodeError> {
2921        ::fidl_next::munge!(let Self { table } = slot);
2922
2923        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2924            match ordinal {
2925                0 => unsafe { ::core::hint::unreachable_unchecked() },
2926
2927                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2928            }
2929        })
2930    }
2931}
2932
2933impl<'de> WireDestroyedPayload<'de> {}
2934
2935impl<'de> ::core::fmt::Debug for WireDestroyedPayload<'de> {
2936    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
2937        f.debug_struct("DestroyedPayload").finish()
2938    }
2939}
2940
2941#[doc = " Payload for DirectoryReady events\n"]
2942#[derive(Debug, Default)]
2943pub struct DirectoryReadyPayload {
2944    pub name: Option<String>,
2945
2946    pub node: Option<
2947        ::fidl_next::ClientEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
2948    >,
2949}
2950
2951impl DirectoryReadyPayload {
2952    fn __max_ordinal(&self) -> usize {
2953        if self.node.is_some() {
2954            return 2;
2955        }
2956
2957        if self.name.is_some() {
2958            return 1;
2959        }
2960
2961        0
2962    }
2963}
2964
2965impl ::fidl_next::Encodable for DirectoryReadyPayload {
2966    type Encoded = WireDirectoryReadyPayload<'static>;
2967}
2968
2969unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryReadyPayload
2970where
2971    ___E: ::fidl_next::Encoder + ?Sized,
2972
2973    ___E: ::fidl_next::fuchsia::HandleEncoder,
2974{
2975    #[inline]
2976    fn encode(
2977        mut self,
2978        encoder: &mut ___E,
2979        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2980    ) -> Result<(), ::fidl_next::EncodeError> {
2981        ::fidl_next::munge!(let WireDirectoryReadyPayload { table } = out);
2982
2983        let max_ord = self.__max_ordinal();
2984
2985        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2986        ::fidl_next::Wire::zero_padding(&mut out);
2987
2988        let mut preallocated =
2989            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2990
2991        for i in 1..=max_ord {
2992            match i {
2993                2 => {
2994                    if let Some(node) = self.node.take() {
2995                        ::fidl_next::WireEnvelope::encode_value(
2996                            node,
2997                            preallocated.encoder,
2998                            &mut out,
2999                        )?;
3000                    } else {
3001                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3002                    }
3003                }
3004
3005                1 => {
3006                    if let Some(name) = self.name.take() {
3007                        ::fidl_next::WireEnvelope::encode_value(
3008                            name,
3009                            preallocated.encoder,
3010                            &mut out,
3011                        )?;
3012                    } else {
3013                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3014                    }
3015                }
3016
3017                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3018            }
3019            unsafe {
3020                preallocated.write_next(out.assume_init_ref());
3021            }
3022        }
3023
3024        ::fidl_next::WireTable::encode_len(table, max_ord);
3025
3026        Ok(())
3027    }
3028}
3029
3030impl<'de> ::fidl_next::FromWire<WireDirectoryReadyPayload<'de>> for DirectoryReadyPayload {
3031    #[inline]
3032    fn from_wire(wire: WireDirectoryReadyPayload<'de>) -> Self {
3033        let wire = ::core::mem::ManuallyDrop::new(wire);
3034
3035        let name = wire.table.get(1);
3036
3037        let node = wire.table.get(2);
3038
3039        Self {
3040            name: name.map(|envelope| {
3041                ::fidl_next::FromWire::from_wire(unsafe {
3042                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
3043                })
3044            }),
3045
3046            node: node.map(|envelope| {
3047                ::fidl_next::FromWire::from_wire(unsafe {
3048                    envelope.read_unchecked::<::fidl_next::ClientEnd<
3049                        ::fidl_next_fuchsia_io::Node,
3050                        ::fidl_next::fuchsia::WireChannel,
3051                    >>()
3052                })
3053            }),
3054        }
3055    }
3056}
3057
3058/// The wire type corresponding to [`DirectoryReadyPayload`].
3059#[repr(C)]
3060pub struct WireDirectoryReadyPayload<'de> {
3061    table: ::fidl_next::WireTable<'de>,
3062}
3063
3064impl<'de> Drop for WireDirectoryReadyPayload<'de> {
3065    fn drop(&mut self) {
3066        let _ = self
3067            .table
3068            .get(1)
3069            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
3070
3071        let _ = self.table.get(2).map(|envelope| unsafe {
3072            envelope.read_unchecked::<::fidl_next::ClientEnd<
3073                ::fidl_next_fuchsia_io::Node,
3074                ::fidl_next::fuchsia::WireChannel,
3075            >>()
3076        });
3077    }
3078}
3079
3080unsafe impl ::fidl_next::Wire for WireDirectoryReadyPayload<'static> {
3081    type Decoded<'de> = WireDirectoryReadyPayload<'de>;
3082
3083    #[inline]
3084    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3085        ::fidl_next::munge!(let Self { table } = out);
3086        ::fidl_next::WireTable::zero_padding(table);
3087    }
3088}
3089
3090unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryReadyPayload<'static>
3091where
3092    ___D: ::fidl_next::Decoder + ?Sized,
3093
3094    ___D: ::fidl_next::fuchsia::HandleDecoder,
3095{
3096    fn decode(
3097        slot: ::fidl_next::Slot<'_, Self>,
3098        decoder: &mut ___D,
3099    ) -> Result<(), ::fidl_next::DecodeError> {
3100        ::fidl_next::munge!(let Self { table } = slot);
3101
3102        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3103            match ordinal {
3104                0 => unsafe { ::core::hint::unreachable_unchecked() },
3105
3106                1 => {
3107                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
3108                        slot.as_mut(),
3109                        decoder,
3110                    )?;
3111
3112                    let name = unsafe {
3113                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
3114                    };
3115
3116                    if name.len() > 255 {
3117                        return Err(::fidl_next::DecodeError::VectorTooLong {
3118                            size: name.len() as u64,
3119                            limit: 255,
3120                        });
3121                    }
3122
3123                    Ok(())
3124                }
3125
3126                2 => {
3127                    ::fidl_next::WireEnvelope::decode_as::<
3128                        ___D,
3129                        ::fidl_next::ClientEnd<
3130                            ::fidl_next_fuchsia_io::Node,
3131                            ::fidl_next::fuchsia::WireChannel,
3132                        >,
3133                    >(slot.as_mut(), decoder)?;
3134
3135                    Ok(())
3136                }
3137
3138                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3139            }
3140        })
3141    }
3142}
3143
3144impl<'de> WireDirectoryReadyPayload<'de> {
3145    pub fn name(&self) -> Option<&::fidl_next::WireString<'de>> {
3146        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
3147    }
3148
3149    pub fn node(
3150        &self,
3151    ) -> Option<
3152        &::fidl_next::ClientEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
3153    > {
3154        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
3155    }
3156}
3157
3158impl<'de> ::core::fmt::Debug for WireDirectoryReadyPayload<'de> {
3159    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3160        f.debug_struct("DirectoryReadyPayload")
3161            .field("name", &self.name())
3162            .field("node", &self.node())
3163            .finish()
3164    }
3165}
3166
3167#[doc = " Payload for Discovered events.\n"]
3168#[derive(Clone, Debug, Default)]
3169pub struct DiscoveredPayload {}
3170
3171impl DiscoveredPayload {
3172    fn __max_ordinal(&self) -> usize {
3173        0
3174    }
3175}
3176
3177impl ::fidl_next::Encodable for DiscoveredPayload {
3178    type Encoded = WireDiscoveredPayload<'static>;
3179}
3180
3181unsafe impl<___E> ::fidl_next::Encode<___E> for DiscoveredPayload
3182where
3183    ___E: ::fidl_next::Encoder + ?Sized,
3184{
3185    #[inline]
3186    fn encode(
3187        mut self,
3188        encoder: &mut ___E,
3189        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3190    ) -> Result<(), ::fidl_next::EncodeError> {
3191        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3192
3193        let max_ord = self.__max_ordinal();
3194
3195        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3196        ::fidl_next::Wire::zero_padding(&mut out);
3197
3198        let mut preallocated =
3199            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3200
3201        for i in 1..=max_ord {
3202            match i {
3203                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3204            }
3205            unsafe {
3206                preallocated.write_next(out.assume_init_ref());
3207            }
3208        }
3209
3210        ::fidl_next::WireTable::encode_len(table, max_ord);
3211
3212        Ok(())
3213    }
3214}
3215
3216unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DiscoveredPayload
3217where
3218    ___E: ::fidl_next::Encoder + ?Sized,
3219{
3220    #[inline]
3221    fn encode_ref(
3222        &self,
3223        encoder: &mut ___E,
3224        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3225    ) -> Result<(), ::fidl_next::EncodeError> {
3226        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3227
3228        let max_ord = self.__max_ordinal();
3229
3230        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3231        ::fidl_next::Wire::zero_padding(&mut out);
3232
3233        let mut preallocated =
3234            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3235
3236        for i in 1..=max_ord {
3237            match i {
3238                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3239            }
3240            unsafe {
3241                preallocated.write_next(out.assume_init_ref());
3242            }
3243        }
3244
3245        ::fidl_next::WireTable::encode_len(table, max_ord);
3246
3247        Ok(())
3248    }
3249}
3250
3251impl<'de> ::fidl_next::FromWire<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3252    #[inline]
3253    fn from_wire(wire: WireDiscoveredPayload<'de>) -> Self {
3254        let wire = ::core::mem::ManuallyDrop::new(wire);
3255
3256        Self {}
3257    }
3258}
3259
3260impl<'de> ::fidl_next::FromWireRef<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3261    #[inline]
3262    fn from_wire_ref(wire: &WireDiscoveredPayload<'de>) -> Self {
3263        Self {}
3264    }
3265}
3266
3267/// The wire type corresponding to [`DiscoveredPayload`].
3268#[repr(C)]
3269pub struct WireDiscoveredPayload<'de> {
3270    table: ::fidl_next::WireTable<'de>,
3271}
3272
3273impl<'de> Drop for WireDiscoveredPayload<'de> {
3274    fn drop(&mut self) {}
3275}
3276
3277unsafe impl ::fidl_next::Wire for WireDiscoveredPayload<'static> {
3278    type Decoded<'de> = WireDiscoveredPayload<'de>;
3279
3280    #[inline]
3281    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3282        ::fidl_next::munge!(let Self { table } = out);
3283        ::fidl_next::WireTable::zero_padding(table);
3284    }
3285}
3286
3287unsafe impl<___D> ::fidl_next::Decode<___D> for WireDiscoveredPayload<'static>
3288where
3289    ___D: ::fidl_next::Decoder + ?Sized,
3290{
3291    fn decode(
3292        slot: ::fidl_next::Slot<'_, Self>,
3293        decoder: &mut ___D,
3294    ) -> Result<(), ::fidl_next::DecodeError> {
3295        ::fidl_next::munge!(let Self { table } = slot);
3296
3297        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3298            match ordinal {
3299                0 => unsafe { ::core::hint::unreachable_unchecked() },
3300
3301                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3302            }
3303        })
3304    }
3305}
3306
3307impl<'de> WireDiscoveredPayload<'de> {}
3308
3309impl<'de> ::core::fmt::Debug for WireDiscoveredPayload<'de> {
3310    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3311        f.debug_struct("DiscoveredPayload").finish()
3312    }
3313}
3314
3315pub const MAX_MONIKER_LENGTH: u32 = 4096;
3316
3317#[doc = " Payload for Purged events.\n"]
3318#[derive(Clone, Debug, Default)]
3319pub struct PurgedPayload {}
3320
3321impl PurgedPayload {
3322    fn __max_ordinal(&self) -> usize {
3323        0
3324    }
3325}
3326
3327impl ::fidl_next::Encodable for PurgedPayload {
3328    type Encoded = WirePurgedPayload<'static>;
3329}
3330
3331unsafe impl<___E> ::fidl_next::Encode<___E> for PurgedPayload
3332where
3333    ___E: ::fidl_next::Encoder + ?Sized,
3334{
3335    #[inline]
3336    fn encode(
3337        mut self,
3338        encoder: &mut ___E,
3339        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3340    ) -> Result<(), ::fidl_next::EncodeError> {
3341        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3342
3343        let max_ord = self.__max_ordinal();
3344
3345        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3346        ::fidl_next::Wire::zero_padding(&mut out);
3347
3348        let mut preallocated =
3349            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3350
3351        for i in 1..=max_ord {
3352            match i {
3353                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3354            }
3355            unsafe {
3356                preallocated.write_next(out.assume_init_ref());
3357            }
3358        }
3359
3360        ::fidl_next::WireTable::encode_len(table, max_ord);
3361
3362        Ok(())
3363    }
3364}
3365
3366unsafe impl<___E> ::fidl_next::EncodeRef<___E> for PurgedPayload
3367where
3368    ___E: ::fidl_next::Encoder + ?Sized,
3369{
3370    #[inline]
3371    fn encode_ref(
3372        &self,
3373        encoder: &mut ___E,
3374        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3375    ) -> Result<(), ::fidl_next::EncodeError> {
3376        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3377
3378        let max_ord = self.__max_ordinal();
3379
3380        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3381        ::fidl_next::Wire::zero_padding(&mut out);
3382
3383        let mut preallocated =
3384            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3385
3386        for i in 1..=max_ord {
3387            match i {
3388                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3389            }
3390            unsafe {
3391                preallocated.write_next(out.assume_init_ref());
3392            }
3393        }
3394
3395        ::fidl_next::WireTable::encode_len(table, max_ord);
3396
3397        Ok(())
3398    }
3399}
3400
3401impl<'de> ::fidl_next::FromWire<WirePurgedPayload<'de>> for PurgedPayload {
3402    #[inline]
3403    fn from_wire(wire: WirePurgedPayload<'de>) -> Self {
3404        let wire = ::core::mem::ManuallyDrop::new(wire);
3405
3406        Self {}
3407    }
3408}
3409
3410impl<'de> ::fidl_next::FromWireRef<WirePurgedPayload<'de>> for PurgedPayload {
3411    #[inline]
3412    fn from_wire_ref(wire: &WirePurgedPayload<'de>) -> Self {
3413        Self {}
3414    }
3415}
3416
3417/// The wire type corresponding to [`PurgedPayload`].
3418#[repr(C)]
3419pub struct WirePurgedPayload<'de> {
3420    table: ::fidl_next::WireTable<'de>,
3421}
3422
3423impl<'de> Drop for WirePurgedPayload<'de> {
3424    fn drop(&mut self) {}
3425}
3426
3427unsafe impl ::fidl_next::Wire for WirePurgedPayload<'static> {
3428    type Decoded<'de> = WirePurgedPayload<'de>;
3429
3430    #[inline]
3431    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3432        ::fidl_next::munge!(let Self { table } = out);
3433        ::fidl_next::WireTable::zero_padding(table);
3434    }
3435}
3436
3437unsafe impl<___D> ::fidl_next::Decode<___D> for WirePurgedPayload<'static>
3438where
3439    ___D: ::fidl_next::Decoder + ?Sized,
3440{
3441    fn decode(
3442        slot: ::fidl_next::Slot<'_, Self>,
3443        decoder: &mut ___D,
3444    ) -> Result<(), ::fidl_next::DecodeError> {
3445        ::fidl_next::munge!(let Self { table } = slot);
3446
3447        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3448            match ordinal {
3449                0 => unsafe { ::core::hint::unreachable_unchecked() },
3450
3451                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3452            }
3453        })
3454    }
3455}
3456
3457impl<'de> WirePurgedPayload<'de> {}
3458
3459impl<'de> ::core::fmt::Debug for WirePurgedPayload<'de> {
3460    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3461        f.debug_struct("PurgedPayload").finish()
3462    }
3463}
3464
3465#[doc = " Payload for Resolved events.\n"]
3466#[derive(Clone, Debug, Default)]
3467pub struct ResolvedPayload {}
3468
3469impl ResolvedPayload {
3470    fn __max_ordinal(&self) -> usize {
3471        0
3472    }
3473}
3474
3475impl ::fidl_next::Encodable for ResolvedPayload {
3476    type Encoded = WireResolvedPayload<'static>;
3477}
3478
3479unsafe impl<___E> ::fidl_next::Encode<___E> for ResolvedPayload
3480where
3481    ___E: ::fidl_next::Encoder + ?Sized,
3482{
3483    #[inline]
3484    fn encode(
3485        mut self,
3486        encoder: &mut ___E,
3487        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3488    ) -> Result<(), ::fidl_next::EncodeError> {
3489        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3490
3491        let max_ord = self.__max_ordinal();
3492
3493        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3494        ::fidl_next::Wire::zero_padding(&mut out);
3495
3496        let mut preallocated =
3497            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3498
3499        for i in 1..=max_ord {
3500            match i {
3501                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3502            }
3503            unsafe {
3504                preallocated.write_next(out.assume_init_ref());
3505            }
3506        }
3507
3508        ::fidl_next::WireTable::encode_len(table, max_ord);
3509
3510        Ok(())
3511    }
3512}
3513
3514unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ResolvedPayload
3515where
3516    ___E: ::fidl_next::Encoder + ?Sized,
3517{
3518    #[inline]
3519    fn encode_ref(
3520        &self,
3521        encoder: &mut ___E,
3522        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3523    ) -> Result<(), ::fidl_next::EncodeError> {
3524        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3525
3526        let max_ord = self.__max_ordinal();
3527
3528        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3529        ::fidl_next::Wire::zero_padding(&mut out);
3530
3531        let mut preallocated =
3532            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3533
3534        for i in 1..=max_ord {
3535            match i {
3536                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3537            }
3538            unsafe {
3539                preallocated.write_next(out.assume_init_ref());
3540            }
3541        }
3542
3543        ::fidl_next::WireTable::encode_len(table, max_ord);
3544
3545        Ok(())
3546    }
3547}
3548
3549impl<'de> ::fidl_next::FromWire<WireResolvedPayload<'de>> for ResolvedPayload {
3550    #[inline]
3551    fn from_wire(wire: WireResolvedPayload<'de>) -> Self {
3552        let wire = ::core::mem::ManuallyDrop::new(wire);
3553
3554        Self {}
3555    }
3556}
3557
3558impl<'de> ::fidl_next::FromWireRef<WireResolvedPayload<'de>> for ResolvedPayload {
3559    #[inline]
3560    fn from_wire_ref(wire: &WireResolvedPayload<'de>) -> Self {
3561        Self {}
3562    }
3563}
3564
3565/// The wire type corresponding to [`ResolvedPayload`].
3566#[repr(C)]
3567pub struct WireResolvedPayload<'de> {
3568    table: ::fidl_next::WireTable<'de>,
3569}
3570
3571impl<'de> Drop for WireResolvedPayload<'de> {
3572    fn drop(&mut self) {}
3573}
3574
3575unsafe impl ::fidl_next::Wire for WireResolvedPayload<'static> {
3576    type Decoded<'de> = WireResolvedPayload<'de>;
3577
3578    #[inline]
3579    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3580        ::fidl_next::munge!(let Self { table } = out);
3581        ::fidl_next::WireTable::zero_padding(table);
3582    }
3583}
3584
3585unsafe impl<___D> ::fidl_next::Decode<___D> for WireResolvedPayload<'static>
3586where
3587    ___D: ::fidl_next::Decoder + ?Sized,
3588{
3589    fn decode(
3590        slot: ::fidl_next::Slot<'_, Self>,
3591        decoder: &mut ___D,
3592    ) -> Result<(), ::fidl_next::DecodeError> {
3593        ::fidl_next::munge!(let Self { table } = slot);
3594
3595        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3596            match ordinal {
3597                0 => unsafe { ::core::hint::unreachable_unchecked() },
3598
3599                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3600            }
3601        })
3602    }
3603}
3604
3605impl<'de> WireResolvedPayload<'de> {}
3606
3607impl<'de> ::core::fmt::Debug for WireResolvedPayload<'de> {
3608    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3609        f.debug_struct("ResolvedPayload").finish()
3610    }
3611}
3612
3613#[doc = " Payload for Started events.\n"]
3614#[derive(Clone, Debug, Default)]
3615pub struct StartedPayload {}
3616
3617impl StartedPayload {
3618    fn __max_ordinal(&self) -> usize {
3619        0
3620    }
3621}
3622
3623impl ::fidl_next::Encodable for StartedPayload {
3624    type Encoded = WireStartedPayload<'static>;
3625}
3626
3627unsafe impl<___E> ::fidl_next::Encode<___E> for StartedPayload
3628where
3629    ___E: ::fidl_next::Encoder + ?Sized,
3630{
3631    #[inline]
3632    fn encode(
3633        mut self,
3634        encoder: &mut ___E,
3635        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3636    ) -> Result<(), ::fidl_next::EncodeError> {
3637        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3638
3639        let max_ord = self.__max_ordinal();
3640
3641        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3642        ::fidl_next::Wire::zero_padding(&mut out);
3643
3644        let mut preallocated =
3645            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3646
3647        for i in 1..=max_ord {
3648            match i {
3649                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3650            }
3651            unsafe {
3652                preallocated.write_next(out.assume_init_ref());
3653            }
3654        }
3655
3656        ::fidl_next::WireTable::encode_len(table, max_ord);
3657
3658        Ok(())
3659    }
3660}
3661
3662unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StartedPayload
3663where
3664    ___E: ::fidl_next::Encoder + ?Sized,
3665{
3666    #[inline]
3667    fn encode_ref(
3668        &self,
3669        encoder: &mut ___E,
3670        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3671    ) -> Result<(), ::fidl_next::EncodeError> {
3672        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3673
3674        let max_ord = self.__max_ordinal();
3675
3676        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3677        ::fidl_next::Wire::zero_padding(&mut out);
3678
3679        let mut preallocated =
3680            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3681
3682        for i in 1..=max_ord {
3683            match i {
3684                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3685            }
3686            unsafe {
3687                preallocated.write_next(out.assume_init_ref());
3688            }
3689        }
3690
3691        ::fidl_next::WireTable::encode_len(table, max_ord);
3692
3693        Ok(())
3694    }
3695}
3696
3697impl<'de> ::fidl_next::FromWire<WireStartedPayload<'de>> for StartedPayload {
3698    #[inline]
3699    fn from_wire(wire: WireStartedPayload<'de>) -> Self {
3700        let wire = ::core::mem::ManuallyDrop::new(wire);
3701
3702        Self {}
3703    }
3704}
3705
3706impl<'de> ::fidl_next::FromWireRef<WireStartedPayload<'de>> for StartedPayload {
3707    #[inline]
3708    fn from_wire_ref(wire: &WireStartedPayload<'de>) -> Self {
3709        Self {}
3710    }
3711}
3712
3713/// The wire type corresponding to [`StartedPayload`].
3714#[repr(C)]
3715pub struct WireStartedPayload<'de> {
3716    table: ::fidl_next::WireTable<'de>,
3717}
3718
3719impl<'de> Drop for WireStartedPayload<'de> {
3720    fn drop(&mut self) {}
3721}
3722
3723unsafe impl ::fidl_next::Wire for WireStartedPayload<'static> {
3724    type Decoded<'de> = WireStartedPayload<'de>;
3725
3726    #[inline]
3727    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3728        ::fidl_next::munge!(let Self { table } = out);
3729        ::fidl_next::WireTable::zero_padding(table);
3730    }
3731}
3732
3733unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartedPayload<'static>
3734where
3735    ___D: ::fidl_next::Decoder + ?Sized,
3736{
3737    fn decode(
3738        slot: ::fidl_next::Slot<'_, Self>,
3739        decoder: &mut ___D,
3740    ) -> Result<(), ::fidl_next::DecodeError> {
3741        ::fidl_next::munge!(let Self { table } = slot);
3742
3743        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3744            match ordinal {
3745                0 => unsafe { ::core::hint::unreachable_unchecked() },
3746
3747                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3748            }
3749        })
3750    }
3751}
3752
3753impl<'de> WireStartedPayload<'de> {}
3754
3755impl<'de> ::core::fmt::Debug for WireStartedPayload<'de> {
3756    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3757        f.debug_struct("StartedPayload").finish()
3758    }
3759}
3760
3761#[doc = " Payload for Unresolved events.\n"]
3762#[derive(Clone, Debug, Default)]
3763pub struct UnresolvedPayload {}
3764
3765impl UnresolvedPayload {
3766    fn __max_ordinal(&self) -> usize {
3767        0
3768    }
3769}
3770
3771impl ::fidl_next::Encodable for UnresolvedPayload {
3772    type Encoded = WireUnresolvedPayload<'static>;
3773}
3774
3775unsafe impl<___E> ::fidl_next::Encode<___E> for UnresolvedPayload
3776where
3777    ___E: ::fidl_next::Encoder + ?Sized,
3778{
3779    #[inline]
3780    fn encode(
3781        mut self,
3782        encoder: &mut ___E,
3783        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3784    ) -> Result<(), ::fidl_next::EncodeError> {
3785        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3786
3787        let max_ord = self.__max_ordinal();
3788
3789        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3790        ::fidl_next::Wire::zero_padding(&mut out);
3791
3792        let mut preallocated =
3793            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3794
3795        for i in 1..=max_ord {
3796            match i {
3797                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3798            }
3799            unsafe {
3800                preallocated.write_next(out.assume_init_ref());
3801            }
3802        }
3803
3804        ::fidl_next::WireTable::encode_len(table, max_ord);
3805
3806        Ok(())
3807    }
3808}
3809
3810unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnresolvedPayload
3811where
3812    ___E: ::fidl_next::Encoder + ?Sized,
3813{
3814    #[inline]
3815    fn encode_ref(
3816        &self,
3817        encoder: &mut ___E,
3818        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3819    ) -> Result<(), ::fidl_next::EncodeError> {
3820        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3821
3822        let max_ord = self.__max_ordinal();
3823
3824        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3825        ::fidl_next::Wire::zero_padding(&mut out);
3826
3827        let mut preallocated =
3828            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3829
3830        for i in 1..=max_ord {
3831            match i {
3832                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3833            }
3834            unsafe {
3835                preallocated.write_next(out.assume_init_ref());
3836            }
3837        }
3838
3839        ::fidl_next::WireTable::encode_len(table, max_ord);
3840
3841        Ok(())
3842    }
3843}
3844
3845impl<'de> ::fidl_next::FromWire<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3846    #[inline]
3847    fn from_wire(wire: WireUnresolvedPayload<'de>) -> Self {
3848        let wire = ::core::mem::ManuallyDrop::new(wire);
3849
3850        Self {}
3851    }
3852}
3853
3854impl<'de> ::fidl_next::FromWireRef<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3855    #[inline]
3856    fn from_wire_ref(wire: &WireUnresolvedPayload<'de>) -> Self {
3857        Self {}
3858    }
3859}
3860
3861/// The wire type corresponding to [`UnresolvedPayload`].
3862#[repr(C)]
3863pub struct WireUnresolvedPayload<'de> {
3864    table: ::fidl_next::WireTable<'de>,
3865}
3866
3867impl<'de> Drop for WireUnresolvedPayload<'de> {
3868    fn drop(&mut self) {}
3869}
3870
3871unsafe impl ::fidl_next::Wire for WireUnresolvedPayload<'static> {
3872    type Decoded<'de> = WireUnresolvedPayload<'de>;
3873
3874    #[inline]
3875    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3876        ::fidl_next::munge!(let Self { table } = out);
3877        ::fidl_next::WireTable::zero_padding(table);
3878    }
3879}
3880
3881unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnresolvedPayload<'static>
3882where
3883    ___D: ::fidl_next::Decoder + ?Sized,
3884{
3885    fn decode(
3886        slot: ::fidl_next::Slot<'_, Self>,
3887        decoder: &mut ___D,
3888    ) -> Result<(), ::fidl_next::DecodeError> {
3889        ::fidl_next::munge!(let Self { table } = slot);
3890
3891        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3892            match ordinal {
3893                0 => unsafe { ::core::hint::unreachable_unchecked() },
3894
3895                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3896            }
3897        })
3898    }
3899}
3900
3901impl<'de> WireUnresolvedPayload<'de> {}
3902
3903impl<'de> ::core::fmt::Debug for WireUnresolvedPayload<'de> {
3904    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3905        f.debug_struct("UnresolvedPayload").finish()
3906    }
3907}
3908
3909#[doc = " Payload for Stopped events.\n"]
3910#[derive(Clone, Debug, Default)]
3911pub struct StoppedPayload {
3912    pub status: Option<i32>,
3913
3914    pub exit_code: Option<i64>,
3915}
3916
3917impl StoppedPayload {
3918    fn __max_ordinal(&self) -> usize {
3919        if self.exit_code.is_some() {
3920            return 2;
3921        }
3922
3923        if self.status.is_some() {
3924            return 1;
3925        }
3926
3927        0
3928    }
3929}
3930
3931impl ::fidl_next::Encodable for StoppedPayload {
3932    type Encoded = WireStoppedPayload<'static>;
3933}
3934
3935unsafe impl<___E> ::fidl_next::Encode<___E> for StoppedPayload
3936where
3937    ___E: ::fidl_next::Encoder + ?Sized,
3938{
3939    #[inline]
3940    fn encode(
3941        mut self,
3942        encoder: &mut ___E,
3943        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3944    ) -> Result<(), ::fidl_next::EncodeError> {
3945        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
3946
3947        let max_ord = self.__max_ordinal();
3948
3949        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3950        ::fidl_next::Wire::zero_padding(&mut out);
3951
3952        let mut preallocated =
3953            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3954
3955        for i in 1..=max_ord {
3956            match i {
3957                2 => {
3958                    if let Some(exit_code) = self.exit_code.take() {
3959                        ::fidl_next::WireEnvelope::encode_value(
3960                            exit_code,
3961                            preallocated.encoder,
3962                            &mut out,
3963                        )?;
3964                    } else {
3965                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3966                    }
3967                }
3968
3969                1 => {
3970                    if let Some(status) = self.status.take() {
3971                        ::fidl_next::WireEnvelope::encode_value(
3972                            status,
3973                            preallocated.encoder,
3974                            &mut out,
3975                        )?;
3976                    } else {
3977                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
3978                    }
3979                }
3980
3981                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3982            }
3983            unsafe {
3984                preallocated.write_next(out.assume_init_ref());
3985            }
3986        }
3987
3988        ::fidl_next::WireTable::encode_len(table, max_ord);
3989
3990        Ok(())
3991    }
3992}
3993
3994unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StoppedPayload
3995where
3996    ___E: ::fidl_next::Encoder + ?Sized,
3997{
3998    #[inline]
3999    fn encode_ref(
4000        &self,
4001        encoder: &mut ___E,
4002        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4003    ) -> Result<(), ::fidl_next::EncodeError> {
4004        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
4005
4006        let max_ord = self.__max_ordinal();
4007
4008        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4009        ::fidl_next::Wire::zero_padding(&mut out);
4010
4011        let mut preallocated =
4012            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4013
4014        for i in 1..=max_ord {
4015            match i {
4016                2 => {
4017                    if let Some(exit_code) = &self.exit_code {
4018                        ::fidl_next::WireEnvelope::encode_value(
4019                            exit_code,
4020                            preallocated.encoder,
4021                            &mut out,
4022                        )?;
4023                    } else {
4024                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4025                    }
4026                }
4027
4028                1 => {
4029                    if let Some(status) = &self.status {
4030                        ::fidl_next::WireEnvelope::encode_value(
4031                            status,
4032                            preallocated.encoder,
4033                            &mut out,
4034                        )?;
4035                    } else {
4036                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4037                    }
4038                }
4039
4040                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4041            }
4042            unsafe {
4043                preallocated.write_next(out.assume_init_ref());
4044            }
4045        }
4046
4047        ::fidl_next::WireTable::encode_len(table, max_ord);
4048
4049        Ok(())
4050    }
4051}
4052
4053impl<'de> ::fidl_next::FromWire<WireStoppedPayload<'de>> for StoppedPayload {
4054    #[inline]
4055    fn from_wire(wire: WireStoppedPayload<'de>) -> Self {
4056        let wire = ::core::mem::ManuallyDrop::new(wire);
4057
4058        let status = wire.table.get(1);
4059
4060        let exit_code = wire.table.get(2);
4061
4062        Self {
4063            status: status.map(|envelope| {
4064                ::fidl_next::FromWire::from_wire(unsafe {
4065                    envelope.read_unchecked::<::fidl_next::WireI32>()
4066                })
4067            }),
4068
4069            exit_code: exit_code.map(|envelope| {
4070                ::fidl_next::FromWire::from_wire(unsafe {
4071                    envelope.read_unchecked::<::fidl_next::WireI64>()
4072                })
4073            }),
4074        }
4075    }
4076}
4077
4078impl<'de> ::fidl_next::FromWireRef<WireStoppedPayload<'de>> for StoppedPayload {
4079    #[inline]
4080    fn from_wire_ref(wire: &WireStoppedPayload<'de>) -> Self {
4081        Self {
4082            status: wire.table.get(1).map(|envelope| {
4083                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4084                    envelope.deref_unchecked::<::fidl_next::WireI32>()
4085                })
4086            }),
4087
4088            exit_code: wire.table.get(2).map(|envelope| {
4089                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4090                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4091                })
4092            }),
4093        }
4094    }
4095}
4096
4097/// The wire type corresponding to [`StoppedPayload`].
4098#[repr(C)]
4099pub struct WireStoppedPayload<'de> {
4100    table: ::fidl_next::WireTable<'de>,
4101}
4102
4103impl<'de> Drop for WireStoppedPayload<'de> {
4104    fn drop(&mut self) {
4105        let _ = self
4106            .table
4107            .get(1)
4108            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
4109
4110        let _ = self
4111            .table
4112            .get(2)
4113            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4114    }
4115}
4116
4117unsafe impl ::fidl_next::Wire for WireStoppedPayload<'static> {
4118    type Decoded<'de> = WireStoppedPayload<'de>;
4119
4120    #[inline]
4121    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4122        ::fidl_next::munge!(let Self { table } = out);
4123        ::fidl_next::WireTable::zero_padding(table);
4124    }
4125}
4126
4127unsafe impl<___D> ::fidl_next::Decode<___D> for WireStoppedPayload<'static>
4128where
4129    ___D: ::fidl_next::Decoder + ?Sized,
4130{
4131    fn decode(
4132        slot: ::fidl_next::Slot<'_, Self>,
4133        decoder: &mut ___D,
4134    ) -> Result<(), ::fidl_next::DecodeError> {
4135        ::fidl_next::munge!(let Self { table } = slot);
4136
4137        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4138            match ordinal {
4139                0 => unsafe { ::core::hint::unreachable_unchecked() },
4140
4141                1 => {
4142                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
4143                        slot.as_mut(),
4144                        decoder,
4145                    )?;
4146
4147                    Ok(())
4148                }
4149
4150                2 => {
4151                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4152                        slot.as_mut(),
4153                        decoder,
4154                    )?;
4155
4156                    Ok(())
4157                }
4158
4159                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4160            }
4161        })
4162    }
4163}
4164
4165impl<'de> WireStoppedPayload<'de> {
4166    pub fn status(&self) -> Option<&::fidl_next::WireI32> {
4167        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4168    }
4169
4170    pub fn exit_code(&self) -> Option<&::fidl_next::WireI64> {
4171        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4172    }
4173}
4174
4175impl<'de> ::core::fmt::Debug for WireStoppedPayload<'de> {
4176    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
4177        f.debug_struct("StoppedPayload")
4178            .field("status", &self.status())
4179            .field("exit_code", &self.exit_code())
4180            .finish()
4181    }
4182}
4183
4184#[doc = " These EventTypes are used for the EventStream protocol.\n They are FIDL versions of the EventType enum in hooks.rs and have\n the same meaning.\n"]
4185#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4186#[repr(u32)]
4187pub enum EventType {
4188    CapabilityRequested = 1,
4189    DirectoryReady = 2,
4190    Discovered = 3,
4191    Destroyed = 4,
4192    Resolved = 5,
4193    Started = 6,
4194    Stopped = 7,
4195    DebugStarted = 8,
4196    Unresolved = 9,
4197}
4198
4199impl ::fidl_next::Encodable for EventType {
4200    type Encoded = WireEventType;
4201}
4202impl ::std::convert::TryFrom<u32> for EventType {
4203    type Error = ::fidl_next::UnknownStrictEnumMemberError;
4204    fn try_from(value: u32) -> Result<Self, Self::Error> {
4205        match value {
4206            1 => Ok(Self::CapabilityRequested),
4207            2 => Ok(Self::DirectoryReady),
4208            3 => Ok(Self::Discovered),
4209            4 => Ok(Self::Destroyed),
4210            5 => Ok(Self::Resolved),
4211            6 => Ok(Self::Started),
4212            7 => Ok(Self::Stopped),
4213            8 => Ok(Self::DebugStarted),
4214            9 => Ok(Self::Unresolved),
4215
4216            _ => Err(Self::Error::new(value.into())),
4217        }
4218    }
4219}
4220
4221unsafe impl<___E> ::fidl_next::Encode<___E> for EventType
4222where
4223    ___E: ?Sized,
4224{
4225    #[inline]
4226    fn encode(
4227        self,
4228        encoder: &mut ___E,
4229        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4230    ) -> Result<(), ::fidl_next::EncodeError> {
4231        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
4232    }
4233}
4234
4235unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventType
4236where
4237    ___E: ?Sized,
4238{
4239    #[inline]
4240    fn encode_ref(
4241        &self,
4242        encoder: &mut ___E,
4243        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4244    ) -> Result<(), ::fidl_next::EncodeError> {
4245        ::fidl_next::munge!(let WireEventType { value } = out);
4246        let _ = value.write(::fidl_next::WireU32::from(match *self {
4247            Self::CapabilityRequested => 1,
4248
4249            Self::DirectoryReady => 2,
4250
4251            Self::Discovered => 3,
4252
4253            Self::Destroyed => 4,
4254
4255            Self::Resolved => 5,
4256
4257            Self::Started => 6,
4258
4259            Self::Stopped => 7,
4260
4261            Self::DebugStarted => 8,
4262
4263            Self::Unresolved => 9,
4264        }));
4265
4266        Ok(())
4267    }
4268}
4269
4270impl ::core::convert::From<WireEventType> for EventType {
4271    fn from(wire: WireEventType) -> Self {
4272        match u32::from(wire.value) {
4273            1 => Self::CapabilityRequested,
4274
4275            2 => Self::DirectoryReady,
4276
4277            3 => Self::Discovered,
4278
4279            4 => Self::Destroyed,
4280
4281            5 => Self::Resolved,
4282
4283            6 => Self::Started,
4284
4285            7 => Self::Stopped,
4286
4287            8 => Self::DebugStarted,
4288
4289            9 => Self::Unresolved,
4290
4291            _ => unsafe { ::core::hint::unreachable_unchecked() },
4292        }
4293    }
4294}
4295
4296impl ::fidl_next::FromWire<WireEventType> for EventType {
4297    #[inline]
4298    fn from_wire(wire: WireEventType) -> Self {
4299        Self::from(wire)
4300    }
4301}
4302
4303impl ::fidl_next::FromWireRef<WireEventType> for EventType {
4304    #[inline]
4305    fn from_wire_ref(wire: &WireEventType) -> Self {
4306        Self::from(*wire)
4307    }
4308}
4309
4310/// The wire type corresponding to [`EventType`].
4311#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4312#[repr(transparent)]
4313pub struct WireEventType {
4314    value: ::fidl_next::WireU32,
4315}
4316
4317unsafe impl ::fidl_next::Wire for WireEventType {
4318    type Decoded<'de> = Self;
4319
4320    #[inline]
4321    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4322        // Wire enums have no padding
4323    }
4324}
4325
4326impl WireEventType {
4327    pub const CAPABILITY_REQUESTED: WireEventType =
4328        WireEventType { value: ::fidl_next::WireU32(1) };
4329
4330    pub const DIRECTORY_READY: WireEventType = WireEventType { value: ::fidl_next::WireU32(2) };
4331
4332    pub const DISCOVERED: WireEventType = WireEventType { value: ::fidl_next::WireU32(3) };
4333
4334    pub const DESTROYED: WireEventType = WireEventType { value: ::fidl_next::WireU32(4) };
4335
4336    pub const RESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(5) };
4337
4338    pub const STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(6) };
4339
4340    pub const STOPPED: WireEventType = WireEventType { value: ::fidl_next::WireU32(7) };
4341
4342    pub const DEBUG_STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(8) };
4343
4344    pub const UNRESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(9) };
4345}
4346
4347unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventType
4348where
4349    ___D: ?Sized,
4350{
4351    fn decode(
4352        slot: ::fidl_next::Slot<'_, Self>,
4353        _: &mut ___D,
4354    ) -> Result<(), ::fidl_next::DecodeError> {
4355        ::fidl_next::munge!(let Self { value } = slot);
4356
4357        match u32::from(*value) {
4358            1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 => (),
4359            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
4360        }
4361
4362        Ok(())
4363    }
4364}
4365
4366impl ::core::convert::From<EventType> for WireEventType {
4367    fn from(natural: EventType) -> Self {
4368        match natural {
4369            EventType::CapabilityRequested => WireEventType::CAPABILITY_REQUESTED,
4370
4371            EventType::DirectoryReady => WireEventType::DIRECTORY_READY,
4372
4373            EventType::Discovered => WireEventType::DISCOVERED,
4374
4375            EventType::Destroyed => WireEventType::DESTROYED,
4376
4377            EventType::Resolved => WireEventType::RESOLVED,
4378
4379            EventType::Started => WireEventType::STARTED,
4380
4381            EventType::Stopped => WireEventType::STOPPED,
4382
4383            EventType::DebugStarted => WireEventType::DEBUG_STARTED,
4384
4385            EventType::Unresolved => WireEventType::UNRESOLVED,
4386        }
4387    }
4388}
4389
4390#[doc = " A head providing metadata about a target component instance.\n"]
4391#[derive(Clone, Debug, Default)]
4392pub struct EventHeader {
4393    pub event_type: Option<crate::EventType>,
4394
4395    pub moniker: Option<String>,
4396
4397    pub component_url: Option<String>,
4398
4399    pub timestamp: Option<i64>,
4400}
4401
4402impl EventHeader {
4403    fn __max_ordinal(&self) -> usize {
4404        if self.timestamp.is_some() {
4405            return 4;
4406        }
4407
4408        if self.component_url.is_some() {
4409            return 3;
4410        }
4411
4412        if self.moniker.is_some() {
4413            return 2;
4414        }
4415
4416        if self.event_type.is_some() {
4417            return 1;
4418        }
4419
4420        0
4421    }
4422}
4423
4424impl ::fidl_next::Encodable for EventHeader {
4425    type Encoded = WireEventHeader<'static>;
4426}
4427
4428unsafe impl<___E> ::fidl_next::Encode<___E> for EventHeader
4429where
4430    ___E: ::fidl_next::Encoder + ?Sized,
4431{
4432    #[inline]
4433    fn encode(
4434        mut self,
4435        encoder: &mut ___E,
4436        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4437    ) -> Result<(), ::fidl_next::EncodeError> {
4438        ::fidl_next::munge!(let WireEventHeader { table } = out);
4439
4440        let max_ord = self.__max_ordinal();
4441
4442        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4443        ::fidl_next::Wire::zero_padding(&mut out);
4444
4445        let mut preallocated =
4446            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4447
4448        for i in 1..=max_ord {
4449            match i {
4450                4 => {
4451                    if let Some(timestamp) = self.timestamp.take() {
4452                        ::fidl_next::WireEnvelope::encode_value(
4453                            timestamp,
4454                            preallocated.encoder,
4455                            &mut out,
4456                        )?;
4457                    } else {
4458                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4459                    }
4460                }
4461
4462                3 => {
4463                    if let Some(component_url) = self.component_url.take() {
4464                        ::fidl_next::WireEnvelope::encode_value(
4465                            component_url,
4466                            preallocated.encoder,
4467                            &mut out,
4468                        )?;
4469                    } else {
4470                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4471                    }
4472                }
4473
4474                2 => {
4475                    if let Some(moniker) = self.moniker.take() {
4476                        ::fidl_next::WireEnvelope::encode_value(
4477                            moniker,
4478                            preallocated.encoder,
4479                            &mut out,
4480                        )?;
4481                    } else {
4482                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4483                    }
4484                }
4485
4486                1 => {
4487                    if let Some(event_type) = self.event_type.take() {
4488                        ::fidl_next::WireEnvelope::encode_value(
4489                            event_type,
4490                            preallocated.encoder,
4491                            &mut out,
4492                        )?;
4493                    } else {
4494                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4495                    }
4496                }
4497
4498                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4499            }
4500            unsafe {
4501                preallocated.write_next(out.assume_init_ref());
4502            }
4503        }
4504
4505        ::fidl_next::WireTable::encode_len(table, max_ord);
4506
4507        Ok(())
4508    }
4509}
4510
4511unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventHeader
4512where
4513    ___E: ::fidl_next::Encoder + ?Sized,
4514{
4515    #[inline]
4516    fn encode_ref(
4517        &self,
4518        encoder: &mut ___E,
4519        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4520    ) -> Result<(), ::fidl_next::EncodeError> {
4521        ::fidl_next::munge!(let WireEventHeader { table } = out);
4522
4523        let max_ord = self.__max_ordinal();
4524
4525        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4526        ::fidl_next::Wire::zero_padding(&mut out);
4527
4528        let mut preallocated =
4529            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4530
4531        for i in 1..=max_ord {
4532            match i {
4533                4 => {
4534                    if let Some(timestamp) = &self.timestamp {
4535                        ::fidl_next::WireEnvelope::encode_value(
4536                            timestamp,
4537                            preallocated.encoder,
4538                            &mut out,
4539                        )?;
4540                    } else {
4541                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4542                    }
4543                }
4544
4545                3 => {
4546                    if let Some(component_url) = &self.component_url {
4547                        ::fidl_next::WireEnvelope::encode_value(
4548                            component_url,
4549                            preallocated.encoder,
4550                            &mut out,
4551                        )?;
4552                    } else {
4553                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4554                    }
4555                }
4556
4557                2 => {
4558                    if let Some(moniker) = &self.moniker {
4559                        ::fidl_next::WireEnvelope::encode_value(
4560                            moniker,
4561                            preallocated.encoder,
4562                            &mut out,
4563                        )?;
4564                    } else {
4565                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4566                    }
4567                }
4568
4569                1 => {
4570                    if let Some(event_type) = &self.event_type {
4571                        ::fidl_next::WireEnvelope::encode_value(
4572                            event_type,
4573                            preallocated.encoder,
4574                            &mut out,
4575                        )?;
4576                    } else {
4577                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4578                    }
4579                }
4580
4581                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4582            }
4583            unsafe {
4584                preallocated.write_next(out.assume_init_ref());
4585            }
4586        }
4587
4588        ::fidl_next::WireTable::encode_len(table, max_ord);
4589
4590        Ok(())
4591    }
4592}
4593
4594impl<'de> ::fidl_next::FromWire<WireEventHeader<'de>> for EventHeader {
4595    #[inline]
4596    fn from_wire(wire: WireEventHeader<'de>) -> Self {
4597        let wire = ::core::mem::ManuallyDrop::new(wire);
4598
4599        let event_type = wire.table.get(1);
4600
4601        let moniker = wire.table.get(2);
4602
4603        let component_url = wire.table.get(3);
4604
4605        let timestamp = wire.table.get(4);
4606
4607        Self {
4608            event_type: event_type.map(|envelope| {
4609                ::fidl_next::FromWire::from_wire(unsafe {
4610                    envelope.read_unchecked::<crate::WireEventType>()
4611                })
4612            }),
4613
4614            moniker: moniker.map(|envelope| {
4615                ::fidl_next::FromWire::from_wire(unsafe {
4616                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4617                })
4618            }),
4619
4620            component_url: component_url.map(|envelope| {
4621                ::fidl_next::FromWire::from_wire(unsafe {
4622                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4623                })
4624            }),
4625
4626            timestamp: timestamp.map(|envelope| {
4627                ::fidl_next::FromWire::from_wire(unsafe {
4628                    envelope.read_unchecked::<::fidl_next::WireI64>()
4629                })
4630            }),
4631        }
4632    }
4633}
4634
4635impl<'de> ::fidl_next::FromWireRef<WireEventHeader<'de>> for EventHeader {
4636    #[inline]
4637    fn from_wire_ref(wire: &WireEventHeader<'de>) -> Self {
4638        Self {
4639            event_type: wire.table.get(1).map(|envelope| {
4640                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4641                    envelope.deref_unchecked::<crate::WireEventType>()
4642                })
4643            }),
4644
4645            moniker: wire.table.get(2).map(|envelope| {
4646                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4647                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4648                })
4649            }),
4650
4651            component_url: wire.table.get(3).map(|envelope| {
4652                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4653                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4654                })
4655            }),
4656
4657            timestamp: wire.table.get(4).map(|envelope| {
4658                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4659                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4660                })
4661            }),
4662        }
4663    }
4664}
4665
4666/// The wire type corresponding to [`EventHeader`].
4667#[repr(C)]
4668pub struct WireEventHeader<'de> {
4669    table: ::fidl_next::WireTable<'de>,
4670}
4671
4672impl<'de> Drop for WireEventHeader<'de> {
4673    fn drop(&mut self) {
4674        let _ = self
4675            .table
4676            .get(1)
4677            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventType>() });
4678
4679        let _ = self
4680            .table
4681            .get(2)
4682            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4683
4684        let _ = self
4685            .table
4686            .get(3)
4687            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4688
4689        let _ = self
4690            .table
4691            .get(4)
4692            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4693    }
4694}
4695
4696unsafe impl ::fidl_next::Wire for WireEventHeader<'static> {
4697    type Decoded<'de> = WireEventHeader<'de>;
4698
4699    #[inline]
4700    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4701        ::fidl_next::munge!(let Self { table } = out);
4702        ::fidl_next::WireTable::zero_padding(table);
4703    }
4704}
4705
4706unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventHeader<'static>
4707where
4708    ___D: ::fidl_next::Decoder + ?Sized,
4709{
4710    fn decode(
4711        slot: ::fidl_next::Slot<'_, Self>,
4712        decoder: &mut ___D,
4713    ) -> Result<(), ::fidl_next::DecodeError> {
4714        ::fidl_next::munge!(let Self { table } = slot);
4715
4716        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4717            match ordinal {
4718                0 => unsafe { ::core::hint::unreachable_unchecked() },
4719
4720                1 => {
4721                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventType>(
4722                        slot.as_mut(),
4723                        decoder,
4724                    )?;
4725
4726                    Ok(())
4727                }
4728
4729                2 => {
4730                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4731                        slot.as_mut(),
4732                        decoder,
4733                    )?;
4734
4735                    let moniker = unsafe {
4736                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4737                    };
4738
4739                    if moniker.len() > 4096 {
4740                        return Err(::fidl_next::DecodeError::VectorTooLong {
4741                            size: moniker.len() as u64,
4742                            limit: 4096,
4743                        });
4744                    }
4745
4746                    Ok(())
4747                }
4748
4749                3 => {
4750                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4751                        slot.as_mut(),
4752                        decoder,
4753                    )?;
4754
4755                    let component_url = unsafe {
4756                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4757                    };
4758
4759                    if component_url.len() > 4096 {
4760                        return Err(::fidl_next::DecodeError::VectorTooLong {
4761                            size: component_url.len() as u64,
4762                            limit: 4096,
4763                        });
4764                    }
4765
4766                    Ok(())
4767                }
4768
4769                4 => {
4770                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4771                        slot.as_mut(),
4772                        decoder,
4773                    )?;
4774
4775                    Ok(())
4776                }
4777
4778                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4779            }
4780        })
4781    }
4782}
4783
4784impl<'de> WireEventHeader<'de> {
4785    pub fn event_type(&self) -> Option<&crate::WireEventType> {
4786        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4787    }
4788
4789    pub fn moniker(&self) -> Option<&::fidl_next::WireString<'de>> {
4790        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4791    }
4792
4793    pub fn component_url(&self) -> Option<&::fidl_next::WireString<'de>> {
4794        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
4795    }
4796
4797    pub fn timestamp(&self) -> Option<&::fidl_next::WireI64> {
4798        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
4799    }
4800}
4801
4802impl<'de> ::core::fmt::Debug for WireEventHeader<'de> {
4803    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
4804        f.debug_struct("EventHeader")
4805            .field("event_type", &self.event_type())
4806            .field("moniker", &self.moniker())
4807            .field("component_url", &self.component_url())
4808            .field("timestamp", &self.timestamp())
4809            .finish()
4810    }
4811}
4812
4813#[doc = " Encapsulates additional data/protocols for some event types.\n"]
4814#[derive(Debug)]
4815pub enum EventPayload {
4816    CapabilityRequested(crate::CapabilityRequestedPayload),
4817
4818    Purged(crate::PurgedPayload),
4819
4820    DirectoryReady(crate::DirectoryReadyPayload),
4821
4822    Discovered(crate::DiscoveredPayload),
4823
4824    Destroyed(crate::DestroyedPayload),
4825
4826    Resolved(crate::ResolvedPayload),
4827
4828    Started(crate::StartedPayload),
4829
4830    Stopped(crate::StoppedPayload),
4831
4832    DebugStarted(crate::DebugStartedPayload),
4833
4834    Unresolved(crate::UnresolvedPayload),
4835
4836    UnknownOrdinal_(u64),
4837}
4838
4839impl ::fidl_next::Encodable for EventPayload {
4840    type Encoded = WireEventPayload<'static>;
4841}
4842
4843unsafe impl<___E> ::fidl_next::Encode<___E> for EventPayload
4844where
4845    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4846
4847    ___E: ::fidl_next::Encoder,
4848
4849    ___E: ::fidl_next::fuchsia::HandleEncoder,
4850{
4851    #[inline]
4852    fn encode(
4853        self,
4854        encoder: &mut ___E,
4855        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4856    ) -> Result<(), ::fidl_next::EncodeError> {
4857        ::fidl_next::munge!(let WireEventPayload { raw, _phantom: _ } = out);
4858
4859        match self {
4860            Self::CapabilityRequested(value) => ::fidl_next::RawWireUnion::encode_as::<
4861                ___E,
4862                crate::CapabilityRequestedPayload,
4863            >(value, 1, encoder, raw)?,
4864
4865            Self::Purged(value) => ::fidl_next::RawWireUnion::encode_as::<
4866                ___E,
4867                crate::PurgedPayload,
4868            >(value, 2, encoder, raw)?,
4869
4870            Self::DirectoryReady(value) => ::fidl_next::RawWireUnion::encode_as::<
4871                ___E,
4872                crate::DirectoryReadyPayload,
4873            >(value, 3, encoder, raw)?,
4874
4875            Self::Discovered(value) => ::fidl_next::RawWireUnion::encode_as::<
4876                ___E,
4877                crate::DiscoveredPayload,
4878            >(value, 4, encoder, raw)?,
4879
4880            Self::Destroyed(value) => ::fidl_next::RawWireUnion::encode_as::<
4881                ___E,
4882                crate::DestroyedPayload,
4883            >(value, 5, encoder, raw)?,
4884
4885            Self::Resolved(value) => ::fidl_next::RawWireUnion::encode_as::<
4886                ___E,
4887                crate::ResolvedPayload,
4888            >(value, 6, encoder, raw)?,
4889
4890            Self::Started(value) => ::fidl_next::RawWireUnion::encode_as::<
4891                ___E,
4892                crate::StartedPayload,
4893            >(value, 7, encoder, raw)?,
4894
4895            Self::Stopped(value) => ::fidl_next::RawWireUnion::encode_as::<
4896                ___E,
4897                crate::StoppedPayload,
4898            >(value, 8, encoder, raw)?,
4899
4900            Self::DebugStarted(value) => ::fidl_next::RawWireUnion::encode_as::<
4901                ___E,
4902                crate::DebugStartedPayload,
4903            >(value, 9, encoder, raw)?,
4904
4905            Self::Unresolved(value) => ::fidl_next::RawWireUnion::encode_as::<
4906                ___E,
4907                crate::UnresolvedPayload,
4908            >(value, 10, encoder, raw)?,
4909
4910            Self::UnknownOrdinal_(ordinal) => {
4911                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize))
4912            }
4913        }
4914
4915        Ok(())
4916    }
4917}
4918
4919impl ::fidl_next::EncodableOption for EventPayload {
4920    type EncodedOption = WireOptionalEventPayload<'static>;
4921}
4922
4923unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventPayload
4924where
4925    ___E: ?Sized,
4926    EventPayload: ::fidl_next::Encode<___E>,
4927{
4928    #[inline]
4929    fn encode_option(
4930        this: Option<Self>,
4931        encoder: &mut ___E,
4932        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4933    ) -> Result<(), ::fidl_next::EncodeError> {
4934        ::fidl_next::munge!(let WireOptionalEventPayload { raw, _phantom: _ } = &mut *out);
4935
4936        if let Some(inner) = this {
4937            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4938            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
4939        } else {
4940            ::fidl_next::RawWireUnion::encode_absent(raw);
4941        }
4942
4943        Ok(())
4944    }
4945}
4946
4947impl<'de> ::fidl_next::FromWire<WireEventPayload<'de>> for EventPayload {
4948    #[inline]
4949    fn from_wire(wire: WireEventPayload<'de>) -> Self {
4950        let wire = ::core::mem::ManuallyDrop::new(wire);
4951        match wire.raw.ordinal() {
4952            1 => Self::CapabilityRequested(::fidl_next::FromWire::from_wire(unsafe {
4953                wire.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
4954            })),
4955
4956            2 => Self::Purged(::fidl_next::FromWire::from_wire(unsafe {
4957                wire.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>()
4958            })),
4959
4960            3 => Self::DirectoryReady(::fidl_next::FromWire::from_wire(unsafe {
4961                wire.raw.get().read_unchecked::<crate::WireDirectoryReadyPayload<'de>>()
4962            })),
4963
4964            4 => Self::Discovered(::fidl_next::FromWire::from_wire(unsafe {
4965                wire.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>()
4966            })),
4967
4968            5 => Self::Destroyed(::fidl_next::FromWire::from_wire(unsafe {
4969                wire.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>()
4970            })),
4971
4972            6 => Self::Resolved(::fidl_next::FromWire::from_wire(unsafe {
4973                wire.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>()
4974            })),
4975
4976            7 => Self::Started(::fidl_next::FromWire::from_wire(unsafe {
4977                wire.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>()
4978            })),
4979
4980            8 => Self::Stopped(::fidl_next::FromWire::from_wire(unsafe {
4981                wire.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>()
4982            })),
4983
4984            9 => Self::DebugStarted(::fidl_next::FromWire::from_wire(unsafe {
4985                wire.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
4986            })),
4987
4988            10 => Self::Unresolved(::fidl_next::FromWire::from_wire(unsafe {
4989                wire.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>()
4990            })),
4991
4992            _ => unsafe { ::core::hint::unreachable_unchecked() },
4993        }
4994    }
4995}
4996
4997impl<'de> ::fidl_next::FromWireOption<WireOptionalEventPayload<'de>> for Box<EventPayload> {
4998    #[inline]
4999    fn from_wire_option(wire: WireOptionalEventPayload<'de>) -> Option<Self> {
5000        if let Some(inner) = wire.into_option() {
5001            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
5002        } else {
5003            None
5004        }
5005    }
5006}
5007
5008/// The wire type corresponding to [`EventPayload`].
5009#[repr(transparent)]
5010pub struct WireEventPayload<'de> {
5011    raw: ::fidl_next::RawWireUnion,
5012    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5013}
5014
5015impl<'de> Drop for WireEventPayload<'de> {
5016    fn drop(&mut self) {
5017        match self.raw.ordinal() {
5018            1 => {
5019                let _ = unsafe {
5020                    self.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
5021                };
5022            }
5023
5024            2 => {
5025                let _ = unsafe { self.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>() };
5026            }
5027
5028            3 => {
5029                let _ = unsafe {
5030                    self.raw.get().read_unchecked::<crate::WireDirectoryReadyPayload<'de>>()
5031                };
5032            }
5033
5034            4 => {
5035                let _ =
5036                    unsafe { self.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>() };
5037            }
5038
5039            5 => {
5040                let _ =
5041                    unsafe { self.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>() };
5042            }
5043
5044            6 => {
5045                let _ =
5046                    unsafe { self.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>() };
5047            }
5048
5049            7 => {
5050                let _ =
5051                    unsafe { self.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>() };
5052            }
5053
5054            8 => {
5055                let _ =
5056                    unsafe { self.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>() };
5057            }
5058
5059            9 => {
5060                let _ = unsafe {
5061                    self.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
5062                };
5063            }
5064
5065            10 => {
5066                let _ =
5067                    unsafe { self.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>() };
5068            }
5069
5070            _ => (),
5071        }
5072    }
5073}
5074
5075unsafe impl ::fidl_next::Wire for WireEventPayload<'static> {
5076    type Decoded<'de> = WireEventPayload<'de>;
5077
5078    #[inline]
5079    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5080        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5081        ::fidl_next::RawWireUnion::zero_padding(raw);
5082    }
5083}
5084
5085pub mod event_payload {
5086    pub enum Ref<'de> {
5087        CapabilityRequested(&'de crate::WireCapabilityRequestedPayload<'de>),
5088
5089        Purged(&'de crate::WirePurgedPayload<'de>),
5090
5091        DirectoryReady(&'de crate::WireDirectoryReadyPayload<'de>),
5092
5093        Discovered(&'de crate::WireDiscoveredPayload<'de>),
5094
5095        Destroyed(&'de crate::WireDestroyedPayload<'de>),
5096
5097        Resolved(&'de crate::WireResolvedPayload<'de>),
5098
5099        Started(&'de crate::WireStartedPayload<'de>),
5100
5101        Stopped(&'de crate::WireStoppedPayload<'de>),
5102
5103        DebugStarted(&'de crate::WireDebugStartedPayload<'de>),
5104
5105        Unresolved(&'de crate::WireUnresolvedPayload<'de>),
5106
5107        UnknownOrdinal_(u64),
5108    }
5109}
5110
5111impl<'de> WireEventPayload<'de> {
5112    pub fn as_ref(&self) -> crate::event_payload::Ref<'_> {
5113        match self.raw.ordinal() {
5114            1 => crate::event_payload::Ref::CapabilityRequested(unsafe {
5115                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>()
5116            }),
5117
5118            2 => crate::event_payload::Ref::Purged(unsafe {
5119                self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>()
5120            }),
5121
5122            3 => crate::event_payload::Ref::DirectoryReady(unsafe {
5123                self.raw.get().deref_unchecked::<crate::WireDirectoryReadyPayload<'_>>()
5124            }),
5125
5126            4 => crate::event_payload::Ref::Discovered(unsafe {
5127                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>()
5128            }),
5129
5130            5 => crate::event_payload::Ref::Destroyed(unsafe {
5131                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>()
5132            }),
5133
5134            6 => crate::event_payload::Ref::Resolved(unsafe {
5135                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>()
5136            }),
5137
5138            7 => crate::event_payload::Ref::Started(unsafe {
5139                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>()
5140            }),
5141
5142            8 => crate::event_payload::Ref::Stopped(unsafe {
5143                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>()
5144            }),
5145
5146            9 => crate::event_payload::Ref::DebugStarted(unsafe {
5147                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>()
5148            }),
5149
5150            10 => crate::event_payload::Ref::Unresolved(unsafe {
5151                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>()
5152            }),
5153
5154            unknown => crate::event_payload::Ref::UnknownOrdinal_(unknown),
5155        }
5156    }
5157}
5158
5159unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventPayload<'static>
5160where
5161    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5162
5163    ___D: ::fidl_next::Decoder,
5164
5165    ___D: ::fidl_next::fuchsia::HandleDecoder,
5166{
5167    fn decode(
5168        mut slot: ::fidl_next::Slot<'_, Self>,
5169        decoder: &mut ___D,
5170    ) -> Result<(), ::fidl_next::DecodeError> {
5171        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5172        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5173            1 => ::fidl_next::RawWireUnion::decode_as::<
5174                ___D,
5175                crate::WireCapabilityRequestedPayload<'static>,
5176            >(raw, decoder)?,
5177
5178            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5179                raw, decoder,
5180            )?,
5181
5182            3 => ::fidl_next::RawWireUnion::decode_as::<
5183                ___D,
5184                crate::WireDirectoryReadyPayload<'static>,
5185            >(raw, decoder)?,
5186
5187            4 => {
5188                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5189                    raw, decoder,
5190                )?
5191            }
5192
5193            5 => {
5194                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5195                    raw, decoder,
5196                )?
5197            }
5198
5199            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5200                raw, decoder,
5201            )?,
5202
5203            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5204                raw, decoder,
5205            )?,
5206
5207            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5208                raw, decoder,
5209            )?,
5210
5211            9 => ::fidl_next::RawWireUnion::decode_as::<
5212                ___D,
5213                crate::WireDebugStartedPayload<'static>,
5214            >(raw, decoder)?,
5215
5216            10 => ::fidl_next::RawWireUnion::decode_as::<
5217                ___D,
5218                crate::WireUnresolvedPayload<'static>,
5219            >(raw, decoder)?,
5220
5221            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5222        }
5223
5224        Ok(())
5225    }
5226}
5227
5228impl<'de> ::core::fmt::Debug for WireEventPayload<'de> {
5229    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5230        match self.raw.ordinal() {
5231            1 => unsafe {
5232                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>().fmt(f)
5233            },
5234            2 => unsafe { self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>().fmt(f) },
5235            3 => unsafe {
5236                self.raw.get().deref_unchecked::<crate::WireDirectoryReadyPayload<'_>>().fmt(f)
5237            },
5238            4 => unsafe {
5239                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>().fmt(f)
5240            },
5241            5 => unsafe {
5242                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>().fmt(f)
5243            },
5244            6 => unsafe {
5245                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>().fmt(f)
5246            },
5247            7 => unsafe {
5248                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>().fmt(f)
5249            },
5250            8 => unsafe {
5251                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>().fmt(f)
5252            },
5253            9 => unsafe {
5254                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>().fmt(f)
5255            },
5256            10 => unsafe {
5257                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>().fmt(f)
5258            },
5259            _ => unsafe { ::core::hint::unreachable_unchecked() },
5260        }
5261    }
5262}
5263
5264#[repr(transparent)]
5265pub struct WireOptionalEventPayload<'de> {
5266    raw: ::fidl_next::RawWireUnion,
5267    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5268}
5269
5270unsafe impl ::fidl_next::Wire for WireOptionalEventPayload<'static> {
5271    type Decoded<'de> = WireOptionalEventPayload<'de>;
5272
5273    #[inline]
5274    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5275        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5276        ::fidl_next::RawWireUnion::zero_padding(raw);
5277    }
5278}
5279
5280impl<'de> WireOptionalEventPayload<'de> {
5281    pub fn is_some(&self) -> bool {
5282        self.raw.is_some()
5283    }
5284
5285    pub fn is_none(&self) -> bool {
5286        self.raw.is_none()
5287    }
5288
5289    pub fn as_ref(&self) -> Option<&WireEventPayload<'de>> {
5290        if self.is_some() {
5291            Some(unsafe { &*(self as *const Self).cast() })
5292        } else {
5293            None
5294        }
5295    }
5296
5297    pub fn into_option(self) -> Option<WireEventPayload<'de>> {
5298        if self.is_some() {
5299            Some(WireEventPayload { raw: self.raw, _phantom: ::core::marker::PhantomData })
5300        } else {
5301            None
5302        }
5303    }
5304}
5305
5306unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalEventPayload<'static>
5307where
5308    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5309
5310    ___D: ::fidl_next::Decoder,
5311
5312    ___D: ::fidl_next::fuchsia::HandleDecoder,
5313{
5314    fn decode(
5315        mut slot: ::fidl_next::Slot<'_, Self>,
5316        decoder: &mut ___D,
5317    ) -> Result<(), ::fidl_next::DecodeError> {
5318        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5319        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5320            1 => ::fidl_next::RawWireUnion::decode_as::<
5321                ___D,
5322                crate::WireCapabilityRequestedPayload<'static>,
5323            >(raw, decoder)?,
5324
5325            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5326                raw, decoder,
5327            )?,
5328
5329            3 => ::fidl_next::RawWireUnion::decode_as::<
5330                ___D,
5331                crate::WireDirectoryReadyPayload<'static>,
5332            >(raw, decoder)?,
5333
5334            4 => {
5335                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5336                    raw, decoder,
5337                )?
5338            }
5339
5340            5 => {
5341                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5342                    raw, decoder,
5343                )?
5344            }
5345
5346            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5347                raw, decoder,
5348            )?,
5349
5350            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5351                raw, decoder,
5352            )?,
5353
5354            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5355                raw, decoder,
5356            )?,
5357
5358            9 => ::fidl_next::RawWireUnion::decode_as::<
5359                ___D,
5360                crate::WireDebugStartedPayload<'static>,
5361            >(raw, decoder)?,
5362
5363            10 => ::fidl_next::RawWireUnion::decode_as::<
5364                ___D,
5365                crate::WireUnresolvedPayload<'static>,
5366            >(raw, decoder)?,
5367
5368            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
5369            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5370        }
5371
5372        Ok(())
5373    }
5374}
5375
5376impl<'de> ::core::fmt::Debug for WireOptionalEventPayload<'de> {
5377    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5378        self.as_ref().fmt(f)
5379    }
5380}
5381
5382#[doc = " Contains all information about a single event\n"]
5383#[derive(Debug, Default)]
5384pub struct Event {
5385    pub header: Option<crate::EventHeader>,
5386
5387    pub payload: Option<crate::EventPayload>,
5388}
5389
5390impl Event {
5391    fn __max_ordinal(&self) -> usize {
5392        if self.payload.is_some() {
5393            return 2;
5394        }
5395
5396        if self.header.is_some() {
5397            return 1;
5398        }
5399
5400        0
5401    }
5402}
5403
5404impl ::fidl_next::Encodable for Event {
5405    type Encoded = WireEvent<'static>;
5406}
5407
5408unsafe impl<___E> ::fidl_next::Encode<___E> for Event
5409where
5410    ___E: ::fidl_next::Encoder + ?Sized,
5411
5412    ___E: ::fidl_next::fuchsia::HandleEncoder,
5413{
5414    #[inline]
5415    fn encode(
5416        mut self,
5417        encoder: &mut ___E,
5418        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5419    ) -> Result<(), ::fidl_next::EncodeError> {
5420        ::fidl_next::munge!(let WireEvent { table } = out);
5421
5422        let max_ord = self.__max_ordinal();
5423
5424        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
5425        ::fidl_next::Wire::zero_padding(&mut out);
5426
5427        let mut preallocated =
5428            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
5429
5430        for i in 1..=max_ord {
5431            match i {
5432                2 => {
5433                    if let Some(payload) = self.payload.take() {
5434                        ::fidl_next::WireEnvelope::encode_value(
5435                            payload,
5436                            preallocated.encoder,
5437                            &mut out,
5438                        )?;
5439                    } else {
5440                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5441                    }
5442                }
5443
5444                1 => {
5445                    if let Some(header) = self.header.take() {
5446                        ::fidl_next::WireEnvelope::encode_value(
5447                            header,
5448                            preallocated.encoder,
5449                            &mut out,
5450                        )?;
5451                    } else {
5452                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5453                    }
5454                }
5455
5456                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
5457            }
5458            unsafe {
5459                preallocated.write_next(out.assume_init_ref());
5460            }
5461        }
5462
5463        ::fidl_next::WireTable::encode_len(table, max_ord);
5464
5465        Ok(())
5466    }
5467}
5468
5469impl<'de> ::fidl_next::FromWire<WireEvent<'de>> for Event {
5470    #[inline]
5471    fn from_wire(wire: WireEvent<'de>) -> Self {
5472        let wire = ::core::mem::ManuallyDrop::new(wire);
5473
5474        let header = wire.table.get(1);
5475
5476        let payload = wire.table.get(2);
5477
5478        Self {
5479            header: header.map(|envelope| {
5480                ::fidl_next::FromWire::from_wire(unsafe {
5481                    envelope.read_unchecked::<crate::WireEventHeader<'de>>()
5482                })
5483            }),
5484
5485            payload: payload.map(|envelope| {
5486                ::fidl_next::FromWire::from_wire(unsafe {
5487                    envelope.read_unchecked::<crate::WireEventPayload<'de>>()
5488                })
5489            }),
5490        }
5491    }
5492}
5493
5494/// The wire type corresponding to [`Event`].
5495#[repr(C)]
5496pub struct WireEvent<'de> {
5497    table: ::fidl_next::WireTable<'de>,
5498}
5499
5500impl<'de> Drop for WireEvent<'de> {
5501    fn drop(&mut self) {
5502        let _ = self
5503            .table
5504            .get(1)
5505            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventHeader<'de>>() });
5506
5507        let _ = self
5508            .table
5509            .get(2)
5510            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventPayload<'de>>() });
5511    }
5512}
5513
5514unsafe impl ::fidl_next::Wire for WireEvent<'static> {
5515    type Decoded<'de> = WireEvent<'de>;
5516
5517    #[inline]
5518    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5519        ::fidl_next::munge!(let Self { table } = out);
5520        ::fidl_next::WireTable::zero_padding(table);
5521    }
5522}
5523
5524unsafe impl<___D> ::fidl_next::Decode<___D> for WireEvent<'static>
5525where
5526    ___D: ::fidl_next::Decoder + ?Sized,
5527
5528    ___D: ::fidl_next::fuchsia::HandleDecoder,
5529{
5530    fn decode(
5531        slot: ::fidl_next::Slot<'_, Self>,
5532        decoder: &mut ___D,
5533    ) -> Result<(), ::fidl_next::DecodeError> {
5534        ::fidl_next::munge!(let Self { table } = slot);
5535
5536        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5537            match ordinal {
5538                0 => unsafe { ::core::hint::unreachable_unchecked() },
5539
5540                1 => {
5541                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventHeader<'static>>(
5542                        slot.as_mut(),
5543                        decoder,
5544                    )?;
5545
5546                    Ok(())
5547                }
5548
5549                2 => {
5550                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventPayload<'static>>(
5551                        slot.as_mut(),
5552                        decoder,
5553                    )?;
5554
5555                    Ok(())
5556                }
5557
5558                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5559            }
5560        })
5561    }
5562}
5563
5564impl<'de> WireEvent<'de> {
5565    pub fn header(&self) -> Option<&crate::WireEventHeader<'de>> {
5566        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5567    }
5568
5569    pub fn payload(&self) -> Option<&crate::WireEventPayload<'de>> {
5570        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5571    }
5572}
5573
5574impl<'de> ::core::fmt::Debug for WireEvent<'de> {
5575    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
5576        f.debug_struct("Event")
5577            .field("header", &self.header())
5578            .field("payload", &self.payload())
5579            .finish()
5580    }
5581}
5582
5583#[derive(Debug)]
5584pub struct EventStreamGetNextResponse {
5585    pub events: Vec<crate::Event>,
5586}
5587
5588impl ::fidl_next::Encodable for EventStreamGetNextResponse {
5589    type Encoded = WireEventStreamGetNextResponse<'static>;
5590}
5591
5592unsafe impl<___E> ::fidl_next::Encode<___E> for EventStreamGetNextResponse
5593where
5594    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5595
5596    ___E: ::fidl_next::Encoder,
5597
5598    ___E: ::fidl_next::fuchsia::HandleEncoder,
5599{
5600    #[inline]
5601    fn encode(
5602        self,
5603        encoder: &mut ___E,
5604        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5605    ) -> Result<(), ::fidl_next::EncodeError> {
5606        ::fidl_next::munge! {
5607            let Self::Encoded {
5608                events,
5609
5610            } = out;
5611        }
5612
5613        ::fidl_next::Encode::encode(self.events, encoder, events)?;
5614
5615        Ok(())
5616    }
5617}
5618
5619impl ::fidl_next::EncodableOption for EventStreamGetNextResponse {
5620    type EncodedOption = ::fidl_next::WireBox<'static, WireEventStreamGetNextResponse<'static>>;
5621}
5622
5623unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventStreamGetNextResponse
5624where
5625    ___E: ::fidl_next::Encoder + ?Sized,
5626    EventStreamGetNextResponse: ::fidl_next::Encode<___E>,
5627{
5628    #[inline]
5629    fn encode_option(
5630        this: Option<Self>,
5631        encoder: &mut ___E,
5632        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5633    ) -> Result<(), ::fidl_next::EncodeError> {
5634        if let Some(inner) = this {
5635            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5636            ::fidl_next::WireBox::encode_present(out);
5637        } else {
5638            ::fidl_next::WireBox::encode_absent(out);
5639        }
5640
5641        Ok(())
5642    }
5643}
5644
5645impl<'de> ::fidl_next::FromWire<WireEventStreamGetNextResponse<'de>>
5646    for EventStreamGetNextResponse
5647{
5648    #[inline]
5649    fn from_wire(wire: WireEventStreamGetNextResponse<'de>) -> Self {
5650        Self { events: ::fidl_next::FromWire::from_wire(wire.events) }
5651    }
5652}
5653
5654/// The wire type corresponding to [`EventStreamGetNextResponse`].
5655#[derive(Debug)]
5656#[repr(C)]
5657pub struct WireEventStreamGetNextResponse<'de> {
5658    pub events: ::fidl_next::WireVector<'de, crate::WireEvent<'de>>,
5659}
5660
5661unsafe impl ::fidl_next::Wire for WireEventStreamGetNextResponse<'static> {
5662    type Decoded<'de> = WireEventStreamGetNextResponse<'de>;
5663
5664    #[inline]
5665    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5666}
5667
5668unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventStreamGetNextResponse<'static>
5669where
5670    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5671
5672    ___D: ::fidl_next::Decoder,
5673
5674    ___D: ::fidl_next::fuchsia::HandleDecoder,
5675{
5676    fn decode(
5677        slot: ::fidl_next::Slot<'_, Self>,
5678        decoder: &mut ___D,
5679    ) -> Result<(), ::fidl_next::DecodeError> {
5680        ::fidl_next::munge! {
5681            let Self {
5682                mut events,
5683
5684            } = slot;
5685        }
5686
5687        ::fidl_next::Decode::decode(events.as_mut(), decoder)?;
5688
5689        Ok(())
5690    }
5691}
5692
5693/// The type corresponding to the EventStream protocol.
5694#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
5695#[derive(Debug)]
5696pub struct EventStream;
5697
5698impl ::fidl_next::Discoverable for EventStream {
5699    const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
5700}
5701
5702pub mod event_stream {
5703    pub mod prelude {
5704        pub use crate::{
5705            event_stream, EventStream, EventStreamClientHandler, EventStreamServerHandler,
5706        };
5707
5708        pub use crate::EventStreamGetNextResponse;
5709    }
5710
5711    pub struct GetNext;
5712
5713    impl ::fidl_next::Method for GetNext {
5714        const ORDINAL: u64 = 4549982840421936006;
5715
5716        type Protocol = crate::EventStream;
5717
5718        type Request = ();
5719
5720        type Response = crate::WireEventStreamGetNextResponse<'static>;
5721    }
5722
5723    pub struct WaitForReady;
5724
5725    impl ::fidl_next::Method for WaitForReady {
5726        const ORDINAL: u64 = 3545212058508387970;
5727
5728        type Protocol = crate::EventStream;
5729
5730        type Request = ();
5731
5732        type Response = ();
5733    }
5734
5735    mod ___detail {
5736
5737        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::EventStream
5738        where
5739            ___T: ::fidl_next::Transport,
5740        {
5741            type ClientSender = EventStreamClientSender<___T>;
5742            type ServerSender = EventStreamServerSender<___T>;
5743        }
5744
5745        /// The client sender for the `EventStream` protocol.
5746        pub struct EventStreamClientSender<___T: ::fidl_next::Transport> {
5747            #[allow(dead_code)]
5748            sender: ::fidl_next::protocol::ClientSender<___T>,
5749        }
5750
5751        impl<___T> EventStreamClientSender<___T>
5752        where
5753            ___T: ::fidl_next::Transport,
5754        {
5755            pub fn get_next(
5756                &self,
5757            ) -> Result<
5758                ::fidl_next::ResponseFuture<'_, super::GetNext, ___T>,
5759                ::fidl_next::EncodeError,
5760            > {
5761                self.sender
5762                    .send_two_way(4549982840421936006, ())
5763                    .map(::fidl_next::ResponseFuture::from_untyped)
5764            }
5765
5766            #[doc = " Returns immediately. Used to indicate that the FIDL connection\n completed. This is needed for non-static streams to verify\n that subscribe has completed before components are started.\n"]
5767            pub fn wait_for_ready(
5768                &self,
5769            ) -> Result<
5770                ::fidl_next::ResponseFuture<'_, super::WaitForReady, ___T>,
5771                ::fidl_next::EncodeError,
5772            > {
5773                self.sender
5774                    .send_two_way(3545212058508387970, ())
5775                    .map(::fidl_next::ResponseFuture::from_untyped)
5776            }
5777        }
5778
5779        /// The server sender for the `EventStream` protocol.
5780        #[repr(transparent)]
5781        pub struct EventStreamServerSender<___T: ::fidl_next::Transport> {
5782            sender: ::fidl_next::protocol::ServerSender<___T>,
5783        }
5784
5785        impl<___T> EventStreamServerSender<___T> where ___T: ::fidl_next::Transport {}
5786    }
5787}
5788
5789/// A client handler for the EventStream protocol.
5790///
5791/// See [`EventStream`] for more details.
5792pub trait EventStreamClientHandler<___T: ::fidl_next::Transport> {}
5793
5794impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for EventStream
5795where
5796    ___H: EventStreamClientHandler<___T> + Send,
5797    ___T: ::fidl_next::Transport,
5798
5799    <event_stream::GetNext as ::fidl_next::Method>::Response:
5800        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5801{
5802    async fn on_event(
5803        handler: &mut ___H,
5804        sender: &::fidl_next::ClientSender<Self, ___T>,
5805        ordinal: u64,
5806        buffer: ___T::RecvBuffer,
5807    ) {
5808        match ordinal {
5809            ordinal => {
5810                sender.close();
5811            }
5812        }
5813    }
5814}
5815
5816/// A server handler for the EventStream protocol.
5817///
5818/// See [`EventStream`] for more details.
5819pub trait EventStreamServerHandler<___T: ::fidl_next::Transport> {
5820    fn get_next(
5821        &mut self,
5822        sender: &::fidl_next::ServerSender<EventStream, ___T>,
5823
5824        responder: ::fidl_next::Responder<event_stream::GetNext>,
5825    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5826
5827    #[doc = " Returns immediately. Used to indicate that the FIDL connection\n completed. This is needed for non-static streams to verify\n that subscribe has completed before components are started.\n"]
5828    fn wait_for_ready(
5829        &mut self,
5830        sender: &::fidl_next::ServerSender<EventStream, ___T>,
5831
5832        responder: ::fidl_next::Responder<event_stream::WaitForReady>,
5833    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5834}
5835
5836impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for EventStream
5837where
5838    ___H: EventStreamServerHandler<___T> + Send,
5839    ___T: ::fidl_next::Transport,
5840{
5841    async fn on_one_way(
5842        handler: &mut ___H,
5843        sender: &::fidl_next::ServerSender<Self, ___T>,
5844        ordinal: u64,
5845        buffer: ___T::RecvBuffer,
5846    ) {
5847        match ordinal {
5848            ordinal => {
5849                sender.close();
5850            }
5851        }
5852    }
5853
5854    async fn on_two_way(
5855        handler: &mut ___H,
5856        sender: &::fidl_next::ServerSender<Self, ___T>,
5857        ordinal: u64,
5858        buffer: ___T::RecvBuffer,
5859        responder: ::fidl_next::protocol::Responder,
5860    ) {
5861        match ordinal {
5862            4549982840421936006 => {
5863                let responder = ::fidl_next::Responder::from_untyped(responder);
5864
5865                handler.get_next(sender, responder).await;
5866            }
5867
5868            3545212058508387970 => {
5869                let responder = ::fidl_next::Responder::from_untyped(responder);
5870
5871                handler.wait_for_ready(sender, responder).await;
5872            }
5873
5874            ordinal => {
5875                sender.close();
5876            }
5877        }
5878    }
5879}
5880
5881#[derive(Clone, Debug)]
5882pub struct ExecutionControllerOnStopRequest {
5883    pub stopped_payload: crate::StoppedPayload,
5884}
5885
5886impl ::fidl_next::Encodable for ExecutionControllerOnStopRequest {
5887    type Encoded = WireExecutionControllerOnStopRequest<'static>;
5888}
5889
5890unsafe impl<___E> ::fidl_next::Encode<___E> for ExecutionControllerOnStopRequest
5891where
5892    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5893
5894    ___E: ::fidl_next::Encoder,
5895{
5896    #[inline]
5897    fn encode(
5898        self,
5899        encoder: &mut ___E,
5900        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5901    ) -> Result<(), ::fidl_next::EncodeError> {
5902        ::fidl_next::munge! {
5903            let Self::Encoded {
5904                stopped_payload,
5905
5906            } = out;
5907        }
5908
5909        ::fidl_next::Encode::encode(self.stopped_payload, encoder, stopped_payload)?;
5910
5911        Ok(())
5912    }
5913}
5914
5915unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ExecutionControllerOnStopRequest
5916where
5917    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5918
5919    ___E: ::fidl_next::Encoder,
5920{
5921    #[inline]
5922    fn encode_ref(
5923        &self,
5924        encoder: &mut ___E,
5925        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5926    ) -> Result<(), ::fidl_next::EncodeError> {
5927        ::fidl_next::munge! {
5928            let Self::Encoded {
5929                stopped_payload,
5930
5931            } = out;
5932        }
5933
5934        ::fidl_next::EncodeRef::encode_ref(&self.stopped_payload, encoder, stopped_payload)?;
5935
5936        Ok(())
5937    }
5938}
5939
5940impl ::fidl_next::EncodableOption for ExecutionControllerOnStopRequest {
5941    type EncodedOption =
5942        ::fidl_next::WireBox<'static, WireExecutionControllerOnStopRequest<'static>>;
5943}
5944
5945unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExecutionControllerOnStopRequest
5946where
5947    ___E: ::fidl_next::Encoder + ?Sized,
5948    ExecutionControllerOnStopRequest: ::fidl_next::Encode<___E>,
5949{
5950    #[inline]
5951    fn encode_option(
5952        this: Option<Self>,
5953        encoder: &mut ___E,
5954        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5955    ) -> Result<(), ::fidl_next::EncodeError> {
5956        if let Some(inner) = this {
5957            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5958            ::fidl_next::WireBox::encode_present(out);
5959        } else {
5960            ::fidl_next::WireBox::encode_absent(out);
5961        }
5962
5963        Ok(())
5964    }
5965}
5966
5967unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ExecutionControllerOnStopRequest
5968where
5969    ___E: ::fidl_next::Encoder + ?Sized,
5970    ExecutionControllerOnStopRequest: ::fidl_next::EncodeRef<___E>,
5971{
5972    #[inline]
5973    fn encode_option_ref(
5974        this: Option<&Self>,
5975        encoder: &mut ___E,
5976        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5977    ) -> Result<(), ::fidl_next::EncodeError> {
5978        if let Some(inner) = this {
5979            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5980            ::fidl_next::WireBox::encode_present(out);
5981        } else {
5982            ::fidl_next::WireBox::encode_absent(out);
5983        }
5984
5985        Ok(())
5986    }
5987}
5988
5989impl<'de> ::fidl_next::FromWire<WireExecutionControllerOnStopRequest<'de>>
5990    for ExecutionControllerOnStopRequest
5991{
5992    #[inline]
5993    fn from_wire(wire: WireExecutionControllerOnStopRequest<'de>) -> Self {
5994        Self { stopped_payload: ::fidl_next::FromWire::from_wire(wire.stopped_payload) }
5995    }
5996}
5997
5998impl<'de> ::fidl_next::FromWireRef<WireExecutionControllerOnStopRequest<'de>>
5999    for ExecutionControllerOnStopRequest
6000{
6001    #[inline]
6002    fn from_wire_ref(wire: &WireExecutionControllerOnStopRequest<'de>) -> Self {
6003        Self { stopped_payload: ::fidl_next::FromWireRef::from_wire_ref(&wire.stopped_payload) }
6004    }
6005}
6006
6007/// The wire type corresponding to [`ExecutionControllerOnStopRequest`].
6008#[derive(Debug)]
6009#[repr(C)]
6010pub struct WireExecutionControllerOnStopRequest<'de> {
6011    pub stopped_payload: crate::WireStoppedPayload<'de>,
6012}
6013
6014unsafe impl ::fidl_next::Wire for WireExecutionControllerOnStopRequest<'static> {
6015    type Decoded<'de> = WireExecutionControllerOnStopRequest<'de>;
6016
6017    #[inline]
6018    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6019}
6020
6021unsafe impl<___D> ::fidl_next::Decode<___D> for WireExecutionControllerOnStopRequest<'static>
6022where
6023    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6024
6025    ___D: ::fidl_next::Decoder,
6026{
6027    fn decode(
6028        slot: ::fidl_next::Slot<'_, Self>,
6029        decoder: &mut ___D,
6030    ) -> Result<(), ::fidl_next::DecodeError> {
6031        ::fidl_next::munge! {
6032            let Self {
6033                mut stopped_payload,
6034
6035            } = slot;
6036        }
6037
6038        ::fidl_next::Decode::decode(stopped_payload.as_mut(), decoder)?;
6039
6040        Ok(())
6041    }
6042}
6043
6044/// The type corresponding to the ExecutionController protocol.
6045#[derive(Debug)]
6046pub struct ExecutionController;
6047
6048pub mod execution_controller {
6049    pub mod prelude {
6050        pub use crate::{
6051            execution_controller, ExecutionController, ExecutionControllerClientHandler,
6052            ExecutionControllerServerHandler,
6053        };
6054
6055        pub use crate::ExecutionControllerOnStopRequest;
6056    }
6057
6058    pub struct Stop;
6059
6060    impl ::fidl_next::Method for Stop {
6061        const ORDINAL: u64 = 6256129817234858263;
6062
6063        type Protocol = crate::ExecutionController;
6064
6065        type Request = ();
6066
6067        type Response = ::fidl_next::Never;
6068    }
6069
6070    pub struct OnStop;
6071
6072    impl ::fidl_next::Method for OnStop {
6073        const ORDINAL: u64 = 7121600095714604415;
6074
6075        type Protocol = crate::ExecutionController;
6076
6077        type Request = ::fidl_next::Never;
6078
6079        type Response = crate::WireExecutionControllerOnStopRequest<'static>;
6080    }
6081
6082    mod ___detail {
6083
6084        pub struct OnStop<T0> {
6085            stopped_payload: T0,
6086        }
6087
6088        impl<T0> ::fidl_next::Encodable for OnStop<T0>
6089        where
6090            T0: ::fidl_next::Encodable<Encoded = crate::WireStoppedPayload<'static>>,
6091        {
6092            type Encoded = crate::WireExecutionControllerOnStopRequest<'static>;
6093        }
6094
6095        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnStop<T0>
6096        where
6097            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6098
6099            ___E: ::fidl_next::Encoder,
6100
6101            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStoppedPayload<'static>>,
6102        {
6103            #[inline]
6104            fn encode(
6105                self,
6106                encoder: &mut ___E,
6107                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6108            ) -> Result<(), ::fidl_next::EncodeError> {
6109                ::fidl_next::munge! {
6110                    let Self::Encoded {
6111                        stopped_payload,
6112
6113                    } = out;
6114                }
6115
6116                ::fidl_next::Encode::encode(self.stopped_payload, encoder, stopped_payload)?;
6117
6118                Ok(())
6119            }
6120        }
6121
6122        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ExecutionController
6123        where
6124            ___T: ::fidl_next::Transport,
6125        {
6126            type ClientSender = ExecutionControllerClientSender<___T>;
6127            type ServerSender = ExecutionControllerServerSender<___T>;
6128        }
6129
6130        /// The client sender for the `ExecutionController` protocol.
6131        pub struct ExecutionControllerClientSender<___T: ::fidl_next::Transport> {
6132            #[allow(dead_code)]
6133            sender: ::fidl_next::protocol::ClientSender<___T>,
6134        }
6135
6136        impl<___T> ExecutionControllerClientSender<___T>
6137        where
6138            ___T: ::fidl_next::Transport,
6139        {
6140            #[doc = " Initiates a stop action on this component. Once complete, OnStop will be\n called with the stopped payload and this channel is closed.\n\n Note that a component may stop running on its own at any time, so it is\n possible for `OnStop` to be received before `Stop` is called.\n"]
6141            pub fn stop(
6142                &self,
6143            ) -> Result<::fidl_next::SendFuture<'_, ___T>, ::fidl_next::EncodeError> {
6144                self.sender.send_one_way(6256129817234858263, ())
6145            }
6146        }
6147
6148        /// The server sender for the `ExecutionController` protocol.
6149        #[repr(transparent)]
6150        pub struct ExecutionControllerServerSender<___T: ::fidl_next::Transport> {
6151            sender: ::fidl_next::protocol::ServerSender<___T>,
6152        }
6153
6154        impl<___T> ExecutionControllerServerSender<___T>
6155        where
6156            ___T: ::fidl_next::Transport,
6157        {
6158            #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
6159            pub fn on_stop(
6160                &self,
6161
6162                stopped_payload: impl ::fidl_next::Encode<
6163                    <___T as ::fidl_next::Transport>::SendBuffer,
6164                    Encoded = crate::WireStoppedPayload<'static>,
6165                >,
6166            ) -> Result<::fidl_next::SendFuture<'_, ___T>, ::fidl_next::EncodeError>
6167            where
6168                <___T as ::fidl_next::Transport>::SendBuffer:
6169                    ::fidl_next::encoder::InternalHandleEncoder,
6170
6171                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6172            {
6173                self.on_stop_with(OnStop { stopped_payload })
6174            }
6175
6176            #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
6177
6178            pub fn on_stop_with<___R>(
6179                &self,
6180                request: ___R,
6181            ) -> Result<::fidl_next::SendFuture<'_, ___T>, ::fidl_next::EncodeError>
6182            where
6183                ___R: ::fidl_next::Encode<
6184                    <___T as ::fidl_next::Transport>::SendBuffer,
6185                    Encoded = <super::OnStop as ::fidl_next::Method>::Response,
6186                >,
6187            {
6188                self.sender.send_event(7121600095714604415, request)
6189            }
6190        }
6191    }
6192}
6193
6194/// A client handler for the ExecutionController protocol.
6195///
6196/// See [`ExecutionController`] for more details.
6197pub trait ExecutionControllerClientHandler<___T: ::fidl_next::Transport> {
6198    #[doc = " When the child is stopped due to `Stop` being called, the child exiting\n on its own, or for any other reason, `OnStop` is called and then this\n channel is closed.\n"]
6199    fn on_stop(
6200        &mut self,
6201        sender: &::fidl_next::ClientSender<ExecutionController, ___T>,
6202
6203        event: ::fidl_next::Response<execution_controller::OnStop, ___T>,
6204    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6205
6206    fn on_unknown_interaction(
6207        &mut self,
6208        sender: &::fidl_next::ClientSender<ExecutionController, ___T>,
6209        ordinal: u64,
6210    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6211        sender.close();
6212        ::core::future::ready(())
6213    }
6214}
6215
6216impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for ExecutionController
6217where
6218    ___H: ExecutionControllerClientHandler<___T> + Send,
6219    ___T: ::fidl_next::Transport,
6220
6221    <execution_controller::OnStop as ::fidl_next::Method>::Response:
6222        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6223{
6224    async fn on_event(
6225        handler: &mut ___H,
6226        sender: &::fidl_next::ClientSender<Self, ___T>,
6227        ordinal: u64,
6228        buffer: ___T::RecvBuffer,
6229    ) {
6230        match ordinal {
6231            7121600095714604415 => match ::fidl_next::DecoderExt::decode(buffer) {
6232                Ok(decoded) => handler.on_stop(sender, decoded).await,
6233                Err(e) => {
6234                    sender.close();
6235                }
6236            },
6237
6238            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6239        }
6240    }
6241}
6242
6243/// A server handler for the ExecutionController protocol.
6244///
6245/// See [`ExecutionController`] for more details.
6246pub trait ExecutionControllerServerHandler<___T: ::fidl_next::Transport> {
6247    #[doc = " Initiates a stop action on this component. Once complete, OnStop will be\n called with the stopped payload and this channel is closed.\n\n Note that a component may stop running on its own at any time, so it is\n possible for `OnStop` to be received before `Stop` is called.\n"]
6248    fn stop(
6249        &mut self,
6250        sender: &::fidl_next::ServerSender<ExecutionController, ___T>,
6251    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6252
6253    fn on_unknown_interaction(
6254        &mut self,
6255        sender: &::fidl_next::ServerSender<ExecutionController, ___T>,
6256        ordinal: u64,
6257    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6258        sender.close();
6259        ::core::future::ready(())
6260    }
6261}
6262
6263impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for ExecutionController
6264where
6265    ___H: ExecutionControllerServerHandler<___T> + Send,
6266    ___T: ::fidl_next::Transport,
6267{
6268    async fn on_one_way(
6269        handler: &mut ___H,
6270        sender: &::fidl_next::ServerSender<Self, ___T>,
6271        ordinal: u64,
6272        buffer: ___T::RecvBuffer,
6273    ) {
6274        match ordinal {
6275            6256129817234858263 => {
6276                handler.stop(sender).await;
6277            }
6278
6279            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6280        }
6281    }
6282
6283    async fn on_two_way(
6284        handler: &mut ___H,
6285        sender: &::fidl_next::ServerSender<Self, ___T>,
6286        ordinal: u64,
6287        buffer: ___T::RecvBuffer,
6288        responder: ::fidl_next::protocol::Responder,
6289    ) {
6290        match ordinal {
6291            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6292        }
6293    }
6294}
6295
6296#[derive(Debug)]
6297#[repr(C)]
6298pub struct IntrospectorGetMonikerRequest {
6299    pub component_instance: ::fidl_next::fuchsia::zx::Handle,
6300}
6301
6302impl ::fidl_next::Encodable for IntrospectorGetMonikerRequest {
6303    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6304        Self,
6305        WireIntrospectorGetMonikerRequest,
6306    > = unsafe {
6307        ::fidl_next::CopyOptimization::enable_if(
6308            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6309                .is_enabled(),
6310        )
6311    };
6312
6313    type Encoded = WireIntrospectorGetMonikerRequest;
6314}
6315
6316unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerRequest
6317where
6318    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6319
6320    ___E: ::fidl_next::fuchsia::HandleEncoder,
6321{
6322    #[inline]
6323    fn encode(
6324        self,
6325        encoder: &mut ___E,
6326        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6327    ) -> Result<(), ::fidl_next::EncodeError> {
6328        ::fidl_next::munge! {
6329            let Self::Encoded {
6330                component_instance,
6331
6332            } = out;
6333        }
6334
6335        ::fidl_next::Encode::encode(self.component_instance, encoder, component_instance)?;
6336
6337        Ok(())
6338    }
6339}
6340
6341impl ::fidl_next::EncodableOption for IntrospectorGetMonikerRequest {
6342    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerRequest>;
6343}
6344
6345unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerRequest
6346where
6347    ___E: ::fidl_next::Encoder + ?Sized,
6348    IntrospectorGetMonikerRequest: ::fidl_next::Encode<___E>,
6349{
6350    #[inline]
6351    fn encode_option(
6352        this: Option<Self>,
6353        encoder: &mut ___E,
6354        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6355    ) -> Result<(), ::fidl_next::EncodeError> {
6356        if let Some(inner) = this {
6357            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6358            ::fidl_next::WireBox::encode_present(out);
6359        } else {
6360            ::fidl_next::WireBox::encode_absent(out);
6361        }
6362
6363        Ok(())
6364    }
6365}
6366
6367impl ::fidl_next::FromWire<WireIntrospectorGetMonikerRequest> for IntrospectorGetMonikerRequest {
6368    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6369        WireIntrospectorGetMonikerRequest,
6370        Self,
6371    > = unsafe {
6372        ::fidl_next::CopyOptimization::enable_if(
6373            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::FromWire<
6374                ::fidl_next::fuchsia::WireHandle,
6375            >>::COPY_OPTIMIZATION
6376                .is_enabled(),
6377        )
6378    };
6379
6380    #[inline]
6381    fn from_wire(wire: WireIntrospectorGetMonikerRequest) -> Self {
6382        Self { component_instance: ::fidl_next::FromWire::from_wire(wire.component_instance) }
6383    }
6384}
6385
6386/// The wire type corresponding to [`IntrospectorGetMonikerRequest`].
6387#[derive(Debug)]
6388#[repr(C)]
6389pub struct WireIntrospectorGetMonikerRequest {
6390    pub component_instance: ::fidl_next::fuchsia::WireHandle,
6391}
6392
6393unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerRequest {
6394    type Decoded<'de> = WireIntrospectorGetMonikerRequest;
6395
6396    #[inline]
6397    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6398}
6399
6400unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerRequest
6401where
6402    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6403
6404    ___D: ::fidl_next::fuchsia::HandleDecoder,
6405{
6406    fn decode(
6407        slot: ::fidl_next::Slot<'_, Self>,
6408        decoder: &mut ___D,
6409    ) -> Result<(), ::fidl_next::DecodeError> {
6410        ::fidl_next::munge! {
6411            let Self {
6412                mut component_instance,
6413
6414            } = slot;
6415        }
6416
6417        ::fidl_next::Decode::decode(component_instance.as_mut(), decoder)?;
6418
6419        Ok(())
6420    }
6421}
6422
6423#[derive(Clone, Debug)]
6424pub struct IntrospectorGetMonikerResponse {
6425    pub moniker: String,
6426}
6427
6428impl ::fidl_next::Encodable for IntrospectorGetMonikerResponse {
6429    type Encoded = WireIntrospectorGetMonikerResponse<'static>;
6430}
6431
6432unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerResponse
6433where
6434    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6435
6436    ___E: ::fidl_next::Encoder,
6437{
6438    #[inline]
6439    fn encode(
6440        self,
6441        encoder: &mut ___E,
6442        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6443    ) -> Result<(), ::fidl_next::EncodeError> {
6444        ::fidl_next::munge! {
6445            let Self::Encoded {
6446                moniker,
6447
6448            } = out;
6449        }
6450
6451        ::fidl_next::Encode::encode(self.moniker, encoder, moniker)?;
6452
6453        Ok(())
6454    }
6455}
6456
6457unsafe impl<___E> ::fidl_next::EncodeRef<___E> for IntrospectorGetMonikerResponse
6458where
6459    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6460
6461    ___E: ::fidl_next::Encoder,
6462{
6463    #[inline]
6464    fn encode_ref(
6465        &self,
6466        encoder: &mut ___E,
6467        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6468    ) -> Result<(), ::fidl_next::EncodeError> {
6469        ::fidl_next::munge! {
6470            let Self::Encoded {
6471                moniker,
6472
6473            } = out;
6474        }
6475
6476        ::fidl_next::EncodeRef::encode_ref(&self.moniker, encoder, moniker)?;
6477
6478        Ok(())
6479    }
6480}
6481
6482impl ::fidl_next::EncodableOption for IntrospectorGetMonikerResponse {
6483    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerResponse<'static>>;
6484}
6485
6486unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerResponse
6487where
6488    ___E: ::fidl_next::Encoder + ?Sized,
6489    IntrospectorGetMonikerResponse: ::fidl_next::Encode<___E>,
6490{
6491    #[inline]
6492    fn encode_option(
6493        this: Option<Self>,
6494        encoder: &mut ___E,
6495        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6496    ) -> Result<(), ::fidl_next::EncodeError> {
6497        if let Some(inner) = this {
6498            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6499            ::fidl_next::WireBox::encode_present(out);
6500        } else {
6501            ::fidl_next::WireBox::encode_absent(out);
6502        }
6503
6504        Ok(())
6505    }
6506}
6507
6508unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for IntrospectorGetMonikerResponse
6509where
6510    ___E: ::fidl_next::Encoder + ?Sized,
6511    IntrospectorGetMonikerResponse: ::fidl_next::EncodeRef<___E>,
6512{
6513    #[inline]
6514    fn encode_option_ref(
6515        this: Option<&Self>,
6516        encoder: &mut ___E,
6517        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6518    ) -> Result<(), ::fidl_next::EncodeError> {
6519        if let Some(inner) = this {
6520            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6521            ::fidl_next::WireBox::encode_present(out);
6522        } else {
6523            ::fidl_next::WireBox::encode_absent(out);
6524        }
6525
6526        Ok(())
6527    }
6528}
6529
6530impl<'de> ::fidl_next::FromWire<WireIntrospectorGetMonikerResponse<'de>>
6531    for IntrospectorGetMonikerResponse
6532{
6533    #[inline]
6534    fn from_wire(wire: WireIntrospectorGetMonikerResponse<'de>) -> Self {
6535        Self { moniker: ::fidl_next::FromWire::from_wire(wire.moniker) }
6536    }
6537}
6538
6539impl<'de> ::fidl_next::FromWireRef<WireIntrospectorGetMonikerResponse<'de>>
6540    for IntrospectorGetMonikerResponse
6541{
6542    #[inline]
6543    fn from_wire_ref(wire: &WireIntrospectorGetMonikerResponse<'de>) -> Self {
6544        Self { moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.moniker) }
6545    }
6546}
6547
6548/// The wire type corresponding to [`IntrospectorGetMonikerResponse`].
6549#[derive(Debug)]
6550#[repr(C)]
6551pub struct WireIntrospectorGetMonikerResponse<'de> {
6552    pub moniker: ::fidl_next::WireString<'de>,
6553}
6554
6555unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerResponse<'static> {
6556    type Decoded<'de> = WireIntrospectorGetMonikerResponse<'de>;
6557
6558    #[inline]
6559    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6560}
6561
6562unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerResponse<'static>
6563where
6564    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6565
6566    ___D: ::fidl_next::Decoder,
6567{
6568    fn decode(
6569        slot: ::fidl_next::Slot<'_, Self>,
6570        decoder: &mut ___D,
6571    ) -> Result<(), ::fidl_next::DecodeError> {
6572        ::fidl_next::munge! {
6573            let Self {
6574                mut moniker,
6575
6576            } = slot;
6577        }
6578
6579        ::fidl_next::Decode::decode(moniker.as_mut(), decoder)?;
6580
6581        let moniker = unsafe { moniker.deref_unchecked() };
6582
6583        if moniker.len() > 4096 {
6584            return Err(::fidl_next::DecodeError::VectorTooLong {
6585                size: moniker.len() as u64,
6586                limit: 4096,
6587            });
6588        }
6589
6590        Ok(())
6591    }
6592}
6593
6594/// The type corresponding to the Introspector protocol.
6595#[doc = " A protocol used by a component instance to obtain information about\n components in its own realm.\n\n This protocol only supports getting the moniker at the moment but could\n expand to other privileged information such as the URL of a component.\n\n The component framework provides this capability to components that use\n `fuchsia.component.Introspector` from framework.\n"]
6596#[derive(Debug)]
6597pub struct Introspector;
6598
6599impl ::fidl_next::Discoverable for Introspector {
6600    const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
6601}
6602
6603pub mod introspector {
6604    pub mod prelude {
6605        pub use crate::{
6606            introspector, Introspector, IntrospectorClientHandler, IntrospectorServerHandler,
6607        };
6608
6609        pub use crate::Error;
6610
6611        pub use crate::IntrospectorGetMonikerRequest;
6612
6613        pub use crate::IntrospectorGetMonikerResponse;
6614    }
6615
6616    pub struct GetMoniker;
6617
6618    impl ::fidl_next::Method for GetMoniker {
6619        const ORDINAL: u64 = 214344082539672664;
6620
6621        type Protocol = crate::Introspector;
6622
6623        type Request = crate::WireIntrospectorGetMonikerRequest;
6624
6625        type Response = ::fidl_next::WireFlexibleResult<
6626            'static,
6627            crate::WireIntrospectorGetMonikerResponse<'static>,
6628            crate::WireError,
6629        >;
6630    }
6631
6632    mod ___detail {
6633
6634        pub struct GetMoniker<T0> {
6635            component_instance: T0,
6636        }
6637
6638        impl<T0> ::fidl_next::Encodable for GetMoniker<T0>
6639        where
6640            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireHandle>,
6641        {
6642            type Encoded = crate::WireIntrospectorGetMonikerRequest;
6643        }
6644
6645        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetMoniker<T0>
6646        where
6647            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6648
6649            ___E: ::fidl_next::fuchsia::HandleEncoder,
6650
6651            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireHandle>,
6652        {
6653            #[inline]
6654            fn encode(
6655                self,
6656                encoder: &mut ___E,
6657                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6658            ) -> Result<(), ::fidl_next::EncodeError> {
6659                ::fidl_next::munge! {
6660                    let Self::Encoded {
6661                        component_instance,
6662
6663                    } = out;
6664                }
6665
6666                ::fidl_next::Encode::encode(self.component_instance, encoder, component_instance)?;
6667
6668                Ok(())
6669            }
6670        }
6671
6672        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Introspector
6673        where
6674            ___T: ::fidl_next::Transport,
6675        {
6676            type ClientSender = IntrospectorClientSender<___T>;
6677            type ServerSender = IntrospectorServerSender<___T>;
6678        }
6679
6680        /// The client sender for the `Introspector` protocol.
6681        pub struct IntrospectorClientSender<___T: ::fidl_next::Transport> {
6682            #[allow(dead_code)]
6683            sender: ::fidl_next::protocol::ClientSender<___T>,
6684        }
6685
6686        impl<___T> IntrospectorClientSender<___T>
6687        where
6688            ___T: ::fidl_next::Transport,
6689        {
6690            #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
6691            pub fn get_moniker(
6692                &self,
6693
6694                component_instance: impl ::fidl_next::Encode<
6695                    <___T as ::fidl_next::Transport>::SendBuffer,
6696                    Encoded = ::fidl_next::fuchsia::WireHandle,
6697                >,
6698            ) -> Result<
6699                ::fidl_next::ResponseFuture<'_, super::GetMoniker, ___T>,
6700                ::fidl_next::EncodeError,
6701            >
6702            where
6703                <___T as ::fidl_next::Transport>::SendBuffer:
6704                    ::fidl_next::encoder::InternalHandleEncoder,
6705
6706                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6707            {
6708                self.get_moniker_with(GetMoniker { component_instance })
6709            }
6710
6711            #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
6712            pub fn get_moniker_with<___R>(
6713                &self,
6714                request: ___R,
6715            ) -> Result<
6716                ::fidl_next::ResponseFuture<'_, super::GetMoniker, ___T>,
6717                ::fidl_next::EncodeError,
6718            >
6719            where
6720                ___R: ::fidl_next::Encode<
6721                    <___T as ::fidl_next::Transport>::SendBuffer,
6722                    Encoded = crate::WireIntrospectorGetMonikerRequest,
6723                >,
6724            {
6725                self.sender
6726                    .send_two_way(214344082539672664, request)
6727                    .map(::fidl_next::ResponseFuture::from_untyped)
6728            }
6729        }
6730
6731        /// The server sender for the `Introspector` protocol.
6732        #[repr(transparent)]
6733        pub struct IntrospectorServerSender<___T: ::fidl_next::Transport> {
6734            sender: ::fidl_next::protocol::ServerSender<___T>,
6735        }
6736
6737        impl<___T> IntrospectorServerSender<___T> where ___T: ::fidl_next::Transport {}
6738    }
6739}
6740
6741/// A client handler for the Introspector protocol.
6742///
6743/// See [`Introspector`] for more details.
6744pub trait IntrospectorClientHandler<___T: ::fidl_next::Transport> {
6745    fn on_unknown_interaction(
6746        &mut self,
6747        sender: &::fidl_next::ClientSender<Introspector, ___T>,
6748        ordinal: u64,
6749    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6750        sender.close();
6751        ::core::future::ready(())
6752    }
6753}
6754
6755impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for Introspector
6756where
6757    ___H: IntrospectorClientHandler<___T> + Send,
6758    ___T: ::fidl_next::Transport,
6759
6760    <introspector::GetMoniker as ::fidl_next::Method>::Response:
6761        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6762{
6763    async fn on_event(
6764        handler: &mut ___H,
6765        sender: &::fidl_next::ClientSender<Self, ___T>,
6766        ordinal: u64,
6767        buffer: ___T::RecvBuffer,
6768    ) {
6769        match ordinal {
6770            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6771        }
6772    }
6773}
6774
6775/// A server handler for the Introspector protocol.
6776///
6777/// See [`Introspector`] for more details.
6778pub trait IntrospectorServerHandler<___T: ::fidl_next::Transport> {
6779    #[doc = " Obtains the moniker relative to this realm of the component\n corresponding to the provided token. Runners may obtain the token via\n `fuchsia.component.runner/ComponentStartInfo.component_instance`.\n\n Returns `Error.INSTANCE_NOT_FOUND` if the token is invalid, or\n does not correspond to a component under this realm.\n"]
6780    fn get_moniker(
6781        &mut self,
6782        sender: &::fidl_next::ServerSender<Introspector, ___T>,
6783
6784        request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
6785
6786        responder: ::fidl_next::Responder<introspector::GetMoniker>,
6787    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6788
6789    fn on_unknown_interaction(
6790        &mut self,
6791        sender: &::fidl_next::ServerSender<Introspector, ___T>,
6792        ordinal: u64,
6793    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6794        sender.close();
6795        ::core::future::ready(())
6796    }
6797}
6798
6799impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for Introspector
6800where
6801    ___H: IntrospectorServerHandler<___T> + Send,
6802    ___T: ::fidl_next::Transport,
6803
6804    <introspector::GetMoniker as ::fidl_next::Method>::Request:
6805        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6806{
6807    async fn on_one_way(
6808        handler: &mut ___H,
6809        sender: &::fidl_next::ServerSender<Self, ___T>,
6810        ordinal: u64,
6811        buffer: ___T::RecvBuffer,
6812    ) {
6813        match ordinal {
6814            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6815        }
6816    }
6817
6818    async fn on_two_way(
6819        handler: &mut ___H,
6820        sender: &::fidl_next::ServerSender<Self, ___T>,
6821        ordinal: u64,
6822        buffer: ___T::RecvBuffer,
6823        responder: ::fidl_next::protocol::Responder,
6824    ) {
6825        match ordinal {
6826            214344082539672664 => {
6827                let responder = ::fidl_next::Responder::from_untyped(responder);
6828
6829                match ::fidl_next::DecoderExt::decode(buffer) {
6830                    Ok(decoded) => handler.get_moniker(sender, decoded, responder).await,
6831                    Err(e) => {
6832                        sender.close();
6833                    }
6834                }
6835            }
6836
6837            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6838        }
6839    }
6840}
6841
6842#[doc = " The maximum string length of a capability ID.\n This value is currently set arbitrarily.\n"]
6843pub const MAX_CAPABILITY_ID_LENGTH: u64 = 50;
6844
6845pub const MAX_CHILD_NAME_LENGTH: u32 = 1024;
6846
6847#[doc = " The maximum string length of an error description.\n"]
6848pub const MAX_ERROR_DESCRIPTION_LENGTH: u64 = 100;
6849
6850#[doc = " The maximum number of events that a receiver can listen to.\n"]
6851pub const MAX_NUM_EVENTS_RECEIVED: u64 = 100;
6852
6853#[doc = " The maximum number of requests per event subscription.\n"]
6854pub const MAX_SUBSCRIPTION_REQUESTS: u32 = 2;
6855
6856pub const MAX_URL_SCHEME_LENGTH: u64 = 255;
6857
6858#[derive(Debug)]
6859pub struct NamespaceInputEntry {
6860    pub path: String,
6861
6862    pub dictionary: ::fidl_next::ClientEnd<
6863        ::fidl_next_fuchsia_component_sandbox::Dictionary,
6864        ::fidl_next::fuchsia::zx::Channel,
6865    >,
6866}
6867
6868impl ::fidl_next::Encodable for NamespaceInputEntry {
6869    type Encoded = WireNamespaceInputEntry<'static>;
6870}
6871
6872unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceInputEntry
6873where
6874    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6875
6876    ___E: ::fidl_next::Encoder,
6877
6878    ___E: ::fidl_next::fuchsia::HandleEncoder,
6879{
6880    #[inline]
6881    fn encode(
6882        self,
6883        encoder: &mut ___E,
6884        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6885    ) -> Result<(), ::fidl_next::EncodeError> {
6886        ::fidl_next::munge! {
6887            let Self::Encoded {
6888                path,
6889                dictionary,
6890
6891            } = out;
6892        }
6893
6894        ::fidl_next::Encode::encode(self.path, encoder, path)?;
6895
6896        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
6897
6898        Ok(())
6899    }
6900}
6901
6902impl ::fidl_next::EncodableOption for NamespaceInputEntry {
6903    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceInputEntry<'static>>;
6904}
6905
6906unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceInputEntry
6907where
6908    ___E: ::fidl_next::Encoder + ?Sized,
6909    NamespaceInputEntry: ::fidl_next::Encode<___E>,
6910{
6911    #[inline]
6912    fn encode_option(
6913        this: Option<Self>,
6914        encoder: &mut ___E,
6915        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6916    ) -> Result<(), ::fidl_next::EncodeError> {
6917        if let Some(inner) = this {
6918            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6919            ::fidl_next::WireBox::encode_present(out);
6920        } else {
6921            ::fidl_next::WireBox::encode_absent(out);
6922        }
6923
6924        Ok(())
6925    }
6926}
6927
6928impl<'de> ::fidl_next::FromWire<WireNamespaceInputEntry<'de>> for NamespaceInputEntry {
6929    #[inline]
6930    fn from_wire(wire: WireNamespaceInputEntry<'de>) -> Self {
6931        Self {
6932            path: ::fidl_next::FromWire::from_wire(wire.path),
6933
6934            dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary),
6935        }
6936    }
6937}
6938
6939/// The wire type corresponding to [`NamespaceInputEntry`].
6940#[derive(Debug)]
6941#[repr(C)]
6942pub struct WireNamespaceInputEntry<'de> {
6943    pub path: ::fidl_next::WireString<'de>,
6944
6945    pub dictionary: ::fidl_next::ClientEnd<
6946        ::fidl_next_fuchsia_component_sandbox::Dictionary,
6947        ::fidl_next::fuchsia::WireChannel,
6948    >,
6949}
6950
6951unsafe impl ::fidl_next::Wire for WireNamespaceInputEntry<'static> {
6952    type Decoded<'de> = WireNamespaceInputEntry<'de>;
6953
6954    #[inline]
6955    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6956        unsafe {
6957            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
6958        }
6959    }
6960}
6961
6962unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceInputEntry<'static>
6963where
6964    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6965
6966    ___D: ::fidl_next::Decoder,
6967
6968    ___D: ::fidl_next::fuchsia::HandleDecoder,
6969{
6970    fn decode(
6971        slot: ::fidl_next::Slot<'_, Self>,
6972        decoder: &mut ___D,
6973    ) -> Result<(), ::fidl_next::DecodeError> {
6974        ::fidl_next::munge! {
6975            let Self {
6976                mut path,
6977                mut dictionary,
6978
6979            } = slot;
6980        }
6981
6982        ::fidl_next::Decode::decode(path.as_mut(), decoder)?;
6983
6984        let path = unsafe { path.deref_unchecked() };
6985
6986        if path.len() > 4095 {
6987            return Err(::fidl_next::DecodeError::VectorTooLong {
6988                size: path.len() as u64,
6989                limit: 4095,
6990            });
6991        }
6992
6993        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
6994
6995        Ok(())
6996    }
6997}
6998
6999#[derive(Debug)]
7000pub struct NamespaceCreateRequest {
7001    pub entries: Vec<crate::NamespaceInputEntry>,
7002}
7003
7004impl ::fidl_next::Encodable for NamespaceCreateRequest {
7005    type Encoded = WireNamespaceCreateRequest<'static>;
7006}
7007
7008unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateRequest
7009where
7010    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7011
7012    ___E: ::fidl_next::Encoder,
7013
7014    ___E: ::fidl_next::fuchsia::HandleEncoder,
7015{
7016    #[inline]
7017    fn encode(
7018        self,
7019        encoder: &mut ___E,
7020        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7021    ) -> Result<(), ::fidl_next::EncodeError> {
7022        ::fidl_next::munge! {
7023            let Self::Encoded {
7024                entries,
7025
7026            } = out;
7027        }
7028
7029        ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
7030
7031        Ok(())
7032    }
7033}
7034
7035impl ::fidl_next::EncodableOption for NamespaceCreateRequest {
7036    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateRequest<'static>>;
7037}
7038
7039unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateRequest
7040where
7041    ___E: ::fidl_next::Encoder + ?Sized,
7042    NamespaceCreateRequest: ::fidl_next::Encode<___E>,
7043{
7044    #[inline]
7045    fn encode_option(
7046        this: Option<Self>,
7047        encoder: &mut ___E,
7048        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7049    ) -> Result<(), ::fidl_next::EncodeError> {
7050        if let Some(inner) = this {
7051            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7052            ::fidl_next::WireBox::encode_present(out);
7053        } else {
7054            ::fidl_next::WireBox::encode_absent(out);
7055        }
7056
7057        Ok(())
7058    }
7059}
7060
7061impl<'de> ::fidl_next::FromWire<WireNamespaceCreateRequest<'de>> for NamespaceCreateRequest {
7062    #[inline]
7063    fn from_wire(wire: WireNamespaceCreateRequest<'de>) -> Self {
7064        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
7065    }
7066}
7067
7068/// The wire type corresponding to [`NamespaceCreateRequest`].
7069#[derive(Debug)]
7070#[repr(C)]
7071pub struct WireNamespaceCreateRequest<'de> {
7072    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceInputEntry<'de>>,
7073}
7074
7075unsafe impl ::fidl_next::Wire for WireNamespaceCreateRequest<'static> {
7076    type Decoded<'de> = WireNamespaceCreateRequest<'de>;
7077
7078    #[inline]
7079    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7080}
7081
7082unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateRequest<'static>
7083where
7084    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7085
7086    ___D: ::fidl_next::Decoder,
7087
7088    ___D: ::fidl_next::fuchsia::HandleDecoder,
7089{
7090    fn decode(
7091        slot: ::fidl_next::Slot<'_, Self>,
7092        decoder: &mut ___D,
7093    ) -> Result<(), ::fidl_next::DecodeError> {
7094        ::fidl_next::munge! {
7095            let Self {
7096                mut entries,
7097
7098            } = slot;
7099        }
7100
7101        ::fidl_next::Decode::decode(entries.as_mut(), decoder)?;
7102
7103        Ok(())
7104    }
7105}
7106
7107#[doc = " Error returned from methods in [`Namespace`].\n"]
7108#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7109#[repr(u32)]
7110pub enum NamespaceError {
7111    Shadow = 1,
7112    Duplicate = 2,
7113    Conversion = 3,
7114    BadEntry = 4,
7115    DictionaryRead = 5,
7116    UnknownOrdinal_(u32),
7117}
7118
7119impl ::fidl_next::Encodable for NamespaceError {
7120    type Encoded = WireNamespaceError;
7121}
7122impl ::std::convert::From<u32> for NamespaceError {
7123    fn from(value: u32) -> Self {
7124        match value {
7125            1 => Self::Shadow,
7126            2 => Self::Duplicate,
7127            3 => Self::Conversion,
7128            4 => Self::BadEntry,
7129            5 => Self::DictionaryRead,
7130
7131            _ => Self::UnknownOrdinal_(value),
7132        }
7133    }
7134}
7135
7136unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceError
7137where
7138    ___E: ?Sized,
7139{
7140    #[inline]
7141    fn encode(
7142        self,
7143        encoder: &mut ___E,
7144        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7145    ) -> Result<(), ::fidl_next::EncodeError> {
7146        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
7147    }
7148}
7149
7150unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NamespaceError
7151where
7152    ___E: ?Sized,
7153{
7154    #[inline]
7155    fn encode_ref(
7156        &self,
7157        encoder: &mut ___E,
7158        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7159    ) -> Result<(), ::fidl_next::EncodeError> {
7160        ::fidl_next::munge!(let WireNamespaceError { value } = out);
7161        let _ = value.write(::fidl_next::WireU32::from(match *self {
7162            Self::Shadow => 1,
7163
7164            Self::Duplicate => 2,
7165
7166            Self::Conversion => 3,
7167
7168            Self::BadEntry => 4,
7169
7170            Self::DictionaryRead => 5,
7171
7172            Self::UnknownOrdinal_(value) => value,
7173        }));
7174
7175        Ok(())
7176    }
7177}
7178
7179impl ::core::convert::From<WireNamespaceError> for NamespaceError {
7180    fn from(wire: WireNamespaceError) -> Self {
7181        match u32::from(wire.value) {
7182            1 => Self::Shadow,
7183
7184            2 => Self::Duplicate,
7185
7186            3 => Self::Conversion,
7187
7188            4 => Self::BadEntry,
7189
7190            5 => Self::DictionaryRead,
7191
7192            value => Self::UnknownOrdinal_(value),
7193        }
7194    }
7195}
7196
7197impl ::fidl_next::FromWire<WireNamespaceError> for NamespaceError {
7198    #[inline]
7199    fn from_wire(wire: WireNamespaceError) -> Self {
7200        Self::from(wire)
7201    }
7202}
7203
7204impl ::fidl_next::FromWireRef<WireNamespaceError> for NamespaceError {
7205    #[inline]
7206    fn from_wire_ref(wire: &WireNamespaceError) -> Self {
7207        Self::from(*wire)
7208    }
7209}
7210
7211/// The wire type corresponding to [`NamespaceError`].
7212#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7213#[repr(transparent)]
7214pub struct WireNamespaceError {
7215    value: ::fidl_next::WireU32,
7216}
7217
7218unsafe impl ::fidl_next::Wire for WireNamespaceError {
7219    type Decoded<'de> = Self;
7220
7221    #[inline]
7222    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7223        // Wire enums have no padding
7224    }
7225}
7226
7227impl WireNamespaceError {
7228    pub const SHADOW: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(1) };
7229
7230    pub const DUPLICATE: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(2) };
7231
7232    pub const CONVERSION: WireNamespaceError =
7233        WireNamespaceError { value: ::fidl_next::WireU32(3) };
7234
7235    pub const BAD_ENTRY: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(4) };
7236
7237    pub const DICTIONARY_READ: WireNamespaceError =
7238        WireNamespaceError { value: ::fidl_next::WireU32(5) };
7239}
7240
7241unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceError
7242where
7243    ___D: ?Sized,
7244{
7245    fn decode(
7246        slot: ::fidl_next::Slot<'_, Self>,
7247        _: &mut ___D,
7248    ) -> Result<(), ::fidl_next::DecodeError> {
7249        Ok(())
7250    }
7251}
7252
7253impl ::core::convert::From<NamespaceError> for WireNamespaceError {
7254    fn from(natural: NamespaceError) -> Self {
7255        match natural {
7256            NamespaceError::Shadow => WireNamespaceError::SHADOW,
7257
7258            NamespaceError::Duplicate => WireNamespaceError::DUPLICATE,
7259
7260            NamespaceError::Conversion => WireNamespaceError::CONVERSION,
7261
7262            NamespaceError::BadEntry => WireNamespaceError::BAD_ENTRY,
7263
7264            NamespaceError::DictionaryRead => WireNamespaceError::DICTIONARY_READ,
7265
7266            NamespaceError::UnknownOrdinal_(value) => {
7267                WireNamespaceError { value: ::fidl_next::WireU32::from(value) }
7268            }
7269        }
7270    }
7271}
7272
7273#[derive(Debug)]
7274pub struct NamespaceCreateResponse {
7275    pub entries: Vec<crate::NamespaceEntry>,
7276}
7277
7278impl ::fidl_next::Encodable for NamespaceCreateResponse {
7279    type Encoded = WireNamespaceCreateResponse<'static>;
7280}
7281
7282unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateResponse
7283where
7284    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7285
7286    ___E: ::fidl_next::Encoder,
7287
7288    ___E: ::fidl_next::fuchsia::HandleEncoder,
7289{
7290    #[inline]
7291    fn encode(
7292        self,
7293        encoder: &mut ___E,
7294        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7295    ) -> Result<(), ::fidl_next::EncodeError> {
7296        ::fidl_next::munge! {
7297            let Self::Encoded {
7298                entries,
7299
7300            } = out;
7301        }
7302
7303        ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
7304
7305        Ok(())
7306    }
7307}
7308
7309impl ::fidl_next::EncodableOption for NamespaceCreateResponse {
7310    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateResponse<'static>>;
7311}
7312
7313unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateResponse
7314where
7315    ___E: ::fidl_next::Encoder + ?Sized,
7316    NamespaceCreateResponse: ::fidl_next::Encode<___E>,
7317{
7318    #[inline]
7319    fn encode_option(
7320        this: Option<Self>,
7321        encoder: &mut ___E,
7322        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7323    ) -> Result<(), ::fidl_next::EncodeError> {
7324        if let Some(inner) = this {
7325            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7326            ::fidl_next::WireBox::encode_present(out);
7327        } else {
7328            ::fidl_next::WireBox::encode_absent(out);
7329        }
7330
7331        Ok(())
7332    }
7333}
7334
7335impl<'de> ::fidl_next::FromWire<WireNamespaceCreateResponse<'de>> for NamespaceCreateResponse {
7336    #[inline]
7337    fn from_wire(wire: WireNamespaceCreateResponse<'de>) -> Self {
7338        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
7339    }
7340}
7341
7342/// The wire type corresponding to [`NamespaceCreateResponse`].
7343#[derive(Debug)]
7344#[repr(C)]
7345pub struct WireNamespaceCreateResponse<'de> {
7346    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>,
7347}
7348
7349unsafe impl ::fidl_next::Wire for WireNamespaceCreateResponse<'static> {
7350    type Decoded<'de> = WireNamespaceCreateResponse<'de>;
7351
7352    #[inline]
7353    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7354}
7355
7356unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateResponse<'static>
7357where
7358    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7359
7360    ___D: ::fidl_next::Decoder,
7361
7362    ___D: ::fidl_next::fuchsia::HandleDecoder,
7363{
7364    fn decode(
7365        slot: ::fidl_next::Slot<'_, Self>,
7366        decoder: &mut ___D,
7367    ) -> Result<(), ::fidl_next::DecodeError> {
7368        ::fidl_next::munge! {
7369            let Self {
7370                mut entries,
7371
7372            } = slot;
7373        }
7374
7375        ::fidl_next::Decode::decode(entries.as_mut(), decoder)?;
7376
7377        Ok(())
7378    }
7379}
7380
7381/// The type corresponding to the Namespace protocol.
7382#[doc = " Protocol for performing namespace operations.\n"]
7383#[derive(Debug)]
7384pub struct Namespace;
7385
7386impl ::fidl_next::Discoverable for Namespace {
7387    const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
7388}
7389
7390pub mod namespace {
7391    pub mod prelude {
7392        pub use crate::{namespace, Namespace, NamespaceClientHandler, NamespaceServerHandler};
7393
7394        pub use crate::NamespaceCreateRequest;
7395
7396        pub use crate::NamespaceError;
7397
7398        pub use crate::NamespaceCreateResponse;
7399    }
7400
7401    pub struct Create;
7402
7403    impl ::fidl_next::Method for Create {
7404        const ORDINAL: u64 = 4839678630846501113;
7405
7406        type Protocol = crate::Namespace;
7407
7408        type Request = crate::WireNamespaceCreateRequest<'static>;
7409
7410        type Response = ::fidl_next::WireFlexibleResult<
7411            'static,
7412            crate::WireNamespaceCreateResponse<'static>,
7413            crate::WireNamespaceError,
7414        >;
7415    }
7416
7417    mod ___detail {
7418
7419        pub struct Create<T0> {
7420            entries: T0,
7421        }
7422
7423        impl<T0> ::fidl_next::Encodable for Create<T0>
7424        where
7425            T0: ::fidl_next::Encodable<
7426                Encoded = ::fidl_next::WireVector<'static, crate::WireNamespaceInputEntry<'static>>,
7427            >,
7428        {
7429            type Encoded = crate::WireNamespaceCreateRequest<'static>;
7430        }
7431
7432        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Create<T0>
7433        where
7434            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7435
7436            ___E: ::fidl_next::Encoder,
7437
7438            ___E: ::fidl_next::fuchsia::HandleEncoder,
7439
7440            T0: ::fidl_next::Encode<
7441                ___E,
7442                Encoded = ::fidl_next::WireVector<'static, crate::WireNamespaceInputEntry<'static>>,
7443            >,
7444        {
7445            #[inline]
7446            fn encode(
7447                self,
7448                encoder: &mut ___E,
7449                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7450            ) -> Result<(), ::fidl_next::EncodeError> {
7451                ::fidl_next::munge! {
7452                    let Self::Encoded {
7453                        entries,
7454
7455                    } = out;
7456                }
7457
7458                ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
7459
7460                Ok(())
7461            }
7462        }
7463
7464        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Namespace
7465        where
7466            ___T: ::fidl_next::Transport,
7467        {
7468            type ClientSender = NamespaceClientSender<___T>;
7469            type ServerSender = NamespaceServerSender<___T>;
7470        }
7471
7472        /// The client sender for the `Namespace` protocol.
7473        pub struct NamespaceClientSender<___T: ::fidl_next::Transport> {
7474            #[allow(dead_code)]
7475            sender: ::fidl_next::protocol::ClientSender<___T>,
7476        }
7477
7478        impl<___T> NamespaceClientSender<___T>
7479        where
7480            ___T: ::fidl_next::Transport,
7481        {
7482            pub fn create(
7483                &self,
7484
7485                entries: impl ::fidl_next::Encode<
7486                    <___T as ::fidl_next::Transport>::SendBuffer,
7487                    Encoded = ::fidl_next::WireVector<
7488                        'static,
7489                        crate::WireNamespaceInputEntry<'static>,
7490                    >,
7491                >,
7492            ) -> Result<
7493                ::fidl_next::ResponseFuture<'_, super::Create, ___T>,
7494                ::fidl_next::EncodeError,
7495            >
7496            where
7497                <___T as ::fidl_next::Transport>::SendBuffer:
7498                    ::fidl_next::encoder::InternalHandleEncoder,
7499
7500                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7501
7502                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7503            {
7504                self.create_with(Create { entries })
7505            }
7506
7507            pub fn create_with<___R>(
7508                &self,
7509                request: ___R,
7510            ) -> Result<
7511                ::fidl_next::ResponseFuture<'_, super::Create, ___T>,
7512                ::fidl_next::EncodeError,
7513            >
7514            where
7515                ___R: ::fidl_next::Encode<
7516                    <___T as ::fidl_next::Transport>::SendBuffer,
7517                    Encoded = crate::WireNamespaceCreateRequest<'static>,
7518                >,
7519            {
7520                self.sender
7521                    .send_two_way(4839678630846501113, request)
7522                    .map(::fidl_next::ResponseFuture::from_untyped)
7523            }
7524        }
7525
7526        /// The server sender for the `Namespace` protocol.
7527        #[repr(transparent)]
7528        pub struct NamespaceServerSender<___T: ::fidl_next::Transport> {
7529            sender: ::fidl_next::protocol::ServerSender<___T>,
7530        }
7531
7532        impl<___T> NamespaceServerSender<___T> where ___T: ::fidl_next::Transport {}
7533    }
7534}
7535
7536/// A client handler for the Namespace protocol.
7537///
7538/// See [`Namespace`] for more details.
7539pub trait NamespaceClientHandler<___T: ::fidl_next::Transport> {
7540    fn on_unknown_interaction(
7541        &mut self,
7542        sender: &::fidl_next::ClientSender<Namespace, ___T>,
7543        ordinal: u64,
7544    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7545        sender.close();
7546        ::core::future::ready(())
7547    }
7548}
7549
7550impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for Namespace
7551where
7552    ___H: NamespaceClientHandler<___T> + Send,
7553    ___T: ::fidl_next::Transport,
7554
7555    <namespace::Create as ::fidl_next::Method>::Response:
7556        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7557{
7558    async fn on_event(
7559        handler: &mut ___H,
7560        sender: &::fidl_next::ClientSender<Self, ___T>,
7561        ordinal: u64,
7562        buffer: ___T::RecvBuffer,
7563    ) {
7564        match ordinal {
7565            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7566        }
7567    }
7568}
7569
7570/// A server handler for the Namespace protocol.
7571///
7572/// See [`Namespace`] for more details.
7573pub trait NamespaceServerHandler<___T: ::fidl_next::Transport> {
7574    fn create(
7575        &mut self,
7576        sender: &::fidl_next::ServerSender<Namespace, ___T>,
7577
7578        request: ::fidl_next::Request<namespace::Create, ___T>,
7579
7580        responder: ::fidl_next::Responder<namespace::Create>,
7581    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7582
7583    fn on_unknown_interaction(
7584        &mut self,
7585        sender: &::fidl_next::ServerSender<Namespace, ___T>,
7586        ordinal: u64,
7587    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7588        sender.close();
7589        ::core::future::ready(())
7590    }
7591}
7592
7593impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for Namespace
7594where
7595    ___H: NamespaceServerHandler<___T> + Send,
7596    ___T: ::fidl_next::Transport,
7597
7598    <namespace::Create as ::fidl_next::Method>::Request:
7599        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7600{
7601    async fn on_one_way(
7602        handler: &mut ___H,
7603        sender: &::fidl_next::ServerSender<Self, ___T>,
7604        ordinal: u64,
7605        buffer: ___T::RecvBuffer,
7606    ) {
7607        match ordinal {
7608            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7609        }
7610    }
7611
7612    async fn on_two_way(
7613        handler: &mut ___H,
7614        sender: &::fidl_next::ServerSender<Self, ___T>,
7615        ordinal: u64,
7616        buffer: ___T::RecvBuffer,
7617        responder: ::fidl_next::protocol::Responder,
7618    ) {
7619        match ordinal {
7620            4839678630846501113 => {
7621                let responder = ::fidl_next::Responder::from_untyped(responder);
7622
7623                match ::fidl_next::DecoderExt::decode(buffer) {
7624                    Ok(decoded) => handler.create(sender, decoded, responder).await,
7625                    Err(e) => {
7626                        sender.close();
7627                    }
7628                }
7629            }
7630
7631            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7632        }
7633    }
7634}
7635
7636pub type RealmOpenExposedDirResponse = ();
7637
7638/// The wire type corresponding to [`RealmOpenExposedDirResponse`].
7639pub type WireRealmOpenExposedDirResponse = ();
7640
7641pub type RealmCreateChildResponse = ();
7642
7643/// The wire type corresponding to [`RealmCreateChildResponse`].
7644pub type WireRealmCreateChildResponse = ();
7645
7646#[derive(Clone, Debug)]
7647pub struct RealmDestroyChildRequest {
7648    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7649}
7650
7651impl ::fidl_next::Encodable for RealmDestroyChildRequest {
7652    type Encoded = WireRealmDestroyChildRequest<'static>;
7653}
7654
7655unsafe impl<___E> ::fidl_next::Encode<___E> for RealmDestroyChildRequest
7656where
7657    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7658
7659    ___E: ::fidl_next::Encoder,
7660{
7661    #[inline]
7662    fn encode(
7663        self,
7664        encoder: &mut ___E,
7665        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7666    ) -> Result<(), ::fidl_next::EncodeError> {
7667        ::fidl_next::munge! {
7668            let Self::Encoded {
7669                child,
7670
7671            } = out;
7672        }
7673
7674        ::fidl_next::Encode::encode(self.child, encoder, child)?;
7675
7676        Ok(())
7677    }
7678}
7679
7680unsafe impl<___E> ::fidl_next::EncodeRef<___E> for RealmDestroyChildRequest
7681where
7682    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7683
7684    ___E: ::fidl_next::Encoder,
7685{
7686    #[inline]
7687    fn encode_ref(
7688        &self,
7689        encoder: &mut ___E,
7690        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7691    ) -> Result<(), ::fidl_next::EncodeError> {
7692        ::fidl_next::munge! {
7693            let Self::Encoded {
7694                child,
7695
7696            } = out;
7697        }
7698
7699        ::fidl_next::EncodeRef::encode_ref(&self.child, encoder, child)?;
7700
7701        Ok(())
7702    }
7703}
7704
7705impl ::fidl_next::EncodableOption for RealmDestroyChildRequest {
7706    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmDestroyChildRequest<'static>>;
7707}
7708
7709unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmDestroyChildRequest
7710where
7711    ___E: ::fidl_next::Encoder + ?Sized,
7712    RealmDestroyChildRequest: ::fidl_next::Encode<___E>,
7713{
7714    #[inline]
7715    fn encode_option(
7716        this: Option<Self>,
7717        encoder: &mut ___E,
7718        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7719    ) -> Result<(), ::fidl_next::EncodeError> {
7720        if let Some(inner) = this {
7721            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7722            ::fidl_next::WireBox::encode_present(out);
7723        } else {
7724            ::fidl_next::WireBox::encode_absent(out);
7725        }
7726
7727        Ok(())
7728    }
7729}
7730
7731unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for RealmDestroyChildRequest
7732where
7733    ___E: ::fidl_next::Encoder + ?Sized,
7734    RealmDestroyChildRequest: ::fidl_next::EncodeRef<___E>,
7735{
7736    #[inline]
7737    fn encode_option_ref(
7738        this: Option<&Self>,
7739        encoder: &mut ___E,
7740        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7741    ) -> Result<(), ::fidl_next::EncodeError> {
7742        if let Some(inner) = this {
7743            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7744            ::fidl_next::WireBox::encode_present(out);
7745        } else {
7746            ::fidl_next::WireBox::encode_absent(out);
7747        }
7748
7749        Ok(())
7750    }
7751}
7752
7753impl<'de> ::fidl_next::FromWire<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
7754    #[inline]
7755    fn from_wire(wire: WireRealmDestroyChildRequest<'de>) -> Self {
7756        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
7757    }
7758}
7759
7760impl<'de> ::fidl_next::FromWireRef<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
7761    #[inline]
7762    fn from_wire_ref(wire: &WireRealmDestroyChildRequest<'de>) -> Self {
7763        Self { child: ::fidl_next::FromWireRef::from_wire_ref(&wire.child) }
7764    }
7765}
7766
7767/// The wire type corresponding to [`RealmDestroyChildRequest`].
7768#[derive(Debug)]
7769#[repr(C)]
7770pub struct WireRealmDestroyChildRequest<'de> {
7771    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
7772}
7773
7774unsafe impl ::fidl_next::Wire for WireRealmDestroyChildRequest<'static> {
7775    type Decoded<'de> = WireRealmDestroyChildRequest<'de>;
7776
7777    #[inline]
7778    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7779}
7780
7781unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmDestroyChildRequest<'static>
7782where
7783    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7784
7785    ___D: ::fidl_next::Decoder,
7786{
7787    fn decode(
7788        slot: ::fidl_next::Slot<'_, Self>,
7789        decoder: &mut ___D,
7790    ) -> Result<(), ::fidl_next::DecodeError> {
7791        ::fidl_next::munge! {
7792            let Self {
7793                mut child,
7794
7795            } = slot;
7796        }
7797
7798        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
7799
7800        Ok(())
7801    }
7802}
7803
7804pub type RealmDestroyChildResponse = ();
7805
7806/// The wire type corresponding to [`RealmDestroyChildResponse`].
7807pub type WireRealmDestroyChildResponse = ();
7808
7809#[derive(Debug)]
7810pub struct RealmListChildrenRequest {
7811    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
7812
7813    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::zx::Channel>,
7814}
7815
7816impl ::fidl_next::Encodable for RealmListChildrenRequest {
7817    type Encoded = WireRealmListChildrenRequest<'static>;
7818}
7819
7820unsafe impl<___E> ::fidl_next::Encode<___E> for RealmListChildrenRequest
7821where
7822    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7823
7824    ___E: ::fidl_next::Encoder,
7825
7826    ___E: ::fidl_next::fuchsia::HandleEncoder,
7827{
7828    #[inline]
7829    fn encode(
7830        self,
7831        encoder: &mut ___E,
7832        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7833    ) -> Result<(), ::fidl_next::EncodeError> {
7834        ::fidl_next::munge! {
7835            let Self::Encoded {
7836                collection,
7837                iter,
7838
7839            } = out;
7840        }
7841
7842        ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
7843
7844        ::fidl_next::Encode::encode(self.iter, encoder, iter)?;
7845
7846        Ok(())
7847    }
7848}
7849
7850impl ::fidl_next::EncodableOption for RealmListChildrenRequest {
7851    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmListChildrenRequest<'static>>;
7852}
7853
7854unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmListChildrenRequest
7855where
7856    ___E: ::fidl_next::Encoder + ?Sized,
7857    RealmListChildrenRequest: ::fidl_next::Encode<___E>,
7858{
7859    #[inline]
7860    fn encode_option(
7861        this: Option<Self>,
7862        encoder: &mut ___E,
7863        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7864    ) -> Result<(), ::fidl_next::EncodeError> {
7865        if let Some(inner) = this {
7866            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7867            ::fidl_next::WireBox::encode_present(out);
7868        } else {
7869            ::fidl_next::WireBox::encode_absent(out);
7870        }
7871
7872        Ok(())
7873    }
7874}
7875
7876impl<'de> ::fidl_next::FromWire<WireRealmListChildrenRequest<'de>> for RealmListChildrenRequest {
7877    #[inline]
7878    fn from_wire(wire: WireRealmListChildrenRequest<'de>) -> Self {
7879        Self {
7880            collection: ::fidl_next::FromWire::from_wire(wire.collection),
7881
7882            iter: ::fidl_next::FromWire::from_wire(wire.iter),
7883        }
7884    }
7885}
7886
7887/// The wire type corresponding to [`RealmListChildrenRequest`].
7888#[derive(Debug)]
7889#[repr(C)]
7890pub struct WireRealmListChildrenRequest<'de> {
7891    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
7892
7893    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
7894}
7895
7896unsafe impl ::fidl_next::Wire for WireRealmListChildrenRequest<'static> {
7897    type Decoded<'de> = WireRealmListChildrenRequest<'de>;
7898
7899    #[inline]
7900    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7901        unsafe {
7902            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
7903        }
7904    }
7905}
7906
7907unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmListChildrenRequest<'static>
7908where
7909    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7910
7911    ___D: ::fidl_next::Decoder,
7912
7913    ___D: ::fidl_next::fuchsia::HandleDecoder,
7914{
7915    fn decode(
7916        slot: ::fidl_next::Slot<'_, Self>,
7917        decoder: &mut ___D,
7918    ) -> Result<(), ::fidl_next::DecodeError> {
7919        ::fidl_next::munge! {
7920            let Self {
7921                mut collection,
7922                mut iter,
7923
7924            } = slot;
7925        }
7926
7927        ::fidl_next::Decode::decode(collection.as_mut(), decoder)?;
7928
7929        ::fidl_next::Decode::decode(iter.as_mut(), decoder)?;
7930
7931        Ok(())
7932    }
7933}
7934
7935pub type RealmListChildrenResponse = ();
7936
7937/// The wire type corresponding to [`RealmListChildrenResponse`].
7938pub type WireRealmListChildrenResponse = ();
7939
7940#[derive(Debug)]
7941pub struct RealmOpenControllerRequest {
7942    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7943
7944    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
7945}
7946
7947impl ::fidl_next::Encodable for RealmOpenControllerRequest {
7948    type Encoded = WireRealmOpenControllerRequest<'static>;
7949}
7950
7951unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenControllerRequest
7952where
7953    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7954
7955    ___E: ::fidl_next::Encoder,
7956
7957    ___E: ::fidl_next::fuchsia::HandleEncoder,
7958{
7959    #[inline]
7960    fn encode(
7961        self,
7962        encoder: &mut ___E,
7963        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7964    ) -> Result<(), ::fidl_next::EncodeError> {
7965        ::fidl_next::munge! {
7966            let Self::Encoded {
7967                child,
7968                controller,
7969
7970            } = out;
7971        }
7972
7973        ::fidl_next::Encode::encode(self.child, encoder, child)?;
7974
7975        ::fidl_next::Encode::encode(self.controller, encoder, controller)?;
7976
7977        Ok(())
7978    }
7979}
7980
7981impl ::fidl_next::EncodableOption for RealmOpenControllerRequest {
7982    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenControllerRequest<'static>>;
7983}
7984
7985unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenControllerRequest
7986where
7987    ___E: ::fidl_next::Encoder + ?Sized,
7988    RealmOpenControllerRequest: ::fidl_next::Encode<___E>,
7989{
7990    #[inline]
7991    fn encode_option(
7992        this: Option<Self>,
7993        encoder: &mut ___E,
7994        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7995    ) -> Result<(), ::fidl_next::EncodeError> {
7996        if let Some(inner) = this {
7997            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7998            ::fidl_next::WireBox::encode_present(out);
7999        } else {
8000            ::fidl_next::WireBox::encode_absent(out);
8001        }
8002
8003        Ok(())
8004    }
8005}
8006
8007impl<'de> ::fidl_next::FromWire<WireRealmOpenControllerRequest<'de>>
8008    for RealmOpenControllerRequest
8009{
8010    #[inline]
8011    fn from_wire(wire: WireRealmOpenControllerRequest<'de>) -> Self {
8012        Self {
8013            child: ::fidl_next::FromWire::from_wire(wire.child),
8014
8015            controller: ::fidl_next::FromWire::from_wire(wire.controller),
8016        }
8017    }
8018}
8019
8020/// The wire type corresponding to [`RealmOpenControllerRequest`].
8021#[derive(Debug)]
8022#[repr(C)]
8023pub struct WireRealmOpenControllerRequest<'de> {
8024    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8025
8026    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
8027}
8028
8029unsafe impl ::fidl_next::Wire for WireRealmOpenControllerRequest<'static> {
8030    type Decoded<'de> = WireRealmOpenControllerRequest<'de>;
8031
8032    #[inline]
8033    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8034        unsafe {
8035            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8036        }
8037    }
8038}
8039
8040unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenControllerRequest<'static>
8041where
8042    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8043
8044    ___D: ::fidl_next::Decoder,
8045
8046    ___D: ::fidl_next::fuchsia::HandleDecoder,
8047{
8048    fn decode(
8049        slot: ::fidl_next::Slot<'_, Self>,
8050        decoder: &mut ___D,
8051    ) -> Result<(), ::fidl_next::DecodeError> {
8052        ::fidl_next::munge! {
8053            let Self {
8054                mut child,
8055                mut controller,
8056
8057            } = slot;
8058        }
8059
8060        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
8061
8062        ::fidl_next::Decode::decode(controller.as_mut(), decoder)?;
8063
8064        Ok(())
8065    }
8066}
8067
8068pub type RealmOpenControllerResponse = ();
8069
8070/// The wire type corresponding to [`RealmOpenControllerResponse`].
8071pub type WireRealmOpenControllerResponse = ();
8072
8073#[derive(Debug)]
8074pub struct RealmOpenExposedDirRequest {
8075    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8076
8077    pub exposed_dir: ::fidl_next::ServerEnd<
8078        ::fidl_next_fuchsia_io::Directory,
8079        ::fidl_next::fuchsia::zx::Channel,
8080    >,
8081}
8082
8083impl ::fidl_next::Encodable for RealmOpenExposedDirRequest {
8084    type Encoded = WireRealmOpenExposedDirRequest<'static>;
8085}
8086
8087unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenExposedDirRequest
8088where
8089    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8090
8091    ___E: ::fidl_next::Encoder,
8092
8093    ___E: ::fidl_next::fuchsia::HandleEncoder,
8094{
8095    #[inline]
8096    fn encode(
8097        self,
8098        encoder: &mut ___E,
8099        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8100    ) -> Result<(), ::fidl_next::EncodeError> {
8101        ::fidl_next::munge! {
8102            let Self::Encoded {
8103                child,
8104                exposed_dir,
8105
8106            } = out;
8107        }
8108
8109        ::fidl_next::Encode::encode(self.child, encoder, child)?;
8110
8111        ::fidl_next::Encode::encode(self.exposed_dir, encoder, exposed_dir)?;
8112
8113        Ok(())
8114    }
8115}
8116
8117impl ::fidl_next::EncodableOption for RealmOpenExposedDirRequest {
8118    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenExposedDirRequest<'static>>;
8119}
8120
8121unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenExposedDirRequest
8122where
8123    ___E: ::fidl_next::Encoder + ?Sized,
8124    RealmOpenExposedDirRequest: ::fidl_next::Encode<___E>,
8125{
8126    #[inline]
8127    fn encode_option(
8128        this: Option<Self>,
8129        encoder: &mut ___E,
8130        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8131    ) -> Result<(), ::fidl_next::EncodeError> {
8132        if let Some(inner) = this {
8133            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8134            ::fidl_next::WireBox::encode_present(out);
8135        } else {
8136            ::fidl_next::WireBox::encode_absent(out);
8137        }
8138
8139        Ok(())
8140    }
8141}
8142
8143impl<'de> ::fidl_next::FromWire<WireRealmOpenExposedDirRequest<'de>>
8144    for RealmOpenExposedDirRequest
8145{
8146    #[inline]
8147    fn from_wire(wire: WireRealmOpenExposedDirRequest<'de>) -> Self {
8148        Self {
8149            child: ::fidl_next::FromWire::from_wire(wire.child),
8150
8151            exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir),
8152        }
8153    }
8154}
8155
8156/// The wire type corresponding to [`RealmOpenExposedDirRequest`].
8157#[derive(Debug)]
8158#[repr(C)]
8159pub struct WireRealmOpenExposedDirRequest<'de> {
8160    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8161
8162    pub exposed_dir: ::fidl_next::ServerEnd<
8163        ::fidl_next_fuchsia_io::Directory,
8164        ::fidl_next::fuchsia::WireChannel,
8165    >,
8166}
8167
8168unsafe impl ::fidl_next::Wire for WireRealmOpenExposedDirRequest<'static> {
8169    type Decoded<'de> = WireRealmOpenExposedDirRequest<'de>;
8170
8171    #[inline]
8172    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8173        unsafe {
8174            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8175        }
8176    }
8177}
8178
8179unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenExposedDirRequest<'static>
8180where
8181    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8182
8183    ___D: ::fidl_next::Decoder,
8184
8185    ___D: ::fidl_next::fuchsia::HandleDecoder,
8186{
8187    fn decode(
8188        slot: ::fidl_next::Slot<'_, Self>,
8189        decoder: &mut ___D,
8190    ) -> Result<(), ::fidl_next::DecodeError> {
8191        ::fidl_next::munge! {
8192            let Self {
8193                mut child,
8194                mut exposed_dir,
8195
8196            } = slot;
8197        }
8198
8199        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
8200
8201        ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder)?;
8202
8203        Ok(())
8204    }
8205}
8206
8207#[derive(Debug)]
8208pub struct RealmCreateChildRequest {
8209    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
8210
8211    pub decl: ::fidl_next_fuchsia_component_decl::Child,
8212
8213    pub args: crate::CreateChildArgs,
8214}
8215
8216impl ::fidl_next::Encodable for RealmCreateChildRequest {
8217    type Encoded = WireRealmCreateChildRequest<'static>;
8218}
8219
8220unsafe impl<___E> ::fidl_next::Encode<___E> for RealmCreateChildRequest
8221where
8222    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8223
8224    ___E: ::fidl_next::Encoder,
8225
8226    ___E: ::fidl_next::fuchsia::HandleEncoder,
8227{
8228    #[inline]
8229    fn encode(
8230        self,
8231        encoder: &mut ___E,
8232        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8233    ) -> Result<(), ::fidl_next::EncodeError> {
8234        ::fidl_next::munge! {
8235            let Self::Encoded {
8236                collection,
8237                decl,
8238                args,
8239
8240            } = out;
8241        }
8242
8243        ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
8244
8245        ::fidl_next::Encode::encode(self.decl, encoder, decl)?;
8246
8247        ::fidl_next::Encode::encode(self.args, encoder, args)?;
8248
8249        Ok(())
8250    }
8251}
8252
8253impl ::fidl_next::EncodableOption for RealmCreateChildRequest {
8254    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmCreateChildRequest<'static>>;
8255}
8256
8257unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmCreateChildRequest
8258where
8259    ___E: ::fidl_next::Encoder + ?Sized,
8260    RealmCreateChildRequest: ::fidl_next::Encode<___E>,
8261{
8262    #[inline]
8263    fn encode_option(
8264        this: Option<Self>,
8265        encoder: &mut ___E,
8266        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8267    ) -> Result<(), ::fidl_next::EncodeError> {
8268        if let Some(inner) = this {
8269            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8270            ::fidl_next::WireBox::encode_present(out);
8271        } else {
8272            ::fidl_next::WireBox::encode_absent(out);
8273        }
8274
8275        Ok(())
8276    }
8277}
8278
8279impl<'de> ::fidl_next::FromWire<WireRealmCreateChildRequest<'de>> for RealmCreateChildRequest {
8280    #[inline]
8281    fn from_wire(wire: WireRealmCreateChildRequest<'de>) -> Self {
8282        Self {
8283            collection: ::fidl_next::FromWire::from_wire(wire.collection),
8284
8285            decl: ::fidl_next::FromWire::from_wire(wire.decl),
8286
8287            args: ::fidl_next::FromWire::from_wire(wire.args),
8288        }
8289    }
8290}
8291
8292/// The wire type corresponding to [`RealmCreateChildRequest`].
8293#[derive(Debug)]
8294#[repr(C)]
8295pub struct WireRealmCreateChildRequest<'de> {
8296    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
8297
8298    pub decl: ::fidl_next_fuchsia_component_decl::WireChild<'de>,
8299
8300    pub args: crate::WireCreateChildArgs<'de>,
8301}
8302
8303unsafe impl ::fidl_next::Wire for WireRealmCreateChildRequest<'static> {
8304    type Decoded<'de> = WireRealmCreateChildRequest<'de>;
8305
8306    #[inline]
8307    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8308}
8309
8310unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmCreateChildRequest<'static>
8311where
8312    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8313
8314    ___D: ::fidl_next::Decoder,
8315
8316    ___D: ::fidl_next::fuchsia::HandleDecoder,
8317{
8318    fn decode(
8319        slot: ::fidl_next::Slot<'_, Self>,
8320        decoder: &mut ___D,
8321    ) -> Result<(), ::fidl_next::DecodeError> {
8322        ::fidl_next::munge! {
8323            let Self {
8324                mut collection,
8325                mut decl,
8326                mut args,
8327
8328            } = slot;
8329        }
8330
8331        ::fidl_next::Decode::decode(collection.as_mut(), decoder)?;
8332
8333        ::fidl_next::Decode::decode(decl.as_mut(), decoder)?;
8334
8335        ::fidl_next::Decode::decode(args.as_mut(), decoder)?;
8336
8337        Ok(())
8338    }
8339}
8340
8341#[derive(Debug)]
8342pub struct RealmGetResolvedInfoResponse {
8343    pub resolved_info: ::fidl_next_fuchsia_component_resolution::Component,
8344}
8345
8346impl ::fidl_next::Encodable for RealmGetResolvedInfoResponse {
8347    type Encoded = WireRealmGetResolvedInfoResponse<'static>;
8348}
8349
8350unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetResolvedInfoResponse
8351where
8352    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8353
8354    ___E: ::fidl_next::Encoder,
8355
8356    ___E: ::fidl_next::fuchsia::HandleEncoder,
8357{
8358    #[inline]
8359    fn encode(
8360        self,
8361        encoder: &mut ___E,
8362        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8363    ) -> Result<(), ::fidl_next::EncodeError> {
8364        ::fidl_next::munge! {
8365            let Self::Encoded {
8366                resolved_info,
8367
8368            } = out;
8369        }
8370
8371        ::fidl_next::Encode::encode(self.resolved_info, encoder, resolved_info)?;
8372
8373        Ok(())
8374    }
8375}
8376
8377impl ::fidl_next::EncodableOption for RealmGetResolvedInfoResponse {
8378    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetResolvedInfoResponse<'static>>;
8379}
8380
8381unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetResolvedInfoResponse
8382where
8383    ___E: ::fidl_next::Encoder + ?Sized,
8384    RealmGetResolvedInfoResponse: ::fidl_next::Encode<___E>,
8385{
8386    #[inline]
8387    fn encode_option(
8388        this: Option<Self>,
8389        encoder: &mut ___E,
8390        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8391    ) -> Result<(), ::fidl_next::EncodeError> {
8392        if let Some(inner) = this {
8393            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8394            ::fidl_next::WireBox::encode_present(out);
8395        } else {
8396            ::fidl_next::WireBox::encode_absent(out);
8397        }
8398
8399        Ok(())
8400    }
8401}
8402
8403impl<'de> ::fidl_next::FromWire<WireRealmGetResolvedInfoResponse<'de>>
8404    for RealmGetResolvedInfoResponse
8405{
8406    #[inline]
8407    fn from_wire(wire: WireRealmGetResolvedInfoResponse<'de>) -> Self {
8408        Self { resolved_info: ::fidl_next::FromWire::from_wire(wire.resolved_info) }
8409    }
8410}
8411
8412/// The wire type corresponding to [`RealmGetResolvedInfoResponse`].
8413#[derive(Debug)]
8414#[repr(C)]
8415pub struct WireRealmGetResolvedInfoResponse<'de> {
8416    pub resolved_info: ::fidl_next_fuchsia_component_resolution::WireComponent<'de>,
8417}
8418
8419unsafe impl ::fidl_next::Wire for WireRealmGetResolvedInfoResponse<'static> {
8420    type Decoded<'de> = WireRealmGetResolvedInfoResponse<'de>;
8421
8422    #[inline]
8423    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8424}
8425
8426unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetResolvedInfoResponse<'static>
8427where
8428    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8429
8430    ___D: ::fidl_next::Decoder,
8431
8432    ___D: ::fidl_next::fuchsia::HandleDecoder,
8433{
8434    fn decode(
8435        slot: ::fidl_next::Slot<'_, Self>,
8436        decoder: &mut ___D,
8437    ) -> Result<(), ::fidl_next::DecodeError> {
8438        ::fidl_next::munge! {
8439            let Self {
8440                mut resolved_info,
8441
8442            } = slot;
8443        }
8444
8445        ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder)?;
8446
8447        Ok(())
8448    }
8449}
8450
8451#[derive(Debug)]
8452pub struct RealmGetChildOutputDictionaryRequest {
8453    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8454}
8455
8456impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryRequest {
8457    type Encoded = WireRealmGetChildOutputDictionaryRequest<'static>;
8458}
8459
8460unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryRequest
8461where
8462    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8463
8464    ___E: ::fidl_next::Encoder,
8465
8466    ___E: ::fidl_next::fuchsia::HandleEncoder,
8467{
8468    #[inline]
8469    fn encode(
8470        self,
8471        encoder: &mut ___E,
8472        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8473    ) -> Result<(), ::fidl_next::EncodeError> {
8474        ::fidl_next::munge! {
8475            let Self::Encoded {
8476                child,
8477
8478            } = out;
8479        }
8480
8481        ::fidl_next::Encode::encode(self.child, encoder, child)?;
8482
8483        Ok(())
8484    }
8485}
8486
8487impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryRequest {
8488    type EncodedOption =
8489        ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryRequest<'static>>;
8490}
8491
8492unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryRequest
8493where
8494    ___E: ::fidl_next::Encoder + ?Sized,
8495    RealmGetChildOutputDictionaryRequest: ::fidl_next::Encode<___E>,
8496{
8497    #[inline]
8498    fn encode_option(
8499        this: Option<Self>,
8500        encoder: &mut ___E,
8501        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8502    ) -> Result<(), ::fidl_next::EncodeError> {
8503        if let Some(inner) = this {
8504            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8505            ::fidl_next::WireBox::encode_present(out);
8506        } else {
8507            ::fidl_next::WireBox::encode_absent(out);
8508        }
8509
8510        Ok(())
8511    }
8512}
8513
8514impl<'de> ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryRequest<'de>>
8515    for RealmGetChildOutputDictionaryRequest
8516{
8517    #[inline]
8518    fn from_wire(wire: WireRealmGetChildOutputDictionaryRequest<'de>) -> Self {
8519        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
8520    }
8521}
8522
8523/// The wire type corresponding to [`RealmGetChildOutputDictionaryRequest`].
8524#[derive(Debug)]
8525#[repr(C)]
8526pub struct WireRealmGetChildOutputDictionaryRequest<'de> {
8527    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8528}
8529
8530unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryRequest<'static> {
8531    type Decoded<'de> = WireRealmGetChildOutputDictionaryRequest<'de>;
8532
8533    #[inline]
8534    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8535}
8536
8537unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryRequest<'static>
8538where
8539    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8540
8541    ___D: ::fidl_next::Decoder,
8542
8543    ___D: ::fidl_next::fuchsia::HandleDecoder,
8544{
8545    fn decode(
8546        slot: ::fidl_next::Slot<'_, Self>,
8547        decoder: &mut ___D,
8548    ) -> Result<(), ::fidl_next::DecodeError> {
8549        ::fidl_next::munge! {
8550            let Self {
8551                mut child,
8552
8553            } = slot;
8554        }
8555
8556        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
8557
8558        Ok(())
8559    }
8560}
8561
8562#[derive(Debug)]
8563#[repr(C)]
8564pub struct RealmGetChildOutputDictionaryResponse {
8565    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
8566}
8567
8568impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryResponse {
8569    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8570        Self,
8571        WireRealmGetChildOutputDictionaryResponse,
8572    > = unsafe {
8573        ::fidl_next::CopyOptimization::enable_if(
8574            true
8575
8576                && <
8577                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
8578                >::COPY_OPTIMIZATION.is_enabled()
8579
8580        )
8581    };
8582
8583    type Encoded = WireRealmGetChildOutputDictionaryResponse;
8584}
8585
8586unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryResponse
8587where
8588    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8589
8590    ___E: ::fidl_next::fuchsia::HandleEncoder,
8591{
8592    #[inline]
8593    fn encode(
8594        self,
8595        encoder: &mut ___E,
8596        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8597    ) -> Result<(), ::fidl_next::EncodeError> {
8598        ::fidl_next::munge! {
8599            let Self::Encoded {
8600                dictionary,
8601
8602            } = out;
8603        }
8604
8605        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
8606
8607        Ok(())
8608    }
8609}
8610
8611impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryResponse {
8612    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryResponse>;
8613}
8614
8615unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryResponse
8616where
8617    ___E: ::fidl_next::Encoder + ?Sized,
8618    RealmGetChildOutputDictionaryResponse: ::fidl_next::Encode<___E>,
8619{
8620    #[inline]
8621    fn encode_option(
8622        this: Option<Self>,
8623        encoder: &mut ___E,
8624        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8625    ) -> Result<(), ::fidl_next::EncodeError> {
8626        if let Some(inner) = this {
8627            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8628            ::fidl_next::WireBox::encode_present(out);
8629        } else {
8630            ::fidl_next::WireBox::encode_absent(out);
8631        }
8632
8633        Ok(())
8634    }
8635}
8636
8637impl ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryResponse>
8638    for RealmGetChildOutputDictionaryResponse
8639{
8640    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8641        WireRealmGetChildOutputDictionaryResponse,
8642        Self,
8643    > = unsafe {
8644        ::fidl_next::CopyOptimization::enable_if(
8645            true
8646
8647                && <
8648                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
8649                >::COPY_OPTIMIZATION.is_enabled()
8650
8651        )
8652    };
8653
8654    #[inline]
8655    fn from_wire(wire: WireRealmGetChildOutputDictionaryResponse) -> Self {
8656        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
8657    }
8658}
8659
8660/// The wire type corresponding to [`RealmGetChildOutputDictionaryResponse`].
8661#[derive(Debug)]
8662#[repr(C)]
8663pub struct WireRealmGetChildOutputDictionaryResponse {
8664    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
8665}
8666
8667unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryResponse {
8668    type Decoded<'de> = WireRealmGetChildOutputDictionaryResponse;
8669
8670    #[inline]
8671    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8672}
8673
8674unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryResponse
8675where
8676    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8677
8678    ___D: ::fidl_next::fuchsia::HandleDecoder,
8679{
8680    fn decode(
8681        slot: ::fidl_next::Slot<'_, Self>,
8682        decoder: &mut ___D,
8683    ) -> Result<(), ::fidl_next::DecodeError> {
8684        ::fidl_next::munge! {
8685            let Self {
8686                mut dictionary,
8687
8688            } = slot;
8689        }
8690
8691        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
8692
8693        Ok(())
8694    }
8695}
8696
8697/// The type corresponding to the Realm protocol.
8698#[doc = " A protocol used by a component instance to manage its own realm, such as for\n binding to its children.\n\n Requests to this protocol are processed in the order they are received.\n Clients that wish to send requests in parallel should open multiple\n connections.\n\n The component framework provides this service to components that use\n `fuchsia.component.Realm`.\n"]
8699#[derive(Debug)]
8700pub struct Realm;
8701
8702impl ::fidl_next::Discoverable for Realm {
8703    const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
8704}
8705
8706pub mod realm {
8707    pub mod prelude {
8708        pub use crate::{realm, Realm, RealmClientHandler, RealmServerHandler};
8709
8710        pub use crate::Error;
8711
8712        pub use crate::RealmCreateChildRequest;
8713
8714        pub use crate::RealmDestroyChildRequest;
8715
8716        pub use crate::RealmGetChildOutputDictionaryRequest;
8717
8718        pub use crate::RealmListChildrenRequest;
8719
8720        pub use crate::RealmOpenControllerRequest;
8721
8722        pub use crate::RealmOpenExposedDirRequest;
8723
8724        pub use crate::RealmCreateChildResponse;
8725
8726        pub use crate::RealmDestroyChildResponse;
8727
8728        pub use crate::RealmGetChildOutputDictionaryResponse;
8729
8730        pub use crate::RealmGetResolvedInfoResponse;
8731
8732        pub use crate::RealmListChildrenResponse;
8733
8734        pub use crate::RealmOpenControllerResponse;
8735
8736        pub use crate::RealmOpenExposedDirResponse;
8737    }
8738
8739    pub struct OpenController;
8740
8741    impl ::fidl_next::Method for OpenController {
8742        const ORDINAL: u64 = 8165227925828473216;
8743
8744        type Protocol = crate::Realm;
8745
8746        type Request = crate::WireRealmOpenControllerRequest<'static>;
8747
8748        type Response = ::fidl_next::WireResult<
8749            'static,
8750            crate::WireRealmOpenControllerResponse,
8751            crate::WireError,
8752        >;
8753    }
8754
8755    pub struct OpenExposedDir;
8756
8757    impl ::fidl_next::Method for OpenExposedDir {
8758        const ORDINAL: u64 = 9194435320863127852;
8759
8760        type Protocol = crate::Realm;
8761
8762        type Request = crate::WireRealmOpenExposedDirRequest<'static>;
8763
8764        type Response = ::fidl_next::WireResult<
8765            'static,
8766            crate::WireRealmOpenExposedDirResponse,
8767            crate::WireError,
8768        >;
8769    }
8770
8771    pub struct CreateChild;
8772
8773    impl ::fidl_next::Method for CreateChild {
8774        const ORDINAL: u64 = 4892190024503489888;
8775
8776        type Protocol = crate::Realm;
8777
8778        type Request = crate::WireRealmCreateChildRequest<'static>;
8779
8780        type Response =
8781            ::fidl_next::WireResult<'static, crate::WireRealmCreateChildResponse, crate::WireError>;
8782    }
8783
8784    pub struct DestroyChild;
8785
8786    impl ::fidl_next::Method for DestroyChild {
8787        const ORDINAL: u64 = 8203529889988252194;
8788
8789        type Protocol = crate::Realm;
8790
8791        type Request = crate::WireRealmDestroyChildRequest<'static>;
8792
8793        type Response = ::fidl_next::WireResult<
8794            'static,
8795            crate::WireRealmDestroyChildResponse,
8796            crate::WireError,
8797        >;
8798    }
8799
8800    pub struct ListChildren;
8801
8802    impl ::fidl_next::Method for ListChildren {
8803        const ORDINAL: u64 = 7532454435519185057;
8804
8805        type Protocol = crate::Realm;
8806
8807        type Request = crate::WireRealmListChildrenRequest<'static>;
8808
8809        type Response = ::fidl_next::WireResult<
8810            'static,
8811            crate::WireRealmListChildrenResponse,
8812            crate::WireError,
8813        >;
8814    }
8815
8816    pub struct GetResolvedInfo;
8817
8818    impl ::fidl_next::Method for GetResolvedInfo {
8819        const ORDINAL: u64 = 8308987710372188322;
8820
8821        type Protocol = crate::Realm;
8822
8823        type Request = ();
8824
8825        type Response = ::fidl_next::WireResult<
8826            'static,
8827            crate::WireRealmGetResolvedInfoResponse<'static>,
8828            crate::WireError,
8829        >;
8830    }
8831
8832    pub struct GetChildOutputDictionary;
8833
8834    impl ::fidl_next::Method for GetChildOutputDictionary {
8835        const ORDINAL: u64 = 4781081784078915088;
8836
8837        type Protocol = crate::Realm;
8838
8839        type Request = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
8840
8841        type Response = ::fidl_next::WireResult<
8842            'static,
8843            crate::WireRealmGetChildOutputDictionaryResponse,
8844            crate::WireError,
8845        >;
8846    }
8847
8848    mod ___detail {
8849
8850        pub struct OpenController<T0, T1> {
8851            child: T0,
8852
8853            controller: T1,
8854        }
8855
8856        impl<T0, T1> ::fidl_next::Encodable for OpenController<T0, T1>
8857        where
8858            T0: ::fidl_next::Encodable<
8859                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8860            >,
8861
8862            T1: ::fidl_next::Encodable<
8863                Encoded = ::fidl_next::ServerEnd<
8864                    crate::Controller,
8865                    ::fidl_next::fuchsia::WireChannel,
8866                >,
8867            >,
8868        {
8869            type Encoded = crate::WireRealmOpenControllerRequest<'static>;
8870        }
8871
8872        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenController<T0, T1>
8873        where
8874            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8875
8876            ___E: ::fidl_next::Encoder,
8877
8878            ___E: ::fidl_next::fuchsia::HandleEncoder,
8879
8880            T0: ::fidl_next::Encode<
8881                ___E,
8882                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8883            >,
8884
8885            T1: ::fidl_next::Encode<
8886                ___E,
8887                Encoded = ::fidl_next::ServerEnd<
8888                    crate::Controller,
8889                    ::fidl_next::fuchsia::WireChannel,
8890                >,
8891            >,
8892        {
8893            #[inline]
8894            fn encode(
8895                self,
8896                encoder: &mut ___E,
8897                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8898            ) -> Result<(), ::fidl_next::EncodeError> {
8899                ::fidl_next::munge! {
8900                    let Self::Encoded {
8901                        child,
8902                        controller,
8903
8904                    } = out;
8905                }
8906
8907                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8908
8909                ::fidl_next::Encode::encode(self.controller, encoder, controller)?;
8910
8911                Ok(())
8912            }
8913        }
8914
8915        pub struct OpenExposedDir<T0, T1> {
8916            child: T0,
8917
8918            exposed_dir: T1,
8919        }
8920
8921        impl<T0, T1> ::fidl_next::Encodable for OpenExposedDir<T0, T1>
8922        where
8923            T0: ::fidl_next::Encodable<
8924                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8925            >,
8926
8927            T1: ::fidl_next::Encodable<
8928                Encoded = ::fidl_next::ServerEnd<
8929                    ::fidl_next_fuchsia_io::Directory,
8930                    ::fidl_next::fuchsia::WireChannel,
8931                >,
8932            >,
8933        {
8934            type Encoded = crate::WireRealmOpenExposedDirRequest<'static>;
8935        }
8936
8937        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenExposedDir<T0, T1>
8938        where
8939            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8940
8941            ___E: ::fidl_next::Encoder,
8942
8943            ___E: ::fidl_next::fuchsia::HandleEncoder,
8944
8945            T0: ::fidl_next::Encode<
8946                ___E,
8947                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8948            >,
8949
8950            T1: ::fidl_next::Encode<
8951                ___E,
8952                Encoded = ::fidl_next::ServerEnd<
8953                    ::fidl_next_fuchsia_io::Directory,
8954                    ::fidl_next::fuchsia::WireChannel,
8955                >,
8956            >,
8957        {
8958            #[inline]
8959            fn encode(
8960                self,
8961                encoder: &mut ___E,
8962                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8963            ) -> Result<(), ::fidl_next::EncodeError> {
8964                ::fidl_next::munge! {
8965                    let Self::Encoded {
8966                        child,
8967                        exposed_dir,
8968
8969                    } = out;
8970                }
8971
8972                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8973
8974                ::fidl_next::Encode::encode(self.exposed_dir, encoder, exposed_dir)?;
8975
8976                Ok(())
8977            }
8978        }
8979
8980        pub struct CreateChild<T0, T1, T2> {
8981            collection: T0,
8982
8983            decl: T1,
8984
8985            args: T2,
8986        }
8987
8988        impl<T0, T1, T2> ::fidl_next::Encodable for CreateChild<T0, T1, T2>
8989        where
8990            T0: ::fidl_next::Encodable<
8991                Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
8992            >,
8993
8994            T1: ::fidl_next::Encodable<
8995                Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
8996            >,
8997
8998            T2: ::fidl_next::Encodable<Encoded = crate::WireCreateChildArgs<'static>>,
8999        {
9000            type Encoded = crate::WireRealmCreateChildRequest<'static>;
9001        }
9002
9003        unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for CreateChild<T0, T1, T2>
9004        where
9005            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9006
9007            ___E: ::fidl_next::Encoder,
9008
9009            ___E: ::fidl_next::fuchsia::HandleEncoder,
9010
9011            T0: ::fidl_next::Encode<
9012                ___E,
9013                Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9014            >,
9015
9016            T1: ::fidl_next::Encode<
9017                ___E,
9018                Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9019            >,
9020
9021            T2: ::fidl_next::Encode<___E, Encoded = crate::WireCreateChildArgs<'static>>,
9022        {
9023            #[inline]
9024            fn encode(
9025                self,
9026                encoder: &mut ___E,
9027                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9028            ) -> Result<(), ::fidl_next::EncodeError> {
9029                ::fidl_next::munge! {
9030                    let Self::Encoded {
9031                        collection,
9032                        decl,
9033                        args,
9034
9035                    } = out;
9036                }
9037
9038                ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
9039
9040                ::fidl_next::Encode::encode(self.decl, encoder, decl)?;
9041
9042                ::fidl_next::Encode::encode(self.args, encoder, args)?;
9043
9044                Ok(())
9045            }
9046        }
9047
9048        pub struct DestroyChild<T0> {
9049            child: T0,
9050        }
9051
9052        impl<T0> ::fidl_next::Encodable for DestroyChild<T0>
9053        where
9054            T0: ::fidl_next::Encodable<
9055                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9056            >,
9057        {
9058            type Encoded = crate::WireRealmDestroyChildRequest<'static>;
9059        }
9060
9061        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DestroyChild<T0>
9062        where
9063            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9064
9065            ___E: ::fidl_next::Encoder,
9066
9067            T0: ::fidl_next::Encode<
9068                ___E,
9069                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9070            >,
9071        {
9072            #[inline]
9073            fn encode(
9074                self,
9075                encoder: &mut ___E,
9076                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9077            ) -> Result<(), ::fidl_next::EncodeError> {
9078                ::fidl_next::munge! {
9079                    let Self::Encoded {
9080                        child,
9081
9082                    } = out;
9083                }
9084
9085                ::fidl_next::Encode::encode(self.child, encoder, child)?;
9086
9087                Ok(())
9088            }
9089        }
9090
9091        pub struct ListChildren<T0, T1> {
9092            collection: T0,
9093
9094            iter: T1,
9095        }
9096
9097        impl<T0, T1> ::fidl_next::Encodable for ListChildren<T0, T1>
9098        where
9099            T0: ::fidl_next::Encodable<
9100                Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9101            >,
9102
9103            T1: ::fidl_next::Encodable<
9104                Encoded = ::fidl_next::ServerEnd<
9105                    crate::ChildIterator,
9106                    ::fidl_next::fuchsia::WireChannel,
9107                >,
9108            >,
9109        {
9110            type Encoded = crate::WireRealmListChildrenRequest<'static>;
9111        }
9112
9113        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListChildren<T0, T1>
9114        where
9115            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9116
9117            ___E: ::fidl_next::Encoder,
9118
9119            ___E: ::fidl_next::fuchsia::HandleEncoder,
9120
9121            T0: ::fidl_next::Encode<
9122                ___E,
9123                Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9124            >,
9125
9126            T1: ::fidl_next::Encode<
9127                ___E,
9128                Encoded = ::fidl_next::ServerEnd<
9129                    crate::ChildIterator,
9130                    ::fidl_next::fuchsia::WireChannel,
9131                >,
9132            >,
9133        {
9134            #[inline]
9135            fn encode(
9136                self,
9137                encoder: &mut ___E,
9138                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9139            ) -> Result<(), ::fidl_next::EncodeError> {
9140                ::fidl_next::munge! {
9141                    let Self::Encoded {
9142                        collection,
9143                        iter,
9144
9145                    } = out;
9146                }
9147
9148                ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
9149
9150                ::fidl_next::Encode::encode(self.iter, encoder, iter)?;
9151
9152                Ok(())
9153            }
9154        }
9155
9156        pub struct GetChildOutputDictionary<T0> {
9157            child: T0,
9158        }
9159
9160        impl<T0> ::fidl_next::Encodable for GetChildOutputDictionary<T0>
9161        where
9162            T0: ::fidl_next::Encodable<
9163                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9164            >,
9165        {
9166            type Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
9167        }
9168
9169        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetChildOutputDictionary<T0>
9170        where
9171            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9172
9173            ___E: ::fidl_next::Encoder,
9174
9175            ___E: ::fidl_next::fuchsia::HandleEncoder,
9176
9177            T0: ::fidl_next::Encode<
9178                ___E,
9179                Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9180            >,
9181        {
9182            #[inline]
9183            fn encode(
9184                self,
9185                encoder: &mut ___E,
9186                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9187            ) -> Result<(), ::fidl_next::EncodeError> {
9188                ::fidl_next::munge! {
9189                    let Self::Encoded {
9190                        child,
9191
9192                    } = out;
9193                }
9194
9195                ::fidl_next::Encode::encode(self.child, encoder, child)?;
9196
9197                Ok(())
9198            }
9199        }
9200
9201        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Realm
9202        where
9203            ___T: ::fidl_next::Transport,
9204        {
9205            type ClientSender = RealmClientSender<___T>;
9206            type ServerSender = RealmServerSender<___T>;
9207        }
9208
9209        /// The client sender for the `Realm` protocol.
9210        pub struct RealmClientSender<___T: ::fidl_next::Transport> {
9211            #[allow(dead_code)]
9212            sender: ::fidl_next::protocol::ClientSender<___T>,
9213        }
9214
9215        impl<___T> RealmClientSender<___T>
9216        where
9217            ___T: ::fidl_next::Transport,
9218        {
9219            #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9220            pub fn open_controller(
9221                &self,
9222
9223                child: impl ::fidl_next::Encode<
9224                    <___T as ::fidl_next::Transport>::SendBuffer,
9225                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9226                >,
9227
9228                controller: impl ::fidl_next::Encode<
9229                    <___T as ::fidl_next::Transport>::SendBuffer,
9230                    Encoded = ::fidl_next::ServerEnd<
9231                        crate::Controller,
9232                        ::fidl_next::fuchsia::WireChannel,
9233                    >,
9234                >,
9235            ) -> Result<
9236                ::fidl_next::ResponseFuture<'_, super::OpenController, ___T>,
9237                ::fidl_next::EncodeError,
9238            >
9239            where
9240                <___T as ::fidl_next::Transport>::SendBuffer:
9241                    ::fidl_next::encoder::InternalHandleEncoder,
9242
9243                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9244
9245                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9246            {
9247                self.open_controller_with(OpenController { child, controller })
9248            }
9249
9250            #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9251            pub fn open_controller_with<___R>(
9252                &self,
9253                request: ___R,
9254            ) -> Result<
9255                ::fidl_next::ResponseFuture<'_, super::OpenController, ___T>,
9256                ::fidl_next::EncodeError,
9257            >
9258            where
9259                ___R: ::fidl_next::Encode<
9260                    <___T as ::fidl_next::Transport>::SendBuffer,
9261                    Encoded = crate::WireRealmOpenControllerRequest<'static>,
9262                >,
9263            {
9264                self.sender
9265                    .send_two_way(8165227925828473216, request)
9266                    .map(::fidl_next::ResponseFuture::from_untyped)
9267            }
9268
9269            #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9270            pub fn open_exposed_dir(
9271                &self,
9272
9273                child: impl ::fidl_next::Encode<
9274                    <___T as ::fidl_next::Transport>::SendBuffer,
9275                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9276                >,
9277
9278                exposed_dir: impl ::fidl_next::Encode<
9279                    <___T as ::fidl_next::Transport>::SendBuffer,
9280                    Encoded = ::fidl_next::ServerEnd<
9281                        ::fidl_next_fuchsia_io::Directory,
9282                        ::fidl_next::fuchsia::WireChannel,
9283                    >,
9284                >,
9285            ) -> Result<
9286                ::fidl_next::ResponseFuture<'_, super::OpenExposedDir, ___T>,
9287                ::fidl_next::EncodeError,
9288            >
9289            where
9290                <___T as ::fidl_next::Transport>::SendBuffer:
9291                    ::fidl_next::encoder::InternalHandleEncoder,
9292
9293                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9294
9295                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9296            {
9297                self.open_exposed_dir_with(OpenExposedDir { child, exposed_dir })
9298            }
9299
9300            #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9301            pub fn open_exposed_dir_with<___R>(
9302                &self,
9303                request: ___R,
9304            ) -> Result<
9305                ::fidl_next::ResponseFuture<'_, super::OpenExposedDir, ___T>,
9306                ::fidl_next::EncodeError,
9307            >
9308            where
9309                ___R: ::fidl_next::Encode<
9310                    <___T as ::fidl_next::Transport>::SendBuffer,
9311                    Encoded = crate::WireRealmOpenExposedDirRequest<'static>,
9312                >,
9313            {
9314                self.sender
9315                    .send_two_way(9194435320863127852, request)
9316                    .map(::fidl_next::ResponseFuture::from_untyped)
9317            }
9318
9319            #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n   is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n   in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9320            pub fn create_child(
9321                &self,
9322
9323                collection: impl ::fidl_next::Encode<
9324                    <___T as ::fidl_next::Transport>::SendBuffer,
9325                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9326                >,
9327
9328                decl: impl ::fidl_next::Encode<
9329                    <___T as ::fidl_next::Transport>::SendBuffer,
9330                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9331                >,
9332
9333                args: impl ::fidl_next::Encode<
9334                    <___T as ::fidl_next::Transport>::SendBuffer,
9335                    Encoded = crate::WireCreateChildArgs<'static>,
9336                >,
9337            ) -> Result<
9338                ::fidl_next::ResponseFuture<'_, super::CreateChild, ___T>,
9339                ::fidl_next::EncodeError,
9340            >
9341            where
9342                <___T as ::fidl_next::Transport>::SendBuffer:
9343                    ::fidl_next::encoder::InternalHandleEncoder,
9344
9345                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9346
9347                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9348            {
9349                self.create_child_with(CreateChild { collection, decl, args })
9350            }
9351
9352            #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n   is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n   in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9353            pub fn create_child_with<___R>(
9354                &self,
9355                request: ___R,
9356            ) -> Result<
9357                ::fidl_next::ResponseFuture<'_, super::CreateChild, ___T>,
9358                ::fidl_next::EncodeError,
9359            >
9360            where
9361                ___R: ::fidl_next::Encode<
9362                    <___T as ::fidl_next::Transport>::SendBuffer,
9363                    Encoded = crate::WireRealmCreateChildRequest<'static>,
9364                >,
9365            {
9366                self.sender
9367                    .send_two_way(4892190024503489888, request)
9368                    .map(::fidl_next::ResponseFuture::from_untyped)
9369            }
9370
9371            #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running.  However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n   to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9372            pub fn destroy_child(
9373                &self,
9374
9375                child: impl ::fidl_next::Encode<
9376                    <___T as ::fidl_next::Transport>::SendBuffer,
9377                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9378                >,
9379            ) -> Result<
9380                ::fidl_next::ResponseFuture<'_, super::DestroyChild, ___T>,
9381                ::fidl_next::EncodeError,
9382            >
9383            where
9384                <___T as ::fidl_next::Transport>::SendBuffer:
9385                    ::fidl_next::encoder::InternalHandleEncoder,
9386
9387                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9388            {
9389                self.destroy_child_with(DestroyChild { child })
9390            }
9391
9392            #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running.  However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n   to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9393            pub fn destroy_child_with<___R>(
9394                &self,
9395                request: ___R,
9396            ) -> Result<
9397                ::fidl_next::ResponseFuture<'_, super::DestroyChild, ___T>,
9398                ::fidl_next::EncodeError,
9399            >
9400            where
9401                ___R: ::fidl_next::Encode<
9402                    <___T as ::fidl_next::Transport>::SendBuffer,
9403                    Encoded = crate::WireRealmDestroyChildRequest<'static>,
9404                >,
9405            {
9406                self.sender
9407                    .send_two_way(8203529889988252194, request)
9408                    .map(::fidl_next::ResponseFuture::from_untyped)
9409            }
9410
9411            #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n   return `ACCESS_DENIED` or component manager may close `iter`.\n"]
9412            pub fn list_children(
9413                &self,
9414
9415                collection: impl ::fidl_next::Encode<
9416                    <___T as ::fidl_next::Transport>::SendBuffer,
9417                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9418                >,
9419
9420                iter: impl ::fidl_next::Encode<
9421                    <___T as ::fidl_next::Transport>::SendBuffer,
9422                    Encoded = ::fidl_next::ServerEnd<
9423                        crate::ChildIterator,
9424                        ::fidl_next::fuchsia::WireChannel,
9425                    >,
9426                >,
9427            ) -> Result<
9428                ::fidl_next::ResponseFuture<'_, super::ListChildren, ___T>,
9429                ::fidl_next::EncodeError,
9430            >
9431            where
9432                <___T as ::fidl_next::Transport>::SendBuffer:
9433                    ::fidl_next::encoder::InternalHandleEncoder,
9434
9435                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9436
9437                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9438            {
9439                self.list_children_with(ListChildren { collection, iter })
9440            }
9441
9442            #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n   return `ACCESS_DENIED` or component manager may close `iter`.\n"]
9443            pub fn list_children_with<___R>(
9444                &self,
9445                request: ___R,
9446            ) -> Result<
9447                ::fidl_next::ResponseFuture<'_, super::ListChildren, ___T>,
9448                ::fidl_next::EncodeError,
9449            >
9450            where
9451                ___R: ::fidl_next::Encode<
9452                    <___T as ::fidl_next::Transport>::SendBuffer,
9453                    Encoded = crate::WireRealmListChildrenRequest<'static>,
9454                >,
9455            {
9456                self.sender
9457                    .send_two_way(7532454435519185057, request)
9458                    .map(::fidl_next::ResponseFuture::from_untyped)
9459            }
9460
9461            #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9462            pub fn get_resolved_info(
9463                &self,
9464            ) -> Result<
9465                ::fidl_next::ResponseFuture<'_, super::GetResolvedInfo, ___T>,
9466                ::fidl_next::EncodeError,
9467            > {
9468                self.sender
9469                    .send_two_way(8308987710372188322, ())
9470                    .map(::fidl_next::ResponseFuture::from_untyped)
9471            }
9472
9473            pub fn get_child_output_dictionary(
9474                &self,
9475
9476                child: impl ::fidl_next::Encode<
9477                    <___T as ::fidl_next::Transport>::SendBuffer,
9478                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9479                >,
9480            ) -> Result<
9481                ::fidl_next::ResponseFuture<'_, super::GetChildOutputDictionary, ___T>,
9482                ::fidl_next::EncodeError,
9483            >
9484            where
9485                <___T as ::fidl_next::Transport>::SendBuffer:
9486                    ::fidl_next::encoder::InternalHandleEncoder,
9487
9488                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9489
9490                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9491            {
9492                self.get_child_output_dictionary_with(GetChildOutputDictionary { child })
9493            }
9494
9495            pub fn get_child_output_dictionary_with<___R>(
9496                &self,
9497                request: ___R,
9498            ) -> Result<
9499                ::fidl_next::ResponseFuture<'_, super::GetChildOutputDictionary, ___T>,
9500                ::fidl_next::EncodeError,
9501            >
9502            where
9503                ___R: ::fidl_next::Encode<
9504                    <___T as ::fidl_next::Transport>::SendBuffer,
9505                    Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>,
9506                >,
9507            {
9508                self.sender
9509                    .send_two_way(4781081784078915088, request)
9510                    .map(::fidl_next::ResponseFuture::from_untyped)
9511            }
9512        }
9513
9514        /// The server sender for the `Realm` protocol.
9515        #[repr(transparent)]
9516        pub struct RealmServerSender<___T: ::fidl_next::Transport> {
9517            sender: ::fidl_next::protocol::ServerSender<___T>,
9518        }
9519
9520        impl<___T> RealmServerSender<___T> where ___T: ::fidl_next::Transport {}
9521    }
9522}
9523
9524/// A client handler for the Realm protocol.
9525///
9526/// See [`Realm`] for more details.
9527pub trait RealmClientHandler<___T: ::fidl_next::Transport> {}
9528
9529impl<___H, ___T> ::fidl_next::ClientProtocol<___H, ___T> for Realm
9530where
9531    ___H: RealmClientHandler<___T> + Send,
9532    ___T: ::fidl_next::Transport,
9533
9534    <realm::OpenController as ::fidl_next::Method>::Response:
9535        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9536
9537    <realm::OpenExposedDir as ::fidl_next::Method>::Response:
9538        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9539
9540    <realm::CreateChild as ::fidl_next::Method>::Response:
9541        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9542
9543    <realm::DestroyChild as ::fidl_next::Method>::Response:
9544        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9545
9546    <realm::ListChildren as ::fidl_next::Method>::Response:
9547        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9548
9549    <realm::GetResolvedInfo as ::fidl_next::Method>::Response:
9550        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9551
9552    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Response:
9553        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9554{
9555    async fn on_event(
9556        handler: &mut ___H,
9557        sender: &::fidl_next::ClientSender<Self, ___T>,
9558        ordinal: u64,
9559        buffer: ___T::RecvBuffer,
9560    ) {
9561        match ordinal {
9562            ordinal => {
9563                sender.close();
9564            }
9565        }
9566    }
9567}
9568
9569/// A server handler for the Realm protocol.
9570///
9571/// See [`Realm`] for more details.
9572pub trait RealmServerHandler<___T: ::fidl_next::Transport> {
9573    #[doc = " Operate on a child component. See documentation for [`Controller`].\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9574    fn open_controller(
9575        &mut self,
9576        sender: &::fidl_next::ServerSender<Realm, ___T>,
9577
9578        request: ::fidl_next::Request<realm::OpenController, ___T>,
9579
9580        responder: ::fidl_next::Responder<realm::OpenController>,
9581    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9582
9583    #[doc = " Opens the exposed directory of a child component instance. When this\n function successfully returns, `exposed_dir` is bound to a directory\n that contains the capabilities which the child exposed to its realm\n via `ComponentDecl.exposes` (specified via \"expose\" declarations in\n the component\'s manifest). The child component will not start as a\n result of this call. Instead, starting will occur iff the parent binds\n to one of the capabilities contained within `exposed_dir`.\n\n `exposed_dir` is open as long as `child` exists.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid child reference.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9584    fn open_exposed_dir(
9585        &mut self,
9586        sender: &::fidl_next::ServerSender<Realm, ___T>,
9587
9588        request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
9589
9590        responder: ::fidl_next::Responder<realm::OpenExposedDir>,
9591    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9592
9593    #[doc = " Creates a child component instance dynamically. When this function\n returns successfully, the instance exists, but it may not be running.\n\n The environment of the child instance is determined by the environment\n of the collection. `decl` must not set `environment`.\n\n If `decl.startup == EAGER`, or `collection.durability == SINGLE_RUN`,\n [CreateChild] will start the component and return once the component is\n started. Otherwise, [CreateChild] will return immediately after creating\n the component and will not start or resolve it.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `child`\n   is not a valid declaration.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_ALREADY_EXISTS`: `decl.name` already exists in `collection`.\n - `INSTANCE_CANNOT_RESOLVE`: `child`\'s component declaration failed to resolve\n   in a `SingleRun` collection.\n - `NO_SPACE`: Could not allocate storage for the new instance.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9594    fn create_child(
9595        &mut self,
9596        sender: &::fidl_next::ServerSender<Realm, ___T>,
9597
9598        request: ::fidl_next::Request<realm::CreateChild, ___T>,
9599
9600        responder: ::fidl_next::Responder<realm::CreateChild>,
9601    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9602
9603    #[doc = " Destroys a dynamically-created component instance. When this function\n returns, the instance is destroyed and has stopped running.  However,\n cleanup of the component\'s resources (such as its isolated storage) may\n happen in the background after this function returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `child` is not a valid reference or does not refer\n   to a dynamic instance.\n - `INSTANCE_NOT_FOUND`: `child` does not exist.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n"]
9604    fn destroy_child(
9605        &mut self,
9606        sender: &::fidl_next::ServerSender<Realm, ___T>,
9607
9608        request: ::fidl_next::Request<realm::DestroyChild, ___T>,
9609
9610        responder: ::fidl_next::Responder<realm::DestroyChild>,
9611    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9612
9613    #[doc = " Returns an iterator that lists all instances in a collection.\n\n NOTE: The results are not guaranteed to be consistent. Instances may be\n created or destroyed while the iterator is live, but those changes\n won\'t be observed by the iterator after this method returns.\n\n Errors:\n - `INVALID_ARGUMENTS`: `collection` is not a valid reference or `iter`\n does not have `ZX_RIGHT_WAIT`.\n - `COLLECTION_NOT_FOUND`: `collection` does not exist.\n - `INSTANCE_DIED`: This realm no longer exists.\n - If `iter` does not have standard channel rights, this function may\n   return `ACCESS_DENIED` or component manager may close `iter`.\n"]
9614    fn list_children(
9615        &mut self,
9616        sender: &::fidl_next::ServerSender<Realm, ___T>,
9617
9618        request: ::fidl_next::Request<realm::ListChildren, ___T>,
9619
9620        responder: ::fidl_next::Responder<realm::ListChildren>,
9621    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9622
9623    #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9624    fn get_resolved_info(
9625        &mut self,
9626        sender: &::fidl_next::ServerSender<Realm, ___T>,
9627
9628        responder: ::fidl_next::Responder<realm::GetResolvedInfo>,
9629    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9630
9631    fn get_child_output_dictionary(
9632        &mut self,
9633        sender: &::fidl_next::ServerSender<Realm, ___T>,
9634
9635        request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
9636
9637        responder: ::fidl_next::Responder<realm::GetChildOutputDictionary>,
9638    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9639}
9640
9641impl<___H, ___T> ::fidl_next::ServerProtocol<___H, ___T> for Realm
9642where
9643    ___H: RealmServerHandler<___T> + Send,
9644    ___T: ::fidl_next::Transport,
9645
9646    <realm::OpenController as ::fidl_next::Method>::Request:
9647        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9648
9649    <realm::OpenExposedDir as ::fidl_next::Method>::Request:
9650        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9651
9652    <realm::CreateChild as ::fidl_next::Method>::Request:
9653        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9654
9655    <realm::DestroyChild as ::fidl_next::Method>::Request:
9656        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9657
9658    <realm::ListChildren as ::fidl_next::Method>::Request:
9659        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9660
9661    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Request:
9662        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9663{
9664    async fn on_one_way(
9665        handler: &mut ___H,
9666        sender: &::fidl_next::ServerSender<Self, ___T>,
9667        ordinal: u64,
9668        buffer: ___T::RecvBuffer,
9669    ) {
9670        match ordinal {
9671            ordinal => {
9672                sender.close();
9673            }
9674        }
9675    }
9676
9677    async fn on_two_way(
9678        handler: &mut ___H,
9679        sender: &::fidl_next::ServerSender<Self, ___T>,
9680        ordinal: u64,
9681        buffer: ___T::RecvBuffer,
9682        responder: ::fidl_next::protocol::Responder,
9683    ) {
9684        match ordinal {
9685            8165227925828473216 => {
9686                let responder = ::fidl_next::Responder::from_untyped(responder);
9687
9688                match ::fidl_next::DecoderExt::decode(buffer) {
9689                    Ok(decoded) => handler.open_controller(sender, decoded, responder).await,
9690                    Err(e) => {
9691                        sender.close();
9692                    }
9693                }
9694            }
9695
9696            9194435320863127852 => {
9697                let responder = ::fidl_next::Responder::from_untyped(responder);
9698
9699                match ::fidl_next::DecoderExt::decode(buffer) {
9700                    Ok(decoded) => handler.open_exposed_dir(sender, decoded, responder).await,
9701                    Err(e) => {
9702                        sender.close();
9703                    }
9704                }
9705            }
9706
9707            4892190024503489888 => {
9708                let responder = ::fidl_next::Responder::from_untyped(responder);
9709
9710                match ::fidl_next::DecoderExt::decode(buffer) {
9711                    Ok(decoded) => handler.create_child(sender, decoded, responder).await,
9712                    Err(e) => {
9713                        sender.close();
9714                    }
9715                }
9716            }
9717
9718            8203529889988252194 => {
9719                let responder = ::fidl_next::Responder::from_untyped(responder);
9720
9721                match ::fidl_next::DecoderExt::decode(buffer) {
9722                    Ok(decoded) => handler.destroy_child(sender, decoded, responder).await,
9723                    Err(e) => {
9724                        sender.close();
9725                    }
9726                }
9727            }
9728
9729            7532454435519185057 => {
9730                let responder = ::fidl_next::Responder::from_untyped(responder);
9731
9732                match ::fidl_next::DecoderExt::decode(buffer) {
9733                    Ok(decoded) => handler.list_children(sender, decoded, responder).await,
9734                    Err(e) => {
9735                        sender.close();
9736                    }
9737                }
9738            }
9739
9740            8308987710372188322 => {
9741                let responder = ::fidl_next::Responder::from_untyped(responder);
9742
9743                handler.get_resolved_info(sender, responder).await;
9744            }
9745
9746            4781081784078915088 => {
9747                let responder = ::fidl_next::Responder::from_untyped(responder);
9748
9749                match ::fidl_next::DecoderExt::decode(buffer) {
9750                    Ok(decoded) => {
9751                        handler.get_child_output_dictionary(sender, decoded, responder).await
9752                    }
9753                    Err(e) => {
9754                        sender.close();
9755                    }
9756                }
9757            }
9758
9759            ordinal => {
9760                sender.close();
9761            }
9762        }
9763    }
9764}
9765
9766pub type ChildName = String;
9767
9768/// The wire type corresponding to [`ChildName`].
9769pub type WireChildName<'de> = ::fidl_next::WireString<'de>;
9770
9771pub type UrlScheme = String;
9772
9773/// The wire type corresponding to [`UrlScheme`].
9774pub type WireUrlScheme<'de> = ::fidl_next::WireString<'de>;
9775
9776/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
9777pub mod compat {
9778
9779    #[cfg(target_os = "fuchsia")]
9780    /// An alias for a client sender over `zx::Channel` for the `Binder`
9781    /// protocol.
9782    pub type BinderProxy =
9783        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Binder>;
9784
9785    impl ::core::convert::From<crate::Binder> for ::fidl_fuchsia_component::BinderMarker {
9786        #[inline]
9787        fn from(_: crate::Binder) -> Self {
9788            Self
9789        }
9790    }
9791
9792    #[cfg(target_os = "fuchsia")]
9793    /// An alias for a client sender over `zx::Channel` for the `ChildIterator`
9794    /// protocol.
9795    pub type ChildIteratorProxy =
9796        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::ChildIterator>;
9797
9798    impl ::core::convert::From<crate::ChildIterator> for ::fidl_fuchsia_component::ChildIteratorMarker {
9799        #[inline]
9800        fn from(_: crate::ChildIterator) -> Self {
9801            Self
9802        }
9803    }
9804
9805    impl ::core::convert::From<crate::Error> for ::fidl_fuchsia_component::Error {
9806        #[inline]
9807        fn from(from: crate::Error) -> Self {
9808            match crate::Error::from(from) {
9809                crate::Error::Internal => Self::Internal,
9810
9811                crate::Error::InvalidArguments => Self::InvalidArguments,
9812
9813                crate::Error::Unsupported => Self::Unsupported,
9814
9815                crate::Error::AccessDenied => Self::AccessDenied,
9816
9817                crate::Error::InstanceNotFound => Self::InstanceNotFound,
9818
9819                crate::Error::InstanceAlreadyExists => Self::InstanceAlreadyExists,
9820
9821                crate::Error::InstanceCannotStart => Self::InstanceCannotStart,
9822
9823                crate::Error::InstanceCannotResolve => Self::InstanceCannotResolve,
9824
9825                crate::Error::CollectionNotFound => Self::CollectionNotFound,
9826
9827                crate::Error::ResourceUnavailable => Self::ResourceUnavailable,
9828
9829                crate::Error::InstanceDied => Self::InstanceDied,
9830
9831                crate::Error::ResourceNotFound => Self::ResourceNotFound,
9832
9833                crate::Error::InstanceCannotUnresolve => Self::InstanceCannotUnresolve,
9834
9835                crate::Error::InstanceAlreadyStarted => Self::InstanceAlreadyStarted,
9836
9837                crate::Error::UnknownOrdinal_(value) => {
9838                    Self::__SourceBreaking { unknown_ordinal: value }
9839                }
9840            }
9841        }
9842    }
9843
9844    #[cfg(target_os = "fuchsia")]
9845    /// An alias for a client sender over `zx::Channel` for the `Controller`
9846    /// protocol.
9847    pub type ControllerProxy =
9848        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Controller>;
9849
9850    impl ::core::convert::From<crate::Controller> for ::fidl_fuchsia_component::ControllerMarker {
9851        #[inline]
9852        fn from(_: crate::Controller) -> Self {
9853            Self
9854        }
9855    }
9856
9857    impl ::core::convert::From<crate::EventType> for ::fidl_fuchsia_component::EventType {
9858        #[inline]
9859        fn from(from: crate::EventType) -> Self {
9860            match crate::EventType::from(from) {
9861                crate::EventType::CapabilityRequested => Self::CapabilityRequested,
9862
9863                crate::EventType::DirectoryReady => Self::DirectoryReady,
9864
9865                crate::EventType::Discovered => Self::Discovered,
9866
9867                crate::EventType::Destroyed => Self::Destroyed,
9868
9869                crate::EventType::Resolved => Self::Resolved,
9870
9871                crate::EventType::Started => Self::Started,
9872
9873                crate::EventType::Stopped => Self::Stopped,
9874
9875                crate::EventType::DebugStarted => Self::DebugStarted,
9876
9877                crate::EventType::Unresolved => Self::Unresolved,
9878            }
9879        }
9880    }
9881
9882    #[cfg(target_os = "fuchsia")]
9883    /// An alias for a client sender over `zx::Channel` for the `EventStream`
9884    /// protocol.
9885    pub type EventStreamProxy =
9886        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::EventStream>;
9887
9888    impl ::core::convert::From<crate::EventStream> for ::fidl_fuchsia_component::EventStreamMarker {
9889        #[inline]
9890        fn from(_: crate::EventStream) -> Self {
9891            Self
9892        }
9893    }
9894
9895    #[cfg(target_os = "fuchsia")]
9896    /// An alias for a client sender over `zx::Channel` for the `ExecutionController`
9897    /// protocol.
9898    pub type ExecutionControllerProxy =
9899        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::ExecutionController>;
9900
9901    impl ::core::convert::From<crate::ExecutionController>
9902        for ::fidl_fuchsia_component::ExecutionControllerMarker
9903    {
9904        #[inline]
9905        fn from(_: crate::ExecutionController) -> Self {
9906            Self
9907        }
9908    }
9909
9910    #[cfg(target_os = "fuchsia")]
9911    /// An alias for a client sender over `zx::Channel` for the `Introspector`
9912    /// protocol.
9913    pub type IntrospectorProxy =
9914        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Introspector>;
9915
9916    impl ::core::convert::From<crate::Introspector> for ::fidl_fuchsia_component::IntrospectorMarker {
9917        #[inline]
9918        fn from(_: crate::Introspector) -> Self {
9919            Self
9920        }
9921    }
9922
9923    impl ::core::convert::From<crate::NamespaceError> for ::fidl_fuchsia_component::NamespaceError {
9924        #[inline]
9925        fn from(from: crate::NamespaceError) -> Self {
9926            match crate::NamespaceError::from(from) {
9927                crate::NamespaceError::Shadow => Self::Shadow,
9928
9929                crate::NamespaceError::Duplicate => Self::Duplicate,
9930
9931                crate::NamespaceError::Conversion => Self::Conversion,
9932
9933                crate::NamespaceError::BadEntry => Self::BadEntry,
9934
9935                crate::NamespaceError::DictionaryRead => Self::DictionaryRead,
9936
9937                crate::NamespaceError::UnknownOrdinal_(value) => {
9938                    Self::__SourceBreaking { unknown_ordinal: value }
9939                }
9940            }
9941        }
9942    }
9943
9944    #[cfg(target_os = "fuchsia")]
9945    /// An alias for a client sender over `zx::Channel` for the `Namespace`
9946    /// protocol.
9947    pub type NamespaceProxy =
9948        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Namespace>;
9949
9950    impl ::core::convert::From<crate::Namespace> for ::fidl_fuchsia_component::NamespaceMarker {
9951        #[inline]
9952        fn from(_: crate::Namespace) -> Self {
9953            Self
9954        }
9955    }
9956
9957    #[cfg(target_os = "fuchsia")]
9958    /// An alias for a client sender over `zx::Channel` for the `Realm`
9959    /// protocol.
9960    pub type RealmProxy =
9961        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Realm>;
9962
9963    impl ::core::convert::From<crate::Realm> for ::fidl_fuchsia_component::RealmMarker {
9964        #[inline]
9965        fn from(_: crate::Realm) -> Self {
9966            Self
9967        }
9968    }
9969}