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, BinderClientHandler, BinderServerHandler, binder};
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        #[repr(transparent)]
31        pub struct BinderClientSender<___T: ::fidl_next::Transport> {
32            #[allow(dead_code)]
33            sender: ::fidl_next::protocol::ClientSender<___T>,
34        }
35
36        impl<___T> BinderClientSender<___T> where ___T: ::fidl_next::Transport {}
37
38        /// The server sender for the `Binder` protocol.
39        #[repr(transparent)]
40        pub struct BinderServerSender<___T: ::fidl_next::Transport> {
41            sender: ::fidl_next::protocol::ServerSender<___T>,
42        }
43
44        impl<___T> BinderServerSender<___T> where ___T: ::fidl_next::Transport {}
45    }
46}
47
48/// A client handler for the Binder protocol.
49///
50/// See [`Binder`] for more details.
51pub trait BinderClientHandler<
52    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
53    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
54>
55{
56}
57
58impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Binder
59where
60    ___H: BinderClientHandler<___T> + ::core::marker::Send,
61    ___T: ::fidl_next::Transport,
62{
63    async fn on_event(
64        handler: &mut ___H,
65        sender: &::fidl_next::ClientSender<Self, ___T>,
66        ordinal: u64,
67        buffer: ___T::RecvBuffer,
68    ) {
69        match ordinal {
70            ordinal => sender.close(),
71        }
72    }
73}
74
75/// A server handler for the Binder protocol.
76///
77/// See [`Binder`] for more details.
78pub trait BinderServerHandler<
79    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
80    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
81>
82{
83}
84
85impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Binder
86where
87    ___H: BinderServerHandler<___T> + ::core::marker::Send,
88    ___T: ::fidl_next::Transport,
89{
90    async fn on_one_way(
91        handler: &mut ___H,
92        sender: &::fidl_next::ServerSender<Self, ___T>,
93        ordinal: u64,
94        buffer: ___T::RecvBuffer,
95    ) {
96        match ordinal {
97            ordinal => sender.close(),
98        }
99    }
100
101    async fn on_two_way(
102        handler: &mut ___H,
103        sender: &::fidl_next::ServerSender<Self, ___T>,
104        ordinal: u64,
105        buffer: ___T::RecvBuffer,
106        responder: ::fidl_next::protocol::Responder,
107    ) {
108        match ordinal {
109            ordinal => sender.close(),
110        }
111    }
112}
113
114pub const MAX_NAME_LENGTH: u64 = 255;
115
116pub type Name = String;
117
118/// The wire type corresponding to [`Name`].
119pub type WireName<'de> = ::fidl_next::WireString<'de>;
120
121#[doc = " Payload for CapabilityRequested events\n"]
122#[derive(Debug, Default)]
123pub struct CapabilityRequestedPayload {
124    pub name: Option<String>,
125
126    pub capability: Option<::fidl_next::fuchsia::zx::Channel>,
127}
128
129impl CapabilityRequestedPayload {
130    fn __max_ordinal(&self) -> usize {
131        if self.capability.is_some() {
132            return 2;
133        }
134
135        if self.name.is_some() {
136            return 1;
137        }
138
139        0
140    }
141}
142
143impl ::fidl_next::Encodable for CapabilityRequestedPayload {
144    type Encoded = WireCapabilityRequestedPayload<'static>;
145}
146
147unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityRequestedPayload
148where
149    ___E: ::fidl_next::Encoder + ?Sized,
150    ___E: ::fidl_next::fuchsia::HandleEncoder,
151{
152    #[inline]
153    fn encode(
154        mut self,
155        encoder: &mut ___E,
156        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
157    ) -> Result<(), ::fidl_next::EncodeError> {
158        ::fidl_next::munge!(let WireCapabilityRequestedPayload { table } = out);
159
160        let max_ord = self.__max_ordinal();
161
162        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
163        ::fidl_next::Wire::zero_padding(&mut out);
164
165        let mut preallocated =
166            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
167
168        for i in 1..=max_ord {
169            match i {
170                2 => {
171                    if let Some(capability) = self.capability.take() {
172                        ::fidl_next::WireEnvelope::encode_value(
173                            capability,
174                            preallocated.encoder,
175                            &mut out,
176                        )?;
177                    } else {
178                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
179                    }
180                }
181
182                1 => {
183                    if let Some(name) = self.name.take() {
184                        ::fidl_next::WireEnvelope::encode_value(
185                            name,
186                            preallocated.encoder,
187                            &mut out,
188                        )?;
189                    } else {
190                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
191                    }
192                }
193
194                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
195            }
196            unsafe {
197                preallocated.write_next(out.assume_init_ref());
198            }
199        }
200
201        ::fidl_next::WireTable::encode_len(table, max_ord);
202
203        Ok(())
204    }
205}
206
207impl<'de> ::fidl_next::FromWire<WireCapabilityRequestedPayload<'de>>
208    for CapabilityRequestedPayload
209{
210    #[inline]
211    fn from_wire(wire: WireCapabilityRequestedPayload<'de>) -> Self {
212        let wire = ::core::mem::ManuallyDrop::new(wire);
213
214        let name = wire.table.get(1);
215
216        let capability = wire.table.get(2);
217
218        Self {
219            name: name.map(|envelope| {
220                ::fidl_next::FromWire::from_wire(unsafe {
221                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
222                })
223            }),
224
225            capability: capability.map(|envelope| {
226                ::fidl_next::FromWire::from_wire(unsafe {
227                    envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
228                })
229            }),
230        }
231    }
232}
233
234/// The wire type corresponding to [`CapabilityRequestedPayload`].
235#[repr(C)]
236pub struct WireCapabilityRequestedPayload<'de> {
237    table: ::fidl_next::WireTable<'de>,
238}
239
240impl<'de> Drop for WireCapabilityRequestedPayload<'de> {
241    fn drop(&mut self) {
242        let _ = self
243            .table
244            .get(1)
245            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
246
247        let _ = self.table.get(2).map(|envelope| unsafe {
248            envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
249        });
250    }
251}
252
253unsafe impl ::fidl_next::Wire for WireCapabilityRequestedPayload<'static> {
254    type Decoded<'de> = WireCapabilityRequestedPayload<'de>;
255
256    #[inline]
257    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
258        ::fidl_next::munge!(let Self { table } = out);
259        ::fidl_next::WireTable::zero_padding(table);
260    }
261}
262
263unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityRequestedPayload<'static>
264where
265    ___D: ::fidl_next::Decoder + ?Sized,
266    ___D: ::fidl_next::fuchsia::HandleDecoder,
267{
268    fn decode(
269        slot: ::fidl_next::Slot<'_, Self>,
270        decoder: &mut ___D,
271    ) -> Result<(), ::fidl_next::DecodeError> {
272        ::fidl_next::munge!(let Self { table } = slot);
273
274        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
275            match ordinal {
276                0 => unsafe { ::core::hint::unreachable_unchecked() },
277
278                1 => {
279                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
280                        slot.as_mut(),
281                        decoder,
282                    )?;
283
284                    let name = unsafe {
285                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
286                    };
287
288                    if name.len() > 255 {
289                        return Err(::fidl_next::DecodeError::VectorTooLong {
290                            size: name.len() as u64,
291                            limit: 255,
292                        });
293                    }
294
295                    Ok(())
296                }
297
298                2 => {
299                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireChannel>(
300                        slot.as_mut(),
301                        decoder,
302                    )?;
303
304                    Ok(())
305                }
306
307                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
308            }
309        })
310    }
311}
312
313impl<'de> WireCapabilityRequestedPayload<'de> {
314    pub fn name(&self) -> Option<&::fidl_next::WireString<'de>> {
315        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
316    }
317
318    pub fn capability(&self) -> Option<&::fidl_next::fuchsia::WireChannel> {
319        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
320    }
321}
322
323impl<'de> ::core::fmt::Debug for WireCapabilityRequestedPayload<'de> {
324    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
325        f.debug_struct("CapabilityRequestedPayload")
326            .field("name", &self.name())
327            .field("capability", &self.capability())
328            .finish()
329    }
330}
331
332#[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"]
333pub const MAX_CHILD_COUNT: u32 = 128;
334
335#[derive(Clone, Debug)]
336pub struct ChildIteratorNextResponse {
337    pub children: Vec<::fidl_next_fuchsia_component_decl::ChildRef>,
338}
339
340impl ::fidl_next::Encodable for ChildIteratorNextResponse {
341    type Encoded = WireChildIteratorNextResponse<'static>;
342}
343
344unsafe impl<___E> ::fidl_next::Encode<___E> for ChildIteratorNextResponse
345where
346    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
347    ___E: ::fidl_next::Encoder,
348{
349    #[inline]
350    fn encode(
351        self,
352        encoder: &mut ___E,
353        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
354    ) -> Result<(), ::fidl_next::EncodeError> {
355        ::fidl_next::munge! {
356            let Self::Encoded {
357                children,
358
359            } = out;
360        }
361
362        ::fidl_next::Encode::encode(self.children, encoder, children)?;
363
364        Ok(())
365    }
366}
367
368unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ChildIteratorNextResponse
369where
370    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
371    ___E: ::fidl_next::Encoder,
372{
373    #[inline]
374    fn encode_ref(
375        &self,
376        encoder: &mut ___E,
377        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
378    ) -> Result<(), ::fidl_next::EncodeError> {
379        ::fidl_next::munge! {
380            let Self::Encoded {
381                children,
382
383            } = out;
384        }
385
386        ::fidl_next::EncodeRef::encode_ref(&self.children, encoder, children)?;
387
388        Ok(())
389    }
390}
391
392impl ::fidl_next::EncodableOption for ChildIteratorNextResponse {
393    type EncodedOption = ::fidl_next::WireBox<'static, WireChildIteratorNextResponse<'static>>;
394}
395
396unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ChildIteratorNextResponse
397where
398    ___E: ::fidl_next::Encoder + ?Sized,
399    ChildIteratorNextResponse: ::fidl_next::Encode<___E>,
400{
401    #[inline]
402    fn encode_option(
403        this: Option<Self>,
404        encoder: &mut ___E,
405        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
406    ) -> Result<(), ::fidl_next::EncodeError> {
407        if let Some(inner) = this {
408            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
409            ::fidl_next::WireBox::encode_present(out);
410        } else {
411            ::fidl_next::WireBox::encode_absent(out);
412        }
413
414        Ok(())
415    }
416}
417
418unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ChildIteratorNextResponse
419where
420    ___E: ::fidl_next::Encoder + ?Sized,
421    ChildIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
422{
423    #[inline]
424    fn encode_option_ref(
425        this: Option<&Self>,
426        encoder: &mut ___E,
427        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
428    ) -> Result<(), ::fidl_next::EncodeError> {
429        if let Some(inner) = this {
430            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
431            ::fidl_next::WireBox::encode_present(out);
432        } else {
433            ::fidl_next::WireBox::encode_absent(out);
434        }
435
436        Ok(())
437    }
438}
439
440impl<'de> ::fidl_next::FromWire<WireChildIteratorNextResponse<'de>> for ChildIteratorNextResponse {
441    #[inline]
442    fn from_wire(wire: WireChildIteratorNextResponse<'de>) -> Self {
443        Self { children: ::fidl_next::FromWire::from_wire(wire.children) }
444    }
445}
446
447impl<'de> ::fidl_next::FromWireRef<WireChildIteratorNextResponse<'de>>
448    for ChildIteratorNextResponse
449{
450    #[inline]
451    fn from_wire_ref(wire: &WireChildIteratorNextResponse<'de>) -> Self {
452        Self { children: ::fidl_next::FromWireRef::from_wire_ref(&wire.children) }
453    }
454}
455
456/// The wire type corresponding to [`ChildIteratorNextResponse`].
457#[derive(Debug)]
458#[repr(C)]
459pub struct WireChildIteratorNextResponse<'de> {
460    pub children:
461        ::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireChildRef<'de>>,
462}
463
464unsafe impl ::fidl_next::Wire for WireChildIteratorNextResponse<'static> {
465    type Decoded<'de> = WireChildIteratorNextResponse<'de>;
466
467    #[inline]
468    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
469}
470
471unsafe impl<___D> ::fidl_next::Decode<___D> for WireChildIteratorNextResponse<'static>
472where
473    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
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            ChildIterator, ChildIteratorClientHandler, ChildIteratorServerHandler, child_iterator,
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        #[repr(transparent)]
540        pub struct ChildIteratorClientSender<___T: ::fidl_next::Transport> {
541            #[allow(dead_code)]
542            sender: ::fidl_next::protocol::ClientSender<___T>,
543        }
544
545        impl<___T> ChildIteratorClientSender<___T>
546        where
547            ___T: ::fidl_next::Transport,
548        {
549            #[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"]
550            pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
551                ::fidl_next::TwoWayFuture::from_untyped(
552                    self.sender.send_two_way(4676077302722137352, ()),
553                )
554            }
555        }
556
557        /// The server sender for the `ChildIterator` protocol.
558        #[repr(transparent)]
559        pub struct ChildIteratorServerSender<___T: ::fidl_next::Transport> {
560            sender: ::fidl_next::protocol::ServerSender<___T>,
561        }
562
563        impl<___T> ChildIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
564    }
565}
566
567/// A client handler for the ChildIterator protocol.
568///
569/// See [`ChildIterator`] for more details.
570pub trait ChildIteratorClientHandler<
571    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
572    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
573>
574{
575}
576
577impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ChildIterator
578where
579    ___H: ChildIteratorClientHandler<___T> + ::core::marker::Send,
580    ___T: ::fidl_next::Transport,
581    <child_iterator::Next as ::fidl_next::Method>::Response:
582        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
583{
584    async fn on_event(
585        handler: &mut ___H,
586        sender: &::fidl_next::ClientSender<Self, ___T>,
587        ordinal: u64,
588        buffer: ___T::RecvBuffer,
589    ) {
590        match ordinal {
591            ordinal => sender.close(),
592        }
593    }
594}
595
596/// A server handler for the ChildIterator protocol.
597///
598/// See [`ChildIterator`] for more details.
599pub trait ChildIteratorServerHandler<
600    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
601    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
602>
603{
604    #[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"]
605    fn next(
606        &mut self,
607        sender: &::fidl_next::ServerSender<ChildIterator, ___T>,
608
609        responder: ::fidl_next::Responder<child_iterator::Next>,
610    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
611}
612
613impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ChildIterator
614where
615    ___H: ChildIteratorServerHandler<___T> + ::core::marker::Send,
616    ___T: ::fidl_next::Transport,
617{
618    async fn on_one_way(
619        handler: &mut ___H,
620        sender: &::fidl_next::ServerSender<Self, ___T>,
621        ordinal: u64,
622        buffer: ___T::RecvBuffer,
623    ) {
624        match ordinal {
625            ordinal => sender.close(),
626        }
627    }
628
629    async fn on_two_way(
630        handler: &mut ___H,
631        sender: &::fidl_next::ServerSender<Self, ___T>,
632        ordinal: u64,
633        buffer: ___T::RecvBuffer,
634        responder: ::fidl_next::protocol::Responder,
635    ) {
636        match ordinal {
637            4676077302722137352 => {
638                let responder = ::fidl_next::Responder::from_untyped(responder);
639
640                handler.next(sender, responder).await;
641            }
642
643            ordinal => sender.close(),
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    ___E: ::fidl_next::fuchsia::HandleEncoder,
678{
679    #[inline]
680    fn encode(
681        self,
682        encoder: &mut ___E,
683        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
684    ) -> Result<(), ::fidl_next::EncodeError> {
685        ::fidl_next::munge! {
686            let Self::Encoded {
687                is_started,
688
689            } = out;
690        }
691
692        ::fidl_next::Encode::encode(self.is_started, encoder, is_started)?;
693
694        Ok(())
695    }
696}
697
698impl ::fidl_next::EncodableOption for ControllerIsStartedResponse {
699    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerIsStartedResponse>;
700}
701
702unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerIsStartedResponse
703where
704    ___E: ::fidl_next::Encoder + ?Sized,
705    ControllerIsStartedResponse: ::fidl_next::Encode<___E>,
706{
707    #[inline]
708    fn encode_option(
709        this: Option<Self>,
710        encoder: &mut ___E,
711        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
712    ) -> Result<(), ::fidl_next::EncodeError> {
713        if let Some(inner) = this {
714            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
715            ::fidl_next::WireBox::encode_present(out);
716        } else {
717            ::fidl_next::WireBox::encode_absent(out);
718        }
719
720        Ok(())
721    }
722}
723
724impl ::fidl_next::FromWire<WireControllerIsStartedResponse> for ControllerIsStartedResponse {
725    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireControllerIsStartedResponse, Self> = unsafe {
726        ::fidl_next::CopyOptimization::enable_if(
727            true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
728        )
729    };
730
731    #[inline]
732    fn from_wire(wire: WireControllerIsStartedResponse) -> Self {
733        Self { is_started: ::fidl_next::FromWire::from_wire(wire.is_started) }
734    }
735}
736
737/// The wire type corresponding to [`ControllerIsStartedResponse`].
738#[derive(Debug)]
739#[repr(C)]
740pub struct WireControllerIsStartedResponse {
741    pub is_started: bool,
742}
743
744unsafe impl ::fidl_next::Wire for WireControllerIsStartedResponse {
745    type Decoded<'de> = WireControllerIsStartedResponse;
746
747    #[inline]
748    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
749}
750
751unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerIsStartedResponse
752where
753    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
754    ___D: ::fidl_next::fuchsia::HandleDecoder,
755{
756    fn decode(
757        slot: ::fidl_next::Slot<'_, Self>,
758        decoder: &mut ___D,
759    ) -> Result<(), ::fidl_next::DecodeError> {
760        ::fidl_next::munge! {
761            let Self {
762                mut is_started,
763
764            } = slot;
765        }
766
767        ::fidl_next::Decode::decode(is_started.as_mut(), decoder)?;
768
769        Ok(())
770    }
771}
772
773pub const MAX_PATH_LENGTH: u64 = 4095;
774
775#[doc = " Standard error codes for component framework protocols.\n"]
776#[derive(Clone, Copy, Debug, PartialEq, Eq)]
777#[repr(u32)]
778pub enum Error {
779    Internal = 1,
780    InvalidArguments = 2,
781    Unsupported = 3,
782    AccessDenied = 4,
783    InstanceNotFound = 5,
784    InstanceAlreadyExists = 6,
785    InstanceCannotStart = 7,
786    InstanceCannotResolve = 8,
787    CollectionNotFound = 9,
788    ResourceUnavailable = 10,
789    InstanceDied = 11,
790    ResourceNotFound = 12,
791    InstanceCannotUnresolve = 13,
792    InstanceAlreadyStarted = 14,
793    UnknownOrdinal_(u32),
794}
795
796impl ::fidl_next::Encodable for Error {
797    type Encoded = WireError;
798}
799impl ::std::convert::From<u32> for Error {
800    fn from(value: u32) -> Self {
801        match value {
802            1 => Self::Internal,
803            2 => Self::InvalidArguments,
804            3 => Self::Unsupported,
805            4 => Self::AccessDenied,
806            5 => Self::InstanceNotFound,
807            6 => Self::InstanceAlreadyExists,
808            7 => Self::InstanceCannotStart,
809            8 => Self::InstanceCannotResolve,
810            9 => Self::CollectionNotFound,
811            10 => Self::ResourceUnavailable,
812            11 => Self::InstanceDied,
813            12 => Self::ResourceNotFound,
814            13 => Self::InstanceCannotUnresolve,
815            14 => Self::InstanceAlreadyStarted,
816
817            _ => Self::UnknownOrdinal_(value),
818        }
819    }
820}
821
822unsafe impl<___E> ::fidl_next::Encode<___E> for Error
823where
824    ___E: ?Sized,
825{
826    #[inline]
827    fn encode(
828        self,
829        encoder: &mut ___E,
830        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
831    ) -> Result<(), ::fidl_next::EncodeError> {
832        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
833    }
834}
835
836unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Error
837where
838    ___E: ?Sized,
839{
840    #[inline]
841    fn encode_ref(
842        &self,
843        encoder: &mut ___E,
844        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
845    ) -> Result<(), ::fidl_next::EncodeError> {
846        ::fidl_next::munge!(let WireError { value } = out);
847        let _ = value.write(::fidl_next::WireU32::from(match *self {
848            Self::Internal => 1,
849
850            Self::InvalidArguments => 2,
851
852            Self::Unsupported => 3,
853
854            Self::AccessDenied => 4,
855
856            Self::InstanceNotFound => 5,
857
858            Self::InstanceAlreadyExists => 6,
859
860            Self::InstanceCannotStart => 7,
861
862            Self::InstanceCannotResolve => 8,
863
864            Self::CollectionNotFound => 9,
865
866            Self::ResourceUnavailable => 10,
867
868            Self::InstanceDied => 11,
869
870            Self::ResourceNotFound => 12,
871
872            Self::InstanceCannotUnresolve => 13,
873
874            Self::InstanceAlreadyStarted => 14,
875
876            Self::UnknownOrdinal_(value) => value,
877        }));
878
879        Ok(())
880    }
881}
882
883impl ::core::convert::From<WireError> for Error {
884    fn from(wire: WireError) -> Self {
885        match u32::from(wire.value) {
886            1 => Self::Internal,
887
888            2 => Self::InvalidArguments,
889
890            3 => Self::Unsupported,
891
892            4 => Self::AccessDenied,
893
894            5 => Self::InstanceNotFound,
895
896            6 => Self::InstanceAlreadyExists,
897
898            7 => Self::InstanceCannotStart,
899
900            8 => Self::InstanceCannotResolve,
901
902            9 => Self::CollectionNotFound,
903
904            10 => Self::ResourceUnavailable,
905
906            11 => Self::InstanceDied,
907
908            12 => Self::ResourceNotFound,
909
910            13 => Self::InstanceCannotUnresolve,
911
912            14 => Self::InstanceAlreadyStarted,
913
914            value => Self::UnknownOrdinal_(value),
915        }
916    }
917}
918
919impl ::fidl_next::FromWire<WireError> for Error {
920    #[inline]
921    fn from_wire(wire: WireError) -> Self {
922        Self::from(wire)
923    }
924}
925
926impl ::fidl_next::FromWireRef<WireError> for Error {
927    #[inline]
928    fn from_wire_ref(wire: &WireError) -> Self {
929        Self::from(*wire)
930    }
931}
932
933/// The wire type corresponding to [`Error`].
934#[derive(Clone, Copy, Debug, PartialEq, Eq)]
935#[repr(transparent)]
936pub struct WireError {
937    value: ::fidl_next::WireU32,
938}
939
940unsafe impl ::fidl_next::Wire for WireError {
941    type Decoded<'de> = Self;
942
943    #[inline]
944    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
945        // Wire enums have no padding
946    }
947}
948
949impl WireError {
950    pub const INTERNAL: WireError = WireError { value: ::fidl_next::WireU32(1) };
951
952    pub const INVALID_ARGUMENTS: WireError = WireError { value: ::fidl_next::WireU32(2) };
953
954    pub const UNSUPPORTED: WireError = WireError { value: ::fidl_next::WireU32(3) };
955
956    pub const ACCESS_DENIED: WireError = WireError { value: ::fidl_next::WireU32(4) };
957
958    pub const INSTANCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(5) };
959
960    pub const INSTANCE_ALREADY_EXISTS: WireError = WireError { value: ::fidl_next::WireU32(6) };
961
962    pub const INSTANCE_CANNOT_START: WireError = WireError { value: ::fidl_next::WireU32(7) };
963
964    pub const INSTANCE_CANNOT_RESOLVE: WireError = WireError { value: ::fidl_next::WireU32(8) };
965
966    pub const COLLECTION_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(9) };
967
968    pub const RESOURCE_UNAVAILABLE: WireError = WireError { value: ::fidl_next::WireU32(10) };
969
970    pub const INSTANCE_DIED: WireError = WireError { value: ::fidl_next::WireU32(11) };
971
972    pub const RESOURCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(12) };
973
974    pub const INSTANCE_CANNOT_UNRESOLVE: WireError = WireError { value: ::fidl_next::WireU32(13) };
975
976    pub const INSTANCE_ALREADY_STARTED: WireError = WireError { value: ::fidl_next::WireU32(14) };
977}
978
979unsafe impl<___D> ::fidl_next::Decode<___D> for WireError
980where
981    ___D: ?Sized,
982{
983    fn decode(
984        slot: ::fidl_next::Slot<'_, Self>,
985        _: &mut ___D,
986    ) -> Result<(), ::fidl_next::DecodeError> {
987        Ok(())
988    }
989}
990
991impl ::core::convert::From<Error> for WireError {
992    fn from(natural: Error) -> Self {
993        match natural {
994            Error::Internal => WireError::INTERNAL,
995
996            Error::InvalidArguments => WireError::INVALID_ARGUMENTS,
997
998            Error::Unsupported => WireError::UNSUPPORTED,
999
1000            Error::AccessDenied => WireError::ACCESS_DENIED,
1001
1002            Error::InstanceNotFound => WireError::INSTANCE_NOT_FOUND,
1003
1004            Error::InstanceAlreadyExists => WireError::INSTANCE_ALREADY_EXISTS,
1005
1006            Error::InstanceCannotStart => WireError::INSTANCE_CANNOT_START,
1007
1008            Error::InstanceCannotResolve => WireError::INSTANCE_CANNOT_RESOLVE,
1009
1010            Error::CollectionNotFound => WireError::COLLECTION_NOT_FOUND,
1011
1012            Error::ResourceUnavailable => WireError::RESOURCE_UNAVAILABLE,
1013
1014            Error::InstanceDied => WireError::INSTANCE_DIED,
1015
1016            Error::ResourceNotFound => WireError::RESOURCE_NOT_FOUND,
1017
1018            Error::InstanceCannotUnresolve => WireError::INSTANCE_CANNOT_UNRESOLVE,
1019
1020            Error::InstanceAlreadyStarted => WireError::INSTANCE_ALREADY_STARTED,
1021
1022            Error::UnknownOrdinal_(value) => WireError { value: ::fidl_next::WireU32::from(value) },
1023        }
1024    }
1025}
1026
1027#[derive(Debug)]
1028#[repr(C)]
1029pub struct ControllerGetExposedDictionaryResponse {
1030    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
1031}
1032
1033impl ::fidl_next::Encodable for ControllerGetExposedDictionaryResponse {
1034    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1035        Self,
1036        WireControllerGetExposedDictionaryResponse,
1037    > = unsafe {
1038        ::fidl_next::CopyOptimization::enable_if(
1039            true
1040
1041                && <
1042                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
1043                >::COPY_OPTIMIZATION.is_enabled()
1044
1045        )
1046    };
1047
1048    type Encoded = WireControllerGetExposedDictionaryResponse;
1049}
1050
1051unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerGetExposedDictionaryResponse
1052where
1053    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1054    ___E: ::fidl_next::fuchsia::HandleEncoder,
1055{
1056    #[inline]
1057    fn encode(
1058        self,
1059        encoder: &mut ___E,
1060        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1061    ) -> Result<(), ::fidl_next::EncodeError> {
1062        ::fidl_next::munge! {
1063            let Self::Encoded {
1064                dictionary,
1065
1066            } = out;
1067        }
1068
1069        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
1070
1071        Ok(())
1072    }
1073}
1074
1075impl ::fidl_next::EncodableOption for ControllerGetExposedDictionaryResponse {
1076    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerGetExposedDictionaryResponse>;
1077}
1078
1079unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerGetExposedDictionaryResponse
1080where
1081    ___E: ::fidl_next::Encoder + ?Sized,
1082    ControllerGetExposedDictionaryResponse: ::fidl_next::Encode<___E>,
1083{
1084    #[inline]
1085    fn encode_option(
1086        this: Option<Self>,
1087        encoder: &mut ___E,
1088        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1089    ) -> Result<(), ::fidl_next::EncodeError> {
1090        if let Some(inner) = this {
1091            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1092            ::fidl_next::WireBox::encode_present(out);
1093        } else {
1094            ::fidl_next::WireBox::encode_absent(out);
1095        }
1096
1097        Ok(())
1098    }
1099}
1100
1101impl ::fidl_next::FromWire<WireControllerGetExposedDictionaryResponse>
1102    for ControllerGetExposedDictionaryResponse
1103{
1104    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1105        WireControllerGetExposedDictionaryResponse,
1106        Self,
1107    > = unsafe {
1108        ::fidl_next::CopyOptimization::enable_if(
1109            true
1110
1111                && <
1112                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
1113                >::COPY_OPTIMIZATION.is_enabled()
1114
1115        )
1116    };
1117
1118    #[inline]
1119    fn from_wire(wire: WireControllerGetExposedDictionaryResponse) -> Self {
1120        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
1121    }
1122}
1123
1124/// The wire type corresponding to [`ControllerGetExposedDictionaryResponse`].
1125#[derive(Debug)]
1126#[repr(C)]
1127pub struct WireControllerGetExposedDictionaryResponse {
1128    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1129}
1130
1131unsafe impl ::fidl_next::Wire for WireControllerGetExposedDictionaryResponse {
1132    type Decoded<'de> = WireControllerGetExposedDictionaryResponse;
1133
1134    #[inline]
1135    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1136}
1137
1138unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerGetExposedDictionaryResponse
1139where
1140    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1141    ___D: ::fidl_next::fuchsia::HandleDecoder,
1142{
1143    fn decode(
1144        slot: ::fidl_next::Slot<'_, Self>,
1145        decoder: &mut ___D,
1146    ) -> Result<(), ::fidl_next::DecodeError> {
1147        ::fidl_next::munge! {
1148            let Self {
1149                mut dictionary,
1150
1151            } = slot;
1152        }
1153
1154        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
1155
1156        Ok(())
1157    }
1158}
1159
1160pub type ControllerDestroyResponse = ();
1161
1162/// The wire type corresponding to [`ControllerDestroyResponse`].
1163pub type WireControllerDestroyResponse = ();
1164
1165#[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"]
1166#[derive(Debug, Default)]
1167pub struct NamespaceEntry {
1168    pub path: Option<String>,
1169
1170    pub directory: Option<
1171        ::fidl_next::ClientEnd<
1172            ::fidl_next_fuchsia_io::Directory,
1173            ::fidl_next::fuchsia::zx::Channel,
1174        >,
1175    >,
1176}
1177
1178impl NamespaceEntry {
1179    fn __max_ordinal(&self) -> usize {
1180        if self.directory.is_some() {
1181            return 2;
1182        }
1183
1184        if self.path.is_some() {
1185            return 1;
1186        }
1187
1188        0
1189    }
1190}
1191
1192impl ::fidl_next::Encodable for NamespaceEntry {
1193    type Encoded = WireNamespaceEntry<'static>;
1194}
1195
1196unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceEntry
1197where
1198    ___E: ::fidl_next::Encoder + ?Sized,
1199    ___E: ::fidl_next::fuchsia::HandleEncoder,
1200{
1201    #[inline]
1202    fn encode(
1203        mut self,
1204        encoder: &mut ___E,
1205        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1206    ) -> Result<(), ::fidl_next::EncodeError> {
1207        ::fidl_next::munge!(let WireNamespaceEntry { table } = out);
1208
1209        let max_ord = self.__max_ordinal();
1210
1211        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1212        ::fidl_next::Wire::zero_padding(&mut out);
1213
1214        let mut preallocated =
1215            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1216
1217        for i in 1..=max_ord {
1218            match i {
1219                2 => {
1220                    if let Some(directory) = self.directory.take() {
1221                        ::fidl_next::WireEnvelope::encode_value(
1222                            directory,
1223                            preallocated.encoder,
1224                            &mut out,
1225                        )?;
1226                    } else {
1227                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1228                    }
1229                }
1230
1231                1 => {
1232                    if let Some(path) = self.path.take() {
1233                        ::fidl_next::WireEnvelope::encode_value(
1234                            path,
1235                            preallocated.encoder,
1236                            &mut out,
1237                        )?;
1238                    } else {
1239                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1240                    }
1241                }
1242
1243                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1244            }
1245            unsafe {
1246                preallocated.write_next(out.assume_init_ref());
1247            }
1248        }
1249
1250        ::fidl_next::WireTable::encode_len(table, max_ord);
1251
1252        Ok(())
1253    }
1254}
1255
1256impl<'de> ::fidl_next::FromWire<WireNamespaceEntry<'de>> for NamespaceEntry {
1257    #[inline]
1258    fn from_wire(wire: WireNamespaceEntry<'de>) -> Self {
1259        let wire = ::core::mem::ManuallyDrop::new(wire);
1260
1261        let path = wire.table.get(1);
1262
1263        let directory = wire.table.get(2);
1264
1265        Self {
1266            path: path.map(|envelope| {
1267                ::fidl_next::FromWire::from_wire(unsafe {
1268                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1269                })
1270            }),
1271
1272            directory: directory.map(|envelope| {
1273                ::fidl_next::FromWire::from_wire(unsafe {
1274                    envelope.read_unchecked::<::fidl_next::ClientEnd<
1275                        ::fidl_next_fuchsia_io::Directory,
1276                        ::fidl_next::fuchsia::WireChannel,
1277                    >>()
1278                })
1279            }),
1280        }
1281    }
1282}
1283
1284/// The wire type corresponding to [`NamespaceEntry`].
1285#[repr(C)]
1286pub struct WireNamespaceEntry<'de> {
1287    table: ::fidl_next::WireTable<'de>,
1288}
1289
1290impl<'de> Drop for WireNamespaceEntry<'de> {
1291    fn drop(&mut self) {
1292        let _ = self
1293            .table
1294            .get(1)
1295            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
1296
1297        let _ = self.table.get(2).map(|envelope| unsafe {
1298            envelope.read_unchecked::<::fidl_next::ClientEnd<
1299                ::fidl_next_fuchsia_io::Directory,
1300                ::fidl_next::fuchsia::WireChannel,
1301            >>()
1302        });
1303    }
1304}
1305
1306unsafe impl ::fidl_next::Wire for WireNamespaceEntry<'static> {
1307    type Decoded<'de> = WireNamespaceEntry<'de>;
1308
1309    #[inline]
1310    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1311        ::fidl_next::munge!(let Self { table } = out);
1312        ::fidl_next::WireTable::zero_padding(table);
1313    }
1314}
1315
1316unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceEntry<'static>
1317where
1318    ___D: ::fidl_next::Decoder + ?Sized,
1319    ___D: ::fidl_next::fuchsia::HandleDecoder,
1320{
1321    fn decode(
1322        slot: ::fidl_next::Slot<'_, Self>,
1323        decoder: &mut ___D,
1324    ) -> Result<(), ::fidl_next::DecodeError> {
1325        ::fidl_next::munge!(let Self { table } = slot);
1326
1327        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1328            match ordinal {
1329                0 => unsafe { ::core::hint::unreachable_unchecked() },
1330
1331                1 => {
1332                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
1333                        slot.as_mut(),
1334                        decoder,
1335                    )?;
1336
1337                    let path = unsafe {
1338                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1339                    };
1340
1341                    if path.len() > 4095 {
1342                        return Err(::fidl_next::DecodeError::VectorTooLong {
1343                            size: path.len() as u64,
1344                            limit: 4095,
1345                        });
1346                    }
1347
1348                    Ok(())
1349                }
1350
1351                2 => {
1352                    ::fidl_next::WireEnvelope::decode_as::<
1353                        ___D,
1354                        ::fidl_next::ClientEnd<
1355                            ::fidl_next_fuchsia_io::Directory,
1356                            ::fidl_next::fuchsia::WireChannel,
1357                        >,
1358                    >(slot.as_mut(), decoder)?;
1359
1360                    Ok(())
1361                }
1362
1363                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1364            }
1365        })
1366    }
1367}
1368
1369impl<'de> WireNamespaceEntry<'de> {
1370    pub fn path(&self) -> Option<&::fidl_next::WireString<'de>> {
1371        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1372    }
1373
1374    pub fn directory(
1375        &self,
1376    ) -> Option<
1377        &::fidl_next::ClientEnd<
1378            ::fidl_next_fuchsia_io::Directory,
1379            ::fidl_next::fuchsia::WireChannel,
1380        >,
1381    > {
1382        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1383    }
1384}
1385
1386impl<'de> ::core::fmt::Debug for WireNamespaceEntry<'de> {
1387    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
1388        f.debug_struct("NamespaceEntry")
1389            .field("path", &self.path())
1390            .field("directory", &self.directory())
1391            .finish()
1392    }
1393}
1394
1395#[derive(Debug, Default)]
1396pub struct StartChildArgs {
1397    pub numbered_handles: Option<Vec<::fidl_next_fuchsia_process::HandleInfo>>,
1398
1399    pub namespace_entries: Option<Vec<crate::NamespaceEntry>>,
1400
1401    pub dictionary: Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
1402}
1403
1404impl StartChildArgs {
1405    fn __max_ordinal(&self) -> usize {
1406        if self.dictionary.is_some() {
1407            return 3;
1408        }
1409
1410        if self.namespace_entries.is_some() {
1411            return 2;
1412        }
1413
1414        if self.numbered_handles.is_some() {
1415            return 1;
1416        }
1417
1418        0
1419    }
1420}
1421
1422impl ::fidl_next::Encodable for StartChildArgs {
1423    type Encoded = WireStartChildArgs<'static>;
1424}
1425
1426unsafe impl<___E> ::fidl_next::Encode<___E> for StartChildArgs
1427where
1428    ___E: ::fidl_next::Encoder + ?Sized,
1429    ___E: ::fidl_next::fuchsia::HandleEncoder,
1430{
1431    #[inline]
1432    fn encode(
1433        mut self,
1434        encoder: &mut ___E,
1435        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1436    ) -> Result<(), ::fidl_next::EncodeError> {
1437        ::fidl_next::munge!(let WireStartChildArgs { table } = out);
1438
1439        let max_ord = self.__max_ordinal();
1440
1441        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1442        ::fidl_next::Wire::zero_padding(&mut out);
1443
1444        let mut preallocated =
1445            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1446
1447        for i in 1..=max_ord {
1448            match i {
1449                3 => {
1450                    if let Some(dictionary) = self.dictionary.take() {
1451                        ::fidl_next::WireEnvelope::encode_value(
1452                            dictionary,
1453                            preallocated.encoder,
1454                            &mut out,
1455                        )?;
1456                    } else {
1457                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1458                    }
1459                }
1460
1461                2 => {
1462                    if let Some(namespace_entries) = self.namespace_entries.take() {
1463                        ::fidl_next::WireEnvelope::encode_value(
1464                            namespace_entries,
1465                            preallocated.encoder,
1466                            &mut out,
1467                        )?;
1468                    } else {
1469                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1470                    }
1471                }
1472
1473                1 => {
1474                    if let Some(numbered_handles) = self.numbered_handles.take() {
1475                        ::fidl_next::WireEnvelope::encode_value(
1476                            numbered_handles,
1477                            preallocated.encoder,
1478                            &mut out,
1479                        )?;
1480                    } else {
1481                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1482                    }
1483                }
1484
1485                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1486            }
1487            unsafe {
1488                preallocated.write_next(out.assume_init_ref());
1489            }
1490        }
1491
1492        ::fidl_next::WireTable::encode_len(table, max_ord);
1493
1494        Ok(())
1495    }
1496}
1497
1498impl<'de> ::fidl_next::FromWire<WireStartChildArgs<'de>> for StartChildArgs {
1499    #[inline]
1500    fn from_wire(wire: WireStartChildArgs<'de>) -> Self {
1501        let wire = ::core::mem::ManuallyDrop::new(wire);
1502
1503        let numbered_handles = wire.table.get(1);
1504
1505        let namespace_entries = wire.table.get(2);
1506
1507        let dictionary = wire.table.get(3);
1508
1509        Self {
1510
1511
1512                numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1513                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>() }
1514                )),
1515
1516
1517                namespace_entries: namespace_entries.map(|envelope| ::fidl_next::FromWire::from_wire(
1518                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>() }
1519                )),
1520
1521
1522                dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1523                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>() }
1524                )),
1525
1526        }
1527    }
1528}
1529
1530/// The wire type corresponding to [`StartChildArgs`].
1531#[repr(C)]
1532pub struct WireStartChildArgs<'de> {
1533    table: ::fidl_next::WireTable<'de>,
1534}
1535
1536impl<'de> Drop for WireStartChildArgs<'de> {
1537    fn drop(&mut self) {
1538        let _ = self.table.get(1)
1539                .map(|envelope| unsafe {
1540                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
1541                });
1542
1543        let _ = self.table.get(2).map(|envelope| unsafe {
1544            envelope
1545                .read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>()
1546        });
1547
1548        let _ = self.table.get(3).map(|envelope| unsafe {
1549            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
1550        });
1551    }
1552}
1553
1554unsafe impl ::fidl_next::Wire for WireStartChildArgs<'static> {
1555    type Decoded<'de> = WireStartChildArgs<'de>;
1556
1557    #[inline]
1558    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1559        ::fidl_next::munge!(let Self { table } = out);
1560        ::fidl_next::WireTable::zero_padding(table);
1561    }
1562}
1563
1564unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartChildArgs<'static>
1565where
1566    ___D: ::fidl_next::Decoder + ?Sized,
1567    ___D: ::fidl_next::fuchsia::HandleDecoder,
1568{
1569    fn decode(
1570        slot: ::fidl_next::Slot<'_, Self>,
1571        decoder: &mut ___D,
1572    ) -> Result<(), ::fidl_next::DecodeError> {
1573        ::fidl_next::munge!(let Self { table } = slot);
1574
1575        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1576            match ordinal {
1577                0 => unsafe { ::core::hint::unreachable_unchecked() },
1578
1579                1 => {
1580                    ::fidl_next::WireEnvelope::decode_as::<
1581                        ___D,
1582                        ::fidl_next::WireVector<
1583                            'static,
1584                            ::fidl_next_fuchsia_process::WireHandleInfo,
1585                        >,
1586                    >(slot.as_mut(), decoder)?;
1587
1588                    let numbered_handles = unsafe {
1589                        slot
1590                                            .deref_unchecked()
1591                                            .deref_unchecked::<
1592                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
1593                                            >()
1594                    };
1595
1596                    if numbered_handles.len() > 128 {
1597                        return Err(::fidl_next::DecodeError::VectorTooLong {
1598                            size: numbered_handles.len() as u64,
1599                            limit: 128,
1600                        });
1601                    }
1602
1603                    Ok(())
1604                }
1605
1606                2 => {
1607                    ::fidl_next::WireEnvelope::decode_as::<
1608                        ___D,
1609                        ::fidl_next::WireVector<'static, crate::WireNamespaceEntry<'static>>,
1610                    >(slot.as_mut(), decoder)?;
1611
1612                    let namespace_entries = unsafe {
1613                        slot
1614                                            .deref_unchecked()
1615                                            .deref_unchecked::<
1616                                                ::fidl_next::WireVector<'_, crate::WireNamespaceEntry<'_>>
1617                                            >()
1618                    };
1619
1620                    if namespace_entries.len() > 32 {
1621                        return Err(::fidl_next::DecodeError::VectorTooLong {
1622                            size: namespace_entries.len() as u64,
1623                            limit: 32,
1624                        });
1625                    }
1626
1627                    Ok(())
1628                }
1629
1630                3 => {
1631                    ::fidl_next::WireEnvelope::decode_as::<
1632                        ___D,
1633                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1634                    >(slot.as_mut(), decoder)?;
1635
1636                    Ok(())
1637                }
1638
1639                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1640            }
1641        })
1642    }
1643}
1644
1645impl<'de> WireStartChildArgs<'de> {
1646    pub fn numbered_handles(
1647        &self,
1648    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>> {
1649        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1650    }
1651
1652    pub fn namespace_entries(
1653        &self,
1654    ) -> Option<&::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>> {
1655        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1656    }
1657
1658    pub fn dictionary(&self) -> Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
1659        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1660    }
1661}
1662
1663impl<'de> ::core::fmt::Debug for WireStartChildArgs<'de> {
1664    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
1665        f.debug_struct("StartChildArgs")
1666            .field("numbered_handles", &self.numbered_handles())
1667            .field("namespace_entries", &self.namespace_entries())
1668            .field("dictionary", &self.dictionary())
1669            .finish()
1670    }
1671}
1672
1673#[derive(Debug)]
1674pub struct ControllerStartRequest {
1675    pub args: crate::StartChildArgs,
1676
1677    pub execution_controller:
1678        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::zx::Channel>,
1679}
1680
1681impl ::fidl_next::Encodable for ControllerStartRequest {
1682    type Encoded = WireControllerStartRequest<'static>;
1683}
1684
1685unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerStartRequest
1686where
1687    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1688    ___E: ::fidl_next::Encoder,
1689    ___E: ::fidl_next::fuchsia::HandleEncoder,
1690{
1691    #[inline]
1692    fn encode(
1693        self,
1694        encoder: &mut ___E,
1695        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1696    ) -> Result<(), ::fidl_next::EncodeError> {
1697        ::fidl_next::munge! {
1698            let Self::Encoded {
1699                args,
1700                execution_controller,
1701
1702            } = out;
1703        }
1704
1705        ::fidl_next::Encode::encode(self.args, encoder, args)?;
1706
1707        ::fidl_next::Encode::encode(self.execution_controller, encoder, execution_controller)?;
1708
1709        Ok(())
1710    }
1711}
1712
1713impl ::fidl_next::EncodableOption for ControllerStartRequest {
1714    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerStartRequest<'static>>;
1715}
1716
1717unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerStartRequest
1718where
1719    ___E: ::fidl_next::Encoder + ?Sized,
1720    ControllerStartRequest: ::fidl_next::Encode<___E>,
1721{
1722    #[inline]
1723    fn encode_option(
1724        this: Option<Self>,
1725        encoder: &mut ___E,
1726        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1727    ) -> Result<(), ::fidl_next::EncodeError> {
1728        if let Some(inner) = this {
1729            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1730            ::fidl_next::WireBox::encode_present(out);
1731        } else {
1732            ::fidl_next::WireBox::encode_absent(out);
1733        }
1734
1735        Ok(())
1736    }
1737}
1738
1739impl<'de> ::fidl_next::FromWire<WireControllerStartRequest<'de>> for ControllerStartRequest {
1740    #[inline]
1741    fn from_wire(wire: WireControllerStartRequest<'de>) -> Self {
1742        Self {
1743            args: ::fidl_next::FromWire::from_wire(wire.args),
1744
1745            execution_controller: ::fidl_next::FromWire::from_wire(wire.execution_controller),
1746        }
1747    }
1748}
1749
1750/// The wire type corresponding to [`ControllerStartRequest`].
1751#[derive(Debug)]
1752#[repr(C)]
1753pub struct WireControllerStartRequest<'de> {
1754    pub args: crate::WireStartChildArgs<'de>,
1755
1756    pub execution_controller:
1757        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::WireChannel>,
1758}
1759
1760unsafe impl ::fidl_next::Wire for WireControllerStartRequest<'static> {
1761    type Decoded<'de> = WireControllerStartRequest<'de>;
1762
1763    #[inline]
1764    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1765        unsafe {
1766            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1767        }
1768    }
1769}
1770
1771unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerStartRequest<'static>
1772where
1773    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1774    ___D: ::fidl_next::Decoder,
1775    ___D: ::fidl_next::fuchsia::HandleDecoder,
1776{
1777    fn decode(
1778        slot: ::fidl_next::Slot<'_, Self>,
1779        decoder: &mut ___D,
1780    ) -> Result<(), ::fidl_next::DecodeError> {
1781        ::fidl_next::munge! {
1782            let Self {
1783                mut args,
1784                mut execution_controller,
1785
1786            } = slot;
1787        }
1788
1789        ::fidl_next::Decode::decode(args.as_mut(), decoder)?;
1790
1791        ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder)?;
1792
1793        Ok(())
1794    }
1795}
1796
1797/// The type corresponding to the Controller protocol.
1798#[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"]
1799#[derive(Debug)]
1800pub struct Controller;
1801
1802pub mod controller {
1803    pub mod prelude {
1804        pub use crate::{Controller, ControllerClientHandler, ControllerServerHandler, controller};
1805
1806        pub use crate::ControllerStartRequest;
1807
1808        pub use crate::ControllerDestroyResponse;
1809
1810        pub use crate::ControllerGetExposedDictionaryResponse;
1811
1812        pub use crate::ControllerIsStartedResponse;
1813
1814        pub use crate::ControllerStartResponse;
1815
1816        pub use crate::Error;
1817    }
1818
1819    pub struct Start;
1820
1821    impl ::fidl_next::Method for Start {
1822        const ORDINAL: u64 = 7532130149195770565;
1823
1824        type Protocol = crate::Controller;
1825
1826        type Request = crate::WireControllerStartRequest<'static>;
1827
1828        type Response = ::fidl_next::WireFlexibleResult<
1829            'static,
1830            crate::WireControllerStartResponse,
1831            crate::WireError,
1832        >;
1833    }
1834
1835    pub struct IsStarted;
1836
1837    impl ::fidl_next::Method for IsStarted {
1838        const ORDINAL: u64 = 2402079833990398915;
1839
1840        type Protocol = crate::Controller;
1841
1842        type Request = ();
1843
1844        type Response = ::fidl_next::WireFlexibleResult<
1845            'static,
1846            crate::WireControllerIsStartedResponse,
1847            crate::WireError,
1848        >;
1849    }
1850
1851    pub struct GetExposedDictionary;
1852
1853    impl ::fidl_next::Method for GetExposedDictionary {
1854        const ORDINAL: u64 = 9099583788120940443;
1855
1856        type Protocol = crate::Controller;
1857
1858        type Request = ();
1859
1860        type Response = ::fidl_next::WireFlexibleResult<
1861            'static,
1862            crate::WireControllerGetExposedDictionaryResponse,
1863            crate::WireError,
1864        >;
1865    }
1866
1867    pub struct Destroy;
1868
1869    impl ::fidl_next::Method for Destroy {
1870        const ORDINAL: u64 = 8381937394141370177;
1871
1872        type Protocol = crate::Controller;
1873
1874        type Request = ();
1875
1876        type Response = ::fidl_next::WireFlexibleResult<
1877            'static,
1878            crate::WireControllerDestroyResponse,
1879            crate::WireError,
1880        >;
1881    }
1882
1883    mod ___detail {
1884
1885        pub struct Start<T0, T1> {
1886            args: T0,
1887
1888            execution_controller: T1,
1889        }
1890
1891        impl<T0, T1> ::fidl_next::Encodable for Start<T0, T1>
1892        where
1893            T0: ::fidl_next::Encodable<Encoded = crate::WireStartChildArgs<'static>>,
1894            T1: ::fidl_next::Encodable<
1895                    Encoded = ::fidl_next::ServerEnd<
1896                        crate::ExecutionController,
1897                        ::fidl_next::fuchsia::WireChannel,
1898                    >,
1899                >,
1900        {
1901            type Encoded = crate::WireControllerStartRequest<'static>;
1902        }
1903
1904        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Start<T0, T1>
1905        where
1906            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1907            ___E: ::fidl_next::Encoder,
1908            ___E: ::fidl_next::fuchsia::HandleEncoder,
1909            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStartChildArgs<'static>>,
1910            T1: ::fidl_next::Encode<
1911                    ___E,
1912                    Encoded = ::fidl_next::ServerEnd<
1913                        crate::ExecutionController,
1914                        ::fidl_next::fuchsia::WireChannel,
1915                    >,
1916                >,
1917        {
1918            #[inline]
1919            fn encode(
1920                self,
1921                encoder: &mut ___E,
1922                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1923            ) -> Result<(), ::fidl_next::EncodeError> {
1924                ::fidl_next::munge! {
1925                    let Self::Encoded {
1926                        args,
1927                        execution_controller,
1928
1929                    } = out;
1930                }
1931
1932                ::fidl_next::Encode::encode(self.args, encoder, args)?;
1933
1934                ::fidl_next::Encode::encode(
1935                    self.execution_controller,
1936                    encoder,
1937                    execution_controller,
1938                )?;
1939
1940                Ok(())
1941            }
1942        }
1943
1944        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Controller
1945        where
1946            ___T: ::fidl_next::Transport,
1947        {
1948            type ClientSender = ControllerClientSender<___T>;
1949            type ServerSender = ControllerServerSender<___T>;
1950        }
1951
1952        /// The client sender for the `Controller` protocol.
1953        #[repr(transparent)]
1954        pub struct ControllerClientSender<___T: ::fidl_next::Transport> {
1955            #[allow(dead_code)]
1956            sender: ::fidl_next::protocol::ClientSender<___T>,
1957        }
1958
1959        impl<___T> ControllerClientSender<___T>
1960        where
1961            ___T: ::fidl_next::Transport,
1962        {
1963            #[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"]
1964            pub fn start(
1965                &self,
1966
1967                args: impl ::fidl_next::Encode<
1968                    <___T as ::fidl_next::Transport>::SendBuffer,
1969                    Encoded = crate::WireStartChildArgs<'static>,
1970                >,
1971
1972                execution_controller: impl ::fidl_next::Encode<
1973                    <___T as ::fidl_next::Transport>::SendBuffer,
1974                    Encoded = ::fidl_next::ServerEnd<
1975                        crate::ExecutionController,
1976                        ::fidl_next::fuchsia::WireChannel,
1977                    >,
1978                >,
1979            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
1980            where
1981                <___T as ::fidl_next::Transport>::SendBuffer:
1982                    ::fidl_next::encoder::InternalHandleEncoder,
1983                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
1984                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
1985            {
1986                self.start_with(Start { args, execution_controller })
1987            }
1988
1989            #[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"]
1990            pub fn start_with<___R>(
1991                &self,
1992                request: ___R,
1993            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
1994            where
1995                ___R: ::fidl_next::Encode<
1996                        <___T as ::fidl_next::Transport>::SendBuffer,
1997                        Encoded = crate::WireControllerStartRequest<'static>,
1998                    >,
1999            {
2000                ::fidl_next::TwoWayFuture::from_untyped(
2001                    self.sender.send_two_way(7532130149195770565, request),
2002                )
2003            }
2004
2005            #[doc = " Returns true if this instance is currently running.\n"]
2006            pub fn is_started(&self) -> ::fidl_next::TwoWayFuture<'_, super::IsStarted, ___T> {
2007                ::fidl_next::TwoWayFuture::from_untyped(
2008                    self.sender.send_two_way(2402079833990398915, ()),
2009                )
2010            }
2011
2012            #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2013            pub fn get_exposed_dictionary(
2014                &self,
2015            ) -> ::fidl_next::TwoWayFuture<'_, super::GetExposedDictionary, ___T> {
2016                ::fidl_next::TwoWayFuture::from_untyped(
2017                    self.sender.send_two_way(9099583788120940443, ()),
2018                )
2019            }
2020
2021            #[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"]
2022            pub fn destroy(&self) -> ::fidl_next::TwoWayFuture<'_, super::Destroy, ___T> {
2023                ::fidl_next::TwoWayFuture::from_untyped(
2024                    self.sender.send_two_way(8381937394141370177, ()),
2025                )
2026            }
2027        }
2028
2029        /// The server sender for the `Controller` protocol.
2030        #[repr(transparent)]
2031        pub struct ControllerServerSender<___T: ::fidl_next::Transport> {
2032            sender: ::fidl_next::protocol::ServerSender<___T>,
2033        }
2034
2035        impl<___T> ControllerServerSender<___T> where ___T: ::fidl_next::Transport {}
2036    }
2037}
2038
2039/// A client handler for the Controller protocol.
2040///
2041/// See [`Controller`] for more details.
2042pub trait ControllerClientHandler<
2043    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
2044    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2045>
2046{
2047    fn on_unknown_interaction(
2048        &mut self,
2049        sender: &::fidl_next::ClientSender<Controller, ___T>,
2050        ordinal: u64,
2051    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2052        sender.close();
2053        ::core::future::ready(())
2054    }
2055}
2056
2057impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Controller
2058where
2059    ___H: ControllerClientHandler<___T> + ::core::marker::Send,
2060    ___T: ::fidl_next::Transport,
2061    <controller::Start as ::fidl_next::Method>::Response:
2062        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2063    <controller::IsStarted as ::fidl_next::Method>::Response:
2064        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2065    <controller::GetExposedDictionary as ::fidl_next::Method>::Response:
2066        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2067    <controller::Destroy as ::fidl_next::Method>::Response:
2068        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2069{
2070    async fn on_event(
2071        handler: &mut ___H,
2072        sender: &::fidl_next::ClientSender<Self, ___T>,
2073        ordinal: u64,
2074        buffer: ___T::RecvBuffer,
2075    ) {
2076        match ordinal {
2077            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2078        }
2079    }
2080}
2081
2082/// A server handler for the Controller protocol.
2083///
2084/// See [`Controller`] for more details.
2085pub trait ControllerServerHandler<
2086    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
2087    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2088>
2089{
2090    #[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"]
2091    fn start(
2092        &mut self,
2093        sender: &::fidl_next::ServerSender<Controller, ___T>,
2094
2095        request: ::fidl_next::Request<controller::Start, ___T>,
2096
2097        responder: ::fidl_next::Responder<controller::Start>,
2098    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2099
2100    #[doc = " Returns true if this instance is currently running.\n"]
2101    fn is_started(
2102        &mut self,
2103        sender: &::fidl_next::ServerSender<Controller, ___T>,
2104
2105        responder: ::fidl_next::Responder<controller::IsStarted>,
2106    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2107
2108    #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2109    fn get_exposed_dictionary(
2110        &mut self,
2111        sender: &::fidl_next::ServerSender<Controller, ___T>,
2112
2113        responder: ::fidl_next::Responder<controller::GetExposedDictionary>,
2114    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2115
2116    #[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"]
2117    fn destroy(
2118        &mut self,
2119        sender: &::fidl_next::ServerSender<Controller, ___T>,
2120
2121        responder: ::fidl_next::Responder<controller::Destroy>,
2122    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2123
2124    fn on_unknown_interaction(
2125        &mut self,
2126        sender: &::fidl_next::ServerSender<Controller, ___T>,
2127        ordinal: u64,
2128    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
2129        sender.close();
2130        ::core::future::ready(())
2131    }
2132}
2133
2134impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Controller
2135where
2136    ___H: ControllerServerHandler<___T> + ::core::marker::Send,
2137    ___T: ::fidl_next::Transport,
2138    <controller::Start as ::fidl_next::Method>::Request:
2139        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2140{
2141    async fn on_one_way(
2142        handler: &mut ___H,
2143        sender: &::fidl_next::ServerSender<Self, ___T>,
2144        ordinal: u64,
2145        buffer: ___T::RecvBuffer,
2146    ) {
2147        match ordinal {
2148            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2149        }
2150    }
2151
2152    async fn on_two_way(
2153        handler: &mut ___H,
2154        sender: &::fidl_next::ServerSender<Self, ___T>,
2155        ordinal: u64,
2156        buffer: ___T::RecvBuffer,
2157        responder: ::fidl_next::protocol::Responder,
2158    ) {
2159        match ordinal {
2160            7532130149195770565 => {
2161                let responder = ::fidl_next::Responder::from_untyped(responder);
2162
2163                match ::fidl_next::DecoderExt::decode(buffer) {
2164                    Ok(decoded) => handler.start(sender, decoded, responder).await,
2165                    Err(e) => sender.close(),
2166                }
2167            }
2168
2169            2402079833990398915 => {
2170                let responder = ::fidl_next::Responder::from_untyped(responder);
2171
2172                handler.is_started(sender, responder).await;
2173            }
2174
2175            9099583788120940443 => {
2176                let responder = ::fidl_next::Responder::from_untyped(responder);
2177
2178                handler.get_exposed_dictionary(sender, responder).await;
2179            }
2180
2181            8381937394141370177 => {
2182                let responder = ::fidl_next::Responder::from_untyped(responder);
2183
2184                handler.destroy(sender, responder).await;
2185            }
2186
2187            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
2188        }
2189    }
2190}
2191
2192#[doc = " The maximum number of dynamic offers that can target a created component.\n"]
2193pub const MAX_DYNAMIC_OFFER_COUNT: u32 = 128;
2194
2195#[derive(Debug, Default)]
2196pub struct CreateChildArgs {
2197    pub numbered_handles: Option<Vec<::fidl_next_fuchsia_process::HandleInfo>>,
2198
2199    pub dynamic_offers: Option<Vec<::fidl_next_fuchsia_component_decl::Offer>>,
2200
2201    pub controller:
2202        Option<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>>,
2203
2204    pub dictionary: Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
2205}
2206
2207impl CreateChildArgs {
2208    fn __max_ordinal(&self) -> usize {
2209        if self.dictionary.is_some() {
2210            return 4;
2211        }
2212
2213        if self.controller.is_some() {
2214            return 3;
2215        }
2216
2217        if self.dynamic_offers.is_some() {
2218            return 2;
2219        }
2220
2221        if self.numbered_handles.is_some() {
2222            return 1;
2223        }
2224
2225        0
2226    }
2227}
2228
2229impl ::fidl_next::Encodable for CreateChildArgs {
2230    type Encoded = WireCreateChildArgs<'static>;
2231}
2232
2233unsafe impl<___E> ::fidl_next::Encode<___E> for CreateChildArgs
2234where
2235    ___E: ::fidl_next::Encoder + ?Sized,
2236    ___E: ::fidl_next::fuchsia::HandleEncoder,
2237{
2238    #[inline]
2239    fn encode(
2240        mut self,
2241        encoder: &mut ___E,
2242        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2243    ) -> Result<(), ::fidl_next::EncodeError> {
2244        ::fidl_next::munge!(let WireCreateChildArgs { table } = out);
2245
2246        let max_ord = self.__max_ordinal();
2247
2248        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2249        ::fidl_next::Wire::zero_padding(&mut out);
2250
2251        let mut preallocated =
2252            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2253
2254        for i in 1..=max_ord {
2255            match i {
2256                4 => {
2257                    if let Some(dictionary) = self.dictionary.take() {
2258                        ::fidl_next::WireEnvelope::encode_value(
2259                            dictionary,
2260                            preallocated.encoder,
2261                            &mut out,
2262                        )?;
2263                    } else {
2264                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2265                    }
2266                }
2267
2268                3 => {
2269                    if let Some(controller) = self.controller.take() {
2270                        ::fidl_next::WireEnvelope::encode_value(
2271                            controller,
2272                            preallocated.encoder,
2273                            &mut out,
2274                        )?;
2275                    } else {
2276                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2277                    }
2278                }
2279
2280                2 => {
2281                    if let Some(dynamic_offers) = self.dynamic_offers.take() {
2282                        ::fidl_next::WireEnvelope::encode_value(
2283                            dynamic_offers,
2284                            preallocated.encoder,
2285                            &mut out,
2286                        )?;
2287                    } else {
2288                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2289                    }
2290                }
2291
2292                1 => {
2293                    if let Some(numbered_handles) = self.numbered_handles.take() {
2294                        ::fidl_next::WireEnvelope::encode_value(
2295                            numbered_handles,
2296                            preallocated.encoder,
2297                            &mut out,
2298                        )?;
2299                    } else {
2300                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2301                    }
2302                }
2303
2304                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2305            }
2306            unsafe {
2307                preallocated.write_next(out.assume_init_ref());
2308            }
2309        }
2310
2311        ::fidl_next::WireTable::encode_len(table, max_ord);
2312
2313        Ok(())
2314    }
2315}
2316
2317impl<'de> ::fidl_next::FromWire<WireCreateChildArgs<'de>> for CreateChildArgs {
2318    #[inline]
2319    fn from_wire(wire: WireCreateChildArgs<'de>) -> Self {
2320        let wire = ::core::mem::ManuallyDrop::new(wire);
2321
2322        let numbered_handles = wire.table.get(1);
2323
2324        let dynamic_offers = wire.table.get(2);
2325
2326        let controller = wire.table.get(3);
2327
2328        let dictionary = wire.table.get(4);
2329
2330        Self {
2331            numbered_handles:
2332                numbered_handles.map(|envelope| {
2333                    ::fidl_next::FromWire::from_wire(unsafe {
2334                        envelope.read_unchecked::<::fidl_next::WireVector<
2335                            'de,
2336                            ::fidl_next_fuchsia_process::WireHandleInfo,
2337                        >>()
2338                    })
2339                }),
2340
2341            dynamic_offers: dynamic_offers.map(|envelope| {
2342                ::fidl_next::FromWire::from_wire(unsafe {
2343                    envelope.read_unchecked::<::fidl_next::WireVector<
2344                        'de,
2345                        ::fidl_next_fuchsia_component_decl::WireOffer<'de>,
2346                    >>()
2347                })
2348            }),
2349
2350            controller:
2351                controller.map(|envelope| {
2352                    ::fidl_next::FromWire::from_wire(unsafe {
2353                        envelope.read_unchecked::<::fidl_next::ServerEnd<
2354                            crate::Controller,
2355                            ::fidl_next::fuchsia::WireChannel,
2356                        >>()
2357                    })
2358                }),
2359
2360            dictionary: dictionary.map(|envelope| {
2361                ::fidl_next::FromWire::from_wire(unsafe {
2362                    envelope
2363                        .read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>(
2364                        )
2365                })
2366            }),
2367        }
2368    }
2369}
2370
2371/// The wire type corresponding to [`CreateChildArgs`].
2372#[repr(C)]
2373pub struct WireCreateChildArgs<'de> {
2374    table: ::fidl_next::WireTable<'de>,
2375}
2376
2377impl<'de> Drop for WireCreateChildArgs<'de> {
2378    fn drop(&mut self) {
2379        let _ = self.table.get(1)
2380                .map(|envelope| unsafe {
2381                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
2382                });
2383
2384        let _ = self.table.get(2)
2385                .map(|envelope| unsafe {
2386                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>>()
2387                });
2388
2389        let _ = self.table.get(3)
2390                .map(|envelope| unsafe {
2391                    envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>()
2392                });
2393
2394        let _ = self.table.get(4).map(|envelope| unsafe {
2395            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
2396        });
2397    }
2398}
2399
2400unsafe impl ::fidl_next::Wire for WireCreateChildArgs<'static> {
2401    type Decoded<'de> = WireCreateChildArgs<'de>;
2402
2403    #[inline]
2404    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2405        ::fidl_next::munge!(let Self { table } = out);
2406        ::fidl_next::WireTable::zero_padding(table);
2407    }
2408}
2409
2410unsafe impl<___D> ::fidl_next::Decode<___D> for WireCreateChildArgs<'static>
2411where
2412    ___D: ::fidl_next::Decoder + ?Sized,
2413    ___D: ::fidl_next::fuchsia::HandleDecoder,
2414{
2415    fn decode(
2416        slot: ::fidl_next::Slot<'_, Self>,
2417        decoder: &mut ___D,
2418    ) -> Result<(), ::fidl_next::DecodeError> {
2419        ::fidl_next::munge!(let Self { table } = slot);
2420
2421        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2422            match ordinal {
2423                0 => unsafe { ::core::hint::unreachable_unchecked() },
2424
2425                1 => {
2426                    ::fidl_next::WireEnvelope::decode_as::<
2427                        ___D,
2428                        ::fidl_next::WireVector<
2429                            'static,
2430                            ::fidl_next_fuchsia_process::WireHandleInfo,
2431                        >,
2432                    >(slot.as_mut(), decoder)?;
2433
2434                    let numbered_handles = unsafe {
2435                        slot
2436                                            .deref_unchecked()
2437                                            .deref_unchecked::<
2438                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
2439                                            >()
2440                    };
2441
2442                    if numbered_handles.len() > 128 {
2443                        return Err(::fidl_next::DecodeError::VectorTooLong {
2444                            size: numbered_handles.len() as u64,
2445                            limit: 128,
2446                        });
2447                    }
2448
2449                    Ok(())
2450                }
2451
2452                2 => {
2453                    ::fidl_next::WireEnvelope::decode_as::<
2454                        ___D,
2455                        ::fidl_next::WireVector<
2456                            'static,
2457                            ::fidl_next_fuchsia_component_decl::WireOffer<'static>,
2458                        >,
2459                    >(slot.as_mut(), decoder)?;
2460
2461                    let dynamic_offers = unsafe {
2462                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2463                            '_,
2464                            ::fidl_next_fuchsia_component_decl::WireOffer<'_>,
2465                        >>()
2466                    };
2467
2468                    if dynamic_offers.len() > 128 {
2469                        return Err(::fidl_next::DecodeError::VectorTooLong {
2470                            size: dynamic_offers.len() as u64,
2471                            limit: 128,
2472                        });
2473                    }
2474
2475                    Ok(())
2476                }
2477
2478                3 => {
2479                    ::fidl_next::WireEnvelope::decode_as::<
2480                        ___D,
2481                        ::fidl_next::ServerEnd<
2482                            crate::Controller,
2483                            ::fidl_next::fuchsia::WireChannel,
2484                        >,
2485                    >(slot.as_mut(), decoder)?;
2486
2487                    Ok(())
2488                }
2489
2490                4 => {
2491                    ::fidl_next::WireEnvelope::decode_as::<
2492                        ___D,
2493                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
2494                    >(slot.as_mut(), decoder)?;
2495
2496                    Ok(())
2497                }
2498
2499                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2500            }
2501        })
2502    }
2503}
2504
2505impl<'de> WireCreateChildArgs<'de> {
2506    pub fn numbered_handles(
2507        &self,
2508    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>> {
2509        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2510    }
2511
2512    pub fn dynamic_offers(
2513        &self,
2514    ) -> Option<&::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>>
2515    {
2516        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2517    }
2518
2519    pub fn controller(
2520        &self,
2521    ) -> Option<&::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>> {
2522        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2523    }
2524
2525    pub fn dictionary(&self) -> Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
2526        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2527    }
2528}
2529
2530impl<'de> ::core::fmt::Debug for WireCreateChildArgs<'de> {
2531    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
2532        f.debug_struct("CreateChildArgs")
2533            .field("numbered_handles", &self.numbered_handles())
2534            .field("dynamic_offers", &self.dynamic_offers())
2535            .field("controller", &self.controller())
2536            .field("dictionary", &self.dictionary())
2537            .finish()
2538    }
2539}
2540
2541#[doc = " Payload for DebugStarted events.\n"]
2542#[derive(Debug, Default)]
2543pub struct DebugStartedPayload {
2544    pub runtime_dir: Option<
2545        ::fidl_next::ClientEnd<
2546            ::fidl_next_fuchsia_io::Directory,
2547            ::fidl_next::fuchsia::zx::Channel,
2548        >,
2549    >,
2550
2551    pub break_on_start: Option<::fidl_next::fuchsia::zx::EventPair>,
2552}
2553
2554impl DebugStartedPayload {
2555    fn __max_ordinal(&self) -> usize {
2556        if self.break_on_start.is_some() {
2557            return 2;
2558        }
2559
2560        if self.runtime_dir.is_some() {
2561            return 1;
2562        }
2563
2564        0
2565    }
2566}
2567
2568impl ::fidl_next::Encodable for DebugStartedPayload {
2569    type Encoded = WireDebugStartedPayload<'static>;
2570}
2571
2572unsafe impl<___E> ::fidl_next::Encode<___E> for DebugStartedPayload
2573where
2574    ___E: ::fidl_next::Encoder + ?Sized,
2575    ___E: ::fidl_next::fuchsia::HandleEncoder,
2576{
2577    #[inline]
2578    fn encode(
2579        mut self,
2580        encoder: &mut ___E,
2581        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2582    ) -> Result<(), ::fidl_next::EncodeError> {
2583        ::fidl_next::munge!(let WireDebugStartedPayload { table } = out);
2584
2585        let max_ord = self.__max_ordinal();
2586
2587        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2588        ::fidl_next::Wire::zero_padding(&mut out);
2589
2590        let mut preallocated =
2591            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2592
2593        for i in 1..=max_ord {
2594            match i {
2595                2 => {
2596                    if let Some(break_on_start) = self.break_on_start.take() {
2597                        ::fidl_next::WireEnvelope::encode_value(
2598                            break_on_start,
2599                            preallocated.encoder,
2600                            &mut out,
2601                        )?;
2602                    } else {
2603                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2604                    }
2605                }
2606
2607                1 => {
2608                    if let Some(runtime_dir) = self.runtime_dir.take() {
2609                        ::fidl_next::WireEnvelope::encode_value(
2610                            runtime_dir,
2611                            preallocated.encoder,
2612                            &mut out,
2613                        )?;
2614                    } else {
2615                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2616                    }
2617                }
2618
2619                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2620            }
2621            unsafe {
2622                preallocated.write_next(out.assume_init_ref());
2623            }
2624        }
2625
2626        ::fidl_next::WireTable::encode_len(table, max_ord);
2627
2628        Ok(())
2629    }
2630}
2631
2632impl<'de> ::fidl_next::FromWire<WireDebugStartedPayload<'de>> for DebugStartedPayload {
2633    #[inline]
2634    fn from_wire(wire: WireDebugStartedPayload<'de>) -> Self {
2635        let wire = ::core::mem::ManuallyDrop::new(wire);
2636
2637        let runtime_dir = wire.table.get(1);
2638
2639        let break_on_start = wire.table.get(2);
2640
2641        Self {
2642            runtime_dir: runtime_dir.map(|envelope| {
2643                ::fidl_next::FromWire::from_wire(unsafe {
2644                    envelope.read_unchecked::<::fidl_next::ClientEnd<
2645                        ::fidl_next_fuchsia_io::Directory,
2646                        ::fidl_next::fuchsia::WireChannel,
2647                    >>()
2648                })
2649            }),
2650
2651            break_on_start: break_on_start.map(|envelope| {
2652                ::fidl_next::FromWire::from_wire(unsafe {
2653                    envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2654                })
2655            }),
2656        }
2657    }
2658}
2659
2660/// The wire type corresponding to [`DebugStartedPayload`].
2661#[repr(C)]
2662pub struct WireDebugStartedPayload<'de> {
2663    table: ::fidl_next::WireTable<'de>,
2664}
2665
2666impl<'de> Drop for WireDebugStartedPayload<'de> {
2667    fn drop(&mut self) {
2668        let _ = self.table.get(1).map(|envelope| unsafe {
2669            envelope.read_unchecked::<::fidl_next::ClientEnd<
2670                ::fidl_next_fuchsia_io::Directory,
2671                ::fidl_next::fuchsia::WireChannel,
2672            >>()
2673        });
2674
2675        let _ = self.table.get(2).map(|envelope| unsafe {
2676            envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2677        });
2678    }
2679}
2680
2681unsafe impl ::fidl_next::Wire for WireDebugStartedPayload<'static> {
2682    type Decoded<'de> = WireDebugStartedPayload<'de>;
2683
2684    #[inline]
2685    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2686        ::fidl_next::munge!(let Self { table } = out);
2687        ::fidl_next::WireTable::zero_padding(table);
2688    }
2689}
2690
2691unsafe impl<___D> ::fidl_next::Decode<___D> for WireDebugStartedPayload<'static>
2692where
2693    ___D: ::fidl_next::Decoder + ?Sized,
2694    ___D: ::fidl_next::fuchsia::HandleDecoder,
2695{
2696    fn decode(
2697        slot: ::fidl_next::Slot<'_, Self>,
2698        decoder: &mut ___D,
2699    ) -> Result<(), ::fidl_next::DecodeError> {
2700        ::fidl_next::munge!(let Self { table } = slot);
2701
2702        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2703            match ordinal {
2704                0 => unsafe { ::core::hint::unreachable_unchecked() },
2705
2706                1 => {
2707                    ::fidl_next::WireEnvelope::decode_as::<
2708                        ___D,
2709                        ::fidl_next::ClientEnd<
2710                            ::fidl_next_fuchsia_io::Directory,
2711                            ::fidl_next::fuchsia::WireChannel,
2712                        >,
2713                    >(slot.as_mut(), decoder)?;
2714
2715                    Ok(())
2716                }
2717
2718                2 => {
2719                    ::fidl_next::WireEnvelope::decode_as::<
2720                        ___D,
2721                        ::fidl_next::fuchsia::WireEventPair,
2722                    >(slot.as_mut(), decoder)?;
2723
2724                    Ok(())
2725                }
2726
2727                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2728            }
2729        })
2730    }
2731}
2732
2733impl<'de> WireDebugStartedPayload<'de> {
2734    pub fn runtime_dir(
2735        &self,
2736    ) -> Option<
2737        &::fidl_next::ClientEnd<
2738            ::fidl_next_fuchsia_io::Directory,
2739            ::fidl_next::fuchsia::WireChannel,
2740        >,
2741    > {
2742        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2743    }
2744
2745    pub fn break_on_start(&self) -> Option<&::fidl_next::fuchsia::WireEventPair> {
2746        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2747    }
2748}
2749
2750impl<'de> ::core::fmt::Debug for WireDebugStartedPayload<'de> {
2751    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
2752        f.debug_struct("DebugStartedPayload")
2753            .field("runtime_dir", &self.runtime_dir())
2754            .field("break_on_start", &self.break_on_start())
2755            .finish()
2756    }
2757}
2758
2759#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2760#[repr(u32)]
2761pub enum DeletionError {
2762    Connection = 1,
2763    Protocol = 2,
2764    NoneAvailable = 3,
2765    Unsupported = 4,
2766}
2767
2768impl ::fidl_next::Encodable for DeletionError {
2769    type Encoded = WireDeletionError;
2770}
2771impl ::std::convert::TryFrom<u32> for DeletionError {
2772    type Error = ::fidl_next::UnknownStrictEnumMemberError;
2773    fn try_from(value: u32) -> Result<Self, Self::Error> {
2774        match value {
2775            1 => Ok(Self::Connection),
2776            2 => Ok(Self::Protocol),
2777            3 => Ok(Self::NoneAvailable),
2778            4 => Ok(Self::Unsupported),
2779
2780            _ => Err(Self::Error::new(value.into())),
2781        }
2782    }
2783}
2784
2785unsafe impl<___E> ::fidl_next::Encode<___E> for DeletionError
2786where
2787    ___E: ?Sized,
2788{
2789    #[inline]
2790    fn encode(
2791        self,
2792        encoder: &mut ___E,
2793        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2794    ) -> Result<(), ::fidl_next::EncodeError> {
2795        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
2796    }
2797}
2798
2799unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DeletionError
2800where
2801    ___E: ?Sized,
2802{
2803    #[inline]
2804    fn encode_ref(
2805        &self,
2806        encoder: &mut ___E,
2807        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2808    ) -> Result<(), ::fidl_next::EncodeError> {
2809        ::fidl_next::munge!(let WireDeletionError { value } = out);
2810        let _ = value.write(::fidl_next::WireU32::from(match *self {
2811            Self::Connection => 1,
2812
2813            Self::Protocol => 2,
2814
2815            Self::NoneAvailable => 3,
2816
2817            Self::Unsupported => 4,
2818        }));
2819
2820        Ok(())
2821    }
2822}
2823
2824impl ::core::convert::From<WireDeletionError> for DeletionError {
2825    fn from(wire: WireDeletionError) -> Self {
2826        match u32::from(wire.value) {
2827            1 => Self::Connection,
2828
2829            2 => Self::Protocol,
2830
2831            3 => Self::NoneAvailable,
2832
2833            4 => Self::Unsupported,
2834
2835            _ => unsafe { ::core::hint::unreachable_unchecked() },
2836        }
2837    }
2838}
2839
2840impl ::fidl_next::FromWire<WireDeletionError> for DeletionError {
2841    #[inline]
2842    fn from_wire(wire: WireDeletionError) -> Self {
2843        Self::from(wire)
2844    }
2845}
2846
2847impl ::fidl_next::FromWireRef<WireDeletionError> for DeletionError {
2848    #[inline]
2849    fn from_wire_ref(wire: &WireDeletionError) -> Self {
2850        Self::from(*wire)
2851    }
2852}
2853
2854/// The wire type corresponding to [`DeletionError`].
2855#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2856#[repr(transparent)]
2857pub struct WireDeletionError {
2858    value: ::fidl_next::WireU32,
2859}
2860
2861unsafe impl ::fidl_next::Wire for WireDeletionError {
2862    type Decoded<'de> = Self;
2863
2864    #[inline]
2865    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2866        // Wire enums have no padding
2867    }
2868}
2869
2870impl WireDeletionError {
2871    pub const CONNECTION: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(1) };
2872
2873    pub const PROTOCOL: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(2) };
2874
2875    pub const NONE_AVAILABLE: WireDeletionError =
2876        WireDeletionError { value: ::fidl_next::WireU32(3) };
2877
2878    pub const UNSUPPORTED: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(4) };
2879}
2880
2881unsafe impl<___D> ::fidl_next::Decode<___D> for WireDeletionError
2882where
2883    ___D: ?Sized,
2884{
2885    fn decode(
2886        slot: ::fidl_next::Slot<'_, Self>,
2887        _: &mut ___D,
2888    ) -> Result<(), ::fidl_next::DecodeError> {
2889        ::fidl_next::munge!(let Self { value } = slot);
2890
2891        match u32::from(*value) {
2892            1 | 2 | 3 | 4 => (),
2893            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
2894        }
2895
2896        Ok(())
2897    }
2898}
2899
2900impl ::core::convert::From<DeletionError> for WireDeletionError {
2901    fn from(natural: DeletionError) -> Self {
2902        match natural {
2903            DeletionError::Connection => WireDeletionError::CONNECTION,
2904
2905            DeletionError::Protocol => WireDeletionError::PROTOCOL,
2906
2907            DeletionError::NoneAvailable => WireDeletionError::NONE_AVAILABLE,
2908
2909            DeletionError::Unsupported => WireDeletionError::UNSUPPORTED,
2910        }
2911    }
2912}
2913
2914#[doc = " Payload for Destroyed events.\n"]
2915#[derive(Clone, Debug, Default)]
2916pub struct DestroyedPayload {}
2917
2918impl DestroyedPayload {
2919    fn __max_ordinal(&self) -> usize {
2920        0
2921    }
2922}
2923
2924impl ::fidl_next::Encodable for DestroyedPayload {
2925    type Encoded = WireDestroyedPayload<'static>;
2926}
2927
2928unsafe impl<___E> ::fidl_next::Encode<___E> for DestroyedPayload
2929where
2930    ___E: ::fidl_next::Encoder + ?Sized,
2931{
2932    #[inline]
2933    fn encode(
2934        mut self,
2935        encoder: &mut ___E,
2936        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2937    ) -> Result<(), ::fidl_next::EncodeError> {
2938        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
2939
2940        let max_ord = self.__max_ordinal();
2941
2942        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2943        ::fidl_next::Wire::zero_padding(&mut out);
2944
2945        let mut preallocated =
2946            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2947
2948        for i in 1..=max_ord {
2949            match i {
2950                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2951            }
2952            unsafe {
2953                preallocated.write_next(out.assume_init_ref());
2954            }
2955        }
2956
2957        ::fidl_next::WireTable::encode_len(table, max_ord);
2958
2959        Ok(())
2960    }
2961}
2962
2963unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DestroyedPayload
2964where
2965    ___E: ::fidl_next::Encoder + ?Sized,
2966{
2967    #[inline]
2968    fn encode_ref(
2969        &self,
2970        encoder: &mut ___E,
2971        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2972    ) -> Result<(), ::fidl_next::EncodeError> {
2973        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
2974
2975        let max_ord = self.__max_ordinal();
2976
2977        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2978        ::fidl_next::Wire::zero_padding(&mut out);
2979
2980        let mut preallocated =
2981            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2982
2983        for i in 1..=max_ord {
2984            match i {
2985                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2986            }
2987            unsafe {
2988                preallocated.write_next(out.assume_init_ref());
2989            }
2990        }
2991
2992        ::fidl_next::WireTable::encode_len(table, max_ord);
2993
2994        Ok(())
2995    }
2996}
2997
2998impl<'de> ::fidl_next::FromWire<WireDestroyedPayload<'de>> for DestroyedPayload {
2999    #[inline]
3000    fn from_wire(wire: WireDestroyedPayload<'de>) -> Self {
3001        let wire = ::core::mem::ManuallyDrop::new(wire);
3002
3003        Self {}
3004    }
3005}
3006
3007impl<'de> ::fidl_next::FromWireRef<WireDestroyedPayload<'de>> for DestroyedPayload {
3008    #[inline]
3009    fn from_wire_ref(wire: &WireDestroyedPayload<'de>) -> Self {
3010        Self {}
3011    }
3012}
3013
3014/// The wire type corresponding to [`DestroyedPayload`].
3015#[repr(C)]
3016pub struct WireDestroyedPayload<'de> {
3017    table: ::fidl_next::WireTable<'de>,
3018}
3019
3020impl<'de> Drop for WireDestroyedPayload<'de> {
3021    fn drop(&mut self) {}
3022}
3023
3024unsafe impl ::fidl_next::Wire for WireDestroyedPayload<'static> {
3025    type Decoded<'de> = WireDestroyedPayload<'de>;
3026
3027    #[inline]
3028    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3029        ::fidl_next::munge!(let Self { table } = out);
3030        ::fidl_next::WireTable::zero_padding(table);
3031    }
3032}
3033
3034unsafe impl<___D> ::fidl_next::Decode<___D> for WireDestroyedPayload<'static>
3035where
3036    ___D: ::fidl_next::Decoder + ?Sized,
3037{
3038    fn decode(
3039        slot: ::fidl_next::Slot<'_, Self>,
3040        decoder: &mut ___D,
3041    ) -> Result<(), ::fidl_next::DecodeError> {
3042        ::fidl_next::munge!(let Self { table } = slot);
3043
3044        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3045            match ordinal {
3046                0 => unsafe { ::core::hint::unreachable_unchecked() },
3047
3048                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3049            }
3050        })
3051    }
3052}
3053
3054impl<'de> WireDestroyedPayload<'de> {}
3055
3056impl<'de> ::core::fmt::Debug for WireDestroyedPayload<'de> {
3057    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3058        f.debug_struct("DestroyedPayload").finish()
3059    }
3060}
3061
3062#[doc = " Payload for Discovered events.\n"]
3063#[derive(Clone, Debug, Default)]
3064pub struct DiscoveredPayload {}
3065
3066impl DiscoveredPayload {
3067    fn __max_ordinal(&self) -> usize {
3068        0
3069    }
3070}
3071
3072impl ::fidl_next::Encodable for DiscoveredPayload {
3073    type Encoded = WireDiscoveredPayload<'static>;
3074}
3075
3076unsafe impl<___E> ::fidl_next::Encode<___E> for DiscoveredPayload
3077where
3078    ___E: ::fidl_next::Encoder + ?Sized,
3079{
3080    #[inline]
3081    fn encode(
3082        mut self,
3083        encoder: &mut ___E,
3084        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3085    ) -> Result<(), ::fidl_next::EncodeError> {
3086        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3087
3088        let max_ord = self.__max_ordinal();
3089
3090        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3091        ::fidl_next::Wire::zero_padding(&mut out);
3092
3093        let mut preallocated =
3094            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3095
3096        for i in 1..=max_ord {
3097            match i {
3098                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3099            }
3100            unsafe {
3101                preallocated.write_next(out.assume_init_ref());
3102            }
3103        }
3104
3105        ::fidl_next::WireTable::encode_len(table, max_ord);
3106
3107        Ok(())
3108    }
3109}
3110
3111unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DiscoveredPayload
3112where
3113    ___E: ::fidl_next::Encoder + ?Sized,
3114{
3115    #[inline]
3116    fn encode_ref(
3117        &self,
3118        encoder: &mut ___E,
3119        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3120    ) -> Result<(), ::fidl_next::EncodeError> {
3121        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3122
3123        let max_ord = self.__max_ordinal();
3124
3125        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3126        ::fidl_next::Wire::zero_padding(&mut out);
3127
3128        let mut preallocated =
3129            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3130
3131        for i in 1..=max_ord {
3132            match i {
3133                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3134            }
3135            unsafe {
3136                preallocated.write_next(out.assume_init_ref());
3137            }
3138        }
3139
3140        ::fidl_next::WireTable::encode_len(table, max_ord);
3141
3142        Ok(())
3143    }
3144}
3145
3146impl<'de> ::fidl_next::FromWire<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3147    #[inline]
3148    fn from_wire(wire: WireDiscoveredPayload<'de>) -> Self {
3149        let wire = ::core::mem::ManuallyDrop::new(wire);
3150
3151        Self {}
3152    }
3153}
3154
3155impl<'de> ::fidl_next::FromWireRef<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3156    #[inline]
3157    fn from_wire_ref(wire: &WireDiscoveredPayload<'de>) -> Self {
3158        Self {}
3159    }
3160}
3161
3162/// The wire type corresponding to [`DiscoveredPayload`].
3163#[repr(C)]
3164pub struct WireDiscoveredPayload<'de> {
3165    table: ::fidl_next::WireTable<'de>,
3166}
3167
3168impl<'de> Drop for WireDiscoveredPayload<'de> {
3169    fn drop(&mut self) {}
3170}
3171
3172unsafe impl ::fidl_next::Wire for WireDiscoveredPayload<'static> {
3173    type Decoded<'de> = WireDiscoveredPayload<'de>;
3174
3175    #[inline]
3176    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3177        ::fidl_next::munge!(let Self { table } = out);
3178        ::fidl_next::WireTable::zero_padding(table);
3179    }
3180}
3181
3182unsafe impl<___D> ::fidl_next::Decode<___D> for WireDiscoveredPayload<'static>
3183where
3184    ___D: ::fidl_next::Decoder + ?Sized,
3185{
3186    fn decode(
3187        slot: ::fidl_next::Slot<'_, Self>,
3188        decoder: &mut ___D,
3189    ) -> Result<(), ::fidl_next::DecodeError> {
3190        ::fidl_next::munge!(let Self { table } = slot);
3191
3192        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3193            match ordinal {
3194                0 => unsafe { ::core::hint::unreachable_unchecked() },
3195
3196                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3197            }
3198        })
3199    }
3200}
3201
3202impl<'de> WireDiscoveredPayload<'de> {}
3203
3204impl<'de> ::core::fmt::Debug for WireDiscoveredPayload<'de> {
3205    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3206        f.debug_struct("DiscoveredPayload").finish()
3207    }
3208}
3209
3210pub const MAX_MONIKER_LENGTH: u32 = 4096;
3211
3212#[doc = " Payload for Purged events.\n"]
3213#[derive(Clone, Debug, Default)]
3214pub struct PurgedPayload {}
3215
3216impl PurgedPayload {
3217    fn __max_ordinal(&self) -> usize {
3218        0
3219    }
3220}
3221
3222impl ::fidl_next::Encodable for PurgedPayload {
3223    type Encoded = WirePurgedPayload<'static>;
3224}
3225
3226unsafe impl<___E> ::fidl_next::Encode<___E> for PurgedPayload
3227where
3228    ___E: ::fidl_next::Encoder + ?Sized,
3229{
3230    #[inline]
3231    fn encode(
3232        mut self,
3233        encoder: &mut ___E,
3234        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3235    ) -> Result<(), ::fidl_next::EncodeError> {
3236        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3237
3238        let max_ord = self.__max_ordinal();
3239
3240        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3241        ::fidl_next::Wire::zero_padding(&mut out);
3242
3243        let mut preallocated =
3244            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3245
3246        for i in 1..=max_ord {
3247            match i {
3248                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3249            }
3250            unsafe {
3251                preallocated.write_next(out.assume_init_ref());
3252            }
3253        }
3254
3255        ::fidl_next::WireTable::encode_len(table, max_ord);
3256
3257        Ok(())
3258    }
3259}
3260
3261unsafe impl<___E> ::fidl_next::EncodeRef<___E> for PurgedPayload
3262where
3263    ___E: ::fidl_next::Encoder + ?Sized,
3264{
3265    #[inline]
3266    fn encode_ref(
3267        &self,
3268        encoder: &mut ___E,
3269        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3270    ) -> Result<(), ::fidl_next::EncodeError> {
3271        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3272
3273        let max_ord = self.__max_ordinal();
3274
3275        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3276        ::fidl_next::Wire::zero_padding(&mut out);
3277
3278        let mut preallocated =
3279            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3280
3281        for i in 1..=max_ord {
3282            match i {
3283                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3284            }
3285            unsafe {
3286                preallocated.write_next(out.assume_init_ref());
3287            }
3288        }
3289
3290        ::fidl_next::WireTable::encode_len(table, max_ord);
3291
3292        Ok(())
3293    }
3294}
3295
3296impl<'de> ::fidl_next::FromWire<WirePurgedPayload<'de>> for PurgedPayload {
3297    #[inline]
3298    fn from_wire(wire: WirePurgedPayload<'de>) -> Self {
3299        let wire = ::core::mem::ManuallyDrop::new(wire);
3300
3301        Self {}
3302    }
3303}
3304
3305impl<'de> ::fidl_next::FromWireRef<WirePurgedPayload<'de>> for PurgedPayload {
3306    #[inline]
3307    fn from_wire_ref(wire: &WirePurgedPayload<'de>) -> Self {
3308        Self {}
3309    }
3310}
3311
3312/// The wire type corresponding to [`PurgedPayload`].
3313#[repr(C)]
3314pub struct WirePurgedPayload<'de> {
3315    table: ::fidl_next::WireTable<'de>,
3316}
3317
3318impl<'de> Drop for WirePurgedPayload<'de> {
3319    fn drop(&mut self) {}
3320}
3321
3322unsafe impl ::fidl_next::Wire for WirePurgedPayload<'static> {
3323    type Decoded<'de> = WirePurgedPayload<'de>;
3324
3325    #[inline]
3326    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3327        ::fidl_next::munge!(let Self { table } = out);
3328        ::fidl_next::WireTable::zero_padding(table);
3329    }
3330}
3331
3332unsafe impl<___D> ::fidl_next::Decode<___D> for WirePurgedPayload<'static>
3333where
3334    ___D: ::fidl_next::Decoder + ?Sized,
3335{
3336    fn decode(
3337        slot: ::fidl_next::Slot<'_, Self>,
3338        decoder: &mut ___D,
3339    ) -> Result<(), ::fidl_next::DecodeError> {
3340        ::fidl_next::munge!(let Self { table } = slot);
3341
3342        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3343            match ordinal {
3344                0 => unsafe { ::core::hint::unreachable_unchecked() },
3345
3346                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3347            }
3348        })
3349    }
3350}
3351
3352impl<'de> WirePurgedPayload<'de> {}
3353
3354impl<'de> ::core::fmt::Debug for WirePurgedPayload<'de> {
3355    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3356        f.debug_struct("PurgedPayload").finish()
3357    }
3358}
3359
3360#[doc = " Payload for Resolved events.\n"]
3361#[derive(Clone, Debug, Default)]
3362pub struct ResolvedPayload {}
3363
3364impl ResolvedPayload {
3365    fn __max_ordinal(&self) -> usize {
3366        0
3367    }
3368}
3369
3370impl ::fidl_next::Encodable for ResolvedPayload {
3371    type Encoded = WireResolvedPayload<'static>;
3372}
3373
3374unsafe impl<___E> ::fidl_next::Encode<___E> for ResolvedPayload
3375where
3376    ___E: ::fidl_next::Encoder + ?Sized,
3377{
3378    #[inline]
3379    fn encode(
3380        mut self,
3381        encoder: &mut ___E,
3382        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3383    ) -> Result<(), ::fidl_next::EncodeError> {
3384        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3385
3386        let max_ord = self.__max_ordinal();
3387
3388        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3389        ::fidl_next::Wire::zero_padding(&mut out);
3390
3391        let mut preallocated =
3392            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3393
3394        for i in 1..=max_ord {
3395            match i {
3396                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3397            }
3398            unsafe {
3399                preallocated.write_next(out.assume_init_ref());
3400            }
3401        }
3402
3403        ::fidl_next::WireTable::encode_len(table, max_ord);
3404
3405        Ok(())
3406    }
3407}
3408
3409unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ResolvedPayload
3410where
3411    ___E: ::fidl_next::Encoder + ?Sized,
3412{
3413    #[inline]
3414    fn encode_ref(
3415        &self,
3416        encoder: &mut ___E,
3417        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3418    ) -> Result<(), ::fidl_next::EncodeError> {
3419        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3420
3421        let max_ord = self.__max_ordinal();
3422
3423        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3424        ::fidl_next::Wire::zero_padding(&mut out);
3425
3426        let mut preallocated =
3427            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3428
3429        for i in 1..=max_ord {
3430            match i {
3431                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3432            }
3433            unsafe {
3434                preallocated.write_next(out.assume_init_ref());
3435            }
3436        }
3437
3438        ::fidl_next::WireTable::encode_len(table, max_ord);
3439
3440        Ok(())
3441    }
3442}
3443
3444impl<'de> ::fidl_next::FromWire<WireResolvedPayload<'de>> for ResolvedPayload {
3445    #[inline]
3446    fn from_wire(wire: WireResolvedPayload<'de>) -> Self {
3447        let wire = ::core::mem::ManuallyDrop::new(wire);
3448
3449        Self {}
3450    }
3451}
3452
3453impl<'de> ::fidl_next::FromWireRef<WireResolvedPayload<'de>> for ResolvedPayload {
3454    #[inline]
3455    fn from_wire_ref(wire: &WireResolvedPayload<'de>) -> Self {
3456        Self {}
3457    }
3458}
3459
3460/// The wire type corresponding to [`ResolvedPayload`].
3461#[repr(C)]
3462pub struct WireResolvedPayload<'de> {
3463    table: ::fidl_next::WireTable<'de>,
3464}
3465
3466impl<'de> Drop for WireResolvedPayload<'de> {
3467    fn drop(&mut self) {}
3468}
3469
3470unsafe impl ::fidl_next::Wire for WireResolvedPayload<'static> {
3471    type Decoded<'de> = WireResolvedPayload<'de>;
3472
3473    #[inline]
3474    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3475        ::fidl_next::munge!(let Self { table } = out);
3476        ::fidl_next::WireTable::zero_padding(table);
3477    }
3478}
3479
3480unsafe impl<___D> ::fidl_next::Decode<___D> for WireResolvedPayload<'static>
3481where
3482    ___D: ::fidl_next::Decoder + ?Sized,
3483{
3484    fn decode(
3485        slot: ::fidl_next::Slot<'_, Self>,
3486        decoder: &mut ___D,
3487    ) -> Result<(), ::fidl_next::DecodeError> {
3488        ::fidl_next::munge!(let Self { table } = slot);
3489
3490        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3491            match ordinal {
3492                0 => unsafe { ::core::hint::unreachable_unchecked() },
3493
3494                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3495            }
3496        })
3497    }
3498}
3499
3500impl<'de> WireResolvedPayload<'de> {}
3501
3502impl<'de> ::core::fmt::Debug for WireResolvedPayload<'de> {
3503    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3504        f.debug_struct("ResolvedPayload").finish()
3505    }
3506}
3507
3508#[doc = " Payload for Started events.\n"]
3509#[derive(Clone, Debug, Default)]
3510pub struct StartedPayload {}
3511
3512impl StartedPayload {
3513    fn __max_ordinal(&self) -> usize {
3514        0
3515    }
3516}
3517
3518impl ::fidl_next::Encodable for StartedPayload {
3519    type Encoded = WireStartedPayload<'static>;
3520}
3521
3522unsafe impl<___E> ::fidl_next::Encode<___E> for StartedPayload
3523where
3524    ___E: ::fidl_next::Encoder + ?Sized,
3525{
3526    #[inline]
3527    fn encode(
3528        mut self,
3529        encoder: &mut ___E,
3530        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3531    ) -> Result<(), ::fidl_next::EncodeError> {
3532        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3533
3534        let max_ord = self.__max_ordinal();
3535
3536        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3537        ::fidl_next::Wire::zero_padding(&mut out);
3538
3539        let mut preallocated =
3540            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3541
3542        for i in 1..=max_ord {
3543            match i {
3544                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3545            }
3546            unsafe {
3547                preallocated.write_next(out.assume_init_ref());
3548            }
3549        }
3550
3551        ::fidl_next::WireTable::encode_len(table, max_ord);
3552
3553        Ok(())
3554    }
3555}
3556
3557unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StartedPayload
3558where
3559    ___E: ::fidl_next::Encoder + ?Sized,
3560{
3561    #[inline]
3562    fn encode_ref(
3563        &self,
3564        encoder: &mut ___E,
3565        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3566    ) -> Result<(), ::fidl_next::EncodeError> {
3567        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3568
3569        let max_ord = self.__max_ordinal();
3570
3571        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3572        ::fidl_next::Wire::zero_padding(&mut out);
3573
3574        let mut preallocated =
3575            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3576
3577        for i in 1..=max_ord {
3578            match i {
3579                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3580            }
3581            unsafe {
3582                preallocated.write_next(out.assume_init_ref());
3583            }
3584        }
3585
3586        ::fidl_next::WireTable::encode_len(table, max_ord);
3587
3588        Ok(())
3589    }
3590}
3591
3592impl<'de> ::fidl_next::FromWire<WireStartedPayload<'de>> for StartedPayload {
3593    #[inline]
3594    fn from_wire(wire: WireStartedPayload<'de>) -> Self {
3595        let wire = ::core::mem::ManuallyDrop::new(wire);
3596
3597        Self {}
3598    }
3599}
3600
3601impl<'de> ::fidl_next::FromWireRef<WireStartedPayload<'de>> for StartedPayload {
3602    #[inline]
3603    fn from_wire_ref(wire: &WireStartedPayload<'de>) -> Self {
3604        Self {}
3605    }
3606}
3607
3608/// The wire type corresponding to [`StartedPayload`].
3609#[repr(C)]
3610pub struct WireStartedPayload<'de> {
3611    table: ::fidl_next::WireTable<'de>,
3612}
3613
3614impl<'de> Drop for WireStartedPayload<'de> {
3615    fn drop(&mut self) {}
3616}
3617
3618unsafe impl ::fidl_next::Wire for WireStartedPayload<'static> {
3619    type Decoded<'de> = WireStartedPayload<'de>;
3620
3621    #[inline]
3622    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3623        ::fidl_next::munge!(let Self { table } = out);
3624        ::fidl_next::WireTable::zero_padding(table);
3625    }
3626}
3627
3628unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartedPayload<'static>
3629where
3630    ___D: ::fidl_next::Decoder + ?Sized,
3631{
3632    fn decode(
3633        slot: ::fidl_next::Slot<'_, Self>,
3634        decoder: &mut ___D,
3635    ) -> Result<(), ::fidl_next::DecodeError> {
3636        ::fidl_next::munge!(let Self { table } = slot);
3637
3638        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3639            match ordinal {
3640                0 => unsafe { ::core::hint::unreachable_unchecked() },
3641
3642                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3643            }
3644        })
3645    }
3646}
3647
3648impl<'de> WireStartedPayload<'de> {}
3649
3650impl<'de> ::core::fmt::Debug for WireStartedPayload<'de> {
3651    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3652        f.debug_struct("StartedPayload").finish()
3653    }
3654}
3655
3656#[doc = " Payload for Unresolved events.\n"]
3657#[derive(Clone, Debug, Default)]
3658pub struct UnresolvedPayload {}
3659
3660impl UnresolvedPayload {
3661    fn __max_ordinal(&self) -> usize {
3662        0
3663    }
3664}
3665
3666impl ::fidl_next::Encodable for UnresolvedPayload {
3667    type Encoded = WireUnresolvedPayload<'static>;
3668}
3669
3670unsafe impl<___E> ::fidl_next::Encode<___E> for UnresolvedPayload
3671where
3672    ___E: ::fidl_next::Encoder + ?Sized,
3673{
3674    #[inline]
3675    fn encode(
3676        mut self,
3677        encoder: &mut ___E,
3678        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3679    ) -> Result<(), ::fidl_next::EncodeError> {
3680        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3681
3682        let max_ord = self.__max_ordinal();
3683
3684        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3685        ::fidl_next::Wire::zero_padding(&mut out);
3686
3687        let mut preallocated =
3688            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3689
3690        for i in 1..=max_ord {
3691            match i {
3692                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3693            }
3694            unsafe {
3695                preallocated.write_next(out.assume_init_ref());
3696            }
3697        }
3698
3699        ::fidl_next::WireTable::encode_len(table, max_ord);
3700
3701        Ok(())
3702    }
3703}
3704
3705unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnresolvedPayload
3706where
3707    ___E: ::fidl_next::Encoder + ?Sized,
3708{
3709    #[inline]
3710    fn encode_ref(
3711        &self,
3712        encoder: &mut ___E,
3713        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3714    ) -> Result<(), ::fidl_next::EncodeError> {
3715        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3716
3717        let max_ord = self.__max_ordinal();
3718
3719        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3720        ::fidl_next::Wire::zero_padding(&mut out);
3721
3722        let mut preallocated =
3723            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3724
3725        for i in 1..=max_ord {
3726            match i {
3727                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3728            }
3729            unsafe {
3730                preallocated.write_next(out.assume_init_ref());
3731            }
3732        }
3733
3734        ::fidl_next::WireTable::encode_len(table, max_ord);
3735
3736        Ok(())
3737    }
3738}
3739
3740impl<'de> ::fidl_next::FromWire<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3741    #[inline]
3742    fn from_wire(wire: WireUnresolvedPayload<'de>) -> Self {
3743        let wire = ::core::mem::ManuallyDrop::new(wire);
3744
3745        Self {}
3746    }
3747}
3748
3749impl<'de> ::fidl_next::FromWireRef<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3750    #[inline]
3751    fn from_wire_ref(wire: &WireUnresolvedPayload<'de>) -> Self {
3752        Self {}
3753    }
3754}
3755
3756/// The wire type corresponding to [`UnresolvedPayload`].
3757#[repr(C)]
3758pub struct WireUnresolvedPayload<'de> {
3759    table: ::fidl_next::WireTable<'de>,
3760}
3761
3762impl<'de> Drop for WireUnresolvedPayload<'de> {
3763    fn drop(&mut self) {}
3764}
3765
3766unsafe impl ::fidl_next::Wire for WireUnresolvedPayload<'static> {
3767    type Decoded<'de> = WireUnresolvedPayload<'de>;
3768
3769    #[inline]
3770    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3771        ::fidl_next::munge!(let Self { table } = out);
3772        ::fidl_next::WireTable::zero_padding(table);
3773    }
3774}
3775
3776unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnresolvedPayload<'static>
3777where
3778    ___D: ::fidl_next::Decoder + ?Sized,
3779{
3780    fn decode(
3781        slot: ::fidl_next::Slot<'_, Self>,
3782        decoder: &mut ___D,
3783    ) -> Result<(), ::fidl_next::DecodeError> {
3784        ::fidl_next::munge!(let Self { table } = slot);
3785
3786        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3787            match ordinal {
3788                0 => unsafe { ::core::hint::unreachable_unchecked() },
3789
3790                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3791            }
3792        })
3793    }
3794}
3795
3796impl<'de> WireUnresolvedPayload<'de> {}
3797
3798impl<'de> ::core::fmt::Debug for WireUnresolvedPayload<'de> {
3799    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
3800        f.debug_struct("UnresolvedPayload").finish()
3801    }
3802}
3803
3804#[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"]
3805#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3806#[repr(u32)]
3807pub enum EventType {
3808    CapabilityRequested = 1,
3809    Discovered = 3,
3810    Destroyed = 4,
3811    Resolved = 5,
3812    Started = 6,
3813    Stopped = 7,
3814    DebugStarted = 8,
3815    Unresolved = 9,
3816}
3817
3818impl ::fidl_next::Encodable for EventType {
3819    type Encoded = WireEventType;
3820}
3821impl ::std::convert::TryFrom<u32> for EventType {
3822    type Error = ::fidl_next::UnknownStrictEnumMemberError;
3823    fn try_from(value: u32) -> Result<Self, Self::Error> {
3824        match value {
3825            1 => Ok(Self::CapabilityRequested),
3826            3 => Ok(Self::Discovered),
3827            4 => Ok(Self::Destroyed),
3828            5 => Ok(Self::Resolved),
3829            6 => Ok(Self::Started),
3830            7 => Ok(Self::Stopped),
3831            8 => Ok(Self::DebugStarted),
3832            9 => Ok(Self::Unresolved),
3833
3834            _ => Err(Self::Error::new(value.into())),
3835        }
3836    }
3837}
3838
3839unsafe impl<___E> ::fidl_next::Encode<___E> for EventType
3840where
3841    ___E: ?Sized,
3842{
3843    #[inline]
3844    fn encode(
3845        self,
3846        encoder: &mut ___E,
3847        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3848    ) -> Result<(), ::fidl_next::EncodeError> {
3849        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
3850    }
3851}
3852
3853unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventType
3854where
3855    ___E: ?Sized,
3856{
3857    #[inline]
3858    fn encode_ref(
3859        &self,
3860        encoder: &mut ___E,
3861        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3862    ) -> Result<(), ::fidl_next::EncodeError> {
3863        ::fidl_next::munge!(let WireEventType { value } = out);
3864        let _ = value.write(::fidl_next::WireU32::from(match *self {
3865            Self::CapabilityRequested => 1,
3866
3867            Self::Discovered => 3,
3868
3869            Self::Destroyed => 4,
3870
3871            Self::Resolved => 5,
3872
3873            Self::Started => 6,
3874
3875            Self::Stopped => 7,
3876
3877            Self::DebugStarted => 8,
3878
3879            Self::Unresolved => 9,
3880        }));
3881
3882        Ok(())
3883    }
3884}
3885
3886impl ::core::convert::From<WireEventType> for EventType {
3887    fn from(wire: WireEventType) -> Self {
3888        match u32::from(wire.value) {
3889            1 => Self::CapabilityRequested,
3890
3891            3 => Self::Discovered,
3892
3893            4 => Self::Destroyed,
3894
3895            5 => Self::Resolved,
3896
3897            6 => Self::Started,
3898
3899            7 => Self::Stopped,
3900
3901            8 => Self::DebugStarted,
3902
3903            9 => Self::Unresolved,
3904
3905            _ => unsafe { ::core::hint::unreachable_unchecked() },
3906        }
3907    }
3908}
3909
3910impl ::fidl_next::FromWire<WireEventType> for EventType {
3911    #[inline]
3912    fn from_wire(wire: WireEventType) -> Self {
3913        Self::from(wire)
3914    }
3915}
3916
3917impl ::fidl_next::FromWireRef<WireEventType> for EventType {
3918    #[inline]
3919    fn from_wire_ref(wire: &WireEventType) -> Self {
3920        Self::from(*wire)
3921    }
3922}
3923
3924/// The wire type corresponding to [`EventType`].
3925#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3926#[repr(transparent)]
3927pub struct WireEventType {
3928    value: ::fidl_next::WireU32,
3929}
3930
3931unsafe impl ::fidl_next::Wire for WireEventType {
3932    type Decoded<'de> = Self;
3933
3934    #[inline]
3935    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3936        // Wire enums have no padding
3937    }
3938}
3939
3940impl WireEventType {
3941    pub const CAPABILITY_REQUESTED: WireEventType =
3942        WireEventType { value: ::fidl_next::WireU32(1) };
3943
3944    pub const DISCOVERED: WireEventType = WireEventType { value: ::fidl_next::WireU32(3) };
3945
3946    pub const DESTROYED: WireEventType = WireEventType { value: ::fidl_next::WireU32(4) };
3947
3948    pub const RESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(5) };
3949
3950    pub const STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(6) };
3951
3952    pub const STOPPED: WireEventType = WireEventType { value: ::fidl_next::WireU32(7) };
3953
3954    pub const DEBUG_STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(8) };
3955
3956    pub const UNRESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(9) };
3957}
3958
3959unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventType
3960where
3961    ___D: ?Sized,
3962{
3963    fn decode(
3964        slot: ::fidl_next::Slot<'_, Self>,
3965        _: &mut ___D,
3966    ) -> Result<(), ::fidl_next::DecodeError> {
3967        ::fidl_next::munge!(let Self { value } = slot);
3968
3969        match u32::from(*value) {
3970            1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 => (),
3971            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
3972        }
3973
3974        Ok(())
3975    }
3976}
3977
3978impl ::core::convert::From<EventType> for WireEventType {
3979    fn from(natural: EventType) -> Self {
3980        match natural {
3981            EventType::CapabilityRequested => WireEventType::CAPABILITY_REQUESTED,
3982
3983            EventType::Discovered => WireEventType::DISCOVERED,
3984
3985            EventType::Destroyed => WireEventType::DESTROYED,
3986
3987            EventType::Resolved => WireEventType::RESOLVED,
3988
3989            EventType::Started => WireEventType::STARTED,
3990
3991            EventType::Stopped => WireEventType::STOPPED,
3992
3993            EventType::DebugStarted => WireEventType::DEBUG_STARTED,
3994
3995            EventType::Unresolved => WireEventType::UNRESOLVED,
3996        }
3997    }
3998}
3999
4000#[doc = " Payload for Stopped events.\n"]
4001#[derive(Clone, Debug, Default)]
4002pub struct StoppedPayload {
4003    pub status: Option<i32>,
4004
4005    pub exit_code: Option<i64>,
4006}
4007
4008impl StoppedPayload {
4009    fn __max_ordinal(&self) -> usize {
4010        if self.exit_code.is_some() {
4011            return 2;
4012        }
4013
4014        if self.status.is_some() {
4015            return 1;
4016        }
4017
4018        0
4019    }
4020}
4021
4022impl ::fidl_next::Encodable for StoppedPayload {
4023    type Encoded = WireStoppedPayload<'static>;
4024}
4025
4026unsafe impl<___E> ::fidl_next::Encode<___E> for StoppedPayload
4027where
4028    ___E: ::fidl_next::Encoder + ?Sized,
4029{
4030    #[inline]
4031    fn encode(
4032        mut self,
4033        encoder: &mut ___E,
4034        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4035    ) -> Result<(), ::fidl_next::EncodeError> {
4036        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
4037
4038        let max_ord = self.__max_ordinal();
4039
4040        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4041        ::fidl_next::Wire::zero_padding(&mut out);
4042
4043        let mut preallocated =
4044            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4045
4046        for i in 1..=max_ord {
4047            match i {
4048                2 => {
4049                    if let Some(exit_code) = self.exit_code.take() {
4050                        ::fidl_next::WireEnvelope::encode_value(
4051                            exit_code,
4052                            preallocated.encoder,
4053                            &mut out,
4054                        )?;
4055                    } else {
4056                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4057                    }
4058                }
4059
4060                1 => {
4061                    if let Some(status) = self.status.take() {
4062                        ::fidl_next::WireEnvelope::encode_value(
4063                            status,
4064                            preallocated.encoder,
4065                            &mut out,
4066                        )?;
4067                    } else {
4068                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4069                    }
4070                }
4071
4072                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4073            }
4074            unsafe {
4075                preallocated.write_next(out.assume_init_ref());
4076            }
4077        }
4078
4079        ::fidl_next::WireTable::encode_len(table, max_ord);
4080
4081        Ok(())
4082    }
4083}
4084
4085unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StoppedPayload
4086where
4087    ___E: ::fidl_next::Encoder + ?Sized,
4088{
4089    #[inline]
4090    fn encode_ref(
4091        &self,
4092        encoder: &mut ___E,
4093        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4094    ) -> Result<(), ::fidl_next::EncodeError> {
4095        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
4096
4097        let max_ord = self.__max_ordinal();
4098
4099        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4100        ::fidl_next::Wire::zero_padding(&mut out);
4101
4102        let mut preallocated =
4103            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4104
4105        for i in 1..=max_ord {
4106            match i {
4107                2 => {
4108                    if let Some(exit_code) = &self.exit_code {
4109                        ::fidl_next::WireEnvelope::encode_value(
4110                            exit_code,
4111                            preallocated.encoder,
4112                            &mut out,
4113                        )?;
4114                    } else {
4115                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4116                    }
4117                }
4118
4119                1 => {
4120                    if let Some(status) = &self.status {
4121                        ::fidl_next::WireEnvelope::encode_value(
4122                            status,
4123                            preallocated.encoder,
4124                            &mut out,
4125                        )?;
4126                    } else {
4127                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4128                    }
4129                }
4130
4131                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4132            }
4133            unsafe {
4134                preallocated.write_next(out.assume_init_ref());
4135            }
4136        }
4137
4138        ::fidl_next::WireTable::encode_len(table, max_ord);
4139
4140        Ok(())
4141    }
4142}
4143
4144impl<'de> ::fidl_next::FromWire<WireStoppedPayload<'de>> for StoppedPayload {
4145    #[inline]
4146    fn from_wire(wire: WireStoppedPayload<'de>) -> Self {
4147        let wire = ::core::mem::ManuallyDrop::new(wire);
4148
4149        let status = wire.table.get(1);
4150
4151        let exit_code = wire.table.get(2);
4152
4153        Self {
4154            status: status.map(|envelope| {
4155                ::fidl_next::FromWire::from_wire(unsafe {
4156                    envelope.read_unchecked::<::fidl_next::WireI32>()
4157                })
4158            }),
4159
4160            exit_code: exit_code.map(|envelope| {
4161                ::fidl_next::FromWire::from_wire(unsafe {
4162                    envelope.read_unchecked::<::fidl_next::WireI64>()
4163                })
4164            }),
4165        }
4166    }
4167}
4168
4169impl<'de> ::fidl_next::FromWireRef<WireStoppedPayload<'de>> for StoppedPayload {
4170    #[inline]
4171    fn from_wire_ref(wire: &WireStoppedPayload<'de>) -> Self {
4172        Self {
4173            status: wire.table.get(1).map(|envelope| {
4174                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4175                    envelope.deref_unchecked::<::fidl_next::WireI32>()
4176                })
4177            }),
4178
4179            exit_code: wire.table.get(2).map(|envelope| {
4180                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4181                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4182                })
4183            }),
4184        }
4185    }
4186}
4187
4188/// The wire type corresponding to [`StoppedPayload`].
4189#[repr(C)]
4190pub struct WireStoppedPayload<'de> {
4191    table: ::fidl_next::WireTable<'de>,
4192}
4193
4194impl<'de> Drop for WireStoppedPayload<'de> {
4195    fn drop(&mut self) {
4196        let _ = self
4197            .table
4198            .get(1)
4199            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
4200
4201        let _ = self
4202            .table
4203            .get(2)
4204            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4205    }
4206}
4207
4208unsafe impl ::fidl_next::Wire for WireStoppedPayload<'static> {
4209    type Decoded<'de> = WireStoppedPayload<'de>;
4210
4211    #[inline]
4212    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4213        ::fidl_next::munge!(let Self { table } = out);
4214        ::fidl_next::WireTable::zero_padding(table);
4215    }
4216}
4217
4218unsafe impl<___D> ::fidl_next::Decode<___D> for WireStoppedPayload<'static>
4219where
4220    ___D: ::fidl_next::Decoder + ?Sized,
4221{
4222    fn decode(
4223        slot: ::fidl_next::Slot<'_, Self>,
4224        decoder: &mut ___D,
4225    ) -> Result<(), ::fidl_next::DecodeError> {
4226        ::fidl_next::munge!(let Self { table } = slot);
4227
4228        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4229            match ordinal {
4230                0 => unsafe { ::core::hint::unreachable_unchecked() },
4231
4232                1 => {
4233                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
4234                        slot.as_mut(),
4235                        decoder,
4236                    )?;
4237
4238                    Ok(())
4239                }
4240
4241                2 => {
4242                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4243                        slot.as_mut(),
4244                        decoder,
4245                    )?;
4246
4247                    Ok(())
4248                }
4249
4250                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4251            }
4252        })
4253    }
4254}
4255
4256impl<'de> WireStoppedPayload<'de> {
4257    pub fn status(&self) -> Option<&::fidl_next::WireI32> {
4258        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4259    }
4260
4261    pub fn exit_code(&self) -> Option<&::fidl_next::WireI64> {
4262        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4263    }
4264}
4265
4266impl<'de> ::core::fmt::Debug for WireStoppedPayload<'de> {
4267    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
4268        f.debug_struct("StoppedPayload")
4269            .field("status", &self.status())
4270            .field("exit_code", &self.exit_code())
4271            .finish()
4272    }
4273}
4274
4275#[doc = " A head providing metadata about a target component instance.\n"]
4276#[derive(Clone, Debug, Default)]
4277pub struct EventHeader {
4278    pub event_type: Option<crate::EventType>,
4279
4280    pub moniker: Option<String>,
4281
4282    pub component_url: Option<String>,
4283
4284    pub timestamp: Option<i64>,
4285}
4286
4287impl EventHeader {
4288    fn __max_ordinal(&self) -> usize {
4289        if self.timestamp.is_some() {
4290            return 4;
4291        }
4292
4293        if self.component_url.is_some() {
4294            return 3;
4295        }
4296
4297        if self.moniker.is_some() {
4298            return 2;
4299        }
4300
4301        if self.event_type.is_some() {
4302            return 1;
4303        }
4304
4305        0
4306    }
4307}
4308
4309impl ::fidl_next::Encodable for EventHeader {
4310    type Encoded = WireEventHeader<'static>;
4311}
4312
4313unsafe impl<___E> ::fidl_next::Encode<___E> for EventHeader
4314where
4315    ___E: ::fidl_next::Encoder + ?Sized,
4316{
4317    #[inline]
4318    fn encode(
4319        mut self,
4320        encoder: &mut ___E,
4321        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4322    ) -> Result<(), ::fidl_next::EncodeError> {
4323        ::fidl_next::munge!(let WireEventHeader { table } = out);
4324
4325        let max_ord = self.__max_ordinal();
4326
4327        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4328        ::fidl_next::Wire::zero_padding(&mut out);
4329
4330        let mut preallocated =
4331            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4332
4333        for i in 1..=max_ord {
4334            match i {
4335                4 => {
4336                    if let Some(timestamp) = self.timestamp.take() {
4337                        ::fidl_next::WireEnvelope::encode_value(
4338                            timestamp,
4339                            preallocated.encoder,
4340                            &mut out,
4341                        )?;
4342                    } else {
4343                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4344                    }
4345                }
4346
4347                3 => {
4348                    if let Some(component_url) = self.component_url.take() {
4349                        ::fidl_next::WireEnvelope::encode_value(
4350                            component_url,
4351                            preallocated.encoder,
4352                            &mut out,
4353                        )?;
4354                    } else {
4355                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4356                    }
4357                }
4358
4359                2 => {
4360                    if let Some(moniker) = self.moniker.take() {
4361                        ::fidl_next::WireEnvelope::encode_value(
4362                            moniker,
4363                            preallocated.encoder,
4364                            &mut out,
4365                        )?;
4366                    } else {
4367                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4368                    }
4369                }
4370
4371                1 => {
4372                    if let Some(event_type) = self.event_type.take() {
4373                        ::fidl_next::WireEnvelope::encode_value(
4374                            event_type,
4375                            preallocated.encoder,
4376                            &mut out,
4377                        )?;
4378                    } else {
4379                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4380                    }
4381                }
4382
4383                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4384            }
4385            unsafe {
4386                preallocated.write_next(out.assume_init_ref());
4387            }
4388        }
4389
4390        ::fidl_next::WireTable::encode_len(table, max_ord);
4391
4392        Ok(())
4393    }
4394}
4395
4396unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventHeader
4397where
4398    ___E: ::fidl_next::Encoder + ?Sized,
4399{
4400    #[inline]
4401    fn encode_ref(
4402        &self,
4403        encoder: &mut ___E,
4404        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4405    ) -> Result<(), ::fidl_next::EncodeError> {
4406        ::fidl_next::munge!(let WireEventHeader { table } = out);
4407
4408        let max_ord = self.__max_ordinal();
4409
4410        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4411        ::fidl_next::Wire::zero_padding(&mut out);
4412
4413        let mut preallocated =
4414            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4415
4416        for i in 1..=max_ord {
4417            match i {
4418                4 => {
4419                    if let Some(timestamp) = &self.timestamp {
4420                        ::fidl_next::WireEnvelope::encode_value(
4421                            timestamp,
4422                            preallocated.encoder,
4423                            &mut out,
4424                        )?;
4425                    } else {
4426                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4427                    }
4428                }
4429
4430                3 => {
4431                    if let Some(component_url) = &self.component_url {
4432                        ::fidl_next::WireEnvelope::encode_value(
4433                            component_url,
4434                            preallocated.encoder,
4435                            &mut out,
4436                        )?;
4437                    } else {
4438                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4439                    }
4440                }
4441
4442                2 => {
4443                    if let Some(moniker) = &self.moniker {
4444                        ::fidl_next::WireEnvelope::encode_value(
4445                            moniker,
4446                            preallocated.encoder,
4447                            &mut out,
4448                        )?;
4449                    } else {
4450                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4451                    }
4452                }
4453
4454                1 => {
4455                    if let Some(event_type) = &self.event_type {
4456                        ::fidl_next::WireEnvelope::encode_value(
4457                            event_type,
4458                            preallocated.encoder,
4459                            &mut out,
4460                        )?;
4461                    } else {
4462                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4463                    }
4464                }
4465
4466                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4467            }
4468            unsafe {
4469                preallocated.write_next(out.assume_init_ref());
4470            }
4471        }
4472
4473        ::fidl_next::WireTable::encode_len(table, max_ord);
4474
4475        Ok(())
4476    }
4477}
4478
4479impl<'de> ::fidl_next::FromWire<WireEventHeader<'de>> for EventHeader {
4480    #[inline]
4481    fn from_wire(wire: WireEventHeader<'de>) -> Self {
4482        let wire = ::core::mem::ManuallyDrop::new(wire);
4483
4484        let event_type = wire.table.get(1);
4485
4486        let moniker = wire.table.get(2);
4487
4488        let component_url = wire.table.get(3);
4489
4490        let timestamp = wire.table.get(4);
4491
4492        Self {
4493            event_type: event_type.map(|envelope| {
4494                ::fidl_next::FromWire::from_wire(unsafe {
4495                    envelope.read_unchecked::<crate::WireEventType>()
4496                })
4497            }),
4498
4499            moniker: moniker.map(|envelope| {
4500                ::fidl_next::FromWire::from_wire(unsafe {
4501                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4502                })
4503            }),
4504
4505            component_url: component_url.map(|envelope| {
4506                ::fidl_next::FromWire::from_wire(unsafe {
4507                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4508                })
4509            }),
4510
4511            timestamp: timestamp.map(|envelope| {
4512                ::fidl_next::FromWire::from_wire(unsafe {
4513                    envelope.read_unchecked::<::fidl_next::WireI64>()
4514                })
4515            }),
4516        }
4517    }
4518}
4519
4520impl<'de> ::fidl_next::FromWireRef<WireEventHeader<'de>> for EventHeader {
4521    #[inline]
4522    fn from_wire_ref(wire: &WireEventHeader<'de>) -> Self {
4523        Self {
4524            event_type: wire.table.get(1).map(|envelope| {
4525                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4526                    envelope.deref_unchecked::<crate::WireEventType>()
4527                })
4528            }),
4529
4530            moniker: wire.table.get(2).map(|envelope| {
4531                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4532                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4533                })
4534            }),
4535
4536            component_url: wire.table.get(3).map(|envelope| {
4537                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4538                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4539                })
4540            }),
4541
4542            timestamp: wire.table.get(4).map(|envelope| {
4543                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4544                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4545                })
4546            }),
4547        }
4548    }
4549}
4550
4551/// The wire type corresponding to [`EventHeader`].
4552#[repr(C)]
4553pub struct WireEventHeader<'de> {
4554    table: ::fidl_next::WireTable<'de>,
4555}
4556
4557impl<'de> Drop for WireEventHeader<'de> {
4558    fn drop(&mut self) {
4559        let _ = self
4560            .table
4561            .get(1)
4562            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventType>() });
4563
4564        let _ = self
4565            .table
4566            .get(2)
4567            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4568
4569        let _ = self
4570            .table
4571            .get(3)
4572            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4573
4574        let _ = self
4575            .table
4576            .get(4)
4577            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4578    }
4579}
4580
4581unsafe impl ::fidl_next::Wire for WireEventHeader<'static> {
4582    type Decoded<'de> = WireEventHeader<'de>;
4583
4584    #[inline]
4585    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4586        ::fidl_next::munge!(let Self { table } = out);
4587        ::fidl_next::WireTable::zero_padding(table);
4588    }
4589}
4590
4591unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventHeader<'static>
4592where
4593    ___D: ::fidl_next::Decoder + ?Sized,
4594{
4595    fn decode(
4596        slot: ::fidl_next::Slot<'_, Self>,
4597        decoder: &mut ___D,
4598    ) -> Result<(), ::fidl_next::DecodeError> {
4599        ::fidl_next::munge!(let Self { table } = slot);
4600
4601        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4602            match ordinal {
4603                0 => unsafe { ::core::hint::unreachable_unchecked() },
4604
4605                1 => {
4606                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventType>(
4607                        slot.as_mut(),
4608                        decoder,
4609                    )?;
4610
4611                    Ok(())
4612                }
4613
4614                2 => {
4615                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4616                        slot.as_mut(),
4617                        decoder,
4618                    )?;
4619
4620                    let moniker = unsafe {
4621                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4622                    };
4623
4624                    if moniker.len() > 4096 {
4625                        return Err(::fidl_next::DecodeError::VectorTooLong {
4626                            size: moniker.len() as u64,
4627                            limit: 4096,
4628                        });
4629                    }
4630
4631                    Ok(())
4632                }
4633
4634                3 => {
4635                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4636                        slot.as_mut(),
4637                        decoder,
4638                    )?;
4639
4640                    let component_url = unsafe {
4641                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4642                    };
4643
4644                    if component_url.len() > 4096 {
4645                        return Err(::fidl_next::DecodeError::VectorTooLong {
4646                            size: component_url.len() as u64,
4647                            limit: 4096,
4648                        });
4649                    }
4650
4651                    Ok(())
4652                }
4653
4654                4 => {
4655                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4656                        slot.as_mut(),
4657                        decoder,
4658                    )?;
4659
4660                    Ok(())
4661                }
4662
4663                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4664            }
4665        })
4666    }
4667}
4668
4669impl<'de> WireEventHeader<'de> {
4670    pub fn event_type(&self) -> Option<&crate::WireEventType> {
4671        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4672    }
4673
4674    pub fn moniker(&self) -> Option<&::fidl_next::WireString<'de>> {
4675        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4676    }
4677
4678    pub fn component_url(&self) -> Option<&::fidl_next::WireString<'de>> {
4679        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
4680    }
4681
4682    pub fn timestamp(&self) -> Option<&::fidl_next::WireI64> {
4683        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
4684    }
4685}
4686
4687impl<'de> ::core::fmt::Debug for WireEventHeader<'de> {
4688    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
4689        f.debug_struct("EventHeader")
4690            .field("event_type", &self.event_type())
4691            .field("moniker", &self.moniker())
4692            .field("component_url", &self.component_url())
4693            .field("timestamp", &self.timestamp())
4694            .finish()
4695    }
4696}
4697
4698#[doc = " Encapsulates additional data/protocols for some event types.\n"]
4699#[derive(Debug)]
4700pub enum EventPayload {
4701    CapabilityRequested(crate::CapabilityRequestedPayload),
4702
4703    Purged(crate::PurgedPayload),
4704
4705    Discovered(crate::DiscoveredPayload),
4706
4707    Destroyed(crate::DestroyedPayload),
4708
4709    Resolved(crate::ResolvedPayload),
4710
4711    Started(crate::StartedPayload),
4712
4713    Stopped(crate::StoppedPayload),
4714
4715    DebugStarted(crate::DebugStartedPayload),
4716
4717    Unresolved(crate::UnresolvedPayload),
4718
4719    UnknownOrdinal_(u64),
4720}
4721
4722impl ::fidl_next::Encodable for EventPayload {
4723    type Encoded = WireEventPayload<'static>;
4724}
4725
4726unsafe impl<___E> ::fidl_next::Encode<___E> for EventPayload
4727where
4728    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4729    ___E: ::fidl_next::Encoder,
4730    ___E: ::fidl_next::fuchsia::HandleEncoder,
4731{
4732    #[inline]
4733    fn encode(
4734        self,
4735        encoder: &mut ___E,
4736        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4737    ) -> Result<(), ::fidl_next::EncodeError> {
4738        ::fidl_next::munge!(let WireEventPayload { raw, _phantom: _ } = out);
4739
4740        match self {
4741            Self::CapabilityRequested(value) => ::fidl_next::RawWireUnion::encode_as::<
4742                ___E,
4743                crate::CapabilityRequestedPayload,
4744            >(value, 1, encoder, raw)?,
4745
4746            Self::Purged(value) => ::fidl_next::RawWireUnion::encode_as::<
4747                ___E,
4748                crate::PurgedPayload,
4749            >(value, 2, encoder, raw)?,
4750
4751            Self::Discovered(value) => ::fidl_next::RawWireUnion::encode_as::<
4752                ___E,
4753                crate::DiscoveredPayload,
4754            >(value, 4, encoder, raw)?,
4755
4756            Self::Destroyed(value) => ::fidl_next::RawWireUnion::encode_as::<
4757                ___E,
4758                crate::DestroyedPayload,
4759            >(value, 5, encoder, raw)?,
4760
4761            Self::Resolved(value) => ::fidl_next::RawWireUnion::encode_as::<
4762                ___E,
4763                crate::ResolvedPayload,
4764            >(value, 6, encoder, raw)?,
4765
4766            Self::Started(value) => ::fidl_next::RawWireUnion::encode_as::<
4767                ___E,
4768                crate::StartedPayload,
4769            >(value, 7, encoder, raw)?,
4770
4771            Self::Stopped(value) => ::fidl_next::RawWireUnion::encode_as::<
4772                ___E,
4773                crate::StoppedPayload,
4774            >(value, 8, encoder, raw)?,
4775
4776            Self::DebugStarted(value) => ::fidl_next::RawWireUnion::encode_as::<
4777                ___E,
4778                crate::DebugStartedPayload,
4779            >(value, 9, encoder, raw)?,
4780
4781            Self::Unresolved(value) => ::fidl_next::RawWireUnion::encode_as::<
4782                ___E,
4783                crate::UnresolvedPayload,
4784            >(value, 10, encoder, raw)?,
4785
4786            Self::UnknownOrdinal_(ordinal) => {
4787                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
4788            }
4789        }
4790
4791        Ok(())
4792    }
4793}
4794
4795impl ::fidl_next::EncodableOption for EventPayload {
4796    type EncodedOption = WireOptionalEventPayload<'static>;
4797}
4798
4799unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventPayload
4800where
4801    ___E: ?Sized,
4802    EventPayload: ::fidl_next::Encode<___E>,
4803{
4804    #[inline]
4805    fn encode_option(
4806        this: Option<Self>,
4807        encoder: &mut ___E,
4808        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4809    ) -> Result<(), ::fidl_next::EncodeError> {
4810        ::fidl_next::munge!(let WireOptionalEventPayload { raw, _phantom: _ } = &mut *out);
4811
4812        if let Some(inner) = this {
4813            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
4814            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
4815        } else {
4816            ::fidl_next::RawWireUnion::encode_absent(raw);
4817        }
4818
4819        Ok(())
4820    }
4821}
4822
4823impl<'de> ::fidl_next::FromWire<WireEventPayload<'de>> for EventPayload {
4824    #[inline]
4825    fn from_wire(wire: WireEventPayload<'de>) -> Self {
4826        let wire = ::core::mem::ManuallyDrop::new(wire);
4827        match wire.raw.ordinal() {
4828            1 => Self::CapabilityRequested(::fidl_next::FromWire::from_wire(unsafe {
4829                wire.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
4830            })),
4831
4832            2 => Self::Purged(::fidl_next::FromWire::from_wire(unsafe {
4833                wire.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>()
4834            })),
4835
4836            4 => Self::Discovered(::fidl_next::FromWire::from_wire(unsafe {
4837                wire.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>()
4838            })),
4839
4840            5 => Self::Destroyed(::fidl_next::FromWire::from_wire(unsafe {
4841                wire.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>()
4842            })),
4843
4844            6 => Self::Resolved(::fidl_next::FromWire::from_wire(unsafe {
4845                wire.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>()
4846            })),
4847
4848            7 => Self::Started(::fidl_next::FromWire::from_wire(unsafe {
4849                wire.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>()
4850            })),
4851
4852            8 => Self::Stopped(::fidl_next::FromWire::from_wire(unsafe {
4853                wire.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>()
4854            })),
4855
4856            9 => Self::DebugStarted(::fidl_next::FromWire::from_wire(unsafe {
4857                wire.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
4858            })),
4859
4860            10 => Self::Unresolved(::fidl_next::FromWire::from_wire(unsafe {
4861                wire.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>()
4862            })),
4863
4864            _ => unsafe { ::core::hint::unreachable_unchecked() },
4865        }
4866    }
4867}
4868
4869impl<'de> ::fidl_next::FromWireOption<WireOptionalEventPayload<'de>> for Box<EventPayload> {
4870    #[inline]
4871    fn from_wire_option(wire: WireOptionalEventPayload<'de>) -> Option<Self> {
4872        if let Some(inner) = wire.into_option() {
4873            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
4874        } else {
4875            None
4876        }
4877    }
4878}
4879
4880/// The wire type corresponding to [`EventPayload`].
4881#[repr(transparent)]
4882pub struct WireEventPayload<'de> {
4883    raw: ::fidl_next::RawWireUnion,
4884    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4885}
4886
4887impl<'de> Drop for WireEventPayload<'de> {
4888    fn drop(&mut self) {
4889        match self.raw.ordinal() {
4890            1 => {
4891                let _ = unsafe {
4892                    self.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
4893                };
4894            }
4895
4896            2 => {
4897                let _ = unsafe { self.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>() };
4898            }
4899
4900            4 => {
4901                let _ =
4902                    unsafe { self.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>() };
4903            }
4904
4905            5 => {
4906                let _ =
4907                    unsafe { self.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>() };
4908            }
4909
4910            6 => {
4911                let _ =
4912                    unsafe { self.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>() };
4913            }
4914
4915            7 => {
4916                let _ =
4917                    unsafe { self.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>() };
4918            }
4919
4920            8 => {
4921                let _ =
4922                    unsafe { self.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>() };
4923            }
4924
4925            9 => {
4926                let _ = unsafe {
4927                    self.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
4928                };
4929            }
4930
4931            10 => {
4932                let _ =
4933                    unsafe { self.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>() };
4934            }
4935
4936            _ => (),
4937        }
4938    }
4939}
4940
4941unsafe impl ::fidl_next::Wire for WireEventPayload<'static> {
4942    type Decoded<'de> = WireEventPayload<'de>;
4943
4944    #[inline]
4945    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4946        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4947        ::fidl_next::RawWireUnion::zero_padding(raw);
4948    }
4949}
4950
4951pub mod event_payload {
4952    pub enum Ref<'de> {
4953        CapabilityRequested(&'de crate::WireCapabilityRequestedPayload<'de>),
4954
4955        Purged(&'de crate::WirePurgedPayload<'de>),
4956
4957        Discovered(&'de crate::WireDiscoveredPayload<'de>),
4958
4959        Destroyed(&'de crate::WireDestroyedPayload<'de>),
4960
4961        Resolved(&'de crate::WireResolvedPayload<'de>),
4962
4963        Started(&'de crate::WireStartedPayload<'de>),
4964
4965        Stopped(&'de crate::WireStoppedPayload<'de>),
4966
4967        DebugStarted(&'de crate::WireDebugStartedPayload<'de>),
4968
4969        Unresolved(&'de crate::WireUnresolvedPayload<'de>),
4970
4971        UnknownOrdinal_(u64),
4972    }
4973}
4974
4975impl<'de> WireEventPayload<'de> {
4976    pub fn as_ref(&self) -> crate::event_payload::Ref<'_> {
4977        match self.raw.ordinal() {
4978            1 => crate::event_payload::Ref::CapabilityRequested(unsafe {
4979                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>()
4980            }),
4981
4982            2 => crate::event_payload::Ref::Purged(unsafe {
4983                self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>()
4984            }),
4985
4986            4 => crate::event_payload::Ref::Discovered(unsafe {
4987                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>()
4988            }),
4989
4990            5 => crate::event_payload::Ref::Destroyed(unsafe {
4991                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>()
4992            }),
4993
4994            6 => crate::event_payload::Ref::Resolved(unsafe {
4995                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>()
4996            }),
4997
4998            7 => crate::event_payload::Ref::Started(unsafe {
4999                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>()
5000            }),
5001
5002            8 => crate::event_payload::Ref::Stopped(unsafe {
5003                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>()
5004            }),
5005
5006            9 => crate::event_payload::Ref::DebugStarted(unsafe {
5007                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>()
5008            }),
5009
5010            10 => crate::event_payload::Ref::Unresolved(unsafe {
5011                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>()
5012            }),
5013
5014            unknown => crate::event_payload::Ref::UnknownOrdinal_(unknown),
5015        }
5016    }
5017}
5018
5019unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventPayload<'static>
5020where
5021    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5022    ___D: ::fidl_next::Decoder,
5023    ___D: ::fidl_next::fuchsia::HandleDecoder,
5024{
5025    fn decode(
5026        mut slot: ::fidl_next::Slot<'_, Self>,
5027        decoder: &mut ___D,
5028    ) -> Result<(), ::fidl_next::DecodeError> {
5029        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5030        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5031            1 => ::fidl_next::RawWireUnion::decode_as::<
5032                ___D,
5033                crate::WireCapabilityRequestedPayload<'static>,
5034            >(raw, decoder)?,
5035
5036            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5037                raw, decoder,
5038            )?,
5039
5040            4 => {
5041                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5042                    raw, decoder,
5043                )?
5044            }
5045
5046            5 => {
5047                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5048                    raw, decoder,
5049                )?
5050            }
5051
5052            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5053                raw, decoder,
5054            )?,
5055
5056            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5057                raw, decoder,
5058            )?,
5059
5060            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5061                raw, decoder,
5062            )?,
5063
5064            9 => ::fidl_next::RawWireUnion::decode_as::<
5065                ___D,
5066                crate::WireDebugStartedPayload<'static>,
5067            >(raw, decoder)?,
5068
5069            10 => ::fidl_next::RawWireUnion::decode_as::<
5070                ___D,
5071                crate::WireUnresolvedPayload<'static>,
5072            >(raw, decoder)?,
5073
5074            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5075        }
5076
5077        Ok(())
5078    }
5079}
5080
5081impl<'de> ::core::fmt::Debug for WireEventPayload<'de> {
5082    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5083        match self.raw.ordinal() {
5084            1 => unsafe {
5085                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>().fmt(f)
5086            },
5087            2 => unsafe { self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>().fmt(f) },
5088            4 => unsafe {
5089                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>().fmt(f)
5090            },
5091            5 => unsafe {
5092                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>().fmt(f)
5093            },
5094            6 => unsafe {
5095                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>().fmt(f)
5096            },
5097            7 => unsafe {
5098                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>().fmt(f)
5099            },
5100            8 => unsafe {
5101                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>().fmt(f)
5102            },
5103            9 => unsafe {
5104                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>().fmt(f)
5105            },
5106            10 => unsafe {
5107                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>().fmt(f)
5108            },
5109            _ => unsafe { ::core::hint::unreachable_unchecked() },
5110        }
5111    }
5112}
5113
5114#[repr(transparent)]
5115pub struct WireOptionalEventPayload<'de> {
5116    raw: ::fidl_next::RawWireUnion,
5117    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5118}
5119
5120unsafe impl ::fidl_next::Wire for WireOptionalEventPayload<'static> {
5121    type Decoded<'de> = WireOptionalEventPayload<'de>;
5122
5123    #[inline]
5124    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5125        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5126        ::fidl_next::RawWireUnion::zero_padding(raw);
5127    }
5128}
5129
5130impl<'de> WireOptionalEventPayload<'de> {
5131    pub fn is_some(&self) -> bool {
5132        self.raw.is_some()
5133    }
5134
5135    pub fn is_none(&self) -> bool {
5136        self.raw.is_none()
5137    }
5138
5139    pub fn as_ref(&self) -> Option<&WireEventPayload<'de>> {
5140        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
5141    }
5142
5143    pub fn into_option(self) -> Option<WireEventPayload<'de>> {
5144        if self.is_some() {
5145            Some(WireEventPayload { raw: self.raw, _phantom: ::core::marker::PhantomData })
5146        } else {
5147            None
5148        }
5149    }
5150}
5151
5152unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalEventPayload<'static>
5153where
5154    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5155    ___D: ::fidl_next::Decoder,
5156    ___D: ::fidl_next::fuchsia::HandleDecoder,
5157{
5158    fn decode(
5159        mut slot: ::fidl_next::Slot<'_, Self>,
5160        decoder: &mut ___D,
5161    ) -> Result<(), ::fidl_next::DecodeError> {
5162        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5163        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5164            1 => ::fidl_next::RawWireUnion::decode_as::<
5165                ___D,
5166                crate::WireCapabilityRequestedPayload<'static>,
5167            >(raw, decoder)?,
5168
5169            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5170                raw, decoder,
5171            )?,
5172
5173            4 => {
5174                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5175                    raw, decoder,
5176                )?
5177            }
5178
5179            5 => {
5180                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5181                    raw, decoder,
5182                )?
5183            }
5184
5185            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5186                raw, decoder,
5187            )?,
5188
5189            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5190                raw, decoder,
5191            )?,
5192
5193            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5194                raw, decoder,
5195            )?,
5196
5197            9 => ::fidl_next::RawWireUnion::decode_as::<
5198                ___D,
5199                crate::WireDebugStartedPayload<'static>,
5200            >(raw, decoder)?,
5201
5202            10 => ::fidl_next::RawWireUnion::decode_as::<
5203                ___D,
5204                crate::WireUnresolvedPayload<'static>,
5205            >(raw, decoder)?,
5206
5207            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
5208            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5209        }
5210
5211        Ok(())
5212    }
5213}
5214
5215impl<'de> ::core::fmt::Debug for WireOptionalEventPayload<'de> {
5216    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5217        self.as_ref().fmt(f)
5218    }
5219}
5220
5221#[doc = " Contains all information about a single event\n"]
5222#[derive(Debug, Default)]
5223pub struct Event {
5224    pub header: Option<crate::EventHeader>,
5225
5226    pub payload: Option<crate::EventPayload>,
5227}
5228
5229impl Event {
5230    fn __max_ordinal(&self) -> usize {
5231        if self.payload.is_some() {
5232            return 2;
5233        }
5234
5235        if self.header.is_some() {
5236            return 1;
5237        }
5238
5239        0
5240    }
5241}
5242
5243impl ::fidl_next::Encodable for Event {
5244    type Encoded = WireEvent<'static>;
5245}
5246
5247unsafe impl<___E> ::fidl_next::Encode<___E> for Event
5248where
5249    ___E: ::fidl_next::Encoder + ?Sized,
5250    ___E: ::fidl_next::fuchsia::HandleEncoder,
5251{
5252    #[inline]
5253    fn encode(
5254        mut self,
5255        encoder: &mut ___E,
5256        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5257    ) -> Result<(), ::fidl_next::EncodeError> {
5258        ::fidl_next::munge!(let WireEvent { table } = out);
5259
5260        let max_ord = self.__max_ordinal();
5261
5262        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
5263        ::fidl_next::Wire::zero_padding(&mut out);
5264
5265        let mut preallocated =
5266            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
5267
5268        for i in 1..=max_ord {
5269            match i {
5270                2 => {
5271                    if let Some(payload) = self.payload.take() {
5272                        ::fidl_next::WireEnvelope::encode_value(
5273                            payload,
5274                            preallocated.encoder,
5275                            &mut out,
5276                        )?;
5277                    } else {
5278                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5279                    }
5280                }
5281
5282                1 => {
5283                    if let Some(header) = self.header.take() {
5284                        ::fidl_next::WireEnvelope::encode_value(
5285                            header,
5286                            preallocated.encoder,
5287                            &mut out,
5288                        )?;
5289                    } else {
5290                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5291                    }
5292                }
5293
5294                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
5295            }
5296            unsafe {
5297                preallocated.write_next(out.assume_init_ref());
5298            }
5299        }
5300
5301        ::fidl_next::WireTable::encode_len(table, max_ord);
5302
5303        Ok(())
5304    }
5305}
5306
5307impl<'de> ::fidl_next::FromWire<WireEvent<'de>> for Event {
5308    #[inline]
5309    fn from_wire(wire: WireEvent<'de>) -> Self {
5310        let wire = ::core::mem::ManuallyDrop::new(wire);
5311
5312        let header = wire.table.get(1);
5313
5314        let payload = wire.table.get(2);
5315
5316        Self {
5317            header: header.map(|envelope| {
5318                ::fidl_next::FromWire::from_wire(unsafe {
5319                    envelope.read_unchecked::<crate::WireEventHeader<'de>>()
5320                })
5321            }),
5322
5323            payload: payload.map(|envelope| {
5324                ::fidl_next::FromWire::from_wire(unsafe {
5325                    envelope.read_unchecked::<crate::WireEventPayload<'de>>()
5326                })
5327            }),
5328        }
5329    }
5330}
5331
5332/// The wire type corresponding to [`Event`].
5333#[repr(C)]
5334pub struct WireEvent<'de> {
5335    table: ::fidl_next::WireTable<'de>,
5336}
5337
5338impl<'de> Drop for WireEvent<'de> {
5339    fn drop(&mut self) {
5340        let _ = self
5341            .table
5342            .get(1)
5343            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventHeader<'de>>() });
5344
5345        let _ = self
5346            .table
5347            .get(2)
5348            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventPayload<'de>>() });
5349    }
5350}
5351
5352unsafe impl ::fidl_next::Wire for WireEvent<'static> {
5353    type Decoded<'de> = WireEvent<'de>;
5354
5355    #[inline]
5356    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5357        ::fidl_next::munge!(let Self { table } = out);
5358        ::fidl_next::WireTable::zero_padding(table);
5359    }
5360}
5361
5362unsafe impl<___D> ::fidl_next::Decode<___D> for WireEvent<'static>
5363where
5364    ___D: ::fidl_next::Decoder + ?Sized,
5365    ___D: ::fidl_next::fuchsia::HandleDecoder,
5366{
5367    fn decode(
5368        slot: ::fidl_next::Slot<'_, Self>,
5369        decoder: &mut ___D,
5370    ) -> Result<(), ::fidl_next::DecodeError> {
5371        ::fidl_next::munge!(let Self { table } = slot);
5372
5373        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5374            match ordinal {
5375                0 => unsafe { ::core::hint::unreachable_unchecked() },
5376
5377                1 => {
5378                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventHeader<'static>>(
5379                        slot.as_mut(),
5380                        decoder,
5381                    )?;
5382
5383                    Ok(())
5384                }
5385
5386                2 => {
5387                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventPayload<'static>>(
5388                        slot.as_mut(),
5389                        decoder,
5390                    )?;
5391
5392                    Ok(())
5393                }
5394
5395                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5396            }
5397        })
5398    }
5399}
5400
5401impl<'de> WireEvent<'de> {
5402    pub fn header(&self) -> Option<&crate::WireEventHeader<'de>> {
5403        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5404    }
5405
5406    pub fn payload(&self) -> Option<&crate::WireEventPayload<'de>> {
5407        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5408    }
5409}
5410
5411impl<'de> ::core::fmt::Debug for WireEvent<'de> {
5412    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
5413        f.debug_struct("Event")
5414            .field("header", &self.header())
5415            .field("payload", &self.payload())
5416            .finish()
5417    }
5418}
5419
5420#[derive(Debug)]
5421pub struct EventStreamGetNextResponse {
5422    pub events: Vec<crate::Event>,
5423}
5424
5425impl ::fidl_next::Encodable for EventStreamGetNextResponse {
5426    type Encoded = WireEventStreamGetNextResponse<'static>;
5427}
5428
5429unsafe impl<___E> ::fidl_next::Encode<___E> for EventStreamGetNextResponse
5430where
5431    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5432    ___E: ::fidl_next::Encoder,
5433    ___E: ::fidl_next::fuchsia::HandleEncoder,
5434{
5435    #[inline]
5436    fn encode(
5437        self,
5438        encoder: &mut ___E,
5439        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5440    ) -> Result<(), ::fidl_next::EncodeError> {
5441        ::fidl_next::munge! {
5442            let Self::Encoded {
5443                events,
5444
5445            } = out;
5446        }
5447
5448        ::fidl_next::Encode::encode(self.events, encoder, events)?;
5449
5450        Ok(())
5451    }
5452}
5453
5454impl ::fidl_next::EncodableOption for EventStreamGetNextResponse {
5455    type EncodedOption = ::fidl_next::WireBox<'static, WireEventStreamGetNextResponse<'static>>;
5456}
5457
5458unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventStreamGetNextResponse
5459where
5460    ___E: ::fidl_next::Encoder + ?Sized,
5461    EventStreamGetNextResponse: ::fidl_next::Encode<___E>,
5462{
5463    #[inline]
5464    fn encode_option(
5465        this: Option<Self>,
5466        encoder: &mut ___E,
5467        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5468    ) -> Result<(), ::fidl_next::EncodeError> {
5469        if let Some(inner) = this {
5470            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5471            ::fidl_next::WireBox::encode_present(out);
5472        } else {
5473            ::fidl_next::WireBox::encode_absent(out);
5474        }
5475
5476        Ok(())
5477    }
5478}
5479
5480impl<'de> ::fidl_next::FromWire<WireEventStreamGetNextResponse<'de>>
5481    for EventStreamGetNextResponse
5482{
5483    #[inline]
5484    fn from_wire(wire: WireEventStreamGetNextResponse<'de>) -> Self {
5485        Self { events: ::fidl_next::FromWire::from_wire(wire.events) }
5486    }
5487}
5488
5489/// The wire type corresponding to [`EventStreamGetNextResponse`].
5490#[derive(Debug)]
5491#[repr(C)]
5492pub struct WireEventStreamGetNextResponse<'de> {
5493    pub events: ::fidl_next::WireVector<'de, crate::WireEvent<'de>>,
5494}
5495
5496unsafe impl ::fidl_next::Wire for WireEventStreamGetNextResponse<'static> {
5497    type Decoded<'de> = WireEventStreamGetNextResponse<'de>;
5498
5499    #[inline]
5500    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5501}
5502
5503unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventStreamGetNextResponse<'static>
5504where
5505    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5506    ___D: ::fidl_next::Decoder,
5507    ___D: ::fidl_next::fuchsia::HandleDecoder,
5508{
5509    fn decode(
5510        slot: ::fidl_next::Slot<'_, Self>,
5511        decoder: &mut ___D,
5512    ) -> Result<(), ::fidl_next::DecodeError> {
5513        ::fidl_next::munge! {
5514            let Self {
5515                mut events,
5516
5517            } = slot;
5518        }
5519
5520        ::fidl_next::Decode::decode(events.as_mut(), decoder)?;
5521
5522        Ok(())
5523    }
5524}
5525
5526/// The type corresponding to the EventStream protocol.
5527#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
5528#[derive(Debug)]
5529pub struct EventStream;
5530
5531impl ::fidl_next::Discoverable for EventStream {
5532    const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
5533}
5534
5535pub mod event_stream {
5536    pub mod prelude {
5537        pub use crate::{
5538            EventStream, EventStreamClientHandler, EventStreamServerHandler, event_stream,
5539        };
5540
5541        pub use crate::EventStreamGetNextResponse;
5542    }
5543
5544    pub struct GetNext;
5545
5546    impl ::fidl_next::Method for GetNext {
5547        const ORDINAL: u64 = 4549982840421936006;
5548
5549        type Protocol = crate::EventStream;
5550
5551        type Request = ();
5552
5553        type Response = crate::WireEventStreamGetNextResponse<'static>;
5554    }
5555
5556    pub struct WaitForReady;
5557
5558    impl ::fidl_next::Method for WaitForReady {
5559        const ORDINAL: u64 = 3545212058508387970;
5560
5561        type Protocol = crate::EventStream;
5562
5563        type Request = ();
5564
5565        type Response = ();
5566    }
5567
5568    mod ___detail {
5569
5570        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::EventStream
5571        where
5572            ___T: ::fidl_next::Transport,
5573        {
5574            type ClientSender = EventStreamClientSender<___T>;
5575            type ServerSender = EventStreamServerSender<___T>;
5576        }
5577
5578        /// The client sender for the `EventStream` protocol.
5579        #[repr(transparent)]
5580        pub struct EventStreamClientSender<___T: ::fidl_next::Transport> {
5581            #[allow(dead_code)]
5582            sender: ::fidl_next::protocol::ClientSender<___T>,
5583        }
5584
5585        impl<___T> EventStreamClientSender<___T>
5586        where
5587            ___T: ::fidl_next::Transport,
5588        {
5589            pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
5590                ::fidl_next::TwoWayFuture::from_untyped(
5591                    self.sender.send_two_way(4549982840421936006, ()),
5592                )
5593            }
5594
5595            #[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"]
5596            pub fn wait_for_ready(
5597                &self,
5598            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForReady, ___T> {
5599                ::fidl_next::TwoWayFuture::from_untyped(
5600                    self.sender.send_two_way(3545212058508387970, ()),
5601                )
5602            }
5603        }
5604
5605        /// The server sender for the `EventStream` protocol.
5606        #[repr(transparent)]
5607        pub struct EventStreamServerSender<___T: ::fidl_next::Transport> {
5608            sender: ::fidl_next::protocol::ServerSender<___T>,
5609        }
5610
5611        impl<___T> EventStreamServerSender<___T> where ___T: ::fidl_next::Transport {}
5612    }
5613}
5614
5615/// A client handler for the EventStream protocol.
5616///
5617/// See [`EventStream`] for more details.
5618pub trait EventStreamClientHandler<
5619    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
5620    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5621>
5622{
5623}
5624
5625impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EventStream
5626where
5627    ___H: EventStreamClientHandler<___T> + ::core::marker::Send,
5628    ___T: ::fidl_next::Transport,
5629    <event_stream::GetNext as ::fidl_next::Method>::Response:
5630        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5631{
5632    async fn on_event(
5633        handler: &mut ___H,
5634        sender: &::fidl_next::ClientSender<Self, ___T>,
5635        ordinal: u64,
5636        buffer: ___T::RecvBuffer,
5637    ) {
5638        match ordinal {
5639            ordinal => sender.close(),
5640        }
5641    }
5642}
5643
5644/// A server handler for the EventStream protocol.
5645///
5646/// See [`EventStream`] for more details.
5647pub trait EventStreamServerHandler<
5648    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
5649    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5650>
5651{
5652    fn get_next(
5653        &mut self,
5654        sender: &::fidl_next::ServerSender<EventStream, ___T>,
5655
5656        responder: ::fidl_next::Responder<event_stream::GetNext>,
5657    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5658
5659    #[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"]
5660    fn wait_for_ready(
5661        &mut self,
5662        sender: &::fidl_next::ServerSender<EventStream, ___T>,
5663
5664        responder: ::fidl_next::Responder<event_stream::WaitForReady>,
5665    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5666}
5667
5668impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EventStream
5669where
5670    ___H: EventStreamServerHandler<___T> + ::core::marker::Send,
5671    ___T: ::fidl_next::Transport,
5672{
5673    async fn on_one_way(
5674        handler: &mut ___H,
5675        sender: &::fidl_next::ServerSender<Self, ___T>,
5676        ordinal: u64,
5677        buffer: ___T::RecvBuffer,
5678    ) {
5679        match ordinal {
5680            ordinal => sender.close(),
5681        }
5682    }
5683
5684    async fn on_two_way(
5685        handler: &mut ___H,
5686        sender: &::fidl_next::ServerSender<Self, ___T>,
5687        ordinal: u64,
5688        buffer: ___T::RecvBuffer,
5689        responder: ::fidl_next::protocol::Responder,
5690    ) {
5691        match ordinal {
5692            4549982840421936006 => {
5693                let responder = ::fidl_next::Responder::from_untyped(responder);
5694
5695                handler.get_next(sender, responder).await;
5696            }
5697
5698            3545212058508387970 => {
5699                let responder = ::fidl_next::Responder::from_untyped(responder);
5700
5701                handler.wait_for_ready(sender, responder).await;
5702            }
5703
5704            ordinal => sender.close(),
5705        }
5706    }
5707}
5708
5709#[derive(Clone, Debug)]
5710pub struct ExecutionControllerOnStopRequest {
5711    pub stopped_payload: crate::StoppedPayload,
5712}
5713
5714impl ::fidl_next::Encodable for ExecutionControllerOnStopRequest {
5715    type Encoded = WireExecutionControllerOnStopRequest<'static>;
5716}
5717
5718unsafe impl<___E> ::fidl_next::Encode<___E> for ExecutionControllerOnStopRequest
5719where
5720    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5721    ___E: ::fidl_next::Encoder,
5722{
5723    #[inline]
5724    fn encode(
5725        self,
5726        encoder: &mut ___E,
5727        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5728    ) -> Result<(), ::fidl_next::EncodeError> {
5729        ::fidl_next::munge! {
5730            let Self::Encoded {
5731                stopped_payload,
5732
5733            } = out;
5734        }
5735
5736        ::fidl_next::Encode::encode(self.stopped_payload, encoder, stopped_payload)?;
5737
5738        Ok(())
5739    }
5740}
5741
5742unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ExecutionControllerOnStopRequest
5743where
5744    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5745    ___E: ::fidl_next::Encoder,
5746{
5747    #[inline]
5748    fn encode_ref(
5749        &self,
5750        encoder: &mut ___E,
5751        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5752    ) -> Result<(), ::fidl_next::EncodeError> {
5753        ::fidl_next::munge! {
5754            let Self::Encoded {
5755                stopped_payload,
5756
5757            } = out;
5758        }
5759
5760        ::fidl_next::EncodeRef::encode_ref(&self.stopped_payload, encoder, stopped_payload)?;
5761
5762        Ok(())
5763    }
5764}
5765
5766impl ::fidl_next::EncodableOption for ExecutionControllerOnStopRequest {
5767    type EncodedOption =
5768        ::fidl_next::WireBox<'static, WireExecutionControllerOnStopRequest<'static>>;
5769}
5770
5771unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExecutionControllerOnStopRequest
5772where
5773    ___E: ::fidl_next::Encoder + ?Sized,
5774    ExecutionControllerOnStopRequest: ::fidl_next::Encode<___E>,
5775{
5776    #[inline]
5777    fn encode_option(
5778        this: Option<Self>,
5779        encoder: &mut ___E,
5780        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5781    ) -> Result<(), ::fidl_next::EncodeError> {
5782        if let Some(inner) = this {
5783            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5784            ::fidl_next::WireBox::encode_present(out);
5785        } else {
5786            ::fidl_next::WireBox::encode_absent(out);
5787        }
5788
5789        Ok(())
5790    }
5791}
5792
5793unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ExecutionControllerOnStopRequest
5794where
5795    ___E: ::fidl_next::Encoder + ?Sized,
5796    ExecutionControllerOnStopRequest: ::fidl_next::EncodeRef<___E>,
5797{
5798    #[inline]
5799    fn encode_option_ref(
5800        this: Option<&Self>,
5801        encoder: &mut ___E,
5802        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5803    ) -> Result<(), ::fidl_next::EncodeError> {
5804        if let Some(inner) = this {
5805            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5806            ::fidl_next::WireBox::encode_present(out);
5807        } else {
5808            ::fidl_next::WireBox::encode_absent(out);
5809        }
5810
5811        Ok(())
5812    }
5813}
5814
5815impl<'de> ::fidl_next::FromWire<WireExecutionControllerOnStopRequest<'de>>
5816    for ExecutionControllerOnStopRequest
5817{
5818    #[inline]
5819    fn from_wire(wire: WireExecutionControllerOnStopRequest<'de>) -> Self {
5820        Self { stopped_payload: ::fidl_next::FromWire::from_wire(wire.stopped_payload) }
5821    }
5822}
5823
5824impl<'de> ::fidl_next::FromWireRef<WireExecutionControllerOnStopRequest<'de>>
5825    for ExecutionControllerOnStopRequest
5826{
5827    #[inline]
5828    fn from_wire_ref(wire: &WireExecutionControllerOnStopRequest<'de>) -> Self {
5829        Self { stopped_payload: ::fidl_next::FromWireRef::from_wire_ref(&wire.stopped_payload) }
5830    }
5831}
5832
5833/// The wire type corresponding to [`ExecutionControllerOnStopRequest`].
5834#[derive(Debug)]
5835#[repr(C)]
5836pub struct WireExecutionControllerOnStopRequest<'de> {
5837    pub stopped_payload: crate::WireStoppedPayload<'de>,
5838}
5839
5840unsafe impl ::fidl_next::Wire for WireExecutionControllerOnStopRequest<'static> {
5841    type Decoded<'de> = WireExecutionControllerOnStopRequest<'de>;
5842
5843    #[inline]
5844    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5845}
5846
5847unsafe impl<___D> ::fidl_next::Decode<___D> for WireExecutionControllerOnStopRequest<'static>
5848where
5849    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5850    ___D: ::fidl_next::Decoder,
5851{
5852    fn decode(
5853        slot: ::fidl_next::Slot<'_, Self>,
5854        decoder: &mut ___D,
5855    ) -> Result<(), ::fidl_next::DecodeError> {
5856        ::fidl_next::munge! {
5857            let Self {
5858                mut stopped_payload,
5859
5860            } = slot;
5861        }
5862
5863        ::fidl_next::Decode::decode(stopped_payload.as_mut(), decoder)?;
5864
5865        Ok(())
5866    }
5867}
5868
5869/// The type corresponding to the ExecutionController protocol.
5870#[derive(Debug)]
5871pub struct ExecutionController;
5872
5873pub mod execution_controller {
5874    pub mod prelude {
5875        pub use crate::{
5876            ExecutionController, ExecutionControllerClientHandler,
5877            ExecutionControllerServerHandler, execution_controller,
5878        };
5879
5880        pub use crate::ExecutionControllerOnStopRequest;
5881    }
5882
5883    pub struct Stop;
5884
5885    impl ::fidl_next::Method for Stop {
5886        const ORDINAL: u64 = 6256129817234858263;
5887
5888        type Protocol = crate::ExecutionController;
5889
5890        type Request = ();
5891
5892        type Response = ::fidl_next::Never;
5893    }
5894
5895    pub struct OnStop;
5896
5897    impl ::fidl_next::Method for OnStop {
5898        const ORDINAL: u64 = 7121600095714604415;
5899
5900        type Protocol = crate::ExecutionController;
5901
5902        type Request = ::fidl_next::Never;
5903
5904        type Response = crate::WireExecutionControllerOnStopRequest<'static>;
5905    }
5906
5907    mod ___detail {
5908
5909        pub struct OnStop<T0> {
5910            stopped_payload: T0,
5911        }
5912
5913        impl<T0> ::fidl_next::Encodable for OnStop<T0>
5914        where
5915            T0: ::fidl_next::Encodable<Encoded = crate::WireStoppedPayload<'static>>,
5916        {
5917            type Encoded = crate::WireExecutionControllerOnStopRequest<'static>;
5918        }
5919
5920        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnStop<T0>
5921        where
5922            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5923            ___E: ::fidl_next::Encoder,
5924            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStoppedPayload<'static>>,
5925        {
5926            #[inline]
5927            fn encode(
5928                self,
5929                encoder: &mut ___E,
5930                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5931            ) -> Result<(), ::fidl_next::EncodeError> {
5932                ::fidl_next::munge! {
5933                    let Self::Encoded {
5934                        stopped_payload,
5935
5936                    } = out;
5937                }
5938
5939                ::fidl_next::Encode::encode(self.stopped_payload, encoder, stopped_payload)?;
5940
5941                Ok(())
5942            }
5943        }
5944
5945        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ExecutionController
5946        where
5947            ___T: ::fidl_next::Transport,
5948        {
5949            type ClientSender = ExecutionControllerClientSender<___T>;
5950            type ServerSender = ExecutionControllerServerSender<___T>;
5951        }
5952
5953        /// The client sender for the `ExecutionController` protocol.
5954        #[repr(transparent)]
5955        pub struct ExecutionControllerClientSender<___T: ::fidl_next::Transport> {
5956            #[allow(dead_code)]
5957            sender: ::fidl_next::protocol::ClientSender<___T>,
5958        }
5959
5960        impl<___T> ExecutionControllerClientSender<___T>
5961        where
5962            ___T: ::fidl_next::Transport,
5963        {
5964            #[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"]
5965            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
5966                ::fidl_next::SendFuture::from_untyped(
5967                    self.sender.send_one_way(6256129817234858263, ()),
5968                )
5969            }
5970        }
5971
5972        /// The server sender for the `ExecutionController` protocol.
5973        #[repr(transparent)]
5974        pub struct ExecutionControllerServerSender<___T: ::fidl_next::Transport> {
5975            sender: ::fidl_next::protocol::ServerSender<___T>,
5976        }
5977
5978        impl<___T> ExecutionControllerServerSender<___T>
5979        where
5980            ___T: ::fidl_next::Transport,
5981        {
5982            #[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"]
5983            pub fn on_stop(
5984                &self,
5985
5986                stopped_payload: impl ::fidl_next::Encode<
5987                    <___T as ::fidl_next::Transport>::SendBuffer,
5988                    Encoded = crate::WireStoppedPayload<'static>,
5989                >,
5990            ) -> ::fidl_next::SendFuture<'_, ___T>
5991            where
5992                <___T as ::fidl_next::Transport>::SendBuffer:
5993                    ::fidl_next::encoder::InternalHandleEncoder,
5994                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
5995            {
5996                self.on_stop_with(OnStop { stopped_payload })
5997            }
5998
5999            #[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"]
6000
6001            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6002            where
6003                ___R: ::fidl_next::Encode<
6004                        <___T as ::fidl_next::Transport>::SendBuffer,
6005                        Encoded = <super::OnStop as ::fidl_next::Method>::Response,
6006                    >,
6007            {
6008                ::fidl_next::SendFuture::from_untyped(
6009                    self.sender.send_event(7121600095714604415, request),
6010                )
6011            }
6012        }
6013    }
6014}
6015
6016/// A client handler for the ExecutionController protocol.
6017///
6018/// See [`ExecutionController`] for more details.
6019pub trait ExecutionControllerClientHandler<
6020    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6021    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6022>
6023{
6024    #[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"]
6025    fn on_stop(
6026        &mut self,
6027        sender: &::fidl_next::ClientSender<ExecutionController, ___T>,
6028
6029        event: ::fidl_next::Response<execution_controller::OnStop, ___T>,
6030    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6031
6032    fn on_unknown_interaction(
6033        &mut self,
6034        sender: &::fidl_next::ClientSender<ExecutionController, ___T>,
6035        ordinal: u64,
6036    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6037        sender.close();
6038        ::core::future::ready(())
6039    }
6040}
6041
6042impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExecutionController
6043where
6044    ___H: ExecutionControllerClientHandler<___T> + ::core::marker::Send,
6045    ___T: ::fidl_next::Transport,
6046    <execution_controller::OnStop as ::fidl_next::Method>::Response:
6047        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6048{
6049    async fn on_event(
6050        handler: &mut ___H,
6051        sender: &::fidl_next::ClientSender<Self, ___T>,
6052        ordinal: u64,
6053        buffer: ___T::RecvBuffer,
6054    ) {
6055        match ordinal {
6056            7121600095714604415 => match ::fidl_next::DecoderExt::decode(buffer) {
6057                Ok(decoded) => handler.on_stop(sender, decoded).await,
6058                Err(e) => sender.close(),
6059            },
6060
6061            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6062        }
6063    }
6064}
6065
6066/// A server handler for the ExecutionController protocol.
6067///
6068/// See [`ExecutionController`] for more details.
6069pub trait ExecutionControllerServerHandler<
6070    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6071    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6072>
6073{
6074    #[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"]
6075    fn stop(
6076        &mut self,
6077        sender: &::fidl_next::ServerSender<ExecutionController, ___T>,
6078    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6079
6080    fn on_unknown_interaction(
6081        &mut self,
6082        sender: &::fidl_next::ServerSender<ExecutionController, ___T>,
6083        ordinal: u64,
6084    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6085        sender.close();
6086        ::core::future::ready(())
6087    }
6088}
6089
6090impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExecutionController
6091where
6092    ___H: ExecutionControllerServerHandler<___T> + ::core::marker::Send,
6093    ___T: ::fidl_next::Transport,
6094{
6095    async fn on_one_way(
6096        handler: &mut ___H,
6097        sender: &::fidl_next::ServerSender<Self, ___T>,
6098        ordinal: u64,
6099        buffer: ___T::RecvBuffer,
6100    ) {
6101        match ordinal {
6102            6256129817234858263 => {
6103                handler.stop(sender).await;
6104            }
6105
6106            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6107        }
6108    }
6109
6110    async fn on_two_way(
6111        handler: &mut ___H,
6112        sender: &::fidl_next::ServerSender<Self, ___T>,
6113        ordinal: u64,
6114        buffer: ___T::RecvBuffer,
6115        responder: ::fidl_next::protocol::Responder,
6116    ) {
6117        match ordinal {
6118            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6119        }
6120    }
6121}
6122
6123#[derive(Debug)]
6124#[repr(C)]
6125pub struct IntrospectorGetMonikerRequest {
6126    pub component_instance: ::fidl_next::fuchsia::zx::Event,
6127}
6128
6129impl ::fidl_next::Encodable for IntrospectorGetMonikerRequest {
6130    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6131        Self,
6132        WireIntrospectorGetMonikerRequest,
6133    > = unsafe {
6134        ::fidl_next::CopyOptimization::enable_if(
6135            true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6136                .is_enabled(),
6137        )
6138    };
6139
6140    type Encoded = WireIntrospectorGetMonikerRequest;
6141}
6142
6143unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerRequest
6144where
6145    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6146    ___E: ::fidl_next::fuchsia::HandleEncoder,
6147{
6148    #[inline]
6149    fn encode(
6150        self,
6151        encoder: &mut ___E,
6152        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6153    ) -> Result<(), ::fidl_next::EncodeError> {
6154        ::fidl_next::munge! {
6155            let Self::Encoded {
6156                component_instance,
6157
6158            } = out;
6159        }
6160
6161        ::fidl_next::Encode::encode(self.component_instance, encoder, component_instance)?;
6162
6163        Ok(())
6164    }
6165}
6166
6167impl ::fidl_next::EncodableOption for IntrospectorGetMonikerRequest {
6168    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerRequest>;
6169}
6170
6171unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerRequest
6172where
6173    ___E: ::fidl_next::Encoder + ?Sized,
6174    IntrospectorGetMonikerRequest: ::fidl_next::Encode<___E>,
6175{
6176    #[inline]
6177    fn encode_option(
6178        this: Option<Self>,
6179        encoder: &mut ___E,
6180        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6181    ) -> Result<(), ::fidl_next::EncodeError> {
6182        if let Some(inner) = this {
6183            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6184            ::fidl_next::WireBox::encode_present(out);
6185        } else {
6186            ::fidl_next::WireBox::encode_absent(out);
6187        }
6188
6189        Ok(())
6190    }
6191}
6192
6193impl ::fidl_next::FromWire<WireIntrospectorGetMonikerRequest> for IntrospectorGetMonikerRequest {
6194    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6195        WireIntrospectorGetMonikerRequest,
6196        Self,
6197    > = unsafe {
6198        ::fidl_next::CopyOptimization::enable_if(
6199            true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
6200                ::fidl_next::fuchsia::WireEvent,
6201            >>::COPY_OPTIMIZATION
6202                .is_enabled(),
6203        )
6204    };
6205
6206    #[inline]
6207    fn from_wire(wire: WireIntrospectorGetMonikerRequest) -> Self {
6208        Self { component_instance: ::fidl_next::FromWire::from_wire(wire.component_instance) }
6209    }
6210}
6211
6212/// The wire type corresponding to [`IntrospectorGetMonikerRequest`].
6213#[derive(Debug)]
6214#[repr(C)]
6215pub struct WireIntrospectorGetMonikerRequest {
6216    pub component_instance: ::fidl_next::fuchsia::WireEvent,
6217}
6218
6219unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerRequest {
6220    type Decoded<'de> = WireIntrospectorGetMonikerRequest;
6221
6222    #[inline]
6223    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6224}
6225
6226unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerRequest
6227where
6228    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6229    ___D: ::fidl_next::fuchsia::HandleDecoder,
6230{
6231    fn decode(
6232        slot: ::fidl_next::Slot<'_, Self>,
6233        decoder: &mut ___D,
6234    ) -> Result<(), ::fidl_next::DecodeError> {
6235        ::fidl_next::munge! {
6236            let Self {
6237                mut component_instance,
6238
6239            } = slot;
6240        }
6241
6242        ::fidl_next::Decode::decode(component_instance.as_mut(), decoder)?;
6243
6244        Ok(())
6245    }
6246}
6247
6248#[derive(Clone, Debug)]
6249pub struct IntrospectorGetMonikerResponse {
6250    pub moniker: String,
6251}
6252
6253impl ::fidl_next::Encodable for IntrospectorGetMonikerResponse {
6254    type Encoded = WireIntrospectorGetMonikerResponse<'static>;
6255}
6256
6257unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerResponse
6258where
6259    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6260    ___E: ::fidl_next::Encoder,
6261{
6262    #[inline]
6263    fn encode(
6264        self,
6265        encoder: &mut ___E,
6266        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6267    ) -> Result<(), ::fidl_next::EncodeError> {
6268        ::fidl_next::munge! {
6269            let Self::Encoded {
6270                moniker,
6271
6272            } = out;
6273        }
6274
6275        ::fidl_next::Encode::encode(self.moniker, encoder, moniker)?;
6276
6277        Ok(())
6278    }
6279}
6280
6281unsafe impl<___E> ::fidl_next::EncodeRef<___E> for IntrospectorGetMonikerResponse
6282where
6283    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6284    ___E: ::fidl_next::Encoder,
6285{
6286    #[inline]
6287    fn encode_ref(
6288        &self,
6289        encoder: &mut ___E,
6290        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6291    ) -> Result<(), ::fidl_next::EncodeError> {
6292        ::fidl_next::munge! {
6293            let Self::Encoded {
6294                moniker,
6295
6296            } = out;
6297        }
6298
6299        ::fidl_next::EncodeRef::encode_ref(&self.moniker, encoder, moniker)?;
6300
6301        Ok(())
6302    }
6303}
6304
6305impl ::fidl_next::EncodableOption for IntrospectorGetMonikerResponse {
6306    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerResponse<'static>>;
6307}
6308
6309unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerResponse
6310where
6311    ___E: ::fidl_next::Encoder + ?Sized,
6312    IntrospectorGetMonikerResponse: ::fidl_next::Encode<___E>,
6313{
6314    #[inline]
6315    fn encode_option(
6316        this: Option<Self>,
6317        encoder: &mut ___E,
6318        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6319    ) -> Result<(), ::fidl_next::EncodeError> {
6320        if let Some(inner) = this {
6321            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6322            ::fidl_next::WireBox::encode_present(out);
6323        } else {
6324            ::fidl_next::WireBox::encode_absent(out);
6325        }
6326
6327        Ok(())
6328    }
6329}
6330
6331unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for IntrospectorGetMonikerResponse
6332where
6333    ___E: ::fidl_next::Encoder + ?Sized,
6334    IntrospectorGetMonikerResponse: ::fidl_next::EncodeRef<___E>,
6335{
6336    #[inline]
6337    fn encode_option_ref(
6338        this: Option<&Self>,
6339        encoder: &mut ___E,
6340        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6341    ) -> Result<(), ::fidl_next::EncodeError> {
6342        if let Some(inner) = this {
6343            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6344            ::fidl_next::WireBox::encode_present(out);
6345        } else {
6346            ::fidl_next::WireBox::encode_absent(out);
6347        }
6348
6349        Ok(())
6350    }
6351}
6352
6353impl<'de> ::fidl_next::FromWire<WireIntrospectorGetMonikerResponse<'de>>
6354    for IntrospectorGetMonikerResponse
6355{
6356    #[inline]
6357    fn from_wire(wire: WireIntrospectorGetMonikerResponse<'de>) -> Self {
6358        Self { moniker: ::fidl_next::FromWire::from_wire(wire.moniker) }
6359    }
6360}
6361
6362impl<'de> ::fidl_next::FromWireRef<WireIntrospectorGetMonikerResponse<'de>>
6363    for IntrospectorGetMonikerResponse
6364{
6365    #[inline]
6366    fn from_wire_ref(wire: &WireIntrospectorGetMonikerResponse<'de>) -> Self {
6367        Self { moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.moniker) }
6368    }
6369}
6370
6371/// The wire type corresponding to [`IntrospectorGetMonikerResponse`].
6372#[derive(Debug)]
6373#[repr(C)]
6374pub struct WireIntrospectorGetMonikerResponse<'de> {
6375    pub moniker: ::fidl_next::WireString<'de>,
6376}
6377
6378unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerResponse<'static> {
6379    type Decoded<'de> = WireIntrospectorGetMonikerResponse<'de>;
6380
6381    #[inline]
6382    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6383}
6384
6385unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerResponse<'static>
6386where
6387    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6388    ___D: ::fidl_next::Decoder,
6389{
6390    fn decode(
6391        slot: ::fidl_next::Slot<'_, Self>,
6392        decoder: &mut ___D,
6393    ) -> Result<(), ::fidl_next::DecodeError> {
6394        ::fidl_next::munge! {
6395            let Self {
6396                mut moniker,
6397
6398            } = slot;
6399        }
6400
6401        ::fidl_next::Decode::decode(moniker.as_mut(), decoder)?;
6402
6403        let moniker = unsafe { moniker.deref_unchecked() };
6404
6405        if moniker.len() > 4096 {
6406            return Err(::fidl_next::DecodeError::VectorTooLong {
6407                size: moniker.len() as u64,
6408                limit: 4096,
6409            });
6410        }
6411
6412        Ok(())
6413    }
6414}
6415
6416/// The type corresponding to the Introspector protocol.
6417#[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"]
6418#[derive(Debug)]
6419pub struct Introspector;
6420
6421impl ::fidl_next::Discoverable for Introspector {
6422    const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
6423}
6424
6425pub mod introspector {
6426    pub mod prelude {
6427        pub use crate::{
6428            Introspector, IntrospectorClientHandler, IntrospectorServerHandler, introspector,
6429        };
6430
6431        pub use crate::Error;
6432
6433        pub use crate::IntrospectorGetMonikerRequest;
6434
6435        pub use crate::IntrospectorGetMonikerResponse;
6436    }
6437
6438    pub struct GetMoniker;
6439
6440    impl ::fidl_next::Method for GetMoniker {
6441        const ORDINAL: u64 = 214344082539672664;
6442
6443        type Protocol = crate::Introspector;
6444
6445        type Request = crate::WireIntrospectorGetMonikerRequest;
6446
6447        type Response = ::fidl_next::WireFlexibleResult<
6448            'static,
6449            crate::WireIntrospectorGetMonikerResponse<'static>,
6450            crate::WireError,
6451        >;
6452    }
6453
6454    mod ___detail {
6455
6456        pub struct GetMoniker<T0> {
6457            component_instance: T0,
6458        }
6459
6460        impl<T0> ::fidl_next::Encodable for GetMoniker<T0>
6461        where
6462            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireEvent>,
6463        {
6464            type Encoded = crate::WireIntrospectorGetMonikerRequest;
6465        }
6466
6467        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetMoniker<T0>
6468        where
6469            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6470            ___E: ::fidl_next::fuchsia::HandleEncoder,
6471            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireEvent>,
6472        {
6473            #[inline]
6474            fn encode(
6475                self,
6476                encoder: &mut ___E,
6477                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6478            ) -> Result<(), ::fidl_next::EncodeError> {
6479                ::fidl_next::munge! {
6480                    let Self::Encoded {
6481                        component_instance,
6482
6483                    } = out;
6484                }
6485
6486                ::fidl_next::Encode::encode(self.component_instance, encoder, component_instance)?;
6487
6488                Ok(())
6489            }
6490        }
6491
6492        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Introspector
6493        where
6494            ___T: ::fidl_next::Transport,
6495        {
6496            type ClientSender = IntrospectorClientSender<___T>;
6497            type ServerSender = IntrospectorServerSender<___T>;
6498        }
6499
6500        /// The client sender for the `Introspector` protocol.
6501        #[repr(transparent)]
6502        pub struct IntrospectorClientSender<___T: ::fidl_next::Transport> {
6503            #[allow(dead_code)]
6504            sender: ::fidl_next::protocol::ClientSender<___T>,
6505        }
6506
6507        impl<___T> IntrospectorClientSender<___T>
6508        where
6509            ___T: ::fidl_next::Transport,
6510        {
6511            #[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"]
6512            pub fn get_moniker(
6513                &self,
6514
6515                component_instance: impl ::fidl_next::Encode<
6516                    <___T as ::fidl_next::Transport>::SendBuffer,
6517                    Encoded = ::fidl_next::fuchsia::WireEvent,
6518                >,
6519            ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
6520            where
6521                <___T as ::fidl_next::Transport>::SendBuffer:
6522                    ::fidl_next::encoder::InternalHandleEncoder,
6523                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6524            {
6525                self.get_moniker_with(GetMoniker { component_instance })
6526            }
6527
6528            #[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"]
6529            pub fn get_moniker_with<___R>(
6530                &self,
6531                request: ___R,
6532            ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
6533            where
6534                ___R: ::fidl_next::Encode<
6535                        <___T as ::fidl_next::Transport>::SendBuffer,
6536                        Encoded = crate::WireIntrospectorGetMonikerRequest,
6537                    >,
6538            {
6539                ::fidl_next::TwoWayFuture::from_untyped(
6540                    self.sender.send_two_way(214344082539672664, request),
6541                )
6542            }
6543        }
6544
6545        /// The server sender for the `Introspector` protocol.
6546        #[repr(transparent)]
6547        pub struct IntrospectorServerSender<___T: ::fidl_next::Transport> {
6548            sender: ::fidl_next::protocol::ServerSender<___T>,
6549        }
6550
6551        impl<___T> IntrospectorServerSender<___T> where ___T: ::fidl_next::Transport {}
6552    }
6553}
6554
6555/// A client handler for the Introspector protocol.
6556///
6557/// See [`Introspector`] for more details.
6558pub trait IntrospectorClientHandler<
6559    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6560    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6561>
6562{
6563    fn on_unknown_interaction(
6564        &mut self,
6565        sender: &::fidl_next::ClientSender<Introspector, ___T>,
6566        ordinal: u64,
6567    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6568        sender.close();
6569        ::core::future::ready(())
6570    }
6571}
6572
6573impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Introspector
6574where
6575    ___H: IntrospectorClientHandler<___T> + ::core::marker::Send,
6576    ___T: ::fidl_next::Transport,
6577    <introspector::GetMoniker as ::fidl_next::Method>::Response:
6578        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6579{
6580    async fn on_event(
6581        handler: &mut ___H,
6582        sender: &::fidl_next::ClientSender<Self, ___T>,
6583        ordinal: u64,
6584        buffer: ___T::RecvBuffer,
6585    ) {
6586        match ordinal {
6587            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6588        }
6589    }
6590}
6591
6592/// A server handler for the Introspector protocol.
6593///
6594/// See [`Introspector`] for more details.
6595pub trait IntrospectorServerHandler<
6596    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6597    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6598>
6599{
6600    #[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"]
6601    fn get_moniker(
6602        &mut self,
6603        sender: &::fidl_next::ServerSender<Introspector, ___T>,
6604
6605        request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
6606
6607        responder: ::fidl_next::Responder<introspector::GetMoniker>,
6608    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6609
6610    fn on_unknown_interaction(
6611        &mut self,
6612        sender: &::fidl_next::ServerSender<Introspector, ___T>,
6613        ordinal: u64,
6614    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
6615        sender.close();
6616        ::core::future::ready(())
6617    }
6618}
6619
6620impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Introspector
6621where
6622    ___H: IntrospectorServerHandler<___T> + ::core::marker::Send,
6623    ___T: ::fidl_next::Transport,
6624    <introspector::GetMoniker as ::fidl_next::Method>::Request:
6625        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6626{
6627    async fn on_one_way(
6628        handler: &mut ___H,
6629        sender: &::fidl_next::ServerSender<Self, ___T>,
6630        ordinal: u64,
6631        buffer: ___T::RecvBuffer,
6632    ) {
6633        match ordinal {
6634            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6635        }
6636    }
6637
6638    async fn on_two_way(
6639        handler: &mut ___H,
6640        sender: &::fidl_next::ServerSender<Self, ___T>,
6641        ordinal: u64,
6642        buffer: ___T::RecvBuffer,
6643        responder: ::fidl_next::protocol::Responder,
6644    ) {
6645        match ordinal {
6646            214344082539672664 => {
6647                let responder = ::fidl_next::Responder::from_untyped(responder);
6648
6649                match ::fidl_next::DecoderExt::decode(buffer) {
6650                    Ok(decoded) => handler.get_moniker(sender, decoded, responder).await,
6651                    Err(e) => sender.close(),
6652                }
6653            }
6654
6655            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
6656        }
6657    }
6658}
6659
6660#[doc = " The maximum string length of a capability ID.\n This value is currently set arbitrarily.\n"]
6661pub const MAX_CAPABILITY_ID_LENGTH: u64 = 50;
6662
6663pub const MAX_CHILD_NAME_LENGTH: u32 = 1024;
6664
6665#[doc = " The maximum string length of an error description.\n"]
6666pub const MAX_ERROR_DESCRIPTION_LENGTH: u64 = 100;
6667
6668#[doc = " The maximum number of events that a receiver can listen to.\n"]
6669pub const MAX_NUM_EVENTS_RECEIVED: u64 = 100;
6670
6671#[doc = " The maximum length of a storage instance ID.\n A storage instance ID is a 256-bit UUID, which when encoded\n in hex notation is 64 characters long.\n"]
6672pub const MAX_STORAGE_ID_LENGTH: u32 = 64;
6673
6674#[doc = " The maximum number of requests per event subscription.\n"]
6675pub const MAX_SUBSCRIPTION_REQUESTS: u32 = 2;
6676
6677pub const MAX_URL_SCHEME_LENGTH: u64 = 255;
6678
6679#[derive(Debug)]
6680pub struct NamespaceInputEntry {
6681    pub path: String,
6682
6683    pub dictionary: ::fidl_next::ClientEnd<
6684        ::fidl_next_fuchsia_component_sandbox::Dictionary,
6685        ::fidl_next::fuchsia::zx::Channel,
6686    >,
6687}
6688
6689impl ::fidl_next::Encodable for NamespaceInputEntry {
6690    type Encoded = WireNamespaceInputEntry<'static>;
6691}
6692
6693unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceInputEntry
6694where
6695    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6696    ___E: ::fidl_next::Encoder,
6697    ___E: ::fidl_next::fuchsia::HandleEncoder,
6698{
6699    #[inline]
6700    fn encode(
6701        self,
6702        encoder: &mut ___E,
6703        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6704    ) -> Result<(), ::fidl_next::EncodeError> {
6705        ::fidl_next::munge! {
6706            let Self::Encoded {
6707                path,
6708                dictionary,
6709
6710            } = out;
6711        }
6712
6713        ::fidl_next::Encode::encode(self.path, encoder, path)?;
6714
6715        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
6716
6717        Ok(())
6718    }
6719}
6720
6721impl ::fidl_next::EncodableOption for NamespaceInputEntry {
6722    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceInputEntry<'static>>;
6723}
6724
6725unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceInputEntry
6726where
6727    ___E: ::fidl_next::Encoder + ?Sized,
6728    NamespaceInputEntry: ::fidl_next::Encode<___E>,
6729{
6730    #[inline]
6731    fn encode_option(
6732        this: Option<Self>,
6733        encoder: &mut ___E,
6734        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6735    ) -> Result<(), ::fidl_next::EncodeError> {
6736        if let Some(inner) = this {
6737            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6738            ::fidl_next::WireBox::encode_present(out);
6739        } else {
6740            ::fidl_next::WireBox::encode_absent(out);
6741        }
6742
6743        Ok(())
6744    }
6745}
6746
6747impl<'de> ::fidl_next::FromWire<WireNamespaceInputEntry<'de>> for NamespaceInputEntry {
6748    #[inline]
6749    fn from_wire(wire: WireNamespaceInputEntry<'de>) -> Self {
6750        Self {
6751            path: ::fidl_next::FromWire::from_wire(wire.path),
6752
6753            dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary),
6754        }
6755    }
6756}
6757
6758/// The wire type corresponding to [`NamespaceInputEntry`].
6759#[derive(Debug)]
6760#[repr(C)]
6761pub struct WireNamespaceInputEntry<'de> {
6762    pub path: ::fidl_next::WireString<'de>,
6763
6764    pub dictionary: ::fidl_next::ClientEnd<
6765        ::fidl_next_fuchsia_component_sandbox::Dictionary,
6766        ::fidl_next::fuchsia::WireChannel,
6767    >,
6768}
6769
6770unsafe impl ::fidl_next::Wire for WireNamespaceInputEntry<'static> {
6771    type Decoded<'de> = WireNamespaceInputEntry<'de>;
6772
6773    #[inline]
6774    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6775        unsafe {
6776            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
6777        }
6778    }
6779}
6780
6781unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceInputEntry<'static>
6782where
6783    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6784    ___D: ::fidl_next::Decoder,
6785    ___D: ::fidl_next::fuchsia::HandleDecoder,
6786{
6787    fn decode(
6788        slot: ::fidl_next::Slot<'_, Self>,
6789        decoder: &mut ___D,
6790    ) -> Result<(), ::fidl_next::DecodeError> {
6791        ::fidl_next::munge! {
6792            let Self {
6793                mut path,
6794                mut dictionary,
6795
6796            } = slot;
6797        }
6798
6799        ::fidl_next::Decode::decode(path.as_mut(), decoder)?;
6800
6801        let path = unsafe { path.deref_unchecked() };
6802
6803        if path.len() > 4095 {
6804            return Err(::fidl_next::DecodeError::VectorTooLong {
6805                size: path.len() as u64,
6806                limit: 4095,
6807            });
6808        }
6809
6810        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
6811
6812        Ok(())
6813    }
6814}
6815
6816#[derive(Debug)]
6817pub struct NamespaceCreateRequest {
6818    pub entries: Vec<crate::NamespaceInputEntry>,
6819}
6820
6821impl ::fidl_next::Encodable for NamespaceCreateRequest {
6822    type Encoded = WireNamespaceCreateRequest<'static>;
6823}
6824
6825unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateRequest
6826where
6827    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6828    ___E: ::fidl_next::Encoder,
6829    ___E: ::fidl_next::fuchsia::HandleEncoder,
6830{
6831    #[inline]
6832    fn encode(
6833        self,
6834        encoder: &mut ___E,
6835        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6836    ) -> Result<(), ::fidl_next::EncodeError> {
6837        ::fidl_next::munge! {
6838            let Self::Encoded {
6839                entries,
6840
6841            } = out;
6842        }
6843
6844        ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
6845
6846        Ok(())
6847    }
6848}
6849
6850impl ::fidl_next::EncodableOption for NamespaceCreateRequest {
6851    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateRequest<'static>>;
6852}
6853
6854unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateRequest
6855where
6856    ___E: ::fidl_next::Encoder + ?Sized,
6857    NamespaceCreateRequest: ::fidl_next::Encode<___E>,
6858{
6859    #[inline]
6860    fn encode_option(
6861        this: Option<Self>,
6862        encoder: &mut ___E,
6863        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6864    ) -> Result<(), ::fidl_next::EncodeError> {
6865        if let Some(inner) = this {
6866            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6867            ::fidl_next::WireBox::encode_present(out);
6868        } else {
6869            ::fidl_next::WireBox::encode_absent(out);
6870        }
6871
6872        Ok(())
6873    }
6874}
6875
6876impl<'de> ::fidl_next::FromWire<WireNamespaceCreateRequest<'de>> for NamespaceCreateRequest {
6877    #[inline]
6878    fn from_wire(wire: WireNamespaceCreateRequest<'de>) -> Self {
6879        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
6880    }
6881}
6882
6883/// The wire type corresponding to [`NamespaceCreateRequest`].
6884#[derive(Debug)]
6885#[repr(C)]
6886pub struct WireNamespaceCreateRequest<'de> {
6887    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceInputEntry<'de>>,
6888}
6889
6890unsafe impl ::fidl_next::Wire for WireNamespaceCreateRequest<'static> {
6891    type Decoded<'de> = WireNamespaceCreateRequest<'de>;
6892
6893    #[inline]
6894    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6895}
6896
6897unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateRequest<'static>
6898where
6899    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6900    ___D: ::fidl_next::Decoder,
6901    ___D: ::fidl_next::fuchsia::HandleDecoder,
6902{
6903    fn decode(
6904        slot: ::fidl_next::Slot<'_, Self>,
6905        decoder: &mut ___D,
6906    ) -> Result<(), ::fidl_next::DecodeError> {
6907        ::fidl_next::munge! {
6908            let Self {
6909                mut entries,
6910
6911            } = slot;
6912        }
6913
6914        ::fidl_next::Decode::decode(entries.as_mut(), decoder)?;
6915
6916        Ok(())
6917    }
6918}
6919
6920#[doc = " Error returned from methods in [`Namespace`].\n"]
6921#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6922#[repr(u32)]
6923pub enum NamespaceError {
6924    Shadow = 1,
6925    Duplicate = 2,
6926    Conversion = 3,
6927    BadEntry = 4,
6928    DictionaryRead = 5,
6929    UnknownOrdinal_(u32),
6930}
6931
6932impl ::fidl_next::Encodable for NamespaceError {
6933    type Encoded = WireNamespaceError;
6934}
6935impl ::std::convert::From<u32> for NamespaceError {
6936    fn from(value: u32) -> Self {
6937        match value {
6938            1 => Self::Shadow,
6939            2 => Self::Duplicate,
6940            3 => Self::Conversion,
6941            4 => Self::BadEntry,
6942            5 => Self::DictionaryRead,
6943
6944            _ => Self::UnknownOrdinal_(value),
6945        }
6946    }
6947}
6948
6949unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceError
6950where
6951    ___E: ?Sized,
6952{
6953    #[inline]
6954    fn encode(
6955        self,
6956        encoder: &mut ___E,
6957        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6958    ) -> Result<(), ::fidl_next::EncodeError> {
6959        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
6960    }
6961}
6962
6963unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NamespaceError
6964where
6965    ___E: ?Sized,
6966{
6967    #[inline]
6968    fn encode_ref(
6969        &self,
6970        encoder: &mut ___E,
6971        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6972    ) -> Result<(), ::fidl_next::EncodeError> {
6973        ::fidl_next::munge!(let WireNamespaceError { value } = out);
6974        let _ = value.write(::fidl_next::WireU32::from(match *self {
6975            Self::Shadow => 1,
6976
6977            Self::Duplicate => 2,
6978
6979            Self::Conversion => 3,
6980
6981            Self::BadEntry => 4,
6982
6983            Self::DictionaryRead => 5,
6984
6985            Self::UnknownOrdinal_(value) => value,
6986        }));
6987
6988        Ok(())
6989    }
6990}
6991
6992impl ::core::convert::From<WireNamespaceError> for NamespaceError {
6993    fn from(wire: WireNamespaceError) -> Self {
6994        match u32::from(wire.value) {
6995            1 => Self::Shadow,
6996
6997            2 => Self::Duplicate,
6998
6999            3 => Self::Conversion,
7000
7001            4 => Self::BadEntry,
7002
7003            5 => Self::DictionaryRead,
7004
7005            value => Self::UnknownOrdinal_(value),
7006        }
7007    }
7008}
7009
7010impl ::fidl_next::FromWire<WireNamespaceError> for NamespaceError {
7011    #[inline]
7012    fn from_wire(wire: WireNamespaceError) -> Self {
7013        Self::from(wire)
7014    }
7015}
7016
7017impl ::fidl_next::FromWireRef<WireNamespaceError> for NamespaceError {
7018    #[inline]
7019    fn from_wire_ref(wire: &WireNamespaceError) -> Self {
7020        Self::from(*wire)
7021    }
7022}
7023
7024/// The wire type corresponding to [`NamespaceError`].
7025#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7026#[repr(transparent)]
7027pub struct WireNamespaceError {
7028    value: ::fidl_next::WireU32,
7029}
7030
7031unsafe impl ::fidl_next::Wire for WireNamespaceError {
7032    type Decoded<'de> = Self;
7033
7034    #[inline]
7035    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7036        // Wire enums have no padding
7037    }
7038}
7039
7040impl WireNamespaceError {
7041    pub const SHADOW: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(1) };
7042
7043    pub const DUPLICATE: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(2) };
7044
7045    pub const CONVERSION: WireNamespaceError =
7046        WireNamespaceError { value: ::fidl_next::WireU32(3) };
7047
7048    pub const BAD_ENTRY: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(4) };
7049
7050    pub const DICTIONARY_READ: WireNamespaceError =
7051        WireNamespaceError { value: ::fidl_next::WireU32(5) };
7052}
7053
7054unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceError
7055where
7056    ___D: ?Sized,
7057{
7058    fn decode(
7059        slot: ::fidl_next::Slot<'_, Self>,
7060        _: &mut ___D,
7061    ) -> Result<(), ::fidl_next::DecodeError> {
7062        Ok(())
7063    }
7064}
7065
7066impl ::core::convert::From<NamespaceError> for WireNamespaceError {
7067    fn from(natural: NamespaceError) -> Self {
7068        match natural {
7069            NamespaceError::Shadow => WireNamespaceError::SHADOW,
7070
7071            NamespaceError::Duplicate => WireNamespaceError::DUPLICATE,
7072
7073            NamespaceError::Conversion => WireNamespaceError::CONVERSION,
7074
7075            NamespaceError::BadEntry => WireNamespaceError::BAD_ENTRY,
7076
7077            NamespaceError::DictionaryRead => WireNamespaceError::DICTIONARY_READ,
7078
7079            NamespaceError::UnknownOrdinal_(value) => {
7080                WireNamespaceError { value: ::fidl_next::WireU32::from(value) }
7081            }
7082        }
7083    }
7084}
7085
7086#[derive(Debug)]
7087pub struct NamespaceCreateResponse {
7088    pub entries: Vec<crate::NamespaceEntry>,
7089}
7090
7091impl ::fidl_next::Encodable for NamespaceCreateResponse {
7092    type Encoded = WireNamespaceCreateResponse<'static>;
7093}
7094
7095unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateResponse
7096where
7097    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7098    ___E: ::fidl_next::Encoder,
7099    ___E: ::fidl_next::fuchsia::HandleEncoder,
7100{
7101    #[inline]
7102    fn encode(
7103        self,
7104        encoder: &mut ___E,
7105        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7106    ) -> Result<(), ::fidl_next::EncodeError> {
7107        ::fidl_next::munge! {
7108            let Self::Encoded {
7109                entries,
7110
7111            } = out;
7112        }
7113
7114        ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
7115
7116        Ok(())
7117    }
7118}
7119
7120impl ::fidl_next::EncodableOption for NamespaceCreateResponse {
7121    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateResponse<'static>>;
7122}
7123
7124unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateResponse
7125where
7126    ___E: ::fidl_next::Encoder + ?Sized,
7127    NamespaceCreateResponse: ::fidl_next::Encode<___E>,
7128{
7129    #[inline]
7130    fn encode_option(
7131        this: Option<Self>,
7132        encoder: &mut ___E,
7133        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7134    ) -> Result<(), ::fidl_next::EncodeError> {
7135        if let Some(inner) = this {
7136            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7137            ::fidl_next::WireBox::encode_present(out);
7138        } else {
7139            ::fidl_next::WireBox::encode_absent(out);
7140        }
7141
7142        Ok(())
7143    }
7144}
7145
7146impl<'de> ::fidl_next::FromWire<WireNamespaceCreateResponse<'de>> for NamespaceCreateResponse {
7147    #[inline]
7148    fn from_wire(wire: WireNamespaceCreateResponse<'de>) -> Self {
7149        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
7150    }
7151}
7152
7153/// The wire type corresponding to [`NamespaceCreateResponse`].
7154#[derive(Debug)]
7155#[repr(C)]
7156pub struct WireNamespaceCreateResponse<'de> {
7157    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>,
7158}
7159
7160unsafe impl ::fidl_next::Wire for WireNamespaceCreateResponse<'static> {
7161    type Decoded<'de> = WireNamespaceCreateResponse<'de>;
7162
7163    #[inline]
7164    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7165}
7166
7167unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateResponse<'static>
7168where
7169    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7170    ___D: ::fidl_next::Decoder,
7171    ___D: ::fidl_next::fuchsia::HandleDecoder,
7172{
7173    fn decode(
7174        slot: ::fidl_next::Slot<'_, Self>,
7175        decoder: &mut ___D,
7176    ) -> Result<(), ::fidl_next::DecodeError> {
7177        ::fidl_next::munge! {
7178            let Self {
7179                mut entries,
7180
7181            } = slot;
7182        }
7183
7184        ::fidl_next::Decode::decode(entries.as_mut(), decoder)?;
7185
7186        Ok(())
7187    }
7188}
7189
7190/// The type corresponding to the Namespace protocol.
7191#[doc = " Protocol for performing namespace operations.\n"]
7192#[derive(Debug)]
7193pub struct Namespace;
7194
7195impl ::fidl_next::Discoverable for Namespace {
7196    const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
7197}
7198
7199pub mod namespace {
7200    pub mod prelude {
7201        pub use crate::{Namespace, NamespaceClientHandler, NamespaceServerHandler, namespace};
7202
7203        pub use crate::NamespaceCreateRequest;
7204
7205        pub use crate::NamespaceError;
7206
7207        pub use crate::NamespaceCreateResponse;
7208    }
7209
7210    pub struct Create;
7211
7212    impl ::fidl_next::Method for Create {
7213        const ORDINAL: u64 = 4839678630846501113;
7214
7215        type Protocol = crate::Namespace;
7216
7217        type Request = crate::WireNamespaceCreateRequest<'static>;
7218
7219        type Response = ::fidl_next::WireFlexibleResult<
7220            'static,
7221            crate::WireNamespaceCreateResponse<'static>,
7222            crate::WireNamespaceError,
7223        >;
7224    }
7225
7226    mod ___detail {
7227
7228        pub struct Create<T0> {
7229            entries: T0,
7230        }
7231
7232        impl<T0> ::fidl_next::Encodable for Create<T0>
7233        where
7234            T0: ::fidl_next::Encodable<
7235                    Encoded = ::fidl_next::WireVector<
7236                        'static,
7237                        crate::WireNamespaceInputEntry<'static>,
7238                    >,
7239                >,
7240        {
7241            type Encoded = crate::WireNamespaceCreateRequest<'static>;
7242        }
7243
7244        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Create<T0>
7245        where
7246            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7247            ___E: ::fidl_next::Encoder,
7248            ___E: ::fidl_next::fuchsia::HandleEncoder,
7249            T0: ::fidl_next::Encode<
7250                    ___E,
7251                    Encoded = ::fidl_next::WireVector<
7252                        'static,
7253                        crate::WireNamespaceInputEntry<'static>,
7254                    >,
7255                >,
7256        {
7257            #[inline]
7258            fn encode(
7259                self,
7260                encoder: &mut ___E,
7261                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7262            ) -> Result<(), ::fidl_next::EncodeError> {
7263                ::fidl_next::munge! {
7264                    let Self::Encoded {
7265                        entries,
7266
7267                    } = out;
7268                }
7269
7270                ::fidl_next::Encode::encode(self.entries, encoder, entries)?;
7271
7272                Ok(())
7273            }
7274        }
7275
7276        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Namespace
7277        where
7278            ___T: ::fidl_next::Transport,
7279        {
7280            type ClientSender = NamespaceClientSender<___T>;
7281            type ServerSender = NamespaceServerSender<___T>;
7282        }
7283
7284        /// The client sender for the `Namespace` protocol.
7285        #[repr(transparent)]
7286        pub struct NamespaceClientSender<___T: ::fidl_next::Transport> {
7287            #[allow(dead_code)]
7288            sender: ::fidl_next::protocol::ClientSender<___T>,
7289        }
7290
7291        impl<___T> NamespaceClientSender<___T>
7292        where
7293            ___T: ::fidl_next::Transport,
7294        {
7295            pub fn create(
7296                &self,
7297
7298                entries: impl ::fidl_next::Encode<
7299                    <___T as ::fidl_next::Transport>::SendBuffer,
7300                    Encoded = ::fidl_next::WireVector<
7301                        'static,
7302                        crate::WireNamespaceInputEntry<'static>,
7303                    >,
7304                >,
7305            ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
7306            where
7307                <___T as ::fidl_next::Transport>::SendBuffer:
7308                    ::fidl_next::encoder::InternalHandleEncoder,
7309                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7310                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7311            {
7312                self.create_with(Create { entries })
7313            }
7314
7315            pub fn create_with<___R>(
7316                &self,
7317                request: ___R,
7318            ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
7319            where
7320                ___R: ::fidl_next::Encode<
7321                        <___T as ::fidl_next::Transport>::SendBuffer,
7322                        Encoded = crate::WireNamespaceCreateRequest<'static>,
7323                    >,
7324            {
7325                ::fidl_next::TwoWayFuture::from_untyped(
7326                    self.sender.send_two_way(4839678630846501113, request),
7327                )
7328            }
7329        }
7330
7331        /// The server sender for the `Namespace` protocol.
7332        #[repr(transparent)]
7333        pub struct NamespaceServerSender<___T: ::fidl_next::Transport> {
7334            sender: ::fidl_next::protocol::ServerSender<___T>,
7335        }
7336
7337        impl<___T> NamespaceServerSender<___T> where ___T: ::fidl_next::Transport {}
7338    }
7339}
7340
7341/// A client handler for the Namespace protocol.
7342///
7343/// See [`Namespace`] for more details.
7344pub trait NamespaceClientHandler<
7345    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7346    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7347>
7348{
7349    fn on_unknown_interaction(
7350        &mut self,
7351        sender: &::fidl_next::ClientSender<Namespace, ___T>,
7352        ordinal: u64,
7353    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7354        sender.close();
7355        ::core::future::ready(())
7356    }
7357}
7358
7359impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Namespace
7360where
7361    ___H: NamespaceClientHandler<___T> + ::core::marker::Send,
7362    ___T: ::fidl_next::Transport,
7363    <namespace::Create as ::fidl_next::Method>::Response:
7364        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7365{
7366    async fn on_event(
7367        handler: &mut ___H,
7368        sender: &::fidl_next::ClientSender<Self, ___T>,
7369        ordinal: u64,
7370        buffer: ___T::RecvBuffer,
7371    ) {
7372        match ordinal {
7373            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7374        }
7375    }
7376}
7377
7378/// A server handler for the Namespace protocol.
7379///
7380/// See [`Namespace`] for more details.
7381pub trait NamespaceServerHandler<
7382    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7383    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7384>
7385{
7386    fn create(
7387        &mut self,
7388        sender: &::fidl_next::ServerSender<Namespace, ___T>,
7389
7390        request: ::fidl_next::Request<namespace::Create, ___T>,
7391
7392        responder: ::fidl_next::Responder<namespace::Create>,
7393    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7394
7395    fn on_unknown_interaction(
7396        &mut self,
7397        sender: &::fidl_next::ServerSender<Namespace, ___T>,
7398        ordinal: u64,
7399    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7400        sender.close();
7401        ::core::future::ready(())
7402    }
7403}
7404
7405impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Namespace
7406where
7407    ___H: NamespaceServerHandler<___T> + ::core::marker::Send,
7408    ___T: ::fidl_next::Transport,
7409    <namespace::Create as ::fidl_next::Method>::Request:
7410        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7411{
7412    async fn on_one_way(
7413        handler: &mut ___H,
7414        sender: &::fidl_next::ServerSender<Self, ___T>,
7415        ordinal: u64,
7416        buffer: ___T::RecvBuffer,
7417    ) {
7418        match ordinal {
7419            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7420        }
7421    }
7422
7423    async fn on_two_way(
7424        handler: &mut ___H,
7425        sender: &::fidl_next::ServerSender<Self, ___T>,
7426        ordinal: u64,
7427        buffer: ___T::RecvBuffer,
7428        responder: ::fidl_next::protocol::Responder,
7429    ) {
7430        match ordinal {
7431            4839678630846501113 => {
7432                let responder = ::fidl_next::Responder::from_untyped(responder);
7433
7434                match ::fidl_next::DecoderExt::decode(buffer) {
7435                    Ok(decoded) => handler.create(sender, decoded, responder).await,
7436                    Err(e) => sender.close(),
7437                }
7438            }
7439
7440            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7441        }
7442    }
7443}
7444
7445pub type RealmOpenExposedDirResponse = ();
7446
7447/// The wire type corresponding to [`RealmOpenExposedDirResponse`].
7448pub type WireRealmOpenExposedDirResponse = ();
7449
7450pub type RealmCreateChildResponse = ();
7451
7452/// The wire type corresponding to [`RealmCreateChildResponse`].
7453pub type WireRealmCreateChildResponse = ();
7454
7455#[derive(Clone, Debug)]
7456pub struct RealmDestroyChildRequest {
7457    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7458}
7459
7460impl ::fidl_next::Encodable for RealmDestroyChildRequest {
7461    type Encoded = WireRealmDestroyChildRequest<'static>;
7462}
7463
7464unsafe impl<___E> ::fidl_next::Encode<___E> for RealmDestroyChildRequest
7465where
7466    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7467    ___E: ::fidl_next::Encoder,
7468{
7469    #[inline]
7470    fn encode(
7471        self,
7472        encoder: &mut ___E,
7473        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7474    ) -> Result<(), ::fidl_next::EncodeError> {
7475        ::fidl_next::munge! {
7476            let Self::Encoded {
7477                child,
7478
7479            } = out;
7480        }
7481
7482        ::fidl_next::Encode::encode(self.child, encoder, child)?;
7483
7484        Ok(())
7485    }
7486}
7487
7488unsafe impl<___E> ::fidl_next::EncodeRef<___E> for RealmDestroyChildRequest
7489where
7490    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7491    ___E: ::fidl_next::Encoder,
7492{
7493    #[inline]
7494    fn encode_ref(
7495        &self,
7496        encoder: &mut ___E,
7497        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7498    ) -> Result<(), ::fidl_next::EncodeError> {
7499        ::fidl_next::munge! {
7500            let Self::Encoded {
7501                child,
7502
7503            } = out;
7504        }
7505
7506        ::fidl_next::EncodeRef::encode_ref(&self.child, encoder, child)?;
7507
7508        Ok(())
7509    }
7510}
7511
7512impl ::fidl_next::EncodableOption for RealmDestroyChildRequest {
7513    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmDestroyChildRequest<'static>>;
7514}
7515
7516unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmDestroyChildRequest
7517where
7518    ___E: ::fidl_next::Encoder + ?Sized,
7519    RealmDestroyChildRequest: ::fidl_next::Encode<___E>,
7520{
7521    #[inline]
7522    fn encode_option(
7523        this: Option<Self>,
7524        encoder: &mut ___E,
7525        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7526    ) -> Result<(), ::fidl_next::EncodeError> {
7527        if let Some(inner) = this {
7528            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7529            ::fidl_next::WireBox::encode_present(out);
7530        } else {
7531            ::fidl_next::WireBox::encode_absent(out);
7532        }
7533
7534        Ok(())
7535    }
7536}
7537
7538unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for RealmDestroyChildRequest
7539where
7540    ___E: ::fidl_next::Encoder + ?Sized,
7541    RealmDestroyChildRequest: ::fidl_next::EncodeRef<___E>,
7542{
7543    #[inline]
7544    fn encode_option_ref(
7545        this: Option<&Self>,
7546        encoder: &mut ___E,
7547        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7548    ) -> Result<(), ::fidl_next::EncodeError> {
7549        if let Some(inner) = this {
7550            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7551            ::fidl_next::WireBox::encode_present(out);
7552        } else {
7553            ::fidl_next::WireBox::encode_absent(out);
7554        }
7555
7556        Ok(())
7557    }
7558}
7559
7560impl<'de> ::fidl_next::FromWire<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
7561    #[inline]
7562    fn from_wire(wire: WireRealmDestroyChildRequest<'de>) -> Self {
7563        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
7564    }
7565}
7566
7567impl<'de> ::fidl_next::FromWireRef<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
7568    #[inline]
7569    fn from_wire_ref(wire: &WireRealmDestroyChildRequest<'de>) -> Self {
7570        Self { child: ::fidl_next::FromWireRef::from_wire_ref(&wire.child) }
7571    }
7572}
7573
7574/// The wire type corresponding to [`RealmDestroyChildRequest`].
7575#[derive(Debug)]
7576#[repr(C)]
7577pub struct WireRealmDestroyChildRequest<'de> {
7578    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
7579}
7580
7581unsafe impl ::fidl_next::Wire for WireRealmDestroyChildRequest<'static> {
7582    type Decoded<'de> = WireRealmDestroyChildRequest<'de>;
7583
7584    #[inline]
7585    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7586}
7587
7588unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmDestroyChildRequest<'static>
7589where
7590    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7591    ___D: ::fidl_next::Decoder,
7592{
7593    fn decode(
7594        slot: ::fidl_next::Slot<'_, Self>,
7595        decoder: &mut ___D,
7596    ) -> Result<(), ::fidl_next::DecodeError> {
7597        ::fidl_next::munge! {
7598            let Self {
7599                mut child,
7600
7601            } = slot;
7602        }
7603
7604        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
7605
7606        Ok(())
7607    }
7608}
7609
7610pub type RealmDestroyChildResponse = ();
7611
7612/// The wire type corresponding to [`RealmDestroyChildResponse`].
7613pub type WireRealmDestroyChildResponse = ();
7614
7615#[derive(Debug)]
7616pub struct RealmListChildrenRequest {
7617    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
7618
7619    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::zx::Channel>,
7620}
7621
7622impl ::fidl_next::Encodable for RealmListChildrenRequest {
7623    type Encoded = WireRealmListChildrenRequest<'static>;
7624}
7625
7626unsafe impl<___E> ::fidl_next::Encode<___E> for RealmListChildrenRequest
7627where
7628    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7629    ___E: ::fidl_next::Encoder,
7630    ___E: ::fidl_next::fuchsia::HandleEncoder,
7631{
7632    #[inline]
7633    fn encode(
7634        self,
7635        encoder: &mut ___E,
7636        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7637    ) -> Result<(), ::fidl_next::EncodeError> {
7638        ::fidl_next::munge! {
7639            let Self::Encoded {
7640                collection,
7641                iter,
7642
7643            } = out;
7644        }
7645
7646        ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
7647
7648        ::fidl_next::Encode::encode(self.iter, encoder, iter)?;
7649
7650        Ok(())
7651    }
7652}
7653
7654impl ::fidl_next::EncodableOption for RealmListChildrenRequest {
7655    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmListChildrenRequest<'static>>;
7656}
7657
7658unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmListChildrenRequest
7659where
7660    ___E: ::fidl_next::Encoder + ?Sized,
7661    RealmListChildrenRequest: ::fidl_next::Encode<___E>,
7662{
7663    #[inline]
7664    fn encode_option(
7665        this: Option<Self>,
7666        encoder: &mut ___E,
7667        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7668    ) -> Result<(), ::fidl_next::EncodeError> {
7669        if let Some(inner) = this {
7670            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7671            ::fidl_next::WireBox::encode_present(out);
7672        } else {
7673            ::fidl_next::WireBox::encode_absent(out);
7674        }
7675
7676        Ok(())
7677    }
7678}
7679
7680impl<'de> ::fidl_next::FromWire<WireRealmListChildrenRequest<'de>> for RealmListChildrenRequest {
7681    #[inline]
7682    fn from_wire(wire: WireRealmListChildrenRequest<'de>) -> Self {
7683        Self {
7684            collection: ::fidl_next::FromWire::from_wire(wire.collection),
7685
7686            iter: ::fidl_next::FromWire::from_wire(wire.iter),
7687        }
7688    }
7689}
7690
7691/// The wire type corresponding to [`RealmListChildrenRequest`].
7692#[derive(Debug)]
7693#[repr(C)]
7694pub struct WireRealmListChildrenRequest<'de> {
7695    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
7696
7697    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
7698}
7699
7700unsafe impl ::fidl_next::Wire for WireRealmListChildrenRequest<'static> {
7701    type Decoded<'de> = WireRealmListChildrenRequest<'de>;
7702
7703    #[inline]
7704    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7705        unsafe {
7706            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
7707        }
7708    }
7709}
7710
7711unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmListChildrenRequest<'static>
7712where
7713    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7714    ___D: ::fidl_next::Decoder,
7715    ___D: ::fidl_next::fuchsia::HandleDecoder,
7716{
7717    fn decode(
7718        slot: ::fidl_next::Slot<'_, Self>,
7719        decoder: &mut ___D,
7720    ) -> Result<(), ::fidl_next::DecodeError> {
7721        ::fidl_next::munge! {
7722            let Self {
7723                mut collection,
7724                mut iter,
7725
7726            } = slot;
7727        }
7728
7729        ::fidl_next::Decode::decode(collection.as_mut(), decoder)?;
7730
7731        ::fidl_next::Decode::decode(iter.as_mut(), decoder)?;
7732
7733        Ok(())
7734    }
7735}
7736
7737pub type RealmListChildrenResponse = ();
7738
7739/// The wire type corresponding to [`RealmListChildrenResponse`].
7740pub type WireRealmListChildrenResponse = ();
7741
7742pub type RealmOpenControllerResponse = ();
7743
7744/// The wire type corresponding to [`RealmOpenControllerResponse`].
7745pub type WireRealmOpenControllerResponse = ();
7746
7747#[derive(Debug)]
7748pub struct RealmGetChildOutputDictionaryRequest {
7749    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7750}
7751
7752impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryRequest {
7753    type Encoded = WireRealmGetChildOutputDictionaryRequest<'static>;
7754}
7755
7756unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryRequest
7757where
7758    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7759    ___E: ::fidl_next::Encoder,
7760    ___E: ::fidl_next::fuchsia::HandleEncoder,
7761{
7762    #[inline]
7763    fn encode(
7764        self,
7765        encoder: &mut ___E,
7766        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7767    ) -> Result<(), ::fidl_next::EncodeError> {
7768        ::fidl_next::munge! {
7769            let Self::Encoded {
7770                child,
7771
7772            } = out;
7773        }
7774
7775        ::fidl_next::Encode::encode(self.child, encoder, child)?;
7776
7777        Ok(())
7778    }
7779}
7780
7781impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryRequest {
7782    type EncodedOption =
7783        ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryRequest<'static>>;
7784}
7785
7786unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryRequest
7787where
7788    ___E: ::fidl_next::Encoder + ?Sized,
7789    RealmGetChildOutputDictionaryRequest: ::fidl_next::Encode<___E>,
7790{
7791    #[inline]
7792    fn encode_option(
7793        this: Option<Self>,
7794        encoder: &mut ___E,
7795        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7796    ) -> Result<(), ::fidl_next::EncodeError> {
7797        if let Some(inner) = this {
7798            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7799            ::fidl_next::WireBox::encode_present(out);
7800        } else {
7801            ::fidl_next::WireBox::encode_absent(out);
7802        }
7803
7804        Ok(())
7805    }
7806}
7807
7808impl<'de> ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryRequest<'de>>
7809    for RealmGetChildOutputDictionaryRequest
7810{
7811    #[inline]
7812    fn from_wire(wire: WireRealmGetChildOutputDictionaryRequest<'de>) -> Self {
7813        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
7814    }
7815}
7816
7817/// The wire type corresponding to [`RealmGetChildOutputDictionaryRequest`].
7818#[derive(Debug)]
7819#[repr(C)]
7820pub struct WireRealmGetChildOutputDictionaryRequest<'de> {
7821    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
7822}
7823
7824unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryRequest<'static> {
7825    type Decoded<'de> = WireRealmGetChildOutputDictionaryRequest<'de>;
7826
7827    #[inline]
7828    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7829}
7830
7831unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryRequest<'static>
7832where
7833    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7834    ___D: ::fidl_next::Decoder,
7835    ___D: ::fidl_next::fuchsia::HandleDecoder,
7836{
7837    fn decode(
7838        slot: ::fidl_next::Slot<'_, Self>,
7839        decoder: &mut ___D,
7840    ) -> Result<(), ::fidl_next::DecodeError> {
7841        ::fidl_next::munge! {
7842            let Self {
7843                mut child,
7844
7845            } = slot;
7846        }
7847
7848        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
7849
7850        Ok(())
7851    }
7852}
7853
7854#[derive(Debug)]
7855#[repr(C)]
7856pub struct RealmGetChildOutputDictionaryResponse {
7857    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
7858}
7859
7860impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryResponse {
7861    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7862        Self,
7863        WireRealmGetChildOutputDictionaryResponse,
7864    > = unsafe {
7865        ::fidl_next::CopyOptimization::enable_if(
7866            true
7867
7868                && <
7869                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
7870                >::COPY_OPTIMIZATION.is_enabled()
7871
7872        )
7873    };
7874
7875    type Encoded = WireRealmGetChildOutputDictionaryResponse;
7876}
7877
7878unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryResponse
7879where
7880    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7881    ___E: ::fidl_next::fuchsia::HandleEncoder,
7882{
7883    #[inline]
7884    fn encode(
7885        self,
7886        encoder: &mut ___E,
7887        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7888    ) -> Result<(), ::fidl_next::EncodeError> {
7889        ::fidl_next::munge! {
7890            let Self::Encoded {
7891                dictionary,
7892
7893            } = out;
7894        }
7895
7896        ::fidl_next::Encode::encode(self.dictionary, encoder, dictionary)?;
7897
7898        Ok(())
7899    }
7900}
7901
7902impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryResponse {
7903    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryResponse>;
7904}
7905
7906unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryResponse
7907where
7908    ___E: ::fidl_next::Encoder + ?Sized,
7909    RealmGetChildOutputDictionaryResponse: ::fidl_next::Encode<___E>,
7910{
7911    #[inline]
7912    fn encode_option(
7913        this: Option<Self>,
7914        encoder: &mut ___E,
7915        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7916    ) -> Result<(), ::fidl_next::EncodeError> {
7917        if let Some(inner) = this {
7918            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7919            ::fidl_next::WireBox::encode_present(out);
7920        } else {
7921            ::fidl_next::WireBox::encode_absent(out);
7922        }
7923
7924        Ok(())
7925    }
7926}
7927
7928impl ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryResponse>
7929    for RealmGetChildOutputDictionaryResponse
7930{
7931    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
7932        WireRealmGetChildOutputDictionaryResponse,
7933        Self,
7934    > = unsafe {
7935        ::fidl_next::CopyOptimization::enable_if(
7936            true
7937
7938                && <
7939                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
7940                >::COPY_OPTIMIZATION.is_enabled()
7941
7942        )
7943    };
7944
7945    #[inline]
7946    fn from_wire(wire: WireRealmGetChildOutputDictionaryResponse) -> Self {
7947        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
7948    }
7949}
7950
7951/// The wire type corresponding to [`RealmGetChildOutputDictionaryResponse`].
7952#[derive(Debug)]
7953#[repr(C)]
7954pub struct WireRealmGetChildOutputDictionaryResponse {
7955    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
7956}
7957
7958unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryResponse {
7959    type Decoded<'de> = WireRealmGetChildOutputDictionaryResponse;
7960
7961    #[inline]
7962    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7963}
7964
7965unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryResponse
7966where
7967    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7968    ___D: ::fidl_next::fuchsia::HandleDecoder,
7969{
7970    fn decode(
7971        slot: ::fidl_next::Slot<'_, Self>,
7972        decoder: &mut ___D,
7973    ) -> Result<(), ::fidl_next::DecodeError> {
7974        ::fidl_next::munge! {
7975            let Self {
7976                mut dictionary,
7977
7978            } = slot;
7979        }
7980
7981        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder)?;
7982
7983        Ok(())
7984    }
7985}
7986
7987#[derive(Debug)]
7988pub struct RealmOpenControllerRequest {
7989    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7990
7991    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
7992}
7993
7994impl ::fidl_next::Encodable for RealmOpenControllerRequest {
7995    type Encoded = WireRealmOpenControllerRequest<'static>;
7996}
7997
7998unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenControllerRequest
7999where
8000    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8001    ___E: ::fidl_next::Encoder,
8002    ___E: ::fidl_next::fuchsia::HandleEncoder,
8003{
8004    #[inline]
8005    fn encode(
8006        self,
8007        encoder: &mut ___E,
8008        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8009    ) -> Result<(), ::fidl_next::EncodeError> {
8010        ::fidl_next::munge! {
8011            let Self::Encoded {
8012                child,
8013                controller,
8014
8015            } = out;
8016        }
8017
8018        ::fidl_next::Encode::encode(self.child, encoder, child)?;
8019
8020        ::fidl_next::Encode::encode(self.controller, encoder, controller)?;
8021
8022        Ok(())
8023    }
8024}
8025
8026impl ::fidl_next::EncodableOption for RealmOpenControllerRequest {
8027    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenControllerRequest<'static>>;
8028}
8029
8030unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenControllerRequest
8031where
8032    ___E: ::fidl_next::Encoder + ?Sized,
8033    RealmOpenControllerRequest: ::fidl_next::Encode<___E>,
8034{
8035    #[inline]
8036    fn encode_option(
8037        this: Option<Self>,
8038        encoder: &mut ___E,
8039        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8040    ) -> Result<(), ::fidl_next::EncodeError> {
8041        if let Some(inner) = this {
8042            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8043            ::fidl_next::WireBox::encode_present(out);
8044        } else {
8045            ::fidl_next::WireBox::encode_absent(out);
8046        }
8047
8048        Ok(())
8049    }
8050}
8051
8052impl<'de> ::fidl_next::FromWire<WireRealmOpenControllerRequest<'de>>
8053    for RealmOpenControllerRequest
8054{
8055    #[inline]
8056    fn from_wire(wire: WireRealmOpenControllerRequest<'de>) -> Self {
8057        Self {
8058            child: ::fidl_next::FromWire::from_wire(wire.child),
8059
8060            controller: ::fidl_next::FromWire::from_wire(wire.controller),
8061        }
8062    }
8063}
8064
8065/// The wire type corresponding to [`RealmOpenControllerRequest`].
8066#[derive(Debug)]
8067#[repr(C)]
8068pub struct WireRealmOpenControllerRequest<'de> {
8069    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8070
8071    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
8072}
8073
8074unsafe impl ::fidl_next::Wire for WireRealmOpenControllerRequest<'static> {
8075    type Decoded<'de> = WireRealmOpenControllerRequest<'de>;
8076
8077    #[inline]
8078    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8079        unsafe {
8080            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8081        }
8082    }
8083}
8084
8085unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenControllerRequest<'static>
8086where
8087    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8088    ___D: ::fidl_next::Decoder,
8089    ___D: ::fidl_next::fuchsia::HandleDecoder,
8090{
8091    fn decode(
8092        slot: ::fidl_next::Slot<'_, Self>,
8093        decoder: &mut ___D,
8094    ) -> Result<(), ::fidl_next::DecodeError> {
8095        ::fidl_next::munge! {
8096            let Self {
8097                mut child,
8098                mut controller,
8099
8100            } = slot;
8101        }
8102
8103        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
8104
8105        ::fidl_next::Decode::decode(controller.as_mut(), decoder)?;
8106
8107        Ok(())
8108    }
8109}
8110
8111#[derive(Debug)]
8112pub struct RealmOpenExposedDirRequest {
8113    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8114
8115    pub exposed_dir: ::fidl_next::ServerEnd<
8116        ::fidl_next_fuchsia_io::Directory,
8117        ::fidl_next::fuchsia::zx::Channel,
8118    >,
8119}
8120
8121impl ::fidl_next::Encodable for RealmOpenExposedDirRequest {
8122    type Encoded = WireRealmOpenExposedDirRequest<'static>;
8123}
8124
8125unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenExposedDirRequest
8126where
8127    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8128    ___E: ::fidl_next::Encoder,
8129    ___E: ::fidl_next::fuchsia::HandleEncoder,
8130{
8131    #[inline]
8132    fn encode(
8133        self,
8134        encoder: &mut ___E,
8135        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8136    ) -> Result<(), ::fidl_next::EncodeError> {
8137        ::fidl_next::munge! {
8138            let Self::Encoded {
8139                child,
8140                exposed_dir,
8141
8142            } = out;
8143        }
8144
8145        ::fidl_next::Encode::encode(self.child, encoder, child)?;
8146
8147        ::fidl_next::Encode::encode(self.exposed_dir, encoder, exposed_dir)?;
8148
8149        Ok(())
8150    }
8151}
8152
8153impl ::fidl_next::EncodableOption for RealmOpenExposedDirRequest {
8154    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenExposedDirRequest<'static>>;
8155}
8156
8157unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenExposedDirRequest
8158where
8159    ___E: ::fidl_next::Encoder + ?Sized,
8160    RealmOpenExposedDirRequest: ::fidl_next::Encode<___E>,
8161{
8162    #[inline]
8163    fn encode_option(
8164        this: Option<Self>,
8165        encoder: &mut ___E,
8166        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8167    ) -> Result<(), ::fidl_next::EncodeError> {
8168        if let Some(inner) = this {
8169            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8170            ::fidl_next::WireBox::encode_present(out);
8171        } else {
8172            ::fidl_next::WireBox::encode_absent(out);
8173        }
8174
8175        Ok(())
8176    }
8177}
8178
8179impl<'de> ::fidl_next::FromWire<WireRealmOpenExposedDirRequest<'de>>
8180    for RealmOpenExposedDirRequest
8181{
8182    #[inline]
8183    fn from_wire(wire: WireRealmOpenExposedDirRequest<'de>) -> Self {
8184        Self {
8185            child: ::fidl_next::FromWire::from_wire(wire.child),
8186
8187            exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir),
8188        }
8189    }
8190}
8191
8192/// The wire type corresponding to [`RealmOpenExposedDirRequest`].
8193#[derive(Debug)]
8194#[repr(C)]
8195pub struct WireRealmOpenExposedDirRequest<'de> {
8196    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8197
8198    pub exposed_dir: ::fidl_next::ServerEnd<
8199        ::fidl_next_fuchsia_io::Directory,
8200        ::fidl_next::fuchsia::WireChannel,
8201    >,
8202}
8203
8204unsafe impl ::fidl_next::Wire for WireRealmOpenExposedDirRequest<'static> {
8205    type Decoded<'de> = WireRealmOpenExposedDirRequest<'de>;
8206
8207    #[inline]
8208    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8209        unsafe {
8210            out.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8211        }
8212    }
8213}
8214
8215unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenExposedDirRequest<'static>
8216where
8217    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8218    ___D: ::fidl_next::Decoder,
8219    ___D: ::fidl_next::fuchsia::HandleDecoder,
8220{
8221    fn decode(
8222        slot: ::fidl_next::Slot<'_, Self>,
8223        decoder: &mut ___D,
8224    ) -> Result<(), ::fidl_next::DecodeError> {
8225        ::fidl_next::munge! {
8226            let Self {
8227                mut child,
8228                mut exposed_dir,
8229
8230            } = slot;
8231        }
8232
8233        ::fidl_next::Decode::decode(child.as_mut(), decoder)?;
8234
8235        ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder)?;
8236
8237        Ok(())
8238    }
8239}
8240
8241#[derive(Debug)]
8242pub struct RealmCreateChildRequest {
8243    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
8244
8245    pub decl: ::fidl_next_fuchsia_component_decl::Child,
8246
8247    pub args: crate::CreateChildArgs,
8248}
8249
8250impl ::fidl_next::Encodable for RealmCreateChildRequest {
8251    type Encoded = WireRealmCreateChildRequest<'static>;
8252}
8253
8254unsafe impl<___E> ::fidl_next::Encode<___E> for RealmCreateChildRequest
8255where
8256    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8257    ___E: ::fidl_next::Encoder,
8258    ___E: ::fidl_next::fuchsia::HandleEncoder,
8259{
8260    #[inline]
8261    fn encode(
8262        self,
8263        encoder: &mut ___E,
8264        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8265    ) -> Result<(), ::fidl_next::EncodeError> {
8266        ::fidl_next::munge! {
8267            let Self::Encoded {
8268                collection,
8269                decl,
8270                args,
8271
8272            } = out;
8273        }
8274
8275        ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
8276
8277        ::fidl_next::Encode::encode(self.decl, encoder, decl)?;
8278
8279        ::fidl_next::Encode::encode(self.args, encoder, args)?;
8280
8281        Ok(())
8282    }
8283}
8284
8285impl ::fidl_next::EncodableOption for RealmCreateChildRequest {
8286    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmCreateChildRequest<'static>>;
8287}
8288
8289unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmCreateChildRequest
8290where
8291    ___E: ::fidl_next::Encoder + ?Sized,
8292    RealmCreateChildRequest: ::fidl_next::Encode<___E>,
8293{
8294    #[inline]
8295    fn encode_option(
8296        this: Option<Self>,
8297        encoder: &mut ___E,
8298        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8299    ) -> Result<(), ::fidl_next::EncodeError> {
8300        if let Some(inner) = this {
8301            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8302            ::fidl_next::WireBox::encode_present(out);
8303        } else {
8304            ::fidl_next::WireBox::encode_absent(out);
8305        }
8306
8307        Ok(())
8308    }
8309}
8310
8311impl<'de> ::fidl_next::FromWire<WireRealmCreateChildRequest<'de>> for RealmCreateChildRequest {
8312    #[inline]
8313    fn from_wire(wire: WireRealmCreateChildRequest<'de>) -> Self {
8314        Self {
8315            collection: ::fidl_next::FromWire::from_wire(wire.collection),
8316
8317            decl: ::fidl_next::FromWire::from_wire(wire.decl),
8318
8319            args: ::fidl_next::FromWire::from_wire(wire.args),
8320        }
8321    }
8322}
8323
8324/// The wire type corresponding to [`RealmCreateChildRequest`].
8325#[derive(Debug)]
8326#[repr(C)]
8327pub struct WireRealmCreateChildRequest<'de> {
8328    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
8329
8330    pub decl: ::fidl_next_fuchsia_component_decl::WireChild<'de>,
8331
8332    pub args: crate::WireCreateChildArgs<'de>,
8333}
8334
8335unsafe impl ::fidl_next::Wire for WireRealmCreateChildRequest<'static> {
8336    type Decoded<'de> = WireRealmCreateChildRequest<'de>;
8337
8338    #[inline]
8339    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8340}
8341
8342unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmCreateChildRequest<'static>
8343where
8344    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8345    ___D: ::fidl_next::Decoder,
8346    ___D: ::fidl_next::fuchsia::HandleDecoder,
8347{
8348    fn decode(
8349        slot: ::fidl_next::Slot<'_, Self>,
8350        decoder: &mut ___D,
8351    ) -> Result<(), ::fidl_next::DecodeError> {
8352        ::fidl_next::munge! {
8353            let Self {
8354                mut collection,
8355                mut decl,
8356                mut args,
8357
8358            } = slot;
8359        }
8360
8361        ::fidl_next::Decode::decode(collection.as_mut(), decoder)?;
8362
8363        ::fidl_next::Decode::decode(decl.as_mut(), decoder)?;
8364
8365        ::fidl_next::Decode::decode(args.as_mut(), decoder)?;
8366
8367        Ok(())
8368    }
8369}
8370
8371#[derive(Debug)]
8372pub struct RealmGetResolvedInfoResponse {
8373    pub resolved_info: ::fidl_next_fuchsia_component_resolution::Component,
8374}
8375
8376impl ::fidl_next::Encodable for RealmGetResolvedInfoResponse {
8377    type Encoded = WireRealmGetResolvedInfoResponse<'static>;
8378}
8379
8380unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetResolvedInfoResponse
8381where
8382    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8383    ___E: ::fidl_next::Encoder,
8384    ___E: ::fidl_next::fuchsia::HandleEncoder,
8385{
8386    #[inline]
8387    fn encode(
8388        self,
8389        encoder: &mut ___E,
8390        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8391    ) -> Result<(), ::fidl_next::EncodeError> {
8392        ::fidl_next::munge! {
8393            let Self::Encoded {
8394                resolved_info,
8395
8396            } = out;
8397        }
8398
8399        ::fidl_next::Encode::encode(self.resolved_info, encoder, resolved_info)?;
8400
8401        Ok(())
8402    }
8403}
8404
8405impl ::fidl_next::EncodableOption for RealmGetResolvedInfoResponse {
8406    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetResolvedInfoResponse<'static>>;
8407}
8408
8409unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetResolvedInfoResponse
8410where
8411    ___E: ::fidl_next::Encoder + ?Sized,
8412    RealmGetResolvedInfoResponse: ::fidl_next::Encode<___E>,
8413{
8414    #[inline]
8415    fn encode_option(
8416        this: Option<Self>,
8417        encoder: &mut ___E,
8418        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8419    ) -> Result<(), ::fidl_next::EncodeError> {
8420        if let Some(inner) = this {
8421            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8422            ::fidl_next::WireBox::encode_present(out);
8423        } else {
8424            ::fidl_next::WireBox::encode_absent(out);
8425        }
8426
8427        Ok(())
8428    }
8429}
8430
8431impl<'de> ::fidl_next::FromWire<WireRealmGetResolvedInfoResponse<'de>>
8432    for RealmGetResolvedInfoResponse
8433{
8434    #[inline]
8435    fn from_wire(wire: WireRealmGetResolvedInfoResponse<'de>) -> Self {
8436        Self { resolved_info: ::fidl_next::FromWire::from_wire(wire.resolved_info) }
8437    }
8438}
8439
8440/// The wire type corresponding to [`RealmGetResolvedInfoResponse`].
8441#[derive(Debug)]
8442#[repr(C)]
8443pub struct WireRealmGetResolvedInfoResponse<'de> {
8444    pub resolved_info: ::fidl_next_fuchsia_component_resolution::WireComponent<'de>,
8445}
8446
8447unsafe impl ::fidl_next::Wire for WireRealmGetResolvedInfoResponse<'static> {
8448    type Decoded<'de> = WireRealmGetResolvedInfoResponse<'de>;
8449
8450    #[inline]
8451    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8452}
8453
8454unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetResolvedInfoResponse<'static>
8455where
8456    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8457    ___D: ::fidl_next::Decoder,
8458    ___D: ::fidl_next::fuchsia::HandleDecoder,
8459{
8460    fn decode(
8461        slot: ::fidl_next::Slot<'_, Self>,
8462        decoder: &mut ___D,
8463    ) -> Result<(), ::fidl_next::DecodeError> {
8464        ::fidl_next::munge! {
8465            let Self {
8466                mut resolved_info,
8467
8468            } = slot;
8469        }
8470
8471        ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder)?;
8472
8473        Ok(())
8474    }
8475}
8476
8477/// The type corresponding to the Realm protocol.
8478#[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"]
8479#[derive(Debug)]
8480pub struct Realm;
8481
8482impl ::fidl_next::Discoverable for Realm {
8483    const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
8484}
8485
8486pub mod realm {
8487    pub mod prelude {
8488        pub use crate::{Realm, RealmClientHandler, RealmServerHandler, realm};
8489
8490        pub use crate::Error;
8491
8492        pub use crate::RealmCreateChildRequest;
8493
8494        pub use crate::RealmDestroyChildRequest;
8495
8496        pub use crate::RealmGetChildOutputDictionaryRequest;
8497
8498        pub use crate::RealmListChildrenRequest;
8499
8500        pub use crate::RealmOpenControllerRequest;
8501
8502        pub use crate::RealmOpenExposedDirRequest;
8503
8504        pub use crate::RealmCreateChildResponse;
8505
8506        pub use crate::RealmDestroyChildResponse;
8507
8508        pub use crate::RealmGetChildOutputDictionaryResponse;
8509
8510        pub use crate::RealmGetResolvedInfoResponse;
8511
8512        pub use crate::RealmListChildrenResponse;
8513
8514        pub use crate::RealmOpenControllerResponse;
8515
8516        pub use crate::RealmOpenExposedDirResponse;
8517    }
8518
8519    pub struct OpenController;
8520
8521    impl ::fidl_next::Method for OpenController {
8522        const ORDINAL: u64 = 8165227925828473216;
8523
8524        type Protocol = crate::Realm;
8525
8526        type Request = crate::WireRealmOpenControllerRequest<'static>;
8527
8528        type Response = ::fidl_next::WireResult<
8529            'static,
8530            crate::WireRealmOpenControllerResponse,
8531            crate::WireError,
8532        >;
8533    }
8534
8535    pub struct OpenExposedDir;
8536
8537    impl ::fidl_next::Method for OpenExposedDir {
8538        const ORDINAL: u64 = 9194435320863127852;
8539
8540        type Protocol = crate::Realm;
8541
8542        type Request = crate::WireRealmOpenExposedDirRequest<'static>;
8543
8544        type Response = ::fidl_next::WireResult<
8545            'static,
8546            crate::WireRealmOpenExposedDirResponse,
8547            crate::WireError,
8548        >;
8549    }
8550
8551    pub struct CreateChild;
8552
8553    impl ::fidl_next::Method for CreateChild {
8554        const ORDINAL: u64 = 4892190024503489888;
8555
8556        type Protocol = crate::Realm;
8557
8558        type Request = crate::WireRealmCreateChildRequest<'static>;
8559
8560        type Response =
8561            ::fidl_next::WireResult<'static, crate::WireRealmCreateChildResponse, crate::WireError>;
8562    }
8563
8564    pub struct DestroyChild;
8565
8566    impl ::fidl_next::Method for DestroyChild {
8567        const ORDINAL: u64 = 8203529889988252194;
8568
8569        type Protocol = crate::Realm;
8570
8571        type Request = crate::WireRealmDestroyChildRequest<'static>;
8572
8573        type Response = ::fidl_next::WireResult<
8574            'static,
8575            crate::WireRealmDestroyChildResponse,
8576            crate::WireError,
8577        >;
8578    }
8579
8580    pub struct ListChildren;
8581
8582    impl ::fidl_next::Method for ListChildren {
8583        const ORDINAL: u64 = 7532454435519185057;
8584
8585        type Protocol = crate::Realm;
8586
8587        type Request = crate::WireRealmListChildrenRequest<'static>;
8588
8589        type Response = ::fidl_next::WireResult<
8590            'static,
8591            crate::WireRealmListChildrenResponse,
8592            crate::WireError,
8593        >;
8594    }
8595
8596    pub struct GetResolvedInfo;
8597
8598    impl ::fidl_next::Method for GetResolvedInfo {
8599        const ORDINAL: u64 = 8308987710372188322;
8600
8601        type Protocol = crate::Realm;
8602
8603        type Request = ();
8604
8605        type Response = ::fidl_next::WireResult<
8606            'static,
8607            crate::WireRealmGetResolvedInfoResponse<'static>,
8608            crate::WireError,
8609        >;
8610    }
8611
8612    pub struct GetChildOutputDictionary;
8613
8614    impl ::fidl_next::Method for GetChildOutputDictionary {
8615        const ORDINAL: u64 = 4781081784078915088;
8616
8617        type Protocol = crate::Realm;
8618
8619        type Request = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
8620
8621        type Response = ::fidl_next::WireResult<
8622            'static,
8623            crate::WireRealmGetChildOutputDictionaryResponse,
8624            crate::WireError,
8625        >;
8626    }
8627
8628    mod ___detail {
8629
8630        pub struct OpenController<T0, T1> {
8631            child: T0,
8632
8633            controller: T1,
8634        }
8635
8636        impl<T0, T1> ::fidl_next::Encodable for OpenController<T0, T1>
8637        where
8638            T0: ::fidl_next::Encodable<
8639                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8640                >,
8641            T1: ::fidl_next::Encodable<
8642                    Encoded = ::fidl_next::ServerEnd<
8643                        crate::Controller,
8644                        ::fidl_next::fuchsia::WireChannel,
8645                    >,
8646                >,
8647        {
8648            type Encoded = crate::WireRealmOpenControllerRequest<'static>;
8649        }
8650
8651        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenController<T0, T1>
8652        where
8653            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8654            ___E: ::fidl_next::Encoder,
8655            ___E: ::fidl_next::fuchsia::HandleEncoder,
8656            T0: ::fidl_next::Encode<
8657                    ___E,
8658                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8659                >,
8660            T1: ::fidl_next::Encode<
8661                    ___E,
8662                    Encoded = ::fidl_next::ServerEnd<
8663                        crate::Controller,
8664                        ::fidl_next::fuchsia::WireChannel,
8665                    >,
8666                >,
8667        {
8668            #[inline]
8669            fn encode(
8670                self,
8671                encoder: &mut ___E,
8672                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8673            ) -> Result<(), ::fidl_next::EncodeError> {
8674                ::fidl_next::munge! {
8675                    let Self::Encoded {
8676                        child,
8677                        controller,
8678
8679                    } = out;
8680                }
8681
8682                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8683
8684                ::fidl_next::Encode::encode(self.controller, encoder, controller)?;
8685
8686                Ok(())
8687            }
8688        }
8689
8690        pub struct OpenExposedDir<T0, T1> {
8691            child: T0,
8692
8693            exposed_dir: T1,
8694        }
8695
8696        impl<T0, T1> ::fidl_next::Encodable for OpenExposedDir<T0, T1>
8697        where
8698            T0: ::fidl_next::Encodable<
8699                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8700                >,
8701            T1: ::fidl_next::Encodable<
8702                    Encoded = ::fidl_next::ServerEnd<
8703                        ::fidl_next_fuchsia_io::Directory,
8704                        ::fidl_next::fuchsia::WireChannel,
8705                    >,
8706                >,
8707        {
8708            type Encoded = crate::WireRealmOpenExposedDirRequest<'static>;
8709        }
8710
8711        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenExposedDir<T0, T1>
8712        where
8713            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8714            ___E: ::fidl_next::Encoder,
8715            ___E: ::fidl_next::fuchsia::HandleEncoder,
8716            T0: ::fidl_next::Encode<
8717                    ___E,
8718                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8719                >,
8720            T1: ::fidl_next::Encode<
8721                    ___E,
8722                    Encoded = ::fidl_next::ServerEnd<
8723                        ::fidl_next_fuchsia_io::Directory,
8724                        ::fidl_next::fuchsia::WireChannel,
8725                    >,
8726                >,
8727        {
8728            #[inline]
8729            fn encode(
8730                self,
8731                encoder: &mut ___E,
8732                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8733            ) -> Result<(), ::fidl_next::EncodeError> {
8734                ::fidl_next::munge! {
8735                    let Self::Encoded {
8736                        child,
8737                        exposed_dir,
8738
8739                    } = out;
8740                }
8741
8742                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8743
8744                ::fidl_next::Encode::encode(self.exposed_dir, encoder, exposed_dir)?;
8745
8746                Ok(())
8747            }
8748        }
8749
8750        pub struct CreateChild<T0, T1, T2> {
8751            collection: T0,
8752
8753            decl: T1,
8754
8755            args: T2,
8756        }
8757
8758        impl<T0, T1, T2> ::fidl_next::Encodable for CreateChild<T0, T1, T2>
8759        where
8760            T0: ::fidl_next::Encodable<
8761                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
8762                >,
8763            T1: ::fidl_next::Encodable<
8764                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
8765                >,
8766            T2: ::fidl_next::Encodable<Encoded = crate::WireCreateChildArgs<'static>>,
8767        {
8768            type Encoded = crate::WireRealmCreateChildRequest<'static>;
8769        }
8770
8771        unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for CreateChild<T0, T1, T2>
8772        where
8773            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8774            ___E: ::fidl_next::Encoder,
8775            ___E: ::fidl_next::fuchsia::HandleEncoder,
8776            T0: ::fidl_next::Encode<
8777                    ___E,
8778                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
8779                >,
8780            T1: ::fidl_next::Encode<
8781                    ___E,
8782                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
8783                >,
8784            T2: ::fidl_next::Encode<___E, Encoded = crate::WireCreateChildArgs<'static>>,
8785        {
8786            #[inline]
8787            fn encode(
8788                self,
8789                encoder: &mut ___E,
8790                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8791            ) -> Result<(), ::fidl_next::EncodeError> {
8792                ::fidl_next::munge! {
8793                    let Self::Encoded {
8794                        collection,
8795                        decl,
8796                        args,
8797
8798                    } = out;
8799                }
8800
8801                ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
8802
8803                ::fidl_next::Encode::encode(self.decl, encoder, decl)?;
8804
8805                ::fidl_next::Encode::encode(self.args, encoder, args)?;
8806
8807                Ok(())
8808            }
8809        }
8810
8811        pub struct DestroyChild<T0> {
8812            child: T0,
8813        }
8814
8815        impl<T0> ::fidl_next::Encodable for DestroyChild<T0>
8816        where
8817            T0: ::fidl_next::Encodable<
8818                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8819                >,
8820        {
8821            type Encoded = crate::WireRealmDestroyChildRequest<'static>;
8822        }
8823
8824        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DestroyChild<T0>
8825        where
8826            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8827            ___E: ::fidl_next::Encoder,
8828            T0: ::fidl_next::Encode<
8829                    ___E,
8830                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8831                >,
8832        {
8833            #[inline]
8834            fn encode(
8835                self,
8836                encoder: &mut ___E,
8837                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8838            ) -> Result<(), ::fidl_next::EncodeError> {
8839                ::fidl_next::munge! {
8840                    let Self::Encoded {
8841                        child,
8842
8843                    } = out;
8844                }
8845
8846                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8847
8848                Ok(())
8849            }
8850        }
8851
8852        pub struct ListChildren<T0, T1> {
8853            collection: T0,
8854
8855            iter: T1,
8856        }
8857
8858        impl<T0, T1> ::fidl_next::Encodable for ListChildren<T0, T1>
8859        where
8860            T0: ::fidl_next::Encodable<
8861                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
8862                >,
8863            T1: ::fidl_next::Encodable<
8864                    Encoded = ::fidl_next::ServerEnd<
8865                        crate::ChildIterator,
8866                        ::fidl_next::fuchsia::WireChannel,
8867                    >,
8868                >,
8869        {
8870            type Encoded = crate::WireRealmListChildrenRequest<'static>;
8871        }
8872
8873        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListChildren<T0, T1>
8874        where
8875            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8876            ___E: ::fidl_next::Encoder,
8877            ___E: ::fidl_next::fuchsia::HandleEncoder,
8878            T0: ::fidl_next::Encode<
8879                    ___E,
8880                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
8881                >,
8882            T1: ::fidl_next::Encode<
8883                    ___E,
8884                    Encoded = ::fidl_next::ServerEnd<
8885                        crate::ChildIterator,
8886                        ::fidl_next::fuchsia::WireChannel,
8887                    >,
8888                >,
8889        {
8890            #[inline]
8891            fn encode(
8892                self,
8893                encoder: &mut ___E,
8894                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8895            ) -> Result<(), ::fidl_next::EncodeError> {
8896                ::fidl_next::munge! {
8897                    let Self::Encoded {
8898                        collection,
8899                        iter,
8900
8901                    } = out;
8902                }
8903
8904                ::fidl_next::Encode::encode(self.collection, encoder, collection)?;
8905
8906                ::fidl_next::Encode::encode(self.iter, encoder, iter)?;
8907
8908                Ok(())
8909            }
8910        }
8911
8912        pub struct GetChildOutputDictionary<T0> {
8913            child: T0,
8914        }
8915
8916        impl<T0> ::fidl_next::Encodable for GetChildOutputDictionary<T0>
8917        where
8918            T0: ::fidl_next::Encodable<
8919                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8920                >,
8921        {
8922            type Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
8923        }
8924
8925        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetChildOutputDictionary<T0>
8926        where
8927            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8928            ___E: ::fidl_next::Encoder,
8929            ___E: ::fidl_next::fuchsia::HandleEncoder,
8930            T0: ::fidl_next::Encode<
8931                    ___E,
8932                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8933                >,
8934        {
8935            #[inline]
8936            fn encode(
8937                self,
8938                encoder: &mut ___E,
8939                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8940            ) -> Result<(), ::fidl_next::EncodeError> {
8941                ::fidl_next::munge! {
8942                    let Self::Encoded {
8943                        child,
8944
8945                    } = out;
8946                }
8947
8948                ::fidl_next::Encode::encode(self.child, encoder, child)?;
8949
8950                Ok(())
8951            }
8952        }
8953
8954        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Realm
8955        where
8956            ___T: ::fidl_next::Transport,
8957        {
8958            type ClientSender = RealmClientSender<___T>;
8959            type ServerSender = RealmServerSender<___T>;
8960        }
8961
8962        /// The client sender for the `Realm` protocol.
8963        #[repr(transparent)]
8964        pub struct RealmClientSender<___T: ::fidl_next::Transport> {
8965            #[allow(dead_code)]
8966            sender: ::fidl_next::protocol::ClientSender<___T>,
8967        }
8968
8969        impl<___T> RealmClientSender<___T>
8970        where
8971            ___T: ::fidl_next::Transport,
8972        {
8973            #[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"]
8974            pub fn open_controller(
8975                &self,
8976
8977                child: impl ::fidl_next::Encode<
8978                    <___T as ::fidl_next::Transport>::SendBuffer,
8979                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
8980                >,
8981
8982                controller: impl ::fidl_next::Encode<
8983                    <___T as ::fidl_next::Transport>::SendBuffer,
8984                    Encoded = ::fidl_next::ServerEnd<
8985                        crate::Controller,
8986                        ::fidl_next::fuchsia::WireChannel,
8987                    >,
8988                >,
8989            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
8990            where
8991                <___T as ::fidl_next::Transport>::SendBuffer:
8992                    ::fidl_next::encoder::InternalHandleEncoder,
8993                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
8994                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
8995            {
8996                self.open_controller_with(OpenController { child, controller })
8997            }
8998
8999            #[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"]
9000            pub fn open_controller_with<___R>(
9001                &self,
9002                request: ___R,
9003            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
9004            where
9005                ___R: ::fidl_next::Encode<
9006                        <___T as ::fidl_next::Transport>::SendBuffer,
9007                        Encoded = crate::WireRealmOpenControllerRequest<'static>,
9008                    >,
9009            {
9010                ::fidl_next::TwoWayFuture::from_untyped(
9011                    self.sender.send_two_way(8165227925828473216, request),
9012                )
9013            }
9014
9015            #[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"]
9016            pub fn open_exposed_dir(
9017                &self,
9018
9019                child: impl ::fidl_next::Encode<
9020                    <___T as ::fidl_next::Transport>::SendBuffer,
9021                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9022                >,
9023
9024                exposed_dir: impl ::fidl_next::Encode<
9025                    <___T as ::fidl_next::Transport>::SendBuffer,
9026                    Encoded = ::fidl_next::ServerEnd<
9027                        ::fidl_next_fuchsia_io::Directory,
9028                        ::fidl_next::fuchsia::WireChannel,
9029                    >,
9030                >,
9031            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
9032            where
9033                <___T as ::fidl_next::Transport>::SendBuffer:
9034                    ::fidl_next::encoder::InternalHandleEncoder,
9035                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9036                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9037            {
9038                self.open_exposed_dir_with(OpenExposedDir { child, exposed_dir })
9039            }
9040
9041            #[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"]
9042            pub fn open_exposed_dir_with<___R>(
9043                &self,
9044                request: ___R,
9045            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
9046            where
9047                ___R: ::fidl_next::Encode<
9048                        <___T as ::fidl_next::Transport>::SendBuffer,
9049                        Encoded = crate::WireRealmOpenExposedDirRequest<'static>,
9050                    >,
9051            {
9052                ::fidl_next::TwoWayFuture::from_untyped(
9053                    self.sender.send_two_way(9194435320863127852, request),
9054                )
9055            }
9056
9057            #[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"]
9058            pub fn create_child(
9059                &self,
9060
9061                collection: impl ::fidl_next::Encode<
9062                    <___T as ::fidl_next::Transport>::SendBuffer,
9063                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9064                >,
9065
9066                decl: impl ::fidl_next::Encode<
9067                    <___T as ::fidl_next::Transport>::SendBuffer,
9068                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9069                >,
9070
9071                args: impl ::fidl_next::Encode<
9072                    <___T as ::fidl_next::Transport>::SendBuffer,
9073                    Encoded = crate::WireCreateChildArgs<'static>,
9074                >,
9075            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
9076            where
9077                <___T as ::fidl_next::Transport>::SendBuffer:
9078                    ::fidl_next::encoder::InternalHandleEncoder,
9079                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9080                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9081            {
9082                self.create_child_with(CreateChild { collection, decl, args })
9083            }
9084
9085            #[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"]
9086            pub fn create_child_with<___R>(
9087                &self,
9088                request: ___R,
9089            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
9090            where
9091                ___R: ::fidl_next::Encode<
9092                        <___T as ::fidl_next::Transport>::SendBuffer,
9093                        Encoded = crate::WireRealmCreateChildRequest<'static>,
9094                    >,
9095            {
9096                ::fidl_next::TwoWayFuture::from_untyped(
9097                    self.sender.send_two_way(4892190024503489888, request),
9098                )
9099            }
9100
9101            #[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"]
9102            pub fn destroy_child(
9103                &self,
9104
9105                child: impl ::fidl_next::Encode<
9106                    <___T as ::fidl_next::Transport>::SendBuffer,
9107                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9108                >,
9109            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
9110            where
9111                <___T as ::fidl_next::Transport>::SendBuffer:
9112                    ::fidl_next::encoder::InternalHandleEncoder,
9113                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9114            {
9115                self.destroy_child_with(DestroyChild { child })
9116            }
9117
9118            #[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"]
9119            pub fn destroy_child_with<___R>(
9120                &self,
9121                request: ___R,
9122            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
9123            where
9124                ___R: ::fidl_next::Encode<
9125                        <___T as ::fidl_next::Transport>::SendBuffer,
9126                        Encoded = crate::WireRealmDestroyChildRequest<'static>,
9127                    >,
9128            {
9129                ::fidl_next::TwoWayFuture::from_untyped(
9130                    self.sender.send_two_way(8203529889988252194, request),
9131                )
9132            }
9133
9134            #[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"]
9135            pub fn list_children(
9136                &self,
9137
9138                collection: impl ::fidl_next::Encode<
9139                    <___T as ::fidl_next::Transport>::SendBuffer,
9140                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9141                >,
9142
9143                iter: impl ::fidl_next::Encode<
9144                    <___T as ::fidl_next::Transport>::SendBuffer,
9145                    Encoded = ::fidl_next::ServerEnd<
9146                        crate::ChildIterator,
9147                        ::fidl_next::fuchsia::WireChannel,
9148                    >,
9149                >,
9150            ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
9151            where
9152                <___T as ::fidl_next::Transport>::SendBuffer:
9153                    ::fidl_next::encoder::InternalHandleEncoder,
9154                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9155                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9156            {
9157                self.list_children_with(ListChildren { collection, iter })
9158            }
9159
9160            #[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"]
9161            pub fn list_children_with<___R>(
9162                &self,
9163                request: ___R,
9164            ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
9165            where
9166                ___R: ::fidl_next::Encode<
9167                        <___T as ::fidl_next::Transport>::SendBuffer,
9168                        Encoded = crate::WireRealmListChildrenRequest<'static>,
9169                    >,
9170            {
9171                ::fidl_next::TwoWayFuture::from_untyped(
9172                    self.sender.send_two_way(7532454435519185057, request),
9173                )
9174            }
9175
9176            #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9177            pub fn get_resolved_info(
9178                &self,
9179            ) -> ::fidl_next::TwoWayFuture<'_, super::GetResolvedInfo, ___T> {
9180                ::fidl_next::TwoWayFuture::from_untyped(
9181                    self.sender.send_two_way(8308987710372188322, ()),
9182                )
9183            }
9184
9185            pub fn get_child_output_dictionary(
9186                &self,
9187
9188                child: impl ::fidl_next::Encode<
9189                    <___T as ::fidl_next::Transport>::SendBuffer,
9190                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9191                >,
9192            ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
9193            where
9194                <___T as ::fidl_next::Transport>::SendBuffer:
9195                    ::fidl_next::encoder::InternalHandleEncoder,
9196                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9197                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9198            {
9199                self.get_child_output_dictionary_with(GetChildOutputDictionary { child })
9200            }
9201
9202            pub fn get_child_output_dictionary_with<___R>(
9203                &self,
9204                request: ___R,
9205            ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
9206            where
9207                ___R: ::fidl_next::Encode<
9208                        <___T as ::fidl_next::Transport>::SendBuffer,
9209                        Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>,
9210                    >,
9211            {
9212                ::fidl_next::TwoWayFuture::from_untyped(
9213                    self.sender.send_two_way(4781081784078915088, request),
9214                )
9215            }
9216        }
9217
9218        /// The server sender for the `Realm` protocol.
9219        #[repr(transparent)]
9220        pub struct RealmServerSender<___T: ::fidl_next::Transport> {
9221            sender: ::fidl_next::protocol::ServerSender<___T>,
9222        }
9223
9224        impl<___T> RealmServerSender<___T> where ___T: ::fidl_next::Transport {}
9225    }
9226}
9227
9228/// A client handler for the Realm protocol.
9229///
9230/// See [`Realm`] for more details.
9231pub trait RealmClientHandler<
9232    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9233    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9234>
9235{
9236}
9237
9238impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Realm
9239where
9240    ___H: RealmClientHandler<___T> + ::core::marker::Send,
9241    ___T: ::fidl_next::Transport,
9242    <realm::OpenController as ::fidl_next::Method>::Response:
9243        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9244    <realm::OpenExposedDir as ::fidl_next::Method>::Response:
9245        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9246    <realm::CreateChild as ::fidl_next::Method>::Response:
9247        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9248    <realm::DestroyChild as ::fidl_next::Method>::Response:
9249        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9250    <realm::ListChildren as ::fidl_next::Method>::Response:
9251        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9252    <realm::GetResolvedInfo as ::fidl_next::Method>::Response:
9253        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9254    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Response:
9255        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9256{
9257    async fn on_event(
9258        handler: &mut ___H,
9259        sender: &::fidl_next::ClientSender<Self, ___T>,
9260        ordinal: u64,
9261        buffer: ___T::RecvBuffer,
9262    ) {
9263        match ordinal {
9264            ordinal => sender.close(),
9265        }
9266    }
9267}
9268
9269/// A server handler for the Realm protocol.
9270///
9271/// See [`Realm`] for more details.
9272pub trait RealmServerHandler<
9273    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9274    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9275>
9276{
9277    #[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"]
9278    fn open_controller(
9279        &mut self,
9280        sender: &::fidl_next::ServerSender<Realm, ___T>,
9281
9282        request: ::fidl_next::Request<realm::OpenController, ___T>,
9283
9284        responder: ::fidl_next::Responder<realm::OpenController>,
9285    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9286
9287    #[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"]
9288    fn open_exposed_dir(
9289        &mut self,
9290        sender: &::fidl_next::ServerSender<Realm, ___T>,
9291
9292        request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
9293
9294        responder: ::fidl_next::Responder<realm::OpenExposedDir>,
9295    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9296
9297    #[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"]
9298    fn create_child(
9299        &mut self,
9300        sender: &::fidl_next::ServerSender<Realm, ___T>,
9301
9302        request: ::fidl_next::Request<realm::CreateChild, ___T>,
9303
9304        responder: ::fidl_next::Responder<realm::CreateChild>,
9305    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9306
9307    #[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"]
9308    fn destroy_child(
9309        &mut self,
9310        sender: &::fidl_next::ServerSender<Realm, ___T>,
9311
9312        request: ::fidl_next::Request<realm::DestroyChild, ___T>,
9313
9314        responder: ::fidl_next::Responder<realm::DestroyChild>,
9315    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9316
9317    #[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"]
9318    fn list_children(
9319        &mut self,
9320        sender: &::fidl_next::ServerSender<Realm, ___T>,
9321
9322        request: ::fidl_next::Request<realm::ListChildren, ___T>,
9323
9324        responder: ::fidl_next::Responder<realm::ListChildren>,
9325    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9326
9327    #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9328    fn get_resolved_info(
9329        &mut self,
9330        sender: &::fidl_next::ServerSender<Realm, ___T>,
9331
9332        responder: ::fidl_next::Responder<realm::GetResolvedInfo>,
9333    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9334
9335    fn get_child_output_dictionary(
9336        &mut self,
9337        sender: &::fidl_next::ServerSender<Realm, ___T>,
9338
9339        request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
9340
9341        responder: ::fidl_next::Responder<realm::GetChildOutputDictionary>,
9342    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9343}
9344
9345impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Realm
9346where
9347    ___H: RealmServerHandler<___T> + ::core::marker::Send,
9348    ___T: ::fidl_next::Transport,
9349    <realm::OpenController as ::fidl_next::Method>::Request:
9350        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9351    <realm::OpenExposedDir as ::fidl_next::Method>::Request:
9352        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9353    <realm::CreateChild as ::fidl_next::Method>::Request:
9354        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9355    <realm::DestroyChild as ::fidl_next::Method>::Request:
9356        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9357    <realm::ListChildren as ::fidl_next::Method>::Request:
9358        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9359    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Request:
9360        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9361{
9362    async fn on_one_way(
9363        handler: &mut ___H,
9364        sender: &::fidl_next::ServerSender<Self, ___T>,
9365        ordinal: u64,
9366        buffer: ___T::RecvBuffer,
9367    ) {
9368        match ordinal {
9369            ordinal => sender.close(),
9370        }
9371    }
9372
9373    async fn on_two_way(
9374        handler: &mut ___H,
9375        sender: &::fidl_next::ServerSender<Self, ___T>,
9376        ordinal: u64,
9377        buffer: ___T::RecvBuffer,
9378        responder: ::fidl_next::protocol::Responder,
9379    ) {
9380        match ordinal {
9381            8165227925828473216 => {
9382                let responder = ::fidl_next::Responder::from_untyped(responder);
9383
9384                match ::fidl_next::DecoderExt::decode(buffer) {
9385                    Ok(decoded) => handler.open_controller(sender, decoded, responder).await,
9386                    Err(e) => sender.close(),
9387                }
9388            }
9389
9390            9194435320863127852 => {
9391                let responder = ::fidl_next::Responder::from_untyped(responder);
9392
9393                match ::fidl_next::DecoderExt::decode(buffer) {
9394                    Ok(decoded) => handler.open_exposed_dir(sender, decoded, responder).await,
9395                    Err(e) => sender.close(),
9396                }
9397            }
9398
9399            4892190024503489888 => {
9400                let responder = ::fidl_next::Responder::from_untyped(responder);
9401
9402                match ::fidl_next::DecoderExt::decode(buffer) {
9403                    Ok(decoded) => handler.create_child(sender, decoded, responder).await,
9404                    Err(e) => sender.close(),
9405                }
9406            }
9407
9408            8203529889988252194 => {
9409                let responder = ::fidl_next::Responder::from_untyped(responder);
9410
9411                match ::fidl_next::DecoderExt::decode(buffer) {
9412                    Ok(decoded) => handler.destroy_child(sender, decoded, responder).await,
9413                    Err(e) => sender.close(),
9414                }
9415            }
9416
9417            7532454435519185057 => {
9418                let responder = ::fidl_next::Responder::from_untyped(responder);
9419
9420                match ::fidl_next::DecoderExt::decode(buffer) {
9421                    Ok(decoded) => handler.list_children(sender, decoded, responder).await,
9422                    Err(e) => sender.close(),
9423                }
9424            }
9425
9426            8308987710372188322 => {
9427                let responder = ::fidl_next::Responder::from_untyped(responder);
9428
9429                handler.get_resolved_info(sender, responder).await;
9430            }
9431
9432            4781081784078915088 => {
9433                let responder = ::fidl_next::Responder::from_untyped(responder);
9434
9435                match ::fidl_next::DecoderExt::decode(buffer) {
9436                    Ok(decoded) => {
9437                        handler.get_child_output_dictionary(sender, decoded, responder).await
9438                    }
9439                    Err(e) => sender.close(),
9440                }
9441            }
9442
9443            ordinal => sender.close(),
9444        }
9445    }
9446}
9447
9448#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9449#[repr(u32)]
9450pub enum StatusError {
9451    Provider = 1,
9452    ResponseInvalid = 2,
9453    StatusUnknown = 3,
9454    Unsupported = 4,
9455}
9456
9457impl ::fidl_next::Encodable for StatusError {
9458    type Encoded = WireStatusError;
9459}
9460impl ::std::convert::TryFrom<u32> for StatusError {
9461    type Error = ::fidl_next::UnknownStrictEnumMemberError;
9462    fn try_from(value: u32) -> Result<Self, Self::Error> {
9463        match value {
9464            1 => Ok(Self::Provider),
9465            2 => Ok(Self::ResponseInvalid),
9466            3 => Ok(Self::StatusUnknown),
9467            4 => Ok(Self::Unsupported),
9468
9469            _ => Err(Self::Error::new(value.into())),
9470        }
9471    }
9472}
9473
9474unsafe impl<___E> ::fidl_next::Encode<___E> for StatusError
9475where
9476    ___E: ?Sized,
9477{
9478    #[inline]
9479    fn encode(
9480        self,
9481        encoder: &mut ___E,
9482        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9483    ) -> Result<(), ::fidl_next::EncodeError> {
9484        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
9485    }
9486}
9487
9488unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StatusError
9489where
9490    ___E: ?Sized,
9491{
9492    #[inline]
9493    fn encode_ref(
9494        &self,
9495        encoder: &mut ___E,
9496        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9497    ) -> Result<(), ::fidl_next::EncodeError> {
9498        ::fidl_next::munge!(let WireStatusError { value } = out);
9499        let _ = value.write(::fidl_next::WireU32::from(match *self {
9500            Self::Provider => 1,
9501
9502            Self::ResponseInvalid => 2,
9503
9504            Self::StatusUnknown => 3,
9505
9506            Self::Unsupported => 4,
9507        }));
9508
9509        Ok(())
9510    }
9511}
9512
9513impl ::core::convert::From<WireStatusError> for StatusError {
9514    fn from(wire: WireStatusError) -> Self {
9515        match u32::from(wire.value) {
9516            1 => Self::Provider,
9517
9518            2 => Self::ResponseInvalid,
9519
9520            3 => Self::StatusUnknown,
9521
9522            4 => Self::Unsupported,
9523
9524            _ => unsafe { ::core::hint::unreachable_unchecked() },
9525        }
9526    }
9527}
9528
9529impl ::fidl_next::FromWire<WireStatusError> for StatusError {
9530    #[inline]
9531    fn from_wire(wire: WireStatusError) -> Self {
9532        Self::from(wire)
9533    }
9534}
9535
9536impl ::fidl_next::FromWireRef<WireStatusError> for StatusError {
9537    #[inline]
9538    fn from_wire_ref(wire: &WireStatusError) -> Self {
9539        Self::from(*wire)
9540    }
9541}
9542
9543/// The wire type corresponding to [`StatusError`].
9544#[derive(Clone, Copy, Debug, PartialEq, Eq)]
9545#[repr(transparent)]
9546pub struct WireStatusError {
9547    value: ::fidl_next::WireU32,
9548}
9549
9550unsafe impl ::fidl_next::Wire for WireStatusError {
9551    type Decoded<'de> = Self;
9552
9553    #[inline]
9554    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
9555        // Wire enums have no padding
9556    }
9557}
9558
9559impl WireStatusError {
9560    pub const PROVIDER: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(1) };
9561
9562    pub const RESPONSE_INVALID: WireStatusError =
9563        WireStatusError { value: ::fidl_next::WireU32(2) };
9564
9565    pub const STATUS_UNKNOWN: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(3) };
9566
9567    pub const UNSUPPORTED: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(4) };
9568}
9569
9570unsafe impl<___D> ::fidl_next::Decode<___D> for WireStatusError
9571where
9572    ___D: ?Sized,
9573{
9574    fn decode(
9575        slot: ::fidl_next::Slot<'_, Self>,
9576        _: &mut ___D,
9577    ) -> Result<(), ::fidl_next::DecodeError> {
9578        ::fidl_next::munge!(let Self { value } = slot);
9579
9580        match u32::from(*value) {
9581            1 | 2 | 3 | 4 => (),
9582            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
9583        }
9584
9585        Ok(())
9586    }
9587}
9588
9589impl ::core::convert::From<StatusError> for WireStatusError {
9590    fn from(natural: StatusError) -> Self {
9591        match natural {
9592            StatusError::Provider => WireStatusError::PROVIDER,
9593
9594            StatusError::ResponseInvalid => WireStatusError::RESPONSE_INVALID,
9595
9596            StatusError::StatusUnknown => WireStatusError::STATUS_UNKNOWN,
9597
9598            StatusError::Unsupported => WireStatusError::UNSUPPORTED,
9599        }
9600    }
9601}
9602
9603pub type StorageAdminOpenStorageResponse = ();
9604
9605/// The wire type corresponding to [`StorageAdminOpenStorageResponse`].
9606pub type WireStorageAdminOpenStorageResponse = ();
9607
9608#[derive(Debug)]
9609pub struct StorageAdminListStorageInRealmRequest {
9610    pub relative_moniker: String,
9611
9612    pub iterator: ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::zx::Channel>,
9613}
9614
9615impl ::fidl_next::Encodable for StorageAdminListStorageInRealmRequest {
9616    type Encoded = WireStorageAdminListStorageInRealmRequest<'static>;
9617}
9618
9619unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminListStorageInRealmRequest
9620where
9621    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9622    ___E: ::fidl_next::Encoder,
9623    ___E: ::fidl_next::fuchsia::HandleEncoder,
9624{
9625    #[inline]
9626    fn encode(
9627        self,
9628        encoder: &mut ___E,
9629        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9630    ) -> Result<(), ::fidl_next::EncodeError> {
9631        ::fidl_next::munge! {
9632            let Self::Encoded {
9633                relative_moniker,
9634                iterator,
9635
9636            } = out;
9637        }
9638
9639        ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
9640
9641        ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
9642
9643        Ok(())
9644    }
9645}
9646
9647impl ::fidl_next::EncodableOption for StorageAdminListStorageInRealmRequest {
9648    type EncodedOption =
9649        ::fidl_next::WireBox<'static, WireStorageAdminListStorageInRealmRequest<'static>>;
9650}
9651
9652unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminListStorageInRealmRequest
9653where
9654    ___E: ::fidl_next::Encoder + ?Sized,
9655    StorageAdminListStorageInRealmRequest: ::fidl_next::Encode<___E>,
9656{
9657    #[inline]
9658    fn encode_option(
9659        this: Option<Self>,
9660        encoder: &mut ___E,
9661        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9662    ) -> Result<(), ::fidl_next::EncodeError> {
9663        if let Some(inner) = this {
9664            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9665            ::fidl_next::WireBox::encode_present(out);
9666        } else {
9667            ::fidl_next::WireBox::encode_absent(out);
9668        }
9669
9670        Ok(())
9671    }
9672}
9673
9674impl<'de> ::fidl_next::FromWire<WireStorageAdminListStorageInRealmRequest<'de>>
9675    for StorageAdminListStorageInRealmRequest
9676{
9677    #[inline]
9678    fn from_wire(wire: WireStorageAdminListStorageInRealmRequest<'de>) -> Self {
9679        Self {
9680            relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
9681
9682            iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
9683        }
9684    }
9685}
9686
9687/// The wire type corresponding to [`StorageAdminListStorageInRealmRequest`].
9688#[derive(Debug)]
9689#[repr(C)]
9690pub struct WireStorageAdminListStorageInRealmRequest<'de> {
9691    pub relative_moniker: ::fidl_next::WireString<'de>,
9692
9693    pub iterator: ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::WireChannel>,
9694}
9695
9696unsafe impl ::fidl_next::Wire for WireStorageAdminListStorageInRealmRequest<'static> {
9697    type Decoded<'de> = WireStorageAdminListStorageInRealmRequest<'de>;
9698
9699    #[inline]
9700    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9701        unsafe {
9702            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
9703        }
9704    }
9705}
9706
9707unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageAdminListStorageInRealmRequest<'static>
9708where
9709    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9710    ___D: ::fidl_next::Decoder,
9711    ___D: ::fidl_next::fuchsia::HandleDecoder,
9712{
9713    fn decode(
9714        slot: ::fidl_next::Slot<'_, Self>,
9715        decoder: &mut ___D,
9716    ) -> Result<(), ::fidl_next::DecodeError> {
9717        ::fidl_next::munge! {
9718            let Self {
9719                mut relative_moniker,
9720                mut iterator,
9721
9722            } = slot;
9723        }
9724
9725        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder)?;
9726
9727        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
9728
9729        if relative_moniker.len() > 4096 {
9730            return Err(::fidl_next::DecodeError::VectorTooLong {
9731                size: relative_moniker.len() as u64,
9732                limit: 4096,
9733            });
9734        }
9735
9736        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
9737
9738        Ok(())
9739    }
9740}
9741
9742pub type StorageAdminListStorageInRealmResponse = ();
9743
9744/// The wire type corresponding to [`StorageAdminListStorageInRealmResponse`].
9745pub type WireStorageAdminListStorageInRealmResponse = ();
9746
9747pub type StorageAdminOpenComponentStorageByIdResponse = ();
9748
9749/// The wire type corresponding to [`StorageAdminOpenComponentStorageByIdResponse`].
9750pub type WireStorageAdminOpenComponentStorageByIdResponse = ();
9751
9752#[derive(Clone, Debug)]
9753pub struct StorageAdminDeleteComponentStorageRequest {
9754    pub relative_moniker: String,
9755}
9756
9757impl ::fidl_next::Encodable for StorageAdminDeleteComponentStorageRequest {
9758    type Encoded = WireStorageAdminDeleteComponentStorageRequest<'static>;
9759}
9760
9761unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminDeleteComponentStorageRequest
9762where
9763    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9764    ___E: ::fidl_next::Encoder,
9765{
9766    #[inline]
9767    fn encode(
9768        self,
9769        encoder: &mut ___E,
9770        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9771    ) -> Result<(), ::fidl_next::EncodeError> {
9772        ::fidl_next::munge! {
9773            let Self::Encoded {
9774                relative_moniker,
9775
9776            } = out;
9777        }
9778
9779        ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
9780
9781        Ok(())
9782    }
9783}
9784
9785unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageAdminDeleteComponentStorageRequest
9786where
9787    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9788    ___E: ::fidl_next::Encoder,
9789{
9790    #[inline]
9791    fn encode_ref(
9792        &self,
9793        encoder: &mut ___E,
9794        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9795    ) -> Result<(), ::fidl_next::EncodeError> {
9796        ::fidl_next::munge! {
9797            let Self::Encoded {
9798                relative_moniker,
9799
9800            } = out;
9801        }
9802
9803        ::fidl_next::EncodeRef::encode_ref(&self.relative_moniker, encoder, relative_moniker)?;
9804
9805        Ok(())
9806    }
9807}
9808
9809impl ::fidl_next::EncodableOption for StorageAdminDeleteComponentStorageRequest {
9810    type EncodedOption =
9811        ::fidl_next::WireBox<'static, WireStorageAdminDeleteComponentStorageRequest<'static>>;
9812}
9813
9814unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminDeleteComponentStorageRequest
9815where
9816    ___E: ::fidl_next::Encoder + ?Sized,
9817    StorageAdminDeleteComponentStorageRequest: ::fidl_next::Encode<___E>,
9818{
9819    #[inline]
9820    fn encode_option(
9821        this: Option<Self>,
9822        encoder: &mut ___E,
9823        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9824    ) -> Result<(), ::fidl_next::EncodeError> {
9825        if let Some(inner) = this {
9826            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9827            ::fidl_next::WireBox::encode_present(out);
9828        } else {
9829            ::fidl_next::WireBox::encode_absent(out);
9830        }
9831
9832        Ok(())
9833    }
9834}
9835
9836unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageAdminDeleteComponentStorageRequest
9837where
9838    ___E: ::fidl_next::Encoder + ?Sized,
9839    StorageAdminDeleteComponentStorageRequest: ::fidl_next::EncodeRef<___E>,
9840{
9841    #[inline]
9842    fn encode_option_ref(
9843        this: Option<&Self>,
9844        encoder: &mut ___E,
9845        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9846    ) -> Result<(), ::fidl_next::EncodeError> {
9847        if let Some(inner) = this {
9848            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9849            ::fidl_next::WireBox::encode_present(out);
9850        } else {
9851            ::fidl_next::WireBox::encode_absent(out);
9852        }
9853
9854        Ok(())
9855    }
9856}
9857
9858impl<'de> ::fidl_next::FromWire<WireStorageAdminDeleteComponentStorageRequest<'de>>
9859    for StorageAdminDeleteComponentStorageRequest
9860{
9861    #[inline]
9862    fn from_wire(wire: WireStorageAdminDeleteComponentStorageRequest<'de>) -> Self {
9863        Self { relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker) }
9864    }
9865}
9866
9867impl<'de> ::fidl_next::FromWireRef<WireStorageAdminDeleteComponentStorageRequest<'de>>
9868    for StorageAdminDeleteComponentStorageRequest
9869{
9870    #[inline]
9871    fn from_wire_ref(wire: &WireStorageAdminDeleteComponentStorageRequest<'de>) -> Self {
9872        Self { relative_moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_moniker) }
9873    }
9874}
9875
9876/// The wire type corresponding to [`StorageAdminDeleteComponentStorageRequest`].
9877#[derive(Debug)]
9878#[repr(C)]
9879pub struct WireStorageAdminDeleteComponentStorageRequest<'de> {
9880    pub relative_moniker: ::fidl_next::WireString<'de>,
9881}
9882
9883unsafe impl ::fidl_next::Wire for WireStorageAdminDeleteComponentStorageRequest<'static> {
9884    type Decoded<'de> = WireStorageAdminDeleteComponentStorageRequest<'de>;
9885
9886    #[inline]
9887    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
9888}
9889
9890unsafe impl<___D> ::fidl_next::Decode<___D>
9891    for WireStorageAdminDeleteComponentStorageRequest<'static>
9892where
9893    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9894    ___D: ::fidl_next::Decoder,
9895{
9896    fn decode(
9897        slot: ::fidl_next::Slot<'_, Self>,
9898        decoder: &mut ___D,
9899    ) -> Result<(), ::fidl_next::DecodeError> {
9900        ::fidl_next::munge! {
9901            let Self {
9902                mut relative_moniker,
9903
9904            } = slot;
9905        }
9906
9907        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder)?;
9908
9909        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
9910
9911        if relative_moniker.len() > 4096 {
9912            return Err(::fidl_next::DecodeError::VectorTooLong {
9913                size: relative_moniker.len() as u64,
9914                limit: 4096,
9915            });
9916        }
9917
9918        Ok(())
9919    }
9920}
9921
9922pub type StorageAdminDeleteComponentStorageResponse = ();
9923
9924/// The wire type corresponding to [`StorageAdminDeleteComponentStorageResponse`].
9925pub type WireStorageAdminDeleteComponentStorageResponse = ();
9926
9927#[doc = " Metadata about status of the storage\n"]
9928#[derive(Clone, Debug, Default)]
9929pub struct StorageStatus {
9930    pub total_size: Option<u64>,
9931
9932    pub used_size: Option<u64>,
9933}
9934
9935impl StorageStatus {
9936    fn __max_ordinal(&self) -> usize {
9937        if self.used_size.is_some() {
9938            return 2;
9939        }
9940
9941        if self.total_size.is_some() {
9942            return 1;
9943        }
9944
9945        0
9946    }
9947}
9948
9949impl ::fidl_next::Encodable for StorageStatus {
9950    type Encoded = WireStorageStatus<'static>;
9951}
9952
9953unsafe impl<___E> ::fidl_next::Encode<___E> for StorageStatus
9954where
9955    ___E: ::fidl_next::Encoder + ?Sized,
9956{
9957    #[inline]
9958    fn encode(
9959        mut self,
9960        encoder: &mut ___E,
9961        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9962    ) -> Result<(), ::fidl_next::EncodeError> {
9963        ::fidl_next::munge!(let WireStorageStatus { table } = out);
9964
9965        let max_ord = self.__max_ordinal();
9966
9967        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
9968        ::fidl_next::Wire::zero_padding(&mut out);
9969
9970        let mut preallocated =
9971            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
9972
9973        for i in 1..=max_ord {
9974            match i {
9975                2 => {
9976                    if let Some(used_size) = self.used_size.take() {
9977                        ::fidl_next::WireEnvelope::encode_value(
9978                            used_size,
9979                            preallocated.encoder,
9980                            &mut out,
9981                        )?;
9982                    } else {
9983                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9984                    }
9985                }
9986
9987                1 => {
9988                    if let Some(total_size) = self.total_size.take() {
9989                        ::fidl_next::WireEnvelope::encode_value(
9990                            total_size,
9991                            preallocated.encoder,
9992                            &mut out,
9993                        )?;
9994                    } else {
9995                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
9996                    }
9997                }
9998
9999                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10000            }
10001            unsafe {
10002                preallocated.write_next(out.assume_init_ref());
10003            }
10004        }
10005
10006        ::fidl_next::WireTable::encode_len(table, max_ord);
10007
10008        Ok(())
10009    }
10010}
10011
10012unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageStatus
10013where
10014    ___E: ::fidl_next::Encoder + ?Sized,
10015{
10016    #[inline]
10017    fn encode_ref(
10018        &self,
10019        encoder: &mut ___E,
10020        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10021    ) -> Result<(), ::fidl_next::EncodeError> {
10022        ::fidl_next::munge!(let WireStorageStatus { table } = out);
10023
10024        let max_ord = self.__max_ordinal();
10025
10026        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10027        ::fidl_next::Wire::zero_padding(&mut out);
10028
10029        let mut preallocated =
10030            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10031
10032        for i in 1..=max_ord {
10033            match i {
10034                2 => {
10035                    if let Some(used_size) = &self.used_size {
10036                        ::fidl_next::WireEnvelope::encode_value(
10037                            used_size,
10038                            preallocated.encoder,
10039                            &mut out,
10040                        )?;
10041                    } else {
10042                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10043                    }
10044                }
10045
10046                1 => {
10047                    if let Some(total_size) = &self.total_size {
10048                        ::fidl_next::WireEnvelope::encode_value(
10049                            total_size,
10050                            preallocated.encoder,
10051                            &mut out,
10052                        )?;
10053                    } else {
10054                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10055                    }
10056                }
10057
10058                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10059            }
10060            unsafe {
10061                preallocated.write_next(out.assume_init_ref());
10062            }
10063        }
10064
10065        ::fidl_next::WireTable::encode_len(table, max_ord);
10066
10067        Ok(())
10068    }
10069}
10070
10071impl<'de> ::fidl_next::FromWire<WireStorageStatus<'de>> for StorageStatus {
10072    #[inline]
10073    fn from_wire(wire: WireStorageStatus<'de>) -> Self {
10074        let wire = ::core::mem::ManuallyDrop::new(wire);
10075
10076        let total_size = wire.table.get(1);
10077
10078        let used_size = wire.table.get(2);
10079
10080        Self {
10081            total_size: total_size.map(|envelope| {
10082                ::fidl_next::FromWire::from_wire(unsafe {
10083                    envelope.read_unchecked::<::fidl_next::WireU64>()
10084                })
10085            }),
10086
10087            used_size: used_size.map(|envelope| {
10088                ::fidl_next::FromWire::from_wire(unsafe {
10089                    envelope.read_unchecked::<::fidl_next::WireU64>()
10090                })
10091            }),
10092        }
10093    }
10094}
10095
10096impl<'de> ::fidl_next::FromWireRef<WireStorageStatus<'de>> for StorageStatus {
10097    #[inline]
10098    fn from_wire_ref(wire: &WireStorageStatus<'de>) -> Self {
10099        Self {
10100            total_size: wire.table.get(1).map(|envelope| {
10101                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10102                    envelope.deref_unchecked::<::fidl_next::WireU64>()
10103                })
10104            }),
10105
10106            used_size: wire.table.get(2).map(|envelope| {
10107                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10108                    envelope.deref_unchecked::<::fidl_next::WireU64>()
10109                })
10110            }),
10111        }
10112    }
10113}
10114
10115/// The wire type corresponding to [`StorageStatus`].
10116#[repr(C)]
10117pub struct WireStorageStatus<'de> {
10118    table: ::fidl_next::WireTable<'de>,
10119}
10120
10121impl<'de> Drop for WireStorageStatus<'de> {
10122    fn drop(&mut self) {
10123        let _ = self
10124            .table
10125            .get(1)
10126            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
10127
10128        let _ = self
10129            .table
10130            .get(2)
10131            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
10132    }
10133}
10134
10135unsafe impl ::fidl_next::Wire for WireStorageStatus<'static> {
10136    type Decoded<'de> = WireStorageStatus<'de>;
10137
10138    #[inline]
10139    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10140        ::fidl_next::munge!(let Self { table } = out);
10141        ::fidl_next::WireTable::zero_padding(table);
10142    }
10143}
10144
10145unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageStatus<'static>
10146where
10147    ___D: ::fidl_next::Decoder + ?Sized,
10148{
10149    fn decode(
10150        slot: ::fidl_next::Slot<'_, Self>,
10151        decoder: &mut ___D,
10152    ) -> Result<(), ::fidl_next::DecodeError> {
10153        ::fidl_next::munge!(let Self { table } = slot);
10154
10155        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10156            match ordinal {
10157                0 => unsafe { ::core::hint::unreachable_unchecked() },
10158
10159                1 => {
10160                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
10161                        slot.as_mut(),
10162                        decoder,
10163                    )?;
10164
10165                    Ok(())
10166                }
10167
10168                2 => {
10169                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
10170                        slot.as_mut(),
10171                        decoder,
10172                    )?;
10173
10174                    Ok(())
10175                }
10176
10177                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
10178            }
10179        })
10180    }
10181}
10182
10183impl<'de> WireStorageStatus<'de> {
10184    pub fn total_size(&self) -> Option<&::fidl_next::WireU64> {
10185        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
10186    }
10187
10188    pub fn used_size(&self) -> Option<&::fidl_next::WireU64> {
10189        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
10190    }
10191}
10192
10193impl<'de> ::core::fmt::Debug for WireStorageStatus<'de> {
10194    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
10195        f.debug_struct("StorageStatus")
10196            .field("total_size", &self.total_size())
10197            .field("used_size", &self.used_size())
10198            .finish()
10199    }
10200}
10201
10202pub type StorageAdminDeleteAllStorageContentsResponse = ();
10203
10204/// The wire type corresponding to [`StorageAdminDeleteAllStorageContentsResponse`].
10205pub type WireStorageAdminDeleteAllStorageContentsResponse = ();
10206
10207#[derive(Debug)]
10208pub struct StorageAdminOpenStorageRequest {
10209    pub relative_moniker: String,
10210
10211    pub object:
10212        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
10213}
10214
10215impl ::fidl_next::Encodable for StorageAdminOpenStorageRequest {
10216    type Encoded = WireStorageAdminOpenStorageRequest<'static>;
10217}
10218
10219unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenStorageRequest
10220where
10221    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10222    ___E: ::fidl_next::Encoder,
10223    ___E: ::fidl_next::fuchsia::HandleEncoder,
10224{
10225    #[inline]
10226    fn encode(
10227        self,
10228        encoder: &mut ___E,
10229        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10230    ) -> Result<(), ::fidl_next::EncodeError> {
10231        ::fidl_next::munge! {
10232            let Self::Encoded {
10233                relative_moniker,
10234                object,
10235
10236            } = out;
10237        }
10238
10239        ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
10240
10241        ::fidl_next::Encode::encode(self.object, encoder, object)?;
10242
10243        Ok(())
10244    }
10245}
10246
10247impl ::fidl_next::EncodableOption for StorageAdminOpenStorageRequest {
10248    type EncodedOption = ::fidl_next::WireBox<'static, WireStorageAdminOpenStorageRequest<'static>>;
10249}
10250
10251unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenStorageRequest
10252where
10253    ___E: ::fidl_next::Encoder + ?Sized,
10254    StorageAdminOpenStorageRequest: ::fidl_next::Encode<___E>,
10255{
10256    #[inline]
10257    fn encode_option(
10258        this: Option<Self>,
10259        encoder: &mut ___E,
10260        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10261    ) -> Result<(), ::fidl_next::EncodeError> {
10262        if let Some(inner) = this {
10263            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10264            ::fidl_next::WireBox::encode_present(out);
10265        } else {
10266            ::fidl_next::WireBox::encode_absent(out);
10267        }
10268
10269        Ok(())
10270    }
10271}
10272
10273impl<'de> ::fidl_next::FromWire<WireStorageAdminOpenStorageRequest<'de>>
10274    for StorageAdminOpenStorageRequest
10275{
10276    #[inline]
10277    fn from_wire(wire: WireStorageAdminOpenStorageRequest<'de>) -> Self {
10278        Self {
10279            relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
10280
10281            object: ::fidl_next::FromWire::from_wire(wire.object),
10282        }
10283    }
10284}
10285
10286/// The wire type corresponding to [`StorageAdminOpenStorageRequest`].
10287#[derive(Debug)]
10288#[repr(C)]
10289pub struct WireStorageAdminOpenStorageRequest<'de> {
10290    pub relative_moniker: ::fidl_next::WireString<'de>,
10291
10292    pub object:
10293        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
10294}
10295
10296unsafe impl ::fidl_next::Wire for WireStorageAdminOpenStorageRequest<'static> {
10297    type Decoded<'de> = WireStorageAdminOpenStorageRequest<'de>;
10298
10299    #[inline]
10300    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10301        unsafe {
10302            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
10303        }
10304    }
10305}
10306
10307unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageAdminOpenStorageRequest<'static>
10308where
10309    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10310    ___D: ::fidl_next::Decoder,
10311    ___D: ::fidl_next::fuchsia::HandleDecoder,
10312{
10313    fn decode(
10314        slot: ::fidl_next::Slot<'_, Self>,
10315        decoder: &mut ___D,
10316    ) -> Result<(), ::fidl_next::DecodeError> {
10317        ::fidl_next::munge! {
10318            let Self {
10319                mut relative_moniker,
10320                mut object,
10321
10322            } = slot;
10323        }
10324
10325        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder)?;
10326
10327        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
10328
10329        if relative_moniker.len() > 4096 {
10330            return Err(::fidl_next::DecodeError::VectorTooLong {
10331                size: relative_moniker.len() as u64,
10332                limit: 4096,
10333            });
10334        }
10335
10336        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
10337
10338        Ok(())
10339    }
10340}
10341
10342#[derive(Debug)]
10343pub struct StorageAdminOpenComponentStorageByIdRequest {
10344    pub id: String,
10345
10346    pub object:
10347        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
10348}
10349
10350impl ::fidl_next::Encodable for StorageAdminOpenComponentStorageByIdRequest {
10351    type Encoded = WireStorageAdminOpenComponentStorageByIdRequest<'static>;
10352}
10353
10354unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenComponentStorageByIdRequest
10355where
10356    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10357    ___E: ::fidl_next::Encoder,
10358    ___E: ::fidl_next::fuchsia::HandleEncoder,
10359{
10360    #[inline]
10361    fn encode(
10362        self,
10363        encoder: &mut ___E,
10364        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10365    ) -> Result<(), ::fidl_next::EncodeError> {
10366        ::fidl_next::munge! {
10367            let Self::Encoded {
10368                id,
10369                object,
10370
10371            } = out;
10372        }
10373
10374        ::fidl_next::Encode::encode(self.id, encoder, id)?;
10375
10376        ::fidl_next::Encode::encode(self.object, encoder, object)?;
10377
10378        Ok(())
10379    }
10380}
10381
10382impl ::fidl_next::EncodableOption for StorageAdminOpenComponentStorageByIdRequest {
10383    type EncodedOption =
10384        ::fidl_next::WireBox<'static, WireStorageAdminOpenComponentStorageByIdRequest<'static>>;
10385}
10386
10387unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenComponentStorageByIdRequest
10388where
10389    ___E: ::fidl_next::Encoder + ?Sized,
10390    StorageAdminOpenComponentStorageByIdRequest: ::fidl_next::Encode<___E>,
10391{
10392    #[inline]
10393    fn encode_option(
10394        this: Option<Self>,
10395        encoder: &mut ___E,
10396        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10397    ) -> Result<(), ::fidl_next::EncodeError> {
10398        if let Some(inner) = this {
10399            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10400            ::fidl_next::WireBox::encode_present(out);
10401        } else {
10402            ::fidl_next::WireBox::encode_absent(out);
10403        }
10404
10405        Ok(())
10406    }
10407}
10408
10409impl<'de> ::fidl_next::FromWire<WireStorageAdminOpenComponentStorageByIdRequest<'de>>
10410    for StorageAdminOpenComponentStorageByIdRequest
10411{
10412    #[inline]
10413    fn from_wire(wire: WireStorageAdminOpenComponentStorageByIdRequest<'de>) -> Self {
10414        Self {
10415            id: ::fidl_next::FromWire::from_wire(wire.id),
10416
10417            object: ::fidl_next::FromWire::from_wire(wire.object),
10418        }
10419    }
10420}
10421
10422/// The wire type corresponding to [`StorageAdminOpenComponentStorageByIdRequest`].
10423#[derive(Debug)]
10424#[repr(C)]
10425pub struct WireStorageAdminOpenComponentStorageByIdRequest<'de> {
10426    pub id: ::fidl_next::WireString<'de>,
10427
10428    pub object:
10429        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
10430}
10431
10432unsafe impl ::fidl_next::Wire for WireStorageAdminOpenComponentStorageByIdRequest<'static> {
10433    type Decoded<'de> = WireStorageAdminOpenComponentStorageByIdRequest<'de>;
10434
10435    #[inline]
10436    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10437        unsafe {
10438            out.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
10439        }
10440    }
10441}
10442
10443unsafe impl<___D> ::fidl_next::Decode<___D>
10444    for WireStorageAdminOpenComponentStorageByIdRequest<'static>
10445where
10446    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10447    ___D: ::fidl_next::Decoder,
10448    ___D: ::fidl_next::fuchsia::HandleDecoder,
10449{
10450    fn decode(
10451        slot: ::fidl_next::Slot<'_, Self>,
10452        decoder: &mut ___D,
10453    ) -> Result<(), ::fidl_next::DecodeError> {
10454        ::fidl_next::munge! {
10455            let Self {
10456                mut id,
10457                mut object,
10458
10459            } = slot;
10460        }
10461
10462        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
10463
10464        let id = unsafe { id.deref_unchecked() };
10465
10466        if id.len() > 64 {
10467            return Err(::fidl_next::DecodeError::VectorTooLong {
10468                size: id.len() as u64,
10469                limit: 64,
10470            });
10471        }
10472
10473        ::fidl_next::Decode::decode(object.as_mut(), decoder)?;
10474
10475        Ok(())
10476    }
10477}
10478
10479/// The type corresponding to the StorageAdmin protocol.
10480#[derive(Debug)]
10481pub struct StorageAdmin;
10482
10483impl ::fidl_next::Discoverable for StorageAdmin {
10484    const PROTOCOL_NAME: &'static str = "fuchsia.component.StorageAdmin";
10485}
10486
10487pub mod storage_admin {
10488    pub mod prelude {
10489        pub use crate::{
10490            StorageAdmin, StorageAdminClientHandler, StorageAdminServerHandler, storage_admin,
10491        };
10492
10493        pub use crate::DeletionError;
10494
10495        pub use crate::Error;
10496
10497        pub use crate::StatusError;
10498
10499        pub use crate::StorageAdminDeleteComponentStorageRequest;
10500
10501        pub use crate::StorageAdminListStorageInRealmRequest;
10502
10503        pub use crate::StorageAdminOpenComponentStorageByIdRequest;
10504
10505        pub use crate::StorageAdminOpenStorageRequest;
10506
10507        pub use crate::StorageAdminDeleteAllStorageContentsResponse;
10508
10509        pub use crate::StorageAdminDeleteComponentStorageResponse;
10510
10511        pub use crate::StorageAdminListStorageInRealmResponse;
10512
10513        pub use crate::StorageAdminOpenComponentStorageByIdResponse;
10514
10515        pub use crate::StorageAdminOpenStorageResponse;
10516
10517        pub use crate::StorageStatus;
10518    }
10519
10520    pub struct OpenStorage;
10521
10522    impl ::fidl_next::Method for OpenStorage {
10523        const ORDINAL: u64 = 7848267339832116087;
10524
10525        type Protocol = crate::StorageAdmin;
10526
10527        type Request = crate::WireStorageAdminOpenStorageRequest<'static>;
10528
10529        type Response = ::fidl_next::WireResult<
10530            'static,
10531            crate::WireStorageAdminOpenStorageResponse,
10532            crate::WireError,
10533        >;
10534    }
10535
10536    pub struct ListStorageInRealm;
10537
10538    impl ::fidl_next::Method for ListStorageInRealm {
10539        const ORDINAL: u64 = 8525152599685368827;
10540
10541        type Protocol = crate::StorageAdmin;
10542
10543        type Request = crate::WireStorageAdminListStorageInRealmRequest<'static>;
10544
10545        type Response = ::fidl_next::WireResult<
10546            'static,
10547            crate::WireStorageAdminListStorageInRealmResponse,
10548            crate::WireError,
10549        >;
10550    }
10551
10552    pub struct OpenComponentStorageById;
10553
10554    impl ::fidl_next::Method for OpenComponentStorageById {
10555        const ORDINAL: u64 = 5188727505160068593;
10556
10557        type Protocol = crate::StorageAdmin;
10558
10559        type Request = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>;
10560
10561        type Response = ::fidl_next::WireResult<
10562            'static,
10563            crate::WireStorageAdminOpenComponentStorageByIdResponse,
10564            crate::WireError,
10565        >;
10566    }
10567
10568    pub struct DeleteComponentStorage;
10569
10570    impl ::fidl_next::Method for DeleteComponentStorage {
10571        const ORDINAL: u64 = 1618975681517712474;
10572
10573        type Protocol = crate::StorageAdmin;
10574
10575        type Request = crate::WireStorageAdminDeleteComponentStorageRequest<'static>;
10576
10577        type Response = ::fidl_next::WireResult<
10578            'static,
10579            crate::WireStorageAdminDeleteComponentStorageResponse,
10580            crate::WireError,
10581        >;
10582    }
10583
10584    pub struct GetStatus;
10585
10586    impl ::fidl_next::Method for GetStatus {
10587        const ORDINAL: u64 = 8586643915409794760;
10588
10589        type Protocol = crate::StorageAdmin;
10590
10591        type Request = ();
10592
10593        type Response = ::fidl_next::WireResult<
10594            'static,
10595            crate::WireStorageStatus<'static>,
10596            crate::WireStatusError,
10597        >;
10598    }
10599
10600    pub struct DeleteAllStorageContents;
10601
10602    impl ::fidl_next::Method for DeleteAllStorageContents {
10603        const ORDINAL: u64 = 3380374508900862683;
10604
10605        type Protocol = crate::StorageAdmin;
10606
10607        type Request = ();
10608
10609        type Response = ::fidl_next::WireResult<
10610            'static,
10611            crate::WireStorageAdminDeleteAllStorageContentsResponse,
10612            crate::WireDeletionError,
10613        >;
10614    }
10615
10616    mod ___detail {
10617
10618        pub struct OpenStorage<T0, T1> {
10619            relative_moniker: T0,
10620
10621            object: T1,
10622        }
10623
10624        impl<T0, T1> ::fidl_next::Encodable for OpenStorage<T0, T1>
10625        where
10626            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
10627            T1: ::fidl_next::Encodable<
10628                    Encoded = ::fidl_next::ServerEnd<
10629                        ::fidl_next_fuchsia_io::Node,
10630                        ::fidl_next::fuchsia::WireChannel,
10631                    >,
10632                >,
10633        {
10634            type Encoded = crate::WireStorageAdminOpenStorageRequest<'static>;
10635        }
10636
10637        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenStorage<T0, T1>
10638        where
10639            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10640            ___E: ::fidl_next::Encoder,
10641            ___E: ::fidl_next::fuchsia::HandleEncoder,
10642            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
10643            T1: ::fidl_next::Encode<
10644                    ___E,
10645                    Encoded = ::fidl_next::ServerEnd<
10646                        ::fidl_next_fuchsia_io::Node,
10647                        ::fidl_next::fuchsia::WireChannel,
10648                    >,
10649                >,
10650        {
10651            #[inline]
10652            fn encode(
10653                self,
10654                encoder: &mut ___E,
10655                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10656            ) -> Result<(), ::fidl_next::EncodeError> {
10657                ::fidl_next::munge! {
10658                    let Self::Encoded {
10659                        relative_moniker,
10660                        object,
10661
10662                    } = out;
10663                }
10664
10665                ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
10666
10667                ::fidl_next::Encode::encode(self.object, encoder, object)?;
10668
10669                Ok(())
10670            }
10671        }
10672
10673        pub struct ListStorageInRealm<T0, T1> {
10674            relative_moniker: T0,
10675
10676            iterator: T1,
10677        }
10678
10679        impl<T0, T1> ::fidl_next::Encodable for ListStorageInRealm<T0, T1>
10680        where
10681            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
10682            T1: ::fidl_next::Encodable<
10683                    Encoded = ::fidl_next::ServerEnd<
10684                        crate::StorageIterator,
10685                        ::fidl_next::fuchsia::WireChannel,
10686                    >,
10687                >,
10688        {
10689            type Encoded = crate::WireStorageAdminListStorageInRealmRequest<'static>;
10690        }
10691
10692        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListStorageInRealm<T0, T1>
10693        where
10694            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10695            ___E: ::fidl_next::Encoder,
10696            ___E: ::fidl_next::fuchsia::HandleEncoder,
10697            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
10698            T1: ::fidl_next::Encode<
10699                    ___E,
10700                    Encoded = ::fidl_next::ServerEnd<
10701                        crate::StorageIterator,
10702                        ::fidl_next::fuchsia::WireChannel,
10703                    >,
10704                >,
10705        {
10706            #[inline]
10707            fn encode(
10708                self,
10709                encoder: &mut ___E,
10710                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10711            ) -> Result<(), ::fidl_next::EncodeError> {
10712                ::fidl_next::munge! {
10713                    let Self::Encoded {
10714                        relative_moniker,
10715                        iterator,
10716
10717                    } = out;
10718                }
10719
10720                ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
10721
10722                ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
10723
10724                Ok(())
10725            }
10726        }
10727
10728        pub struct OpenComponentStorageById<T0, T1> {
10729            id: T0,
10730
10731            object: T1,
10732        }
10733
10734        impl<T0, T1> ::fidl_next::Encodable for OpenComponentStorageById<T0, T1>
10735        where
10736            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
10737            T1: ::fidl_next::Encodable<
10738                    Encoded = ::fidl_next::ServerEnd<
10739                        ::fidl_next_fuchsia_io::Node,
10740                        ::fidl_next::fuchsia::WireChannel,
10741                    >,
10742                >,
10743        {
10744            type Encoded = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>;
10745        }
10746
10747        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenComponentStorageById<T0, T1>
10748        where
10749            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10750            ___E: ::fidl_next::Encoder,
10751            ___E: ::fidl_next::fuchsia::HandleEncoder,
10752            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
10753            T1: ::fidl_next::Encode<
10754                    ___E,
10755                    Encoded = ::fidl_next::ServerEnd<
10756                        ::fidl_next_fuchsia_io::Node,
10757                        ::fidl_next::fuchsia::WireChannel,
10758                    >,
10759                >,
10760        {
10761            #[inline]
10762            fn encode(
10763                self,
10764                encoder: &mut ___E,
10765                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10766            ) -> Result<(), ::fidl_next::EncodeError> {
10767                ::fidl_next::munge! {
10768                    let Self::Encoded {
10769                        id,
10770                        object,
10771
10772                    } = out;
10773                }
10774
10775                ::fidl_next::Encode::encode(self.id, encoder, id)?;
10776
10777                ::fidl_next::Encode::encode(self.object, encoder, object)?;
10778
10779                Ok(())
10780            }
10781        }
10782
10783        pub struct DeleteComponentStorage<T0> {
10784            relative_moniker: T0,
10785        }
10786
10787        impl<T0> ::fidl_next::Encodable for DeleteComponentStorage<T0>
10788        where
10789            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
10790        {
10791            type Encoded = crate::WireStorageAdminDeleteComponentStorageRequest<'static>;
10792        }
10793
10794        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DeleteComponentStorage<T0>
10795        where
10796            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10797            ___E: ::fidl_next::Encoder,
10798            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
10799        {
10800            #[inline]
10801            fn encode(
10802                self,
10803                encoder: &mut ___E,
10804                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10805            ) -> Result<(), ::fidl_next::EncodeError> {
10806                ::fidl_next::munge! {
10807                    let Self::Encoded {
10808                        relative_moniker,
10809
10810                    } = out;
10811                }
10812
10813                ::fidl_next::Encode::encode(self.relative_moniker, encoder, relative_moniker)?;
10814
10815                Ok(())
10816            }
10817        }
10818
10819        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageAdmin
10820        where
10821            ___T: ::fidl_next::Transport,
10822        {
10823            type ClientSender = StorageAdminClientSender<___T>;
10824            type ServerSender = StorageAdminServerSender<___T>;
10825        }
10826
10827        /// The client sender for the `StorageAdmin` protocol.
10828        #[repr(transparent)]
10829        pub struct StorageAdminClientSender<___T: ::fidl_next::Transport> {
10830            #[allow(dead_code)]
10831            sender: ::fidl_next::protocol::ClientSender<___T>,
10832        }
10833
10834        impl<___T> StorageAdminClientSender<___T>
10835        where
10836            ___T: ::fidl_next::Transport,
10837        {
10838            #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
10839            pub fn open_storage(
10840                &self,
10841
10842                relative_moniker: impl ::fidl_next::Encode<
10843                    <___T as ::fidl_next::Transport>::SendBuffer,
10844                    Encoded = ::fidl_next::WireString<'static>,
10845                >,
10846
10847                object: impl ::fidl_next::Encode<
10848                    <___T as ::fidl_next::Transport>::SendBuffer,
10849                    Encoded = ::fidl_next::ServerEnd<
10850                        ::fidl_next_fuchsia_io::Node,
10851                        ::fidl_next::fuchsia::WireChannel,
10852                    >,
10853                >,
10854            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
10855            where
10856                <___T as ::fidl_next::Transport>::SendBuffer:
10857                    ::fidl_next::encoder::InternalHandleEncoder,
10858                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10859                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10860            {
10861                self.open_storage_with(OpenStorage { relative_moniker, object })
10862            }
10863
10864            #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
10865            pub fn open_storage_with<___R>(
10866                &self,
10867                request: ___R,
10868            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
10869            where
10870                ___R: ::fidl_next::Encode<
10871                        <___T as ::fidl_next::Transport>::SendBuffer,
10872                        Encoded = crate::WireStorageAdminOpenStorageRequest<'static>,
10873                    >,
10874            {
10875                ::fidl_next::TwoWayFuture::from_untyped(
10876                    self.sender.send_two_way(7848267339832116087, request),
10877                )
10878            }
10879
10880            #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
10881            pub fn list_storage_in_realm(
10882                &self,
10883
10884                relative_moniker: impl ::fidl_next::Encode<
10885                    <___T as ::fidl_next::Transport>::SendBuffer,
10886                    Encoded = ::fidl_next::WireString<'static>,
10887                >,
10888
10889                iterator: impl ::fidl_next::Encode<
10890                    <___T as ::fidl_next::Transport>::SendBuffer,
10891                    Encoded = ::fidl_next::ServerEnd<
10892                        crate::StorageIterator,
10893                        ::fidl_next::fuchsia::WireChannel,
10894                    >,
10895                >,
10896            ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
10897            where
10898                <___T as ::fidl_next::Transport>::SendBuffer:
10899                    ::fidl_next::encoder::InternalHandleEncoder,
10900                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10901                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10902            {
10903                self.list_storage_in_realm_with(ListStorageInRealm { relative_moniker, iterator })
10904            }
10905
10906            #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
10907            pub fn list_storage_in_realm_with<___R>(
10908                &self,
10909                request: ___R,
10910            ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
10911            where
10912                ___R: ::fidl_next::Encode<
10913                        <___T as ::fidl_next::Transport>::SendBuffer,
10914                        Encoded = crate::WireStorageAdminListStorageInRealmRequest<'static>,
10915                    >,
10916            {
10917                ::fidl_next::TwoWayFuture::from_untyped(
10918                    self.sender.send_two_way(8525152599685368827, request),
10919                )
10920            }
10921
10922            #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
10923            pub fn open_component_storage_by_id(
10924                &self,
10925
10926                id: impl ::fidl_next::Encode<
10927                    <___T as ::fidl_next::Transport>::SendBuffer,
10928                    Encoded = ::fidl_next::WireString<'static>,
10929                >,
10930
10931                object: impl ::fidl_next::Encode<
10932                    <___T as ::fidl_next::Transport>::SendBuffer,
10933                    Encoded = ::fidl_next::ServerEnd<
10934                        ::fidl_next_fuchsia_io::Node,
10935                        ::fidl_next::fuchsia::WireChannel,
10936                    >,
10937                >,
10938            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
10939            where
10940                <___T as ::fidl_next::Transport>::SendBuffer:
10941                    ::fidl_next::encoder::InternalHandleEncoder,
10942                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10943                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
10944            {
10945                self.open_component_storage_by_id_with(OpenComponentStorageById { id, object })
10946            }
10947
10948            #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
10949            pub fn open_component_storage_by_id_with<___R>(
10950                &self,
10951                request: ___R,
10952            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
10953            where
10954                ___R: ::fidl_next::Encode<
10955                        <___T as ::fidl_next::Transport>::SendBuffer,
10956                        Encoded = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>,
10957                    >,
10958            {
10959                ::fidl_next::TwoWayFuture::from_untyped(
10960                    self.sender.send_two_way(5188727505160068593, request),
10961                )
10962            }
10963
10964            #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
10965            pub fn delete_component_storage(
10966                &self,
10967
10968                relative_moniker: impl ::fidl_next::Encode<
10969                    <___T as ::fidl_next::Transport>::SendBuffer,
10970                    Encoded = ::fidl_next::WireString<'static>,
10971                >,
10972            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
10973            where
10974                <___T as ::fidl_next::Transport>::SendBuffer:
10975                    ::fidl_next::encoder::InternalHandleEncoder,
10976                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
10977            {
10978                self.delete_component_storage_with(DeleteComponentStorage { relative_moniker })
10979            }
10980
10981            #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
10982            pub fn delete_component_storage_with<___R>(
10983                &self,
10984                request: ___R,
10985            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
10986            where
10987                ___R: ::fidl_next::Encode<
10988                        <___T as ::fidl_next::Transport>::SendBuffer,
10989                        Encoded = crate::WireStorageAdminDeleteComponentStorageRequest<'static>,
10990                    >,
10991            {
10992                ::fidl_next::TwoWayFuture::from_untyped(
10993                    self.sender.send_two_way(1618975681517712474, request),
10994                )
10995            }
10996
10997            #[doc = " Get the current status of the storage.\n"]
10998            pub fn get_status(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetStatus, ___T> {
10999                ::fidl_next::TwoWayFuture::from_untyped(
11000                    self.sender.send_two_way(8586643915409794760, ()),
11001                )
11002            }
11003
11004            #[doc = " Deletes the contents of all the storage. Storage directories are\n retained so any components using storage will be able to continue using\n it to create new files and directories.\n\n Returns Error::INTERNAL only if no storage at all could be cleared.\n Returns successfully even if some errors happen during the deletion\n progress.\n"]
11005            pub fn delete_all_storage_contents(
11006                &self,
11007            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteAllStorageContents, ___T> {
11008                ::fidl_next::TwoWayFuture::from_untyped(
11009                    self.sender.send_two_way(3380374508900862683, ()),
11010                )
11011            }
11012        }
11013
11014        /// The server sender for the `StorageAdmin` protocol.
11015        #[repr(transparent)]
11016        pub struct StorageAdminServerSender<___T: ::fidl_next::Transport> {
11017            sender: ::fidl_next::protocol::ServerSender<___T>,
11018        }
11019
11020        impl<___T> StorageAdminServerSender<___T> where ___T: ::fidl_next::Transport {}
11021    }
11022}
11023
11024/// A client handler for the StorageAdmin protocol.
11025///
11026/// See [`StorageAdmin`] for more details.
11027pub trait StorageAdminClientHandler<
11028    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11029    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11030>
11031{
11032}
11033
11034impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageAdmin
11035where
11036    ___H: StorageAdminClientHandler<___T> + ::core::marker::Send,
11037    ___T: ::fidl_next::Transport,
11038    <storage_admin::OpenStorage as ::fidl_next::Method>::Response:
11039        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11040    <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Response:
11041        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11042    <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Response:
11043        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11044    <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Response:
11045        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11046    <storage_admin::GetStatus as ::fidl_next::Method>::Response:
11047        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11048    <storage_admin::DeleteAllStorageContents as ::fidl_next::Method>::Response:
11049        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11050{
11051    async fn on_event(
11052        handler: &mut ___H,
11053        sender: &::fidl_next::ClientSender<Self, ___T>,
11054        ordinal: u64,
11055        buffer: ___T::RecvBuffer,
11056    ) {
11057        match ordinal {
11058            ordinal => sender.close(),
11059        }
11060    }
11061}
11062
11063/// A server handler for the StorageAdmin protocol.
11064///
11065/// See [`StorageAdmin`] for more details.
11066pub trait StorageAdminServerHandler<
11067    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11068    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11069>
11070{
11071    #[doc = " Opens the isolated directory for the given component. The provided\n moniker is relative to the component that declares the storage\n capability. Creates the backing sub-directory for this storage if it\n hasn\'t yet been created.\n"]
11072    fn open_storage(
11073        &mut self,
11074        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11075
11076        request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
11077
11078        responder: ::fidl_next::Responder<storage_admin::OpenStorage>,
11079    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11080
11081    #[doc = " Lists the descendant components under the specified realm that use the\n storage capability. The provided moniker is relative to the component\n that declares the storage capability.\n\n Returns INSTANCE_NOT_FOUND if the realm does not exist, and INVALID_ARGS\n if |relative_moniker| is malformed.\n"]
11082    fn list_storage_in_realm(
11083        &mut self,
11084        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11085
11086        request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
11087
11088        responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm>,
11089    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11090
11091    #[doc = " Opens the isolated directory for the given storage ID. Creates the\n backing sub-directory for this storage if it hasn\'t yet been created.\n"]
11092    fn open_component_storage_by_id(
11093        &mut self,
11094        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11095
11096        request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
11097
11098        responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById>,
11099    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11100
11101    #[doc = " Deletes the contents of the storage for this component. Preserves the\n component\'s subdirectory itself within the storage backing directory.\n The provided moniker is relative to the component that declares the\n storage capability.\n"]
11102    fn delete_component_storage(
11103        &mut self,
11104        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11105
11106        request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
11107
11108        responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage>,
11109    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11110
11111    #[doc = " Get the current status of the storage.\n"]
11112    fn get_status(
11113        &mut self,
11114        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11115
11116        responder: ::fidl_next::Responder<storage_admin::GetStatus>,
11117    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11118
11119    #[doc = " Deletes the contents of all the storage. Storage directories are\n retained so any components using storage will be able to continue using\n it to create new files and directories.\n\n Returns Error::INTERNAL only if no storage at all could be cleared.\n Returns successfully even if some errors happen during the deletion\n progress.\n"]
11120    fn delete_all_storage_contents(
11121        &mut self,
11122        sender: &::fidl_next::ServerSender<StorageAdmin, ___T>,
11123
11124        responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents>,
11125    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11126}
11127
11128impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageAdmin
11129where
11130    ___H: StorageAdminServerHandler<___T> + ::core::marker::Send,
11131    ___T: ::fidl_next::Transport,
11132    <storage_admin::OpenStorage as ::fidl_next::Method>::Request:
11133        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11134    <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Request:
11135        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11136    <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Request:
11137        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11138    <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Request:
11139        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11140{
11141    async fn on_one_way(
11142        handler: &mut ___H,
11143        sender: &::fidl_next::ServerSender<Self, ___T>,
11144        ordinal: u64,
11145        buffer: ___T::RecvBuffer,
11146    ) {
11147        match ordinal {
11148            ordinal => sender.close(),
11149        }
11150    }
11151
11152    async fn on_two_way(
11153        handler: &mut ___H,
11154        sender: &::fidl_next::ServerSender<Self, ___T>,
11155        ordinal: u64,
11156        buffer: ___T::RecvBuffer,
11157        responder: ::fidl_next::protocol::Responder,
11158    ) {
11159        match ordinal {
11160            7848267339832116087 => {
11161                let responder = ::fidl_next::Responder::from_untyped(responder);
11162
11163                match ::fidl_next::DecoderExt::decode(buffer) {
11164                    Ok(decoded) => handler.open_storage(sender, decoded, responder).await,
11165                    Err(e) => sender.close(),
11166                }
11167            }
11168
11169            8525152599685368827 => {
11170                let responder = ::fidl_next::Responder::from_untyped(responder);
11171
11172                match ::fidl_next::DecoderExt::decode(buffer) {
11173                    Ok(decoded) => handler.list_storage_in_realm(sender, decoded, responder).await,
11174                    Err(e) => sender.close(),
11175                }
11176            }
11177
11178            5188727505160068593 => {
11179                let responder = ::fidl_next::Responder::from_untyped(responder);
11180
11181                match ::fidl_next::DecoderExt::decode(buffer) {
11182                    Ok(decoded) => {
11183                        handler.open_component_storage_by_id(sender, decoded, responder).await
11184                    }
11185                    Err(e) => sender.close(),
11186                }
11187            }
11188
11189            1618975681517712474 => {
11190                let responder = ::fidl_next::Responder::from_untyped(responder);
11191
11192                match ::fidl_next::DecoderExt::decode(buffer) {
11193                    Ok(decoded) => {
11194                        handler.delete_component_storage(sender, decoded, responder).await
11195                    }
11196                    Err(e) => sender.close(),
11197                }
11198            }
11199
11200            8586643915409794760 => {
11201                let responder = ::fidl_next::Responder::from_untyped(responder);
11202
11203                handler.get_status(sender, responder).await;
11204            }
11205
11206            3380374508900862683 => {
11207                let responder = ::fidl_next::Responder::from_untyped(responder);
11208
11209                handler.delete_all_storage_contents(sender, responder).await;
11210            }
11211
11212            ordinal => sender.close(),
11213        }
11214    }
11215}
11216
11217#[derive(Clone, Debug)]
11218pub struct StorageIteratorNextResponse {
11219    pub relative_monikers: Vec<String>,
11220}
11221
11222impl ::fidl_next::Encodable for StorageIteratorNextResponse {
11223    type Encoded = WireStorageIteratorNextResponse<'static>;
11224}
11225
11226unsafe impl<___E> ::fidl_next::Encode<___E> for StorageIteratorNextResponse
11227where
11228    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11229    ___E: ::fidl_next::Encoder,
11230{
11231    #[inline]
11232    fn encode(
11233        self,
11234        encoder: &mut ___E,
11235        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11236    ) -> Result<(), ::fidl_next::EncodeError> {
11237        ::fidl_next::munge! {
11238            let Self::Encoded {
11239                relative_monikers,
11240
11241            } = out;
11242        }
11243
11244        ::fidl_next::Encode::encode(self.relative_monikers, encoder, relative_monikers)?;
11245
11246        Ok(())
11247    }
11248}
11249
11250unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageIteratorNextResponse
11251where
11252    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11253    ___E: ::fidl_next::Encoder,
11254{
11255    #[inline]
11256    fn encode_ref(
11257        &self,
11258        encoder: &mut ___E,
11259        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11260    ) -> Result<(), ::fidl_next::EncodeError> {
11261        ::fidl_next::munge! {
11262            let Self::Encoded {
11263                relative_monikers,
11264
11265            } = out;
11266        }
11267
11268        ::fidl_next::EncodeRef::encode_ref(&self.relative_monikers, encoder, relative_monikers)?;
11269
11270        Ok(())
11271    }
11272}
11273
11274impl ::fidl_next::EncodableOption for StorageIteratorNextResponse {
11275    type EncodedOption = ::fidl_next::WireBox<'static, WireStorageIteratorNextResponse<'static>>;
11276}
11277
11278unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageIteratorNextResponse
11279where
11280    ___E: ::fidl_next::Encoder + ?Sized,
11281    StorageIteratorNextResponse: ::fidl_next::Encode<___E>,
11282{
11283    #[inline]
11284    fn encode_option(
11285        this: Option<Self>,
11286        encoder: &mut ___E,
11287        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11288    ) -> Result<(), ::fidl_next::EncodeError> {
11289        if let Some(inner) = this {
11290            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11291            ::fidl_next::WireBox::encode_present(out);
11292        } else {
11293            ::fidl_next::WireBox::encode_absent(out);
11294        }
11295
11296        Ok(())
11297    }
11298}
11299
11300unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageIteratorNextResponse
11301where
11302    ___E: ::fidl_next::Encoder + ?Sized,
11303    StorageIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
11304{
11305    #[inline]
11306    fn encode_option_ref(
11307        this: Option<&Self>,
11308        encoder: &mut ___E,
11309        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11310    ) -> Result<(), ::fidl_next::EncodeError> {
11311        if let Some(inner) = this {
11312            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11313            ::fidl_next::WireBox::encode_present(out);
11314        } else {
11315            ::fidl_next::WireBox::encode_absent(out);
11316        }
11317
11318        Ok(())
11319    }
11320}
11321
11322impl<'de> ::fidl_next::FromWire<WireStorageIteratorNextResponse<'de>>
11323    for StorageIteratorNextResponse
11324{
11325    #[inline]
11326    fn from_wire(wire: WireStorageIteratorNextResponse<'de>) -> Self {
11327        Self { relative_monikers: ::fidl_next::FromWire::from_wire(wire.relative_monikers) }
11328    }
11329}
11330
11331impl<'de> ::fidl_next::FromWireRef<WireStorageIteratorNextResponse<'de>>
11332    for StorageIteratorNextResponse
11333{
11334    #[inline]
11335    fn from_wire_ref(wire: &WireStorageIteratorNextResponse<'de>) -> Self {
11336        Self { relative_monikers: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_monikers) }
11337    }
11338}
11339
11340/// The wire type corresponding to [`StorageIteratorNextResponse`].
11341#[derive(Debug)]
11342#[repr(C)]
11343pub struct WireStorageIteratorNextResponse<'de> {
11344    pub relative_monikers: ::fidl_next::WireVector<'de, ::fidl_next::WireString<'de>>,
11345}
11346
11347unsafe impl ::fidl_next::Wire for WireStorageIteratorNextResponse<'static> {
11348    type Decoded<'de> = WireStorageIteratorNextResponse<'de>;
11349
11350    #[inline]
11351    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
11352}
11353
11354unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageIteratorNextResponse<'static>
11355where
11356    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11357    ___D: ::fidl_next::Decoder,
11358{
11359    fn decode(
11360        slot: ::fidl_next::Slot<'_, Self>,
11361        decoder: &mut ___D,
11362    ) -> Result<(), ::fidl_next::DecodeError> {
11363        ::fidl_next::munge! {
11364            let Self {
11365                mut relative_monikers,
11366
11367            } = slot;
11368        }
11369
11370        ::fidl_next::Decode::decode(relative_monikers.as_mut(), decoder)?;
11371
11372        Ok(())
11373    }
11374}
11375
11376/// The type corresponding to the StorageIterator protocol.
11377#[doc = " An iterator protocol for returning a set of components using a storage\n capability. See |StorageAdmin.ListStorageInRealm| for more information.\n"]
11378#[derive(Debug)]
11379pub struct StorageIterator;
11380
11381pub mod storage_iterator {
11382    pub mod prelude {
11383        pub use crate::{
11384            StorageIterator, StorageIteratorClientHandler, StorageIteratorServerHandler,
11385            storage_iterator,
11386        };
11387
11388        pub use crate::StorageIteratorNextResponse;
11389    }
11390
11391    pub struct Next;
11392
11393    impl ::fidl_next::Method for Next {
11394        const ORDINAL: u64 = 8821181615713557362;
11395
11396        type Protocol = crate::StorageIterator;
11397
11398        type Request = ();
11399
11400        type Response = crate::WireStorageIteratorNextResponse<'static>;
11401    }
11402
11403    mod ___detail {
11404
11405        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageIterator
11406        where
11407            ___T: ::fidl_next::Transport,
11408        {
11409            type ClientSender = StorageIteratorClientSender<___T>;
11410            type ServerSender = StorageIteratorServerSender<___T>;
11411        }
11412
11413        /// The client sender for the `StorageIterator` protocol.
11414        #[repr(transparent)]
11415        pub struct StorageIteratorClientSender<___T: ::fidl_next::Transport> {
11416            #[allow(dead_code)]
11417            sender: ::fidl_next::protocol::ClientSender<___T>,
11418        }
11419
11420        impl<___T> StorageIteratorClientSender<___T>
11421        where
11422            ___T: ::fidl_next::Transport,
11423        {
11424            #[doc = " Retrieve the next set of components using the storage capability. The\n returned monikers are relative to the component that declares the\n storage capability. Returns an empty vector after all components have\n been returned.\n"]
11425            pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
11426                ::fidl_next::TwoWayFuture::from_untyped(
11427                    self.sender.send_two_way(8821181615713557362, ()),
11428                )
11429            }
11430        }
11431
11432        /// The server sender for the `StorageIterator` protocol.
11433        #[repr(transparent)]
11434        pub struct StorageIteratorServerSender<___T: ::fidl_next::Transport> {
11435            sender: ::fidl_next::protocol::ServerSender<___T>,
11436        }
11437
11438        impl<___T> StorageIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
11439    }
11440}
11441
11442/// A client handler for the StorageIterator protocol.
11443///
11444/// See [`StorageIterator`] for more details.
11445pub trait StorageIteratorClientHandler<
11446    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11447    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11448>
11449{
11450}
11451
11452impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageIterator
11453where
11454    ___H: StorageIteratorClientHandler<___T> + ::core::marker::Send,
11455    ___T: ::fidl_next::Transport,
11456    <storage_iterator::Next as ::fidl_next::Method>::Response:
11457        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11458{
11459    async fn on_event(
11460        handler: &mut ___H,
11461        sender: &::fidl_next::ClientSender<Self, ___T>,
11462        ordinal: u64,
11463        buffer: ___T::RecvBuffer,
11464    ) {
11465        match ordinal {
11466            ordinal => sender.close(),
11467        }
11468    }
11469}
11470
11471/// A server handler for the StorageIterator protocol.
11472///
11473/// See [`StorageIterator`] for more details.
11474pub trait StorageIteratorServerHandler<
11475    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11476    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11477>
11478{
11479    #[doc = " Retrieve the next set of components using the storage capability. The\n returned monikers are relative to the component that declares the\n storage capability. Returns an empty vector after all components have\n been returned.\n"]
11480    fn next(
11481        &mut self,
11482        sender: &::fidl_next::ServerSender<StorageIterator, ___T>,
11483
11484        responder: ::fidl_next::Responder<storage_iterator::Next>,
11485    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11486}
11487
11488impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageIterator
11489where
11490    ___H: StorageIteratorServerHandler<___T> + ::core::marker::Send,
11491    ___T: ::fidl_next::Transport,
11492{
11493    async fn on_one_way(
11494        handler: &mut ___H,
11495        sender: &::fidl_next::ServerSender<Self, ___T>,
11496        ordinal: u64,
11497        buffer: ___T::RecvBuffer,
11498    ) {
11499        match ordinal {
11500            ordinal => sender.close(),
11501        }
11502    }
11503
11504    async fn on_two_way(
11505        handler: &mut ___H,
11506        sender: &::fidl_next::ServerSender<Self, ___T>,
11507        ordinal: u64,
11508        buffer: ___T::RecvBuffer,
11509        responder: ::fidl_next::protocol::Responder,
11510    ) {
11511        match ordinal {
11512            8821181615713557362 => {
11513                let responder = ::fidl_next::Responder::from_untyped(responder);
11514
11515                handler.next(sender, responder).await;
11516            }
11517
11518            ordinal => sender.close(),
11519        }
11520    }
11521}
11522
11523pub type ChildName = String;
11524
11525/// The wire type corresponding to [`ChildName`].
11526pub type WireChildName<'de> = ::fidl_next::WireString<'de>;
11527
11528pub type UrlScheme = String;
11529
11530/// The wire type corresponding to [`UrlScheme`].
11531pub type WireUrlScheme<'de> = ::fidl_next::WireString<'de>;
11532
11533/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
11534pub mod compat {
11535
11536    #[cfg(target_os = "fuchsia")]
11537    /// An alias for a client sender over `zx::Channel` for the `Binder`
11538    /// protocol.
11539    pub type BinderProxy = ::fidl_next::ClientSender<crate::Binder>;
11540
11541    impl ::fidl_next::CompatFrom<crate::Binder> for ::fidl_fuchsia_component::BinderMarker {
11542        fn compat_from(_: crate::Binder) -> Self {
11543            Self
11544        }
11545    }
11546
11547    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::BinderMarker> for crate::Binder {
11548        fn compat_from(_: ::fidl_fuchsia_component::BinderMarker) -> Self {
11549            Self
11550        }
11551    }
11552
11553    #[cfg(target_os = "fuchsia")]
11554
11555    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::BinderProxy> for crate::Binder {
11556        fn client_compat_from(
11557            proxy: ::fidl_fuchsia_component::BinderProxy,
11558        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
11559            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
11560            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
11561            ::fidl_next::Client::new(client_end)
11562        }
11563    }
11564
11565    impl ::fidl_next::CompatFrom<crate::CapabilityRequestedPayload>
11566        for ::fidl_fuchsia_component::CapabilityRequestedPayload
11567    {
11568        fn compat_from(value: crate::CapabilityRequestedPayload) -> Self {
11569            Self {
11570                name: ::fidl_next::CompatFrom::compat_from(value.name),
11571
11572                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
11573
11574                __source_breaking: ::fidl::marker::SourceBreaking,
11575            }
11576        }
11577    }
11578
11579    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CapabilityRequestedPayload>
11580        for crate::CapabilityRequestedPayload
11581    {
11582        fn compat_from(value: ::fidl_fuchsia_component::CapabilityRequestedPayload) -> Self {
11583            Self {
11584                name: ::fidl_next::CompatFrom::compat_from(value.name),
11585
11586                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
11587            }
11588        }
11589    }
11590
11591    impl ::fidl_next::CompatFrom<crate::ChildIteratorNextResponse>
11592        for ::fidl_fuchsia_component::ChildIteratorNextResponse
11593    {
11594        #[inline]
11595        fn compat_from(value: crate::ChildIteratorNextResponse) -> Self {
11596            Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
11597        }
11598    }
11599
11600    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorNextResponse>
11601        for crate::ChildIteratorNextResponse
11602    {
11603        #[inline]
11604        fn compat_from(value: ::fidl_fuchsia_component::ChildIteratorNextResponse) -> Self {
11605            Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
11606        }
11607    }
11608
11609    #[cfg(target_os = "fuchsia")]
11610    /// An alias for a client sender over `zx::Channel` for the `ChildIterator`
11611    /// protocol.
11612    pub type ChildIteratorProxy = ::fidl_next::ClientSender<crate::ChildIterator>;
11613
11614    impl ::fidl_next::CompatFrom<crate::ChildIterator>
11615        for ::fidl_fuchsia_component::ChildIteratorMarker
11616    {
11617        fn compat_from(_: crate::ChildIterator) -> Self {
11618            Self
11619        }
11620    }
11621
11622    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorMarker>
11623        for crate::ChildIterator
11624    {
11625        fn compat_from(_: ::fidl_fuchsia_component::ChildIteratorMarker) -> Self {
11626            Self
11627        }
11628    }
11629
11630    #[cfg(target_os = "fuchsia")]
11631
11632    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ChildIteratorProxy>
11633        for crate::ChildIterator
11634    {
11635        fn client_compat_from(
11636            proxy: ::fidl_fuchsia_component::ChildIteratorProxy,
11637        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
11638            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
11639            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
11640            ::fidl_next::Client::new(client_end)
11641        }
11642    }
11643
11644    impl ::fidl_next::CompatFrom<crate::ControllerIsStartedResponse>
11645        for ::fidl_fuchsia_component::ControllerIsStartedResponse
11646    {
11647        #[inline]
11648        fn compat_from(value: crate::ControllerIsStartedResponse) -> Self {
11649            Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
11650        }
11651    }
11652
11653    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerIsStartedResponse>
11654        for crate::ControllerIsStartedResponse
11655    {
11656        #[inline]
11657        fn compat_from(value: ::fidl_fuchsia_component::ControllerIsStartedResponse) -> Self {
11658            Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
11659        }
11660    }
11661
11662    impl ::fidl_next::CompatFrom<crate::Error> for ::fidl_fuchsia_component::Error {
11663        fn compat_from(value: crate::Error) -> Self {
11664            match value {
11665                crate::Error::Internal => Self::Internal,
11666
11667                crate::Error::InvalidArguments => Self::InvalidArguments,
11668
11669                crate::Error::Unsupported => Self::Unsupported,
11670
11671                crate::Error::AccessDenied => Self::AccessDenied,
11672
11673                crate::Error::InstanceNotFound => Self::InstanceNotFound,
11674
11675                crate::Error::InstanceAlreadyExists => Self::InstanceAlreadyExists,
11676
11677                crate::Error::InstanceCannotStart => Self::InstanceCannotStart,
11678
11679                crate::Error::InstanceCannotResolve => Self::InstanceCannotResolve,
11680
11681                crate::Error::CollectionNotFound => Self::CollectionNotFound,
11682
11683                crate::Error::ResourceUnavailable => Self::ResourceUnavailable,
11684
11685                crate::Error::InstanceDied => Self::InstanceDied,
11686
11687                crate::Error::ResourceNotFound => Self::ResourceNotFound,
11688
11689                crate::Error::InstanceCannotUnresolve => Self::InstanceCannotUnresolve,
11690
11691                crate::Error::InstanceAlreadyStarted => Self::InstanceAlreadyStarted,
11692
11693                crate::Error::UnknownOrdinal_(unknown_ordinal) => {
11694                    Self::__SourceBreaking { unknown_ordinal }
11695                }
11696            }
11697        }
11698    }
11699
11700    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Error> for crate::Error {
11701        fn compat_from(value: ::fidl_fuchsia_component::Error) -> Self {
11702            match value {
11703                ::fidl_fuchsia_component::Error::Internal => Self::Internal,
11704
11705                ::fidl_fuchsia_component::Error::InvalidArguments => Self::InvalidArguments,
11706
11707                ::fidl_fuchsia_component::Error::Unsupported => Self::Unsupported,
11708
11709                ::fidl_fuchsia_component::Error::AccessDenied => Self::AccessDenied,
11710
11711                ::fidl_fuchsia_component::Error::InstanceNotFound => Self::InstanceNotFound,
11712
11713                ::fidl_fuchsia_component::Error::InstanceAlreadyExists => {
11714                    Self::InstanceAlreadyExists
11715                }
11716
11717                ::fidl_fuchsia_component::Error::InstanceCannotStart => Self::InstanceCannotStart,
11718
11719                ::fidl_fuchsia_component::Error::InstanceCannotResolve => {
11720                    Self::InstanceCannotResolve
11721                }
11722
11723                ::fidl_fuchsia_component::Error::CollectionNotFound => Self::CollectionNotFound,
11724
11725                ::fidl_fuchsia_component::Error::ResourceUnavailable => Self::ResourceUnavailable,
11726
11727                ::fidl_fuchsia_component::Error::InstanceDied => Self::InstanceDied,
11728
11729                ::fidl_fuchsia_component::Error::ResourceNotFound => Self::ResourceNotFound,
11730
11731                ::fidl_fuchsia_component::Error::InstanceCannotUnresolve => {
11732                    Self::InstanceCannotUnresolve
11733                }
11734
11735                ::fidl_fuchsia_component::Error::InstanceAlreadyStarted => {
11736                    Self::InstanceAlreadyStarted
11737                }
11738
11739                ::fidl_fuchsia_component::Error::__SourceBreaking { unknown_ordinal: value } => {
11740                    Self::UnknownOrdinal_(value)
11741                }
11742            }
11743        }
11744    }
11745
11746    impl ::fidl_next::CompatFrom<crate::ControllerGetExposedDictionaryResponse>
11747        for ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse
11748    {
11749        #[inline]
11750        fn compat_from(value: crate::ControllerGetExposedDictionaryResponse) -> Self {
11751            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
11752        }
11753    }
11754
11755    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse>
11756        for crate::ControllerGetExposedDictionaryResponse
11757    {
11758        #[inline]
11759        fn compat_from(
11760            value: ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse,
11761        ) -> Self {
11762            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
11763        }
11764    }
11765
11766    impl ::fidl_next::CompatFrom<crate::NamespaceEntry> for ::fidl_fuchsia_component::NamespaceEntry {
11767        fn compat_from(value: crate::NamespaceEntry) -> Self {
11768            Self {
11769                path: ::fidl_next::CompatFrom::compat_from(value.path),
11770
11771                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
11772
11773                __source_breaking: ::fidl::marker::SourceBreaking,
11774            }
11775        }
11776    }
11777
11778    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceEntry> for crate::NamespaceEntry {
11779        fn compat_from(value: ::fidl_fuchsia_component::NamespaceEntry) -> Self {
11780            Self {
11781                path: ::fidl_next::CompatFrom::compat_from(value.path),
11782
11783                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
11784            }
11785        }
11786    }
11787
11788    impl ::fidl_next::CompatFrom<crate::StartChildArgs> for ::fidl_fuchsia_component::StartChildArgs {
11789        fn compat_from(value: crate::StartChildArgs) -> Self {
11790            Self {
11791                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
11792
11793                namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
11794
11795                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
11796
11797                __source_breaking: ::fidl::marker::SourceBreaking,
11798            }
11799        }
11800    }
11801
11802    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartChildArgs> for crate::StartChildArgs {
11803        fn compat_from(value: ::fidl_fuchsia_component::StartChildArgs) -> Self {
11804            Self {
11805                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
11806
11807                namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
11808
11809                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
11810            }
11811        }
11812    }
11813
11814    impl ::fidl_next::CompatFrom<crate::ControllerStartRequest>
11815        for ::fidl_fuchsia_component::ControllerStartRequest
11816    {
11817        #[inline]
11818        fn compat_from(value: crate::ControllerStartRequest) -> Self {
11819            Self {
11820                args: ::fidl_next::CompatFrom::compat_from(value.args),
11821
11822                execution_controller: ::fidl_next::CompatFrom::compat_from(
11823                    value.execution_controller,
11824                ),
11825            }
11826        }
11827    }
11828
11829    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerStartRequest>
11830        for crate::ControllerStartRequest
11831    {
11832        #[inline]
11833        fn compat_from(value: ::fidl_fuchsia_component::ControllerStartRequest) -> Self {
11834            Self {
11835                args: ::fidl_next::CompatFrom::compat_from(value.args),
11836
11837                execution_controller: ::fidl_next::CompatFrom::compat_from(
11838                    value.execution_controller,
11839                ),
11840            }
11841        }
11842    }
11843
11844    #[cfg(target_os = "fuchsia")]
11845    /// An alias for a client sender over `zx::Channel` for the `Controller`
11846    /// protocol.
11847    pub type ControllerProxy = ::fidl_next::ClientSender<crate::Controller>;
11848
11849    impl ::fidl_next::CompatFrom<crate::Controller> for ::fidl_fuchsia_component::ControllerMarker {
11850        fn compat_from(_: crate::Controller) -> Self {
11851            Self
11852        }
11853    }
11854
11855    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerMarker> for crate::Controller {
11856        fn compat_from(_: ::fidl_fuchsia_component::ControllerMarker) -> Self {
11857            Self
11858        }
11859    }
11860
11861    #[cfg(target_os = "fuchsia")]
11862
11863    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ControllerProxy>
11864        for crate::Controller
11865    {
11866        fn client_compat_from(
11867            proxy: ::fidl_fuchsia_component::ControllerProxy,
11868        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
11869            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
11870            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
11871            ::fidl_next::Client::new(client_end)
11872        }
11873    }
11874
11875    impl ::fidl_next::CompatFrom<crate::CreateChildArgs> for ::fidl_fuchsia_component::CreateChildArgs {
11876        fn compat_from(value: crate::CreateChildArgs) -> Self {
11877            Self {
11878                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
11879
11880                dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
11881
11882                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
11883
11884                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
11885
11886                __source_breaking: ::fidl::marker::SourceBreaking,
11887            }
11888        }
11889    }
11890
11891    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CreateChildArgs> for crate::CreateChildArgs {
11892        fn compat_from(value: ::fidl_fuchsia_component::CreateChildArgs) -> Self {
11893            Self {
11894                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
11895
11896                dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
11897
11898                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
11899
11900                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
11901            }
11902        }
11903    }
11904
11905    impl ::fidl_next::CompatFrom<crate::DebugStartedPayload>
11906        for ::fidl_fuchsia_component::DebugStartedPayload
11907    {
11908        fn compat_from(value: crate::DebugStartedPayload) -> Self {
11909            Self {
11910                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
11911
11912                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
11913
11914                __source_breaking: ::fidl::marker::SourceBreaking,
11915            }
11916        }
11917    }
11918
11919    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DebugStartedPayload>
11920        for crate::DebugStartedPayload
11921    {
11922        fn compat_from(value: ::fidl_fuchsia_component::DebugStartedPayload) -> Self {
11923            Self {
11924                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
11925
11926                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
11927            }
11928        }
11929    }
11930
11931    impl ::fidl_next::CompatFrom<crate::DeletionError> for ::fidl_fuchsia_component::DeletionError {
11932        fn compat_from(value: crate::DeletionError) -> Self {
11933            match value {
11934                crate::DeletionError::Connection => Self::Connection,
11935
11936                crate::DeletionError::Protocol => Self::Protocol,
11937
11938                crate::DeletionError::NoneAvailable => Self::NoneAvailable,
11939
11940                crate::DeletionError::Unsupported => Self::Unsupported,
11941            }
11942        }
11943    }
11944
11945    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DeletionError> for crate::DeletionError {
11946        fn compat_from(value: ::fidl_fuchsia_component::DeletionError) -> Self {
11947            match value {
11948                ::fidl_fuchsia_component::DeletionError::Connection => Self::Connection,
11949
11950                ::fidl_fuchsia_component::DeletionError::Protocol => Self::Protocol,
11951
11952                ::fidl_fuchsia_component::DeletionError::NoneAvailable => Self::NoneAvailable,
11953
11954                ::fidl_fuchsia_component::DeletionError::Unsupported => Self::Unsupported,
11955            }
11956        }
11957    }
11958
11959    impl ::fidl_next::CompatFrom<crate::DestroyedPayload>
11960        for ::fidl_fuchsia_component::DestroyedPayload
11961    {
11962        fn compat_from(value: crate::DestroyedPayload) -> Self {
11963            Self { __source_breaking: ::fidl::marker::SourceBreaking }
11964        }
11965    }
11966
11967    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DestroyedPayload>
11968        for crate::DestroyedPayload
11969    {
11970        fn compat_from(value: ::fidl_fuchsia_component::DestroyedPayload) -> Self {
11971            Self {}
11972        }
11973    }
11974
11975    impl ::fidl_next::CompatFrom<crate::DiscoveredPayload>
11976        for ::fidl_fuchsia_component::DiscoveredPayload
11977    {
11978        fn compat_from(value: crate::DiscoveredPayload) -> Self {
11979            Self { __source_breaking: ::fidl::marker::SourceBreaking }
11980        }
11981    }
11982
11983    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DiscoveredPayload>
11984        for crate::DiscoveredPayload
11985    {
11986        fn compat_from(value: ::fidl_fuchsia_component::DiscoveredPayload) -> Self {
11987            Self {}
11988        }
11989    }
11990
11991    impl ::fidl_next::CompatFrom<crate::PurgedPayload> for ::fidl_fuchsia_component::PurgedPayload {
11992        fn compat_from(value: crate::PurgedPayload) -> Self {
11993            Self { __source_breaking: ::fidl::marker::SourceBreaking }
11994        }
11995    }
11996
11997    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::PurgedPayload> for crate::PurgedPayload {
11998        fn compat_from(value: ::fidl_fuchsia_component::PurgedPayload) -> Self {
11999            Self {}
12000        }
12001    }
12002
12003    impl ::fidl_next::CompatFrom<crate::ResolvedPayload> for ::fidl_fuchsia_component::ResolvedPayload {
12004        fn compat_from(value: crate::ResolvedPayload) -> Self {
12005            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12006        }
12007    }
12008
12009    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ResolvedPayload> for crate::ResolvedPayload {
12010        fn compat_from(value: ::fidl_fuchsia_component::ResolvedPayload) -> Self {
12011            Self {}
12012        }
12013    }
12014
12015    impl ::fidl_next::CompatFrom<crate::StartedPayload> for ::fidl_fuchsia_component::StartedPayload {
12016        fn compat_from(value: crate::StartedPayload) -> Self {
12017            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12018        }
12019    }
12020
12021    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartedPayload> for crate::StartedPayload {
12022        fn compat_from(value: ::fidl_fuchsia_component::StartedPayload) -> Self {
12023            Self {}
12024        }
12025    }
12026
12027    impl ::fidl_next::CompatFrom<crate::UnresolvedPayload>
12028        for ::fidl_fuchsia_component::UnresolvedPayload
12029    {
12030        fn compat_from(value: crate::UnresolvedPayload) -> Self {
12031            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12032        }
12033    }
12034
12035    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::UnresolvedPayload>
12036        for crate::UnresolvedPayload
12037    {
12038        fn compat_from(value: ::fidl_fuchsia_component::UnresolvedPayload) -> Self {
12039            Self {}
12040        }
12041    }
12042
12043    impl ::fidl_next::CompatFrom<crate::EventType> for ::fidl_fuchsia_component::EventType {
12044        fn compat_from(value: crate::EventType) -> Self {
12045            match value {
12046                crate::EventType::CapabilityRequested => Self::CapabilityRequested,
12047
12048                crate::EventType::Discovered => Self::Discovered,
12049
12050                crate::EventType::Destroyed => Self::Destroyed,
12051
12052                crate::EventType::Resolved => Self::Resolved,
12053
12054                crate::EventType::Started => Self::Started,
12055
12056                crate::EventType::Stopped => Self::Stopped,
12057
12058                crate::EventType::DebugStarted => Self::DebugStarted,
12059
12060                crate::EventType::Unresolved => Self::Unresolved,
12061            }
12062        }
12063    }
12064
12065    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventType> for crate::EventType {
12066        fn compat_from(value: ::fidl_fuchsia_component::EventType) -> Self {
12067            match value {
12068                ::fidl_fuchsia_component::EventType::CapabilityRequested => {
12069                    Self::CapabilityRequested
12070                }
12071
12072                ::fidl_fuchsia_component::EventType::Discovered => Self::Discovered,
12073
12074                ::fidl_fuchsia_component::EventType::Destroyed => Self::Destroyed,
12075
12076                ::fidl_fuchsia_component::EventType::Resolved => Self::Resolved,
12077
12078                ::fidl_fuchsia_component::EventType::Started => Self::Started,
12079
12080                ::fidl_fuchsia_component::EventType::Stopped => Self::Stopped,
12081
12082                ::fidl_fuchsia_component::EventType::DebugStarted => Self::DebugStarted,
12083
12084                ::fidl_fuchsia_component::EventType::Unresolved => Self::Unresolved,
12085            }
12086        }
12087    }
12088
12089    impl ::fidl_next::CompatFrom<crate::StoppedPayload> for ::fidl_fuchsia_component::StoppedPayload {
12090        fn compat_from(value: crate::StoppedPayload) -> Self {
12091            Self {
12092                status: ::fidl_next::CompatFrom::compat_from(value.status),
12093
12094                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
12095
12096                __source_breaking: ::fidl::marker::SourceBreaking,
12097            }
12098        }
12099    }
12100
12101    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StoppedPayload> for crate::StoppedPayload {
12102        fn compat_from(value: ::fidl_fuchsia_component::StoppedPayload) -> Self {
12103            Self {
12104                status: ::fidl_next::CompatFrom::compat_from(value.status),
12105
12106                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
12107            }
12108        }
12109    }
12110
12111    impl ::fidl_next::CompatFrom<crate::EventHeader> for ::fidl_fuchsia_component::EventHeader {
12112        fn compat_from(value: crate::EventHeader) -> Self {
12113            Self {
12114                event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
12115
12116                moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
12117
12118                component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
12119
12120                timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
12121
12122                __source_breaking: ::fidl::marker::SourceBreaking,
12123            }
12124        }
12125    }
12126
12127    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventHeader> for crate::EventHeader {
12128        fn compat_from(value: ::fidl_fuchsia_component::EventHeader) -> Self {
12129            Self {
12130                event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
12131
12132                moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
12133
12134                component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
12135
12136                timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
12137            }
12138        }
12139    }
12140
12141    impl ::fidl_next::CompatFrom<crate::EventPayload> for ::fidl_fuchsia_component::EventPayload {
12142        fn compat_from(value: crate::EventPayload) -> Self {
12143            match value {
12144                crate::EventPayload::CapabilityRequested(value) => {
12145                    Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
12146                }
12147
12148                crate::EventPayload::Purged(value) => {
12149                    Self::Purged(::fidl_next::CompatFrom::compat_from(value))
12150                }
12151
12152                crate::EventPayload::Discovered(value) => {
12153                    Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
12154                }
12155
12156                crate::EventPayload::Destroyed(value) => {
12157                    Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
12158                }
12159
12160                crate::EventPayload::Resolved(value) => {
12161                    Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
12162                }
12163
12164                crate::EventPayload::Started(value) => {
12165                    Self::Started(::fidl_next::CompatFrom::compat_from(value))
12166                }
12167
12168                crate::EventPayload::Stopped(value) => {
12169                    Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
12170                }
12171
12172                crate::EventPayload::DebugStarted(value) => {
12173                    Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
12174                }
12175
12176                crate::EventPayload::Unresolved(value) => {
12177                    Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
12178                }
12179
12180                crate::EventPayload::UnknownOrdinal_(unknown_ordinal) => {
12181                    Self::__SourceBreaking { unknown_ordinal }
12182                }
12183            }
12184        }
12185    }
12186
12187    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventPayload> for crate::EventPayload {
12188        fn compat_from(value: ::fidl_fuchsia_component::EventPayload) -> Self {
12189            match value {
12190                ::fidl_fuchsia_component::EventPayload::CapabilityRequested(value) => {
12191                    Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
12192                }
12193
12194                ::fidl_fuchsia_component::EventPayload::Purged(value) => {
12195                    Self::Purged(::fidl_next::CompatFrom::compat_from(value))
12196                }
12197
12198                ::fidl_fuchsia_component::EventPayload::Discovered(value) => {
12199                    Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
12200                }
12201
12202                ::fidl_fuchsia_component::EventPayload::Destroyed(value) => {
12203                    Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
12204                }
12205
12206                ::fidl_fuchsia_component::EventPayload::Resolved(value) => {
12207                    Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
12208                }
12209
12210                ::fidl_fuchsia_component::EventPayload::Started(value) => {
12211                    Self::Started(::fidl_next::CompatFrom::compat_from(value))
12212                }
12213
12214                ::fidl_fuchsia_component::EventPayload::Stopped(value) => {
12215                    Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
12216                }
12217
12218                ::fidl_fuchsia_component::EventPayload::DebugStarted(value) => {
12219                    Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
12220                }
12221
12222                ::fidl_fuchsia_component::EventPayload::Unresolved(value) => {
12223                    Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
12224                }
12225
12226                ::fidl_fuchsia_component::EventPayload::__SourceBreaking { unknown_ordinal } => {
12227                    Self::UnknownOrdinal_(unknown_ordinal)
12228                }
12229            }
12230        }
12231    }
12232
12233    impl ::fidl_next::CompatFrom<crate::Event> for ::fidl_fuchsia_component::Event {
12234        fn compat_from(value: crate::Event) -> Self {
12235            Self {
12236                header: ::fidl_next::CompatFrom::compat_from(value.header),
12237
12238                payload: ::fidl_next::CompatFrom::compat_from(value.payload),
12239
12240                __source_breaking: ::fidl::marker::SourceBreaking,
12241            }
12242        }
12243    }
12244
12245    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Event> for crate::Event {
12246        fn compat_from(value: ::fidl_fuchsia_component::Event) -> Self {
12247            Self {
12248                header: ::fidl_next::CompatFrom::compat_from(value.header),
12249
12250                payload: ::fidl_next::CompatFrom::compat_from(value.payload),
12251            }
12252        }
12253    }
12254
12255    impl ::fidl_next::CompatFrom<crate::EventStreamGetNextResponse>
12256        for ::fidl_fuchsia_component::EventStreamGetNextResponse
12257    {
12258        #[inline]
12259        fn compat_from(value: crate::EventStreamGetNextResponse) -> Self {
12260            Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
12261        }
12262    }
12263
12264    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamGetNextResponse>
12265        for crate::EventStreamGetNextResponse
12266    {
12267        #[inline]
12268        fn compat_from(value: ::fidl_fuchsia_component::EventStreamGetNextResponse) -> Self {
12269            Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
12270        }
12271    }
12272
12273    #[cfg(target_os = "fuchsia")]
12274    /// An alias for a client sender over `zx::Channel` for the `EventStream`
12275    /// protocol.
12276    pub type EventStreamProxy = ::fidl_next::ClientSender<crate::EventStream>;
12277
12278    impl ::fidl_next::CompatFrom<crate::EventStream> for ::fidl_fuchsia_component::EventStreamMarker {
12279        fn compat_from(_: crate::EventStream) -> Self {
12280            Self
12281        }
12282    }
12283
12284    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamMarker> for crate::EventStream {
12285        fn compat_from(_: ::fidl_fuchsia_component::EventStreamMarker) -> Self {
12286            Self
12287        }
12288    }
12289
12290    #[cfg(target_os = "fuchsia")]
12291
12292    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::EventStreamProxy>
12293        for crate::EventStream
12294    {
12295        fn client_compat_from(
12296            proxy: ::fidl_fuchsia_component::EventStreamProxy,
12297        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12298            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12299            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12300            ::fidl_next::Client::new(client_end)
12301        }
12302    }
12303
12304    impl ::fidl_next::CompatFrom<crate::ExecutionControllerOnStopRequest>
12305        for ::fidl_fuchsia_component::ExecutionControllerOnStopRequest
12306    {
12307        #[inline]
12308        fn compat_from(value: crate::ExecutionControllerOnStopRequest) -> Self {
12309            Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
12310        }
12311    }
12312
12313    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerOnStopRequest>
12314        for crate::ExecutionControllerOnStopRequest
12315    {
12316        #[inline]
12317        fn compat_from(value: ::fidl_fuchsia_component::ExecutionControllerOnStopRequest) -> Self {
12318            Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
12319        }
12320    }
12321
12322    #[cfg(target_os = "fuchsia")]
12323    /// An alias for a client sender over `zx::Channel` for the `ExecutionController`
12324    /// protocol.
12325    pub type ExecutionControllerProxy = ::fidl_next::ClientSender<crate::ExecutionController>;
12326
12327    impl ::fidl_next::CompatFrom<crate::ExecutionController>
12328        for ::fidl_fuchsia_component::ExecutionControllerMarker
12329    {
12330        fn compat_from(_: crate::ExecutionController) -> Self {
12331            Self
12332        }
12333    }
12334
12335    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerMarker>
12336        for crate::ExecutionController
12337    {
12338        fn compat_from(_: ::fidl_fuchsia_component::ExecutionControllerMarker) -> Self {
12339            Self
12340        }
12341    }
12342
12343    #[cfg(target_os = "fuchsia")]
12344
12345    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ExecutionControllerProxy>
12346        for crate::ExecutionController
12347    {
12348        fn client_compat_from(
12349            proxy: ::fidl_fuchsia_component::ExecutionControllerProxy,
12350        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12351            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12352            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12353            ::fidl_next::Client::new(client_end)
12354        }
12355    }
12356
12357    impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerRequest>
12358        for ::fidl_fuchsia_component::IntrospectorGetMonikerRequest
12359    {
12360        #[inline]
12361        fn compat_from(value: crate::IntrospectorGetMonikerRequest) -> Self {
12362            Self {
12363                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
12364            }
12365        }
12366    }
12367
12368    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerRequest>
12369        for crate::IntrospectorGetMonikerRequest
12370    {
12371        #[inline]
12372        fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerRequest) -> Self {
12373            Self {
12374                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
12375            }
12376        }
12377    }
12378
12379    impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerResponse>
12380        for ::fidl_fuchsia_component::IntrospectorGetMonikerResponse
12381    {
12382        #[inline]
12383        fn compat_from(value: crate::IntrospectorGetMonikerResponse) -> Self {
12384            Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
12385        }
12386    }
12387
12388    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerResponse>
12389        for crate::IntrospectorGetMonikerResponse
12390    {
12391        #[inline]
12392        fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerResponse) -> Self {
12393            Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
12394        }
12395    }
12396
12397    #[cfg(target_os = "fuchsia")]
12398    /// An alias for a client sender over `zx::Channel` for the `Introspector`
12399    /// protocol.
12400    pub type IntrospectorProxy = ::fidl_next::ClientSender<crate::Introspector>;
12401
12402    impl ::fidl_next::CompatFrom<crate::Introspector> for ::fidl_fuchsia_component::IntrospectorMarker {
12403        fn compat_from(_: crate::Introspector) -> Self {
12404            Self
12405        }
12406    }
12407
12408    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorMarker> for crate::Introspector {
12409        fn compat_from(_: ::fidl_fuchsia_component::IntrospectorMarker) -> Self {
12410            Self
12411        }
12412    }
12413
12414    #[cfg(target_os = "fuchsia")]
12415
12416    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::IntrospectorProxy>
12417        for crate::Introspector
12418    {
12419        fn client_compat_from(
12420            proxy: ::fidl_fuchsia_component::IntrospectorProxy,
12421        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12422            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12423            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12424            ::fidl_next::Client::new(client_end)
12425        }
12426    }
12427
12428    impl ::fidl_next::CompatFrom<crate::NamespaceInputEntry>
12429        for ::fidl_fuchsia_component::NamespaceInputEntry
12430    {
12431        #[inline]
12432        fn compat_from(value: crate::NamespaceInputEntry) -> Self {
12433            Self {
12434                path: ::fidl_next::CompatFrom::compat_from(value.path),
12435
12436                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12437            }
12438        }
12439    }
12440
12441    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceInputEntry>
12442        for crate::NamespaceInputEntry
12443    {
12444        #[inline]
12445        fn compat_from(value: ::fidl_fuchsia_component::NamespaceInputEntry) -> Self {
12446            Self {
12447                path: ::fidl_next::CompatFrom::compat_from(value.path),
12448
12449                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12450            }
12451        }
12452    }
12453
12454    impl ::fidl_next::CompatFrom<crate::NamespaceCreateRequest>
12455        for ::fidl_fuchsia_component::NamespaceCreateRequest
12456    {
12457        #[inline]
12458        fn compat_from(value: crate::NamespaceCreateRequest) -> Self {
12459            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
12460        }
12461    }
12462
12463    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateRequest>
12464        for crate::NamespaceCreateRequest
12465    {
12466        #[inline]
12467        fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateRequest) -> Self {
12468            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
12469        }
12470    }
12471
12472    impl ::fidl_next::CompatFrom<crate::NamespaceError> for ::fidl_fuchsia_component::NamespaceError {
12473        fn compat_from(value: crate::NamespaceError) -> Self {
12474            match value {
12475                crate::NamespaceError::Shadow => Self::Shadow,
12476
12477                crate::NamespaceError::Duplicate => Self::Duplicate,
12478
12479                crate::NamespaceError::Conversion => Self::Conversion,
12480
12481                crate::NamespaceError::BadEntry => Self::BadEntry,
12482
12483                crate::NamespaceError::DictionaryRead => Self::DictionaryRead,
12484
12485                crate::NamespaceError::UnknownOrdinal_(unknown_ordinal) => {
12486                    Self::__SourceBreaking { unknown_ordinal }
12487                }
12488            }
12489        }
12490    }
12491
12492    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceError> for crate::NamespaceError {
12493        fn compat_from(value: ::fidl_fuchsia_component::NamespaceError) -> Self {
12494            match value {
12495                ::fidl_fuchsia_component::NamespaceError::Shadow => Self::Shadow,
12496
12497                ::fidl_fuchsia_component::NamespaceError::Duplicate => Self::Duplicate,
12498
12499                ::fidl_fuchsia_component::NamespaceError::Conversion => Self::Conversion,
12500
12501                ::fidl_fuchsia_component::NamespaceError::BadEntry => Self::BadEntry,
12502
12503                ::fidl_fuchsia_component::NamespaceError::DictionaryRead => Self::DictionaryRead,
12504
12505                ::fidl_fuchsia_component::NamespaceError::__SourceBreaking {
12506                    unknown_ordinal: value,
12507                } => Self::UnknownOrdinal_(value),
12508            }
12509        }
12510    }
12511
12512    impl ::fidl_next::CompatFrom<crate::NamespaceCreateResponse>
12513        for ::fidl_fuchsia_component::NamespaceCreateResponse
12514    {
12515        #[inline]
12516        fn compat_from(value: crate::NamespaceCreateResponse) -> Self {
12517            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
12518        }
12519    }
12520
12521    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateResponse>
12522        for crate::NamespaceCreateResponse
12523    {
12524        #[inline]
12525        fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateResponse) -> Self {
12526            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
12527        }
12528    }
12529
12530    #[cfg(target_os = "fuchsia")]
12531    /// An alias for a client sender over `zx::Channel` for the `Namespace`
12532    /// protocol.
12533    pub type NamespaceProxy = ::fidl_next::ClientSender<crate::Namespace>;
12534
12535    impl ::fidl_next::CompatFrom<crate::Namespace> for ::fidl_fuchsia_component::NamespaceMarker {
12536        fn compat_from(_: crate::Namespace) -> Self {
12537            Self
12538        }
12539    }
12540
12541    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceMarker> for crate::Namespace {
12542        fn compat_from(_: ::fidl_fuchsia_component::NamespaceMarker) -> Self {
12543            Self
12544        }
12545    }
12546
12547    #[cfg(target_os = "fuchsia")]
12548
12549    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::NamespaceProxy> for crate::Namespace {
12550        fn client_compat_from(
12551            proxy: ::fidl_fuchsia_component::NamespaceProxy,
12552        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12553            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12554            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12555            ::fidl_next::Client::new(client_end)
12556        }
12557    }
12558
12559    impl ::fidl_next::CompatFrom<crate::RealmDestroyChildRequest>
12560        for ::fidl_fuchsia_component::RealmDestroyChildRequest
12561    {
12562        #[inline]
12563        fn compat_from(value: crate::RealmDestroyChildRequest) -> Self {
12564            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
12565        }
12566    }
12567
12568    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmDestroyChildRequest>
12569        for crate::RealmDestroyChildRequest
12570    {
12571        #[inline]
12572        fn compat_from(value: ::fidl_fuchsia_component::RealmDestroyChildRequest) -> Self {
12573            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
12574        }
12575    }
12576
12577    impl ::fidl_next::CompatFrom<crate::RealmListChildrenRequest>
12578        for ::fidl_fuchsia_component::RealmListChildrenRequest
12579    {
12580        #[inline]
12581        fn compat_from(value: crate::RealmListChildrenRequest) -> Self {
12582            Self {
12583                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
12584
12585                iter: ::fidl_next::CompatFrom::compat_from(value.iter),
12586            }
12587        }
12588    }
12589
12590    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmListChildrenRequest>
12591        for crate::RealmListChildrenRequest
12592    {
12593        #[inline]
12594        fn compat_from(value: ::fidl_fuchsia_component::RealmListChildrenRequest) -> Self {
12595            Self {
12596                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
12597
12598                iter: ::fidl_next::CompatFrom::compat_from(value.iter),
12599            }
12600        }
12601    }
12602
12603    impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryRequest>
12604        for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest
12605    {
12606        #[inline]
12607        fn compat_from(value: crate::RealmGetChildOutputDictionaryRequest) -> Self {
12608            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
12609        }
12610    }
12611
12612    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest>
12613        for crate::RealmGetChildOutputDictionaryRequest
12614    {
12615        #[inline]
12616        fn compat_from(
12617            value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest,
12618        ) -> Self {
12619            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
12620        }
12621    }
12622
12623    impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryResponse>
12624        for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse
12625    {
12626        #[inline]
12627        fn compat_from(value: crate::RealmGetChildOutputDictionaryResponse) -> Self {
12628            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12629        }
12630    }
12631
12632    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse>
12633        for crate::RealmGetChildOutputDictionaryResponse
12634    {
12635        #[inline]
12636        fn compat_from(
12637            value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse,
12638        ) -> Self {
12639            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12640        }
12641    }
12642
12643    impl ::fidl_next::CompatFrom<crate::RealmOpenControllerRequest>
12644        for ::fidl_fuchsia_component::RealmOpenControllerRequest
12645    {
12646        #[inline]
12647        fn compat_from(value: crate::RealmOpenControllerRequest) -> Self {
12648            Self {
12649                child: ::fidl_next::CompatFrom::compat_from(value.child),
12650
12651                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12652            }
12653        }
12654    }
12655
12656    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenControllerRequest>
12657        for crate::RealmOpenControllerRequest
12658    {
12659        #[inline]
12660        fn compat_from(value: ::fidl_fuchsia_component::RealmOpenControllerRequest) -> Self {
12661            Self {
12662                child: ::fidl_next::CompatFrom::compat_from(value.child),
12663
12664                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12665            }
12666        }
12667    }
12668
12669    impl ::fidl_next::CompatFrom<crate::RealmOpenExposedDirRequest>
12670        for ::fidl_fuchsia_component::RealmOpenExposedDirRequest
12671    {
12672        #[inline]
12673        fn compat_from(value: crate::RealmOpenExposedDirRequest) -> Self {
12674            Self {
12675                child: ::fidl_next::CompatFrom::compat_from(value.child),
12676
12677                exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
12678            }
12679        }
12680    }
12681
12682    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenExposedDirRequest>
12683        for crate::RealmOpenExposedDirRequest
12684    {
12685        #[inline]
12686        fn compat_from(value: ::fidl_fuchsia_component::RealmOpenExposedDirRequest) -> Self {
12687            Self {
12688                child: ::fidl_next::CompatFrom::compat_from(value.child),
12689
12690                exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
12691            }
12692        }
12693    }
12694
12695    impl ::fidl_next::CompatFrom<crate::RealmCreateChildRequest>
12696        for ::fidl_fuchsia_component::RealmCreateChildRequest
12697    {
12698        #[inline]
12699        fn compat_from(value: crate::RealmCreateChildRequest) -> Self {
12700            Self {
12701                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
12702
12703                decl: ::fidl_next::CompatFrom::compat_from(value.decl),
12704
12705                args: ::fidl_next::CompatFrom::compat_from(value.args),
12706            }
12707        }
12708    }
12709
12710    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmCreateChildRequest>
12711        for crate::RealmCreateChildRequest
12712    {
12713        #[inline]
12714        fn compat_from(value: ::fidl_fuchsia_component::RealmCreateChildRequest) -> Self {
12715            Self {
12716                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
12717
12718                decl: ::fidl_next::CompatFrom::compat_from(value.decl),
12719
12720                args: ::fidl_next::CompatFrom::compat_from(value.args),
12721            }
12722        }
12723    }
12724
12725    impl ::fidl_next::CompatFrom<crate::RealmGetResolvedInfoResponse>
12726        for ::fidl_fuchsia_component::RealmGetResolvedInfoResponse
12727    {
12728        #[inline]
12729        fn compat_from(value: crate::RealmGetResolvedInfoResponse) -> Self {
12730            Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
12731        }
12732    }
12733
12734    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetResolvedInfoResponse>
12735        for crate::RealmGetResolvedInfoResponse
12736    {
12737        #[inline]
12738        fn compat_from(value: ::fidl_fuchsia_component::RealmGetResolvedInfoResponse) -> Self {
12739            Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
12740        }
12741    }
12742
12743    #[cfg(target_os = "fuchsia")]
12744    /// An alias for a client sender over `zx::Channel` for the `Realm`
12745    /// protocol.
12746    pub type RealmProxy = ::fidl_next::ClientSender<crate::Realm>;
12747
12748    impl ::fidl_next::CompatFrom<crate::Realm> for ::fidl_fuchsia_component::RealmMarker {
12749        fn compat_from(_: crate::Realm) -> Self {
12750            Self
12751        }
12752    }
12753
12754    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmMarker> for crate::Realm {
12755        fn compat_from(_: ::fidl_fuchsia_component::RealmMarker) -> Self {
12756            Self
12757        }
12758    }
12759
12760    #[cfg(target_os = "fuchsia")]
12761
12762    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::RealmProxy> for crate::Realm {
12763        fn client_compat_from(
12764            proxy: ::fidl_fuchsia_component::RealmProxy,
12765        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12766            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12767            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12768            ::fidl_next::Client::new(client_end)
12769        }
12770    }
12771
12772    impl ::fidl_next::CompatFrom<crate::StatusError> for ::fidl_fuchsia_component::StatusError {
12773        fn compat_from(value: crate::StatusError) -> Self {
12774            match value {
12775                crate::StatusError::Provider => Self::Provider,
12776
12777                crate::StatusError::ResponseInvalid => Self::ResponseInvalid,
12778
12779                crate::StatusError::StatusUnknown => Self::StatusUnknown,
12780
12781                crate::StatusError::Unsupported => Self::Unsupported,
12782            }
12783        }
12784    }
12785
12786    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StatusError> for crate::StatusError {
12787        fn compat_from(value: ::fidl_fuchsia_component::StatusError) -> Self {
12788            match value {
12789                ::fidl_fuchsia_component::StatusError::Provider => Self::Provider,
12790
12791                ::fidl_fuchsia_component::StatusError::ResponseInvalid => Self::ResponseInvalid,
12792
12793                ::fidl_fuchsia_component::StatusError::StatusUnknown => Self::StatusUnknown,
12794
12795                ::fidl_fuchsia_component::StatusError::Unsupported => Self::Unsupported,
12796            }
12797        }
12798    }
12799
12800    impl ::fidl_next::CompatFrom<crate::StorageAdminListStorageInRealmRequest>
12801        for ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest
12802    {
12803        #[inline]
12804        fn compat_from(value: crate::StorageAdminListStorageInRealmRequest) -> Self {
12805            Self {
12806                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
12807
12808                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
12809            }
12810        }
12811    }
12812
12813    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest>
12814        for crate::StorageAdminListStorageInRealmRequest
12815    {
12816        #[inline]
12817        fn compat_from(
12818            value: ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest,
12819        ) -> Self {
12820            Self {
12821                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
12822
12823                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
12824            }
12825        }
12826    }
12827
12828    impl ::fidl_next::CompatFrom<crate::StorageAdminDeleteComponentStorageRequest>
12829        for ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest
12830    {
12831        #[inline]
12832        fn compat_from(value: crate::StorageAdminDeleteComponentStorageRequest) -> Self {
12833            Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
12834        }
12835    }
12836
12837    impl
12838        ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest>
12839        for crate::StorageAdminDeleteComponentStorageRequest
12840    {
12841        #[inline]
12842        fn compat_from(
12843            value: ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest,
12844        ) -> Self {
12845            Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
12846        }
12847    }
12848
12849    impl ::fidl_next::CompatFrom<crate::StorageStatus> for ::fidl_fuchsia_component::StorageStatus {
12850        fn compat_from(value: crate::StorageStatus) -> Self {
12851            Self {
12852                total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
12853
12854                used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
12855
12856                __source_breaking: ::fidl::marker::SourceBreaking,
12857            }
12858        }
12859    }
12860
12861    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageStatus> for crate::StorageStatus {
12862        fn compat_from(value: ::fidl_fuchsia_component::StorageStatus) -> Self {
12863            Self {
12864                total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
12865
12866                used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
12867            }
12868        }
12869    }
12870
12871    impl ::fidl_next::CompatFrom<crate::StorageAdminOpenStorageRequest>
12872        for ::fidl_fuchsia_component::StorageAdminOpenStorageRequest
12873    {
12874        #[inline]
12875        fn compat_from(value: crate::StorageAdminOpenStorageRequest) -> Self {
12876            Self {
12877                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
12878
12879                object: ::fidl_next::CompatFrom::compat_from(value.object),
12880            }
12881        }
12882    }
12883
12884    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminOpenStorageRequest>
12885        for crate::StorageAdminOpenStorageRequest
12886    {
12887        #[inline]
12888        fn compat_from(value: ::fidl_fuchsia_component::StorageAdminOpenStorageRequest) -> Self {
12889            Self {
12890                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
12891
12892                object: ::fidl_next::CompatFrom::compat_from(value.object),
12893            }
12894        }
12895    }
12896
12897    impl ::fidl_next::CompatFrom<crate::StorageAdminOpenComponentStorageByIdRequest>
12898        for ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest
12899    {
12900        #[inline]
12901        fn compat_from(value: crate::StorageAdminOpenComponentStorageByIdRequest) -> Self {
12902            Self {
12903                id: ::fidl_next::CompatFrom::compat_from(value.id),
12904
12905                object: ::fidl_next::CompatFrom::compat_from(value.object),
12906            }
12907        }
12908    }
12909
12910    impl
12911        ::fidl_next::CompatFrom<
12912            ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
12913        > for crate::StorageAdminOpenComponentStorageByIdRequest
12914    {
12915        #[inline]
12916        fn compat_from(
12917            value: ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
12918        ) -> Self {
12919            Self {
12920                id: ::fidl_next::CompatFrom::compat_from(value.id),
12921
12922                object: ::fidl_next::CompatFrom::compat_from(value.object),
12923            }
12924        }
12925    }
12926
12927    #[cfg(target_os = "fuchsia")]
12928    /// An alias for a client sender over `zx::Channel` for the `StorageAdmin`
12929    /// protocol.
12930    pub type StorageAdminProxy = ::fidl_next::ClientSender<crate::StorageAdmin>;
12931
12932    impl ::fidl_next::CompatFrom<crate::StorageAdmin> for ::fidl_fuchsia_component::StorageAdminMarker {
12933        fn compat_from(_: crate::StorageAdmin) -> Self {
12934            Self
12935        }
12936    }
12937
12938    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminMarker> for crate::StorageAdmin {
12939        fn compat_from(_: ::fidl_fuchsia_component::StorageAdminMarker) -> Self {
12940            Self
12941        }
12942    }
12943
12944    #[cfg(target_os = "fuchsia")]
12945
12946    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageAdminProxy>
12947        for crate::StorageAdmin
12948    {
12949        fn client_compat_from(
12950            proxy: ::fidl_fuchsia_component::StorageAdminProxy,
12951        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
12952            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12953            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12954            ::fidl_next::Client::new(client_end)
12955        }
12956    }
12957
12958    impl ::fidl_next::CompatFrom<crate::StorageIteratorNextResponse>
12959        for ::fidl_fuchsia_component::StorageIteratorNextResponse
12960    {
12961        #[inline]
12962        fn compat_from(value: crate::StorageIteratorNextResponse) -> Self {
12963            Self {
12964                relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
12965            }
12966        }
12967    }
12968
12969    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorNextResponse>
12970        for crate::StorageIteratorNextResponse
12971    {
12972        #[inline]
12973        fn compat_from(value: ::fidl_fuchsia_component::StorageIteratorNextResponse) -> Self {
12974            Self {
12975                relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
12976            }
12977        }
12978    }
12979
12980    #[cfg(target_os = "fuchsia")]
12981    /// An alias for a client sender over `zx::Channel` for the `StorageIterator`
12982    /// protocol.
12983    pub type StorageIteratorProxy = ::fidl_next::ClientSender<crate::StorageIterator>;
12984
12985    impl ::fidl_next::CompatFrom<crate::StorageIterator>
12986        for ::fidl_fuchsia_component::StorageIteratorMarker
12987    {
12988        fn compat_from(_: crate::StorageIterator) -> Self {
12989            Self
12990        }
12991    }
12992
12993    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorMarker>
12994        for crate::StorageIterator
12995    {
12996        fn compat_from(_: ::fidl_fuchsia_component::StorageIteratorMarker) -> Self {
12997            Self
12998        }
12999    }
13000
13001    #[cfg(target_os = "fuchsia")]
13002
13003    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageIteratorProxy>
13004        for crate::StorageIterator
13005    {
13006        fn client_compat_from(
13007            proxy: ::fidl_fuchsia_component::StorageIteratorProxy,
13008        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
13009            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13010            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13011            ::fidl_next::Client::new(client_end)
13012        }
13013    }
13014}