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(PartialEq, 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 Client = BinderClient<___T>;
26            type Server = BinderServer<___T>;
27        }
28
29        /// The client for the `Binder` protocol.
30        #[repr(transparent)]
31        pub struct BinderClient<___T: ::fidl_next::Transport> {
32            #[allow(dead_code)]
33            client: ::fidl_next::protocol::Client<___T>,
34        }
35
36        impl<___T> BinderClient<___T> where ___T: ::fidl_next::Transport {}
37
38        /// The server for the `Binder` protocol.
39        #[repr(transparent)]
40        pub struct BinderServer<___T: ::fidl_next::Transport> {
41            server: ::fidl_next::protocol::Server<___T>,
42        }
43
44        impl<___T> BinderServer<___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        ordinal: u64,
66        buffer: ___T::RecvBuffer,
67    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
68        match ordinal {
69            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
70        }
71    }
72}
73
74/// A server handler for the Binder protocol.
75///
76/// See [`Binder`] for more details.
77pub trait BinderServerHandler<
78    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
79    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
80>
81{
82}
83
84impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Binder
85where
86    ___H: BinderServerHandler<___T> + ::core::marker::Send,
87    ___T: ::fidl_next::Transport,
88{
89    async fn on_one_way(
90        handler: &mut ___H,
91        ordinal: u64,
92        buffer: ___T::RecvBuffer,
93    ) -> ::core::result::Result<
94        (),
95        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
96    > {
97        match ordinal {
98            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
99        }
100    }
101
102    async fn on_two_way(
103        handler: &mut ___H,
104        ordinal: u64,
105        buffer: ___T::RecvBuffer,
106        responder: ::fidl_next::protocol::Responder<___T>,
107    ) -> ::core::result::Result<
108        (),
109        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
110    > {
111        match ordinal {
112            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
113        }
114    }
115}
116
117pub const MAX_NAME_LENGTH: u64 = 255 as u64;
118
119pub type Name = ::std::string::String;
120
121/// The wire type corresponding to [`Name`].
122pub type WireName<'de> = ::fidl_next::WireString<'de>;
123
124#[doc = " Payload for CapabilityRequested events\n"]
125#[derive(PartialEq, Debug, Default)]
126pub struct CapabilityRequestedPayload {
127    pub name: ::core::option::Option<::std::string::String>,
128
129    pub capability: ::core::option::Option<::fidl_next::fuchsia::zx::Channel>,
130}
131
132impl CapabilityRequestedPayload {
133    fn __max_ordinal(&self) -> usize {
134        if self.capability.is_some() {
135            return 2;
136        }
137
138        if self.name.is_some() {
139            return 1;
140        }
141
142        0
143    }
144}
145
146impl ::fidl_next::Encodable for CapabilityRequestedPayload {
147    type Encoded = WireCapabilityRequestedPayload<'static>;
148}
149
150unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityRequestedPayload
151where
152    ___E: ::fidl_next::Encoder + ?Sized,
153    ___E: ::fidl_next::fuchsia::HandleEncoder,
154{
155    #[inline]
156    fn encode(
157        mut self,
158        encoder: &mut ___E,
159        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
160    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
161        ::fidl_next::munge!(let WireCapabilityRequestedPayload { table } = out);
162
163        let max_ord = self.__max_ordinal();
164
165        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
166        ::fidl_next::Wire::zero_padding(&mut out);
167
168        let mut preallocated =
169            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
170
171        for i in 1..=max_ord {
172            match i {
173                2 => {
174                    if let Some(value) = self.capability.take() {
175                        ::fidl_next::WireEnvelope::encode_value(
176                            value,
177                            preallocated.encoder,
178                            &mut out,
179                        )?;
180                    } else {
181                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
182                    }
183                }
184
185                1 => {
186                    if let Some(value) = self.name.take() {
187                        ::fidl_next::WireEnvelope::encode_value(
188                            value,
189                            preallocated.encoder,
190                            &mut out,
191                        )?;
192                    } else {
193                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
194                    }
195                }
196
197                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
198            }
199            unsafe {
200                preallocated.write_next(out.assume_init_ref());
201            }
202        }
203
204        ::fidl_next::WireTable::encode_len(table, max_ord);
205
206        Ok(())
207    }
208}
209
210impl<'de> ::fidl_next::FromWire<WireCapabilityRequestedPayload<'de>>
211    for CapabilityRequestedPayload
212{
213    #[inline]
214    fn from_wire(wire_: WireCapabilityRequestedPayload<'de>) -> Self {
215        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
216
217        let name = wire_.table.get(1);
218
219        let capability = wire_.table.get(2);
220
221        Self {
222            name: name.map(|envelope| {
223                ::fidl_next::FromWire::from_wire(unsafe {
224                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
225                })
226            }),
227
228            capability: capability.map(|envelope| {
229                ::fidl_next::FromWire::from_wire(unsafe {
230                    envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
231                })
232            }),
233        }
234    }
235}
236
237impl<'de> ::fidl_next::IntoNatural for WireCapabilityRequestedPayload<'de> {
238    type Natural = CapabilityRequestedPayload;
239}
240
241/// The wire type corresponding to [`CapabilityRequestedPayload`].
242#[repr(C)]
243pub struct WireCapabilityRequestedPayload<'de> {
244    table: ::fidl_next::WireTable<'de>,
245}
246
247impl<'de> Drop for WireCapabilityRequestedPayload<'de> {
248    fn drop(&mut self) {
249        let _ = self
250            .table
251            .get(1)
252            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
253
254        let _ = self.table.get(2).map(|envelope| unsafe {
255            envelope.read_unchecked::<::fidl_next::fuchsia::WireChannel>()
256        });
257    }
258}
259
260unsafe impl ::fidl_next::Wire for WireCapabilityRequestedPayload<'static> {
261    type Decoded<'de> = WireCapabilityRequestedPayload<'de>;
262
263    #[inline]
264    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
265        ::fidl_next::munge!(let Self { table } = out);
266        ::fidl_next::WireTable::zero_padding(table);
267    }
268}
269
270unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityRequestedPayload<'static>
271where
272    ___D: ::fidl_next::Decoder + ?Sized,
273    ___D: ::fidl_next::fuchsia::HandleDecoder,
274{
275    fn decode(
276        slot: ::fidl_next::Slot<'_, Self>,
277        decoder: &mut ___D,
278    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
279        ::fidl_next::munge!(let Self { table } = slot);
280
281        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
282            match ordinal {
283                0 => unsafe { ::core::hint::unreachable_unchecked() },
284
285                1 => {
286                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
287                        slot.as_mut(),
288                        decoder,
289                    )?;
290
291                    let value = unsafe {
292                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
293                    };
294
295                    if value.len() > 255 {
296                        return Err(::fidl_next::DecodeError::VectorTooLong {
297                            size: value.len() as u64,
298                            limit: 255,
299                        });
300                    }
301
302                    Ok(())
303                }
304
305                2 => {
306                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::fuchsia::WireChannel>(
307                        slot.as_mut(),
308                        decoder,
309                    )?;
310
311                    Ok(())
312                }
313
314                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
315            }
316        })
317    }
318}
319
320impl<'de> WireCapabilityRequestedPayload<'de> {
321    pub fn name(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
322        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
323    }
324
325    pub fn capability(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireChannel> {
326        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
327    }
328}
329
330impl<'de> ::core::fmt::Debug for WireCapabilityRequestedPayload<'de> {
331    fn fmt(
332        &self,
333        f: &mut ::core::fmt::Formatter<'_>,
334    ) -> ::core::result::Result<(), ::core::fmt::Error> {
335        f.debug_struct("CapabilityRequestedPayload")
336            .field("name", &self.name())
337            .field("capability", &self.capability())
338            .finish()
339    }
340}
341
342#[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"]
343pub const MAX_CHILD_COUNT: u32 = 128 as u32;
344
345#[derive(PartialEq, Clone, Debug)]
346pub struct ChildIteratorNextResponse {
347    pub children: ::std::vec::Vec<::fidl_next_fuchsia_component_decl::ChildRef>,
348}
349
350impl ::fidl_next::Encodable for ChildIteratorNextResponse {
351    type Encoded = WireChildIteratorNextResponse<'static>;
352}
353
354unsafe impl<___E> ::fidl_next::Encode<___E> for ChildIteratorNextResponse
355where
356    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
357    ___E: ::fidl_next::Encoder,
358{
359    #[inline]
360    fn encode(
361        self,
362        encoder_: &mut ___E,
363        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
364    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
365        ::fidl_next::munge! {
366            let Self::Encoded {
367                children,
368
369            } = out_;
370        }
371
372        ::fidl_next::Encode::encode(self.children, encoder_, children)?;
373
374        Ok(())
375    }
376}
377
378unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ChildIteratorNextResponse
379where
380    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
381    ___E: ::fidl_next::Encoder,
382{
383    #[inline]
384    fn encode_ref(
385        &self,
386        encoder_: &mut ___E,
387        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
388    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
389        ::fidl_next::munge! {
390            let Self::Encoded {
391
392                children,
393
394            } = out_;
395        }
396
397        ::fidl_next::EncodeRef::encode_ref(&self.children, encoder_, children)?;
398
399        Ok(())
400    }
401}
402
403impl ::fidl_next::EncodableOption for ChildIteratorNextResponse {
404    type EncodedOption = ::fidl_next::WireBox<'static, WireChildIteratorNextResponse<'static>>;
405}
406
407unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ChildIteratorNextResponse
408where
409    ___E: ::fidl_next::Encoder + ?Sized,
410    ChildIteratorNextResponse: ::fidl_next::Encode<___E>,
411{
412    #[inline]
413    fn encode_option(
414        this: ::core::option::Option<Self>,
415        encoder: &mut ___E,
416        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
417    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
418        if let Some(inner) = this {
419            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
420            ::fidl_next::WireBox::encode_present(out);
421        } else {
422            ::fidl_next::WireBox::encode_absent(out);
423        }
424
425        Ok(())
426    }
427}
428
429unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ChildIteratorNextResponse
430where
431    ___E: ::fidl_next::Encoder + ?Sized,
432    ChildIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
433{
434    #[inline]
435    fn encode_option_ref(
436        this: ::core::option::Option<&Self>,
437        encoder: &mut ___E,
438        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
439    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
440        if let Some(inner) = this {
441            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
442            ::fidl_next::WireBox::encode_present(out);
443        } else {
444            ::fidl_next::WireBox::encode_absent(out);
445        }
446
447        Ok(())
448    }
449}
450
451impl<'de> ::fidl_next::FromWire<WireChildIteratorNextResponse<'de>> for ChildIteratorNextResponse {
452    #[inline]
453    fn from_wire(wire: WireChildIteratorNextResponse<'de>) -> Self {
454        Self { children: ::fidl_next::FromWire::from_wire(wire.children) }
455    }
456}
457
458impl<'de> ::fidl_next::IntoNatural for WireChildIteratorNextResponse<'de> {
459    type Natural = ChildIteratorNextResponse;
460}
461
462impl<'de> ::fidl_next::FromWireRef<WireChildIteratorNextResponse<'de>>
463    for ChildIteratorNextResponse
464{
465    #[inline]
466    fn from_wire_ref(wire: &WireChildIteratorNextResponse<'de>) -> Self {
467        Self { children: ::fidl_next::FromWireRef::from_wire_ref(&wire.children) }
468    }
469}
470
471/// The wire type corresponding to [`ChildIteratorNextResponse`].
472#[derive(Debug)]
473#[repr(C)]
474pub struct WireChildIteratorNextResponse<'de> {
475    pub children:
476        ::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireChildRef<'de>>,
477}
478static_assertions::const_assert_eq!(std::mem::size_of::<WireChildIteratorNextResponse<'_>>(), 16);
479static_assertions::const_assert_eq!(std::mem::align_of::<WireChildIteratorNextResponse<'_>>(), 8);
480
481static_assertions::const_assert_eq!(
482    std::mem::offset_of!(WireChildIteratorNextResponse<'_>, children),
483    0
484);
485
486unsafe impl ::fidl_next::Wire for WireChildIteratorNextResponse<'static> {
487    type Decoded<'de> = WireChildIteratorNextResponse<'de>;
488
489    #[inline]
490    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
491        ::fidl_next::munge! {
492            let Self {
493
494                children,
495
496            } = &mut *out_;
497        }
498
499        ::fidl_next::Wire::zero_padding(children);
500    }
501}
502
503unsafe impl<___D> ::fidl_next::Decode<___D> for WireChildIteratorNextResponse<'static>
504where
505    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
506    ___D: ::fidl_next::Decoder,
507{
508    fn decode(
509        slot_: ::fidl_next::Slot<'_, Self>,
510        decoder_: &mut ___D,
511    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
512        ::fidl_next::munge! {
513            let Self {
514
515                mut children,
516
517            } = slot_;
518        }
519
520        ::fidl_next::Decode::decode(children.as_mut(), decoder_)?;
521
522        let children = unsafe { children.deref_unchecked() };
523
524        if children.len() > 128 {
525            return Err(::fidl_next::DecodeError::VectorTooLong {
526                size: children.len() as u64,
527                limit: 128,
528            });
529        }
530
531        Ok(())
532    }
533}
534
535/// The type corresponding to the ChildIterator protocol.
536#[doc = " A protocol to iterate over the list of children in a realm.\n"]
537#[derive(PartialEq, Debug)]
538pub struct ChildIterator;
539
540pub mod child_iterator {
541    pub mod prelude {
542        pub use crate::{
543            ChildIterator, ChildIteratorClientHandler, ChildIteratorServerHandler, child_iterator,
544        };
545
546        pub use crate::ChildIteratorNextResponse;
547    }
548
549    pub struct Next;
550
551    impl ::fidl_next::Method for Next {
552        const ORDINAL: u64 = 4676077302722137352;
553
554        type Protocol = crate::ChildIterator;
555
556        type Request = ();
557
558        type Response = crate::WireChildIteratorNextResponse<'static>;
559    }
560
561    mod ___detail {
562
563        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ChildIterator
564        where
565            ___T: ::fidl_next::Transport,
566        {
567            type Client = ChildIteratorClient<___T>;
568            type Server = ChildIteratorServer<___T>;
569        }
570
571        /// The client for the `ChildIterator` protocol.
572        #[repr(transparent)]
573        pub struct ChildIteratorClient<___T: ::fidl_next::Transport> {
574            #[allow(dead_code)]
575            client: ::fidl_next::protocol::Client<___T>,
576        }
577
578        impl<___T> ChildIteratorClient<___T>
579        where
580            ___T: ::fidl_next::Transport,
581        {
582            #[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"]
583            pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
584                ::fidl_next::TwoWayFuture::from_untyped(
585                    self.client.send_two_way(4676077302722137352, ()),
586                )
587            }
588        }
589
590        /// The server for the `ChildIterator` protocol.
591        #[repr(transparent)]
592        pub struct ChildIteratorServer<___T: ::fidl_next::Transport> {
593            server: ::fidl_next::protocol::Server<___T>,
594        }
595
596        impl<___T> ChildIteratorServer<___T> where ___T: ::fidl_next::Transport {}
597    }
598}
599
600/// A client handler for the ChildIterator protocol.
601///
602/// See [`ChildIterator`] for more details.
603pub trait ChildIteratorClientHandler<
604    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
605    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
606>
607{
608}
609
610impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ChildIterator
611where
612    ___H: ChildIteratorClientHandler<___T> + ::core::marker::Send,
613    ___T: ::fidl_next::Transport,
614    <child_iterator::Next as ::fidl_next::Method>::Response:
615        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
616{
617    async fn on_event(
618        handler: &mut ___H,
619        ordinal: u64,
620        buffer: ___T::RecvBuffer,
621    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
622        match ordinal {
623            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
624        }
625    }
626}
627
628/// A server handler for the ChildIterator protocol.
629///
630/// See [`ChildIterator`] for more details.
631pub trait ChildIteratorServerHandler<
632    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
633    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
634>
635{
636    #[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"]
637    fn next(
638        &mut self,
639
640        responder: ::fidl_next::Responder<child_iterator::Next, ___T>,
641    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
642}
643
644impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ChildIterator
645where
646    ___H: ChildIteratorServerHandler<___T> + ::core::marker::Send,
647    ___T: ::fidl_next::Transport,
648{
649    async fn on_one_way(
650        handler: &mut ___H,
651        ordinal: u64,
652        buffer: ___T::RecvBuffer,
653    ) -> ::core::result::Result<
654        (),
655        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
656    > {
657        match ordinal {
658            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
659        }
660    }
661
662    async fn on_two_way(
663        handler: &mut ___H,
664        ordinal: u64,
665        buffer: ___T::RecvBuffer,
666        responder: ::fidl_next::protocol::Responder<___T>,
667    ) -> ::core::result::Result<
668        (),
669        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
670    > {
671        match ordinal {
672            4676077302722137352 => {
673                let responder = ::fidl_next::Responder::from_untyped(responder);
674
675                handler.next(responder).await;
676                Ok(())
677            }
678
679            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
680        }
681    }
682}
683
684#[doc = " The maximum number of handles that can be passed to a created component.\n"]
685pub const MAX_HANDLE_COUNT: u32 = 128 as u32;
686
687pub const MAX_NAMESPACE_COUNT: u32 = 32 as u32;
688
689pub type ControllerStartResponse = ();
690
691/// The wire type corresponding to [`ControllerStartResponse`].
692pub type WireControllerStartResponse = ();
693
694#[derive(PartialEq, Debug)]
695#[repr(C)]
696pub struct ControllerIsStartedResponse {
697    pub is_started: bool,
698}
699
700impl ::fidl_next::Encodable for ControllerIsStartedResponse {
701    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireControllerIsStartedResponse> = unsafe {
702        ::fidl_next::CopyOptimization::enable_if(
703            true && <bool as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
704        )
705    };
706
707    type Encoded = WireControllerIsStartedResponse;
708}
709
710unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerIsStartedResponse
711where
712    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
713    ___E: ::fidl_next::fuchsia::HandleEncoder,
714{
715    #[inline]
716    fn encode(
717        self,
718        encoder_: &mut ___E,
719        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
720    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
721        ::fidl_next::munge! {
722            let Self::Encoded {
723                is_started,
724
725            } = out_;
726        }
727
728        ::fidl_next::Encode::encode(self.is_started, encoder_, is_started)?;
729
730        Ok(())
731    }
732}
733
734impl ::fidl_next::EncodableOption for ControllerIsStartedResponse {
735    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerIsStartedResponse>;
736}
737
738unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerIsStartedResponse
739where
740    ___E: ::fidl_next::Encoder + ?Sized,
741    ControllerIsStartedResponse: ::fidl_next::Encode<___E>,
742{
743    #[inline]
744    fn encode_option(
745        this: ::core::option::Option<Self>,
746        encoder: &mut ___E,
747        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
748    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
749        if let Some(inner) = this {
750            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
751            ::fidl_next::WireBox::encode_present(out);
752        } else {
753            ::fidl_next::WireBox::encode_absent(out);
754        }
755
756        Ok(())
757    }
758}
759
760impl ::fidl_next::FromWire<WireControllerIsStartedResponse> for ControllerIsStartedResponse {
761    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireControllerIsStartedResponse, Self> = unsafe {
762        ::fidl_next::CopyOptimization::enable_if(
763            true && <bool as ::fidl_next::FromWire<bool>>::COPY_OPTIMIZATION.is_enabled(),
764        )
765    };
766
767    #[inline]
768    fn from_wire(wire: WireControllerIsStartedResponse) -> Self {
769        Self { is_started: ::fidl_next::FromWire::from_wire(wire.is_started) }
770    }
771}
772
773impl ::fidl_next::IntoNatural for WireControllerIsStartedResponse {
774    type Natural = ControllerIsStartedResponse;
775}
776
777/// The wire type corresponding to [`ControllerIsStartedResponse`].
778#[derive(Debug)]
779#[repr(C)]
780pub struct WireControllerIsStartedResponse {
781    pub is_started: bool,
782}
783static_assertions::const_assert_eq!(std::mem::size_of::<WireControllerIsStartedResponse>(), 1);
784static_assertions::const_assert_eq!(std::mem::align_of::<WireControllerIsStartedResponse>(), 1);
785
786static_assertions::const_assert_eq!(
787    std::mem::offset_of!(WireControllerIsStartedResponse, is_started),
788    0
789);
790
791unsafe impl ::fidl_next::Wire for WireControllerIsStartedResponse {
792    type Decoded<'de> = WireControllerIsStartedResponse;
793
794    #[inline]
795    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
796        ::fidl_next::munge! {
797            let Self {
798
799                is_started,
800
801            } = &mut *out_;
802        }
803
804        ::fidl_next::Wire::zero_padding(is_started);
805    }
806}
807
808unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerIsStartedResponse
809where
810    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
811    ___D: ::fidl_next::fuchsia::HandleDecoder,
812{
813    fn decode(
814        slot_: ::fidl_next::Slot<'_, Self>,
815        decoder_: &mut ___D,
816    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
817        ::fidl_next::munge! {
818            let Self {
819
820                mut is_started,
821
822            } = slot_;
823        }
824
825        ::fidl_next::Decode::decode(is_started.as_mut(), decoder_)?;
826
827        Ok(())
828    }
829}
830
831pub const MAX_PATH_LENGTH: u64 = 4095 as u64;
832
833#[doc = " Standard error codes for component framework protocols.\n"]
834#[derive(Clone, Copy, Debug, PartialEq, Eq)]
835#[repr(u32)]
836pub enum Error {
837    Internal = 1,
838    InvalidArguments = 2,
839    Unsupported = 3,
840    AccessDenied = 4,
841    InstanceNotFound = 5,
842    InstanceAlreadyExists = 6,
843    InstanceCannotStart = 7,
844    InstanceCannotResolve = 8,
845    CollectionNotFound = 9,
846    ResourceUnavailable = 10,
847    InstanceDied = 11,
848    ResourceNotFound = 12,
849    InstanceCannotUnresolve = 13,
850    InstanceAlreadyStarted = 14,
851    DependencyCycle = 15,
852    UnknownOrdinal_(u32) = 16,
853}
854
855impl ::fidl_next::Encodable for Error {
856    type Encoded = WireError;
857}
858impl ::std::convert::From<u32> for Error {
859    fn from(value: u32) -> Self {
860        match value {
861            1 => Self::Internal,
862            2 => Self::InvalidArguments,
863            3 => Self::Unsupported,
864            4 => Self::AccessDenied,
865            5 => Self::InstanceNotFound,
866            6 => Self::InstanceAlreadyExists,
867            7 => Self::InstanceCannotStart,
868            8 => Self::InstanceCannotResolve,
869            9 => Self::CollectionNotFound,
870            10 => Self::ResourceUnavailable,
871            11 => Self::InstanceDied,
872            12 => Self::ResourceNotFound,
873            13 => Self::InstanceCannotUnresolve,
874            14 => Self::InstanceAlreadyStarted,
875            15 => Self::DependencyCycle,
876
877            _ => Self::UnknownOrdinal_(value),
878        }
879    }
880}
881
882unsafe impl<___E> ::fidl_next::Encode<___E> for Error
883where
884    ___E: ?Sized,
885{
886    #[inline]
887    fn encode(
888        self,
889        encoder: &mut ___E,
890        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
891    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
892        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
893    }
894}
895
896unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Error
897where
898    ___E: ?Sized,
899{
900    #[inline]
901    fn encode_ref(
902        &self,
903        encoder: &mut ___E,
904        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
905    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
906        ::fidl_next::munge!(let WireError { value } = out);
907        let _ = value.write(::fidl_next::WireU32::from(match *self {
908            Self::Internal => 1,
909
910            Self::InvalidArguments => 2,
911
912            Self::Unsupported => 3,
913
914            Self::AccessDenied => 4,
915
916            Self::InstanceNotFound => 5,
917
918            Self::InstanceAlreadyExists => 6,
919
920            Self::InstanceCannotStart => 7,
921
922            Self::InstanceCannotResolve => 8,
923
924            Self::CollectionNotFound => 9,
925
926            Self::ResourceUnavailable => 10,
927
928            Self::InstanceDied => 11,
929
930            Self::ResourceNotFound => 12,
931
932            Self::InstanceCannotUnresolve => 13,
933
934            Self::InstanceAlreadyStarted => 14,
935
936            Self::DependencyCycle => 15,
937
938            Self::UnknownOrdinal_(value) => value,
939        }));
940
941        Ok(())
942    }
943}
944
945impl ::core::convert::From<WireError> for Error {
946    fn from(wire: WireError) -> Self {
947        match u32::from(wire.value) {
948            1 => Self::Internal,
949
950            2 => Self::InvalidArguments,
951
952            3 => Self::Unsupported,
953
954            4 => Self::AccessDenied,
955
956            5 => Self::InstanceNotFound,
957
958            6 => Self::InstanceAlreadyExists,
959
960            7 => Self::InstanceCannotStart,
961
962            8 => Self::InstanceCannotResolve,
963
964            9 => Self::CollectionNotFound,
965
966            10 => Self::ResourceUnavailable,
967
968            11 => Self::InstanceDied,
969
970            12 => Self::ResourceNotFound,
971
972            13 => Self::InstanceCannotUnresolve,
973
974            14 => Self::InstanceAlreadyStarted,
975
976            15 => Self::DependencyCycle,
977
978            value => Self::UnknownOrdinal_(value),
979        }
980    }
981}
982
983impl ::fidl_next::FromWire<WireError> for Error {
984    #[inline]
985    fn from_wire(wire: WireError) -> Self {
986        Self::from(wire)
987    }
988}
989
990impl ::fidl_next::IntoNatural for WireError {
991    type Natural = Error;
992}
993
994impl ::fidl_next::FromWireRef<WireError> for Error {
995    #[inline]
996    fn from_wire_ref(wire: &WireError) -> Self {
997        Self::from(*wire)
998    }
999}
1000
1001/// The wire type corresponding to [`Error`].
1002#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1003#[repr(transparent)]
1004pub struct WireError {
1005    value: ::fidl_next::WireU32,
1006}
1007
1008unsafe impl ::fidl_next::Wire for WireError {
1009    type Decoded<'de> = Self;
1010
1011    #[inline]
1012    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1013        // Wire enums have no padding
1014    }
1015}
1016
1017impl WireError {
1018    pub const INTERNAL: WireError = WireError { value: ::fidl_next::WireU32(1) };
1019
1020    pub const INVALID_ARGUMENTS: WireError = WireError { value: ::fidl_next::WireU32(2) };
1021
1022    pub const UNSUPPORTED: WireError = WireError { value: ::fidl_next::WireU32(3) };
1023
1024    pub const ACCESS_DENIED: WireError = WireError { value: ::fidl_next::WireU32(4) };
1025
1026    pub const INSTANCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(5) };
1027
1028    pub const INSTANCE_ALREADY_EXISTS: WireError = WireError { value: ::fidl_next::WireU32(6) };
1029
1030    pub const INSTANCE_CANNOT_START: WireError = WireError { value: ::fidl_next::WireU32(7) };
1031
1032    pub const INSTANCE_CANNOT_RESOLVE: WireError = WireError { value: ::fidl_next::WireU32(8) };
1033
1034    pub const COLLECTION_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(9) };
1035
1036    pub const RESOURCE_UNAVAILABLE: WireError = WireError { value: ::fidl_next::WireU32(10) };
1037
1038    pub const INSTANCE_DIED: WireError = WireError { value: ::fidl_next::WireU32(11) };
1039
1040    pub const RESOURCE_NOT_FOUND: WireError = WireError { value: ::fidl_next::WireU32(12) };
1041
1042    pub const INSTANCE_CANNOT_UNRESOLVE: WireError = WireError { value: ::fidl_next::WireU32(13) };
1043
1044    pub const INSTANCE_ALREADY_STARTED: WireError = WireError { value: ::fidl_next::WireU32(14) };
1045
1046    pub const DEPENDENCY_CYCLE: WireError = WireError { value: ::fidl_next::WireU32(15) };
1047}
1048
1049unsafe impl<___D> ::fidl_next::Decode<___D> for WireError
1050where
1051    ___D: ?Sized,
1052{
1053    fn decode(
1054        slot: ::fidl_next::Slot<'_, Self>,
1055        _: &mut ___D,
1056    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1057        Ok(())
1058    }
1059}
1060
1061impl ::core::convert::From<Error> for WireError {
1062    fn from(natural: Error) -> Self {
1063        match natural {
1064            Error::Internal => WireError::INTERNAL,
1065
1066            Error::InvalidArguments => WireError::INVALID_ARGUMENTS,
1067
1068            Error::Unsupported => WireError::UNSUPPORTED,
1069
1070            Error::AccessDenied => WireError::ACCESS_DENIED,
1071
1072            Error::InstanceNotFound => WireError::INSTANCE_NOT_FOUND,
1073
1074            Error::InstanceAlreadyExists => WireError::INSTANCE_ALREADY_EXISTS,
1075
1076            Error::InstanceCannotStart => WireError::INSTANCE_CANNOT_START,
1077
1078            Error::InstanceCannotResolve => WireError::INSTANCE_CANNOT_RESOLVE,
1079
1080            Error::CollectionNotFound => WireError::COLLECTION_NOT_FOUND,
1081
1082            Error::ResourceUnavailable => WireError::RESOURCE_UNAVAILABLE,
1083
1084            Error::InstanceDied => WireError::INSTANCE_DIED,
1085
1086            Error::ResourceNotFound => WireError::RESOURCE_NOT_FOUND,
1087
1088            Error::InstanceCannotUnresolve => WireError::INSTANCE_CANNOT_UNRESOLVE,
1089
1090            Error::InstanceAlreadyStarted => WireError::INSTANCE_ALREADY_STARTED,
1091
1092            Error::DependencyCycle => WireError::DEPENDENCY_CYCLE,
1093
1094            Error::UnknownOrdinal_(value) => WireError { value: ::fidl_next::WireU32::from(value) },
1095        }
1096    }
1097}
1098
1099#[derive(PartialEq, Debug)]
1100#[repr(C)]
1101pub struct ControllerGetExposedDictionaryResponse {
1102    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
1103}
1104
1105impl ::fidl_next::Encodable for ControllerGetExposedDictionaryResponse {
1106    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1107        Self,
1108        WireControllerGetExposedDictionaryResponse,
1109    > = unsafe {
1110        ::fidl_next::CopyOptimization::enable_if(
1111            true
1112
1113                && <
1114                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
1115                >::COPY_OPTIMIZATION.is_enabled()
1116
1117        )
1118    };
1119
1120    type Encoded = WireControllerGetExposedDictionaryResponse;
1121}
1122
1123unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerGetExposedDictionaryResponse
1124where
1125    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1126    ___E: ::fidl_next::fuchsia::HandleEncoder,
1127{
1128    #[inline]
1129    fn encode(
1130        self,
1131        encoder_: &mut ___E,
1132        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1133    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1134        ::fidl_next::munge! {
1135            let Self::Encoded {
1136                dictionary,
1137
1138            } = out_;
1139        }
1140
1141        ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
1142
1143        Ok(())
1144    }
1145}
1146
1147impl ::fidl_next::EncodableOption for ControllerGetExposedDictionaryResponse {
1148    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerGetExposedDictionaryResponse>;
1149}
1150
1151unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerGetExposedDictionaryResponse
1152where
1153    ___E: ::fidl_next::Encoder + ?Sized,
1154    ControllerGetExposedDictionaryResponse: ::fidl_next::Encode<___E>,
1155{
1156    #[inline]
1157    fn encode_option(
1158        this: ::core::option::Option<Self>,
1159        encoder: &mut ___E,
1160        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1161    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1162        if let Some(inner) = this {
1163            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1164            ::fidl_next::WireBox::encode_present(out);
1165        } else {
1166            ::fidl_next::WireBox::encode_absent(out);
1167        }
1168
1169        Ok(())
1170    }
1171}
1172
1173impl ::fidl_next::FromWire<WireControllerGetExposedDictionaryResponse>
1174    for ControllerGetExposedDictionaryResponse
1175{
1176    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1177        WireControllerGetExposedDictionaryResponse,
1178        Self,
1179    > = unsafe {
1180        ::fidl_next::CopyOptimization::enable_if(
1181            true
1182
1183                && <
1184                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
1185                >::COPY_OPTIMIZATION.is_enabled()
1186
1187        )
1188    };
1189
1190    #[inline]
1191    fn from_wire(wire: WireControllerGetExposedDictionaryResponse) -> Self {
1192        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
1193    }
1194}
1195
1196impl ::fidl_next::IntoNatural for WireControllerGetExposedDictionaryResponse {
1197    type Natural = ControllerGetExposedDictionaryResponse;
1198}
1199
1200/// The wire type corresponding to [`ControllerGetExposedDictionaryResponse`].
1201#[derive(Debug)]
1202#[repr(C)]
1203pub struct WireControllerGetExposedDictionaryResponse {
1204    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1205}
1206static_assertions::const_assert_eq!(
1207    std::mem::size_of::<WireControllerGetExposedDictionaryResponse>(),
1208    4
1209);
1210static_assertions::const_assert_eq!(
1211    std::mem::align_of::<WireControllerGetExposedDictionaryResponse>(),
1212    4
1213);
1214
1215static_assertions::const_assert_eq!(
1216    std::mem::offset_of!(WireControllerGetExposedDictionaryResponse, dictionary),
1217    0
1218);
1219
1220unsafe impl ::fidl_next::Wire for WireControllerGetExposedDictionaryResponse {
1221    type Decoded<'de> = WireControllerGetExposedDictionaryResponse;
1222
1223    #[inline]
1224    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1225        ::fidl_next::munge! {
1226            let Self {
1227
1228                dictionary,
1229
1230            } = &mut *out_;
1231        }
1232
1233        ::fidl_next::Wire::zero_padding(dictionary);
1234    }
1235}
1236
1237unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerGetExposedDictionaryResponse
1238where
1239    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1240    ___D: ::fidl_next::fuchsia::HandleDecoder,
1241{
1242    fn decode(
1243        slot_: ::fidl_next::Slot<'_, Self>,
1244        decoder_: &mut ___D,
1245    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1246        ::fidl_next::munge! {
1247            let Self {
1248
1249                mut dictionary,
1250
1251            } = slot_;
1252        }
1253
1254        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
1255
1256        Ok(())
1257    }
1258}
1259
1260pub type ControllerDestroyResponse = ();
1261
1262/// The wire type corresponding to [`ControllerDestroyResponse`].
1263pub type WireControllerDestroyResponse = ();
1264
1265#[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"]
1266#[derive(PartialEq, Debug, Default)]
1267pub struct NamespaceEntry {
1268    pub path: ::core::option::Option<::std::string::String>,
1269
1270    pub directory: ::core::option::Option<
1271        ::fidl_next::ClientEnd<
1272            ::fidl_next_fuchsia_io::Directory,
1273            ::fidl_next::fuchsia::zx::Channel,
1274        >,
1275    >,
1276}
1277
1278impl NamespaceEntry {
1279    fn __max_ordinal(&self) -> usize {
1280        if self.directory.is_some() {
1281            return 2;
1282        }
1283
1284        if self.path.is_some() {
1285            return 1;
1286        }
1287
1288        0
1289    }
1290}
1291
1292impl ::fidl_next::Encodable for NamespaceEntry {
1293    type Encoded = WireNamespaceEntry<'static>;
1294}
1295
1296unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceEntry
1297where
1298    ___E: ::fidl_next::Encoder + ?Sized,
1299    ___E: ::fidl_next::fuchsia::HandleEncoder,
1300{
1301    #[inline]
1302    fn encode(
1303        mut self,
1304        encoder: &mut ___E,
1305        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1306    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1307        ::fidl_next::munge!(let WireNamespaceEntry { table } = out);
1308
1309        let max_ord = self.__max_ordinal();
1310
1311        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1312        ::fidl_next::Wire::zero_padding(&mut out);
1313
1314        let mut preallocated =
1315            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1316
1317        for i in 1..=max_ord {
1318            match i {
1319                2 => {
1320                    if let Some(value) = self.directory.take() {
1321                        ::fidl_next::WireEnvelope::encode_value(
1322                            value,
1323                            preallocated.encoder,
1324                            &mut out,
1325                        )?;
1326                    } else {
1327                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1328                    }
1329                }
1330
1331                1 => {
1332                    if let Some(value) = self.path.take() {
1333                        ::fidl_next::WireEnvelope::encode_value(
1334                            value,
1335                            preallocated.encoder,
1336                            &mut out,
1337                        )?;
1338                    } else {
1339                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1340                    }
1341                }
1342
1343                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1344            }
1345            unsafe {
1346                preallocated.write_next(out.assume_init_ref());
1347            }
1348        }
1349
1350        ::fidl_next::WireTable::encode_len(table, max_ord);
1351
1352        Ok(())
1353    }
1354}
1355
1356impl<'de> ::fidl_next::FromWire<WireNamespaceEntry<'de>> for NamespaceEntry {
1357    #[inline]
1358    fn from_wire(wire_: WireNamespaceEntry<'de>) -> Self {
1359        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1360
1361        let path = wire_.table.get(1);
1362
1363        let directory = wire_.table.get(2);
1364
1365        Self {
1366            path: path.map(|envelope| {
1367                ::fidl_next::FromWire::from_wire(unsafe {
1368                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
1369                })
1370            }),
1371
1372            directory: directory.map(|envelope| {
1373                ::fidl_next::FromWire::from_wire(unsafe {
1374                    envelope.read_unchecked::<::fidl_next::ClientEnd<
1375                        ::fidl_next_fuchsia_io::Directory,
1376                        ::fidl_next::fuchsia::WireChannel,
1377                    >>()
1378                })
1379            }),
1380        }
1381    }
1382}
1383
1384impl<'de> ::fidl_next::IntoNatural for WireNamespaceEntry<'de> {
1385    type Natural = NamespaceEntry;
1386}
1387
1388/// The wire type corresponding to [`NamespaceEntry`].
1389#[repr(C)]
1390pub struct WireNamespaceEntry<'de> {
1391    table: ::fidl_next::WireTable<'de>,
1392}
1393
1394impl<'de> Drop for WireNamespaceEntry<'de> {
1395    fn drop(&mut self) {
1396        let _ = self
1397            .table
1398            .get(1)
1399            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
1400
1401        let _ = self.table.get(2).map(|envelope| unsafe {
1402            envelope.read_unchecked::<::fidl_next::ClientEnd<
1403                ::fidl_next_fuchsia_io::Directory,
1404                ::fidl_next::fuchsia::WireChannel,
1405            >>()
1406        });
1407    }
1408}
1409
1410unsafe impl ::fidl_next::Wire for WireNamespaceEntry<'static> {
1411    type Decoded<'de> = WireNamespaceEntry<'de>;
1412
1413    #[inline]
1414    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1415        ::fidl_next::munge!(let Self { table } = out);
1416        ::fidl_next::WireTable::zero_padding(table);
1417    }
1418}
1419
1420unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceEntry<'static>
1421where
1422    ___D: ::fidl_next::Decoder + ?Sized,
1423    ___D: ::fidl_next::fuchsia::HandleDecoder,
1424{
1425    fn decode(
1426        slot: ::fidl_next::Slot<'_, Self>,
1427        decoder: &mut ___D,
1428    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1429        ::fidl_next::munge!(let Self { table } = slot);
1430
1431        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1432            match ordinal {
1433                0 => unsafe { ::core::hint::unreachable_unchecked() },
1434
1435                1 => {
1436                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
1437                        slot.as_mut(),
1438                        decoder,
1439                    )?;
1440
1441                    let value = unsafe {
1442                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
1443                    };
1444
1445                    if value.len() > 4095 {
1446                        return Err(::fidl_next::DecodeError::VectorTooLong {
1447                            size: value.len() as u64,
1448                            limit: 4095,
1449                        });
1450                    }
1451
1452                    Ok(())
1453                }
1454
1455                2 => {
1456                    ::fidl_next::WireEnvelope::decode_as::<
1457                        ___D,
1458                        ::fidl_next::ClientEnd<
1459                            ::fidl_next_fuchsia_io::Directory,
1460                            ::fidl_next::fuchsia::WireChannel,
1461                        >,
1462                    >(slot.as_mut(), decoder)?;
1463
1464                    Ok(())
1465                }
1466
1467                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1468            }
1469        })
1470    }
1471}
1472
1473impl<'de> WireNamespaceEntry<'de> {
1474    pub fn path(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
1475        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1476    }
1477
1478    pub fn directory(
1479        &self,
1480    ) -> ::core::option::Option<
1481        &::fidl_next::ClientEnd<
1482            ::fidl_next_fuchsia_io::Directory,
1483            ::fidl_next::fuchsia::WireChannel,
1484        >,
1485    > {
1486        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1487    }
1488}
1489
1490impl<'de> ::core::fmt::Debug for WireNamespaceEntry<'de> {
1491    fn fmt(
1492        &self,
1493        f: &mut ::core::fmt::Formatter<'_>,
1494    ) -> ::core::result::Result<(), ::core::fmt::Error> {
1495        f.debug_struct("NamespaceEntry")
1496            .field("path", &self.path())
1497            .field("directory", &self.directory())
1498            .finish()
1499    }
1500}
1501
1502#[derive(PartialEq, Debug, Default)]
1503pub struct StartChildArgs {
1504    pub numbered_handles:
1505        ::core::option::Option<::std::vec::Vec<::fidl_next_fuchsia_process::HandleInfo>>,
1506
1507    pub namespace_entries: ::core::option::Option<::std::vec::Vec<crate::NamespaceEntry>>,
1508
1509    pub dictionary: ::core::option::Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
1510}
1511
1512impl StartChildArgs {
1513    fn __max_ordinal(&self) -> usize {
1514        if self.dictionary.is_some() {
1515            return 3;
1516        }
1517
1518        if self.namespace_entries.is_some() {
1519            return 2;
1520        }
1521
1522        if self.numbered_handles.is_some() {
1523            return 1;
1524        }
1525
1526        0
1527    }
1528}
1529
1530impl ::fidl_next::Encodable for StartChildArgs {
1531    type Encoded = WireStartChildArgs<'static>;
1532}
1533
1534unsafe impl<___E> ::fidl_next::Encode<___E> for StartChildArgs
1535where
1536    ___E: ::fidl_next::Encoder + ?Sized,
1537    ___E: ::fidl_next::fuchsia::HandleEncoder,
1538{
1539    #[inline]
1540    fn encode(
1541        mut self,
1542        encoder: &mut ___E,
1543        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1544    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1545        ::fidl_next::munge!(let WireStartChildArgs { table } = out);
1546
1547        let max_ord = self.__max_ordinal();
1548
1549        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
1550        ::fidl_next::Wire::zero_padding(&mut out);
1551
1552        let mut preallocated =
1553            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
1554
1555        for i in 1..=max_ord {
1556            match i {
1557                3 => {
1558                    if let Some(value) = self.dictionary.take() {
1559                        ::fidl_next::WireEnvelope::encode_value(
1560                            value,
1561                            preallocated.encoder,
1562                            &mut out,
1563                        )?;
1564                    } else {
1565                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1566                    }
1567                }
1568
1569                2 => {
1570                    if let Some(value) = self.namespace_entries.take() {
1571                        ::fidl_next::WireEnvelope::encode_value(
1572                            value,
1573                            preallocated.encoder,
1574                            &mut out,
1575                        )?;
1576                    } else {
1577                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1578                    }
1579                }
1580
1581                1 => {
1582                    if let Some(value) = self.numbered_handles.take() {
1583                        ::fidl_next::WireEnvelope::encode_value(
1584                            value,
1585                            preallocated.encoder,
1586                            &mut out,
1587                        )?;
1588                    } else {
1589                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
1590                    }
1591                }
1592
1593                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
1594            }
1595            unsafe {
1596                preallocated.write_next(out.assume_init_ref());
1597            }
1598        }
1599
1600        ::fidl_next::WireTable::encode_len(table, max_ord);
1601
1602        Ok(())
1603    }
1604}
1605
1606impl<'de> ::fidl_next::FromWire<WireStartChildArgs<'de>> for StartChildArgs {
1607    #[inline]
1608    fn from_wire(wire_: WireStartChildArgs<'de>) -> Self {
1609        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
1610
1611        let numbered_handles = wire_.table.get(1);
1612
1613        let namespace_entries = wire_.table.get(2);
1614
1615        let dictionary = wire_.table.get(3);
1616
1617        Self {
1618
1619
1620                numbered_handles: numbered_handles.map(|envelope| ::fidl_next::FromWire::from_wire(
1621                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>() }
1622                )),
1623
1624
1625                namespace_entries: namespace_entries.map(|envelope| ::fidl_next::FromWire::from_wire(
1626                    unsafe { envelope.read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>() }
1627                )),
1628
1629
1630                dictionary: dictionary.map(|envelope| ::fidl_next::FromWire::from_wire(
1631                    unsafe { envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>() }
1632                )),
1633
1634        }
1635    }
1636}
1637
1638impl<'de> ::fidl_next::IntoNatural for WireStartChildArgs<'de> {
1639    type Natural = StartChildArgs;
1640}
1641
1642/// The wire type corresponding to [`StartChildArgs`].
1643#[repr(C)]
1644pub struct WireStartChildArgs<'de> {
1645    table: ::fidl_next::WireTable<'de>,
1646}
1647
1648impl<'de> Drop for WireStartChildArgs<'de> {
1649    fn drop(&mut self) {
1650        let _ = self.table.get(1)
1651                .map(|envelope| unsafe {
1652                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
1653                });
1654
1655        let _ = self.table.get(2).map(|envelope| unsafe {
1656            envelope
1657                .read_unchecked::<::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>>()
1658        });
1659
1660        let _ = self.table.get(3).map(|envelope| unsafe {
1661            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
1662        });
1663    }
1664}
1665
1666unsafe impl ::fidl_next::Wire for WireStartChildArgs<'static> {
1667    type Decoded<'de> = WireStartChildArgs<'de>;
1668
1669    #[inline]
1670    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1671        ::fidl_next::munge!(let Self { table } = out);
1672        ::fidl_next::WireTable::zero_padding(table);
1673    }
1674}
1675
1676unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartChildArgs<'static>
1677where
1678    ___D: ::fidl_next::Decoder + ?Sized,
1679    ___D: ::fidl_next::fuchsia::HandleDecoder,
1680{
1681    fn decode(
1682        slot: ::fidl_next::Slot<'_, Self>,
1683        decoder: &mut ___D,
1684    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1685        ::fidl_next::munge!(let Self { table } = slot);
1686
1687        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
1688            match ordinal {
1689                0 => unsafe { ::core::hint::unreachable_unchecked() },
1690
1691                1 => {
1692                    ::fidl_next::WireEnvelope::decode_as::<
1693                        ___D,
1694                        ::fidl_next::WireVector<
1695                            'static,
1696                            ::fidl_next_fuchsia_process::WireHandleInfo,
1697                        >,
1698                    >(slot.as_mut(), decoder)?;
1699
1700                    let value = unsafe {
1701                        slot
1702                                            .deref_unchecked()
1703                                            .deref_unchecked::<
1704                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
1705                                            >()
1706                    };
1707
1708                    if value.len() > 128 {
1709                        return Err(::fidl_next::DecodeError::VectorTooLong {
1710                            size: value.len() as u64,
1711                            limit: 128,
1712                        });
1713                    }
1714
1715                    Ok(())
1716                }
1717
1718                2 => {
1719                    ::fidl_next::WireEnvelope::decode_as::<
1720                        ___D,
1721                        ::fidl_next::WireVector<'static, crate::WireNamespaceEntry<'static>>,
1722                    >(slot.as_mut(), decoder)?;
1723
1724                    let value = unsafe {
1725                        slot
1726                                            .deref_unchecked()
1727                                            .deref_unchecked::<
1728                                                ::fidl_next::WireVector<'_, crate::WireNamespaceEntry<'_>>
1729                                            >()
1730                    };
1731
1732                    if value.len() > 32 {
1733                        return Err(::fidl_next::DecodeError::VectorTooLong {
1734                            size: value.len() as u64,
1735                            limit: 32,
1736                        });
1737                    }
1738
1739                    Ok(())
1740                }
1741
1742                3 => {
1743                    ::fidl_next::WireEnvelope::decode_as::<
1744                        ___D,
1745                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
1746                    >(slot.as_mut(), decoder)?;
1747
1748                    Ok(())
1749                }
1750
1751                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
1752            }
1753        })
1754    }
1755}
1756
1757impl<'de> WireStartChildArgs<'de> {
1758    pub fn numbered_handles(
1759        &self,
1760    ) -> ::core::option::Option<
1761        &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>,
1762    > {
1763        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
1764    }
1765
1766    pub fn namespace_entries(
1767        &self,
1768    ) -> ::core::option::Option<&::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>> {
1769        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
1770    }
1771
1772    pub fn dictionary(
1773        &self,
1774    ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
1775        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
1776    }
1777}
1778
1779impl<'de> ::core::fmt::Debug for WireStartChildArgs<'de> {
1780    fn fmt(
1781        &self,
1782        f: &mut ::core::fmt::Formatter<'_>,
1783    ) -> ::core::result::Result<(), ::core::fmt::Error> {
1784        f.debug_struct("StartChildArgs")
1785            .field("numbered_handles", &self.numbered_handles())
1786            .field("namespace_entries", &self.namespace_entries())
1787            .field("dictionary", &self.dictionary())
1788            .finish()
1789    }
1790}
1791
1792#[derive(PartialEq, Debug)]
1793pub struct ControllerStartRequest {
1794    pub args: crate::StartChildArgs,
1795
1796    pub execution_controller:
1797        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::zx::Channel>,
1798}
1799
1800impl ::fidl_next::Encodable for ControllerStartRequest {
1801    type Encoded = WireControllerStartRequest<'static>;
1802}
1803
1804unsafe impl<___E> ::fidl_next::Encode<___E> for ControllerStartRequest
1805where
1806    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1807    ___E: ::fidl_next::Encoder,
1808    ___E: ::fidl_next::fuchsia::HandleEncoder,
1809{
1810    #[inline]
1811    fn encode(
1812        self,
1813        encoder_: &mut ___E,
1814        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1815    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1816        ::fidl_next::munge! {
1817            let Self::Encoded {
1818                args,
1819                execution_controller,
1820
1821            } = out_;
1822        }
1823
1824        ::fidl_next::Encode::encode(self.args, encoder_, args)?;
1825
1826        ::fidl_next::Encode::encode(self.execution_controller, encoder_, execution_controller)?;
1827
1828        Ok(())
1829    }
1830}
1831
1832impl ::fidl_next::EncodableOption for ControllerStartRequest {
1833    type EncodedOption = ::fidl_next::WireBox<'static, WireControllerStartRequest<'static>>;
1834}
1835
1836unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ControllerStartRequest
1837where
1838    ___E: ::fidl_next::Encoder + ?Sized,
1839    ControllerStartRequest: ::fidl_next::Encode<___E>,
1840{
1841    #[inline]
1842    fn encode_option(
1843        this: ::core::option::Option<Self>,
1844        encoder: &mut ___E,
1845        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1846    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1847        if let Some(inner) = this {
1848            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1849            ::fidl_next::WireBox::encode_present(out);
1850        } else {
1851            ::fidl_next::WireBox::encode_absent(out);
1852        }
1853
1854        Ok(())
1855    }
1856}
1857
1858impl<'de> ::fidl_next::FromWire<WireControllerStartRequest<'de>> for ControllerStartRequest {
1859    #[inline]
1860    fn from_wire(wire: WireControllerStartRequest<'de>) -> Self {
1861        Self {
1862            args: ::fidl_next::FromWire::from_wire(wire.args),
1863
1864            execution_controller: ::fidl_next::FromWire::from_wire(wire.execution_controller),
1865        }
1866    }
1867}
1868
1869impl<'de> ::fidl_next::IntoNatural for WireControllerStartRequest<'de> {
1870    type Natural = ControllerStartRequest;
1871}
1872
1873/// The wire type corresponding to [`ControllerStartRequest`].
1874#[derive(Debug)]
1875#[repr(C)]
1876pub struct WireControllerStartRequest<'de> {
1877    pub args: crate::WireStartChildArgs<'de>,
1878
1879    pub execution_controller:
1880        ::fidl_next::ServerEnd<crate::ExecutionController, ::fidl_next::fuchsia::WireChannel>,
1881}
1882static_assertions::const_assert_eq!(std::mem::size_of::<WireControllerStartRequest<'_>>(), 24);
1883static_assertions::const_assert_eq!(std::mem::align_of::<WireControllerStartRequest<'_>>(), 8);
1884
1885static_assertions::const_assert_eq!(std::mem::offset_of!(WireControllerStartRequest<'_>, args), 0);
1886
1887static_assertions::const_assert_eq!(
1888    std::mem::offset_of!(WireControllerStartRequest<'_>, execution_controller),
1889    16
1890);
1891
1892unsafe impl ::fidl_next::Wire for WireControllerStartRequest<'static> {
1893    type Decoded<'de> = WireControllerStartRequest<'de>;
1894
1895    #[inline]
1896    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
1897        ::fidl_next::munge! {
1898            let Self {
1899
1900                args,
1901                execution_controller,
1902
1903            } = &mut *out_;
1904        }
1905
1906        ::fidl_next::Wire::zero_padding(args);
1907
1908        ::fidl_next::Wire::zero_padding(execution_controller);
1909
1910        unsafe {
1911            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
1912        }
1913    }
1914}
1915
1916unsafe impl<___D> ::fidl_next::Decode<___D> for WireControllerStartRequest<'static>
1917where
1918    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1919    ___D: ::fidl_next::Decoder,
1920    ___D: ::fidl_next::fuchsia::HandleDecoder,
1921{
1922    fn decode(
1923        slot_: ::fidl_next::Slot<'_, Self>,
1924        decoder_: &mut ___D,
1925    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
1926        ::fidl_next::munge! {
1927            let Self {
1928
1929                mut args,
1930                mut execution_controller,
1931
1932            } = slot_;
1933        }
1934
1935        ::fidl_next::Decode::decode(args.as_mut(), decoder_)?;
1936
1937        ::fidl_next::Decode::decode(execution_controller.as_mut(), decoder_)?;
1938
1939        Ok(())
1940    }
1941}
1942
1943/// The type corresponding to the Controller protocol.
1944#[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"]
1945#[derive(PartialEq, Debug)]
1946pub struct Controller;
1947
1948pub mod controller {
1949    pub mod prelude {
1950        pub use crate::{Controller, ControllerClientHandler, ControllerServerHandler, controller};
1951
1952        pub use crate::ControllerStartRequest;
1953
1954        pub use crate::ControllerDestroyResponse;
1955
1956        pub use crate::ControllerGetExposedDictionaryResponse;
1957
1958        pub use crate::ControllerIsStartedResponse;
1959
1960        pub use crate::ControllerStartResponse;
1961
1962        pub use crate::Error;
1963    }
1964
1965    pub struct Start;
1966
1967    impl ::fidl_next::Method for Start {
1968        const ORDINAL: u64 = 7532130149195770565;
1969
1970        type Protocol = crate::Controller;
1971
1972        type Request = crate::WireControllerStartRequest<'static>;
1973
1974        type Response = ::fidl_next::WireFlexibleResult<
1975            'static,
1976            crate::WireControllerStartResponse,
1977            crate::WireError,
1978        >;
1979    }
1980
1981    pub struct IsStarted;
1982
1983    impl ::fidl_next::Method for IsStarted {
1984        const ORDINAL: u64 = 2402079833990398915;
1985
1986        type Protocol = crate::Controller;
1987
1988        type Request = ();
1989
1990        type Response = ::fidl_next::WireFlexibleResult<
1991            'static,
1992            crate::WireControllerIsStartedResponse,
1993            crate::WireError,
1994        >;
1995    }
1996
1997    pub struct GetExposedDictionary;
1998
1999    impl ::fidl_next::Method for GetExposedDictionary {
2000        const ORDINAL: u64 = 9099583788120940443;
2001
2002        type Protocol = crate::Controller;
2003
2004        type Request = ();
2005
2006        type Response = ::fidl_next::WireFlexibleResult<
2007            'static,
2008            crate::WireControllerGetExposedDictionaryResponse,
2009            crate::WireError,
2010        >;
2011    }
2012
2013    pub struct Destroy;
2014
2015    impl ::fidl_next::Method for Destroy {
2016        const ORDINAL: u64 = 8381937394141370177;
2017
2018        type Protocol = crate::Controller;
2019
2020        type Request = ();
2021
2022        type Response = ::fidl_next::WireFlexibleResult<
2023            'static,
2024            crate::WireControllerDestroyResponse,
2025            crate::WireError,
2026        >;
2027    }
2028
2029    mod ___detail {
2030
2031        pub struct Start<T0, T1> {
2032            args: T0,
2033
2034            execution_controller: T1,
2035        }
2036
2037        impl<T0, T1> ::fidl_next::Encodable for Start<T0, T1>
2038        where
2039            T0: ::fidl_next::Encodable<Encoded = crate::WireStartChildArgs<'static>>,
2040            T1: ::fidl_next::Encodable<
2041                    Encoded = ::fidl_next::ServerEnd<
2042                        crate::ExecutionController,
2043                        ::fidl_next::fuchsia::WireChannel,
2044                    >,
2045                >,
2046        {
2047            type Encoded = crate::WireControllerStartRequest<'static>;
2048        }
2049
2050        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Start<T0, T1>
2051        where
2052            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2053            ___E: ::fidl_next::Encoder,
2054            ___E: ::fidl_next::fuchsia::HandleEncoder,
2055            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStartChildArgs<'static>>,
2056            T1: ::fidl_next::Encode<
2057                    ___E,
2058                    Encoded = ::fidl_next::ServerEnd<
2059                        crate::ExecutionController,
2060                        ::fidl_next::fuchsia::WireChannel,
2061                    >,
2062                >,
2063        {
2064            #[inline]
2065            fn encode(
2066                self,
2067                encoder_: &mut ___E,
2068                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2069            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2070                ::fidl_next::munge! {
2071                    let Self::Encoded {
2072                        args,
2073                        execution_controller,
2074
2075                    } = out_;
2076                }
2077
2078                ::fidl_next::Encode::encode(self.args, encoder_, args)?;
2079
2080                ::fidl_next::Encode::encode(
2081                    self.execution_controller,
2082                    encoder_,
2083                    execution_controller,
2084                )?;
2085
2086                Ok(())
2087            }
2088        }
2089
2090        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Controller
2091        where
2092            ___T: ::fidl_next::Transport,
2093        {
2094            type Client = ControllerClient<___T>;
2095            type Server = ControllerServer<___T>;
2096        }
2097
2098        /// The client for the `Controller` protocol.
2099        #[repr(transparent)]
2100        pub struct ControllerClient<___T: ::fidl_next::Transport> {
2101            #[allow(dead_code)]
2102            client: ::fidl_next::protocol::Client<___T>,
2103        }
2104
2105        impl<___T> ControllerClient<___T>
2106        where
2107            ___T: ::fidl_next::Transport,
2108        {
2109            #[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"]
2110            pub fn start(
2111                &self,
2112
2113                args: impl ::fidl_next::Encode<
2114                    <___T as ::fidl_next::Transport>::SendBuffer,
2115                    Encoded = crate::WireStartChildArgs<'static>,
2116                >,
2117
2118                execution_controller: impl ::fidl_next::Encode<
2119                    <___T as ::fidl_next::Transport>::SendBuffer,
2120                    Encoded = ::fidl_next::ServerEnd<
2121                        crate::ExecutionController,
2122                        ::fidl_next::fuchsia::WireChannel,
2123                    >,
2124                >,
2125            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
2126            where
2127                <___T as ::fidl_next::Transport>::SendBuffer:
2128                    ::fidl_next::encoder::InternalHandleEncoder,
2129                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
2130                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
2131            {
2132                self.start_with(Start { args, execution_controller })
2133            }
2134
2135            #[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"]
2136            pub fn start_with<___R>(
2137                &self,
2138                request: ___R,
2139            ) -> ::fidl_next::TwoWayFuture<'_, super::Start, ___T>
2140            where
2141                ___R: ::fidl_next::Encode<
2142                        <___T as ::fidl_next::Transport>::SendBuffer,
2143                        Encoded = crate::WireControllerStartRequest<'static>,
2144                    >,
2145            {
2146                ::fidl_next::TwoWayFuture::from_untyped(
2147                    self.client.send_two_way(7532130149195770565, request),
2148                )
2149            }
2150
2151            #[doc = " Returns true if this instance is currently running.\n"]
2152            pub fn is_started(&self) -> ::fidl_next::TwoWayFuture<'_, super::IsStarted, ___T> {
2153                ::fidl_next::TwoWayFuture::from_untyped(
2154                    self.client.send_two_way(2402079833990398915, ()),
2155                )
2156            }
2157
2158            #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2159            pub fn get_exposed_dictionary(
2160                &self,
2161            ) -> ::fidl_next::TwoWayFuture<'_, super::GetExposedDictionary, ___T> {
2162                ::fidl_next::TwoWayFuture::from_untyped(
2163                    self.client.send_two_way(9099583788120940443, ()),
2164                )
2165            }
2166
2167            #[doc = " Destroys this component. When this method returns, the component is\n either destroyed or in the case of an error no destruction happened.\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 - `INTERNAL`: Something prevented destruction from succeeding -- component\n   manager\'s logs will contain more detail.\n"]
2168            pub fn destroy(&self) -> ::fidl_next::TwoWayFuture<'_, super::Destroy, ___T> {
2169                ::fidl_next::TwoWayFuture::from_untyped(
2170                    self.client.send_two_way(8381937394141370177, ()),
2171                )
2172            }
2173        }
2174
2175        /// The server for the `Controller` protocol.
2176        #[repr(transparent)]
2177        pub struct ControllerServer<___T: ::fidl_next::Transport> {
2178            server: ::fidl_next::protocol::Server<___T>,
2179        }
2180
2181        impl<___T> ControllerServer<___T> where ___T: ::fidl_next::Transport {}
2182    }
2183}
2184
2185/// A client handler for the Controller protocol.
2186///
2187/// See [`Controller`] for more details.
2188pub trait ControllerClientHandler<
2189    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
2190    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2191>
2192{
2193    fn on_unknown_interaction(
2194        &mut self,
2195        ordinal: u64,
2196    ) -> impl ::core::future::Future<
2197        Output = ::core::result::Result<
2198            (),
2199            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2200        >,
2201    > + ::core::marker::Send {
2202        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
2203    }
2204}
2205
2206impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Controller
2207where
2208    ___H: ControllerClientHandler<___T> + ::core::marker::Send,
2209    ___T: ::fidl_next::Transport,
2210    <controller::Start as ::fidl_next::Method>::Response:
2211        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2212    <controller::IsStarted as ::fidl_next::Method>::Response:
2213        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2214    <controller::GetExposedDictionary as ::fidl_next::Method>::Response:
2215        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2216    <controller::Destroy as ::fidl_next::Method>::Response:
2217        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2218{
2219    async fn on_event(
2220        handler: &mut ___H,
2221        ordinal: u64,
2222        buffer: ___T::RecvBuffer,
2223    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
2224        match ordinal {
2225            ordinal => handler.on_unknown_interaction(ordinal).await,
2226        }
2227    }
2228}
2229
2230/// A server handler for the Controller protocol.
2231///
2232/// See [`Controller`] for more details.
2233pub trait ControllerServerHandler<
2234    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
2235    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
2236>
2237{
2238    #[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"]
2239    fn start(
2240        &mut self,
2241
2242        request: ::fidl_next::Request<controller::Start, ___T>,
2243
2244        responder: ::fidl_next::Responder<controller::Start, ___T>,
2245    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2246
2247    #[doc = " Returns true if this instance is currently running.\n"]
2248    fn is_started(
2249        &mut self,
2250
2251        responder: ::fidl_next::Responder<controller::IsStarted, ___T>,
2252    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2253
2254    #[doc = " Returns the dictionary containing the component\'s exposed capabilities.\n"]
2255    fn get_exposed_dictionary(
2256        &mut self,
2257
2258        responder: ::fidl_next::Responder<controller::GetExposedDictionary, ___T>,
2259    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2260
2261    #[doc = " Destroys this component. When this method returns, the component is\n either destroyed or in the case of an error no destruction happened.\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 - `INTERNAL`: Something prevented destruction from succeeding -- component\n   manager\'s logs will contain more detail.\n"]
2262    fn destroy(
2263        &mut self,
2264
2265        responder: ::fidl_next::Responder<controller::Destroy, ___T>,
2266    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
2267
2268    fn on_unknown_interaction(
2269        &mut self,
2270        ordinal: u64,
2271    ) -> impl ::core::future::Future<
2272        Output = ::core::result::Result<
2273            (),
2274            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2275        >,
2276    > + ::core::marker::Send {
2277        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
2278    }
2279}
2280
2281impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Controller
2282where
2283    ___H: ControllerServerHandler<___T> + ::core::marker::Send,
2284    ___T: ::fidl_next::Transport,
2285    <controller::Start as ::fidl_next::Method>::Request:
2286        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
2287{
2288    async fn on_one_way(
2289        handler: &mut ___H,
2290        ordinal: u64,
2291        buffer: ___T::RecvBuffer,
2292    ) -> ::core::result::Result<
2293        (),
2294        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2295    > {
2296        match ordinal {
2297            ordinal => handler.on_unknown_interaction(ordinal).await,
2298        }
2299    }
2300
2301    async fn on_two_way(
2302        handler: &mut ___H,
2303        ordinal: u64,
2304        buffer: ___T::RecvBuffer,
2305        responder: ::fidl_next::protocol::Responder<___T>,
2306    ) -> ::core::result::Result<
2307        (),
2308        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
2309    > {
2310        match ordinal {
2311            7532130149195770565 => {
2312                let responder = ::fidl_next::Responder::from_untyped(responder);
2313
2314                match ::fidl_next::DecoderExt::decode(buffer) {
2315                    Ok(decoded) => {
2316                        handler.start(decoded, responder).await;
2317                        Ok(())
2318                    }
2319                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
2320                        ordinal: 7532130149195770565,
2321                        error,
2322                    }),
2323                }
2324            }
2325
2326            2402079833990398915 => {
2327                let responder = ::fidl_next::Responder::from_untyped(responder);
2328
2329                handler.is_started(responder).await;
2330                Ok(())
2331            }
2332
2333            9099583788120940443 => {
2334                let responder = ::fidl_next::Responder::from_untyped(responder);
2335
2336                handler.get_exposed_dictionary(responder).await;
2337                Ok(())
2338            }
2339
2340            8381937394141370177 => {
2341                let responder = ::fidl_next::Responder::from_untyped(responder);
2342
2343                handler.destroy(responder).await;
2344                Ok(())
2345            }
2346
2347            ordinal => handler.on_unknown_interaction(ordinal).await,
2348        }
2349    }
2350}
2351
2352#[doc = " The maximum number of dynamic offers that can target a created component.\n"]
2353pub const MAX_DYNAMIC_OFFER_COUNT: u32 = 128 as u32;
2354
2355#[derive(PartialEq, Debug, Default)]
2356pub struct CreateChildArgs {
2357    pub numbered_handles:
2358        ::core::option::Option<::std::vec::Vec<::fidl_next_fuchsia_process::HandleInfo>>,
2359
2360    pub dynamic_offers:
2361        ::core::option::Option<::std::vec::Vec<::fidl_next_fuchsia_component_decl::Offer>>,
2362
2363    pub controller: ::core::option::Option<
2364        ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
2365    >,
2366
2367    pub dictionary: ::core::option::Option<::fidl_next_fuchsia_component_sandbox::DictionaryRef>,
2368}
2369
2370impl CreateChildArgs {
2371    fn __max_ordinal(&self) -> usize {
2372        if self.dictionary.is_some() {
2373            return 4;
2374        }
2375
2376        if self.controller.is_some() {
2377            return 3;
2378        }
2379
2380        if self.dynamic_offers.is_some() {
2381            return 2;
2382        }
2383
2384        if self.numbered_handles.is_some() {
2385            return 1;
2386        }
2387
2388        0
2389    }
2390}
2391
2392impl ::fidl_next::Encodable for CreateChildArgs {
2393    type Encoded = WireCreateChildArgs<'static>;
2394}
2395
2396unsafe impl<___E> ::fidl_next::Encode<___E> for CreateChildArgs
2397where
2398    ___E: ::fidl_next::Encoder + ?Sized,
2399    ___E: ::fidl_next::fuchsia::HandleEncoder,
2400{
2401    #[inline]
2402    fn encode(
2403        mut self,
2404        encoder: &mut ___E,
2405        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2406    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2407        ::fidl_next::munge!(let WireCreateChildArgs { table } = out);
2408
2409        let max_ord = self.__max_ordinal();
2410
2411        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2412        ::fidl_next::Wire::zero_padding(&mut out);
2413
2414        let mut preallocated =
2415            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2416
2417        for i in 1..=max_ord {
2418            match i {
2419                4 => {
2420                    if let Some(value) = self.dictionary.take() {
2421                        ::fidl_next::WireEnvelope::encode_value(
2422                            value,
2423                            preallocated.encoder,
2424                            &mut out,
2425                        )?;
2426                    } else {
2427                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2428                    }
2429                }
2430
2431                3 => {
2432                    if let Some(value) = self.controller.take() {
2433                        ::fidl_next::WireEnvelope::encode_value(
2434                            value,
2435                            preallocated.encoder,
2436                            &mut out,
2437                        )?;
2438                    } else {
2439                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2440                    }
2441                }
2442
2443                2 => {
2444                    if let Some(value) = self.dynamic_offers.take() {
2445                        ::fidl_next::WireEnvelope::encode_value(
2446                            value,
2447                            preallocated.encoder,
2448                            &mut out,
2449                        )?;
2450                    } else {
2451                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2452                    }
2453                }
2454
2455                1 => {
2456                    if let Some(value) = self.numbered_handles.take() {
2457                        ::fidl_next::WireEnvelope::encode_value(
2458                            value,
2459                            preallocated.encoder,
2460                            &mut out,
2461                        )?;
2462                    } else {
2463                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2464                    }
2465                }
2466
2467                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2468            }
2469            unsafe {
2470                preallocated.write_next(out.assume_init_ref());
2471            }
2472        }
2473
2474        ::fidl_next::WireTable::encode_len(table, max_ord);
2475
2476        Ok(())
2477    }
2478}
2479
2480impl<'de> ::fidl_next::FromWire<WireCreateChildArgs<'de>> for CreateChildArgs {
2481    #[inline]
2482    fn from_wire(wire_: WireCreateChildArgs<'de>) -> Self {
2483        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2484
2485        let numbered_handles = wire_.table.get(1);
2486
2487        let dynamic_offers = wire_.table.get(2);
2488
2489        let controller = wire_.table.get(3);
2490
2491        let dictionary = wire_.table.get(4);
2492
2493        Self {
2494            numbered_handles:
2495                numbered_handles.map(|envelope| {
2496                    ::fidl_next::FromWire::from_wire(unsafe {
2497                        envelope.read_unchecked::<::fidl_next::WireVector<
2498                            'de,
2499                            ::fidl_next_fuchsia_process::WireHandleInfo,
2500                        >>()
2501                    })
2502                }),
2503
2504            dynamic_offers: dynamic_offers.map(|envelope| {
2505                ::fidl_next::FromWire::from_wire(unsafe {
2506                    envelope.read_unchecked::<::fidl_next::WireVector<
2507                        'de,
2508                        ::fidl_next_fuchsia_component_decl::WireOffer<'de>,
2509                    >>()
2510                })
2511            }),
2512
2513            controller:
2514                controller.map(|envelope| {
2515                    ::fidl_next::FromWire::from_wire(unsafe {
2516                        envelope.read_unchecked::<::fidl_next::ServerEnd<
2517                            crate::Controller,
2518                            ::fidl_next::fuchsia::WireChannel,
2519                        >>()
2520                    })
2521                }),
2522
2523            dictionary: dictionary.map(|envelope| {
2524                ::fidl_next::FromWire::from_wire(unsafe {
2525                    envelope
2526                        .read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>(
2527                        )
2528                })
2529            }),
2530        }
2531    }
2532}
2533
2534impl<'de> ::fidl_next::IntoNatural for WireCreateChildArgs<'de> {
2535    type Natural = CreateChildArgs;
2536}
2537
2538/// The wire type corresponding to [`CreateChildArgs`].
2539#[repr(C)]
2540pub struct WireCreateChildArgs<'de> {
2541    table: ::fidl_next::WireTable<'de>,
2542}
2543
2544impl<'de> Drop for WireCreateChildArgs<'de> {
2545    fn drop(&mut self) {
2546        let _ = self.table.get(1)
2547                .map(|envelope| unsafe {
2548                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>>()
2549                });
2550
2551        let _ = self.table.get(2)
2552                .map(|envelope| unsafe {
2553                    envelope.read_unchecked::<::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>>()
2554                });
2555
2556        let _ = self.table.get(3)
2557                .map(|envelope| unsafe {
2558                    envelope.read_unchecked::<::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>>()
2559                });
2560
2561        let _ = self.table.get(4).map(|envelope| unsafe {
2562            envelope.read_unchecked::<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>()
2563        });
2564    }
2565}
2566
2567unsafe impl ::fidl_next::Wire for WireCreateChildArgs<'static> {
2568    type Decoded<'de> = WireCreateChildArgs<'de>;
2569
2570    #[inline]
2571    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2572        ::fidl_next::munge!(let Self { table } = out);
2573        ::fidl_next::WireTable::zero_padding(table);
2574    }
2575}
2576
2577unsafe impl<___D> ::fidl_next::Decode<___D> for WireCreateChildArgs<'static>
2578where
2579    ___D: ::fidl_next::Decoder + ?Sized,
2580    ___D: ::fidl_next::fuchsia::HandleDecoder,
2581{
2582    fn decode(
2583        slot: ::fidl_next::Slot<'_, Self>,
2584        decoder: &mut ___D,
2585    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2586        ::fidl_next::munge!(let Self { table } = slot);
2587
2588        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2589            match ordinal {
2590                0 => unsafe { ::core::hint::unreachable_unchecked() },
2591
2592                1 => {
2593                    ::fidl_next::WireEnvelope::decode_as::<
2594                        ___D,
2595                        ::fidl_next::WireVector<
2596                            'static,
2597                            ::fidl_next_fuchsia_process::WireHandleInfo,
2598                        >,
2599                    >(slot.as_mut(), decoder)?;
2600
2601                    let value = unsafe {
2602                        slot
2603                                            .deref_unchecked()
2604                                            .deref_unchecked::<
2605                                                ::fidl_next::WireVector<'_, ::fidl_next_fuchsia_process::WireHandleInfo>
2606                                            >()
2607                    };
2608
2609                    if value.len() > 128 {
2610                        return Err(::fidl_next::DecodeError::VectorTooLong {
2611                            size: value.len() as u64,
2612                            limit: 128,
2613                        });
2614                    }
2615
2616                    Ok(())
2617                }
2618
2619                2 => {
2620                    ::fidl_next::WireEnvelope::decode_as::<
2621                        ___D,
2622                        ::fidl_next::WireVector<
2623                            'static,
2624                            ::fidl_next_fuchsia_component_decl::WireOffer<'static>,
2625                        >,
2626                    >(slot.as_mut(), decoder)?;
2627
2628                    let value = unsafe {
2629                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireVector<
2630                            '_,
2631                            ::fidl_next_fuchsia_component_decl::WireOffer<'_>,
2632                        >>()
2633                    };
2634
2635                    if value.len() > 128 {
2636                        return Err(::fidl_next::DecodeError::VectorTooLong {
2637                            size: value.len() as u64,
2638                            limit: 128,
2639                        });
2640                    }
2641
2642                    Ok(())
2643                }
2644
2645                3 => {
2646                    ::fidl_next::WireEnvelope::decode_as::<
2647                        ___D,
2648                        ::fidl_next::ServerEnd<
2649                            crate::Controller,
2650                            ::fidl_next::fuchsia::WireChannel,
2651                        >,
2652                    >(slot.as_mut(), decoder)?;
2653
2654                    Ok(())
2655                }
2656
2657                4 => {
2658                    ::fidl_next::WireEnvelope::decode_as::<
2659                        ___D,
2660                        ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
2661                    >(slot.as_mut(), decoder)?;
2662
2663                    Ok(())
2664                }
2665
2666                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2667            }
2668        })
2669    }
2670}
2671
2672impl<'de> WireCreateChildArgs<'de> {
2673    pub fn numbered_handles(
2674        &self,
2675    ) -> ::core::option::Option<
2676        &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_process::WireHandleInfo>,
2677    > {
2678        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2679    }
2680
2681    pub fn dynamic_offers(
2682        &self,
2683    ) -> ::core::option::Option<
2684        &::fidl_next::WireVector<'de, ::fidl_next_fuchsia_component_decl::WireOffer<'de>>,
2685    > {
2686        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2687    }
2688
2689    pub fn controller(
2690        &self,
2691    ) -> ::core::option::Option<
2692        &::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
2693    > {
2694        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
2695    }
2696
2697    pub fn dictionary(
2698        &self,
2699    ) -> ::core::option::Option<&::fidl_next_fuchsia_component_sandbox::WireDictionaryRef> {
2700        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
2701    }
2702}
2703
2704impl<'de> ::core::fmt::Debug for WireCreateChildArgs<'de> {
2705    fn fmt(
2706        &self,
2707        f: &mut ::core::fmt::Formatter<'_>,
2708    ) -> ::core::result::Result<(), ::core::fmt::Error> {
2709        f.debug_struct("CreateChildArgs")
2710            .field("numbered_handles", &self.numbered_handles())
2711            .field("dynamic_offers", &self.dynamic_offers())
2712            .field("controller", &self.controller())
2713            .field("dictionary", &self.dictionary())
2714            .finish()
2715    }
2716}
2717
2718#[doc = " Payload for DebugStarted events.\n"]
2719#[derive(PartialEq, Debug, Default)]
2720pub struct DebugStartedPayload {
2721    pub runtime_dir: ::core::option::Option<
2722        ::fidl_next::ClientEnd<
2723            ::fidl_next_fuchsia_io::Directory,
2724            ::fidl_next::fuchsia::zx::Channel,
2725        >,
2726    >,
2727
2728    pub break_on_start: ::core::option::Option<::fidl_next::fuchsia::zx::EventPair>,
2729}
2730
2731impl DebugStartedPayload {
2732    fn __max_ordinal(&self) -> usize {
2733        if self.break_on_start.is_some() {
2734            return 2;
2735        }
2736
2737        if self.runtime_dir.is_some() {
2738            return 1;
2739        }
2740
2741        0
2742    }
2743}
2744
2745impl ::fidl_next::Encodable for DebugStartedPayload {
2746    type Encoded = WireDebugStartedPayload<'static>;
2747}
2748
2749unsafe impl<___E> ::fidl_next::Encode<___E> for DebugStartedPayload
2750where
2751    ___E: ::fidl_next::Encoder + ?Sized,
2752    ___E: ::fidl_next::fuchsia::HandleEncoder,
2753{
2754    #[inline]
2755    fn encode(
2756        mut self,
2757        encoder: &mut ___E,
2758        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2759    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2760        ::fidl_next::munge!(let WireDebugStartedPayload { table } = out);
2761
2762        let max_ord = self.__max_ordinal();
2763
2764        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
2765        ::fidl_next::Wire::zero_padding(&mut out);
2766
2767        let mut preallocated =
2768            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
2769
2770        for i in 1..=max_ord {
2771            match i {
2772                2 => {
2773                    if let Some(value) = self.break_on_start.take() {
2774                        ::fidl_next::WireEnvelope::encode_value(
2775                            value,
2776                            preallocated.encoder,
2777                            &mut out,
2778                        )?;
2779                    } else {
2780                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2781                    }
2782                }
2783
2784                1 => {
2785                    if let Some(value) = self.runtime_dir.take() {
2786                        ::fidl_next::WireEnvelope::encode_value(
2787                            value,
2788                            preallocated.encoder,
2789                            &mut out,
2790                        )?;
2791                    } else {
2792                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
2793                    }
2794                }
2795
2796                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
2797            }
2798            unsafe {
2799                preallocated.write_next(out.assume_init_ref());
2800            }
2801        }
2802
2803        ::fidl_next::WireTable::encode_len(table, max_ord);
2804
2805        Ok(())
2806    }
2807}
2808
2809impl<'de> ::fidl_next::FromWire<WireDebugStartedPayload<'de>> for DebugStartedPayload {
2810    #[inline]
2811    fn from_wire(wire_: WireDebugStartedPayload<'de>) -> Self {
2812        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
2813
2814        let runtime_dir = wire_.table.get(1);
2815
2816        let break_on_start = wire_.table.get(2);
2817
2818        Self {
2819            runtime_dir: runtime_dir.map(|envelope| {
2820                ::fidl_next::FromWire::from_wire(unsafe {
2821                    envelope.read_unchecked::<::fidl_next::ClientEnd<
2822                        ::fidl_next_fuchsia_io::Directory,
2823                        ::fidl_next::fuchsia::WireChannel,
2824                    >>()
2825                })
2826            }),
2827
2828            break_on_start: break_on_start.map(|envelope| {
2829                ::fidl_next::FromWire::from_wire(unsafe {
2830                    envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2831                })
2832            }),
2833        }
2834    }
2835}
2836
2837impl<'de> ::fidl_next::IntoNatural for WireDebugStartedPayload<'de> {
2838    type Natural = DebugStartedPayload;
2839}
2840
2841/// The wire type corresponding to [`DebugStartedPayload`].
2842#[repr(C)]
2843pub struct WireDebugStartedPayload<'de> {
2844    table: ::fidl_next::WireTable<'de>,
2845}
2846
2847impl<'de> Drop for WireDebugStartedPayload<'de> {
2848    fn drop(&mut self) {
2849        let _ = self.table.get(1).map(|envelope| unsafe {
2850            envelope.read_unchecked::<::fidl_next::ClientEnd<
2851                ::fidl_next_fuchsia_io::Directory,
2852                ::fidl_next::fuchsia::WireChannel,
2853            >>()
2854        });
2855
2856        let _ = self.table.get(2).map(|envelope| unsafe {
2857            envelope.read_unchecked::<::fidl_next::fuchsia::WireEventPair>()
2858        });
2859    }
2860}
2861
2862unsafe impl ::fidl_next::Wire for WireDebugStartedPayload<'static> {
2863    type Decoded<'de> = WireDebugStartedPayload<'de>;
2864
2865    #[inline]
2866    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2867        ::fidl_next::munge!(let Self { table } = out);
2868        ::fidl_next::WireTable::zero_padding(table);
2869    }
2870}
2871
2872unsafe impl<___D> ::fidl_next::Decode<___D> for WireDebugStartedPayload<'static>
2873where
2874    ___D: ::fidl_next::Decoder + ?Sized,
2875    ___D: ::fidl_next::fuchsia::HandleDecoder,
2876{
2877    fn decode(
2878        slot: ::fidl_next::Slot<'_, Self>,
2879        decoder: &mut ___D,
2880    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2881        ::fidl_next::munge!(let Self { table } = slot);
2882
2883        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
2884            match ordinal {
2885                0 => unsafe { ::core::hint::unreachable_unchecked() },
2886
2887                1 => {
2888                    ::fidl_next::WireEnvelope::decode_as::<
2889                        ___D,
2890                        ::fidl_next::ClientEnd<
2891                            ::fidl_next_fuchsia_io::Directory,
2892                            ::fidl_next::fuchsia::WireChannel,
2893                        >,
2894                    >(slot.as_mut(), decoder)?;
2895
2896                    Ok(())
2897                }
2898
2899                2 => {
2900                    ::fidl_next::WireEnvelope::decode_as::<
2901                        ___D,
2902                        ::fidl_next::fuchsia::WireEventPair,
2903                    >(slot.as_mut(), decoder)?;
2904
2905                    Ok(())
2906                }
2907
2908                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
2909            }
2910        })
2911    }
2912}
2913
2914impl<'de> WireDebugStartedPayload<'de> {
2915    pub fn runtime_dir(
2916        &self,
2917    ) -> ::core::option::Option<
2918        &::fidl_next::ClientEnd<
2919            ::fidl_next_fuchsia_io::Directory,
2920            ::fidl_next::fuchsia::WireChannel,
2921        >,
2922    > {
2923        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
2924    }
2925
2926    pub fn break_on_start(&self) -> ::core::option::Option<&::fidl_next::fuchsia::WireEventPair> {
2927        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
2928    }
2929}
2930
2931impl<'de> ::core::fmt::Debug for WireDebugStartedPayload<'de> {
2932    fn fmt(
2933        &self,
2934        f: &mut ::core::fmt::Formatter<'_>,
2935    ) -> ::core::result::Result<(), ::core::fmt::Error> {
2936        f.debug_struct("DebugStartedPayload")
2937            .field("runtime_dir", &self.runtime_dir())
2938            .field("break_on_start", &self.break_on_start())
2939            .finish()
2940    }
2941}
2942
2943#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2944#[repr(u32)]
2945pub enum DeletionError {
2946    Connection = 1,
2947    Protocol = 2,
2948    NoneAvailable = 3,
2949    Unsupported = 4,
2950}
2951
2952impl ::fidl_next::Encodable for DeletionError {
2953    type Encoded = WireDeletionError;
2954}
2955impl ::core::convert::TryFrom<u32> for DeletionError {
2956    type Error = ::fidl_next::UnknownStrictEnumMemberError;
2957    fn try_from(
2958        value: u32,
2959    ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
2960        match value {
2961            1 => Ok(Self::Connection),
2962            2 => Ok(Self::Protocol),
2963            3 => Ok(Self::NoneAvailable),
2964            4 => Ok(Self::Unsupported),
2965
2966            _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
2967        }
2968    }
2969}
2970
2971unsafe impl<___E> ::fidl_next::Encode<___E> for DeletionError
2972where
2973    ___E: ?Sized,
2974{
2975    #[inline]
2976    fn encode(
2977        self,
2978        encoder: &mut ___E,
2979        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2980    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2981        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
2982    }
2983}
2984
2985unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DeletionError
2986where
2987    ___E: ?Sized,
2988{
2989    #[inline]
2990    fn encode_ref(
2991        &self,
2992        encoder: &mut ___E,
2993        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2994    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2995        ::fidl_next::munge!(let WireDeletionError { value } = out);
2996        let _ = value.write(::fidl_next::WireU32::from(match *self {
2997            Self::Connection => 1,
2998
2999            Self::Protocol => 2,
3000
3001            Self::NoneAvailable => 3,
3002
3003            Self::Unsupported => 4,
3004        }));
3005
3006        Ok(())
3007    }
3008}
3009
3010impl ::core::convert::From<WireDeletionError> for DeletionError {
3011    fn from(wire: WireDeletionError) -> Self {
3012        match u32::from(wire.value) {
3013            1 => Self::Connection,
3014
3015            2 => Self::Protocol,
3016
3017            3 => Self::NoneAvailable,
3018
3019            4 => Self::Unsupported,
3020
3021            _ => unsafe { ::core::hint::unreachable_unchecked() },
3022        }
3023    }
3024}
3025
3026impl ::fidl_next::FromWire<WireDeletionError> for DeletionError {
3027    #[inline]
3028    fn from_wire(wire: WireDeletionError) -> Self {
3029        Self::from(wire)
3030    }
3031}
3032
3033impl ::fidl_next::IntoNatural for WireDeletionError {
3034    type Natural = DeletionError;
3035}
3036
3037impl ::fidl_next::FromWireRef<WireDeletionError> for DeletionError {
3038    #[inline]
3039    fn from_wire_ref(wire: &WireDeletionError) -> Self {
3040        Self::from(*wire)
3041    }
3042}
3043
3044/// The wire type corresponding to [`DeletionError`].
3045#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3046#[repr(transparent)]
3047pub struct WireDeletionError {
3048    value: ::fidl_next::WireU32,
3049}
3050
3051unsafe impl ::fidl_next::Wire for WireDeletionError {
3052    type Decoded<'de> = Self;
3053
3054    #[inline]
3055    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3056        // Wire enums have no padding
3057    }
3058}
3059
3060impl WireDeletionError {
3061    pub const CONNECTION: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(1) };
3062
3063    pub const PROTOCOL: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(2) };
3064
3065    pub const NONE_AVAILABLE: WireDeletionError =
3066        WireDeletionError { value: ::fidl_next::WireU32(3) };
3067
3068    pub const UNSUPPORTED: WireDeletionError = WireDeletionError { value: ::fidl_next::WireU32(4) };
3069}
3070
3071unsafe impl<___D> ::fidl_next::Decode<___D> for WireDeletionError
3072where
3073    ___D: ?Sized,
3074{
3075    fn decode(
3076        slot: ::fidl_next::Slot<'_, Self>,
3077        _: &mut ___D,
3078    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3079        ::fidl_next::munge!(let Self { value } = slot);
3080
3081        match u32::from(*value) {
3082            1 | 2 | 3 | 4 => (),
3083            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
3084        }
3085
3086        Ok(())
3087    }
3088}
3089
3090impl ::core::convert::From<DeletionError> for WireDeletionError {
3091    fn from(natural: DeletionError) -> Self {
3092        match natural {
3093            DeletionError::Connection => WireDeletionError::CONNECTION,
3094
3095            DeletionError::Protocol => WireDeletionError::PROTOCOL,
3096
3097            DeletionError::NoneAvailable => WireDeletionError::NONE_AVAILABLE,
3098
3099            DeletionError::Unsupported => WireDeletionError::UNSUPPORTED,
3100        }
3101    }
3102}
3103
3104#[doc = " Payload for Destroyed events.\n"]
3105#[derive(PartialEq, Clone, Debug, Default)]
3106pub struct DestroyedPayload {}
3107
3108impl DestroyedPayload {
3109    fn __max_ordinal(&self) -> usize {
3110        0
3111    }
3112}
3113
3114impl ::fidl_next::Encodable for DestroyedPayload {
3115    type Encoded = WireDestroyedPayload<'static>;
3116}
3117
3118unsafe impl<___E> ::fidl_next::Encode<___E> for DestroyedPayload
3119where
3120    ___E: ::fidl_next::Encoder + ?Sized,
3121{
3122    #[inline]
3123    fn encode(
3124        mut self,
3125        encoder: &mut ___E,
3126        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3127    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3128        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
3129
3130        let max_ord = self.__max_ordinal();
3131
3132        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3133        ::fidl_next::Wire::zero_padding(&mut out);
3134
3135        let mut preallocated =
3136            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3137
3138        for i in 1..=max_ord {
3139            match i {
3140                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3141            }
3142            unsafe {
3143                preallocated.write_next(out.assume_init_ref());
3144            }
3145        }
3146
3147        ::fidl_next::WireTable::encode_len(table, max_ord);
3148
3149        Ok(())
3150    }
3151}
3152
3153unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DestroyedPayload
3154where
3155    ___E: ::fidl_next::Encoder + ?Sized,
3156{
3157    #[inline]
3158    fn encode_ref(
3159        &self,
3160        encoder: &mut ___E,
3161        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3162    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3163        ::fidl_next::munge!(let WireDestroyedPayload { table } = out);
3164
3165        let max_ord = self.__max_ordinal();
3166
3167        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3168        ::fidl_next::Wire::zero_padding(&mut out);
3169
3170        let mut preallocated =
3171            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3172
3173        for i in 1..=max_ord {
3174            match i {
3175                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3176            }
3177            unsafe {
3178                preallocated.write_next(out.assume_init_ref());
3179            }
3180        }
3181
3182        ::fidl_next::WireTable::encode_len(table, max_ord);
3183
3184        Ok(())
3185    }
3186}
3187
3188impl<'de> ::fidl_next::FromWire<WireDestroyedPayload<'de>> for DestroyedPayload {
3189    #[inline]
3190    fn from_wire(wire_: WireDestroyedPayload<'de>) -> Self {
3191        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3192
3193        Self {}
3194    }
3195}
3196
3197impl<'de> ::fidl_next::IntoNatural for WireDestroyedPayload<'de> {
3198    type Natural = DestroyedPayload;
3199}
3200
3201impl<'de> ::fidl_next::FromWireRef<WireDestroyedPayload<'de>> for DestroyedPayload {
3202    #[inline]
3203    fn from_wire_ref(wire: &WireDestroyedPayload<'de>) -> Self {
3204        Self {}
3205    }
3206}
3207
3208/// The wire type corresponding to [`DestroyedPayload`].
3209#[repr(C)]
3210pub struct WireDestroyedPayload<'de> {
3211    table: ::fidl_next::WireTable<'de>,
3212}
3213
3214impl<'de> Drop for WireDestroyedPayload<'de> {
3215    fn drop(&mut self) {}
3216}
3217
3218unsafe impl ::fidl_next::Wire for WireDestroyedPayload<'static> {
3219    type Decoded<'de> = WireDestroyedPayload<'de>;
3220
3221    #[inline]
3222    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3223        ::fidl_next::munge!(let Self { table } = out);
3224        ::fidl_next::WireTable::zero_padding(table);
3225    }
3226}
3227
3228unsafe impl<___D> ::fidl_next::Decode<___D> for WireDestroyedPayload<'static>
3229where
3230    ___D: ::fidl_next::Decoder + ?Sized,
3231{
3232    fn decode(
3233        slot: ::fidl_next::Slot<'_, Self>,
3234        decoder: &mut ___D,
3235    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3236        ::fidl_next::munge!(let Self { table } = slot);
3237
3238        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3239            match ordinal {
3240                0 => unsafe { ::core::hint::unreachable_unchecked() },
3241
3242                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3243            }
3244        })
3245    }
3246}
3247
3248impl<'de> WireDestroyedPayload<'de> {}
3249
3250impl<'de> ::core::fmt::Debug for WireDestroyedPayload<'de> {
3251    fn fmt(
3252        &self,
3253        f: &mut ::core::fmt::Formatter<'_>,
3254    ) -> ::core::result::Result<(), ::core::fmt::Error> {
3255        f.debug_struct("DestroyedPayload").finish()
3256    }
3257}
3258
3259#[doc = " Payload for Discovered events.\n"]
3260#[derive(PartialEq, Clone, Debug, Default)]
3261pub struct DiscoveredPayload {}
3262
3263impl DiscoveredPayload {
3264    fn __max_ordinal(&self) -> usize {
3265        0
3266    }
3267}
3268
3269impl ::fidl_next::Encodable for DiscoveredPayload {
3270    type Encoded = WireDiscoveredPayload<'static>;
3271}
3272
3273unsafe impl<___E> ::fidl_next::Encode<___E> for DiscoveredPayload
3274where
3275    ___E: ::fidl_next::Encoder + ?Sized,
3276{
3277    #[inline]
3278    fn encode(
3279        mut self,
3280        encoder: &mut ___E,
3281        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3282    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3283        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3284
3285        let max_ord = self.__max_ordinal();
3286
3287        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3288        ::fidl_next::Wire::zero_padding(&mut out);
3289
3290        let mut preallocated =
3291            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3292
3293        for i in 1..=max_ord {
3294            match i {
3295                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3296            }
3297            unsafe {
3298                preallocated.write_next(out.assume_init_ref());
3299            }
3300        }
3301
3302        ::fidl_next::WireTable::encode_len(table, max_ord);
3303
3304        Ok(())
3305    }
3306}
3307
3308unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DiscoveredPayload
3309where
3310    ___E: ::fidl_next::Encoder + ?Sized,
3311{
3312    #[inline]
3313    fn encode_ref(
3314        &self,
3315        encoder: &mut ___E,
3316        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3317    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3318        ::fidl_next::munge!(let WireDiscoveredPayload { table } = out);
3319
3320        let max_ord = self.__max_ordinal();
3321
3322        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3323        ::fidl_next::Wire::zero_padding(&mut out);
3324
3325        let mut preallocated =
3326            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3327
3328        for i in 1..=max_ord {
3329            match i {
3330                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3331            }
3332            unsafe {
3333                preallocated.write_next(out.assume_init_ref());
3334            }
3335        }
3336
3337        ::fidl_next::WireTable::encode_len(table, max_ord);
3338
3339        Ok(())
3340    }
3341}
3342
3343impl<'de> ::fidl_next::FromWire<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3344    #[inline]
3345    fn from_wire(wire_: WireDiscoveredPayload<'de>) -> Self {
3346        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3347
3348        Self {}
3349    }
3350}
3351
3352impl<'de> ::fidl_next::IntoNatural for WireDiscoveredPayload<'de> {
3353    type Natural = DiscoveredPayload;
3354}
3355
3356impl<'de> ::fidl_next::FromWireRef<WireDiscoveredPayload<'de>> for DiscoveredPayload {
3357    #[inline]
3358    fn from_wire_ref(wire: &WireDiscoveredPayload<'de>) -> Self {
3359        Self {}
3360    }
3361}
3362
3363/// The wire type corresponding to [`DiscoveredPayload`].
3364#[repr(C)]
3365pub struct WireDiscoveredPayload<'de> {
3366    table: ::fidl_next::WireTable<'de>,
3367}
3368
3369impl<'de> Drop for WireDiscoveredPayload<'de> {
3370    fn drop(&mut self) {}
3371}
3372
3373unsafe impl ::fidl_next::Wire for WireDiscoveredPayload<'static> {
3374    type Decoded<'de> = WireDiscoveredPayload<'de>;
3375
3376    #[inline]
3377    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3378        ::fidl_next::munge!(let Self { table } = out);
3379        ::fidl_next::WireTable::zero_padding(table);
3380    }
3381}
3382
3383unsafe impl<___D> ::fidl_next::Decode<___D> for WireDiscoveredPayload<'static>
3384where
3385    ___D: ::fidl_next::Decoder + ?Sized,
3386{
3387    fn decode(
3388        slot: ::fidl_next::Slot<'_, Self>,
3389        decoder: &mut ___D,
3390    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3391        ::fidl_next::munge!(let Self { table } = slot);
3392
3393        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3394            match ordinal {
3395                0 => unsafe { ::core::hint::unreachable_unchecked() },
3396
3397                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3398            }
3399        })
3400    }
3401}
3402
3403impl<'de> WireDiscoveredPayload<'de> {}
3404
3405impl<'de> ::core::fmt::Debug for WireDiscoveredPayload<'de> {
3406    fn fmt(
3407        &self,
3408        f: &mut ::core::fmt::Formatter<'_>,
3409    ) -> ::core::result::Result<(), ::core::fmt::Error> {
3410        f.debug_struct("DiscoveredPayload").finish()
3411    }
3412}
3413
3414pub const MAX_MONIKER_LENGTH: u32 = 4096 as u32;
3415
3416#[doc = " Payload for Purged events.\n"]
3417#[derive(PartialEq, Clone, Debug, Default)]
3418pub struct PurgedPayload {}
3419
3420impl PurgedPayload {
3421    fn __max_ordinal(&self) -> usize {
3422        0
3423    }
3424}
3425
3426impl ::fidl_next::Encodable for PurgedPayload {
3427    type Encoded = WirePurgedPayload<'static>;
3428}
3429
3430unsafe impl<___E> ::fidl_next::Encode<___E> for PurgedPayload
3431where
3432    ___E: ::fidl_next::Encoder + ?Sized,
3433{
3434    #[inline]
3435    fn encode(
3436        mut self,
3437        encoder: &mut ___E,
3438        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3439    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3440        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3441
3442        let max_ord = self.__max_ordinal();
3443
3444        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3445        ::fidl_next::Wire::zero_padding(&mut out);
3446
3447        let mut preallocated =
3448            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3449
3450        for i in 1..=max_ord {
3451            match i {
3452                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3453            }
3454            unsafe {
3455                preallocated.write_next(out.assume_init_ref());
3456            }
3457        }
3458
3459        ::fidl_next::WireTable::encode_len(table, max_ord);
3460
3461        Ok(())
3462    }
3463}
3464
3465unsafe impl<___E> ::fidl_next::EncodeRef<___E> for PurgedPayload
3466where
3467    ___E: ::fidl_next::Encoder + ?Sized,
3468{
3469    #[inline]
3470    fn encode_ref(
3471        &self,
3472        encoder: &mut ___E,
3473        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3474    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3475        ::fidl_next::munge!(let WirePurgedPayload { table } = out);
3476
3477        let max_ord = self.__max_ordinal();
3478
3479        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3480        ::fidl_next::Wire::zero_padding(&mut out);
3481
3482        let mut preallocated =
3483            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3484
3485        for i in 1..=max_ord {
3486            match i {
3487                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3488            }
3489            unsafe {
3490                preallocated.write_next(out.assume_init_ref());
3491            }
3492        }
3493
3494        ::fidl_next::WireTable::encode_len(table, max_ord);
3495
3496        Ok(())
3497    }
3498}
3499
3500impl<'de> ::fidl_next::FromWire<WirePurgedPayload<'de>> for PurgedPayload {
3501    #[inline]
3502    fn from_wire(wire_: WirePurgedPayload<'de>) -> Self {
3503        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3504
3505        Self {}
3506    }
3507}
3508
3509impl<'de> ::fidl_next::IntoNatural for WirePurgedPayload<'de> {
3510    type Natural = PurgedPayload;
3511}
3512
3513impl<'de> ::fidl_next::FromWireRef<WirePurgedPayload<'de>> for PurgedPayload {
3514    #[inline]
3515    fn from_wire_ref(wire: &WirePurgedPayload<'de>) -> Self {
3516        Self {}
3517    }
3518}
3519
3520/// The wire type corresponding to [`PurgedPayload`].
3521#[repr(C)]
3522pub struct WirePurgedPayload<'de> {
3523    table: ::fidl_next::WireTable<'de>,
3524}
3525
3526impl<'de> Drop for WirePurgedPayload<'de> {
3527    fn drop(&mut self) {}
3528}
3529
3530unsafe impl ::fidl_next::Wire for WirePurgedPayload<'static> {
3531    type Decoded<'de> = WirePurgedPayload<'de>;
3532
3533    #[inline]
3534    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3535        ::fidl_next::munge!(let Self { table } = out);
3536        ::fidl_next::WireTable::zero_padding(table);
3537    }
3538}
3539
3540unsafe impl<___D> ::fidl_next::Decode<___D> for WirePurgedPayload<'static>
3541where
3542    ___D: ::fidl_next::Decoder + ?Sized,
3543{
3544    fn decode(
3545        slot: ::fidl_next::Slot<'_, Self>,
3546        decoder: &mut ___D,
3547    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3548        ::fidl_next::munge!(let Self { table } = slot);
3549
3550        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3551            match ordinal {
3552                0 => unsafe { ::core::hint::unreachable_unchecked() },
3553
3554                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3555            }
3556        })
3557    }
3558}
3559
3560impl<'de> WirePurgedPayload<'de> {}
3561
3562impl<'de> ::core::fmt::Debug for WirePurgedPayload<'de> {
3563    fn fmt(
3564        &self,
3565        f: &mut ::core::fmt::Formatter<'_>,
3566    ) -> ::core::result::Result<(), ::core::fmt::Error> {
3567        f.debug_struct("PurgedPayload").finish()
3568    }
3569}
3570
3571#[doc = " Payload for Resolved events.\n"]
3572#[derive(PartialEq, Clone, Debug, Default)]
3573pub struct ResolvedPayload {}
3574
3575impl ResolvedPayload {
3576    fn __max_ordinal(&self) -> usize {
3577        0
3578    }
3579}
3580
3581impl ::fidl_next::Encodable for ResolvedPayload {
3582    type Encoded = WireResolvedPayload<'static>;
3583}
3584
3585unsafe impl<___E> ::fidl_next::Encode<___E> for ResolvedPayload
3586where
3587    ___E: ::fidl_next::Encoder + ?Sized,
3588{
3589    #[inline]
3590    fn encode(
3591        mut self,
3592        encoder: &mut ___E,
3593        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3594    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3595        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3596
3597        let max_ord = self.__max_ordinal();
3598
3599        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3600        ::fidl_next::Wire::zero_padding(&mut out);
3601
3602        let mut preallocated =
3603            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3604
3605        for i in 1..=max_ord {
3606            match i {
3607                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3608            }
3609            unsafe {
3610                preallocated.write_next(out.assume_init_ref());
3611            }
3612        }
3613
3614        ::fidl_next::WireTable::encode_len(table, max_ord);
3615
3616        Ok(())
3617    }
3618}
3619
3620unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ResolvedPayload
3621where
3622    ___E: ::fidl_next::Encoder + ?Sized,
3623{
3624    #[inline]
3625    fn encode_ref(
3626        &self,
3627        encoder: &mut ___E,
3628        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3629    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3630        ::fidl_next::munge!(let WireResolvedPayload { table } = out);
3631
3632        let max_ord = self.__max_ordinal();
3633
3634        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3635        ::fidl_next::Wire::zero_padding(&mut out);
3636
3637        let mut preallocated =
3638            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3639
3640        for i in 1..=max_ord {
3641            match i {
3642                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3643            }
3644            unsafe {
3645                preallocated.write_next(out.assume_init_ref());
3646            }
3647        }
3648
3649        ::fidl_next::WireTable::encode_len(table, max_ord);
3650
3651        Ok(())
3652    }
3653}
3654
3655impl<'de> ::fidl_next::FromWire<WireResolvedPayload<'de>> for ResolvedPayload {
3656    #[inline]
3657    fn from_wire(wire_: WireResolvedPayload<'de>) -> Self {
3658        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3659
3660        Self {}
3661    }
3662}
3663
3664impl<'de> ::fidl_next::IntoNatural for WireResolvedPayload<'de> {
3665    type Natural = ResolvedPayload;
3666}
3667
3668impl<'de> ::fidl_next::FromWireRef<WireResolvedPayload<'de>> for ResolvedPayload {
3669    #[inline]
3670    fn from_wire_ref(wire: &WireResolvedPayload<'de>) -> Self {
3671        Self {}
3672    }
3673}
3674
3675/// The wire type corresponding to [`ResolvedPayload`].
3676#[repr(C)]
3677pub struct WireResolvedPayload<'de> {
3678    table: ::fidl_next::WireTable<'de>,
3679}
3680
3681impl<'de> Drop for WireResolvedPayload<'de> {
3682    fn drop(&mut self) {}
3683}
3684
3685unsafe impl ::fidl_next::Wire for WireResolvedPayload<'static> {
3686    type Decoded<'de> = WireResolvedPayload<'de>;
3687
3688    #[inline]
3689    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3690        ::fidl_next::munge!(let Self { table } = out);
3691        ::fidl_next::WireTable::zero_padding(table);
3692    }
3693}
3694
3695unsafe impl<___D> ::fidl_next::Decode<___D> for WireResolvedPayload<'static>
3696where
3697    ___D: ::fidl_next::Decoder + ?Sized,
3698{
3699    fn decode(
3700        slot: ::fidl_next::Slot<'_, Self>,
3701        decoder: &mut ___D,
3702    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3703        ::fidl_next::munge!(let Self { table } = slot);
3704
3705        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3706            match ordinal {
3707                0 => unsafe { ::core::hint::unreachable_unchecked() },
3708
3709                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3710            }
3711        })
3712    }
3713}
3714
3715impl<'de> WireResolvedPayload<'de> {}
3716
3717impl<'de> ::core::fmt::Debug for WireResolvedPayload<'de> {
3718    fn fmt(
3719        &self,
3720        f: &mut ::core::fmt::Formatter<'_>,
3721    ) -> ::core::result::Result<(), ::core::fmt::Error> {
3722        f.debug_struct("ResolvedPayload").finish()
3723    }
3724}
3725
3726#[doc = " Payload for Started events.\n"]
3727#[derive(PartialEq, Clone, Debug, Default)]
3728pub struct StartedPayload {}
3729
3730impl StartedPayload {
3731    fn __max_ordinal(&self) -> usize {
3732        0
3733    }
3734}
3735
3736impl ::fidl_next::Encodable for StartedPayload {
3737    type Encoded = WireStartedPayload<'static>;
3738}
3739
3740unsafe impl<___E> ::fidl_next::Encode<___E> for StartedPayload
3741where
3742    ___E: ::fidl_next::Encoder + ?Sized,
3743{
3744    #[inline]
3745    fn encode(
3746        mut self,
3747        encoder: &mut ___E,
3748        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3749    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3750        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3751
3752        let max_ord = self.__max_ordinal();
3753
3754        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3755        ::fidl_next::Wire::zero_padding(&mut out);
3756
3757        let mut preallocated =
3758            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3759
3760        for i in 1..=max_ord {
3761            match i {
3762                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3763            }
3764            unsafe {
3765                preallocated.write_next(out.assume_init_ref());
3766            }
3767        }
3768
3769        ::fidl_next::WireTable::encode_len(table, max_ord);
3770
3771        Ok(())
3772    }
3773}
3774
3775unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StartedPayload
3776where
3777    ___E: ::fidl_next::Encoder + ?Sized,
3778{
3779    #[inline]
3780    fn encode_ref(
3781        &self,
3782        encoder: &mut ___E,
3783        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3784    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3785        ::fidl_next::munge!(let WireStartedPayload { table } = out);
3786
3787        let max_ord = self.__max_ordinal();
3788
3789        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3790        ::fidl_next::Wire::zero_padding(&mut out);
3791
3792        let mut preallocated =
3793            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3794
3795        for i in 1..=max_ord {
3796            match i {
3797                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3798            }
3799            unsafe {
3800                preallocated.write_next(out.assume_init_ref());
3801            }
3802        }
3803
3804        ::fidl_next::WireTable::encode_len(table, max_ord);
3805
3806        Ok(())
3807    }
3808}
3809
3810impl<'de> ::fidl_next::FromWire<WireStartedPayload<'de>> for StartedPayload {
3811    #[inline]
3812    fn from_wire(wire_: WireStartedPayload<'de>) -> Self {
3813        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3814
3815        Self {}
3816    }
3817}
3818
3819impl<'de> ::fidl_next::IntoNatural for WireStartedPayload<'de> {
3820    type Natural = StartedPayload;
3821}
3822
3823impl<'de> ::fidl_next::FromWireRef<WireStartedPayload<'de>> for StartedPayload {
3824    #[inline]
3825    fn from_wire_ref(wire: &WireStartedPayload<'de>) -> Self {
3826        Self {}
3827    }
3828}
3829
3830/// The wire type corresponding to [`StartedPayload`].
3831#[repr(C)]
3832pub struct WireStartedPayload<'de> {
3833    table: ::fidl_next::WireTable<'de>,
3834}
3835
3836impl<'de> Drop for WireStartedPayload<'de> {
3837    fn drop(&mut self) {}
3838}
3839
3840unsafe impl ::fidl_next::Wire for WireStartedPayload<'static> {
3841    type Decoded<'de> = WireStartedPayload<'de>;
3842
3843    #[inline]
3844    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3845        ::fidl_next::munge!(let Self { table } = out);
3846        ::fidl_next::WireTable::zero_padding(table);
3847    }
3848}
3849
3850unsafe impl<___D> ::fidl_next::Decode<___D> for WireStartedPayload<'static>
3851where
3852    ___D: ::fidl_next::Decoder + ?Sized,
3853{
3854    fn decode(
3855        slot: ::fidl_next::Slot<'_, Self>,
3856        decoder: &mut ___D,
3857    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3858        ::fidl_next::munge!(let Self { table } = slot);
3859
3860        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
3861            match ordinal {
3862                0 => unsafe { ::core::hint::unreachable_unchecked() },
3863
3864                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
3865            }
3866        })
3867    }
3868}
3869
3870impl<'de> WireStartedPayload<'de> {}
3871
3872impl<'de> ::core::fmt::Debug for WireStartedPayload<'de> {
3873    fn fmt(
3874        &self,
3875        f: &mut ::core::fmt::Formatter<'_>,
3876    ) -> ::core::result::Result<(), ::core::fmt::Error> {
3877        f.debug_struct("StartedPayload").finish()
3878    }
3879}
3880
3881#[doc = " Payload for Unresolved events.\n"]
3882#[derive(PartialEq, Clone, Debug, Default)]
3883pub struct UnresolvedPayload {}
3884
3885impl UnresolvedPayload {
3886    fn __max_ordinal(&self) -> usize {
3887        0
3888    }
3889}
3890
3891impl ::fidl_next::Encodable for UnresolvedPayload {
3892    type Encoded = WireUnresolvedPayload<'static>;
3893}
3894
3895unsafe impl<___E> ::fidl_next::Encode<___E> for UnresolvedPayload
3896where
3897    ___E: ::fidl_next::Encoder + ?Sized,
3898{
3899    #[inline]
3900    fn encode(
3901        mut self,
3902        encoder: &mut ___E,
3903        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3904    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3905        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3906
3907        let max_ord = self.__max_ordinal();
3908
3909        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3910        ::fidl_next::Wire::zero_padding(&mut out);
3911
3912        let mut preallocated =
3913            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3914
3915        for i in 1..=max_ord {
3916            match i {
3917                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3918            }
3919            unsafe {
3920                preallocated.write_next(out.assume_init_ref());
3921            }
3922        }
3923
3924        ::fidl_next::WireTable::encode_len(table, max_ord);
3925
3926        Ok(())
3927    }
3928}
3929
3930unsafe impl<___E> ::fidl_next::EncodeRef<___E> for UnresolvedPayload
3931where
3932    ___E: ::fidl_next::Encoder + ?Sized,
3933{
3934    #[inline]
3935    fn encode_ref(
3936        &self,
3937        encoder: &mut ___E,
3938        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3939    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
3940        ::fidl_next::munge!(let WireUnresolvedPayload { table } = out);
3941
3942        let max_ord = self.__max_ordinal();
3943
3944        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
3945        ::fidl_next::Wire::zero_padding(&mut out);
3946
3947        let mut preallocated =
3948            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
3949
3950        for i in 1..=max_ord {
3951            match i {
3952                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
3953            }
3954            unsafe {
3955                preallocated.write_next(out.assume_init_ref());
3956            }
3957        }
3958
3959        ::fidl_next::WireTable::encode_len(table, max_ord);
3960
3961        Ok(())
3962    }
3963}
3964
3965impl<'de> ::fidl_next::FromWire<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3966    #[inline]
3967    fn from_wire(wire_: WireUnresolvedPayload<'de>) -> Self {
3968        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
3969
3970        Self {}
3971    }
3972}
3973
3974impl<'de> ::fidl_next::IntoNatural for WireUnresolvedPayload<'de> {
3975    type Natural = UnresolvedPayload;
3976}
3977
3978impl<'de> ::fidl_next::FromWireRef<WireUnresolvedPayload<'de>> for UnresolvedPayload {
3979    #[inline]
3980    fn from_wire_ref(wire: &WireUnresolvedPayload<'de>) -> Self {
3981        Self {}
3982    }
3983}
3984
3985/// The wire type corresponding to [`UnresolvedPayload`].
3986#[repr(C)]
3987pub struct WireUnresolvedPayload<'de> {
3988    table: ::fidl_next::WireTable<'de>,
3989}
3990
3991impl<'de> Drop for WireUnresolvedPayload<'de> {
3992    fn drop(&mut self) {}
3993}
3994
3995unsafe impl ::fidl_next::Wire for WireUnresolvedPayload<'static> {
3996    type Decoded<'de> = WireUnresolvedPayload<'de>;
3997
3998    #[inline]
3999    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4000        ::fidl_next::munge!(let Self { table } = out);
4001        ::fidl_next::WireTable::zero_padding(table);
4002    }
4003}
4004
4005unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnresolvedPayload<'static>
4006where
4007    ___D: ::fidl_next::Decoder + ?Sized,
4008{
4009    fn decode(
4010        slot: ::fidl_next::Slot<'_, Self>,
4011        decoder: &mut ___D,
4012    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4013        ::fidl_next::munge!(let Self { table } = slot);
4014
4015        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4016            match ordinal {
4017                0 => unsafe { ::core::hint::unreachable_unchecked() },
4018
4019                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4020            }
4021        })
4022    }
4023}
4024
4025impl<'de> WireUnresolvedPayload<'de> {}
4026
4027impl<'de> ::core::fmt::Debug for WireUnresolvedPayload<'de> {
4028    fn fmt(
4029        &self,
4030        f: &mut ::core::fmt::Formatter<'_>,
4031    ) -> ::core::result::Result<(), ::core::fmt::Error> {
4032        f.debug_struct("UnresolvedPayload").finish()
4033    }
4034}
4035
4036#[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"]
4037#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4038#[repr(u32)]
4039pub enum EventType {
4040    CapabilityRequested = 1,
4041    Discovered = 3,
4042    Destroyed = 4,
4043    Resolved = 5,
4044    Started = 6,
4045    Stopped = 7,
4046    DebugStarted = 8,
4047    Unresolved = 9,
4048}
4049
4050impl ::fidl_next::Encodable for EventType {
4051    type Encoded = WireEventType;
4052}
4053impl ::core::convert::TryFrom<u32> for EventType {
4054    type Error = ::fidl_next::UnknownStrictEnumMemberError;
4055    fn try_from(
4056        value: u32,
4057    ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
4058        match value {
4059            1 => Ok(Self::CapabilityRequested),
4060            3 => Ok(Self::Discovered),
4061            4 => Ok(Self::Destroyed),
4062            5 => Ok(Self::Resolved),
4063            6 => Ok(Self::Started),
4064            7 => Ok(Self::Stopped),
4065            8 => Ok(Self::DebugStarted),
4066            9 => Ok(Self::Unresolved),
4067
4068            _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
4069        }
4070    }
4071}
4072
4073unsafe impl<___E> ::fidl_next::Encode<___E> for EventType
4074where
4075    ___E: ?Sized,
4076{
4077    #[inline]
4078    fn encode(
4079        self,
4080        encoder: &mut ___E,
4081        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4082    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4083        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
4084    }
4085}
4086
4087unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventType
4088where
4089    ___E: ?Sized,
4090{
4091    #[inline]
4092    fn encode_ref(
4093        &self,
4094        encoder: &mut ___E,
4095        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4096    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4097        ::fidl_next::munge!(let WireEventType { value } = out);
4098        let _ = value.write(::fidl_next::WireU32::from(match *self {
4099            Self::CapabilityRequested => 1,
4100
4101            Self::Discovered => 3,
4102
4103            Self::Destroyed => 4,
4104
4105            Self::Resolved => 5,
4106
4107            Self::Started => 6,
4108
4109            Self::Stopped => 7,
4110
4111            Self::DebugStarted => 8,
4112
4113            Self::Unresolved => 9,
4114        }));
4115
4116        Ok(())
4117    }
4118}
4119
4120impl ::core::convert::From<WireEventType> for EventType {
4121    fn from(wire: WireEventType) -> Self {
4122        match u32::from(wire.value) {
4123            1 => Self::CapabilityRequested,
4124
4125            3 => Self::Discovered,
4126
4127            4 => Self::Destroyed,
4128
4129            5 => Self::Resolved,
4130
4131            6 => Self::Started,
4132
4133            7 => Self::Stopped,
4134
4135            8 => Self::DebugStarted,
4136
4137            9 => Self::Unresolved,
4138
4139            _ => unsafe { ::core::hint::unreachable_unchecked() },
4140        }
4141    }
4142}
4143
4144impl ::fidl_next::FromWire<WireEventType> for EventType {
4145    #[inline]
4146    fn from_wire(wire: WireEventType) -> Self {
4147        Self::from(wire)
4148    }
4149}
4150
4151impl ::fidl_next::IntoNatural for WireEventType {
4152    type Natural = EventType;
4153}
4154
4155impl ::fidl_next::FromWireRef<WireEventType> for EventType {
4156    #[inline]
4157    fn from_wire_ref(wire: &WireEventType) -> Self {
4158        Self::from(*wire)
4159    }
4160}
4161
4162/// The wire type corresponding to [`EventType`].
4163#[derive(Clone, Copy, Debug, PartialEq, Eq)]
4164#[repr(transparent)]
4165pub struct WireEventType {
4166    value: ::fidl_next::WireU32,
4167}
4168
4169unsafe impl ::fidl_next::Wire for WireEventType {
4170    type Decoded<'de> = Self;
4171
4172    #[inline]
4173    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4174        // Wire enums have no padding
4175    }
4176}
4177
4178impl WireEventType {
4179    pub const CAPABILITY_REQUESTED: WireEventType =
4180        WireEventType { value: ::fidl_next::WireU32(1) };
4181
4182    pub const DISCOVERED: WireEventType = WireEventType { value: ::fidl_next::WireU32(3) };
4183
4184    pub const DESTROYED: WireEventType = WireEventType { value: ::fidl_next::WireU32(4) };
4185
4186    pub const RESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(5) };
4187
4188    pub const STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(6) };
4189
4190    pub const STOPPED: WireEventType = WireEventType { value: ::fidl_next::WireU32(7) };
4191
4192    pub const DEBUG_STARTED: WireEventType = WireEventType { value: ::fidl_next::WireU32(8) };
4193
4194    pub const UNRESOLVED: WireEventType = WireEventType { value: ::fidl_next::WireU32(9) };
4195}
4196
4197unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventType
4198where
4199    ___D: ?Sized,
4200{
4201    fn decode(
4202        slot: ::fidl_next::Slot<'_, Self>,
4203        _: &mut ___D,
4204    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4205        ::fidl_next::munge!(let Self { value } = slot);
4206
4207        match u32::from(*value) {
4208            1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 => (),
4209            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
4210        }
4211
4212        Ok(())
4213    }
4214}
4215
4216impl ::core::convert::From<EventType> for WireEventType {
4217    fn from(natural: EventType) -> Self {
4218        match natural {
4219            EventType::CapabilityRequested => WireEventType::CAPABILITY_REQUESTED,
4220
4221            EventType::Discovered => WireEventType::DISCOVERED,
4222
4223            EventType::Destroyed => WireEventType::DESTROYED,
4224
4225            EventType::Resolved => WireEventType::RESOLVED,
4226
4227            EventType::Started => WireEventType::STARTED,
4228
4229            EventType::Stopped => WireEventType::STOPPED,
4230
4231            EventType::DebugStarted => WireEventType::DEBUG_STARTED,
4232
4233            EventType::Unresolved => WireEventType::UNRESOLVED,
4234        }
4235    }
4236}
4237
4238#[doc = " Payload for Stopped events.\n"]
4239#[derive(PartialEq, Clone, Debug, Default)]
4240pub struct StoppedPayload {
4241    pub status: ::core::option::Option<i32>,
4242
4243    pub exit_code: ::core::option::Option<i64>,
4244}
4245
4246impl StoppedPayload {
4247    fn __max_ordinal(&self) -> usize {
4248        if self.exit_code.is_some() {
4249            return 2;
4250        }
4251
4252        if self.status.is_some() {
4253            return 1;
4254        }
4255
4256        0
4257    }
4258}
4259
4260impl ::fidl_next::Encodable for StoppedPayload {
4261    type Encoded = WireStoppedPayload<'static>;
4262}
4263
4264unsafe impl<___E> ::fidl_next::Encode<___E> for StoppedPayload
4265where
4266    ___E: ::fidl_next::Encoder + ?Sized,
4267{
4268    #[inline]
4269    fn encode(
4270        mut self,
4271        encoder: &mut ___E,
4272        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4273    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4274        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
4275
4276        let max_ord = self.__max_ordinal();
4277
4278        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4279        ::fidl_next::Wire::zero_padding(&mut out);
4280
4281        let mut preallocated =
4282            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4283
4284        for i in 1..=max_ord {
4285            match i {
4286                2 => {
4287                    if let Some(value) = self.exit_code.take() {
4288                        ::fidl_next::WireEnvelope::encode_value(
4289                            value,
4290                            preallocated.encoder,
4291                            &mut out,
4292                        )?;
4293                    } else {
4294                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4295                    }
4296                }
4297
4298                1 => {
4299                    if let Some(value) = self.status.take() {
4300                        ::fidl_next::WireEnvelope::encode_value(
4301                            value,
4302                            preallocated.encoder,
4303                            &mut out,
4304                        )?;
4305                    } else {
4306                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4307                    }
4308                }
4309
4310                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4311            }
4312            unsafe {
4313                preallocated.write_next(out.assume_init_ref());
4314            }
4315        }
4316
4317        ::fidl_next::WireTable::encode_len(table, max_ord);
4318
4319        Ok(())
4320    }
4321}
4322
4323unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StoppedPayload
4324where
4325    ___E: ::fidl_next::Encoder + ?Sized,
4326{
4327    #[inline]
4328    fn encode_ref(
4329        &self,
4330        encoder: &mut ___E,
4331        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4332    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4333        ::fidl_next::munge!(let WireStoppedPayload { table } = out);
4334
4335        let max_ord = self.__max_ordinal();
4336
4337        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4338        ::fidl_next::Wire::zero_padding(&mut out);
4339
4340        let mut preallocated =
4341            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4342
4343        for i in 1..=max_ord {
4344            match i {
4345                2 => {
4346                    if let Some(value) = &self.exit_code {
4347                        ::fidl_next::WireEnvelope::encode_value(
4348                            value,
4349                            preallocated.encoder,
4350                            &mut out,
4351                        )?;
4352                    } else {
4353                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4354                    }
4355                }
4356
4357                1 => {
4358                    if let Some(value) = &self.status {
4359                        ::fidl_next::WireEnvelope::encode_value(
4360                            value,
4361                            preallocated.encoder,
4362                            &mut out,
4363                        )?;
4364                    } else {
4365                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4366                    }
4367                }
4368
4369                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4370            }
4371            unsafe {
4372                preallocated.write_next(out.assume_init_ref());
4373            }
4374        }
4375
4376        ::fidl_next::WireTable::encode_len(table, max_ord);
4377
4378        Ok(())
4379    }
4380}
4381
4382impl<'de> ::fidl_next::FromWire<WireStoppedPayload<'de>> for StoppedPayload {
4383    #[inline]
4384    fn from_wire(wire_: WireStoppedPayload<'de>) -> Self {
4385        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4386
4387        let status = wire_.table.get(1);
4388
4389        let exit_code = wire_.table.get(2);
4390
4391        Self {
4392            status: status.map(|envelope| {
4393                ::fidl_next::FromWire::from_wire(unsafe {
4394                    envelope.read_unchecked::<::fidl_next::WireI32>()
4395                })
4396            }),
4397
4398            exit_code: exit_code.map(|envelope| {
4399                ::fidl_next::FromWire::from_wire(unsafe {
4400                    envelope.read_unchecked::<::fidl_next::WireI64>()
4401                })
4402            }),
4403        }
4404    }
4405}
4406
4407impl<'de> ::fidl_next::IntoNatural for WireStoppedPayload<'de> {
4408    type Natural = StoppedPayload;
4409}
4410
4411impl<'de> ::fidl_next::FromWireRef<WireStoppedPayload<'de>> for StoppedPayload {
4412    #[inline]
4413    fn from_wire_ref(wire: &WireStoppedPayload<'de>) -> Self {
4414        Self {
4415            status: wire.table.get(1).map(|envelope| {
4416                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4417                    envelope.deref_unchecked::<::fidl_next::WireI32>()
4418                })
4419            }),
4420
4421            exit_code: wire.table.get(2).map(|envelope| {
4422                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4423                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4424                })
4425            }),
4426        }
4427    }
4428}
4429
4430/// The wire type corresponding to [`StoppedPayload`].
4431#[repr(C)]
4432pub struct WireStoppedPayload<'de> {
4433    table: ::fidl_next::WireTable<'de>,
4434}
4435
4436impl<'de> Drop for WireStoppedPayload<'de> {
4437    fn drop(&mut self) {
4438        let _ = self
4439            .table
4440            .get(1)
4441            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI32>() });
4442
4443        let _ = self
4444            .table
4445            .get(2)
4446            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4447    }
4448}
4449
4450unsafe impl ::fidl_next::Wire for WireStoppedPayload<'static> {
4451    type Decoded<'de> = WireStoppedPayload<'de>;
4452
4453    #[inline]
4454    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4455        ::fidl_next::munge!(let Self { table } = out);
4456        ::fidl_next::WireTable::zero_padding(table);
4457    }
4458}
4459
4460unsafe impl<___D> ::fidl_next::Decode<___D> for WireStoppedPayload<'static>
4461where
4462    ___D: ::fidl_next::Decoder + ?Sized,
4463{
4464    fn decode(
4465        slot: ::fidl_next::Slot<'_, Self>,
4466        decoder: &mut ___D,
4467    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4468        ::fidl_next::munge!(let Self { table } = slot);
4469
4470        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4471            match ordinal {
4472                0 => unsafe { ::core::hint::unreachable_unchecked() },
4473
4474                1 => {
4475                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI32>(
4476                        slot.as_mut(),
4477                        decoder,
4478                    )?;
4479
4480                    Ok(())
4481                }
4482
4483                2 => {
4484                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4485                        slot.as_mut(),
4486                        decoder,
4487                    )?;
4488
4489                    Ok(())
4490                }
4491
4492                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4493            }
4494        })
4495    }
4496}
4497
4498impl<'de> WireStoppedPayload<'de> {
4499    pub fn status(&self) -> ::core::option::Option<&::fidl_next::WireI32> {
4500        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4501    }
4502
4503    pub fn exit_code(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
4504        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4505    }
4506}
4507
4508impl<'de> ::core::fmt::Debug for WireStoppedPayload<'de> {
4509    fn fmt(
4510        &self,
4511        f: &mut ::core::fmt::Formatter<'_>,
4512    ) -> ::core::result::Result<(), ::core::fmt::Error> {
4513        f.debug_struct("StoppedPayload")
4514            .field("status", &self.status())
4515            .field("exit_code", &self.exit_code())
4516            .finish()
4517    }
4518}
4519
4520#[doc = " A head providing metadata about a target component instance.\n"]
4521#[derive(PartialEq, Clone, Debug, Default)]
4522pub struct EventHeader {
4523    pub event_type: ::core::option::Option<crate::EventType>,
4524
4525    pub moniker: ::core::option::Option<::std::string::String>,
4526
4527    pub component_url: ::core::option::Option<::std::string::String>,
4528
4529    pub timestamp: ::core::option::Option<i64>,
4530}
4531
4532impl EventHeader {
4533    fn __max_ordinal(&self) -> usize {
4534        if self.timestamp.is_some() {
4535            return 4;
4536        }
4537
4538        if self.component_url.is_some() {
4539            return 3;
4540        }
4541
4542        if self.moniker.is_some() {
4543            return 2;
4544        }
4545
4546        if self.event_type.is_some() {
4547            return 1;
4548        }
4549
4550        0
4551    }
4552}
4553
4554impl ::fidl_next::Encodable for EventHeader {
4555    type Encoded = WireEventHeader<'static>;
4556}
4557
4558unsafe impl<___E> ::fidl_next::Encode<___E> for EventHeader
4559where
4560    ___E: ::fidl_next::Encoder + ?Sized,
4561{
4562    #[inline]
4563    fn encode(
4564        mut self,
4565        encoder: &mut ___E,
4566        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4567    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4568        ::fidl_next::munge!(let WireEventHeader { table } = out);
4569
4570        let max_ord = self.__max_ordinal();
4571
4572        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4573        ::fidl_next::Wire::zero_padding(&mut out);
4574
4575        let mut preallocated =
4576            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4577
4578        for i in 1..=max_ord {
4579            match i {
4580                4 => {
4581                    if let Some(value) = self.timestamp.take() {
4582                        ::fidl_next::WireEnvelope::encode_value(
4583                            value,
4584                            preallocated.encoder,
4585                            &mut out,
4586                        )?;
4587                    } else {
4588                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4589                    }
4590                }
4591
4592                3 => {
4593                    if let Some(value) = self.component_url.take() {
4594                        ::fidl_next::WireEnvelope::encode_value(
4595                            value,
4596                            preallocated.encoder,
4597                            &mut out,
4598                        )?;
4599                    } else {
4600                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4601                    }
4602                }
4603
4604                2 => {
4605                    if let Some(value) = self.moniker.take() {
4606                        ::fidl_next::WireEnvelope::encode_value(
4607                            value,
4608                            preallocated.encoder,
4609                            &mut out,
4610                        )?;
4611                    } else {
4612                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4613                    }
4614                }
4615
4616                1 => {
4617                    if let Some(value) = self.event_type.take() {
4618                        ::fidl_next::WireEnvelope::encode_value(
4619                            value,
4620                            preallocated.encoder,
4621                            &mut out,
4622                        )?;
4623                    } else {
4624                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4625                    }
4626                }
4627
4628                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4629            }
4630            unsafe {
4631                preallocated.write_next(out.assume_init_ref());
4632            }
4633        }
4634
4635        ::fidl_next::WireTable::encode_len(table, max_ord);
4636
4637        Ok(())
4638    }
4639}
4640
4641unsafe impl<___E> ::fidl_next::EncodeRef<___E> for EventHeader
4642where
4643    ___E: ::fidl_next::Encoder + ?Sized,
4644{
4645    #[inline]
4646    fn encode_ref(
4647        &self,
4648        encoder: &mut ___E,
4649        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4650    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4651        ::fidl_next::munge!(let WireEventHeader { table } = out);
4652
4653        let max_ord = self.__max_ordinal();
4654
4655        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
4656        ::fidl_next::Wire::zero_padding(&mut out);
4657
4658        let mut preallocated =
4659            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
4660
4661        for i in 1..=max_ord {
4662            match i {
4663                4 => {
4664                    if let Some(value) = &self.timestamp {
4665                        ::fidl_next::WireEnvelope::encode_value(
4666                            value,
4667                            preallocated.encoder,
4668                            &mut out,
4669                        )?;
4670                    } else {
4671                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4672                    }
4673                }
4674
4675                3 => {
4676                    if let Some(value) = &self.component_url {
4677                        ::fidl_next::WireEnvelope::encode_value(
4678                            value,
4679                            preallocated.encoder,
4680                            &mut out,
4681                        )?;
4682                    } else {
4683                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4684                    }
4685                }
4686
4687                2 => {
4688                    if let Some(value) = &self.moniker {
4689                        ::fidl_next::WireEnvelope::encode_value(
4690                            value,
4691                            preallocated.encoder,
4692                            &mut out,
4693                        )?;
4694                    } else {
4695                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4696                    }
4697                }
4698
4699                1 => {
4700                    if let Some(value) = &self.event_type {
4701                        ::fidl_next::WireEnvelope::encode_value(
4702                            value,
4703                            preallocated.encoder,
4704                            &mut out,
4705                        )?;
4706                    } else {
4707                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
4708                    }
4709                }
4710
4711                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
4712            }
4713            unsafe {
4714                preallocated.write_next(out.assume_init_ref());
4715            }
4716        }
4717
4718        ::fidl_next::WireTable::encode_len(table, max_ord);
4719
4720        Ok(())
4721    }
4722}
4723
4724impl<'de> ::fidl_next::FromWire<WireEventHeader<'de>> for EventHeader {
4725    #[inline]
4726    fn from_wire(wire_: WireEventHeader<'de>) -> Self {
4727        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
4728
4729        let event_type = wire_.table.get(1);
4730
4731        let moniker = wire_.table.get(2);
4732
4733        let component_url = wire_.table.get(3);
4734
4735        let timestamp = wire_.table.get(4);
4736
4737        Self {
4738            event_type: event_type.map(|envelope| {
4739                ::fidl_next::FromWire::from_wire(unsafe {
4740                    envelope.read_unchecked::<crate::WireEventType>()
4741                })
4742            }),
4743
4744            moniker: moniker.map(|envelope| {
4745                ::fidl_next::FromWire::from_wire(unsafe {
4746                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4747                })
4748            }),
4749
4750            component_url: component_url.map(|envelope| {
4751                ::fidl_next::FromWire::from_wire(unsafe {
4752                    envelope.read_unchecked::<::fidl_next::WireString<'de>>()
4753                })
4754            }),
4755
4756            timestamp: timestamp.map(|envelope| {
4757                ::fidl_next::FromWire::from_wire(unsafe {
4758                    envelope.read_unchecked::<::fidl_next::WireI64>()
4759                })
4760            }),
4761        }
4762    }
4763}
4764
4765impl<'de> ::fidl_next::IntoNatural for WireEventHeader<'de> {
4766    type Natural = EventHeader;
4767}
4768
4769impl<'de> ::fidl_next::FromWireRef<WireEventHeader<'de>> for EventHeader {
4770    #[inline]
4771    fn from_wire_ref(wire: &WireEventHeader<'de>) -> Self {
4772        Self {
4773            event_type: wire.table.get(1).map(|envelope| {
4774                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4775                    envelope.deref_unchecked::<crate::WireEventType>()
4776                })
4777            }),
4778
4779            moniker: wire.table.get(2).map(|envelope| {
4780                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4781                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4782                })
4783            }),
4784
4785            component_url: wire.table.get(3).map(|envelope| {
4786                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4787                    envelope.deref_unchecked::<::fidl_next::WireString<'de>>()
4788                })
4789            }),
4790
4791            timestamp: wire.table.get(4).map(|envelope| {
4792                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
4793                    envelope.deref_unchecked::<::fidl_next::WireI64>()
4794                })
4795            }),
4796        }
4797    }
4798}
4799
4800/// The wire type corresponding to [`EventHeader`].
4801#[repr(C)]
4802pub struct WireEventHeader<'de> {
4803    table: ::fidl_next::WireTable<'de>,
4804}
4805
4806impl<'de> Drop for WireEventHeader<'de> {
4807    fn drop(&mut self) {
4808        let _ = self
4809            .table
4810            .get(1)
4811            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventType>() });
4812
4813        let _ = self
4814            .table
4815            .get(2)
4816            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4817
4818        let _ = self
4819            .table
4820            .get(3)
4821            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireString<'de>>() });
4822
4823        let _ = self
4824            .table
4825            .get(4)
4826            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireI64>() });
4827    }
4828}
4829
4830unsafe impl ::fidl_next::Wire for WireEventHeader<'static> {
4831    type Decoded<'de> = WireEventHeader<'de>;
4832
4833    #[inline]
4834    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4835        ::fidl_next::munge!(let Self { table } = out);
4836        ::fidl_next::WireTable::zero_padding(table);
4837    }
4838}
4839
4840unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventHeader<'static>
4841where
4842    ___D: ::fidl_next::Decoder + ?Sized,
4843{
4844    fn decode(
4845        slot: ::fidl_next::Slot<'_, Self>,
4846        decoder: &mut ___D,
4847    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4848        ::fidl_next::munge!(let Self { table } = slot);
4849
4850        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
4851            match ordinal {
4852                0 => unsafe { ::core::hint::unreachable_unchecked() },
4853
4854                1 => {
4855                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventType>(
4856                        slot.as_mut(),
4857                        decoder,
4858                    )?;
4859
4860                    Ok(())
4861                }
4862
4863                2 => {
4864                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4865                        slot.as_mut(),
4866                        decoder,
4867                    )?;
4868
4869                    let value = unsafe {
4870                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4871                    };
4872
4873                    if value.len() > 4096 {
4874                        return Err(::fidl_next::DecodeError::VectorTooLong {
4875                            size: value.len() as u64,
4876                            limit: 4096,
4877                        });
4878                    }
4879
4880                    Ok(())
4881                }
4882
4883                3 => {
4884                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireString<'static>>(
4885                        slot.as_mut(),
4886                        decoder,
4887                    )?;
4888
4889                    let value = unsafe {
4890                        slot.deref_unchecked().deref_unchecked::<::fidl_next::WireString<'_>>()
4891                    };
4892
4893                    if value.len() > 4096 {
4894                        return Err(::fidl_next::DecodeError::VectorTooLong {
4895                            size: value.len() as u64,
4896                            limit: 4096,
4897                        });
4898                    }
4899
4900                    Ok(())
4901                }
4902
4903                4 => {
4904                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireI64>(
4905                        slot.as_mut(),
4906                        decoder,
4907                    )?;
4908
4909                    Ok(())
4910                }
4911
4912                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
4913            }
4914        })
4915    }
4916}
4917
4918impl<'de> WireEventHeader<'de> {
4919    pub fn event_type(&self) -> ::core::option::Option<&crate::WireEventType> {
4920        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
4921    }
4922
4923    pub fn moniker(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
4924        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
4925    }
4926
4927    pub fn component_url(&self) -> ::core::option::Option<&::fidl_next::WireString<'de>> {
4928        unsafe { Some(self.table.get(3)?.deref_unchecked()) }
4929    }
4930
4931    pub fn timestamp(&self) -> ::core::option::Option<&::fidl_next::WireI64> {
4932        unsafe { Some(self.table.get(4)?.deref_unchecked()) }
4933    }
4934}
4935
4936impl<'de> ::core::fmt::Debug for WireEventHeader<'de> {
4937    fn fmt(
4938        &self,
4939        f: &mut ::core::fmt::Formatter<'_>,
4940    ) -> ::core::result::Result<(), ::core::fmt::Error> {
4941        f.debug_struct("EventHeader")
4942            .field("event_type", &self.event_type())
4943            .field("moniker", &self.moniker())
4944            .field("component_url", &self.component_url())
4945            .field("timestamp", &self.timestamp())
4946            .finish()
4947    }
4948}
4949
4950#[doc = " Encapsulates additional data/protocols for some event types.\n"]
4951#[derive(PartialEq, Debug)]
4952pub enum EventPayload {
4953    CapabilityRequested(crate::CapabilityRequestedPayload),
4954
4955    Purged(crate::PurgedPayload),
4956
4957    Discovered(crate::DiscoveredPayload),
4958
4959    Destroyed(crate::DestroyedPayload),
4960
4961    Resolved(crate::ResolvedPayload),
4962
4963    Started(crate::StartedPayload),
4964
4965    Stopped(crate::StoppedPayload),
4966
4967    DebugStarted(crate::DebugStartedPayload),
4968
4969    Unresolved(crate::UnresolvedPayload),
4970
4971    UnknownOrdinal_(u64),
4972}
4973
4974impl ::fidl_next::Encodable for EventPayload {
4975    type Encoded = WireEventPayload<'static>;
4976}
4977
4978unsafe impl<___E> ::fidl_next::Encode<___E> for EventPayload
4979where
4980    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4981    ___E: ::fidl_next::Encoder,
4982    ___E: ::fidl_next::fuchsia::HandleEncoder,
4983{
4984    #[inline]
4985    fn encode(
4986        self,
4987        encoder: &mut ___E,
4988        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4989    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4990        ::fidl_next::munge!(let WireEventPayload { raw, _phantom: _ } = out);
4991
4992        match self {
4993            Self::CapabilityRequested(value) => ::fidl_next::RawWireUnion::encode_as::<
4994                ___E,
4995                crate::CapabilityRequestedPayload,
4996            >(value, 1, encoder, raw)?,
4997
4998            Self::Purged(value) => ::fidl_next::RawWireUnion::encode_as::<
4999                ___E,
5000                crate::PurgedPayload,
5001            >(value, 2, encoder, raw)?,
5002
5003            Self::Discovered(value) => ::fidl_next::RawWireUnion::encode_as::<
5004                ___E,
5005                crate::DiscoveredPayload,
5006            >(value, 4, encoder, raw)?,
5007
5008            Self::Destroyed(value) => ::fidl_next::RawWireUnion::encode_as::<
5009                ___E,
5010                crate::DestroyedPayload,
5011            >(value, 5, encoder, raw)?,
5012
5013            Self::Resolved(value) => ::fidl_next::RawWireUnion::encode_as::<
5014                ___E,
5015                crate::ResolvedPayload,
5016            >(value, 6, encoder, raw)?,
5017
5018            Self::Started(value) => ::fidl_next::RawWireUnion::encode_as::<
5019                ___E,
5020                crate::StartedPayload,
5021            >(value, 7, encoder, raw)?,
5022
5023            Self::Stopped(value) => ::fidl_next::RawWireUnion::encode_as::<
5024                ___E,
5025                crate::StoppedPayload,
5026            >(value, 8, encoder, raw)?,
5027
5028            Self::DebugStarted(value) => ::fidl_next::RawWireUnion::encode_as::<
5029                ___E,
5030                crate::DebugStartedPayload,
5031            >(value, 9, encoder, raw)?,
5032
5033            Self::Unresolved(value) => ::fidl_next::RawWireUnion::encode_as::<
5034                ___E,
5035                crate::UnresolvedPayload,
5036            >(value, 10, encoder, raw)?,
5037
5038            Self::UnknownOrdinal_(ordinal) => {
5039                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
5040            }
5041        }
5042
5043        Ok(())
5044    }
5045}
5046
5047impl ::fidl_next::EncodableOption for EventPayload {
5048    type EncodedOption = WireOptionalEventPayload<'static>;
5049}
5050
5051unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventPayload
5052where
5053    ___E: ?Sized,
5054    EventPayload: ::fidl_next::Encode<___E>,
5055{
5056    #[inline]
5057    fn encode_option(
5058        this: ::core::option::Option<Self>,
5059        encoder: &mut ___E,
5060        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5061    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5062        ::fidl_next::munge!(let WireOptionalEventPayload { raw, _phantom: _ } = &mut *out);
5063
5064        if let Some(inner) = this {
5065            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
5066            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
5067        } else {
5068            ::fidl_next::RawWireUnion::encode_absent(raw);
5069        }
5070
5071        Ok(())
5072    }
5073}
5074
5075impl<'de> ::fidl_next::FromWire<WireEventPayload<'de>> for EventPayload {
5076    #[inline]
5077    fn from_wire(wire: WireEventPayload<'de>) -> Self {
5078        let wire = ::core::mem::ManuallyDrop::new(wire);
5079        match wire.raw.ordinal() {
5080            1 => Self::CapabilityRequested(::fidl_next::FromWire::from_wire(unsafe {
5081                wire.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
5082            })),
5083
5084            2 => Self::Purged(::fidl_next::FromWire::from_wire(unsafe {
5085                wire.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>()
5086            })),
5087
5088            4 => Self::Discovered(::fidl_next::FromWire::from_wire(unsafe {
5089                wire.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>()
5090            })),
5091
5092            5 => Self::Destroyed(::fidl_next::FromWire::from_wire(unsafe {
5093                wire.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>()
5094            })),
5095
5096            6 => Self::Resolved(::fidl_next::FromWire::from_wire(unsafe {
5097                wire.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>()
5098            })),
5099
5100            7 => Self::Started(::fidl_next::FromWire::from_wire(unsafe {
5101                wire.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>()
5102            })),
5103
5104            8 => Self::Stopped(::fidl_next::FromWire::from_wire(unsafe {
5105                wire.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>()
5106            })),
5107
5108            9 => Self::DebugStarted(::fidl_next::FromWire::from_wire(unsafe {
5109                wire.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
5110            })),
5111
5112            10 => Self::Unresolved(::fidl_next::FromWire::from_wire(unsafe {
5113                wire.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>()
5114            })),
5115
5116            _ => unsafe { ::core::hint::unreachable_unchecked() },
5117        }
5118    }
5119}
5120
5121impl<'de> ::fidl_next::IntoNatural for WireEventPayload<'de> {
5122    type Natural = EventPayload;
5123}
5124
5125impl<'de> ::fidl_next::FromWireOption<WireOptionalEventPayload<'de>> for EventPayload {
5126    #[inline]
5127    fn from_wire_option(wire: WireOptionalEventPayload<'de>) -> ::core::option::Option<Self> {
5128        if let Some(inner) = wire.into_option() {
5129            Some(::fidl_next::FromWire::from_wire(inner))
5130        } else {
5131            None
5132        }
5133    }
5134}
5135
5136impl<'de> ::fidl_next::IntoNatural for WireOptionalEventPayload<'de> {
5137    type Natural = ::core::option::Option<EventPayload>;
5138}
5139
5140impl<'de> ::fidl_next::FromWireOption<WireOptionalEventPayload<'de>> for Box<EventPayload> {
5141    #[inline]
5142    fn from_wire_option(wire: WireOptionalEventPayload<'de>) -> ::core::option::Option<Self> {
5143        <
5144            EventPayload as ::fidl_next::FromWireOption<WireOptionalEventPayload<'de>>
5145        >::from_wire_option(wire).map(Box::new)
5146    }
5147}
5148
5149/// The wire type corresponding to [`EventPayload`].
5150#[repr(transparent)]
5151pub struct WireEventPayload<'de> {
5152    raw: ::fidl_next::RawWireUnion,
5153    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5154}
5155
5156impl<'de> Drop for WireEventPayload<'de> {
5157    fn drop(&mut self) {
5158        match self.raw.ordinal() {
5159            1 => {
5160                let _ = unsafe {
5161                    self.raw.get().read_unchecked::<crate::WireCapabilityRequestedPayload<'de>>()
5162                };
5163            }
5164
5165            2 => {
5166                let _ = unsafe { self.raw.get().read_unchecked::<crate::WirePurgedPayload<'de>>() };
5167            }
5168
5169            4 => {
5170                let _ =
5171                    unsafe { self.raw.get().read_unchecked::<crate::WireDiscoveredPayload<'de>>() };
5172            }
5173
5174            5 => {
5175                let _ =
5176                    unsafe { self.raw.get().read_unchecked::<crate::WireDestroyedPayload<'de>>() };
5177            }
5178
5179            6 => {
5180                let _ =
5181                    unsafe { self.raw.get().read_unchecked::<crate::WireResolvedPayload<'de>>() };
5182            }
5183
5184            7 => {
5185                let _ =
5186                    unsafe { self.raw.get().read_unchecked::<crate::WireStartedPayload<'de>>() };
5187            }
5188
5189            8 => {
5190                let _ =
5191                    unsafe { self.raw.get().read_unchecked::<crate::WireStoppedPayload<'de>>() };
5192            }
5193
5194            9 => {
5195                let _ = unsafe {
5196                    self.raw.get().read_unchecked::<crate::WireDebugStartedPayload<'de>>()
5197                };
5198            }
5199
5200            10 => {
5201                let _ =
5202                    unsafe { self.raw.get().read_unchecked::<crate::WireUnresolvedPayload<'de>>() };
5203            }
5204
5205            _ => (),
5206        }
5207    }
5208}
5209
5210unsafe impl ::fidl_next::Wire for WireEventPayload<'static> {
5211    type Decoded<'de> = WireEventPayload<'de>;
5212
5213    #[inline]
5214    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5215        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5216        ::fidl_next::RawWireUnion::zero_padding(raw);
5217    }
5218}
5219
5220pub mod event_payload {
5221    pub enum Ref<'de> {
5222        CapabilityRequested(&'de crate::WireCapabilityRequestedPayload<'de>),
5223
5224        Purged(&'de crate::WirePurgedPayload<'de>),
5225
5226        Discovered(&'de crate::WireDiscoveredPayload<'de>),
5227
5228        Destroyed(&'de crate::WireDestroyedPayload<'de>),
5229
5230        Resolved(&'de crate::WireResolvedPayload<'de>),
5231
5232        Started(&'de crate::WireStartedPayload<'de>),
5233
5234        Stopped(&'de crate::WireStoppedPayload<'de>),
5235
5236        DebugStarted(&'de crate::WireDebugStartedPayload<'de>),
5237
5238        Unresolved(&'de crate::WireUnresolvedPayload<'de>),
5239
5240        UnknownOrdinal_(u64),
5241    }
5242}
5243
5244impl<'de> WireEventPayload<'de> {
5245    pub fn as_ref(&self) -> crate::event_payload::Ref<'_> {
5246        match self.raw.ordinal() {
5247            1 => crate::event_payload::Ref::CapabilityRequested(unsafe {
5248                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>()
5249            }),
5250
5251            2 => crate::event_payload::Ref::Purged(unsafe {
5252                self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>()
5253            }),
5254
5255            4 => crate::event_payload::Ref::Discovered(unsafe {
5256                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>()
5257            }),
5258
5259            5 => crate::event_payload::Ref::Destroyed(unsafe {
5260                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>()
5261            }),
5262
5263            6 => crate::event_payload::Ref::Resolved(unsafe {
5264                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>()
5265            }),
5266
5267            7 => crate::event_payload::Ref::Started(unsafe {
5268                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>()
5269            }),
5270
5271            8 => crate::event_payload::Ref::Stopped(unsafe {
5272                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>()
5273            }),
5274
5275            9 => crate::event_payload::Ref::DebugStarted(unsafe {
5276                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>()
5277            }),
5278
5279            10 => crate::event_payload::Ref::Unresolved(unsafe {
5280                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>()
5281            }),
5282
5283            unknown => crate::event_payload::Ref::UnknownOrdinal_(unknown),
5284        }
5285    }
5286}
5287
5288unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventPayload<'static>
5289where
5290    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5291    ___D: ::fidl_next::Decoder,
5292    ___D: ::fidl_next::fuchsia::HandleDecoder,
5293{
5294    fn decode(
5295        mut slot: ::fidl_next::Slot<'_, Self>,
5296        decoder: &mut ___D,
5297    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5298        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5299        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5300            1 => ::fidl_next::RawWireUnion::decode_as::<
5301                ___D,
5302                crate::WireCapabilityRequestedPayload<'static>,
5303            >(raw, decoder)?,
5304
5305            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5306                raw, decoder,
5307            )?,
5308
5309            4 => {
5310                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5311                    raw, decoder,
5312                )?
5313            }
5314
5315            5 => {
5316                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5317                    raw, decoder,
5318                )?
5319            }
5320
5321            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5322                raw, decoder,
5323            )?,
5324
5325            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5326                raw, decoder,
5327            )?,
5328
5329            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5330                raw, decoder,
5331            )?,
5332
5333            9 => ::fidl_next::RawWireUnion::decode_as::<
5334                ___D,
5335                crate::WireDebugStartedPayload<'static>,
5336            >(raw, decoder)?,
5337
5338            10 => ::fidl_next::RawWireUnion::decode_as::<
5339                ___D,
5340                crate::WireUnresolvedPayload<'static>,
5341            >(raw, decoder)?,
5342
5343            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5344        }
5345
5346        Ok(())
5347    }
5348}
5349
5350impl<'de> ::core::fmt::Debug for WireEventPayload<'de> {
5351    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5352        match self.raw.ordinal() {
5353            1 => unsafe {
5354                self.raw.get().deref_unchecked::<crate::WireCapabilityRequestedPayload<'_>>().fmt(f)
5355            },
5356            2 => unsafe { self.raw.get().deref_unchecked::<crate::WirePurgedPayload<'_>>().fmt(f) },
5357            4 => unsafe {
5358                self.raw.get().deref_unchecked::<crate::WireDiscoveredPayload<'_>>().fmt(f)
5359            },
5360            5 => unsafe {
5361                self.raw.get().deref_unchecked::<crate::WireDestroyedPayload<'_>>().fmt(f)
5362            },
5363            6 => unsafe {
5364                self.raw.get().deref_unchecked::<crate::WireResolvedPayload<'_>>().fmt(f)
5365            },
5366            7 => unsafe {
5367                self.raw.get().deref_unchecked::<crate::WireStartedPayload<'_>>().fmt(f)
5368            },
5369            8 => unsafe {
5370                self.raw.get().deref_unchecked::<crate::WireStoppedPayload<'_>>().fmt(f)
5371            },
5372            9 => unsafe {
5373                self.raw.get().deref_unchecked::<crate::WireDebugStartedPayload<'_>>().fmt(f)
5374            },
5375            10 => unsafe {
5376                self.raw.get().deref_unchecked::<crate::WireUnresolvedPayload<'_>>().fmt(f)
5377            },
5378            _ => unsafe { ::core::hint::unreachable_unchecked() },
5379        }
5380    }
5381}
5382
5383#[repr(transparent)]
5384pub struct WireOptionalEventPayload<'de> {
5385    raw: ::fidl_next::RawWireUnion,
5386    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
5387}
5388
5389unsafe impl ::fidl_next::Wire for WireOptionalEventPayload<'static> {
5390    type Decoded<'de> = WireOptionalEventPayload<'de>;
5391
5392    #[inline]
5393    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5394        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
5395        ::fidl_next::RawWireUnion::zero_padding(raw);
5396    }
5397}
5398
5399impl<'de> WireOptionalEventPayload<'de> {
5400    pub fn is_some(&self) -> bool {
5401        self.raw.is_some()
5402    }
5403
5404    pub fn is_none(&self) -> bool {
5405        self.raw.is_none()
5406    }
5407
5408    pub fn as_ref(&self) -> ::core::option::Option<&WireEventPayload<'de>> {
5409        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
5410    }
5411
5412    pub fn into_option(self) -> ::core::option::Option<WireEventPayload<'de>> {
5413        if self.is_some() {
5414            Some(WireEventPayload { raw: self.raw, _phantom: ::core::marker::PhantomData })
5415        } else {
5416            None
5417        }
5418    }
5419}
5420
5421unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalEventPayload<'static>
5422where
5423    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5424    ___D: ::fidl_next::Decoder,
5425    ___D: ::fidl_next::fuchsia::HandleDecoder,
5426{
5427    fn decode(
5428        mut slot: ::fidl_next::Slot<'_, Self>,
5429        decoder: &mut ___D,
5430    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5431        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
5432        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
5433            1 => ::fidl_next::RawWireUnion::decode_as::<
5434                ___D,
5435                crate::WireCapabilityRequestedPayload<'static>,
5436            >(raw, decoder)?,
5437
5438            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WirePurgedPayload<'static>>(
5439                raw, decoder,
5440            )?,
5441
5442            4 => {
5443                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDiscoveredPayload<'static>>(
5444                    raw, decoder,
5445                )?
5446            }
5447
5448            5 => {
5449                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDestroyedPayload<'static>>(
5450                    raw, decoder,
5451                )?
5452            }
5453
5454            6 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireResolvedPayload<'static>>(
5455                raw, decoder,
5456            )?,
5457
5458            7 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStartedPayload<'static>>(
5459                raw, decoder,
5460            )?,
5461
5462            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireStoppedPayload<'static>>(
5463                raw, decoder,
5464            )?,
5465
5466            9 => ::fidl_next::RawWireUnion::decode_as::<
5467                ___D,
5468                crate::WireDebugStartedPayload<'static>,
5469            >(raw, decoder)?,
5470
5471            10 => ::fidl_next::RawWireUnion::decode_as::<
5472                ___D,
5473                crate::WireUnresolvedPayload<'static>,
5474            >(raw, decoder)?,
5475
5476            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
5477            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
5478        }
5479
5480        Ok(())
5481    }
5482}
5483
5484impl<'de> ::core::fmt::Debug for WireOptionalEventPayload<'de> {
5485    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
5486        self.as_ref().fmt(f)
5487    }
5488}
5489
5490#[doc = " Contains all information about a single event\n"]
5491#[derive(PartialEq, Debug, Default)]
5492pub struct Event {
5493    pub header: ::core::option::Option<crate::EventHeader>,
5494
5495    pub payload: ::core::option::Option<crate::EventPayload>,
5496}
5497
5498impl Event {
5499    fn __max_ordinal(&self) -> usize {
5500        if self.payload.is_some() {
5501            return 2;
5502        }
5503
5504        if self.header.is_some() {
5505            return 1;
5506        }
5507
5508        0
5509    }
5510}
5511
5512impl ::fidl_next::Encodable for Event {
5513    type Encoded = WireEvent<'static>;
5514}
5515
5516unsafe impl<___E> ::fidl_next::Encode<___E> for Event
5517where
5518    ___E: ::fidl_next::Encoder + ?Sized,
5519    ___E: ::fidl_next::fuchsia::HandleEncoder,
5520{
5521    #[inline]
5522    fn encode(
5523        mut self,
5524        encoder: &mut ___E,
5525        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5526    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5527        ::fidl_next::munge!(let WireEvent { table } = out);
5528
5529        let max_ord = self.__max_ordinal();
5530
5531        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
5532        ::fidl_next::Wire::zero_padding(&mut out);
5533
5534        let mut preallocated =
5535            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
5536
5537        for i in 1..=max_ord {
5538            match i {
5539                2 => {
5540                    if let Some(value) = self.payload.take() {
5541                        ::fidl_next::WireEnvelope::encode_value(
5542                            value,
5543                            preallocated.encoder,
5544                            &mut out,
5545                        )?;
5546                    } else {
5547                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5548                    }
5549                }
5550
5551                1 => {
5552                    if let Some(value) = self.header.take() {
5553                        ::fidl_next::WireEnvelope::encode_value(
5554                            value,
5555                            preallocated.encoder,
5556                            &mut out,
5557                        )?;
5558                    } else {
5559                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
5560                    }
5561                }
5562
5563                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
5564            }
5565            unsafe {
5566                preallocated.write_next(out.assume_init_ref());
5567            }
5568        }
5569
5570        ::fidl_next::WireTable::encode_len(table, max_ord);
5571
5572        Ok(())
5573    }
5574}
5575
5576impl<'de> ::fidl_next::FromWire<WireEvent<'de>> for Event {
5577    #[inline]
5578    fn from_wire(wire_: WireEvent<'de>) -> Self {
5579        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
5580
5581        let header = wire_.table.get(1);
5582
5583        let payload = wire_.table.get(2);
5584
5585        Self {
5586            header: header.map(|envelope| {
5587                ::fidl_next::FromWire::from_wire(unsafe {
5588                    envelope.read_unchecked::<crate::WireEventHeader<'de>>()
5589                })
5590            }),
5591
5592            payload: payload.map(|envelope| {
5593                ::fidl_next::FromWire::from_wire(unsafe {
5594                    envelope.read_unchecked::<crate::WireEventPayload<'de>>()
5595                })
5596            }),
5597        }
5598    }
5599}
5600
5601impl<'de> ::fidl_next::IntoNatural for WireEvent<'de> {
5602    type Natural = Event;
5603}
5604
5605/// The wire type corresponding to [`Event`].
5606#[repr(C)]
5607pub struct WireEvent<'de> {
5608    table: ::fidl_next::WireTable<'de>,
5609}
5610
5611impl<'de> Drop for WireEvent<'de> {
5612    fn drop(&mut self) {
5613        let _ = self
5614            .table
5615            .get(1)
5616            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventHeader<'de>>() });
5617
5618        let _ = self
5619            .table
5620            .get(2)
5621            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireEventPayload<'de>>() });
5622    }
5623}
5624
5625unsafe impl ::fidl_next::Wire for WireEvent<'static> {
5626    type Decoded<'de> = WireEvent<'de>;
5627
5628    #[inline]
5629    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5630        ::fidl_next::munge!(let Self { table } = out);
5631        ::fidl_next::WireTable::zero_padding(table);
5632    }
5633}
5634
5635unsafe impl<___D> ::fidl_next::Decode<___D> for WireEvent<'static>
5636where
5637    ___D: ::fidl_next::Decoder + ?Sized,
5638    ___D: ::fidl_next::fuchsia::HandleDecoder,
5639{
5640    fn decode(
5641        slot: ::fidl_next::Slot<'_, Self>,
5642        decoder: &mut ___D,
5643    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5644        ::fidl_next::munge!(let Self { table } = slot);
5645
5646        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
5647            match ordinal {
5648                0 => unsafe { ::core::hint::unreachable_unchecked() },
5649
5650                1 => {
5651                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventHeader<'static>>(
5652                        slot.as_mut(),
5653                        decoder,
5654                    )?;
5655
5656                    Ok(())
5657                }
5658
5659                2 => {
5660                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireEventPayload<'static>>(
5661                        slot.as_mut(),
5662                        decoder,
5663                    )?;
5664
5665                    Ok(())
5666                }
5667
5668                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
5669            }
5670        })
5671    }
5672}
5673
5674impl<'de> WireEvent<'de> {
5675    pub fn header(&self) -> ::core::option::Option<&crate::WireEventHeader<'de>> {
5676        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
5677    }
5678
5679    pub fn payload(&self) -> ::core::option::Option<&crate::WireEventPayload<'de>> {
5680        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
5681    }
5682}
5683
5684impl<'de> ::core::fmt::Debug for WireEvent<'de> {
5685    fn fmt(
5686        &self,
5687        f: &mut ::core::fmt::Formatter<'_>,
5688    ) -> ::core::result::Result<(), ::core::fmt::Error> {
5689        f.debug_struct("Event")
5690            .field("header", &self.header())
5691            .field("payload", &self.payload())
5692            .finish()
5693    }
5694}
5695
5696#[derive(PartialEq, Debug)]
5697pub struct EventStreamGetNextResponse {
5698    pub events: ::std::vec::Vec<crate::Event>,
5699}
5700
5701impl ::fidl_next::Encodable for EventStreamGetNextResponse {
5702    type Encoded = WireEventStreamGetNextResponse<'static>;
5703}
5704
5705unsafe impl<___E> ::fidl_next::Encode<___E> for EventStreamGetNextResponse
5706where
5707    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5708    ___E: ::fidl_next::Encoder,
5709    ___E: ::fidl_next::fuchsia::HandleEncoder,
5710{
5711    #[inline]
5712    fn encode(
5713        self,
5714        encoder_: &mut ___E,
5715        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5716    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5717        ::fidl_next::munge! {
5718            let Self::Encoded {
5719                events,
5720
5721            } = out_;
5722        }
5723
5724        ::fidl_next::Encode::encode(self.events, encoder_, events)?;
5725
5726        Ok(())
5727    }
5728}
5729
5730impl ::fidl_next::EncodableOption for EventStreamGetNextResponse {
5731    type EncodedOption = ::fidl_next::WireBox<'static, WireEventStreamGetNextResponse<'static>>;
5732}
5733
5734unsafe impl<___E> ::fidl_next::EncodeOption<___E> for EventStreamGetNextResponse
5735where
5736    ___E: ::fidl_next::Encoder + ?Sized,
5737    EventStreamGetNextResponse: ::fidl_next::Encode<___E>,
5738{
5739    #[inline]
5740    fn encode_option(
5741        this: ::core::option::Option<Self>,
5742        encoder: &mut ___E,
5743        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5744    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5745        if let Some(inner) = this {
5746            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5747            ::fidl_next::WireBox::encode_present(out);
5748        } else {
5749            ::fidl_next::WireBox::encode_absent(out);
5750        }
5751
5752        Ok(())
5753    }
5754}
5755
5756impl<'de> ::fidl_next::FromWire<WireEventStreamGetNextResponse<'de>>
5757    for EventStreamGetNextResponse
5758{
5759    #[inline]
5760    fn from_wire(wire: WireEventStreamGetNextResponse<'de>) -> Self {
5761        Self { events: ::fidl_next::FromWire::from_wire(wire.events) }
5762    }
5763}
5764
5765impl<'de> ::fidl_next::IntoNatural for WireEventStreamGetNextResponse<'de> {
5766    type Natural = EventStreamGetNextResponse;
5767}
5768
5769/// The wire type corresponding to [`EventStreamGetNextResponse`].
5770#[derive(Debug)]
5771#[repr(C)]
5772pub struct WireEventStreamGetNextResponse<'de> {
5773    pub events: ::fidl_next::WireVector<'de, crate::WireEvent<'de>>,
5774}
5775static_assertions::const_assert_eq!(std::mem::size_of::<WireEventStreamGetNextResponse<'_>>(), 16);
5776static_assertions::const_assert_eq!(std::mem::align_of::<WireEventStreamGetNextResponse<'_>>(), 8);
5777
5778static_assertions::const_assert_eq!(
5779    std::mem::offset_of!(WireEventStreamGetNextResponse<'_>, events),
5780    0
5781);
5782
5783unsafe impl ::fidl_next::Wire for WireEventStreamGetNextResponse<'static> {
5784    type Decoded<'de> = WireEventStreamGetNextResponse<'de>;
5785
5786    #[inline]
5787    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
5788        ::fidl_next::munge! {
5789            let Self {
5790
5791                events,
5792
5793            } = &mut *out_;
5794        }
5795
5796        ::fidl_next::Wire::zero_padding(events);
5797    }
5798}
5799
5800unsafe impl<___D> ::fidl_next::Decode<___D> for WireEventStreamGetNextResponse<'static>
5801where
5802    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5803    ___D: ::fidl_next::Decoder,
5804    ___D: ::fidl_next::fuchsia::HandleDecoder,
5805{
5806    fn decode(
5807        slot_: ::fidl_next::Slot<'_, Self>,
5808        decoder_: &mut ___D,
5809    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
5810        ::fidl_next::munge! {
5811            let Self {
5812
5813                mut events,
5814
5815            } = slot_;
5816        }
5817
5818        ::fidl_next::Decode::decode(events.as_mut(), decoder_)?;
5819
5820        Ok(())
5821    }
5822}
5823
5824/// The type corresponding to the EventStream protocol.
5825#[doc = " Listener for events on the component hierarchy.\n Can\'t be used outside of the platform.\n"]
5826#[derive(PartialEq, Debug)]
5827pub struct EventStream;
5828
5829impl ::fidl_next::Discoverable for EventStream {
5830    const PROTOCOL_NAME: &'static str = "fuchsia.component.EventStream";
5831}
5832
5833pub mod event_stream {
5834    pub mod prelude {
5835        pub use crate::{
5836            EventStream, EventStreamClientHandler, EventStreamServerHandler, event_stream,
5837        };
5838
5839        pub use crate::EventStreamGetNextResponse;
5840    }
5841
5842    pub struct GetNext;
5843
5844    impl ::fidl_next::Method for GetNext {
5845        const ORDINAL: u64 = 4549982840421936006;
5846
5847        type Protocol = crate::EventStream;
5848
5849        type Request = ();
5850
5851        type Response = crate::WireEventStreamGetNextResponse<'static>;
5852    }
5853
5854    pub struct WaitForReady;
5855
5856    impl ::fidl_next::Method for WaitForReady {
5857        const ORDINAL: u64 = 3545212058508387970;
5858
5859        type Protocol = crate::EventStream;
5860
5861        type Request = ();
5862
5863        type Response = ();
5864    }
5865
5866    mod ___detail {
5867
5868        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::EventStream
5869        where
5870            ___T: ::fidl_next::Transport,
5871        {
5872            type Client = EventStreamClient<___T>;
5873            type Server = EventStreamServer<___T>;
5874        }
5875
5876        /// The client for the `EventStream` protocol.
5877        #[repr(transparent)]
5878        pub struct EventStreamClient<___T: ::fidl_next::Transport> {
5879            #[allow(dead_code)]
5880            client: ::fidl_next::protocol::Client<___T>,
5881        }
5882
5883        impl<___T> EventStreamClient<___T>
5884        where
5885            ___T: ::fidl_next::Transport,
5886        {
5887            pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
5888                ::fidl_next::TwoWayFuture::from_untyped(
5889                    self.client.send_two_way(4549982840421936006, ()),
5890                )
5891            }
5892
5893            #[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"]
5894            pub fn wait_for_ready(
5895                &self,
5896            ) -> ::fidl_next::TwoWayFuture<'_, super::WaitForReady, ___T> {
5897                ::fidl_next::TwoWayFuture::from_untyped(
5898                    self.client.send_two_way(3545212058508387970, ()),
5899                )
5900            }
5901        }
5902
5903        /// The server for the `EventStream` protocol.
5904        #[repr(transparent)]
5905        pub struct EventStreamServer<___T: ::fidl_next::Transport> {
5906            server: ::fidl_next::protocol::Server<___T>,
5907        }
5908
5909        impl<___T> EventStreamServer<___T> where ___T: ::fidl_next::Transport {}
5910    }
5911}
5912
5913/// A client handler for the EventStream protocol.
5914///
5915/// See [`EventStream`] for more details.
5916pub trait EventStreamClientHandler<
5917    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
5918    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5919>
5920{
5921}
5922
5923impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for EventStream
5924where
5925    ___H: EventStreamClientHandler<___T> + ::core::marker::Send,
5926    ___T: ::fidl_next::Transport,
5927    <event_stream::GetNext as ::fidl_next::Method>::Response:
5928        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5929{
5930    async fn on_event(
5931        handler: &mut ___H,
5932        ordinal: u64,
5933        buffer: ___T::RecvBuffer,
5934    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5935        match ordinal {
5936            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
5937        }
5938    }
5939}
5940
5941/// A server handler for the EventStream protocol.
5942///
5943/// See [`EventStream`] for more details.
5944pub trait EventStreamServerHandler<
5945    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
5946    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5947>
5948{
5949    fn get_next(
5950        &mut self,
5951
5952        responder: ::fidl_next::Responder<event_stream::GetNext, ___T>,
5953    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5954
5955    #[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"]
5956    fn wait_for_ready(
5957        &mut self,
5958
5959        responder: ::fidl_next::Responder<event_stream::WaitForReady, ___T>,
5960    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
5961}
5962
5963impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for EventStream
5964where
5965    ___H: EventStreamServerHandler<___T> + ::core::marker::Send,
5966    ___T: ::fidl_next::Transport,
5967{
5968    async fn on_one_way(
5969        handler: &mut ___H,
5970        ordinal: u64,
5971        buffer: ___T::RecvBuffer,
5972    ) -> ::core::result::Result<
5973        (),
5974        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5975    > {
5976        match ordinal {
5977            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
5978        }
5979    }
5980
5981    async fn on_two_way(
5982        handler: &mut ___H,
5983        ordinal: u64,
5984        buffer: ___T::RecvBuffer,
5985        responder: ::fidl_next::protocol::Responder<___T>,
5986    ) -> ::core::result::Result<
5987        (),
5988        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5989    > {
5990        match ordinal {
5991            4549982840421936006 => {
5992                let responder = ::fidl_next::Responder::from_untyped(responder);
5993
5994                handler.get_next(responder).await;
5995                Ok(())
5996            }
5997
5998            3545212058508387970 => {
5999                let responder = ::fidl_next::Responder::from_untyped(responder);
6000
6001                handler.wait_for_ready(responder).await;
6002                Ok(())
6003            }
6004
6005            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
6006        }
6007    }
6008}
6009
6010#[derive(PartialEq, Clone, Debug)]
6011pub struct ExecutionControllerOnStopRequest {
6012    pub stopped_payload: crate::StoppedPayload,
6013}
6014
6015impl ::fidl_next::Encodable for ExecutionControllerOnStopRequest {
6016    type Encoded = WireExecutionControllerOnStopRequest<'static>;
6017}
6018
6019unsafe impl<___E> ::fidl_next::Encode<___E> for ExecutionControllerOnStopRequest
6020where
6021    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6022    ___E: ::fidl_next::Encoder,
6023{
6024    #[inline]
6025    fn encode(
6026        self,
6027        encoder_: &mut ___E,
6028        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6029    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6030        ::fidl_next::munge! {
6031            let Self::Encoded {
6032                stopped_payload,
6033
6034            } = out_;
6035        }
6036
6037        ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload)?;
6038
6039        Ok(())
6040    }
6041}
6042
6043unsafe impl<___E> ::fidl_next::EncodeRef<___E> for ExecutionControllerOnStopRequest
6044where
6045    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6046    ___E: ::fidl_next::Encoder,
6047{
6048    #[inline]
6049    fn encode_ref(
6050        &self,
6051        encoder_: &mut ___E,
6052        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6053    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6054        ::fidl_next::munge! {
6055            let Self::Encoded {
6056
6057                stopped_payload,
6058
6059            } = out_;
6060        }
6061
6062        ::fidl_next::EncodeRef::encode_ref(&self.stopped_payload, encoder_, stopped_payload)?;
6063
6064        Ok(())
6065    }
6066}
6067
6068impl ::fidl_next::EncodableOption for ExecutionControllerOnStopRequest {
6069    type EncodedOption =
6070        ::fidl_next::WireBox<'static, WireExecutionControllerOnStopRequest<'static>>;
6071}
6072
6073unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ExecutionControllerOnStopRequest
6074where
6075    ___E: ::fidl_next::Encoder + ?Sized,
6076    ExecutionControllerOnStopRequest: ::fidl_next::Encode<___E>,
6077{
6078    #[inline]
6079    fn encode_option(
6080        this: ::core::option::Option<Self>,
6081        encoder: &mut ___E,
6082        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6083    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6084        if let Some(inner) = this {
6085            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6086            ::fidl_next::WireBox::encode_present(out);
6087        } else {
6088            ::fidl_next::WireBox::encode_absent(out);
6089        }
6090
6091        Ok(())
6092    }
6093}
6094
6095unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for ExecutionControllerOnStopRequest
6096where
6097    ___E: ::fidl_next::Encoder + ?Sized,
6098    ExecutionControllerOnStopRequest: ::fidl_next::EncodeRef<___E>,
6099{
6100    #[inline]
6101    fn encode_option_ref(
6102        this: ::core::option::Option<&Self>,
6103        encoder: &mut ___E,
6104        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6105    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6106        if let Some(inner) = this {
6107            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6108            ::fidl_next::WireBox::encode_present(out);
6109        } else {
6110            ::fidl_next::WireBox::encode_absent(out);
6111        }
6112
6113        Ok(())
6114    }
6115}
6116
6117impl<'de> ::fidl_next::FromWire<WireExecutionControllerOnStopRequest<'de>>
6118    for ExecutionControllerOnStopRequest
6119{
6120    #[inline]
6121    fn from_wire(wire: WireExecutionControllerOnStopRequest<'de>) -> Self {
6122        Self { stopped_payload: ::fidl_next::FromWire::from_wire(wire.stopped_payload) }
6123    }
6124}
6125
6126impl<'de> ::fidl_next::IntoNatural for WireExecutionControllerOnStopRequest<'de> {
6127    type Natural = ExecutionControllerOnStopRequest;
6128}
6129
6130impl<'de> ::fidl_next::FromWireRef<WireExecutionControllerOnStopRequest<'de>>
6131    for ExecutionControllerOnStopRequest
6132{
6133    #[inline]
6134    fn from_wire_ref(wire: &WireExecutionControllerOnStopRequest<'de>) -> Self {
6135        Self { stopped_payload: ::fidl_next::FromWireRef::from_wire_ref(&wire.stopped_payload) }
6136    }
6137}
6138
6139/// The wire type corresponding to [`ExecutionControllerOnStopRequest`].
6140#[derive(Debug)]
6141#[repr(C)]
6142pub struct WireExecutionControllerOnStopRequest<'de> {
6143    pub stopped_payload: crate::WireStoppedPayload<'de>,
6144}
6145static_assertions::const_assert_eq!(
6146    std::mem::size_of::<WireExecutionControllerOnStopRequest<'_>>(),
6147    16
6148);
6149static_assertions::const_assert_eq!(
6150    std::mem::align_of::<WireExecutionControllerOnStopRequest<'_>>(),
6151    8
6152);
6153
6154static_assertions::const_assert_eq!(
6155    std::mem::offset_of!(WireExecutionControllerOnStopRequest<'_>, stopped_payload),
6156    0
6157);
6158
6159unsafe impl ::fidl_next::Wire for WireExecutionControllerOnStopRequest<'static> {
6160    type Decoded<'de> = WireExecutionControllerOnStopRequest<'de>;
6161
6162    #[inline]
6163    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6164        ::fidl_next::munge! {
6165            let Self {
6166
6167                stopped_payload,
6168
6169            } = &mut *out_;
6170        }
6171
6172        ::fidl_next::Wire::zero_padding(stopped_payload);
6173    }
6174}
6175
6176unsafe impl<___D> ::fidl_next::Decode<___D> for WireExecutionControllerOnStopRequest<'static>
6177where
6178    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6179    ___D: ::fidl_next::Decoder,
6180{
6181    fn decode(
6182        slot_: ::fidl_next::Slot<'_, Self>,
6183        decoder_: &mut ___D,
6184    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6185        ::fidl_next::munge! {
6186            let Self {
6187
6188                mut stopped_payload,
6189
6190            } = slot_;
6191        }
6192
6193        ::fidl_next::Decode::decode(stopped_payload.as_mut(), decoder_)?;
6194
6195        Ok(())
6196    }
6197}
6198
6199/// The type corresponding to the ExecutionController protocol.
6200#[derive(PartialEq, Debug)]
6201pub struct ExecutionController;
6202
6203pub mod execution_controller {
6204    pub mod prelude {
6205        pub use crate::{
6206            ExecutionController, ExecutionControllerClientHandler,
6207            ExecutionControllerServerHandler, execution_controller,
6208        };
6209
6210        pub use crate::ExecutionControllerOnStopRequest;
6211    }
6212
6213    pub struct Stop;
6214
6215    impl ::fidl_next::Method for Stop {
6216        const ORDINAL: u64 = 6256129817234858263;
6217
6218        type Protocol = crate::ExecutionController;
6219
6220        type Request = ();
6221
6222        type Response = ::fidl_next::Never;
6223    }
6224
6225    pub struct OnStop;
6226
6227    impl ::fidl_next::Method for OnStop {
6228        const ORDINAL: u64 = 7121600095714604415;
6229
6230        type Protocol = crate::ExecutionController;
6231
6232        type Request = ::fidl_next::Never;
6233
6234        type Response = crate::WireExecutionControllerOnStopRequest<'static>;
6235    }
6236
6237    mod ___detail {
6238
6239        pub struct OnStop<T0> {
6240            stopped_payload: T0,
6241        }
6242
6243        impl<T0> ::fidl_next::Encodable for OnStop<T0>
6244        where
6245            T0: ::fidl_next::Encodable<Encoded = crate::WireStoppedPayload<'static>>,
6246        {
6247            type Encoded = crate::WireExecutionControllerOnStopRequest<'static>;
6248        }
6249
6250        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for OnStop<T0>
6251        where
6252            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6253            ___E: ::fidl_next::Encoder,
6254            T0: ::fidl_next::Encode<___E, Encoded = crate::WireStoppedPayload<'static>>,
6255        {
6256            #[inline]
6257            fn encode(
6258                self,
6259                encoder_: &mut ___E,
6260                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6261            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6262                ::fidl_next::munge! {
6263                    let Self::Encoded {
6264                        stopped_payload,
6265
6266                    } = out_;
6267                }
6268
6269                ::fidl_next::Encode::encode(self.stopped_payload, encoder_, stopped_payload)?;
6270
6271                Ok(())
6272            }
6273        }
6274
6275        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ExecutionController
6276        where
6277            ___T: ::fidl_next::Transport,
6278        {
6279            type Client = ExecutionControllerClient<___T>;
6280            type Server = ExecutionControllerServer<___T>;
6281        }
6282
6283        /// The client for the `ExecutionController` protocol.
6284        #[repr(transparent)]
6285        pub struct ExecutionControllerClient<___T: ::fidl_next::Transport> {
6286            #[allow(dead_code)]
6287            client: ::fidl_next::protocol::Client<___T>,
6288        }
6289
6290        impl<___T> ExecutionControllerClient<___T>
6291        where
6292            ___T: ::fidl_next::Transport,
6293        {
6294            #[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"]
6295            pub fn stop(&self) -> ::fidl_next::SendFuture<'_, ___T> {
6296                ::fidl_next::SendFuture::from_untyped(
6297                    self.client.send_one_way(6256129817234858263, ()),
6298                )
6299            }
6300        }
6301
6302        /// The server for the `ExecutionController` protocol.
6303        #[repr(transparent)]
6304        pub struct ExecutionControllerServer<___T: ::fidl_next::Transport> {
6305            server: ::fidl_next::protocol::Server<___T>,
6306        }
6307
6308        impl<___T> ExecutionControllerServer<___T>
6309        where
6310            ___T: ::fidl_next::Transport,
6311        {
6312            #[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"]
6313            pub fn on_stop(
6314                &self,
6315
6316                stopped_payload: impl ::fidl_next::Encode<
6317                    <___T as ::fidl_next::Transport>::SendBuffer,
6318                    Encoded = crate::WireStoppedPayload<'static>,
6319                >,
6320            ) -> ::fidl_next::SendFuture<'_, ___T>
6321            where
6322                <___T as ::fidl_next::Transport>::SendBuffer:
6323                    ::fidl_next::encoder::InternalHandleEncoder,
6324                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6325            {
6326                self.on_stop_with(OnStop { stopped_payload })
6327            }
6328
6329            #[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"]
6330
6331            pub fn on_stop_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
6332            where
6333                ___R: ::fidl_next::Encode<
6334                        <___T as ::fidl_next::Transport>::SendBuffer,
6335                        Encoded = <super::OnStop as ::fidl_next::Method>::Response,
6336                    >,
6337            {
6338                ::fidl_next::SendFuture::from_untyped(
6339                    self.server.send_event(7121600095714604415, request),
6340                )
6341            }
6342        }
6343    }
6344}
6345
6346/// A client handler for the ExecutionController protocol.
6347///
6348/// See [`ExecutionController`] for more details.
6349pub trait ExecutionControllerClientHandler<
6350    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6351    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6352>
6353{
6354    #[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"]
6355    fn on_stop(
6356        &mut self,
6357
6358        event: ::fidl_next::Response<execution_controller::OnStop, ___T>,
6359    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6360
6361    fn on_unknown_interaction(
6362        &mut self,
6363        ordinal: u64,
6364    ) -> impl ::core::future::Future<
6365        Output = ::core::result::Result<
6366            (),
6367            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6368        >,
6369    > + ::core::marker::Send {
6370        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
6371    }
6372}
6373
6374impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ExecutionController
6375where
6376    ___H: ExecutionControllerClientHandler<___T> + ::core::marker::Send,
6377    ___T: ::fidl_next::Transport,
6378    <execution_controller::OnStop as ::fidl_next::Method>::Response:
6379        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6380{
6381    async fn on_event(
6382        handler: &mut ___H,
6383        ordinal: u64,
6384        buffer: ___T::RecvBuffer,
6385    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6386        match ordinal {
6387            7121600095714604415 => match ::fidl_next::DecoderExt::decode(buffer) {
6388                Ok(decoded) => {
6389                    handler.on_stop(decoded).await;
6390                    Ok(())
6391                }
6392                Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
6393                    ordinal: 7121600095714604415,
6394                    error,
6395                }),
6396            },
6397
6398            ordinal => handler.on_unknown_interaction(ordinal).await,
6399        }
6400    }
6401}
6402
6403/// A server handler for the ExecutionController protocol.
6404///
6405/// See [`ExecutionController`] for more details.
6406pub trait ExecutionControllerServerHandler<
6407    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6408    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6409>
6410{
6411    #[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"]
6412    fn stop(&mut self) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
6413
6414    fn on_unknown_interaction(
6415        &mut self,
6416        ordinal: u64,
6417    ) -> impl ::core::future::Future<
6418        Output = ::core::result::Result<
6419            (),
6420            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6421        >,
6422    > + ::core::marker::Send {
6423        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
6424    }
6425}
6426
6427impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ExecutionController
6428where
6429    ___H: ExecutionControllerServerHandler<___T> + ::core::marker::Send,
6430    ___T: ::fidl_next::Transport,
6431{
6432    async fn on_one_way(
6433        handler: &mut ___H,
6434        ordinal: u64,
6435        buffer: ___T::RecvBuffer,
6436    ) -> ::core::result::Result<
6437        (),
6438        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6439    > {
6440        match ordinal {
6441            6256129817234858263 => {
6442                handler.stop().await;
6443                Ok(())
6444            }
6445
6446            ordinal => handler.on_unknown_interaction(ordinal).await,
6447        }
6448    }
6449
6450    async fn on_two_way(
6451        handler: &mut ___H,
6452        ordinal: u64,
6453        buffer: ___T::RecvBuffer,
6454        responder: ::fidl_next::protocol::Responder<___T>,
6455    ) -> ::core::result::Result<
6456        (),
6457        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6458    > {
6459        match ordinal {
6460            ordinal => handler.on_unknown_interaction(ordinal).await,
6461        }
6462    }
6463}
6464
6465#[derive(PartialEq, Debug)]
6466#[repr(C)]
6467pub struct IntrospectorGetMonikerRequest {
6468    pub component_instance: ::fidl_next::fuchsia::zx::Event,
6469}
6470
6471impl ::fidl_next::Encodable for IntrospectorGetMonikerRequest {
6472    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6473        Self,
6474        WireIntrospectorGetMonikerRequest,
6475    > = unsafe {
6476        ::fidl_next::CopyOptimization::enable_if(
6477            true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6478                .is_enabled(),
6479        )
6480    };
6481
6482    type Encoded = WireIntrospectorGetMonikerRequest;
6483}
6484
6485unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerRequest
6486where
6487    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6488    ___E: ::fidl_next::fuchsia::HandleEncoder,
6489{
6490    #[inline]
6491    fn encode(
6492        self,
6493        encoder_: &mut ___E,
6494        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6495    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6496        ::fidl_next::munge! {
6497            let Self::Encoded {
6498                component_instance,
6499
6500            } = out_;
6501        }
6502
6503        ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance)?;
6504
6505        Ok(())
6506    }
6507}
6508
6509impl ::fidl_next::EncodableOption for IntrospectorGetMonikerRequest {
6510    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerRequest>;
6511}
6512
6513unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerRequest
6514where
6515    ___E: ::fidl_next::Encoder + ?Sized,
6516    IntrospectorGetMonikerRequest: ::fidl_next::Encode<___E>,
6517{
6518    #[inline]
6519    fn encode_option(
6520        this: ::core::option::Option<Self>,
6521        encoder: &mut ___E,
6522        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6523    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6524        if let Some(inner) = this {
6525            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6526            ::fidl_next::WireBox::encode_present(out);
6527        } else {
6528            ::fidl_next::WireBox::encode_absent(out);
6529        }
6530
6531        Ok(())
6532    }
6533}
6534
6535impl ::fidl_next::FromWire<WireIntrospectorGetMonikerRequest> for IntrospectorGetMonikerRequest {
6536    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
6537        WireIntrospectorGetMonikerRequest,
6538        Self,
6539    > = unsafe {
6540        ::fidl_next::CopyOptimization::enable_if(
6541            true && <::fidl_next::fuchsia::zx::Event as ::fidl_next::FromWire<
6542                ::fidl_next::fuchsia::WireEvent,
6543            >>::COPY_OPTIMIZATION
6544                .is_enabled(),
6545        )
6546    };
6547
6548    #[inline]
6549    fn from_wire(wire: WireIntrospectorGetMonikerRequest) -> Self {
6550        Self { component_instance: ::fidl_next::FromWire::from_wire(wire.component_instance) }
6551    }
6552}
6553
6554impl ::fidl_next::IntoNatural for WireIntrospectorGetMonikerRequest {
6555    type Natural = IntrospectorGetMonikerRequest;
6556}
6557
6558/// The wire type corresponding to [`IntrospectorGetMonikerRequest`].
6559#[derive(Debug)]
6560#[repr(C)]
6561pub struct WireIntrospectorGetMonikerRequest {
6562    pub component_instance: ::fidl_next::fuchsia::WireEvent,
6563}
6564static_assertions::const_assert_eq!(std::mem::size_of::<WireIntrospectorGetMonikerRequest>(), 4);
6565static_assertions::const_assert_eq!(std::mem::align_of::<WireIntrospectorGetMonikerRequest>(), 4);
6566
6567static_assertions::const_assert_eq!(
6568    std::mem::offset_of!(WireIntrospectorGetMonikerRequest, component_instance),
6569    0
6570);
6571
6572unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerRequest {
6573    type Decoded<'de> = WireIntrospectorGetMonikerRequest;
6574
6575    #[inline]
6576    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6577        ::fidl_next::munge! {
6578            let Self {
6579
6580                component_instance,
6581
6582            } = &mut *out_;
6583        }
6584
6585        ::fidl_next::Wire::zero_padding(component_instance);
6586    }
6587}
6588
6589unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerRequest
6590where
6591    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6592    ___D: ::fidl_next::fuchsia::HandleDecoder,
6593{
6594    fn decode(
6595        slot_: ::fidl_next::Slot<'_, Self>,
6596        decoder_: &mut ___D,
6597    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6598        ::fidl_next::munge! {
6599            let Self {
6600
6601                mut component_instance,
6602
6603            } = slot_;
6604        }
6605
6606        ::fidl_next::Decode::decode(component_instance.as_mut(), decoder_)?;
6607
6608        Ok(())
6609    }
6610}
6611
6612#[derive(PartialEq, Clone, Debug)]
6613pub struct IntrospectorGetMonikerResponse {
6614    pub moniker: ::std::string::String,
6615}
6616
6617impl ::fidl_next::Encodable for IntrospectorGetMonikerResponse {
6618    type Encoded = WireIntrospectorGetMonikerResponse<'static>;
6619}
6620
6621unsafe impl<___E> ::fidl_next::Encode<___E> for IntrospectorGetMonikerResponse
6622where
6623    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6624    ___E: ::fidl_next::Encoder,
6625{
6626    #[inline]
6627    fn encode(
6628        self,
6629        encoder_: &mut ___E,
6630        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6631    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6632        ::fidl_next::munge! {
6633            let Self::Encoded {
6634                moniker,
6635
6636            } = out_;
6637        }
6638
6639        ::fidl_next::Encode::encode(self.moniker, encoder_, moniker)?;
6640
6641        Ok(())
6642    }
6643}
6644
6645unsafe impl<___E> ::fidl_next::EncodeRef<___E> for IntrospectorGetMonikerResponse
6646where
6647    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6648    ___E: ::fidl_next::Encoder,
6649{
6650    #[inline]
6651    fn encode_ref(
6652        &self,
6653        encoder_: &mut ___E,
6654        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6655    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6656        ::fidl_next::munge! {
6657            let Self::Encoded {
6658
6659                moniker,
6660
6661            } = out_;
6662        }
6663
6664        ::fidl_next::EncodeRef::encode_ref(&self.moniker, encoder_, moniker)?;
6665
6666        Ok(())
6667    }
6668}
6669
6670impl ::fidl_next::EncodableOption for IntrospectorGetMonikerResponse {
6671    type EncodedOption = ::fidl_next::WireBox<'static, WireIntrospectorGetMonikerResponse<'static>>;
6672}
6673
6674unsafe impl<___E> ::fidl_next::EncodeOption<___E> for IntrospectorGetMonikerResponse
6675where
6676    ___E: ::fidl_next::Encoder + ?Sized,
6677    IntrospectorGetMonikerResponse: ::fidl_next::Encode<___E>,
6678{
6679    #[inline]
6680    fn encode_option(
6681        this: ::core::option::Option<Self>,
6682        encoder: &mut ___E,
6683        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6684    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6685        if let Some(inner) = this {
6686            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6687            ::fidl_next::WireBox::encode_present(out);
6688        } else {
6689            ::fidl_next::WireBox::encode_absent(out);
6690        }
6691
6692        Ok(())
6693    }
6694}
6695
6696unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for IntrospectorGetMonikerResponse
6697where
6698    ___E: ::fidl_next::Encoder + ?Sized,
6699    IntrospectorGetMonikerResponse: ::fidl_next::EncodeRef<___E>,
6700{
6701    #[inline]
6702    fn encode_option_ref(
6703        this: ::core::option::Option<&Self>,
6704        encoder: &mut ___E,
6705        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6706    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6707        if let Some(inner) = this {
6708            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6709            ::fidl_next::WireBox::encode_present(out);
6710        } else {
6711            ::fidl_next::WireBox::encode_absent(out);
6712        }
6713
6714        Ok(())
6715    }
6716}
6717
6718impl<'de> ::fidl_next::FromWire<WireIntrospectorGetMonikerResponse<'de>>
6719    for IntrospectorGetMonikerResponse
6720{
6721    #[inline]
6722    fn from_wire(wire: WireIntrospectorGetMonikerResponse<'de>) -> Self {
6723        Self { moniker: ::fidl_next::FromWire::from_wire(wire.moniker) }
6724    }
6725}
6726
6727impl<'de> ::fidl_next::IntoNatural for WireIntrospectorGetMonikerResponse<'de> {
6728    type Natural = IntrospectorGetMonikerResponse;
6729}
6730
6731impl<'de> ::fidl_next::FromWireRef<WireIntrospectorGetMonikerResponse<'de>>
6732    for IntrospectorGetMonikerResponse
6733{
6734    #[inline]
6735    fn from_wire_ref(wire: &WireIntrospectorGetMonikerResponse<'de>) -> Self {
6736        Self { moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.moniker) }
6737    }
6738}
6739
6740/// The wire type corresponding to [`IntrospectorGetMonikerResponse`].
6741#[derive(Debug)]
6742#[repr(C)]
6743pub struct WireIntrospectorGetMonikerResponse<'de> {
6744    pub moniker: ::fidl_next::WireString<'de>,
6745}
6746static_assertions::const_assert_eq!(
6747    std::mem::size_of::<WireIntrospectorGetMonikerResponse<'_>>(),
6748    16
6749);
6750static_assertions::const_assert_eq!(
6751    std::mem::align_of::<WireIntrospectorGetMonikerResponse<'_>>(),
6752    8
6753);
6754
6755static_assertions::const_assert_eq!(
6756    std::mem::offset_of!(WireIntrospectorGetMonikerResponse<'_>, moniker),
6757    0
6758);
6759
6760unsafe impl ::fidl_next::Wire for WireIntrospectorGetMonikerResponse<'static> {
6761    type Decoded<'de> = WireIntrospectorGetMonikerResponse<'de>;
6762
6763    #[inline]
6764    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
6765        ::fidl_next::munge! {
6766            let Self {
6767
6768                moniker,
6769
6770            } = &mut *out_;
6771        }
6772
6773        ::fidl_next::Wire::zero_padding(moniker);
6774    }
6775}
6776
6777unsafe impl<___D> ::fidl_next::Decode<___D> for WireIntrospectorGetMonikerResponse<'static>
6778where
6779    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6780    ___D: ::fidl_next::Decoder,
6781{
6782    fn decode(
6783        slot_: ::fidl_next::Slot<'_, Self>,
6784        decoder_: &mut ___D,
6785    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
6786        ::fidl_next::munge! {
6787            let Self {
6788
6789                mut moniker,
6790
6791            } = slot_;
6792        }
6793
6794        ::fidl_next::Decode::decode(moniker.as_mut(), decoder_)?;
6795
6796        let moniker = unsafe { moniker.deref_unchecked() };
6797
6798        if moniker.len() > 4096 {
6799            return Err(::fidl_next::DecodeError::VectorTooLong {
6800                size: moniker.len() as u64,
6801                limit: 4096,
6802            });
6803        }
6804
6805        Ok(())
6806    }
6807}
6808
6809/// The type corresponding to the Introspector protocol.
6810#[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"]
6811#[derive(PartialEq, Debug)]
6812pub struct Introspector;
6813
6814impl ::fidl_next::Discoverable for Introspector {
6815    const PROTOCOL_NAME: &'static str = "fuchsia.component.Introspector";
6816}
6817
6818pub mod introspector {
6819    pub mod prelude {
6820        pub use crate::{
6821            Introspector, IntrospectorClientHandler, IntrospectorServerHandler, introspector,
6822        };
6823
6824        pub use crate::Error;
6825
6826        pub use crate::IntrospectorGetMonikerRequest;
6827
6828        pub use crate::IntrospectorGetMonikerResponse;
6829    }
6830
6831    pub struct GetMoniker;
6832
6833    impl ::fidl_next::Method for GetMoniker {
6834        const ORDINAL: u64 = 214344082539672664;
6835
6836        type Protocol = crate::Introspector;
6837
6838        type Request = crate::WireIntrospectorGetMonikerRequest;
6839
6840        type Response = ::fidl_next::WireFlexibleResult<
6841            'static,
6842            crate::WireIntrospectorGetMonikerResponse<'static>,
6843            crate::WireError,
6844        >;
6845    }
6846
6847    mod ___detail {
6848
6849        pub struct GetMoniker<T0> {
6850            component_instance: T0,
6851        }
6852
6853        impl<T0> ::fidl_next::Encodable for GetMoniker<T0>
6854        where
6855            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireEvent>,
6856        {
6857            type Encoded = crate::WireIntrospectorGetMonikerRequest;
6858        }
6859
6860        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetMoniker<T0>
6861        where
6862            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6863            ___E: ::fidl_next::fuchsia::HandleEncoder,
6864            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireEvent>,
6865        {
6866            #[inline]
6867            fn encode(
6868                self,
6869                encoder_: &mut ___E,
6870                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6871            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
6872                ::fidl_next::munge! {
6873                    let Self::Encoded {
6874                        component_instance,
6875
6876                    } = out_;
6877                }
6878
6879                ::fidl_next::Encode::encode(self.component_instance, encoder_, component_instance)?;
6880
6881                Ok(())
6882            }
6883        }
6884
6885        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Introspector
6886        where
6887            ___T: ::fidl_next::Transport,
6888        {
6889            type Client = IntrospectorClient<___T>;
6890            type Server = IntrospectorServer<___T>;
6891        }
6892
6893        /// The client for the `Introspector` protocol.
6894        #[repr(transparent)]
6895        pub struct IntrospectorClient<___T: ::fidl_next::Transport> {
6896            #[allow(dead_code)]
6897            client: ::fidl_next::protocol::Client<___T>,
6898        }
6899
6900        impl<___T> IntrospectorClient<___T>
6901        where
6902            ___T: ::fidl_next::Transport,
6903        {
6904            #[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"]
6905            pub fn get_moniker(
6906                &self,
6907
6908                component_instance: impl ::fidl_next::Encode<
6909                    <___T as ::fidl_next::Transport>::SendBuffer,
6910                    Encoded = ::fidl_next::fuchsia::WireEvent,
6911                >,
6912            ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
6913            where
6914                <___T as ::fidl_next::Transport>::SendBuffer:
6915                    ::fidl_next::encoder::InternalHandleEncoder,
6916                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6917            {
6918                self.get_moniker_with(GetMoniker { component_instance })
6919            }
6920
6921            #[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"]
6922            pub fn get_moniker_with<___R>(
6923                &self,
6924                request: ___R,
6925            ) -> ::fidl_next::TwoWayFuture<'_, super::GetMoniker, ___T>
6926            where
6927                ___R: ::fidl_next::Encode<
6928                        <___T as ::fidl_next::Transport>::SendBuffer,
6929                        Encoded = crate::WireIntrospectorGetMonikerRequest,
6930                    >,
6931            {
6932                ::fidl_next::TwoWayFuture::from_untyped(
6933                    self.client.send_two_way(214344082539672664, request),
6934                )
6935            }
6936        }
6937
6938        /// The server for the `Introspector` protocol.
6939        #[repr(transparent)]
6940        pub struct IntrospectorServer<___T: ::fidl_next::Transport> {
6941            server: ::fidl_next::protocol::Server<___T>,
6942        }
6943
6944        impl<___T> IntrospectorServer<___T> where ___T: ::fidl_next::Transport {}
6945    }
6946}
6947
6948/// A client handler for the Introspector protocol.
6949///
6950/// See [`Introspector`] for more details.
6951pub trait IntrospectorClientHandler<
6952    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6953    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6954>
6955{
6956    fn on_unknown_interaction(
6957        &mut self,
6958        ordinal: u64,
6959    ) -> impl ::core::future::Future<
6960        Output = ::core::result::Result<
6961            (),
6962            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
6963        >,
6964    > + ::core::marker::Send {
6965        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
6966    }
6967}
6968
6969impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Introspector
6970where
6971    ___H: IntrospectorClientHandler<___T> + ::core::marker::Send,
6972    ___T: ::fidl_next::Transport,
6973    <introspector::GetMoniker as ::fidl_next::Method>::Response:
6974        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6975{
6976    async fn on_event(
6977        handler: &mut ___H,
6978        ordinal: u64,
6979        buffer: ___T::RecvBuffer,
6980    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
6981        match ordinal {
6982            ordinal => handler.on_unknown_interaction(ordinal).await,
6983        }
6984    }
6985}
6986
6987/// A server handler for the Introspector protocol.
6988///
6989/// See [`Introspector`] for more details.
6990pub trait IntrospectorServerHandler<
6991    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
6992    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
6993>
6994{
6995    #[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"]
6996    fn get_moniker(
6997        &mut self,
6998
6999        request: ::fidl_next::Request<introspector::GetMoniker, ___T>,
7000
7001        responder: ::fidl_next::Responder<introspector::GetMoniker, ___T>,
7002    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7003
7004    fn on_unknown_interaction(
7005        &mut self,
7006        ordinal: u64,
7007    ) -> impl ::core::future::Future<
7008        Output = ::core::result::Result<
7009            (),
7010            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7011        >,
7012    > + ::core::marker::Send {
7013        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
7014    }
7015}
7016
7017impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Introspector
7018where
7019    ___H: IntrospectorServerHandler<___T> + ::core::marker::Send,
7020    ___T: ::fidl_next::Transport,
7021    <introspector::GetMoniker as ::fidl_next::Method>::Request:
7022        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7023{
7024    async fn on_one_way(
7025        handler: &mut ___H,
7026        ordinal: u64,
7027        buffer: ___T::RecvBuffer,
7028    ) -> ::core::result::Result<
7029        (),
7030        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7031    > {
7032        match ordinal {
7033            ordinal => handler.on_unknown_interaction(ordinal).await,
7034        }
7035    }
7036
7037    async fn on_two_way(
7038        handler: &mut ___H,
7039        ordinal: u64,
7040        buffer: ___T::RecvBuffer,
7041        responder: ::fidl_next::protocol::Responder<___T>,
7042    ) -> ::core::result::Result<
7043        (),
7044        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7045    > {
7046        match ordinal {
7047            214344082539672664 => {
7048                let responder = ::fidl_next::Responder::from_untyped(responder);
7049
7050                match ::fidl_next::DecoderExt::decode(buffer) {
7051                    Ok(decoded) => {
7052                        handler.get_moniker(decoded, responder).await;
7053                        Ok(())
7054                    }
7055                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7056                        ordinal: 214344082539672664,
7057                        error,
7058                    }),
7059                }
7060            }
7061
7062            ordinal => handler.on_unknown_interaction(ordinal).await,
7063        }
7064    }
7065}
7066
7067#[doc = " The maximum string length of a capability ID.\n This value is currently set arbitrarily.\n"]
7068pub const MAX_CAPABILITY_ID_LENGTH: u64 = 50 as u64;
7069
7070pub const MAX_CHILD_NAME_LENGTH: u32 = 1024 as u32;
7071
7072#[doc = " The maximum string length of an error description.\n"]
7073pub const MAX_ERROR_DESCRIPTION_LENGTH: u64 = 100 as u64;
7074
7075#[doc = " The maximum number of events that a receiver can listen to.\n"]
7076pub const MAX_NUM_EVENTS_RECEIVED: u64 = 100 as u64;
7077
7078#[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"]
7079pub const MAX_STORAGE_ID_LENGTH: u32 = 64 as u32;
7080
7081#[doc = " The maximum number of requests per event subscription.\n"]
7082pub const MAX_SUBSCRIPTION_REQUESTS: u32 = 2 as u32;
7083
7084pub const MAX_URL_SCHEME_LENGTH: u64 = 255 as u64;
7085
7086#[derive(PartialEq, Debug)]
7087pub struct NamespaceInputEntry {
7088    pub path: ::std::string::String,
7089
7090    pub dictionary: ::fidl_next::ClientEnd<
7091        ::fidl_next_fuchsia_component_sandbox::Dictionary,
7092        ::fidl_next::fuchsia::zx::Channel,
7093    >,
7094}
7095
7096impl ::fidl_next::Encodable for NamespaceInputEntry {
7097    type Encoded = WireNamespaceInputEntry<'static>;
7098}
7099
7100unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceInputEntry
7101where
7102    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7103    ___E: ::fidl_next::Encoder,
7104    ___E: ::fidl_next::fuchsia::HandleEncoder,
7105{
7106    #[inline]
7107    fn encode(
7108        self,
7109        encoder_: &mut ___E,
7110        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7111    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7112        ::fidl_next::munge! {
7113            let Self::Encoded {
7114                path,
7115                dictionary,
7116
7117            } = out_;
7118        }
7119
7120        ::fidl_next::Encode::encode(self.path, encoder_, path)?;
7121
7122        ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
7123
7124        Ok(())
7125    }
7126}
7127
7128impl ::fidl_next::EncodableOption for NamespaceInputEntry {
7129    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceInputEntry<'static>>;
7130}
7131
7132unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceInputEntry
7133where
7134    ___E: ::fidl_next::Encoder + ?Sized,
7135    NamespaceInputEntry: ::fidl_next::Encode<___E>,
7136{
7137    #[inline]
7138    fn encode_option(
7139        this: ::core::option::Option<Self>,
7140        encoder: &mut ___E,
7141        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7142    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7143        if let Some(inner) = this {
7144            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7145            ::fidl_next::WireBox::encode_present(out);
7146        } else {
7147            ::fidl_next::WireBox::encode_absent(out);
7148        }
7149
7150        Ok(())
7151    }
7152}
7153
7154impl<'de> ::fidl_next::FromWire<WireNamespaceInputEntry<'de>> for NamespaceInputEntry {
7155    #[inline]
7156    fn from_wire(wire: WireNamespaceInputEntry<'de>) -> Self {
7157        Self {
7158            path: ::fidl_next::FromWire::from_wire(wire.path),
7159
7160            dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary),
7161        }
7162    }
7163}
7164
7165impl<'de> ::fidl_next::IntoNatural for WireNamespaceInputEntry<'de> {
7166    type Natural = NamespaceInputEntry;
7167}
7168
7169/// The wire type corresponding to [`NamespaceInputEntry`].
7170#[derive(Debug)]
7171#[repr(C)]
7172pub struct WireNamespaceInputEntry<'de> {
7173    pub path: ::fidl_next::WireString<'de>,
7174
7175    pub dictionary: ::fidl_next::ClientEnd<
7176        ::fidl_next_fuchsia_component_sandbox::Dictionary,
7177        ::fidl_next::fuchsia::WireChannel,
7178    >,
7179}
7180static_assertions::const_assert_eq!(std::mem::size_of::<WireNamespaceInputEntry<'_>>(), 24);
7181static_assertions::const_assert_eq!(std::mem::align_of::<WireNamespaceInputEntry<'_>>(), 8);
7182
7183static_assertions::const_assert_eq!(std::mem::offset_of!(WireNamespaceInputEntry<'_>, path), 0);
7184
7185static_assertions::const_assert_eq!(
7186    std::mem::offset_of!(WireNamespaceInputEntry<'_>, dictionary),
7187    16
7188);
7189
7190unsafe impl ::fidl_next::Wire for WireNamespaceInputEntry<'static> {
7191    type Decoded<'de> = WireNamespaceInputEntry<'de>;
7192
7193    #[inline]
7194    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7195        ::fidl_next::munge! {
7196            let Self {
7197
7198                path,
7199                dictionary,
7200
7201            } = &mut *out_;
7202        }
7203
7204        ::fidl_next::Wire::zero_padding(path);
7205
7206        ::fidl_next::Wire::zero_padding(dictionary);
7207
7208        unsafe {
7209            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
7210        }
7211    }
7212}
7213
7214unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceInputEntry<'static>
7215where
7216    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7217    ___D: ::fidl_next::Decoder,
7218    ___D: ::fidl_next::fuchsia::HandleDecoder,
7219{
7220    fn decode(
7221        slot_: ::fidl_next::Slot<'_, Self>,
7222        decoder_: &mut ___D,
7223    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7224        ::fidl_next::munge! {
7225            let Self {
7226
7227                mut path,
7228                mut dictionary,
7229
7230            } = slot_;
7231        }
7232
7233        ::fidl_next::Decode::decode(path.as_mut(), decoder_)?;
7234
7235        let path = unsafe { path.deref_unchecked() };
7236
7237        if path.len() > 4095 {
7238            return Err(::fidl_next::DecodeError::VectorTooLong {
7239                size: path.len() as u64,
7240                limit: 4095,
7241            });
7242        }
7243
7244        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
7245
7246        Ok(())
7247    }
7248}
7249
7250#[derive(PartialEq, Debug)]
7251pub struct NamespaceCreateRequest {
7252    pub entries: ::std::vec::Vec<crate::NamespaceInputEntry>,
7253}
7254
7255impl ::fidl_next::Encodable for NamespaceCreateRequest {
7256    type Encoded = WireNamespaceCreateRequest<'static>;
7257}
7258
7259unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateRequest
7260where
7261    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7262    ___E: ::fidl_next::Encoder,
7263    ___E: ::fidl_next::fuchsia::HandleEncoder,
7264{
7265    #[inline]
7266    fn encode(
7267        self,
7268        encoder_: &mut ___E,
7269        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7270    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7271        ::fidl_next::munge! {
7272            let Self::Encoded {
7273                entries,
7274
7275            } = out_;
7276        }
7277
7278        ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
7279
7280        Ok(())
7281    }
7282}
7283
7284impl ::fidl_next::EncodableOption for NamespaceCreateRequest {
7285    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateRequest<'static>>;
7286}
7287
7288unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateRequest
7289where
7290    ___E: ::fidl_next::Encoder + ?Sized,
7291    NamespaceCreateRequest: ::fidl_next::Encode<___E>,
7292{
7293    #[inline]
7294    fn encode_option(
7295        this: ::core::option::Option<Self>,
7296        encoder: &mut ___E,
7297        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7298    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7299        if let Some(inner) = this {
7300            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7301            ::fidl_next::WireBox::encode_present(out);
7302        } else {
7303            ::fidl_next::WireBox::encode_absent(out);
7304        }
7305
7306        Ok(())
7307    }
7308}
7309
7310impl<'de> ::fidl_next::FromWire<WireNamespaceCreateRequest<'de>> for NamespaceCreateRequest {
7311    #[inline]
7312    fn from_wire(wire: WireNamespaceCreateRequest<'de>) -> Self {
7313        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
7314    }
7315}
7316
7317impl<'de> ::fidl_next::IntoNatural for WireNamespaceCreateRequest<'de> {
7318    type Natural = NamespaceCreateRequest;
7319}
7320
7321/// The wire type corresponding to [`NamespaceCreateRequest`].
7322#[derive(Debug)]
7323#[repr(C)]
7324pub struct WireNamespaceCreateRequest<'de> {
7325    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceInputEntry<'de>>,
7326}
7327static_assertions::const_assert_eq!(std::mem::size_of::<WireNamespaceCreateRequest<'_>>(), 16);
7328static_assertions::const_assert_eq!(std::mem::align_of::<WireNamespaceCreateRequest<'_>>(), 8);
7329
7330static_assertions::const_assert_eq!(
7331    std::mem::offset_of!(WireNamespaceCreateRequest<'_>, entries),
7332    0
7333);
7334
7335unsafe impl ::fidl_next::Wire for WireNamespaceCreateRequest<'static> {
7336    type Decoded<'de> = WireNamespaceCreateRequest<'de>;
7337
7338    #[inline]
7339    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7340        ::fidl_next::munge! {
7341            let Self {
7342
7343                entries,
7344
7345            } = &mut *out_;
7346        }
7347
7348        ::fidl_next::Wire::zero_padding(entries);
7349    }
7350}
7351
7352unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateRequest<'static>
7353where
7354    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7355    ___D: ::fidl_next::Decoder,
7356    ___D: ::fidl_next::fuchsia::HandleDecoder,
7357{
7358    fn decode(
7359        slot_: ::fidl_next::Slot<'_, Self>,
7360        decoder_: &mut ___D,
7361    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7362        ::fidl_next::munge! {
7363            let Self {
7364
7365                mut entries,
7366
7367            } = slot_;
7368        }
7369
7370        ::fidl_next::Decode::decode(entries.as_mut(), decoder_)?;
7371
7372        Ok(())
7373    }
7374}
7375
7376#[doc = " Error returned from methods in [`Namespace`].\n"]
7377#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7378#[repr(u32)]
7379pub enum NamespaceError {
7380    Shadow = 1,
7381    Duplicate = 2,
7382    Conversion = 3,
7383    BadEntry = 4,
7384    DictionaryRead = 5,
7385    UnknownOrdinal_(u32) = 6,
7386}
7387
7388impl ::fidl_next::Encodable for NamespaceError {
7389    type Encoded = WireNamespaceError;
7390}
7391impl ::std::convert::From<u32> for NamespaceError {
7392    fn from(value: u32) -> Self {
7393        match value {
7394            1 => Self::Shadow,
7395            2 => Self::Duplicate,
7396            3 => Self::Conversion,
7397            4 => Self::BadEntry,
7398            5 => Self::DictionaryRead,
7399
7400            _ => Self::UnknownOrdinal_(value),
7401        }
7402    }
7403}
7404
7405unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceError
7406where
7407    ___E: ?Sized,
7408{
7409    #[inline]
7410    fn encode(
7411        self,
7412        encoder: &mut ___E,
7413        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7414    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7415        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
7416    }
7417}
7418
7419unsafe impl<___E> ::fidl_next::EncodeRef<___E> for NamespaceError
7420where
7421    ___E: ?Sized,
7422{
7423    #[inline]
7424    fn encode_ref(
7425        &self,
7426        encoder: &mut ___E,
7427        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7428    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7429        ::fidl_next::munge!(let WireNamespaceError { value } = out);
7430        let _ = value.write(::fidl_next::WireU32::from(match *self {
7431            Self::Shadow => 1,
7432
7433            Self::Duplicate => 2,
7434
7435            Self::Conversion => 3,
7436
7437            Self::BadEntry => 4,
7438
7439            Self::DictionaryRead => 5,
7440
7441            Self::UnknownOrdinal_(value) => value,
7442        }));
7443
7444        Ok(())
7445    }
7446}
7447
7448impl ::core::convert::From<WireNamespaceError> for NamespaceError {
7449    fn from(wire: WireNamespaceError) -> Self {
7450        match u32::from(wire.value) {
7451            1 => Self::Shadow,
7452
7453            2 => Self::Duplicate,
7454
7455            3 => Self::Conversion,
7456
7457            4 => Self::BadEntry,
7458
7459            5 => Self::DictionaryRead,
7460
7461            value => Self::UnknownOrdinal_(value),
7462        }
7463    }
7464}
7465
7466impl ::fidl_next::FromWire<WireNamespaceError> for NamespaceError {
7467    #[inline]
7468    fn from_wire(wire: WireNamespaceError) -> Self {
7469        Self::from(wire)
7470    }
7471}
7472
7473impl ::fidl_next::IntoNatural for WireNamespaceError {
7474    type Natural = NamespaceError;
7475}
7476
7477impl ::fidl_next::FromWireRef<WireNamespaceError> for NamespaceError {
7478    #[inline]
7479    fn from_wire_ref(wire: &WireNamespaceError) -> Self {
7480        Self::from(*wire)
7481    }
7482}
7483
7484/// The wire type corresponding to [`NamespaceError`].
7485#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7486#[repr(transparent)]
7487pub struct WireNamespaceError {
7488    value: ::fidl_next::WireU32,
7489}
7490
7491unsafe impl ::fidl_next::Wire for WireNamespaceError {
7492    type Decoded<'de> = Self;
7493
7494    #[inline]
7495    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
7496        // Wire enums have no padding
7497    }
7498}
7499
7500impl WireNamespaceError {
7501    pub const SHADOW: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(1) };
7502
7503    pub const DUPLICATE: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(2) };
7504
7505    pub const CONVERSION: WireNamespaceError =
7506        WireNamespaceError { value: ::fidl_next::WireU32(3) };
7507
7508    pub const BAD_ENTRY: WireNamespaceError = WireNamespaceError { value: ::fidl_next::WireU32(4) };
7509
7510    pub const DICTIONARY_READ: WireNamespaceError =
7511        WireNamespaceError { value: ::fidl_next::WireU32(5) };
7512}
7513
7514unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceError
7515where
7516    ___D: ?Sized,
7517{
7518    fn decode(
7519        slot: ::fidl_next::Slot<'_, Self>,
7520        _: &mut ___D,
7521    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7522        Ok(())
7523    }
7524}
7525
7526impl ::core::convert::From<NamespaceError> for WireNamespaceError {
7527    fn from(natural: NamespaceError) -> Self {
7528        match natural {
7529            NamespaceError::Shadow => WireNamespaceError::SHADOW,
7530
7531            NamespaceError::Duplicate => WireNamespaceError::DUPLICATE,
7532
7533            NamespaceError::Conversion => WireNamespaceError::CONVERSION,
7534
7535            NamespaceError::BadEntry => WireNamespaceError::BAD_ENTRY,
7536
7537            NamespaceError::DictionaryRead => WireNamespaceError::DICTIONARY_READ,
7538
7539            NamespaceError::UnknownOrdinal_(value) => {
7540                WireNamespaceError { value: ::fidl_next::WireU32::from(value) }
7541            }
7542        }
7543    }
7544}
7545
7546#[derive(PartialEq, Debug)]
7547pub struct NamespaceCreateResponse {
7548    pub entries: ::std::vec::Vec<crate::NamespaceEntry>,
7549}
7550
7551impl ::fidl_next::Encodable for NamespaceCreateResponse {
7552    type Encoded = WireNamespaceCreateResponse<'static>;
7553}
7554
7555unsafe impl<___E> ::fidl_next::Encode<___E> for NamespaceCreateResponse
7556where
7557    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7558    ___E: ::fidl_next::Encoder,
7559    ___E: ::fidl_next::fuchsia::HandleEncoder,
7560{
7561    #[inline]
7562    fn encode(
7563        self,
7564        encoder_: &mut ___E,
7565        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7566    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7567        ::fidl_next::munge! {
7568            let Self::Encoded {
7569                entries,
7570
7571            } = out_;
7572        }
7573
7574        ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
7575
7576        Ok(())
7577    }
7578}
7579
7580impl ::fidl_next::EncodableOption for NamespaceCreateResponse {
7581    type EncodedOption = ::fidl_next::WireBox<'static, WireNamespaceCreateResponse<'static>>;
7582}
7583
7584unsafe impl<___E> ::fidl_next::EncodeOption<___E> for NamespaceCreateResponse
7585where
7586    ___E: ::fidl_next::Encoder + ?Sized,
7587    NamespaceCreateResponse: ::fidl_next::Encode<___E>,
7588{
7589    #[inline]
7590    fn encode_option(
7591        this: ::core::option::Option<Self>,
7592        encoder: &mut ___E,
7593        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7594    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7595        if let Some(inner) = this {
7596            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7597            ::fidl_next::WireBox::encode_present(out);
7598        } else {
7599            ::fidl_next::WireBox::encode_absent(out);
7600        }
7601
7602        Ok(())
7603    }
7604}
7605
7606impl<'de> ::fidl_next::FromWire<WireNamespaceCreateResponse<'de>> for NamespaceCreateResponse {
7607    #[inline]
7608    fn from_wire(wire: WireNamespaceCreateResponse<'de>) -> Self {
7609        Self { entries: ::fidl_next::FromWire::from_wire(wire.entries) }
7610    }
7611}
7612
7613impl<'de> ::fidl_next::IntoNatural for WireNamespaceCreateResponse<'de> {
7614    type Natural = NamespaceCreateResponse;
7615}
7616
7617/// The wire type corresponding to [`NamespaceCreateResponse`].
7618#[derive(Debug)]
7619#[repr(C)]
7620pub struct WireNamespaceCreateResponse<'de> {
7621    pub entries: ::fidl_next::WireVector<'de, crate::WireNamespaceEntry<'de>>,
7622}
7623static_assertions::const_assert_eq!(std::mem::size_of::<WireNamespaceCreateResponse<'_>>(), 16);
7624static_assertions::const_assert_eq!(std::mem::align_of::<WireNamespaceCreateResponse<'_>>(), 8);
7625
7626static_assertions::const_assert_eq!(
7627    std::mem::offset_of!(WireNamespaceCreateResponse<'_>, entries),
7628    0
7629);
7630
7631unsafe impl ::fidl_next::Wire for WireNamespaceCreateResponse<'static> {
7632    type Decoded<'de> = WireNamespaceCreateResponse<'de>;
7633
7634    #[inline]
7635    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
7636        ::fidl_next::munge! {
7637            let Self {
7638
7639                entries,
7640
7641            } = &mut *out_;
7642        }
7643
7644        ::fidl_next::Wire::zero_padding(entries);
7645    }
7646}
7647
7648unsafe impl<___D> ::fidl_next::Decode<___D> for WireNamespaceCreateResponse<'static>
7649where
7650    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7651    ___D: ::fidl_next::Decoder,
7652    ___D: ::fidl_next::fuchsia::HandleDecoder,
7653{
7654    fn decode(
7655        slot_: ::fidl_next::Slot<'_, Self>,
7656        decoder_: &mut ___D,
7657    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
7658        ::fidl_next::munge! {
7659            let Self {
7660
7661                mut entries,
7662
7663            } = slot_;
7664        }
7665
7666        ::fidl_next::Decode::decode(entries.as_mut(), decoder_)?;
7667
7668        Ok(())
7669    }
7670}
7671
7672/// The type corresponding to the Namespace protocol.
7673#[doc = " Protocol for performing namespace operations.\n"]
7674#[derive(PartialEq, Debug)]
7675pub struct Namespace;
7676
7677impl ::fidl_next::Discoverable for Namespace {
7678    const PROTOCOL_NAME: &'static str = "fuchsia.component.Namespace";
7679}
7680
7681pub mod namespace {
7682    pub mod prelude {
7683        pub use crate::{Namespace, NamespaceClientHandler, NamespaceServerHandler, namespace};
7684
7685        pub use crate::NamespaceCreateRequest;
7686
7687        pub use crate::NamespaceError;
7688
7689        pub use crate::NamespaceCreateResponse;
7690    }
7691
7692    pub struct Create;
7693
7694    impl ::fidl_next::Method for Create {
7695        const ORDINAL: u64 = 4839678630846501113;
7696
7697        type Protocol = crate::Namespace;
7698
7699        type Request = crate::WireNamespaceCreateRequest<'static>;
7700
7701        type Response = ::fidl_next::WireFlexibleResult<
7702            'static,
7703            crate::WireNamespaceCreateResponse<'static>,
7704            crate::WireNamespaceError,
7705        >;
7706    }
7707
7708    mod ___detail {
7709
7710        pub struct Create<T0> {
7711            entries: T0,
7712        }
7713
7714        impl<T0> ::fidl_next::Encodable for Create<T0>
7715        where
7716            T0: ::fidl_next::Encodable<
7717                    Encoded = ::fidl_next::WireVector<
7718                        'static,
7719                        crate::WireNamespaceInputEntry<'static>,
7720                    >,
7721                >,
7722        {
7723            type Encoded = crate::WireNamespaceCreateRequest<'static>;
7724        }
7725
7726        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Create<T0>
7727        where
7728            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7729            ___E: ::fidl_next::Encoder,
7730            ___E: ::fidl_next::fuchsia::HandleEncoder,
7731            T0: ::fidl_next::Encode<
7732                    ___E,
7733                    Encoded = ::fidl_next::WireVector<
7734                        'static,
7735                        crate::WireNamespaceInputEntry<'static>,
7736                    >,
7737                >,
7738        {
7739            #[inline]
7740            fn encode(
7741                self,
7742                encoder_: &mut ___E,
7743                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7744            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7745                ::fidl_next::munge! {
7746                    let Self::Encoded {
7747                        entries,
7748
7749                    } = out_;
7750                }
7751
7752                ::fidl_next::Encode::encode(self.entries, encoder_, entries)?;
7753
7754                Ok(())
7755            }
7756        }
7757
7758        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Namespace
7759        where
7760            ___T: ::fidl_next::Transport,
7761        {
7762            type Client = NamespaceClient<___T>;
7763            type Server = NamespaceServer<___T>;
7764        }
7765
7766        /// The client for the `Namespace` protocol.
7767        #[repr(transparent)]
7768        pub struct NamespaceClient<___T: ::fidl_next::Transport> {
7769            #[allow(dead_code)]
7770            client: ::fidl_next::protocol::Client<___T>,
7771        }
7772
7773        impl<___T> NamespaceClient<___T>
7774        where
7775            ___T: ::fidl_next::Transport,
7776        {
7777            pub fn create(
7778                &self,
7779
7780                entries: impl ::fidl_next::Encode<
7781                    <___T as ::fidl_next::Transport>::SendBuffer,
7782                    Encoded = ::fidl_next::WireVector<
7783                        'static,
7784                        crate::WireNamespaceInputEntry<'static>,
7785                    >,
7786                >,
7787            ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
7788            where
7789                <___T as ::fidl_next::Transport>::SendBuffer:
7790                    ::fidl_next::encoder::InternalHandleEncoder,
7791                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7792                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7793            {
7794                self.create_with(Create { entries })
7795            }
7796
7797            pub fn create_with<___R>(
7798                &self,
7799                request: ___R,
7800            ) -> ::fidl_next::TwoWayFuture<'_, super::Create, ___T>
7801            where
7802                ___R: ::fidl_next::Encode<
7803                        <___T as ::fidl_next::Transport>::SendBuffer,
7804                        Encoded = crate::WireNamespaceCreateRequest<'static>,
7805                    >,
7806            {
7807                ::fidl_next::TwoWayFuture::from_untyped(
7808                    self.client.send_two_way(4839678630846501113, request),
7809                )
7810            }
7811        }
7812
7813        /// The server for the `Namespace` protocol.
7814        #[repr(transparent)]
7815        pub struct NamespaceServer<___T: ::fidl_next::Transport> {
7816            server: ::fidl_next::protocol::Server<___T>,
7817        }
7818
7819        impl<___T> NamespaceServer<___T> where ___T: ::fidl_next::Transport {}
7820    }
7821}
7822
7823/// A client handler for the Namespace protocol.
7824///
7825/// See [`Namespace`] for more details.
7826pub trait NamespaceClientHandler<
7827    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7828    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7829>
7830{
7831    fn on_unknown_interaction(
7832        &mut self,
7833        ordinal: u64,
7834    ) -> impl ::core::future::Future<
7835        Output = ::core::result::Result<
7836            (),
7837            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7838        >,
7839    > + ::core::marker::Send {
7840        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
7841    }
7842}
7843
7844impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Namespace
7845where
7846    ___H: NamespaceClientHandler<___T> + ::core::marker::Send,
7847    ___T: ::fidl_next::Transport,
7848    <namespace::Create as ::fidl_next::Method>::Response:
7849        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7850{
7851    async fn on_event(
7852        handler: &mut ___H,
7853        ordinal: u64,
7854        buffer: ___T::RecvBuffer,
7855    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
7856        match ordinal {
7857            ordinal => handler.on_unknown_interaction(ordinal).await,
7858        }
7859    }
7860}
7861
7862/// A server handler for the Namespace protocol.
7863///
7864/// See [`Namespace`] for more details.
7865pub trait NamespaceServerHandler<
7866    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7867    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7868>
7869{
7870    fn create(
7871        &mut self,
7872
7873        request: ::fidl_next::Request<namespace::Create, ___T>,
7874
7875        responder: ::fidl_next::Responder<namespace::Create, ___T>,
7876    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7877
7878    fn on_unknown_interaction(
7879        &mut self,
7880        ordinal: u64,
7881    ) -> impl ::core::future::Future<
7882        Output = ::core::result::Result<
7883            (),
7884            ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7885        >,
7886    > + ::core::marker::Send {
7887        ::core::future::ready(Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)))
7888    }
7889}
7890
7891impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Namespace
7892where
7893    ___H: NamespaceServerHandler<___T> + ::core::marker::Send,
7894    ___T: ::fidl_next::Transport,
7895    <namespace::Create as ::fidl_next::Method>::Request:
7896        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7897{
7898    async fn on_one_way(
7899        handler: &mut ___H,
7900        ordinal: u64,
7901        buffer: ___T::RecvBuffer,
7902    ) -> ::core::result::Result<
7903        (),
7904        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7905    > {
7906        match ordinal {
7907            ordinal => handler.on_unknown_interaction(ordinal).await,
7908        }
7909    }
7910
7911    async fn on_two_way(
7912        handler: &mut ___H,
7913        ordinal: u64,
7914        buffer: ___T::RecvBuffer,
7915        responder: ::fidl_next::protocol::Responder<___T>,
7916    ) -> ::core::result::Result<
7917        (),
7918        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
7919    > {
7920        match ordinal {
7921            4839678630846501113 => {
7922                let responder = ::fidl_next::Responder::from_untyped(responder);
7923
7924                match ::fidl_next::DecoderExt::decode(buffer) {
7925                    Ok(decoded) => {
7926                        handler.create(decoded, responder).await;
7927                        Ok(())
7928                    }
7929                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
7930                        ordinal: 4839678630846501113,
7931                        error,
7932                    }),
7933                }
7934            }
7935
7936            ordinal => handler.on_unknown_interaction(ordinal).await,
7937        }
7938    }
7939}
7940
7941pub type RealmOpenExposedDirResponse = ();
7942
7943/// The wire type corresponding to [`RealmOpenExposedDirResponse`].
7944pub type WireRealmOpenExposedDirResponse = ();
7945
7946pub type RealmCreateChildResponse = ();
7947
7948/// The wire type corresponding to [`RealmCreateChildResponse`].
7949pub type WireRealmCreateChildResponse = ();
7950
7951#[derive(PartialEq, Clone, Debug)]
7952pub struct RealmDestroyChildRequest {
7953    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
7954}
7955
7956impl ::fidl_next::Encodable for RealmDestroyChildRequest {
7957    type Encoded = WireRealmDestroyChildRequest<'static>;
7958}
7959
7960unsafe impl<___E> ::fidl_next::Encode<___E> for RealmDestroyChildRequest
7961where
7962    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7963    ___E: ::fidl_next::Encoder,
7964{
7965    #[inline]
7966    fn encode(
7967        self,
7968        encoder_: &mut ___E,
7969        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7970    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7971        ::fidl_next::munge! {
7972            let Self::Encoded {
7973                child,
7974
7975            } = out_;
7976        }
7977
7978        ::fidl_next::Encode::encode(self.child, encoder_, child)?;
7979
7980        Ok(())
7981    }
7982}
7983
7984unsafe impl<___E> ::fidl_next::EncodeRef<___E> for RealmDestroyChildRequest
7985where
7986    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7987    ___E: ::fidl_next::Encoder,
7988{
7989    #[inline]
7990    fn encode_ref(
7991        &self,
7992        encoder_: &mut ___E,
7993        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7994    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
7995        ::fidl_next::munge! {
7996            let Self::Encoded {
7997
7998                child,
7999
8000            } = out_;
8001        }
8002
8003        ::fidl_next::EncodeRef::encode_ref(&self.child, encoder_, child)?;
8004
8005        Ok(())
8006    }
8007}
8008
8009impl ::fidl_next::EncodableOption for RealmDestroyChildRequest {
8010    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmDestroyChildRequest<'static>>;
8011}
8012
8013unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmDestroyChildRequest
8014where
8015    ___E: ::fidl_next::Encoder + ?Sized,
8016    RealmDestroyChildRequest: ::fidl_next::Encode<___E>,
8017{
8018    #[inline]
8019    fn encode_option(
8020        this: ::core::option::Option<Self>,
8021        encoder: &mut ___E,
8022        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8023    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8024        if let Some(inner) = this {
8025            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8026            ::fidl_next::WireBox::encode_present(out);
8027        } else {
8028            ::fidl_next::WireBox::encode_absent(out);
8029        }
8030
8031        Ok(())
8032    }
8033}
8034
8035unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for RealmDestroyChildRequest
8036where
8037    ___E: ::fidl_next::Encoder + ?Sized,
8038    RealmDestroyChildRequest: ::fidl_next::EncodeRef<___E>,
8039{
8040    #[inline]
8041    fn encode_option_ref(
8042        this: ::core::option::Option<&Self>,
8043        encoder: &mut ___E,
8044        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8045    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8046        if let Some(inner) = this {
8047            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8048            ::fidl_next::WireBox::encode_present(out);
8049        } else {
8050            ::fidl_next::WireBox::encode_absent(out);
8051        }
8052
8053        Ok(())
8054    }
8055}
8056
8057impl<'de> ::fidl_next::FromWire<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
8058    #[inline]
8059    fn from_wire(wire: WireRealmDestroyChildRequest<'de>) -> Self {
8060        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
8061    }
8062}
8063
8064impl<'de> ::fidl_next::IntoNatural for WireRealmDestroyChildRequest<'de> {
8065    type Natural = RealmDestroyChildRequest;
8066}
8067
8068impl<'de> ::fidl_next::FromWireRef<WireRealmDestroyChildRequest<'de>> for RealmDestroyChildRequest {
8069    #[inline]
8070    fn from_wire_ref(wire: &WireRealmDestroyChildRequest<'de>) -> Self {
8071        Self { child: ::fidl_next::FromWireRef::from_wire_ref(&wire.child) }
8072    }
8073}
8074
8075/// The wire type corresponding to [`RealmDestroyChildRequest`].
8076#[derive(Debug)]
8077#[repr(C)]
8078pub struct WireRealmDestroyChildRequest<'de> {
8079    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8080}
8081static_assertions::const_assert_eq!(std::mem::size_of::<WireRealmDestroyChildRequest<'_>>(), 32);
8082static_assertions::const_assert_eq!(std::mem::align_of::<WireRealmDestroyChildRequest<'_>>(), 8);
8083
8084static_assertions::const_assert_eq!(
8085    std::mem::offset_of!(WireRealmDestroyChildRequest<'_>, child),
8086    0
8087);
8088
8089unsafe impl ::fidl_next::Wire for WireRealmDestroyChildRequest<'static> {
8090    type Decoded<'de> = WireRealmDestroyChildRequest<'de>;
8091
8092    #[inline]
8093    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8094        ::fidl_next::munge! {
8095            let Self {
8096
8097                child,
8098
8099            } = &mut *out_;
8100        }
8101
8102        ::fidl_next::Wire::zero_padding(child);
8103    }
8104}
8105
8106unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmDestroyChildRequest<'static>
8107where
8108    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8109    ___D: ::fidl_next::Decoder,
8110{
8111    fn decode(
8112        slot_: ::fidl_next::Slot<'_, Self>,
8113        decoder_: &mut ___D,
8114    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8115        ::fidl_next::munge! {
8116            let Self {
8117
8118                mut child,
8119
8120            } = slot_;
8121        }
8122
8123        ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8124
8125        Ok(())
8126    }
8127}
8128
8129pub type RealmDestroyChildResponse = ();
8130
8131/// The wire type corresponding to [`RealmDestroyChildResponse`].
8132pub type WireRealmDestroyChildResponse = ();
8133
8134#[derive(PartialEq, Debug)]
8135pub struct RealmListChildrenRequest {
8136    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
8137
8138    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::zx::Channel>,
8139}
8140
8141impl ::fidl_next::Encodable for RealmListChildrenRequest {
8142    type Encoded = WireRealmListChildrenRequest<'static>;
8143}
8144
8145unsafe impl<___E> ::fidl_next::Encode<___E> for RealmListChildrenRequest
8146where
8147    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8148    ___E: ::fidl_next::Encoder,
8149    ___E: ::fidl_next::fuchsia::HandleEncoder,
8150{
8151    #[inline]
8152    fn encode(
8153        self,
8154        encoder_: &mut ___E,
8155        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8156    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8157        ::fidl_next::munge! {
8158            let Self::Encoded {
8159                collection,
8160                iter,
8161
8162            } = out_;
8163        }
8164
8165        ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
8166
8167        ::fidl_next::Encode::encode(self.iter, encoder_, iter)?;
8168
8169        Ok(())
8170    }
8171}
8172
8173impl ::fidl_next::EncodableOption for RealmListChildrenRequest {
8174    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmListChildrenRequest<'static>>;
8175}
8176
8177unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmListChildrenRequest
8178where
8179    ___E: ::fidl_next::Encoder + ?Sized,
8180    RealmListChildrenRequest: ::fidl_next::Encode<___E>,
8181{
8182    #[inline]
8183    fn encode_option(
8184        this: ::core::option::Option<Self>,
8185        encoder: &mut ___E,
8186        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8187    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8188        if let Some(inner) = this {
8189            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8190            ::fidl_next::WireBox::encode_present(out);
8191        } else {
8192            ::fidl_next::WireBox::encode_absent(out);
8193        }
8194
8195        Ok(())
8196    }
8197}
8198
8199impl<'de> ::fidl_next::FromWire<WireRealmListChildrenRequest<'de>> for RealmListChildrenRequest {
8200    #[inline]
8201    fn from_wire(wire: WireRealmListChildrenRequest<'de>) -> Self {
8202        Self {
8203            collection: ::fidl_next::FromWire::from_wire(wire.collection),
8204
8205            iter: ::fidl_next::FromWire::from_wire(wire.iter),
8206        }
8207    }
8208}
8209
8210impl<'de> ::fidl_next::IntoNatural for WireRealmListChildrenRequest<'de> {
8211    type Natural = RealmListChildrenRequest;
8212}
8213
8214/// The wire type corresponding to [`RealmListChildrenRequest`].
8215#[derive(Debug)]
8216#[repr(C)]
8217pub struct WireRealmListChildrenRequest<'de> {
8218    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
8219
8220    pub iter: ::fidl_next::ServerEnd<crate::ChildIterator, ::fidl_next::fuchsia::WireChannel>,
8221}
8222static_assertions::const_assert_eq!(std::mem::size_of::<WireRealmListChildrenRequest<'_>>(), 24);
8223static_assertions::const_assert_eq!(std::mem::align_of::<WireRealmListChildrenRequest<'_>>(), 8);
8224
8225static_assertions::const_assert_eq!(
8226    std::mem::offset_of!(WireRealmListChildrenRequest<'_>, collection),
8227    0
8228);
8229
8230static_assertions::const_assert_eq!(
8231    std::mem::offset_of!(WireRealmListChildrenRequest<'_>, iter),
8232    16
8233);
8234
8235unsafe impl ::fidl_next::Wire for WireRealmListChildrenRequest<'static> {
8236    type Decoded<'de> = WireRealmListChildrenRequest<'de>;
8237
8238    #[inline]
8239    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8240        ::fidl_next::munge! {
8241            let Self {
8242
8243                collection,
8244                iter,
8245
8246            } = &mut *out_;
8247        }
8248
8249        ::fidl_next::Wire::zero_padding(collection);
8250
8251        ::fidl_next::Wire::zero_padding(iter);
8252
8253        unsafe {
8254            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
8255        }
8256    }
8257}
8258
8259unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmListChildrenRequest<'static>
8260where
8261    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8262    ___D: ::fidl_next::Decoder,
8263    ___D: ::fidl_next::fuchsia::HandleDecoder,
8264{
8265    fn decode(
8266        slot_: ::fidl_next::Slot<'_, Self>,
8267        decoder_: &mut ___D,
8268    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8269        ::fidl_next::munge! {
8270            let Self {
8271
8272                mut collection,
8273                mut iter,
8274
8275            } = slot_;
8276        }
8277
8278        ::fidl_next::Decode::decode(collection.as_mut(), decoder_)?;
8279
8280        ::fidl_next::Decode::decode(iter.as_mut(), decoder_)?;
8281
8282        Ok(())
8283    }
8284}
8285
8286pub type RealmListChildrenResponse = ();
8287
8288/// The wire type corresponding to [`RealmListChildrenResponse`].
8289pub type WireRealmListChildrenResponse = ();
8290
8291pub type RealmOpenControllerResponse = ();
8292
8293/// The wire type corresponding to [`RealmOpenControllerResponse`].
8294pub type WireRealmOpenControllerResponse = ();
8295
8296#[derive(PartialEq, Debug)]
8297pub struct RealmGetChildOutputDictionaryRequest {
8298    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8299}
8300
8301impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryRequest {
8302    type Encoded = WireRealmGetChildOutputDictionaryRequest<'static>;
8303}
8304
8305unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryRequest
8306where
8307    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8308    ___E: ::fidl_next::Encoder,
8309    ___E: ::fidl_next::fuchsia::HandleEncoder,
8310{
8311    #[inline]
8312    fn encode(
8313        self,
8314        encoder_: &mut ___E,
8315        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8316    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8317        ::fidl_next::munge! {
8318            let Self::Encoded {
8319                child,
8320
8321            } = out_;
8322        }
8323
8324        ::fidl_next::Encode::encode(self.child, encoder_, child)?;
8325
8326        Ok(())
8327    }
8328}
8329
8330impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryRequest {
8331    type EncodedOption =
8332        ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryRequest<'static>>;
8333}
8334
8335unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryRequest
8336where
8337    ___E: ::fidl_next::Encoder + ?Sized,
8338    RealmGetChildOutputDictionaryRequest: ::fidl_next::Encode<___E>,
8339{
8340    #[inline]
8341    fn encode_option(
8342        this: ::core::option::Option<Self>,
8343        encoder: &mut ___E,
8344        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8345    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8346        if let Some(inner) = this {
8347            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8348            ::fidl_next::WireBox::encode_present(out);
8349        } else {
8350            ::fidl_next::WireBox::encode_absent(out);
8351        }
8352
8353        Ok(())
8354    }
8355}
8356
8357impl<'de> ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryRequest<'de>>
8358    for RealmGetChildOutputDictionaryRequest
8359{
8360    #[inline]
8361    fn from_wire(wire: WireRealmGetChildOutputDictionaryRequest<'de>) -> Self {
8362        Self { child: ::fidl_next::FromWire::from_wire(wire.child) }
8363    }
8364}
8365
8366impl<'de> ::fidl_next::IntoNatural for WireRealmGetChildOutputDictionaryRequest<'de> {
8367    type Natural = RealmGetChildOutputDictionaryRequest;
8368}
8369
8370/// The wire type corresponding to [`RealmGetChildOutputDictionaryRequest`].
8371#[derive(Debug)]
8372#[repr(C)]
8373pub struct WireRealmGetChildOutputDictionaryRequest<'de> {
8374    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8375}
8376static_assertions::const_assert_eq!(
8377    std::mem::size_of::<WireRealmGetChildOutputDictionaryRequest<'_>>(),
8378    32
8379);
8380static_assertions::const_assert_eq!(
8381    std::mem::align_of::<WireRealmGetChildOutputDictionaryRequest<'_>>(),
8382    8
8383);
8384
8385static_assertions::const_assert_eq!(
8386    std::mem::offset_of!(WireRealmGetChildOutputDictionaryRequest<'_>, child),
8387    0
8388);
8389
8390unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryRequest<'static> {
8391    type Decoded<'de> = WireRealmGetChildOutputDictionaryRequest<'de>;
8392
8393    #[inline]
8394    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8395        ::fidl_next::munge! {
8396            let Self {
8397
8398                child,
8399
8400            } = &mut *out_;
8401        }
8402
8403        ::fidl_next::Wire::zero_padding(child);
8404    }
8405}
8406
8407unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryRequest<'static>
8408where
8409    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8410    ___D: ::fidl_next::Decoder,
8411    ___D: ::fidl_next::fuchsia::HandleDecoder,
8412{
8413    fn decode(
8414        slot_: ::fidl_next::Slot<'_, Self>,
8415        decoder_: &mut ___D,
8416    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8417        ::fidl_next::munge! {
8418            let Self {
8419
8420                mut child,
8421
8422            } = slot_;
8423        }
8424
8425        ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8426
8427        Ok(())
8428    }
8429}
8430
8431#[derive(PartialEq, Debug)]
8432#[repr(C)]
8433pub struct RealmGetChildOutputDictionaryResponse {
8434    pub dictionary: ::fidl_next_fuchsia_component_sandbox::DictionaryRef,
8435}
8436
8437impl ::fidl_next::Encodable for RealmGetChildOutputDictionaryResponse {
8438    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8439        Self,
8440        WireRealmGetChildOutputDictionaryResponse,
8441    > = unsafe {
8442        ::fidl_next::CopyOptimization::enable_if(
8443            true
8444
8445                && <
8446                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::Encodable
8447                >::COPY_OPTIMIZATION.is_enabled()
8448
8449        )
8450    };
8451
8452    type Encoded = WireRealmGetChildOutputDictionaryResponse;
8453}
8454
8455unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetChildOutputDictionaryResponse
8456where
8457    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8458    ___E: ::fidl_next::fuchsia::HandleEncoder,
8459{
8460    #[inline]
8461    fn encode(
8462        self,
8463        encoder_: &mut ___E,
8464        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8465    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8466        ::fidl_next::munge! {
8467            let Self::Encoded {
8468                dictionary,
8469
8470            } = out_;
8471        }
8472
8473        ::fidl_next::Encode::encode(self.dictionary, encoder_, dictionary)?;
8474
8475        Ok(())
8476    }
8477}
8478
8479impl ::fidl_next::EncodableOption for RealmGetChildOutputDictionaryResponse {
8480    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetChildOutputDictionaryResponse>;
8481}
8482
8483unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetChildOutputDictionaryResponse
8484where
8485    ___E: ::fidl_next::Encoder + ?Sized,
8486    RealmGetChildOutputDictionaryResponse: ::fidl_next::Encode<___E>,
8487{
8488    #[inline]
8489    fn encode_option(
8490        this: ::core::option::Option<Self>,
8491        encoder: &mut ___E,
8492        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8493    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8494        if let Some(inner) = this {
8495            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8496            ::fidl_next::WireBox::encode_present(out);
8497        } else {
8498            ::fidl_next::WireBox::encode_absent(out);
8499        }
8500
8501        Ok(())
8502    }
8503}
8504
8505impl ::fidl_next::FromWire<WireRealmGetChildOutputDictionaryResponse>
8506    for RealmGetChildOutputDictionaryResponse
8507{
8508    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
8509        WireRealmGetChildOutputDictionaryResponse,
8510        Self,
8511    > = unsafe {
8512        ::fidl_next::CopyOptimization::enable_if(
8513            true
8514
8515                && <
8516                    ::fidl_next_fuchsia_component_sandbox::DictionaryRef as ::fidl_next::FromWire<::fidl_next_fuchsia_component_sandbox::WireDictionaryRef>
8517                >::COPY_OPTIMIZATION.is_enabled()
8518
8519        )
8520    };
8521
8522    #[inline]
8523    fn from_wire(wire: WireRealmGetChildOutputDictionaryResponse) -> Self {
8524        Self { dictionary: ::fidl_next::FromWire::from_wire(wire.dictionary) }
8525    }
8526}
8527
8528impl ::fidl_next::IntoNatural for WireRealmGetChildOutputDictionaryResponse {
8529    type Natural = RealmGetChildOutputDictionaryResponse;
8530}
8531
8532/// The wire type corresponding to [`RealmGetChildOutputDictionaryResponse`].
8533#[derive(Debug)]
8534#[repr(C)]
8535pub struct WireRealmGetChildOutputDictionaryResponse {
8536    pub dictionary: ::fidl_next_fuchsia_component_sandbox::WireDictionaryRef,
8537}
8538static_assertions::const_assert_eq!(
8539    std::mem::size_of::<WireRealmGetChildOutputDictionaryResponse>(),
8540    4
8541);
8542static_assertions::const_assert_eq!(
8543    std::mem::align_of::<WireRealmGetChildOutputDictionaryResponse>(),
8544    4
8545);
8546
8547static_assertions::const_assert_eq!(
8548    std::mem::offset_of!(WireRealmGetChildOutputDictionaryResponse, dictionary),
8549    0
8550);
8551
8552unsafe impl ::fidl_next::Wire for WireRealmGetChildOutputDictionaryResponse {
8553    type Decoded<'de> = WireRealmGetChildOutputDictionaryResponse;
8554
8555    #[inline]
8556    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8557        ::fidl_next::munge! {
8558            let Self {
8559
8560                dictionary,
8561
8562            } = &mut *out_;
8563        }
8564
8565        ::fidl_next::Wire::zero_padding(dictionary);
8566    }
8567}
8568
8569unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetChildOutputDictionaryResponse
8570where
8571    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8572    ___D: ::fidl_next::fuchsia::HandleDecoder,
8573{
8574    fn decode(
8575        slot_: ::fidl_next::Slot<'_, Self>,
8576        decoder_: &mut ___D,
8577    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8578        ::fidl_next::munge! {
8579            let Self {
8580
8581                mut dictionary,
8582
8583            } = slot_;
8584        }
8585
8586        ::fidl_next::Decode::decode(dictionary.as_mut(), decoder_)?;
8587
8588        Ok(())
8589    }
8590}
8591
8592#[derive(PartialEq, Debug)]
8593pub struct RealmOpenControllerRequest {
8594    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8595
8596    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::zx::Channel>,
8597}
8598
8599impl ::fidl_next::Encodable for RealmOpenControllerRequest {
8600    type Encoded = WireRealmOpenControllerRequest<'static>;
8601}
8602
8603unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenControllerRequest
8604where
8605    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8606    ___E: ::fidl_next::Encoder,
8607    ___E: ::fidl_next::fuchsia::HandleEncoder,
8608{
8609    #[inline]
8610    fn encode(
8611        self,
8612        encoder_: &mut ___E,
8613        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8614    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8615        ::fidl_next::munge! {
8616            let Self::Encoded {
8617                child,
8618                controller,
8619
8620            } = out_;
8621        }
8622
8623        ::fidl_next::Encode::encode(self.child, encoder_, child)?;
8624
8625        ::fidl_next::Encode::encode(self.controller, encoder_, controller)?;
8626
8627        Ok(())
8628    }
8629}
8630
8631impl ::fidl_next::EncodableOption for RealmOpenControllerRequest {
8632    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenControllerRequest<'static>>;
8633}
8634
8635unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenControllerRequest
8636where
8637    ___E: ::fidl_next::Encoder + ?Sized,
8638    RealmOpenControllerRequest: ::fidl_next::Encode<___E>,
8639{
8640    #[inline]
8641    fn encode_option(
8642        this: ::core::option::Option<Self>,
8643        encoder: &mut ___E,
8644        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8645    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8646        if let Some(inner) = this {
8647            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8648            ::fidl_next::WireBox::encode_present(out);
8649        } else {
8650            ::fidl_next::WireBox::encode_absent(out);
8651        }
8652
8653        Ok(())
8654    }
8655}
8656
8657impl<'de> ::fidl_next::FromWire<WireRealmOpenControllerRequest<'de>>
8658    for RealmOpenControllerRequest
8659{
8660    #[inline]
8661    fn from_wire(wire: WireRealmOpenControllerRequest<'de>) -> Self {
8662        Self {
8663            child: ::fidl_next::FromWire::from_wire(wire.child),
8664
8665            controller: ::fidl_next::FromWire::from_wire(wire.controller),
8666        }
8667    }
8668}
8669
8670impl<'de> ::fidl_next::IntoNatural for WireRealmOpenControllerRequest<'de> {
8671    type Natural = RealmOpenControllerRequest;
8672}
8673
8674/// The wire type corresponding to [`RealmOpenControllerRequest`].
8675#[derive(Debug)]
8676#[repr(C)]
8677pub struct WireRealmOpenControllerRequest<'de> {
8678    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8679
8680    pub controller: ::fidl_next::ServerEnd<crate::Controller, ::fidl_next::fuchsia::WireChannel>,
8681}
8682static_assertions::const_assert_eq!(std::mem::size_of::<WireRealmOpenControllerRequest<'_>>(), 40);
8683static_assertions::const_assert_eq!(std::mem::align_of::<WireRealmOpenControllerRequest<'_>>(), 8);
8684
8685static_assertions::const_assert_eq!(
8686    std::mem::offset_of!(WireRealmOpenControllerRequest<'_>, child),
8687    0
8688);
8689
8690static_assertions::const_assert_eq!(
8691    std::mem::offset_of!(WireRealmOpenControllerRequest<'_>, controller),
8692    32
8693);
8694
8695unsafe impl ::fidl_next::Wire for WireRealmOpenControllerRequest<'static> {
8696    type Decoded<'de> = WireRealmOpenControllerRequest<'de>;
8697
8698    #[inline]
8699    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8700        ::fidl_next::munge! {
8701            let Self {
8702
8703                child,
8704                controller,
8705
8706            } = &mut *out_;
8707        }
8708
8709        ::fidl_next::Wire::zero_padding(child);
8710
8711        ::fidl_next::Wire::zero_padding(controller);
8712
8713        unsafe {
8714            out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8715        }
8716    }
8717}
8718
8719unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenControllerRequest<'static>
8720where
8721    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8722    ___D: ::fidl_next::Decoder,
8723    ___D: ::fidl_next::fuchsia::HandleDecoder,
8724{
8725    fn decode(
8726        slot_: ::fidl_next::Slot<'_, Self>,
8727        decoder_: &mut ___D,
8728    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8729        ::fidl_next::munge! {
8730            let Self {
8731
8732                mut child,
8733                mut controller,
8734
8735            } = slot_;
8736        }
8737
8738        ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8739
8740        ::fidl_next::Decode::decode(controller.as_mut(), decoder_)?;
8741
8742        Ok(())
8743    }
8744}
8745
8746#[derive(PartialEq, Debug)]
8747pub struct RealmOpenExposedDirRequest {
8748    pub child: ::fidl_next_fuchsia_component_decl::ChildRef,
8749
8750    pub exposed_dir: ::fidl_next::ServerEnd<
8751        ::fidl_next_fuchsia_io::Directory,
8752        ::fidl_next::fuchsia::zx::Channel,
8753    >,
8754}
8755
8756impl ::fidl_next::Encodable for RealmOpenExposedDirRequest {
8757    type Encoded = WireRealmOpenExposedDirRequest<'static>;
8758}
8759
8760unsafe impl<___E> ::fidl_next::Encode<___E> for RealmOpenExposedDirRequest
8761where
8762    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8763    ___E: ::fidl_next::Encoder,
8764    ___E: ::fidl_next::fuchsia::HandleEncoder,
8765{
8766    #[inline]
8767    fn encode(
8768        self,
8769        encoder_: &mut ___E,
8770        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8771    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8772        ::fidl_next::munge! {
8773            let Self::Encoded {
8774                child,
8775                exposed_dir,
8776
8777            } = out_;
8778        }
8779
8780        ::fidl_next::Encode::encode(self.child, encoder_, child)?;
8781
8782        ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir)?;
8783
8784        Ok(())
8785    }
8786}
8787
8788impl ::fidl_next::EncodableOption for RealmOpenExposedDirRequest {
8789    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmOpenExposedDirRequest<'static>>;
8790}
8791
8792unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmOpenExposedDirRequest
8793where
8794    ___E: ::fidl_next::Encoder + ?Sized,
8795    RealmOpenExposedDirRequest: ::fidl_next::Encode<___E>,
8796{
8797    #[inline]
8798    fn encode_option(
8799        this: ::core::option::Option<Self>,
8800        encoder: &mut ___E,
8801        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8802    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8803        if let Some(inner) = this {
8804            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8805            ::fidl_next::WireBox::encode_present(out);
8806        } else {
8807            ::fidl_next::WireBox::encode_absent(out);
8808        }
8809
8810        Ok(())
8811    }
8812}
8813
8814impl<'de> ::fidl_next::FromWire<WireRealmOpenExposedDirRequest<'de>>
8815    for RealmOpenExposedDirRequest
8816{
8817    #[inline]
8818    fn from_wire(wire: WireRealmOpenExposedDirRequest<'de>) -> Self {
8819        Self {
8820            child: ::fidl_next::FromWire::from_wire(wire.child),
8821
8822            exposed_dir: ::fidl_next::FromWire::from_wire(wire.exposed_dir),
8823        }
8824    }
8825}
8826
8827impl<'de> ::fidl_next::IntoNatural for WireRealmOpenExposedDirRequest<'de> {
8828    type Natural = RealmOpenExposedDirRequest;
8829}
8830
8831/// The wire type corresponding to [`RealmOpenExposedDirRequest`].
8832#[derive(Debug)]
8833#[repr(C)]
8834pub struct WireRealmOpenExposedDirRequest<'de> {
8835    pub child: ::fidl_next_fuchsia_component_decl::WireChildRef<'de>,
8836
8837    pub exposed_dir: ::fidl_next::ServerEnd<
8838        ::fidl_next_fuchsia_io::Directory,
8839        ::fidl_next::fuchsia::WireChannel,
8840    >,
8841}
8842static_assertions::const_assert_eq!(std::mem::size_of::<WireRealmOpenExposedDirRequest<'_>>(), 40);
8843static_assertions::const_assert_eq!(std::mem::align_of::<WireRealmOpenExposedDirRequest<'_>>(), 8);
8844
8845static_assertions::const_assert_eq!(
8846    std::mem::offset_of!(WireRealmOpenExposedDirRequest<'_>, child),
8847    0
8848);
8849
8850static_assertions::const_assert_eq!(
8851    std::mem::offset_of!(WireRealmOpenExposedDirRequest<'_>, exposed_dir),
8852    32
8853);
8854
8855unsafe impl ::fidl_next::Wire for WireRealmOpenExposedDirRequest<'static> {
8856    type Decoded<'de> = WireRealmOpenExposedDirRequest<'de>;
8857
8858    #[inline]
8859    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
8860        ::fidl_next::munge! {
8861            let Self {
8862
8863                child,
8864                exposed_dir,
8865
8866            } = &mut *out_;
8867        }
8868
8869        ::fidl_next::Wire::zero_padding(child);
8870
8871        ::fidl_next::Wire::zero_padding(exposed_dir);
8872
8873        unsafe {
8874            out_.as_mut_ptr().cast::<u8>().add(36).write_bytes(0, 4);
8875        }
8876    }
8877}
8878
8879unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmOpenExposedDirRequest<'static>
8880where
8881    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8882    ___D: ::fidl_next::Decoder,
8883    ___D: ::fidl_next::fuchsia::HandleDecoder,
8884{
8885    fn decode(
8886        slot_: ::fidl_next::Slot<'_, Self>,
8887        decoder_: &mut ___D,
8888    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
8889        ::fidl_next::munge! {
8890            let Self {
8891
8892                mut child,
8893                mut exposed_dir,
8894
8895            } = slot_;
8896        }
8897
8898        ::fidl_next::Decode::decode(child.as_mut(), decoder_)?;
8899
8900        ::fidl_next::Decode::decode(exposed_dir.as_mut(), decoder_)?;
8901
8902        Ok(())
8903    }
8904}
8905
8906#[derive(PartialEq, Debug)]
8907pub struct RealmCreateChildRequest {
8908    pub collection: ::fidl_next_fuchsia_component_decl::CollectionRef,
8909
8910    pub decl: ::fidl_next_fuchsia_component_decl::Child,
8911
8912    pub args: crate::CreateChildArgs,
8913}
8914
8915impl ::fidl_next::Encodable for RealmCreateChildRequest {
8916    type Encoded = WireRealmCreateChildRequest<'static>;
8917}
8918
8919unsafe impl<___E> ::fidl_next::Encode<___E> for RealmCreateChildRequest
8920where
8921    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8922    ___E: ::fidl_next::Encoder,
8923    ___E: ::fidl_next::fuchsia::HandleEncoder,
8924{
8925    #[inline]
8926    fn encode(
8927        self,
8928        encoder_: &mut ___E,
8929        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8930    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8931        ::fidl_next::munge! {
8932            let Self::Encoded {
8933                collection,
8934                decl,
8935                args,
8936
8937            } = out_;
8938        }
8939
8940        ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
8941
8942        ::fidl_next::Encode::encode(self.decl, encoder_, decl)?;
8943
8944        ::fidl_next::Encode::encode(self.args, encoder_, args)?;
8945
8946        Ok(())
8947    }
8948}
8949
8950impl ::fidl_next::EncodableOption for RealmCreateChildRequest {
8951    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmCreateChildRequest<'static>>;
8952}
8953
8954unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmCreateChildRequest
8955where
8956    ___E: ::fidl_next::Encoder + ?Sized,
8957    RealmCreateChildRequest: ::fidl_next::Encode<___E>,
8958{
8959    #[inline]
8960    fn encode_option(
8961        this: ::core::option::Option<Self>,
8962        encoder: &mut ___E,
8963        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8964    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
8965        if let Some(inner) = this {
8966            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8967            ::fidl_next::WireBox::encode_present(out);
8968        } else {
8969            ::fidl_next::WireBox::encode_absent(out);
8970        }
8971
8972        Ok(())
8973    }
8974}
8975
8976impl<'de> ::fidl_next::FromWire<WireRealmCreateChildRequest<'de>> for RealmCreateChildRequest {
8977    #[inline]
8978    fn from_wire(wire: WireRealmCreateChildRequest<'de>) -> Self {
8979        Self {
8980            collection: ::fidl_next::FromWire::from_wire(wire.collection),
8981
8982            decl: ::fidl_next::FromWire::from_wire(wire.decl),
8983
8984            args: ::fidl_next::FromWire::from_wire(wire.args),
8985        }
8986    }
8987}
8988
8989impl<'de> ::fidl_next::IntoNatural for WireRealmCreateChildRequest<'de> {
8990    type Natural = RealmCreateChildRequest;
8991}
8992
8993/// The wire type corresponding to [`RealmCreateChildRequest`].
8994#[derive(Debug)]
8995#[repr(C)]
8996pub struct WireRealmCreateChildRequest<'de> {
8997    pub collection: ::fidl_next_fuchsia_component_decl::WireCollectionRef<'de>,
8998
8999    pub decl: ::fidl_next_fuchsia_component_decl::WireChild<'de>,
9000
9001    pub args: crate::WireCreateChildArgs<'de>,
9002}
9003static_assertions::const_assert_eq!(std::mem::size_of::<WireRealmCreateChildRequest<'_>>(), 48);
9004static_assertions::const_assert_eq!(std::mem::align_of::<WireRealmCreateChildRequest<'_>>(), 8);
9005
9006static_assertions::const_assert_eq!(
9007    std::mem::offset_of!(WireRealmCreateChildRequest<'_>, collection),
9008    0
9009);
9010
9011static_assertions::const_assert_eq!(
9012    std::mem::offset_of!(WireRealmCreateChildRequest<'_>, decl),
9013    16
9014);
9015
9016static_assertions::const_assert_eq!(
9017    std::mem::offset_of!(WireRealmCreateChildRequest<'_>, args),
9018    32
9019);
9020
9021unsafe impl ::fidl_next::Wire for WireRealmCreateChildRequest<'static> {
9022    type Decoded<'de> = WireRealmCreateChildRequest<'de>;
9023
9024    #[inline]
9025    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9026        ::fidl_next::munge! {
9027            let Self {
9028
9029                collection,
9030                decl,
9031                args,
9032
9033            } = &mut *out_;
9034        }
9035
9036        ::fidl_next::Wire::zero_padding(collection);
9037
9038        ::fidl_next::Wire::zero_padding(decl);
9039
9040        ::fidl_next::Wire::zero_padding(args);
9041    }
9042}
9043
9044unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmCreateChildRequest<'static>
9045where
9046    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9047    ___D: ::fidl_next::Decoder,
9048    ___D: ::fidl_next::fuchsia::HandleDecoder,
9049{
9050    fn decode(
9051        slot_: ::fidl_next::Slot<'_, Self>,
9052        decoder_: &mut ___D,
9053    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9054        ::fidl_next::munge! {
9055            let Self {
9056
9057                mut collection,
9058                mut decl,
9059                mut args,
9060
9061            } = slot_;
9062        }
9063
9064        ::fidl_next::Decode::decode(collection.as_mut(), decoder_)?;
9065
9066        ::fidl_next::Decode::decode(decl.as_mut(), decoder_)?;
9067
9068        ::fidl_next::Decode::decode(args.as_mut(), decoder_)?;
9069
9070        Ok(())
9071    }
9072}
9073
9074#[derive(PartialEq, Debug)]
9075pub struct RealmGetResolvedInfoResponse {
9076    pub resolved_info: ::fidl_next_fuchsia_component_resolution::Component,
9077}
9078
9079impl ::fidl_next::Encodable for RealmGetResolvedInfoResponse {
9080    type Encoded = WireRealmGetResolvedInfoResponse<'static>;
9081}
9082
9083unsafe impl<___E> ::fidl_next::Encode<___E> for RealmGetResolvedInfoResponse
9084where
9085    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9086    ___E: ::fidl_next::Encoder,
9087    ___E: ::fidl_next::fuchsia::HandleEncoder,
9088{
9089    #[inline]
9090    fn encode(
9091        self,
9092        encoder_: &mut ___E,
9093        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9094    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9095        ::fidl_next::munge! {
9096            let Self::Encoded {
9097                resolved_info,
9098
9099            } = out_;
9100        }
9101
9102        ::fidl_next::Encode::encode(self.resolved_info, encoder_, resolved_info)?;
9103
9104        Ok(())
9105    }
9106}
9107
9108impl ::fidl_next::EncodableOption for RealmGetResolvedInfoResponse {
9109    type EncodedOption = ::fidl_next::WireBox<'static, WireRealmGetResolvedInfoResponse<'static>>;
9110}
9111
9112unsafe impl<___E> ::fidl_next::EncodeOption<___E> for RealmGetResolvedInfoResponse
9113where
9114    ___E: ::fidl_next::Encoder + ?Sized,
9115    RealmGetResolvedInfoResponse: ::fidl_next::Encode<___E>,
9116{
9117    #[inline]
9118    fn encode_option(
9119        this: ::core::option::Option<Self>,
9120        encoder: &mut ___E,
9121        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9122    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9123        if let Some(inner) = this {
9124            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9125            ::fidl_next::WireBox::encode_present(out);
9126        } else {
9127            ::fidl_next::WireBox::encode_absent(out);
9128        }
9129
9130        Ok(())
9131    }
9132}
9133
9134impl<'de> ::fidl_next::FromWire<WireRealmGetResolvedInfoResponse<'de>>
9135    for RealmGetResolvedInfoResponse
9136{
9137    #[inline]
9138    fn from_wire(wire: WireRealmGetResolvedInfoResponse<'de>) -> Self {
9139        Self { resolved_info: ::fidl_next::FromWire::from_wire(wire.resolved_info) }
9140    }
9141}
9142
9143impl<'de> ::fidl_next::IntoNatural for WireRealmGetResolvedInfoResponse<'de> {
9144    type Natural = RealmGetResolvedInfoResponse;
9145}
9146
9147/// The wire type corresponding to [`RealmGetResolvedInfoResponse`].
9148#[derive(Debug)]
9149#[repr(C)]
9150pub struct WireRealmGetResolvedInfoResponse<'de> {
9151    pub resolved_info: ::fidl_next_fuchsia_component_resolution::WireComponent<'de>,
9152}
9153static_assertions::const_assert_eq!(
9154    std::mem::size_of::<WireRealmGetResolvedInfoResponse<'_>>(),
9155    16
9156);
9157static_assertions::const_assert_eq!(
9158    std::mem::align_of::<WireRealmGetResolvedInfoResponse<'_>>(),
9159    8
9160);
9161
9162static_assertions::const_assert_eq!(
9163    std::mem::offset_of!(WireRealmGetResolvedInfoResponse<'_>, resolved_info),
9164    0
9165);
9166
9167unsafe impl ::fidl_next::Wire for WireRealmGetResolvedInfoResponse<'static> {
9168    type Decoded<'de> = WireRealmGetResolvedInfoResponse<'de>;
9169
9170    #[inline]
9171    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
9172        ::fidl_next::munge! {
9173            let Self {
9174
9175                resolved_info,
9176
9177            } = &mut *out_;
9178        }
9179
9180        ::fidl_next::Wire::zero_padding(resolved_info);
9181    }
9182}
9183
9184unsafe impl<___D> ::fidl_next::Decode<___D> for WireRealmGetResolvedInfoResponse<'static>
9185where
9186    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9187    ___D: ::fidl_next::Decoder,
9188    ___D: ::fidl_next::fuchsia::HandleDecoder,
9189{
9190    fn decode(
9191        slot_: ::fidl_next::Slot<'_, Self>,
9192        decoder_: &mut ___D,
9193    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
9194        ::fidl_next::munge! {
9195            let Self {
9196
9197                mut resolved_info,
9198
9199            } = slot_;
9200        }
9201
9202        ::fidl_next::Decode::decode(resolved_info.as_mut(), decoder_)?;
9203
9204        Ok(())
9205    }
9206}
9207
9208/// The type corresponding to the Realm protocol.
9209#[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"]
9210#[derive(PartialEq, Debug)]
9211pub struct Realm;
9212
9213impl ::fidl_next::Discoverable for Realm {
9214    const PROTOCOL_NAME: &'static str = "fuchsia.component.Realm";
9215}
9216
9217pub mod realm {
9218    pub mod prelude {
9219        pub use crate::{Realm, RealmClientHandler, RealmServerHandler, realm};
9220
9221        pub use crate::Error;
9222
9223        pub use crate::RealmCreateChildRequest;
9224
9225        pub use crate::RealmDestroyChildRequest;
9226
9227        pub use crate::RealmGetChildOutputDictionaryRequest;
9228
9229        pub use crate::RealmListChildrenRequest;
9230
9231        pub use crate::RealmOpenControllerRequest;
9232
9233        pub use crate::RealmOpenExposedDirRequest;
9234
9235        pub use crate::RealmCreateChildResponse;
9236
9237        pub use crate::RealmDestroyChildResponse;
9238
9239        pub use crate::RealmGetChildOutputDictionaryResponse;
9240
9241        pub use crate::RealmGetResolvedInfoResponse;
9242
9243        pub use crate::RealmListChildrenResponse;
9244
9245        pub use crate::RealmOpenControllerResponse;
9246
9247        pub use crate::RealmOpenExposedDirResponse;
9248    }
9249
9250    pub struct OpenController;
9251
9252    impl ::fidl_next::Method for OpenController {
9253        const ORDINAL: u64 = 8165227925828473216;
9254
9255        type Protocol = crate::Realm;
9256
9257        type Request = crate::WireRealmOpenControllerRequest<'static>;
9258
9259        type Response = ::fidl_next::WireResult<
9260            'static,
9261            crate::WireRealmOpenControllerResponse,
9262            crate::WireError,
9263        >;
9264    }
9265
9266    pub struct OpenExposedDir;
9267
9268    impl ::fidl_next::Method for OpenExposedDir {
9269        const ORDINAL: u64 = 9194435320863127852;
9270
9271        type Protocol = crate::Realm;
9272
9273        type Request = crate::WireRealmOpenExposedDirRequest<'static>;
9274
9275        type Response = ::fidl_next::WireResult<
9276            'static,
9277            crate::WireRealmOpenExposedDirResponse,
9278            crate::WireError,
9279        >;
9280    }
9281
9282    pub struct CreateChild;
9283
9284    impl ::fidl_next::Method for CreateChild {
9285        const ORDINAL: u64 = 4892190024503489888;
9286
9287        type Protocol = crate::Realm;
9288
9289        type Request = crate::WireRealmCreateChildRequest<'static>;
9290
9291        type Response =
9292            ::fidl_next::WireResult<'static, crate::WireRealmCreateChildResponse, crate::WireError>;
9293    }
9294
9295    pub struct DestroyChild;
9296
9297    impl ::fidl_next::Method for DestroyChild {
9298        const ORDINAL: u64 = 8203529889988252194;
9299
9300        type Protocol = crate::Realm;
9301
9302        type Request = crate::WireRealmDestroyChildRequest<'static>;
9303
9304        type Response = ::fidl_next::WireResult<
9305            'static,
9306            crate::WireRealmDestroyChildResponse,
9307            crate::WireError,
9308        >;
9309    }
9310
9311    pub struct ListChildren;
9312
9313    impl ::fidl_next::Method for ListChildren {
9314        const ORDINAL: u64 = 7532454435519185057;
9315
9316        type Protocol = crate::Realm;
9317
9318        type Request = crate::WireRealmListChildrenRequest<'static>;
9319
9320        type Response = ::fidl_next::WireResult<
9321            'static,
9322            crate::WireRealmListChildrenResponse,
9323            crate::WireError,
9324        >;
9325    }
9326
9327    pub struct GetResolvedInfo;
9328
9329    impl ::fidl_next::Method for GetResolvedInfo {
9330        const ORDINAL: u64 = 8308987710372188322;
9331
9332        type Protocol = crate::Realm;
9333
9334        type Request = ();
9335
9336        type Response = ::fidl_next::WireResult<
9337            'static,
9338            crate::WireRealmGetResolvedInfoResponse<'static>,
9339            crate::WireError,
9340        >;
9341    }
9342
9343    pub struct GetChildOutputDictionary;
9344
9345    impl ::fidl_next::Method for GetChildOutputDictionary {
9346        const ORDINAL: u64 = 4781081784078915088;
9347
9348        type Protocol = crate::Realm;
9349
9350        type Request = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
9351
9352        type Response = ::fidl_next::WireResult<
9353            'static,
9354            crate::WireRealmGetChildOutputDictionaryResponse,
9355            crate::WireError,
9356        >;
9357    }
9358
9359    mod ___detail {
9360
9361        pub struct OpenController<T0, T1> {
9362            child: T0,
9363
9364            controller: T1,
9365        }
9366
9367        impl<T0, T1> ::fidl_next::Encodable for OpenController<T0, T1>
9368        where
9369            T0: ::fidl_next::Encodable<
9370                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9371                >,
9372            T1: ::fidl_next::Encodable<
9373                    Encoded = ::fidl_next::ServerEnd<
9374                        crate::Controller,
9375                        ::fidl_next::fuchsia::WireChannel,
9376                    >,
9377                >,
9378        {
9379            type Encoded = crate::WireRealmOpenControllerRequest<'static>;
9380        }
9381
9382        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenController<T0, T1>
9383        where
9384            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9385            ___E: ::fidl_next::Encoder,
9386            ___E: ::fidl_next::fuchsia::HandleEncoder,
9387            T0: ::fidl_next::Encode<
9388                    ___E,
9389                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9390                >,
9391            T1: ::fidl_next::Encode<
9392                    ___E,
9393                    Encoded = ::fidl_next::ServerEnd<
9394                        crate::Controller,
9395                        ::fidl_next::fuchsia::WireChannel,
9396                    >,
9397                >,
9398        {
9399            #[inline]
9400            fn encode(
9401                self,
9402                encoder_: &mut ___E,
9403                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9404            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9405                ::fidl_next::munge! {
9406                    let Self::Encoded {
9407                        child,
9408                        controller,
9409
9410                    } = out_;
9411                }
9412
9413                ::fidl_next::Encode::encode(self.child, encoder_, child)?;
9414
9415                ::fidl_next::Encode::encode(self.controller, encoder_, controller)?;
9416
9417                Ok(())
9418            }
9419        }
9420
9421        pub struct OpenExposedDir<T0, T1> {
9422            child: T0,
9423
9424            exposed_dir: T1,
9425        }
9426
9427        impl<T0, T1> ::fidl_next::Encodable for OpenExposedDir<T0, T1>
9428        where
9429            T0: ::fidl_next::Encodable<
9430                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9431                >,
9432            T1: ::fidl_next::Encodable<
9433                    Encoded = ::fidl_next::ServerEnd<
9434                        ::fidl_next_fuchsia_io::Directory,
9435                        ::fidl_next::fuchsia::WireChannel,
9436                    >,
9437                >,
9438        {
9439            type Encoded = crate::WireRealmOpenExposedDirRequest<'static>;
9440        }
9441
9442        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenExposedDir<T0, T1>
9443        where
9444            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9445            ___E: ::fidl_next::Encoder,
9446            ___E: ::fidl_next::fuchsia::HandleEncoder,
9447            T0: ::fidl_next::Encode<
9448                    ___E,
9449                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9450                >,
9451            T1: ::fidl_next::Encode<
9452                    ___E,
9453                    Encoded = ::fidl_next::ServerEnd<
9454                        ::fidl_next_fuchsia_io::Directory,
9455                        ::fidl_next::fuchsia::WireChannel,
9456                    >,
9457                >,
9458        {
9459            #[inline]
9460            fn encode(
9461                self,
9462                encoder_: &mut ___E,
9463                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9464            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9465                ::fidl_next::munge! {
9466                    let Self::Encoded {
9467                        child,
9468                        exposed_dir,
9469
9470                    } = out_;
9471                }
9472
9473                ::fidl_next::Encode::encode(self.child, encoder_, child)?;
9474
9475                ::fidl_next::Encode::encode(self.exposed_dir, encoder_, exposed_dir)?;
9476
9477                Ok(())
9478            }
9479        }
9480
9481        pub struct CreateChild<T0, T1, T2> {
9482            collection: T0,
9483
9484            decl: T1,
9485
9486            args: T2,
9487        }
9488
9489        impl<T0, T1, T2> ::fidl_next::Encodable for CreateChild<T0, T1, T2>
9490        where
9491            T0: ::fidl_next::Encodable<
9492                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9493                >,
9494            T1: ::fidl_next::Encodable<
9495                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9496                >,
9497            T2: ::fidl_next::Encodable<Encoded = crate::WireCreateChildArgs<'static>>,
9498        {
9499            type Encoded = crate::WireRealmCreateChildRequest<'static>;
9500        }
9501
9502        unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for CreateChild<T0, T1, T2>
9503        where
9504            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9505            ___E: ::fidl_next::Encoder,
9506            ___E: ::fidl_next::fuchsia::HandleEncoder,
9507            T0: ::fidl_next::Encode<
9508                    ___E,
9509                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9510                >,
9511            T1: ::fidl_next::Encode<
9512                    ___E,
9513                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9514                >,
9515            T2: ::fidl_next::Encode<___E, Encoded = crate::WireCreateChildArgs<'static>>,
9516        {
9517            #[inline]
9518            fn encode(
9519                self,
9520                encoder_: &mut ___E,
9521                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9522            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9523                ::fidl_next::munge! {
9524                    let Self::Encoded {
9525                        collection,
9526                        decl,
9527                        args,
9528
9529                    } = out_;
9530                }
9531
9532                ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
9533
9534                ::fidl_next::Encode::encode(self.decl, encoder_, decl)?;
9535
9536                ::fidl_next::Encode::encode(self.args, encoder_, args)?;
9537
9538                Ok(())
9539            }
9540        }
9541
9542        pub struct DestroyChild<T0> {
9543            child: T0,
9544        }
9545
9546        impl<T0> ::fidl_next::Encodable for DestroyChild<T0>
9547        where
9548            T0: ::fidl_next::Encodable<
9549                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9550                >,
9551        {
9552            type Encoded = crate::WireRealmDestroyChildRequest<'static>;
9553        }
9554
9555        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DestroyChild<T0>
9556        where
9557            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9558            ___E: ::fidl_next::Encoder,
9559            T0: ::fidl_next::Encode<
9560                    ___E,
9561                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9562                >,
9563        {
9564            #[inline]
9565            fn encode(
9566                self,
9567                encoder_: &mut ___E,
9568                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9569            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9570                ::fidl_next::munge! {
9571                    let Self::Encoded {
9572                        child,
9573
9574                    } = out_;
9575                }
9576
9577                ::fidl_next::Encode::encode(self.child, encoder_, child)?;
9578
9579                Ok(())
9580            }
9581        }
9582
9583        pub struct ListChildren<T0, T1> {
9584            collection: T0,
9585
9586            iter: T1,
9587        }
9588
9589        impl<T0, T1> ::fidl_next::Encodable for ListChildren<T0, T1>
9590        where
9591            T0: ::fidl_next::Encodable<
9592                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9593                >,
9594            T1: ::fidl_next::Encodable<
9595                    Encoded = ::fidl_next::ServerEnd<
9596                        crate::ChildIterator,
9597                        ::fidl_next::fuchsia::WireChannel,
9598                    >,
9599                >,
9600        {
9601            type Encoded = crate::WireRealmListChildrenRequest<'static>;
9602        }
9603
9604        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListChildren<T0, T1>
9605        where
9606            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9607            ___E: ::fidl_next::Encoder,
9608            ___E: ::fidl_next::fuchsia::HandleEncoder,
9609            T0: ::fidl_next::Encode<
9610                    ___E,
9611                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9612                >,
9613            T1: ::fidl_next::Encode<
9614                    ___E,
9615                    Encoded = ::fidl_next::ServerEnd<
9616                        crate::ChildIterator,
9617                        ::fidl_next::fuchsia::WireChannel,
9618                    >,
9619                >,
9620        {
9621            #[inline]
9622            fn encode(
9623                self,
9624                encoder_: &mut ___E,
9625                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9626            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9627                ::fidl_next::munge! {
9628                    let Self::Encoded {
9629                        collection,
9630                        iter,
9631
9632                    } = out_;
9633                }
9634
9635                ::fidl_next::Encode::encode(self.collection, encoder_, collection)?;
9636
9637                ::fidl_next::Encode::encode(self.iter, encoder_, iter)?;
9638
9639                Ok(())
9640            }
9641        }
9642
9643        pub struct GetChildOutputDictionary<T0> {
9644            child: T0,
9645        }
9646
9647        impl<T0> ::fidl_next::Encodable for GetChildOutputDictionary<T0>
9648        where
9649            T0: ::fidl_next::Encodable<
9650                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9651                >,
9652        {
9653            type Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>;
9654        }
9655
9656        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for GetChildOutputDictionary<T0>
9657        where
9658            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9659            ___E: ::fidl_next::Encoder,
9660            ___E: ::fidl_next::fuchsia::HandleEncoder,
9661            T0: ::fidl_next::Encode<
9662                    ___E,
9663                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9664                >,
9665        {
9666            #[inline]
9667            fn encode(
9668                self,
9669                encoder_: &mut ___E,
9670                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9671            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
9672                ::fidl_next::munge! {
9673                    let Self::Encoded {
9674                        child,
9675
9676                    } = out_;
9677                }
9678
9679                ::fidl_next::Encode::encode(self.child, encoder_, child)?;
9680
9681                Ok(())
9682            }
9683        }
9684
9685        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Realm
9686        where
9687            ___T: ::fidl_next::Transport,
9688        {
9689            type Client = RealmClient<___T>;
9690            type Server = RealmServer<___T>;
9691        }
9692
9693        /// The client for the `Realm` protocol.
9694        #[repr(transparent)]
9695        pub struct RealmClient<___T: ::fidl_next::Transport> {
9696            #[allow(dead_code)]
9697            client: ::fidl_next::protocol::Client<___T>,
9698        }
9699
9700        impl<___T> RealmClient<___T>
9701        where
9702            ___T: ::fidl_next::Transport,
9703        {
9704            #[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"]
9705            pub fn open_controller(
9706                &self,
9707
9708                child: impl ::fidl_next::Encode<
9709                    <___T as ::fidl_next::Transport>::SendBuffer,
9710                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9711                >,
9712
9713                controller: impl ::fidl_next::Encode<
9714                    <___T as ::fidl_next::Transport>::SendBuffer,
9715                    Encoded = ::fidl_next::ServerEnd<
9716                        crate::Controller,
9717                        ::fidl_next::fuchsia::WireChannel,
9718                    >,
9719                >,
9720            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
9721            where
9722                <___T as ::fidl_next::Transport>::SendBuffer:
9723                    ::fidl_next::encoder::InternalHandleEncoder,
9724                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9725                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9726            {
9727                self.open_controller_with(OpenController { child, controller })
9728            }
9729
9730            #[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"]
9731            pub fn open_controller_with<___R>(
9732                &self,
9733                request: ___R,
9734            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenController, ___T>
9735            where
9736                ___R: ::fidl_next::Encode<
9737                        <___T as ::fidl_next::Transport>::SendBuffer,
9738                        Encoded = crate::WireRealmOpenControllerRequest<'static>,
9739                    >,
9740            {
9741                ::fidl_next::TwoWayFuture::from_untyped(
9742                    self.client.send_two_way(8165227925828473216, request),
9743                )
9744            }
9745
9746            #[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"]
9747            pub fn open_exposed_dir(
9748                &self,
9749
9750                child: impl ::fidl_next::Encode<
9751                    <___T as ::fidl_next::Transport>::SendBuffer,
9752                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9753                >,
9754
9755                exposed_dir: impl ::fidl_next::Encode<
9756                    <___T as ::fidl_next::Transport>::SendBuffer,
9757                    Encoded = ::fidl_next::ServerEnd<
9758                        ::fidl_next_fuchsia_io::Directory,
9759                        ::fidl_next::fuchsia::WireChannel,
9760                    >,
9761                >,
9762            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
9763            where
9764                <___T as ::fidl_next::Transport>::SendBuffer:
9765                    ::fidl_next::encoder::InternalHandleEncoder,
9766                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9767                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9768            {
9769                self.open_exposed_dir_with(OpenExposedDir { child, exposed_dir })
9770            }
9771
9772            #[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"]
9773            pub fn open_exposed_dir_with<___R>(
9774                &self,
9775                request: ___R,
9776            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenExposedDir, ___T>
9777            where
9778                ___R: ::fidl_next::Encode<
9779                        <___T as ::fidl_next::Transport>::SendBuffer,
9780                        Encoded = crate::WireRealmOpenExposedDirRequest<'static>,
9781                    >,
9782            {
9783                ::fidl_next::TwoWayFuture::from_untyped(
9784                    self.client.send_two_way(9194435320863127852, request),
9785                )
9786            }
9787
9788            #[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"]
9789            pub fn create_child(
9790                &self,
9791
9792                collection: impl ::fidl_next::Encode<
9793                    <___T as ::fidl_next::Transport>::SendBuffer,
9794                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9795                >,
9796
9797                decl: impl ::fidl_next::Encode<
9798                    <___T as ::fidl_next::Transport>::SendBuffer,
9799                    Encoded = ::fidl_next_fuchsia_component_decl::WireChild<'static>,
9800                >,
9801
9802                args: impl ::fidl_next::Encode<
9803                    <___T as ::fidl_next::Transport>::SendBuffer,
9804                    Encoded = crate::WireCreateChildArgs<'static>,
9805                >,
9806            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
9807            where
9808                <___T as ::fidl_next::Transport>::SendBuffer:
9809                    ::fidl_next::encoder::InternalHandleEncoder,
9810                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9811                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9812            {
9813                self.create_child_with(CreateChild { collection, decl, args })
9814            }
9815
9816            #[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"]
9817            pub fn create_child_with<___R>(
9818                &self,
9819                request: ___R,
9820            ) -> ::fidl_next::TwoWayFuture<'_, super::CreateChild, ___T>
9821            where
9822                ___R: ::fidl_next::Encode<
9823                        <___T as ::fidl_next::Transport>::SendBuffer,
9824                        Encoded = crate::WireRealmCreateChildRequest<'static>,
9825                    >,
9826            {
9827                ::fidl_next::TwoWayFuture::from_untyped(
9828                    self.client.send_two_way(4892190024503489888, request),
9829                )
9830            }
9831
9832            #[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"]
9833            pub fn destroy_child(
9834                &self,
9835
9836                child: impl ::fidl_next::Encode<
9837                    <___T as ::fidl_next::Transport>::SendBuffer,
9838                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9839                >,
9840            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
9841            where
9842                <___T as ::fidl_next::Transport>::SendBuffer:
9843                    ::fidl_next::encoder::InternalHandleEncoder,
9844                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9845            {
9846                self.destroy_child_with(DestroyChild { child })
9847            }
9848
9849            #[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"]
9850            pub fn destroy_child_with<___R>(
9851                &self,
9852                request: ___R,
9853            ) -> ::fidl_next::TwoWayFuture<'_, super::DestroyChild, ___T>
9854            where
9855                ___R: ::fidl_next::Encode<
9856                        <___T as ::fidl_next::Transport>::SendBuffer,
9857                        Encoded = crate::WireRealmDestroyChildRequest<'static>,
9858                    >,
9859            {
9860                ::fidl_next::TwoWayFuture::from_untyped(
9861                    self.client.send_two_way(8203529889988252194, request),
9862                )
9863            }
9864
9865            #[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"]
9866            pub fn list_children(
9867                &self,
9868
9869                collection: impl ::fidl_next::Encode<
9870                    <___T as ::fidl_next::Transport>::SendBuffer,
9871                    Encoded = ::fidl_next_fuchsia_component_decl::WireCollectionRef<'static>,
9872                >,
9873
9874                iter: impl ::fidl_next::Encode<
9875                    <___T as ::fidl_next::Transport>::SendBuffer,
9876                    Encoded = ::fidl_next::ServerEnd<
9877                        crate::ChildIterator,
9878                        ::fidl_next::fuchsia::WireChannel,
9879                    >,
9880                >,
9881            ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
9882            where
9883                <___T as ::fidl_next::Transport>::SendBuffer:
9884                    ::fidl_next::encoder::InternalHandleEncoder,
9885                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9886                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9887            {
9888                self.list_children_with(ListChildren { collection, iter })
9889            }
9890
9891            #[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"]
9892            pub fn list_children_with<___R>(
9893                &self,
9894                request: ___R,
9895            ) -> ::fidl_next::TwoWayFuture<'_, super::ListChildren, ___T>
9896            where
9897                ___R: ::fidl_next::Encode<
9898                        <___T as ::fidl_next::Transport>::SendBuffer,
9899                        Encoded = crate::WireRealmListChildrenRequest<'static>,
9900                    >,
9901            {
9902                ::fidl_next::TwoWayFuture::from_untyped(
9903                    self.client.send_two_way(7532454435519185057, request),
9904                )
9905            }
9906
9907            #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
9908            pub fn get_resolved_info(
9909                &self,
9910            ) -> ::fidl_next::TwoWayFuture<'_, super::GetResolvedInfo, ___T> {
9911                ::fidl_next::TwoWayFuture::from_untyped(
9912                    self.client.send_two_way(8308987710372188322, ()),
9913                )
9914            }
9915
9916            pub fn get_child_output_dictionary(
9917                &self,
9918
9919                child: impl ::fidl_next::Encode<
9920                    <___T as ::fidl_next::Transport>::SendBuffer,
9921                    Encoded = ::fidl_next_fuchsia_component_decl::WireChildRef<'static>,
9922                >,
9923            ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
9924            where
9925                <___T as ::fidl_next::Transport>::SendBuffer:
9926                    ::fidl_next::encoder::InternalHandleEncoder,
9927                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
9928                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
9929            {
9930                self.get_child_output_dictionary_with(GetChildOutputDictionary { child })
9931            }
9932
9933            pub fn get_child_output_dictionary_with<___R>(
9934                &self,
9935                request: ___R,
9936            ) -> ::fidl_next::TwoWayFuture<'_, super::GetChildOutputDictionary, ___T>
9937            where
9938                ___R: ::fidl_next::Encode<
9939                        <___T as ::fidl_next::Transport>::SendBuffer,
9940                        Encoded = crate::WireRealmGetChildOutputDictionaryRequest<'static>,
9941                    >,
9942            {
9943                ::fidl_next::TwoWayFuture::from_untyped(
9944                    self.client.send_two_way(4781081784078915088, request),
9945                )
9946            }
9947        }
9948
9949        /// The server for the `Realm` protocol.
9950        #[repr(transparent)]
9951        pub struct RealmServer<___T: ::fidl_next::Transport> {
9952            server: ::fidl_next::protocol::Server<___T>,
9953        }
9954
9955        impl<___T> RealmServer<___T> where ___T: ::fidl_next::Transport {}
9956    }
9957}
9958
9959/// A client handler for the Realm protocol.
9960///
9961/// See [`Realm`] for more details.
9962pub trait RealmClientHandler<
9963    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9964    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9965>
9966{
9967}
9968
9969impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Realm
9970where
9971    ___H: RealmClientHandler<___T> + ::core::marker::Send,
9972    ___T: ::fidl_next::Transport,
9973    <realm::OpenController as ::fidl_next::Method>::Response:
9974        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9975    <realm::OpenExposedDir as ::fidl_next::Method>::Response:
9976        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9977    <realm::CreateChild as ::fidl_next::Method>::Response:
9978        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9979    <realm::DestroyChild as ::fidl_next::Method>::Response:
9980        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9981    <realm::ListChildren as ::fidl_next::Method>::Response:
9982        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9983    <realm::GetResolvedInfo as ::fidl_next::Method>::Response:
9984        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9985    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Response:
9986        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9987{
9988    async fn on_event(
9989        handler: &mut ___H,
9990        ordinal: u64,
9991        buffer: ___T::RecvBuffer,
9992    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
9993        match ordinal {
9994            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
9995        }
9996    }
9997}
9998
9999/// A server handler for the Realm protocol.
10000///
10001/// See [`Realm`] for more details.
10002pub trait RealmServerHandler<
10003    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10004    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10005>
10006{
10007    #[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"]
10008    fn open_controller(
10009        &mut self,
10010
10011        request: ::fidl_next::Request<realm::OpenController, ___T>,
10012
10013        responder: ::fidl_next::Responder<realm::OpenController, ___T>,
10014    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10015
10016    #[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"]
10017    fn open_exposed_dir(
10018        &mut self,
10019
10020        request: ::fidl_next::Request<realm::OpenExposedDir, ___T>,
10021
10022        responder: ::fidl_next::Responder<realm::OpenExposedDir, ___T>,
10023    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10024
10025    #[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"]
10026    fn create_child(
10027        &mut self,
10028
10029        request: ::fidl_next::Request<realm::CreateChild, ___T>,
10030
10031        responder: ::fidl_next::Responder<realm::CreateChild, ___T>,
10032    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10033
10034    #[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"]
10035    fn destroy_child(
10036        &mut self,
10037
10038        request: ::fidl_next::Request<realm::DestroyChild, ___T>,
10039
10040        responder: ::fidl_next::Responder<realm::DestroyChild, ___T>,
10041    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10042
10043    #[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"]
10044    fn list_children(
10045        &mut self,
10046
10047        request: ::fidl_next::Request<realm::ListChildren, ___T>,
10048
10049        responder: ::fidl_next::Responder<realm::ListChildren, ___T>,
10050    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10051
10052    #[doc = " Returns the set of information that was given to the component framework\n by this component\'s resolver.\n"]
10053    fn get_resolved_info(
10054        &mut self,
10055
10056        responder: ::fidl_next::Responder<realm::GetResolvedInfo, ___T>,
10057    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10058
10059    fn get_child_output_dictionary(
10060        &mut self,
10061
10062        request: ::fidl_next::Request<realm::GetChildOutputDictionary, ___T>,
10063
10064        responder: ::fidl_next::Responder<realm::GetChildOutputDictionary, ___T>,
10065    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10066}
10067
10068impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Realm
10069where
10070    ___H: RealmServerHandler<___T> + ::core::marker::Send,
10071    ___T: ::fidl_next::Transport,
10072    <realm::OpenController as ::fidl_next::Method>::Request:
10073        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10074    <realm::OpenExposedDir as ::fidl_next::Method>::Request:
10075        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10076    <realm::CreateChild as ::fidl_next::Method>::Request:
10077        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10078    <realm::DestroyChild as ::fidl_next::Method>::Request:
10079        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10080    <realm::ListChildren as ::fidl_next::Method>::Request:
10081        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10082    <realm::GetChildOutputDictionary as ::fidl_next::Method>::Request:
10083        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10084{
10085    async fn on_one_way(
10086        handler: &mut ___H,
10087        ordinal: u64,
10088        buffer: ___T::RecvBuffer,
10089    ) -> ::core::result::Result<
10090        (),
10091        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10092    > {
10093        match ordinal {
10094            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
10095        }
10096    }
10097
10098    async fn on_two_way(
10099        handler: &mut ___H,
10100        ordinal: u64,
10101        buffer: ___T::RecvBuffer,
10102        responder: ::fidl_next::protocol::Responder<___T>,
10103    ) -> ::core::result::Result<
10104        (),
10105        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
10106    > {
10107        match ordinal {
10108            8165227925828473216 => {
10109                let responder = ::fidl_next::Responder::from_untyped(responder);
10110
10111                match ::fidl_next::DecoderExt::decode(buffer) {
10112                    Ok(decoded) => {
10113                        handler.open_controller(decoded, responder).await;
10114                        Ok(())
10115                    }
10116                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10117                        ordinal: 8165227925828473216,
10118                        error,
10119                    }),
10120                }
10121            }
10122
10123            9194435320863127852 => {
10124                let responder = ::fidl_next::Responder::from_untyped(responder);
10125
10126                match ::fidl_next::DecoderExt::decode(buffer) {
10127                    Ok(decoded) => {
10128                        handler.open_exposed_dir(decoded, responder).await;
10129                        Ok(())
10130                    }
10131                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10132                        ordinal: 9194435320863127852,
10133                        error,
10134                    }),
10135                }
10136            }
10137
10138            4892190024503489888 => {
10139                let responder = ::fidl_next::Responder::from_untyped(responder);
10140
10141                match ::fidl_next::DecoderExt::decode(buffer) {
10142                    Ok(decoded) => {
10143                        handler.create_child(decoded, responder).await;
10144                        Ok(())
10145                    }
10146                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10147                        ordinal: 4892190024503489888,
10148                        error,
10149                    }),
10150                }
10151            }
10152
10153            8203529889988252194 => {
10154                let responder = ::fidl_next::Responder::from_untyped(responder);
10155
10156                match ::fidl_next::DecoderExt::decode(buffer) {
10157                    Ok(decoded) => {
10158                        handler.destroy_child(decoded, responder).await;
10159                        Ok(())
10160                    }
10161                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10162                        ordinal: 8203529889988252194,
10163                        error,
10164                    }),
10165                }
10166            }
10167
10168            7532454435519185057 => {
10169                let responder = ::fidl_next::Responder::from_untyped(responder);
10170
10171                match ::fidl_next::DecoderExt::decode(buffer) {
10172                    Ok(decoded) => {
10173                        handler.list_children(decoded, responder).await;
10174                        Ok(())
10175                    }
10176                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10177                        ordinal: 7532454435519185057,
10178                        error,
10179                    }),
10180                }
10181            }
10182
10183            8308987710372188322 => {
10184                let responder = ::fidl_next::Responder::from_untyped(responder);
10185
10186                handler.get_resolved_info(responder).await;
10187                Ok(())
10188            }
10189
10190            4781081784078915088 => {
10191                let responder = ::fidl_next::Responder::from_untyped(responder);
10192
10193                match ::fidl_next::DecoderExt::decode(buffer) {
10194                    Ok(decoded) => {
10195                        handler.get_child_output_dictionary(decoded, responder).await;
10196                        Ok(())
10197                    }
10198                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
10199                        ordinal: 4781081784078915088,
10200                        error,
10201                    }),
10202                }
10203            }
10204
10205            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
10206        }
10207    }
10208}
10209
10210#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10211#[repr(u32)]
10212pub enum StatusError {
10213    Provider = 1,
10214    ResponseInvalid = 2,
10215    StatusUnknown = 3,
10216    Unsupported = 4,
10217}
10218
10219impl ::fidl_next::Encodable for StatusError {
10220    type Encoded = WireStatusError;
10221}
10222impl ::core::convert::TryFrom<u32> for StatusError {
10223    type Error = ::fidl_next::UnknownStrictEnumMemberError;
10224    fn try_from(
10225        value: u32,
10226    ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
10227        match value {
10228            1 => Ok(Self::Provider),
10229            2 => Ok(Self::ResponseInvalid),
10230            3 => Ok(Self::StatusUnknown),
10231            4 => Ok(Self::Unsupported),
10232
10233            _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
10234        }
10235    }
10236}
10237
10238unsafe impl<___E> ::fidl_next::Encode<___E> for StatusError
10239where
10240    ___E: ?Sized,
10241{
10242    #[inline]
10243    fn encode(
10244        self,
10245        encoder: &mut ___E,
10246        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10247    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10248        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
10249    }
10250}
10251
10252unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StatusError
10253where
10254    ___E: ?Sized,
10255{
10256    #[inline]
10257    fn encode_ref(
10258        &self,
10259        encoder: &mut ___E,
10260        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10261    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10262        ::fidl_next::munge!(let WireStatusError { value } = out);
10263        let _ = value.write(::fidl_next::WireU32::from(match *self {
10264            Self::Provider => 1,
10265
10266            Self::ResponseInvalid => 2,
10267
10268            Self::StatusUnknown => 3,
10269
10270            Self::Unsupported => 4,
10271        }));
10272
10273        Ok(())
10274    }
10275}
10276
10277impl ::core::convert::From<WireStatusError> for StatusError {
10278    fn from(wire: WireStatusError) -> Self {
10279        match u32::from(wire.value) {
10280            1 => Self::Provider,
10281
10282            2 => Self::ResponseInvalid,
10283
10284            3 => Self::StatusUnknown,
10285
10286            4 => Self::Unsupported,
10287
10288            _ => unsafe { ::core::hint::unreachable_unchecked() },
10289        }
10290    }
10291}
10292
10293impl ::fidl_next::FromWire<WireStatusError> for StatusError {
10294    #[inline]
10295    fn from_wire(wire: WireStatusError) -> Self {
10296        Self::from(wire)
10297    }
10298}
10299
10300impl ::fidl_next::IntoNatural for WireStatusError {
10301    type Natural = StatusError;
10302}
10303
10304impl ::fidl_next::FromWireRef<WireStatusError> for StatusError {
10305    #[inline]
10306    fn from_wire_ref(wire: &WireStatusError) -> Self {
10307        Self::from(*wire)
10308    }
10309}
10310
10311/// The wire type corresponding to [`StatusError`].
10312#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10313#[repr(transparent)]
10314pub struct WireStatusError {
10315    value: ::fidl_next::WireU32,
10316}
10317
10318unsafe impl ::fidl_next::Wire for WireStatusError {
10319    type Decoded<'de> = Self;
10320
10321    #[inline]
10322    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10323        // Wire enums have no padding
10324    }
10325}
10326
10327impl WireStatusError {
10328    pub const PROVIDER: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(1) };
10329
10330    pub const RESPONSE_INVALID: WireStatusError =
10331        WireStatusError { value: ::fidl_next::WireU32(2) };
10332
10333    pub const STATUS_UNKNOWN: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(3) };
10334
10335    pub const UNSUPPORTED: WireStatusError = WireStatusError { value: ::fidl_next::WireU32(4) };
10336}
10337
10338unsafe impl<___D> ::fidl_next::Decode<___D> for WireStatusError
10339where
10340    ___D: ?Sized,
10341{
10342    fn decode(
10343        slot: ::fidl_next::Slot<'_, Self>,
10344        _: &mut ___D,
10345    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10346        ::fidl_next::munge!(let Self { value } = slot);
10347
10348        match u32::from(*value) {
10349            1 | 2 | 3 | 4 => (),
10350            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
10351        }
10352
10353        Ok(())
10354    }
10355}
10356
10357impl ::core::convert::From<StatusError> for WireStatusError {
10358    fn from(natural: StatusError) -> Self {
10359        match natural {
10360            StatusError::Provider => WireStatusError::PROVIDER,
10361
10362            StatusError::ResponseInvalid => WireStatusError::RESPONSE_INVALID,
10363
10364            StatusError::StatusUnknown => WireStatusError::STATUS_UNKNOWN,
10365
10366            StatusError::Unsupported => WireStatusError::UNSUPPORTED,
10367        }
10368    }
10369}
10370
10371pub type StorageAdminOpenStorageResponse = ();
10372
10373/// The wire type corresponding to [`StorageAdminOpenStorageResponse`].
10374pub type WireStorageAdminOpenStorageResponse = ();
10375
10376#[derive(PartialEq, Debug)]
10377pub struct StorageAdminListStorageInRealmRequest {
10378    pub relative_moniker: ::std::string::String,
10379
10380    pub iterator: ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::zx::Channel>,
10381}
10382
10383impl ::fidl_next::Encodable for StorageAdminListStorageInRealmRequest {
10384    type Encoded = WireStorageAdminListStorageInRealmRequest<'static>;
10385}
10386
10387unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminListStorageInRealmRequest
10388where
10389    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10390    ___E: ::fidl_next::Encoder,
10391    ___E: ::fidl_next::fuchsia::HandleEncoder,
10392{
10393    #[inline]
10394    fn encode(
10395        self,
10396        encoder_: &mut ___E,
10397        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10398    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10399        ::fidl_next::munge! {
10400            let Self::Encoded {
10401                relative_moniker,
10402                iterator,
10403
10404            } = out_;
10405        }
10406
10407        ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
10408
10409        ::fidl_next::Encode::encode(self.iterator, encoder_, iterator)?;
10410
10411        Ok(())
10412    }
10413}
10414
10415impl ::fidl_next::EncodableOption for StorageAdminListStorageInRealmRequest {
10416    type EncodedOption =
10417        ::fidl_next::WireBox<'static, WireStorageAdminListStorageInRealmRequest<'static>>;
10418}
10419
10420unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminListStorageInRealmRequest
10421where
10422    ___E: ::fidl_next::Encoder + ?Sized,
10423    StorageAdminListStorageInRealmRequest: ::fidl_next::Encode<___E>,
10424{
10425    #[inline]
10426    fn encode_option(
10427        this: ::core::option::Option<Self>,
10428        encoder: &mut ___E,
10429        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10430    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10431        if let Some(inner) = this {
10432            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10433            ::fidl_next::WireBox::encode_present(out);
10434        } else {
10435            ::fidl_next::WireBox::encode_absent(out);
10436        }
10437
10438        Ok(())
10439    }
10440}
10441
10442impl<'de> ::fidl_next::FromWire<WireStorageAdminListStorageInRealmRequest<'de>>
10443    for StorageAdminListStorageInRealmRequest
10444{
10445    #[inline]
10446    fn from_wire(wire: WireStorageAdminListStorageInRealmRequest<'de>) -> Self {
10447        Self {
10448            relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
10449
10450            iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
10451        }
10452    }
10453}
10454
10455impl<'de> ::fidl_next::IntoNatural for WireStorageAdminListStorageInRealmRequest<'de> {
10456    type Natural = StorageAdminListStorageInRealmRequest;
10457}
10458
10459/// The wire type corresponding to [`StorageAdminListStorageInRealmRequest`].
10460#[derive(Debug)]
10461#[repr(C)]
10462pub struct WireStorageAdminListStorageInRealmRequest<'de> {
10463    pub relative_moniker: ::fidl_next::WireString<'de>,
10464
10465    pub iterator: ::fidl_next::ServerEnd<crate::StorageIterator, ::fidl_next::fuchsia::WireChannel>,
10466}
10467static_assertions::const_assert_eq!(
10468    std::mem::size_of::<WireStorageAdminListStorageInRealmRequest<'_>>(),
10469    24
10470);
10471static_assertions::const_assert_eq!(
10472    std::mem::align_of::<WireStorageAdminListStorageInRealmRequest<'_>>(),
10473    8
10474);
10475
10476static_assertions::const_assert_eq!(
10477    std::mem::offset_of!(WireStorageAdminListStorageInRealmRequest<'_>, relative_moniker),
10478    0
10479);
10480
10481static_assertions::const_assert_eq!(
10482    std::mem::offset_of!(WireStorageAdminListStorageInRealmRequest<'_>, iterator),
10483    16
10484);
10485
10486unsafe impl ::fidl_next::Wire for WireStorageAdminListStorageInRealmRequest<'static> {
10487    type Decoded<'de> = WireStorageAdminListStorageInRealmRequest<'de>;
10488
10489    #[inline]
10490    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10491        ::fidl_next::munge! {
10492            let Self {
10493
10494                relative_moniker,
10495                iterator,
10496
10497            } = &mut *out_;
10498        }
10499
10500        ::fidl_next::Wire::zero_padding(relative_moniker);
10501
10502        ::fidl_next::Wire::zero_padding(iterator);
10503
10504        unsafe {
10505            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
10506        }
10507    }
10508}
10509
10510unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageAdminListStorageInRealmRequest<'static>
10511where
10512    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10513    ___D: ::fidl_next::Decoder,
10514    ___D: ::fidl_next::fuchsia::HandleDecoder,
10515{
10516    fn decode(
10517        slot_: ::fidl_next::Slot<'_, Self>,
10518        decoder_: &mut ___D,
10519    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10520        ::fidl_next::munge! {
10521            let Self {
10522
10523                mut relative_moniker,
10524                mut iterator,
10525
10526            } = slot_;
10527        }
10528
10529        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
10530
10531        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
10532
10533        if relative_moniker.len() > 4096 {
10534            return Err(::fidl_next::DecodeError::VectorTooLong {
10535                size: relative_moniker.len() as u64,
10536                limit: 4096,
10537            });
10538        }
10539
10540        ::fidl_next::Decode::decode(iterator.as_mut(), decoder_)?;
10541
10542        Ok(())
10543    }
10544}
10545
10546pub type StorageAdminListStorageInRealmResponse = ();
10547
10548/// The wire type corresponding to [`StorageAdminListStorageInRealmResponse`].
10549pub type WireStorageAdminListStorageInRealmResponse = ();
10550
10551pub type StorageAdminOpenComponentStorageByIdResponse = ();
10552
10553/// The wire type corresponding to [`StorageAdminOpenComponentStorageByIdResponse`].
10554pub type WireStorageAdminOpenComponentStorageByIdResponse = ();
10555
10556#[derive(PartialEq, Clone, Debug)]
10557pub struct StorageAdminDeleteComponentStorageRequest {
10558    pub relative_moniker: ::std::string::String,
10559}
10560
10561impl ::fidl_next::Encodable for StorageAdminDeleteComponentStorageRequest {
10562    type Encoded = WireStorageAdminDeleteComponentStorageRequest<'static>;
10563}
10564
10565unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminDeleteComponentStorageRequest
10566where
10567    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10568    ___E: ::fidl_next::Encoder,
10569{
10570    #[inline]
10571    fn encode(
10572        self,
10573        encoder_: &mut ___E,
10574        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10575    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10576        ::fidl_next::munge! {
10577            let Self::Encoded {
10578                relative_moniker,
10579
10580            } = out_;
10581        }
10582
10583        ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
10584
10585        Ok(())
10586    }
10587}
10588
10589unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageAdminDeleteComponentStorageRequest
10590where
10591    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10592    ___E: ::fidl_next::Encoder,
10593{
10594    #[inline]
10595    fn encode_ref(
10596        &self,
10597        encoder_: &mut ___E,
10598        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10599    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10600        ::fidl_next::munge! {
10601            let Self::Encoded {
10602
10603                relative_moniker,
10604
10605            } = out_;
10606        }
10607
10608        ::fidl_next::EncodeRef::encode_ref(&self.relative_moniker, encoder_, relative_moniker)?;
10609
10610        Ok(())
10611    }
10612}
10613
10614impl ::fidl_next::EncodableOption for StorageAdminDeleteComponentStorageRequest {
10615    type EncodedOption =
10616        ::fidl_next::WireBox<'static, WireStorageAdminDeleteComponentStorageRequest<'static>>;
10617}
10618
10619unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminDeleteComponentStorageRequest
10620where
10621    ___E: ::fidl_next::Encoder + ?Sized,
10622    StorageAdminDeleteComponentStorageRequest: ::fidl_next::Encode<___E>,
10623{
10624    #[inline]
10625    fn encode_option(
10626        this: ::core::option::Option<Self>,
10627        encoder: &mut ___E,
10628        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10629    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10630        if let Some(inner) = this {
10631            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10632            ::fidl_next::WireBox::encode_present(out);
10633        } else {
10634            ::fidl_next::WireBox::encode_absent(out);
10635        }
10636
10637        Ok(())
10638    }
10639}
10640
10641unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageAdminDeleteComponentStorageRequest
10642where
10643    ___E: ::fidl_next::Encoder + ?Sized,
10644    StorageAdminDeleteComponentStorageRequest: ::fidl_next::EncodeRef<___E>,
10645{
10646    #[inline]
10647    fn encode_option_ref(
10648        this: ::core::option::Option<&Self>,
10649        encoder: &mut ___E,
10650        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10651    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10652        if let Some(inner) = this {
10653            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10654            ::fidl_next::WireBox::encode_present(out);
10655        } else {
10656            ::fidl_next::WireBox::encode_absent(out);
10657        }
10658
10659        Ok(())
10660    }
10661}
10662
10663impl<'de> ::fidl_next::FromWire<WireStorageAdminDeleteComponentStorageRequest<'de>>
10664    for StorageAdminDeleteComponentStorageRequest
10665{
10666    #[inline]
10667    fn from_wire(wire: WireStorageAdminDeleteComponentStorageRequest<'de>) -> Self {
10668        Self { relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker) }
10669    }
10670}
10671
10672impl<'de> ::fidl_next::IntoNatural for WireStorageAdminDeleteComponentStorageRequest<'de> {
10673    type Natural = StorageAdminDeleteComponentStorageRequest;
10674}
10675
10676impl<'de> ::fidl_next::FromWireRef<WireStorageAdminDeleteComponentStorageRequest<'de>>
10677    for StorageAdminDeleteComponentStorageRequest
10678{
10679    #[inline]
10680    fn from_wire_ref(wire: &WireStorageAdminDeleteComponentStorageRequest<'de>) -> Self {
10681        Self { relative_moniker: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_moniker) }
10682    }
10683}
10684
10685/// The wire type corresponding to [`StorageAdminDeleteComponentStorageRequest`].
10686#[derive(Debug)]
10687#[repr(C)]
10688pub struct WireStorageAdminDeleteComponentStorageRequest<'de> {
10689    pub relative_moniker: ::fidl_next::WireString<'de>,
10690}
10691static_assertions::const_assert_eq!(
10692    std::mem::size_of::<WireStorageAdminDeleteComponentStorageRequest<'_>>(),
10693    16
10694);
10695static_assertions::const_assert_eq!(
10696    std::mem::align_of::<WireStorageAdminDeleteComponentStorageRequest<'_>>(),
10697    8
10698);
10699
10700static_assertions::const_assert_eq!(
10701    std::mem::offset_of!(WireStorageAdminDeleteComponentStorageRequest<'_>, relative_moniker),
10702    0
10703);
10704
10705unsafe impl ::fidl_next::Wire for WireStorageAdminDeleteComponentStorageRequest<'static> {
10706    type Decoded<'de> = WireStorageAdminDeleteComponentStorageRequest<'de>;
10707
10708    #[inline]
10709    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
10710        ::fidl_next::munge! {
10711            let Self {
10712
10713                relative_moniker,
10714
10715            } = &mut *out_;
10716        }
10717
10718        ::fidl_next::Wire::zero_padding(relative_moniker);
10719    }
10720}
10721
10722unsafe impl<___D> ::fidl_next::Decode<___D>
10723    for WireStorageAdminDeleteComponentStorageRequest<'static>
10724where
10725    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10726    ___D: ::fidl_next::Decoder,
10727{
10728    fn decode(
10729        slot_: ::fidl_next::Slot<'_, Self>,
10730        decoder_: &mut ___D,
10731    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10732        ::fidl_next::munge! {
10733            let Self {
10734
10735                mut relative_moniker,
10736
10737            } = slot_;
10738        }
10739
10740        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
10741
10742        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
10743
10744        if relative_moniker.len() > 4096 {
10745            return Err(::fidl_next::DecodeError::VectorTooLong {
10746                size: relative_moniker.len() as u64,
10747                limit: 4096,
10748            });
10749        }
10750
10751        Ok(())
10752    }
10753}
10754
10755pub type StorageAdminDeleteComponentStorageResponse = ();
10756
10757/// The wire type corresponding to [`StorageAdminDeleteComponentStorageResponse`].
10758pub type WireStorageAdminDeleteComponentStorageResponse = ();
10759
10760#[doc = " Metadata about status of the storage\n"]
10761#[derive(PartialEq, Clone, Debug, Default)]
10762pub struct StorageStatus {
10763    pub total_size: ::core::option::Option<u64>,
10764
10765    pub used_size: ::core::option::Option<u64>,
10766}
10767
10768impl StorageStatus {
10769    fn __max_ordinal(&self) -> usize {
10770        if self.used_size.is_some() {
10771            return 2;
10772        }
10773
10774        if self.total_size.is_some() {
10775            return 1;
10776        }
10777
10778        0
10779    }
10780}
10781
10782impl ::fidl_next::Encodable for StorageStatus {
10783    type Encoded = WireStorageStatus<'static>;
10784}
10785
10786unsafe impl<___E> ::fidl_next::Encode<___E> for StorageStatus
10787where
10788    ___E: ::fidl_next::Encoder + ?Sized,
10789{
10790    #[inline]
10791    fn encode(
10792        mut self,
10793        encoder: &mut ___E,
10794        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10795    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10796        ::fidl_next::munge!(let WireStorageStatus { table } = out);
10797
10798        let max_ord = self.__max_ordinal();
10799
10800        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10801        ::fidl_next::Wire::zero_padding(&mut out);
10802
10803        let mut preallocated =
10804            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10805
10806        for i in 1..=max_ord {
10807            match i {
10808                2 => {
10809                    if let Some(value) = self.used_size.take() {
10810                        ::fidl_next::WireEnvelope::encode_value(
10811                            value,
10812                            preallocated.encoder,
10813                            &mut out,
10814                        )?;
10815                    } else {
10816                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10817                    }
10818                }
10819
10820                1 => {
10821                    if let Some(value) = self.total_size.take() {
10822                        ::fidl_next::WireEnvelope::encode_value(
10823                            value,
10824                            preallocated.encoder,
10825                            &mut out,
10826                        )?;
10827                    } else {
10828                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10829                    }
10830                }
10831
10832                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10833            }
10834            unsafe {
10835                preallocated.write_next(out.assume_init_ref());
10836            }
10837        }
10838
10839        ::fidl_next::WireTable::encode_len(table, max_ord);
10840
10841        Ok(())
10842    }
10843}
10844
10845unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageStatus
10846where
10847    ___E: ::fidl_next::Encoder + ?Sized,
10848{
10849    #[inline]
10850    fn encode_ref(
10851        &self,
10852        encoder: &mut ___E,
10853        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10854    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
10855        ::fidl_next::munge!(let WireStorageStatus { table } = out);
10856
10857        let max_ord = self.__max_ordinal();
10858
10859        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
10860        ::fidl_next::Wire::zero_padding(&mut out);
10861
10862        let mut preallocated =
10863            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
10864
10865        for i in 1..=max_ord {
10866            match i {
10867                2 => {
10868                    if let Some(value) = &self.used_size {
10869                        ::fidl_next::WireEnvelope::encode_value(
10870                            value,
10871                            preallocated.encoder,
10872                            &mut out,
10873                        )?;
10874                    } else {
10875                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10876                    }
10877                }
10878
10879                1 => {
10880                    if let Some(value) = &self.total_size {
10881                        ::fidl_next::WireEnvelope::encode_value(
10882                            value,
10883                            preallocated.encoder,
10884                            &mut out,
10885                        )?;
10886                    } else {
10887                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
10888                    }
10889                }
10890
10891                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
10892            }
10893            unsafe {
10894                preallocated.write_next(out.assume_init_ref());
10895            }
10896        }
10897
10898        ::fidl_next::WireTable::encode_len(table, max_ord);
10899
10900        Ok(())
10901    }
10902}
10903
10904impl<'de> ::fidl_next::FromWire<WireStorageStatus<'de>> for StorageStatus {
10905    #[inline]
10906    fn from_wire(wire_: WireStorageStatus<'de>) -> Self {
10907        let wire_ = ::core::mem::ManuallyDrop::new(wire_);
10908
10909        let total_size = wire_.table.get(1);
10910
10911        let used_size = wire_.table.get(2);
10912
10913        Self {
10914            total_size: total_size.map(|envelope| {
10915                ::fidl_next::FromWire::from_wire(unsafe {
10916                    envelope.read_unchecked::<::fidl_next::WireU64>()
10917                })
10918            }),
10919
10920            used_size: used_size.map(|envelope| {
10921                ::fidl_next::FromWire::from_wire(unsafe {
10922                    envelope.read_unchecked::<::fidl_next::WireU64>()
10923                })
10924            }),
10925        }
10926    }
10927}
10928
10929impl<'de> ::fidl_next::IntoNatural for WireStorageStatus<'de> {
10930    type Natural = StorageStatus;
10931}
10932
10933impl<'de> ::fidl_next::FromWireRef<WireStorageStatus<'de>> for StorageStatus {
10934    #[inline]
10935    fn from_wire_ref(wire: &WireStorageStatus<'de>) -> Self {
10936        Self {
10937            total_size: wire.table.get(1).map(|envelope| {
10938                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10939                    envelope.deref_unchecked::<::fidl_next::WireU64>()
10940                })
10941            }),
10942
10943            used_size: wire.table.get(2).map(|envelope| {
10944                ::fidl_next::FromWireRef::from_wire_ref(unsafe {
10945                    envelope.deref_unchecked::<::fidl_next::WireU64>()
10946                })
10947            }),
10948        }
10949    }
10950}
10951
10952/// The wire type corresponding to [`StorageStatus`].
10953#[repr(C)]
10954pub struct WireStorageStatus<'de> {
10955    table: ::fidl_next::WireTable<'de>,
10956}
10957
10958impl<'de> Drop for WireStorageStatus<'de> {
10959    fn drop(&mut self) {
10960        let _ = self
10961            .table
10962            .get(1)
10963            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
10964
10965        let _ = self
10966            .table
10967            .get(2)
10968            .map(|envelope| unsafe { envelope.read_unchecked::<::fidl_next::WireU64>() });
10969    }
10970}
10971
10972unsafe impl ::fidl_next::Wire for WireStorageStatus<'static> {
10973    type Decoded<'de> = WireStorageStatus<'de>;
10974
10975    #[inline]
10976    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10977        ::fidl_next::munge!(let Self { table } = out);
10978        ::fidl_next::WireTable::zero_padding(table);
10979    }
10980}
10981
10982unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageStatus<'static>
10983where
10984    ___D: ::fidl_next::Decoder + ?Sized,
10985{
10986    fn decode(
10987        slot: ::fidl_next::Slot<'_, Self>,
10988        decoder: &mut ___D,
10989    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
10990        ::fidl_next::munge!(let Self { table } = slot);
10991
10992        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
10993            match ordinal {
10994                0 => unsafe { ::core::hint::unreachable_unchecked() },
10995
10996                1 => {
10997                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
10998                        slot.as_mut(),
10999                        decoder,
11000                    )?;
11001
11002                    Ok(())
11003                }
11004
11005                2 => {
11006                    ::fidl_next::WireEnvelope::decode_as::<___D, ::fidl_next::WireU64>(
11007                        slot.as_mut(),
11008                        decoder,
11009                    )?;
11010
11011                    Ok(())
11012                }
11013
11014                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
11015            }
11016        })
11017    }
11018}
11019
11020impl<'de> WireStorageStatus<'de> {
11021    pub fn total_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
11022        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
11023    }
11024
11025    pub fn used_size(&self) -> ::core::option::Option<&::fidl_next::WireU64> {
11026        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
11027    }
11028}
11029
11030impl<'de> ::core::fmt::Debug for WireStorageStatus<'de> {
11031    fn fmt(
11032        &self,
11033        f: &mut ::core::fmt::Formatter<'_>,
11034    ) -> ::core::result::Result<(), ::core::fmt::Error> {
11035        f.debug_struct("StorageStatus")
11036            .field("total_size", &self.total_size())
11037            .field("used_size", &self.used_size())
11038            .finish()
11039    }
11040}
11041
11042pub type StorageAdminDeleteAllStorageContentsResponse = ();
11043
11044/// The wire type corresponding to [`StorageAdminDeleteAllStorageContentsResponse`].
11045pub type WireStorageAdminDeleteAllStorageContentsResponse = ();
11046
11047#[derive(PartialEq, Debug)]
11048pub struct StorageAdminOpenStorageRequest {
11049    pub relative_moniker: ::std::string::String,
11050
11051    pub object:
11052        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
11053}
11054
11055impl ::fidl_next::Encodable for StorageAdminOpenStorageRequest {
11056    type Encoded = WireStorageAdminOpenStorageRequest<'static>;
11057}
11058
11059unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenStorageRequest
11060where
11061    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11062    ___E: ::fidl_next::Encoder,
11063    ___E: ::fidl_next::fuchsia::HandleEncoder,
11064{
11065    #[inline]
11066    fn encode(
11067        self,
11068        encoder_: &mut ___E,
11069        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11070    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11071        ::fidl_next::munge! {
11072            let Self::Encoded {
11073                relative_moniker,
11074                object,
11075
11076            } = out_;
11077        }
11078
11079        ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11080
11081        ::fidl_next::Encode::encode(self.object, encoder_, object)?;
11082
11083        Ok(())
11084    }
11085}
11086
11087impl ::fidl_next::EncodableOption for StorageAdminOpenStorageRequest {
11088    type EncodedOption = ::fidl_next::WireBox<'static, WireStorageAdminOpenStorageRequest<'static>>;
11089}
11090
11091unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenStorageRequest
11092where
11093    ___E: ::fidl_next::Encoder + ?Sized,
11094    StorageAdminOpenStorageRequest: ::fidl_next::Encode<___E>,
11095{
11096    #[inline]
11097    fn encode_option(
11098        this: ::core::option::Option<Self>,
11099        encoder: &mut ___E,
11100        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11101    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11102        if let Some(inner) = this {
11103            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11104            ::fidl_next::WireBox::encode_present(out);
11105        } else {
11106            ::fidl_next::WireBox::encode_absent(out);
11107        }
11108
11109        Ok(())
11110    }
11111}
11112
11113impl<'de> ::fidl_next::FromWire<WireStorageAdminOpenStorageRequest<'de>>
11114    for StorageAdminOpenStorageRequest
11115{
11116    #[inline]
11117    fn from_wire(wire: WireStorageAdminOpenStorageRequest<'de>) -> Self {
11118        Self {
11119            relative_moniker: ::fidl_next::FromWire::from_wire(wire.relative_moniker),
11120
11121            object: ::fidl_next::FromWire::from_wire(wire.object),
11122        }
11123    }
11124}
11125
11126impl<'de> ::fidl_next::IntoNatural for WireStorageAdminOpenStorageRequest<'de> {
11127    type Natural = StorageAdminOpenStorageRequest;
11128}
11129
11130/// The wire type corresponding to [`StorageAdminOpenStorageRequest`].
11131#[derive(Debug)]
11132#[repr(C)]
11133pub struct WireStorageAdminOpenStorageRequest<'de> {
11134    pub relative_moniker: ::fidl_next::WireString<'de>,
11135
11136    pub object:
11137        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
11138}
11139static_assertions::const_assert_eq!(
11140    std::mem::size_of::<WireStorageAdminOpenStorageRequest<'_>>(),
11141    24
11142);
11143static_assertions::const_assert_eq!(
11144    std::mem::align_of::<WireStorageAdminOpenStorageRequest<'_>>(),
11145    8
11146);
11147
11148static_assertions::const_assert_eq!(
11149    std::mem::offset_of!(WireStorageAdminOpenStorageRequest<'_>, relative_moniker),
11150    0
11151);
11152
11153static_assertions::const_assert_eq!(
11154    std::mem::offset_of!(WireStorageAdminOpenStorageRequest<'_>, object),
11155    16
11156);
11157
11158unsafe impl ::fidl_next::Wire for WireStorageAdminOpenStorageRequest<'static> {
11159    type Decoded<'de> = WireStorageAdminOpenStorageRequest<'de>;
11160
11161    #[inline]
11162    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11163        ::fidl_next::munge! {
11164            let Self {
11165
11166                relative_moniker,
11167                object,
11168
11169            } = &mut *out_;
11170        }
11171
11172        ::fidl_next::Wire::zero_padding(relative_moniker);
11173
11174        ::fidl_next::Wire::zero_padding(object);
11175
11176        unsafe {
11177            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
11178        }
11179    }
11180}
11181
11182unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageAdminOpenStorageRequest<'static>
11183where
11184    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11185    ___D: ::fidl_next::Decoder,
11186    ___D: ::fidl_next::fuchsia::HandleDecoder,
11187{
11188    fn decode(
11189        slot_: ::fidl_next::Slot<'_, Self>,
11190        decoder_: &mut ___D,
11191    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11192        ::fidl_next::munge! {
11193            let Self {
11194
11195                mut relative_moniker,
11196                mut object,
11197
11198            } = slot_;
11199        }
11200
11201        ::fidl_next::Decode::decode(relative_moniker.as_mut(), decoder_)?;
11202
11203        let relative_moniker = unsafe { relative_moniker.deref_unchecked() };
11204
11205        if relative_moniker.len() > 4096 {
11206            return Err(::fidl_next::DecodeError::VectorTooLong {
11207                size: relative_moniker.len() as u64,
11208                limit: 4096,
11209            });
11210        }
11211
11212        ::fidl_next::Decode::decode(object.as_mut(), decoder_)?;
11213
11214        Ok(())
11215    }
11216}
11217
11218#[derive(PartialEq, Debug)]
11219pub struct StorageAdminOpenComponentStorageByIdRequest {
11220    pub id: ::std::string::String,
11221
11222    pub object:
11223        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::zx::Channel>,
11224}
11225
11226impl ::fidl_next::Encodable for StorageAdminOpenComponentStorageByIdRequest {
11227    type Encoded = WireStorageAdminOpenComponentStorageByIdRequest<'static>;
11228}
11229
11230unsafe impl<___E> ::fidl_next::Encode<___E> for StorageAdminOpenComponentStorageByIdRequest
11231where
11232    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11233    ___E: ::fidl_next::Encoder,
11234    ___E: ::fidl_next::fuchsia::HandleEncoder,
11235{
11236    #[inline]
11237    fn encode(
11238        self,
11239        encoder_: &mut ___E,
11240        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11241    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11242        ::fidl_next::munge! {
11243            let Self::Encoded {
11244                id,
11245                object,
11246
11247            } = out_;
11248        }
11249
11250        ::fidl_next::Encode::encode(self.id, encoder_, id)?;
11251
11252        ::fidl_next::Encode::encode(self.object, encoder_, object)?;
11253
11254        Ok(())
11255    }
11256}
11257
11258impl ::fidl_next::EncodableOption for StorageAdminOpenComponentStorageByIdRequest {
11259    type EncodedOption =
11260        ::fidl_next::WireBox<'static, WireStorageAdminOpenComponentStorageByIdRequest<'static>>;
11261}
11262
11263unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageAdminOpenComponentStorageByIdRequest
11264where
11265    ___E: ::fidl_next::Encoder + ?Sized,
11266    StorageAdminOpenComponentStorageByIdRequest: ::fidl_next::Encode<___E>,
11267{
11268    #[inline]
11269    fn encode_option(
11270        this: ::core::option::Option<Self>,
11271        encoder: &mut ___E,
11272        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11273    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11274        if let Some(inner) = this {
11275            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11276            ::fidl_next::WireBox::encode_present(out);
11277        } else {
11278            ::fidl_next::WireBox::encode_absent(out);
11279        }
11280
11281        Ok(())
11282    }
11283}
11284
11285impl<'de> ::fidl_next::FromWire<WireStorageAdminOpenComponentStorageByIdRequest<'de>>
11286    for StorageAdminOpenComponentStorageByIdRequest
11287{
11288    #[inline]
11289    fn from_wire(wire: WireStorageAdminOpenComponentStorageByIdRequest<'de>) -> Self {
11290        Self {
11291            id: ::fidl_next::FromWire::from_wire(wire.id),
11292
11293            object: ::fidl_next::FromWire::from_wire(wire.object),
11294        }
11295    }
11296}
11297
11298impl<'de> ::fidl_next::IntoNatural for WireStorageAdminOpenComponentStorageByIdRequest<'de> {
11299    type Natural = StorageAdminOpenComponentStorageByIdRequest;
11300}
11301
11302/// The wire type corresponding to [`StorageAdminOpenComponentStorageByIdRequest`].
11303#[derive(Debug)]
11304#[repr(C)]
11305pub struct WireStorageAdminOpenComponentStorageByIdRequest<'de> {
11306    pub id: ::fidl_next::WireString<'de>,
11307
11308    pub object:
11309        ::fidl_next::ServerEnd<::fidl_next_fuchsia_io::Node, ::fidl_next::fuchsia::WireChannel>,
11310}
11311static_assertions::const_assert_eq!(
11312    std::mem::size_of::<WireStorageAdminOpenComponentStorageByIdRequest<'_>>(),
11313    24
11314);
11315static_assertions::const_assert_eq!(
11316    std::mem::align_of::<WireStorageAdminOpenComponentStorageByIdRequest<'_>>(),
11317    8
11318);
11319
11320static_assertions::const_assert_eq!(
11321    std::mem::offset_of!(WireStorageAdminOpenComponentStorageByIdRequest<'_>, id),
11322    0
11323);
11324
11325static_assertions::const_assert_eq!(
11326    std::mem::offset_of!(WireStorageAdminOpenComponentStorageByIdRequest<'_>, object),
11327    16
11328);
11329
11330unsafe impl ::fidl_next::Wire for WireStorageAdminOpenComponentStorageByIdRequest<'static> {
11331    type Decoded<'de> = WireStorageAdminOpenComponentStorageByIdRequest<'de>;
11332
11333    #[inline]
11334    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
11335        ::fidl_next::munge! {
11336            let Self {
11337
11338                id,
11339                object,
11340
11341            } = &mut *out_;
11342        }
11343
11344        ::fidl_next::Wire::zero_padding(id);
11345
11346        ::fidl_next::Wire::zero_padding(object);
11347
11348        unsafe {
11349            out_.as_mut_ptr().cast::<u8>().add(20).write_bytes(0, 4);
11350        }
11351    }
11352}
11353
11354unsafe impl<___D> ::fidl_next::Decode<___D>
11355    for WireStorageAdminOpenComponentStorageByIdRequest<'static>
11356where
11357    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11358    ___D: ::fidl_next::Decoder,
11359    ___D: ::fidl_next::fuchsia::HandleDecoder,
11360{
11361    fn decode(
11362        slot_: ::fidl_next::Slot<'_, Self>,
11363        decoder_: &mut ___D,
11364    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
11365        ::fidl_next::munge! {
11366            let Self {
11367
11368                mut id,
11369                mut object,
11370
11371            } = slot_;
11372        }
11373
11374        ::fidl_next::Decode::decode(id.as_mut(), decoder_)?;
11375
11376        let id = unsafe { id.deref_unchecked() };
11377
11378        if id.len() > 64 {
11379            return Err(::fidl_next::DecodeError::VectorTooLong {
11380                size: id.len() as u64,
11381                limit: 64,
11382            });
11383        }
11384
11385        ::fidl_next::Decode::decode(object.as_mut(), decoder_)?;
11386
11387        Ok(())
11388    }
11389}
11390
11391/// The type corresponding to the StorageAdmin protocol.
11392#[derive(PartialEq, Debug)]
11393pub struct StorageAdmin;
11394
11395impl ::fidl_next::Discoverable for StorageAdmin {
11396    const PROTOCOL_NAME: &'static str = "fuchsia.component.StorageAdmin";
11397}
11398
11399pub mod storage_admin {
11400    pub mod prelude {
11401        pub use crate::{
11402            StorageAdmin, StorageAdminClientHandler, StorageAdminServerHandler, storage_admin,
11403        };
11404
11405        pub use crate::DeletionError;
11406
11407        pub use crate::Error;
11408
11409        pub use crate::StatusError;
11410
11411        pub use crate::StorageAdminDeleteComponentStorageRequest;
11412
11413        pub use crate::StorageAdminListStorageInRealmRequest;
11414
11415        pub use crate::StorageAdminOpenComponentStorageByIdRequest;
11416
11417        pub use crate::StorageAdminOpenStorageRequest;
11418
11419        pub use crate::StorageAdminDeleteAllStorageContentsResponse;
11420
11421        pub use crate::StorageAdminDeleteComponentStorageResponse;
11422
11423        pub use crate::StorageAdminListStorageInRealmResponse;
11424
11425        pub use crate::StorageAdminOpenComponentStorageByIdResponse;
11426
11427        pub use crate::StorageAdminOpenStorageResponse;
11428
11429        pub use crate::StorageStatus;
11430    }
11431
11432    pub struct OpenStorage;
11433
11434    impl ::fidl_next::Method for OpenStorage {
11435        const ORDINAL: u64 = 7848267339832116087;
11436
11437        type Protocol = crate::StorageAdmin;
11438
11439        type Request = crate::WireStorageAdminOpenStorageRequest<'static>;
11440
11441        type Response = ::fidl_next::WireResult<
11442            'static,
11443            crate::WireStorageAdminOpenStorageResponse,
11444            crate::WireError,
11445        >;
11446    }
11447
11448    pub struct ListStorageInRealm;
11449
11450    impl ::fidl_next::Method for ListStorageInRealm {
11451        const ORDINAL: u64 = 8525152599685368827;
11452
11453        type Protocol = crate::StorageAdmin;
11454
11455        type Request = crate::WireStorageAdminListStorageInRealmRequest<'static>;
11456
11457        type Response = ::fidl_next::WireResult<
11458            'static,
11459            crate::WireStorageAdminListStorageInRealmResponse,
11460            crate::WireError,
11461        >;
11462    }
11463
11464    pub struct OpenComponentStorageById;
11465
11466    impl ::fidl_next::Method for OpenComponentStorageById {
11467        const ORDINAL: u64 = 5188727505160068593;
11468
11469        type Protocol = crate::StorageAdmin;
11470
11471        type Request = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>;
11472
11473        type Response = ::fidl_next::WireResult<
11474            'static,
11475            crate::WireStorageAdminOpenComponentStorageByIdResponse,
11476            crate::WireError,
11477        >;
11478    }
11479
11480    pub struct DeleteComponentStorage;
11481
11482    impl ::fidl_next::Method for DeleteComponentStorage {
11483        const ORDINAL: u64 = 1618975681517712474;
11484
11485        type Protocol = crate::StorageAdmin;
11486
11487        type Request = crate::WireStorageAdminDeleteComponentStorageRequest<'static>;
11488
11489        type Response = ::fidl_next::WireResult<
11490            'static,
11491            crate::WireStorageAdminDeleteComponentStorageResponse,
11492            crate::WireError,
11493        >;
11494    }
11495
11496    pub struct GetStatus;
11497
11498    impl ::fidl_next::Method for GetStatus {
11499        const ORDINAL: u64 = 8586643915409794760;
11500
11501        type Protocol = crate::StorageAdmin;
11502
11503        type Request = ();
11504
11505        type Response = ::fidl_next::WireResult<
11506            'static,
11507            crate::WireStorageStatus<'static>,
11508            crate::WireStatusError,
11509        >;
11510    }
11511
11512    pub struct DeleteAllStorageContents;
11513
11514    impl ::fidl_next::Method for DeleteAllStorageContents {
11515        const ORDINAL: u64 = 3380374508900862683;
11516
11517        type Protocol = crate::StorageAdmin;
11518
11519        type Request = ();
11520
11521        type Response = ::fidl_next::WireResult<
11522            'static,
11523            crate::WireStorageAdminDeleteAllStorageContentsResponse,
11524            crate::WireDeletionError,
11525        >;
11526    }
11527
11528    mod ___detail {
11529
11530        pub struct OpenStorage<T0, T1> {
11531            relative_moniker: T0,
11532
11533            object: T1,
11534        }
11535
11536        impl<T0, T1> ::fidl_next::Encodable for OpenStorage<T0, T1>
11537        where
11538            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11539            T1: ::fidl_next::Encodable<
11540                    Encoded = ::fidl_next::ServerEnd<
11541                        ::fidl_next_fuchsia_io::Node,
11542                        ::fidl_next::fuchsia::WireChannel,
11543                    >,
11544                >,
11545        {
11546            type Encoded = crate::WireStorageAdminOpenStorageRequest<'static>;
11547        }
11548
11549        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenStorage<T0, T1>
11550        where
11551            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11552            ___E: ::fidl_next::Encoder,
11553            ___E: ::fidl_next::fuchsia::HandleEncoder,
11554            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11555            T1: ::fidl_next::Encode<
11556                    ___E,
11557                    Encoded = ::fidl_next::ServerEnd<
11558                        ::fidl_next_fuchsia_io::Node,
11559                        ::fidl_next::fuchsia::WireChannel,
11560                    >,
11561                >,
11562        {
11563            #[inline]
11564            fn encode(
11565                self,
11566                encoder_: &mut ___E,
11567                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11568            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11569                ::fidl_next::munge! {
11570                    let Self::Encoded {
11571                        relative_moniker,
11572                        object,
11573
11574                    } = out_;
11575                }
11576
11577                ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11578
11579                ::fidl_next::Encode::encode(self.object, encoder_, object)?;
11580
11581                Ok(())
11582            }
11583        }
11584
11585        pub struct ListStorageInRealm<T0, T1> {
11586            relative_moniker: T0,
11587
11588            iterator: T1,
11589        }
11590
11591        impl<T0, T1> ::fidl_next::Encodable for ListStorageInRealm<T0, T1>
11592        where
11593            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11594            T1: ::fidl_next::Encodable<
11595                    Encoded = ::fidl_next::ServerEnd<
11596                        crate::StorageIterator,
11597                        ::fidl_next::fuchsia::WireChannel,
11598                    >,
11599                >,
11600        {
11601            type Encoded = crate::WireStorageAdminListStorageInRealmRequest<'static>;
11602        }
11603
11604        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ListStorageInRealm<T0, T1>
11605        where
11606            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11607            ___E: ::fidl_next::Encoder,
11608            ___E: ::fidl_next::fuchsia::HandleEncoder,
11609            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11610            T1: ::fidl_next::Encode<
11611                    ___E,
11612                    Encoded = ::fidl_next::ServerEnd<
11613                        crate::StorageIterator,
11614                        ::fidl_next::fuchsia::WireChannel,
11615                    >,
11616                >,
11617        {
11618            #[inline]
11619            fn encode(
11620                self,
11621                encoder_: &mut ___E,
11622                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11623            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11624                ::fidl_next::munge! {
11625                    let Self::Encoded {
11626                        relative_moniker,
11627                        iterator,
11628
11629                    } = out_;
11630                }
11631
11632                ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11633
11634                ::fidl_next::Encode::encode(self.iterator, encoder_, iterator)?;
11635
11636                Ok(())
11637            }
11638        }
11639
11640        pub struct OpenComponentStorageById<T0, T1> {
11641            id: T0,
11642
11643            object: T1,
11644        }
11645
11646        impl<T0, T1> ::fidl_next::Encodable for OpenComponentStorageById<T0, T1>
11647        where
11648            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11649            T1: ::fidl_next::Encodable<
11650                    Encoded = ::fidl_next::ServerEnd<
11651                        ::fidl_next_fuchsia_io::Node,
11652                        ::fidl_next::fuchsia::WireChannel,
11653                    >,
11654                >,
11655        {
11656            type Encoded = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>;
11657        }
11658
11659        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for OpenComponentStorageById<T0, T1>
11660        where
11661            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11662            ___E: ::fidl_next::Encoder,
11663            ___E: ::fidl_next::fuchsia::HandleEncoder,
11664            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11665            T1: ::fidl_next::Encode<
11666                    ___E,
11667                    Encoded = ::fidl_next::ServerEnd<
11668                        ::fidl_next_fuchsia_io::Node,
11669                        ::fidl_next::fuchsia::WireChannel,
11670                    >,
11671                >,
11672        {
11673            #[inline]
11674            fn encode(
11675                self,
11676                encoder_: &mut ___E,
11677                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11678            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11679                ::fidl_next::munge! {
11680                    let Self::Encoded {
11681                        id,
11682                        object,
11683
11684                    } = out_;
11685                }
11686
11687                ::fidl_next::Encode::encode(self.id, encoder_, id)?;
11688
11689                ::fidl_next::Encode::encode(self.object, encoder_, object)?;
11690
11691                Ok(())
11692            }
11693        }
11694
11695        pub struct DeleteComponentStorage<T0> {
11696            relative_moniker: T0,
11697        }
11698
11699        impl<T0> ::fidl_next::Encodable for DeleteComponentStorage<T0>
11700        where
11701            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
11702        {
11703            type Encoded = crate::WireStorageAdminDeleteComponentStorageRequest<'static>;
11704        }
11705
11706        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DeleteComponentStorage<T0>
11707        where
11708            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11709            ___E: ::fidl_next::Encoder,
11710            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
11711        {
11712            #[inline]
11713            fn encode(
11714                self,
11715                encoder_: &mut ___E,
11716                out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11717            ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
11718                ::fidl_next::munge! {
11719                    let Self::Encoded {
11720                        relative_moniker,
11721
11722                    } = out_;
11723                }
11724
11725                ::fidl_next::Encode::encode(self.relative_moniker, encoder_, relative_moniker)?;
11726
11727                Ok(())
11728            }
11729        }
11730
11731        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageAdmin
11732        where
11733            ___T: ::fidl_next::Transport,
11734        {
11735            type Client = StorageAdminClient<___T>;
11736            type Server = StorageAdminServer<___T>;
11737        }
11738
11739        /// The client for the `StorageAdmin` protocol.
11740        #[repr(transparent)]
11741        pub struct StorageAdminClient<___T: ::fidl_next::Transport> {
11742            #[allow(dead_code)]
11743            client: ::fidl_next::protocol::Client<___T>,
11744        }
11745
11746        impl<___T> StorageAdminClient<___T>
11747        where
11748            ___T: ::fidl_next::Transport,
11749        {
11750            #[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"]
11751            pub fn open_storage(
11752                &self,
11753
11754                relative_moniker: impl ::fidl_next::Encode<
11755                    <___T as ::fidl_next::Transport>::SendBuffer,
11756                    Encoded = ::fidl_next::WireString<'static>,
11757                >,
11758
11759                object: impl ::fidl_next::Encode<
11760                    <___T as ::fidl_next::Transport>::SendBuffer,
11761                    Encoded = ::fidl_next::ServerEnd<
11762                        ::fidl_next_fuchsia_io::Node,
11763                        ::fidl_next::fuchsia::WireChannel,
11764                    >,
11765                >,
11766            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
11767            where
11768                <___T as ::fidl_next::Transport>::SendBuffer:
11769                    ::fidl_next::encoder::InternalHandleEncoder,
11770                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11771                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11772            {
11773                self.open_storage_with(OpenStorage { relative_moniker, object })
11774            }
11775
11776            #[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"]
11777            pub fn open_storage_with<___R>(
11778                &self,
11779                request: ___R,
11780            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenStorage, ___T>
11781            where
11782                ___R: ::fidl_next::Encode<
11783                        <___T as ::fidl_next::Transport>::SendBuffer,
11784                        Encoded = crate::WireStorageAdminOpenStorageRequest<'static>,
11785                    >,
11786            {
11787                ::fidl_next::TwoWayFuture::from_untyped(
11788                    self.client.send_two_way(7848267339832116087, request),
11789                )
11790            }
11791
11792            #[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"]
11793            pub fn list_storage_in_realm(
11794                &self,
11795
11796                relative_moniker: impl ::fidl_next::Encode<
11797                    <___T as ::fidl_next::Transport>::SendBuffer,
11798                    Encoded = ::fidl_next::WireString<'static>,
11799                >,
11800
11801                iterator: impl ::fidl_next::Encode<
11802                    <___T as ::fidl_next::Transport>::SendBuffer,
11803                    Encoded = ::fidl_next::ServerEnd<
11804                        crate::StorageIterator,
11805                        ::fidl_next::fuchsia::WireChannel,
11806                    >,
11807                >,
11808            ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
11809            where
11810                <___T as ::fidl_next::Transport>::SendBuffer:
11811                    ::fidl_next::encoder::InternalHandleEncoder,
11812                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11813                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11814            {
11815                self.list_storage_in_realm_with(ListStorageInRealm { relative_moniker, iterator })
11816            }
11817
11818            #[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"]
11819            pub fn list_storage_in_realm_with<___R>(
11820                &self,
11821                request: ___R,
11822            ) -> ::fidl_next::TwoWayFuture<'_, super::ListStorageInRealm, ___T>
11823            where
11824                ___R: ::fidl_next::Encode<
11825                        <___T as ::fidl_next::Transport>::SendBuffer,
11826                        Encoded = crate::WireStorageAdminListStorageInRealmRequest<'static>,
11827                    >,
11828            {
11829                ::fidl_next::TwoWayFuture::from_untyped(
11830                    self.client.send_two_way(8525152599685368827, request),
11831                )
11832            }
11833
11834            #[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"]
11835            pub fn open_component_storage_by_id(
11836                &self,
11837
11838                id: impl ::fidl_next::Encode<
11839                    <___T as ::fidl_next::Transport>::SendBuffer,
11840                    Encoded = ::fidl_next::WireString<'static>,
11841                >,
11842
11843                object: impl ::fidl_next::Encode<
11844                    <___T as ::fidl_next::Transport>::SendBuffer,
11845                    Encoded = ::fidl_next::ServerEnd<
11846                        ::fidl_next_fuchsia_io::Node,
11847                        ::fidl_next::fuchsia::WireChannel,
11848                    >,
11849                >,
11850            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
11851            where
11852                <___T as ::fidl_next::Transport>::SendBuffer:
11853                    ::fidl_next::encoder::InternalHandleEncoder,
11854                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11855                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
11856            {
11857                self.open_component_storage_by_id_with(OpenComponentStorageById { id, object })
11858            }
11859
11860            #[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"]
11861            pub fn open_component_storage_by_id_with<___R>(
11862                &self,
11863                request: ___R,
11864            ) -> ::fidl_next::TwoWayFuture<'_, super::OpenComponentStorageById, ___T>
11865            where
11866                ___R: ::fidl_next::Encode<
11867                        <___T as ::fidl_next::Transport>::SendBuffer,
11868                        Encoded = crate::WireStorageAdminOpenComponentStorageByIdRequest<'static>,
11869                    >,
11870            {
11871                ::fidl_next::TwoWayFuture::from_untyped(
11872                    self.client.send_two_way(5188727505160068593, request),
11873                )
11874            }
11875
11876            #[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"]
11877            pub fn delete_component_storage(
11878                &self,
11879
11880                relative_moniker: impl ::fidl_next::Encode<
11881                    <___T as ::fidl_next::Transport>::SendBuffer,
11882                    Encoded = ::fidl_next::WireString<'static>,
11883                >,
11884            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
11885            where
11886                <___T as ::fidl_next::Transport>::SendBuffer:
11887                    ::fidl_next::encoder::InternalHandleEncoder,
11888                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
11889            {
11890                self.delete_component_storage_with(DeleteComponentStorage { relative_moniker })
11891            }
11892
11893            #[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"]
11894            pub fn delete_component_storage_with<___R>(
11895                &self,
11896                request: ___R,
11897            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteComponentStorage, ___T>
11898            where
11899                ___R: ::fidl_next::Encode<
11900                        <___T as ::fidl_next::Transport>::SendBuffer,
11901                        Encoded = crate::WireStorageAdminDeleteComponentStorageRequest<'static>,
11902                    >,
11903            {
11904                ::fidl_next::TwoWayFuture::from_untyped(
11905                    self.client.send_two_way(1618975681517712474, request),
11906                )
11907            }
11908
11909            #[doc = " Get the current status of the storage.\n"]
11910            pub fn get_status(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetStatus, ___T> {
11911                ::fidl_next::TwoWayFuture::from_untyped(
11912                    self.client.send_two_way(8586643915409794760, ()),
11913                )
11914            }
11915
11916            #[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"]
11917            pub fn delete_all_storage_contents(
11918                &self,
11919            ) -> ::fidl_next::TwoWayFuture<'_, super::DeleteAllStorageContents, ___T> {
11920                ::fidl_next::TwoWayFuture::from_untyped(
11921                    self.client.send_two_way(3380374508900862683, ()),
11922                )
11923            }
11924        }
11925
11926        /// The server for the `StorageAdmin` protocol.
11927        #[repr(transparent)]
11928        pub struct StorageAdminServer<___T: ::fidl_next::Transport> {
11929            server: ::fidl_next::protocol::Server<___T>,
11930        }
11931
11932        impl<___T> StorageAdminServer<___T> where ___T: ::fidl_next::Transport {}
11933    }
11934}
11935
11936/// A client handler for the StorageAdmin protocol.
11937///
11938/// See [`StorageAdmin`] for more details.
11939pub trait StorageAdminClientHandler<
11940    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11941    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11942>
11943{
11944}
11945
11946impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageAdmin
11947where
11948    ___H: StorageAdminClientHandler<___T> + ::core::marker::Send,
11949    ___T: ::fidl_next::Transport,
11950    <storage_admin::OpenStorage as ::fidl_next::Method>::Response:
11951        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11952    <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Response:
11953        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11954    <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Response:
11955        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11956    <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Response:
11957        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11958    <storage_admin::GetStatus as ::fidl_next::Method>::Response:
11959        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11960    <storage_admin::DeleteAllStorageContents as ::fidl_next::Method>::Response:
11961        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11962{
11963    async fn on_event(
11964        handler: &mut ___H,
11965        ordinal: u64,
11966        buffer: ___T::RecvBuffer,
11967    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
11968        match ordinal {
11969            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
11970        }
11971    }
11972}
11973
11974/// A server handler for the StorageAdmin protocol.
11975///
11976/// See [`StorageAdmin`] for more details.
11977pub trait StorageAdminServerHandler<
11978    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11979    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11980>
11981{
11982    #[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"]
11983    fn open_storage(
11984        &mut self,
11985
11986        request: ::fidl_next::Request<storage_admin::OpenStorage, ___T>,
11987
11988        responder: ::fidl_next::Responder<storage_admin::OpenStorage, ___T>,
11989    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11990
11991    #[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"]
11992    fn list_storage_in_realm(
11993        &mut self,
11994
11995        request: ::fidl_next::Request<storage_admin::ListStorageInRealm, ___T>,
11996
11997        responder: ::fidl_next::Responder<storage_admin::ListStorageInRealm, ___T>,
11998    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11999
12000    #[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"]
12001    fn open_component_storage_by_id(
12002        &mut self,
12003
12004        request: ::fidl_next::Request<storage_admin::OpenComponentStorageById, ___T>,
12005
12006        responder: ::fidl_next::Responder<storage_admin::OpenComponentStorageById, ___T>,
12007    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12008
12009    #[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"]
12010    fn delete_component_storage(
12011        &mut self,
12012
12013        request: ::fidl_next::Request<storage_admin::DeleteComponentStorage, ___T>,
12014
12015        responder: ::fidl_next::Responder<storage_admin::DeleteComponentStorage, ___T>,
12016    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12017
12018    #[doc = " Get the current status of the storage.\n"]
12019    fn get_status(
12020        &mut self,
12021
12022        responder: ::fidl_next::Responder<storage_admin::GetStatus, ___T>,
12023    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12024
12025    #[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"]
12026    fn delete_all_storage_contents(
12027        &mut self,
12028
12029        responder: ::fidl_next::Responder<storage_admin::DeleteAllStorageContents, ___T>,
12030    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12031}
12032
12033impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageAdmin
12034where
12035    ___H: StorageAdminServerHandler<___T> + ::core::marker::Send,
12036    ___T: ::fidl_next::Transport,
12037    <storage_admin::OpenStorage as ::fidl_next::Method>::Request:
12038        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12039    <storage_admin::ListStorageInRealm as ::fidl_next::Method>::Request:
12040        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12041    <storage_admin::OpenComponentStorageById as ::fidl_next::Method>::Request:
12042        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12043    <storage_admin::DeleteComponentStorage as ::fidl_next::Method>::Request:
12044        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12045{
12046    async fn on_one_way(
12047        handler: &mut ___H,
12048        ordinal: u64,
12049        buffer: ___T::RecvBuffer,
12050    ) -> ::core::result::Result<
12051        (),
12052        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12053    > {
12054        match ordinal {
12055            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12056        }
12057    }
12058
12059    async fn on_two_way(
12060        handler: &mut ___H,
12061        ordinal: u64,
12062        buffer: ___T::RecvBuffer,
12063        responder: ::fidl_next::protocol::Responder<___T>,
12064    ) -> ::core::result::Result<
12065        (),
12066        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12067    > {
12068        match ordinal {
12069            7848267339832116087 => {
12070                let responder = ::fidl_next::Responder::from_untyped(responder);
12071
12072                match ::fidl_next::DecoderExt::decode(buffer) {
12073                    Ok(decoded) => {
12074                        handler.open_storage(decoded, responder).await;
12075                        Ok(())
12076                    }
12077                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12078                        ordinal: 7848267339832116087,
12079                        error,
12080                    }),
12081                }
12082            }
12083
12084            8525152599685368827 => {
12085                let responder = ::fidl_next::Responder::from_untyped(responder);
12086
12087                match ::fidl_next::DecoderExt::decode(buffer) {
12088                    Ok(decoded) => {
12089                        handler.list_storage_in_realm(decoded, responder).await;
12090                        Ok(())
12091                    }
12092                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12093                        ordinal: 8525152599685368827,
12094                        error,
12095                    }),
12096                }
12097            }
12098
12099            5188727505160068593 => {
12100                let responder = ::fidl_next::Responder::from_untyped(responder);
12101
12102                match ::fidl_next::DecoderExt::decode(buffer) {
12103                    Ok(decoded) => {
12104                        handler.open_component_storage_by_id(decoded, responder).await;
12105                        Ok(())
12106                    }
12107                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12108                        ordinal: 5188727505160068593,
12109                        error,
12110                    }),
12111                }
12112            }
12113
12114            1618975681517712474 => {
12115                let responder = ::fidl_next::Responder::from_untyped(responder);
12116
12117                match ::fidl_next::DecoderExt::decode(buffer) {
12118                    Ok(decoded) => {
12119                        handler.delete_component_storage(decoded, responder).await;
12120                        Ok(())
12121                    }
12122                    Err(error) => Err(::fidl_next::ProtocolError::InvalidMessage {
12123                        ordinal: 1618975681517712474,
12124                        error,
12125                    }),
12126                }
12127            }
12128
12129            8586643915409794760 => {
12130                let responder = ::fidl_next::Responder::from_untyped(responder);
12131
12132                handler.get_status(responder).await;
12133                Ok(())
12134            }
12135
12136            3380374508900862683 => {
12137                let responder = ::fidl_next::Responder::from_untyped(responder);
12138
12139                handler.delete_all_storage_contents(responder).await;
12140                Ok(())
12141            }
12142
12143            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12144        }
12145    }
12146}
12147
12148#[derive(PartialEq, Clone, Debug)]
12149pub struct StorageIteratorNextResponse {
12150    pub relative_monikers: ::std::vec::Vec<::std::string::String>,
12151}
12152
12153impl ::fidl_next::Encodable for StorageIteratorNextResponse {
12154    type Encoded = WireStorageIteratorNextResponse<'static>;
12155}
12156
12157unsafe impl<___E> ::fidl_next::Encode<___E> for StorageIteratorNextResponse
12158where
12159    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12160    ___E: ::fidl_next::Encoder,
12161{
12162    #[inline]
12163    fn encode(
12164        self,
12165        encoder_: &mut ___E,
12166        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12167    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12168        ::fidl_next::munge! {
12169            let Self::Encoded {
12170                relative_monikers,
12171
12172            } = out_;
12173        }
12174
12175        ::fidl_next::Encode::encode(self.relative_monikers, encoder_, relative_monikers)?;
12176
12177        Ok(())
12178    }
12179}
12180
12181unsafe impl<___E> ::fidl_next::EncodeRef<___E> for StorageIteratorNextResponse
12182where
12183    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12184    ___E: ::fidl_next::Encoder,
12185{
12186    #[inline]
12187    fn encode_ref(
12188        &self,
12189        encoder_: &mut ___E,
12190        out_: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12191    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12192        ::fidl_next::munge! {
12193            let Self::Encoded {
12194
12195                relative_monikers,
12196
12197            } = out_;
12198        }
12199
12200        ::fidl_next::EncodeRef::encode_ref(&self.relative_monikers, encoder_, relative_monikers)?;
12201
12202        Ok(())
12203    }
12204}
12205
12206impl ::fidl_next::EncodableOption for StorageIteratorNextResponse {
12207    type EncodedOption = ::fidl_next::WireBox<'static, WireStorageIteratorNextResponse<'static>>;
12208}
12209
12210unsafe impl<___E> ::fidl_next::EncodeOption<___E> for StorageIteratorNextResponse
12211where
12212    ___E: ::fidl_next::Encoder + ?Sized,
12213    StorageIteratorNextResponse: ::fidl_next::Encode<___E>,
12214{
12215    #[inline]
12216    fn encode_option(
12217        this: ::core::option::Option<Self>,
12218        encoder: &mut ___E,
12219        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
12220    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12221        if let Some(inner) = this {
12222            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12223            ::fidl_next::WireBox::encode_present(out);
12224        } else {
12225            ::fidl_next::WireBox::encode_absent(out);
12226        }
12227
12228        Ok(())
12229    }
12230}
12231
12232unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for StorageIteratorNextResponse
12233where
12234    ___E: ::fidl_next::Encoder + ?Sized,
12235    StorageIteratorNextResponse: ::fidl_next::EncodeRef<___E>,
12236{
12237    #[inline]
12238    fn encode_option_ref(
12239        this: ::core::option::Option<&Self>,
12240        encoder: &mut ___E,
12241        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
12242    ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
12243        if let Some(inner) = this {
12244            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12245            ::fidl_next::WireBox::encode_present(out);
12246        } else {
12247            ::fidl_next::WireBox::encode_absent(out);
12248        }
12249
12250        Ok(())
12251    }
12252}
12253
12254impl<'de> ::fidl_next::FromWire<WireStorageIteratorNextResponse<'de>>
12255    for StorageIteratorNextResponse
12256{
12257    #[inline]
12258    fn from_wire(wire: WireStorageIteratorNextResponse<'de>) -> Self {
12259        Self { relative_monikers: ::fidl_next::FromWire::from_wire(wire.relative_monikers) }
12260    }
12261}
12262
12263impl<'de> ::fidl_next::IntoNatural for WireStorageIteratorNextResponse<'de> {
12264    type Natural = StorageIteratorNextResponse;
12265}
12266
12267impl<'de> ::fidl_next::FromWireRef<WireStorageIteratorNextResponse<'de>>
12268    for StorageIteratorNextResponse
12269{
12270    #[inline]
12271    fn from_wire_ref(wire: &WireStorageIteratorNextResponse<'de>) -> Self {
12272        Self { relative_monikers: ::fidl_next::FromWireRef::from_wire_ref(&wire.relative_monikers) }
12273    }
12274}
12275
12276/// The wire type corresponding to [`StorageIteratorNextResponse`].
12277#[derive(Debug)]
12278#[repr(C)]
12279pub struct WireStorageIteratorNextResponse<'de> {
12280    pub relative_monikers: ::fidl_next::WireVector<'de, ::fidl_next::WireString<'de>>,
12281}
12282static_assertions::const_assert_eq!(std::mem::size_of::<WireStorageIteratorNextResponse<'_>>(), 16);
12283static_assertions::const_assert_eq!(std::mem::align_of::<WireStorageIteratorNextResponse<'_>>(), 8);
12284
12285static_assertions::const_assert_eq!(
12286    std::mem::offset_of!(WireStorageIteratorNextResponse<'_>, relative_monikers),
12287    0
12288);
12289
12290unsafe impl ::fidl_next::Wire for WireStorageIteratorNextResponse<'static> {
12291    type Decoded<'de> = WireStorageIteratorNextResponse<'de>;
12292
12293    #[inline]
12294    fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
12295        ::fidl_next::munge! {
12296            let Self {
12297
12298                relative_monikers,
12299
12300            } = &mut *out_;
12301        }
12302
12303        ::fidl_next::Wire::zero_padding(relative_monikers);
12304    }
12305}
12306
12307unsafe impl<___D> ::fidl_next::Decode<___D> for WireStorageIteratorNextResponse<'static>
12308where
12309    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12310    ___D: ::fidl_next::Decoder,
12311{
12312    fn decode(
12313        slot_: ::fidl_next::Slot<'_, Self>,
12314        decoder_: &mut ___D,
12315    ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
12316        ::fidl_next::munge! {
12317            let Self {
12318
12319                mut relative_monikers,
12320
12321            } = slot_;
12322        }
12323
12324        ::fidl_next::Decode::decode(relative_monikers.as_mut(), decoder_)?;
12325
12326        Ok(())
12327    }
12328}
12329
12330/// The type corresponding to the StorageIterator protocol.
12331#[doc = " An iterator protocol for returning a set of components using a storage\n capability. See |StorageAdmin.ListStorageInRealm| for more information.\n"]
12332#[derive(PartialEq, Debug)]
12333pub struct StorageIterator;
12334
12335pub mod storage_iterator {
12336    pub mod prelude {
12337        pub use crate::{
12338            StorageIterator, StorageIteratorClientHandler, StorageIteratorServerHandler,
12339            storage_iterator,
12340        };
12341
12342        pub use crate::StorageIteratorNextResponse;
12343    }
12344
12345    pub struct Next;
12346
12347    impl ::fidl_next::Method for Next {
12348        const ORDINAL: u64 = 8821181615713557362;
12349
12350        type Protocol = crate::StorageIterator;
12351
12352        type Request = ();
12353
12354        type Response = crate::WireStorageIteratorNextResponse<'static>;
12355    }
12356
12357    mod ___detail {
12358
12359        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::StorageIterator
12360        where
12361            ___T: ::fidl_next::Transport,
12362        {
12363            type Client = StorageIteratorClient<___T>;
12364            type Server = StorageIteratorServer<___T>;
12365        }
12366
12367        /// The client for the `StorageIterator` protocol.
12368        #[repr(transparent)]
12369        pub struct StorageIteratorClient<___T: ::fidl_next::Transport> {
12370            #[allow(dead_code)]
12371            client: ::fidl_next::protocol::Client<___T>,
12372        }
12373
12374        impl<___T> StorageIteratorClient<___T>
12375        where
12376            ___T: ::fidl_next::Transport,
12377        {
12378            #[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"]
12379            pub fn next(&self) -> ::fidl_next::TwoWayFuture<'_, super::Next, ___T> {
12380                ::fidl_next::TwoWayFuture::from_untyped(
12381                    self.client.send_two_way(8821181615713557362, ()),
12382                )
12383            }
12384        }
12385
12386        /// The server for the `StorageIterator` protocol.
12387        #[repr(transparent)]
12388        pub struct StorageIteratorServer<___T: ::fidl_next::Transport> {
12389            server: ::fidl_next::protocol::Server<___T>,
12390        }
12391
12392        impl<___T> StorageIteratorServer<___T> where ___T: ::fidl_next::Transport {}
12393    }
12394}
12395
12396/// A client handler for the StorageIterator protocol.
12397///
12398/// See [`StorageIterator`] for more details.
12399pub trait StorageIteratorClientHandler<
12400    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12401    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12402>
12403{
12404}
12405
12406impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for StorageIterator
12407where
12408    ___H: StorageIteratorClientHandler<___T> + ::core::marker::Send,
12409    ___T: ::fidl_next::Transport,
12410    <storage_iterator::Next as ::fidl_next::Method>::Response:
12411        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12412{
12413    async fn on_event(
12414        handler: &mut ___H,
12415        ordinal: u64,
12416        buffer: ___T::RecvBuffer,
12417    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
12418        match ordinal {
12419            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12420        }
12421    }
12422}
12423
12424/// A server handler for the StorageIterator protocol.
12425///
12426/// See [`StorageIterator`] for more details.
12427pub trait StorageIteratorServerHandler<
12428    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12429    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12430>
12431{
12432    #[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"]
12433    fn next(
12434        &mut self,
12435
12436        responder: ::fidl_next::Responder<storage_iterator::Next, ___T>,
12437    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12438}
12439
12440impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for StorageIterator
12441where
12442    ___H: StorageIteratorServerHandler<___T> + ::core::marker::Send,
12443    ___T: ::fidl_next::Transport,
12444{
12445    async fn on_one_way(
12446        handler: &mut ___H,
12447        ordinal: u64,
12448        buffer: ___T::RecvBuffer,
12449    ) -> ::core::result::Result<
12450        (),
12451        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12452    > {
12453        match ordinal {
12454            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12455        }
12456    }
12457
12458    async fn on_two_way(
12459        handler: &mut ___H,
12460        ordinal: u64,
12461        buffer: ___T::RecvBuffer,
12462        responder: ::fidl_next::protocol::Responder<___T>,
12463    ) -> ::core::result::Result<
12464        (),
12465        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
12466    > {
12467        match ordinal {
12468            8821181615713557362 => {
12469                let responder = ::fidl_next::Responder::from_untyped(responder);
12470
12471                handler.next(responder).await;
12472                Ok(())
12473            }
12474
12475            ordinal => Err(::fidl_next::ProtocolError::InvalidOrdinal(ordinal)),
12476        }
12477    }
12478}
12479
12480pub type ChildName = ::std::string::String;
12481
12482/// The wire type corresponding to [`ChildName`].
12483pub type WireChildName<'de> = ::fidl_next::WireString<'de>;
12484
12485pub type UrlScheme = ::std::string::String;
12486
12487/// The wire type corresponding to [`UrlScheme`].
12488pub type WireUrlScheme<'de> = ::fidl_next::WireString<'de>;
12489
12490/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
12491pub mod compat {
12492
12493    #[cfg(target_os = "fuchsia")]
12494    /// An alias for a client over `zx::Channel` for the `Binder`
12495    /// protocol.
12496    pub type BinderProxy = ::fidl_next::Client<crate::Binder>;
12497
12498    impl ::fidl_next::CompatFrom<crate::Binder> for ::fidl_fuchsia_component::BinderMarker {
12499        fn compat_from(_: crate::Binder) -> Self {
12500            Self
12501        }
12502    }
12503
12504    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::BinderMarker> for crate::Binder {
12505        fn compat_from(_: ::fidl_fuchsia_component::BinderMarker) -> Self {
12506            Self
12507        }
12508    }
12509
12510    #[cfg(target_os = "fuchsia")]
12511
12512    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::BinderProxy> for crate::Binder {
12513        fn client_compat_from(
12514            proxy: ::fidl_fuchsia_component::BinderProxy,
12515        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12516            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12517            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12518            ::fidl_next::ClientDispatcher::new(client_end)
12519        }
12520    }
12521
12522    impl ::fidl_next::CompatFrom<crate::CapabilityRequestedPayload>
12523        for ::fidl_fuchsia_component::CapabilityRequestedPayload
12524    {
12525        fn compat_from(value: crate::CapabilityRequestedPayload) -> Self {
12526            Self {
12527                name: ::fidl_next::CompatFrom::compat_from(value.name),
12528
12529                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
12530
12531                __source_breaking: ::fidl::marker::SourceBreaking,
12532            }
12533        }
12534    }
12535
12536    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CapabilityRequestedPayload>
12537        for crate::CapabilityRequestedPayload
12538    {
12539        fn compat_from(value: ::fidl_fuchsia_component::CapabilityRequestedPayload) -> Self {
12540            Self {
12541                name: ::fidl_next::CompatFrom::compat_from(value.name),
12542
12543                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
12544            }
12545        }
12546    }
12547
12548    impl ::fidl_next::CompatFrom<crate::ChildIteratorNextResponse>
12549        for ::fidl_fuchsia_component::ChildIteratorNextResponse
12550    {
12551        #[inline]
12552        fn compat_from(value: crate::ChildIteratorNextResponse) -> Self {
12553            Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
12554        }
12555    }
12556
12557    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorNextResponse>
12558        for crate::ChildIteratorNextResponse
12559    {
12560        #[inline]
12561        fn compat_from(value: ::fidl_fuchsia_component::ChildIteratorNextResponse) -> Self {
12562            Self { children: ::fidl_next::CompatFrom::compat_from(value.children) }
12563        }
12564    }
12565
12566    #[cfg(target_os = "fuchsia")]
12567    /// An alias for a client over `zx::Channel` for the `ChildIterator`
12568    /// protocol.
12569    pub type ChildIteratorProxy = ::fidl_next::Client<crate::ChildIterator>;
12570
12571    impl ::fidl_next::CompatFrom<crate::ChildIterator>
12572        for ::fidl_fuchsia_component::ChildIteratorMarker
12573    {
12574        fn compat_from(_: crate::ChildIterator) -> Self {
12575            Self
12576        }
12577    }
12578
12579    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ChildIteratorMarker>
12580        for crate::ChildIterator
12581    {
12582        fn compat_from(_: ::fidl_fuchsia_component::ChildIteratorMarker) -> Self {
12583            Self
12584        }
12585    }
12586
12587    #[cfg(target_os = "fuchsia")]
12588
12589    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ChildIteratorProxy>
12590        for crate::ChildIterator
12591    {
12592        fn client_compat_from(
12593            proxy: ::fidl_fuchsia_component::ChildIteratorProxy,
12594        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12595            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12596            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12597            ::fidl_next::ClientDispatcher::new(client_end)
12598        }
12599    }
12600
12601    impl ::fidl_next::CompatFrom<crate::ControllerIsStartedResponse>
12602        for ::fidl_fuchsia_component::ControllerIsStartedResponse
12603    {
12604        #[inline]
12605        fn compat_from(value: crate::ControllerIsStartedResponse) -> Self {
12606            Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
12607        }
12608    }
12609
12610    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerIsStartedResponse>
12611        for crate::ControllerIsStartedResponse
12612    {
12613        #[inline]
12614        fn compat_from(value: ::fidl_fuchsia_component::ControllerIsStartedResponse) -> Self {
12615            Self { is_started: ::fidl_next::CompatFrom::compat_from(value.is_started) }
12616        }
12617    }
12618
12619    impl ::fidl_next::CompatFrom<crate::Error> for ::fidl_fuchsia_component::Error {
12620        fn compat_from(value: crate::Error) -> Self {
12621            match value {
12622                crate::Error::Internal => Self::Internal,
12623
12624                crate::Error::InvalidArguments => Self::InvalidArguments,
12625
12626                crate::Error::Unsupported => Self::Unsupported,
12627
12628                crate::Error::AccessDenied => Self::AccessDenied,
12629
12630                crate::Error::InstanceNotFound => Self::InstanceNotFound,
12631
12632                crate::Error::InstanceAlreadyExists => Self::InstanceAlreadyExists,
12633
12634                crate::Error::InstanceCannotStart => Self::InstanceCannotStart,
12635
12636                crate::Error::InstanceCannotResolve => Self::InstanceCannotResolve,
12637
12638                crate::Error::CollectionNotFound => Self::CollectionNotFound,
12639
12640                crate::Error::ResourceUnavailable => Self::ResourceUnavailable,
12641
12642                crate::Error::InstanceDied => Self::InstanceDied,
12643
12644                crate::Error::ResourceNotFound => Self::ResourceNotFound,
12645
12646                crate::Error::InstanceCannotUnresolve => Self::InstanceCannotUnresolve,
12647
12648                crate::Error::InstanceAlreadyStarted => Self::InstanceAlreadyStarted,
12649
12650                crate::Error::DependencyCycle => Self::DependencyCycle,
12651
12652                crate::Error::UnknownOrdinal_(unknown_ordinal) => {
12653                    Self::__SourceBreaking { unknown_ordinal }
12654                }
12655            }
12656        }
12657    }
12658
12659    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Error> for crate::Error {
12660        fn compat_from(value: ::fidl_fuchsia_component::Error) -> Self {
12661            match value {
12662                ::fidl_fuchsia_component::Error::Internal => Self::Internal,
12663
12664                ::fidl_fuchsia_component::Error::InvalidArguments => Self::InvalidArguments,
12665
12666                ::fidl_fuchsia_component::Error::Unsupported => Self::Unsupported,
12667
12668                ::fidl_fuchsia_component::Error::AccessDenied => Self::AccessDenied,
12669
12670                ::fidl_fuchsia_component::Error::InstanceNotFound => Self::InstanceNotFound,
12671
12672                ::fidl_fuchsia_component::Error::InstanceAlreadyExists => {
12673                    Self::InstanceAlreadyExists
12674                }
12675
12676                ::fidl_fuchsia_component::Error::InstanceCannotStart => Self::InstanceCannotStart,
12677
12678                ::fidl_fuchsia_component::Error::InstanceCannotResolve => {
12679                    Self::InstanceCannotResolve
12680                }
12681
12682                ::fidl_fuchsia_component::Error::CollectionNotFound => Self::CollectionNotFound,
12683
12684                ::fidl_fuchsia_component::Error::ResourceUnavailable => Self::ResourceUnavailable,
12685
12686                ::fidl_fuchsia_component::Error::InstanceDied => Self::InstanceDied,
12687
12688                ::fidl_fuchsia_component::Error::ResourceNotFound => Self::ResourceNotFound,
12689
12690                ::fidl_fuchsia_component::Error::InstanceCannotUnresolve => {
12691                    Self::InstanceCannotUnresolve
12692                }
12693
12694                ::fidl_fuchsia_component::Error::InstanceAlreadyStarted => {
12695                    Self::InstanceAlreadyStarted
12696                }
12697
12698                ::fidl_fuchsia_component::Error::DependencyCycle => Self::DependencyCycle,
12699
12700                ::fidl_fuchsia_component::Error::__SourceBreaking { unknown_ordinal: value } => {
12701                    Self::UnknownOrdinal_(value)
12702                }
12703            }
12704        }
12705    }
12706
12707    impl ::fidl_next::CompatFrom<crate::ControllerGetExposedDictionaryResponse>
12708        for ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse
12709    {
12710        #[inline]
12711        fn compat_from(value: crate::ControllerGetExposedDictionaryResponse) -> Self {
12712            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12713        }
12714    }
12715
12716    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse>
12717        for crate::ControllerGetExposedDictionaryResponse
12718    {
12719        #[inline]
12720        fn compat_from(
12721            value: ::fidl_fuchsia_component::ControllerGetExposedDictionaryResponse,
12722        ) -> Self {
12723            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
12724        }
12725    }
12726
12727    impl ::fidl_next::CompatFrom<crate::NamespaceEntry> for ::fidl_fuchsia_component::NamespaceEntry {
12728        fn compat_from(value: crate::NamespaceEntry) -> Self {
12729            Self {
12730                path: ::fidl_next::CompatFrom::compat_from(value.path),
12731
12732                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
12733
12734                __source_breaking: ::fidl::marker::SourceBreaking,
12735            }
12736        }
12737    }
12738
12739    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceEntry> for crate::NamespaceEntry {
12740        fn compat_from(value: ::fidl_fuchsia_component::NamespaceEntry) -> Self {
12741            Self {
12742                path: ::fidl_next::CompatFrom::compat_from(value.path),
12743
12744                directory: ::fidl_next::CompatFrom::compat_from(value.directory),
12745            }
12746        }
12747    }
12748
12749    impl ::fidl_next::CompatFrom<crate::StartChildArgs> for ::fidl_fuchsia_component::StartChildArgs {
12750        fn compat_from(value: crate::StartChildArgs) -> Self {
12751            Self {
12752                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12753
12754                namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
12755
12756                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12757
12758                __source_breaking: ::fidl::marker::SourceBreaking,
12759            }
12760        }
12761    }
12762
12763    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartChildArgs> for crate::StartChildArgs {
12764        fn compat_from(value: ::fidl_fuchsia_component::StartChildArgs) -> Self {
12765            Self {
12766                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12767
12768                namespace_entries: ::fidl_next::CompatFrom::compat_from(value.namespace_entries),
12769
12770                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12771            }
12772        }
12773    }
12774
12775    impl ::fidl_next::CompatFrom<crate::ControllerStartRequest>
12776        for ::fidl_fuchsia_component::ControllerStartRequest
12777    {
12778        #[inline]
12779        fn compat_from(value: crate::ControllerStartRequest) -> Self {
12780            Self {
12781                args: ::fidl_next::CompatFrom::compat_from(value.args),
12782
12783                execution_controller: ::fidl_next::CompatFrom::compat_from(
12784                    value.execution_controller,
12785                ),
12786            }
12787        }
12788    }
12789
12790    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerStartRequest>
12791        for crate::ControllerStartRequest
12792    {
12793        #[inline]
12794        fn compat_from(value: ::fidl_fuchsia_component::ControllerStartRequest) -> Self {
12795            Self {
12796                args: ::fidl_next::CompatFrom::compat_from(value.args),
12797
12798                execution_controller: ::fidl_next::CompatFrom::compat_from(
12799                    value.execution_controller,
12800                ),
12801            }
12802        }
12803    }
12804
12805    #[cfg(target_os = "fuchsia")]
12806    /// An alias for a client over `zx::Channel` for the `Controller`
12807    /// protocol.
12808    pub type ControllerProxy = ::fidl_next::Client<crate::Controller>;
12809
12810    impl ::fidl_next::CompatFrom<crate::Controller> for ::fidl_fuchsia_component::ControllerMarker {
12811        fn compat_from(_: crate::Controller) -> Self {
12812            Self
12813        }
12814    }
12815
12816    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ControllerMarker> for crate::Controller {
12817        fn compat_from(_: ::fidl_fuchsia_component::ControllerMarker) -> Self {
12818            Self
12819        }
12820    }
12821
12822    #[cfg(target_os = "fuchsia")]
12823
12824    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ControllerProxy>
12825        for crate::Controller
12826    {
12827        fn client_compat_from(
12828            proxy: ::fidl_fuchsia_component::ControllerProxy,
12829        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
12830            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
12831            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
12832            ::fidl_next::ClientDispatcher::new(client_end)
12833        }
12834    }
12835
12836    impl ::fidl_next::CompatFrom<crate::CreateChildArgs> for ::fidl_fuchsia_component::CreateChildArgs {
12837        fn compat_from(value: crate::CreateChildArgs) -> Self {
12838            Self {
12839                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12840
12841                dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
12842
12843                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12844
12845                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12846
12847                __source_breaking: ::fidl::marker::SourceBreaking,
12848            }
12849        }
12850    }
12851
12852    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::CreateChildArgs> for crate::CreateChildArgs {
12853        fn compat_from(value: ::fidl_fuchsia_component::CreateChildArgs) -> Self {
12854            Self {
12855                numbered_handles: ::fidl_next::CompatFrom::compat_from(value.numbered_handles),
12856
12857                dynamic_offers: ::fidl_next::CompatFrom::compat_from(value.dynamic_offers),
12858
12859                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
12860
12861                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
12862            }
12863        }
12864    }
12865
12866    impl ::fidl_next::CompatFrom<crate::DebugStartedPayload>
12867        for ::fidl_fuchsia_component::DebugStartedPayload
12868    {
12869        fn compat_from(value: crate::DebugStartedPayload) -> Self {
12870            Self {
12871                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
12872
12873                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
12874
12875                __source_breaking: ::fidl::marker::SourceBreaking,
12876            }
12877        }
12878    }
12879
12880    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DebugStartedPayload>
12881        for crate::DebugStartedPayload
12882    {
12883        fn compat_from(value: ::fidl_fuchsia_component::DebugStartedPayload) -> Self {
12884            Self {
12885                runtime_dir: ::fidl_next::CompatFrom::compat_from(value.runtime_dir),
12886
12887                break_on_start: ::fidl_next::CompatFrom::compat_from(value.break_on_start),
12888            }
12889        }
12890    }
12891
12892    impl ::fidl_next::CompatFrom<crate::DeletionError> for ::fidl_fuchsia_component::DeletionError {
12893        fn compat_from(value: crate::DeletionError) -> Self {
12894            match value {
12895                crate::DeletionError::Connection => Self::Connection,
12896
12897                crate::DeletionError::Protocol => Self::Protocol,
12898
12899                crate::DeletionError::NoneAvailable => Self::NoneAvailable,
12900
12901                crate::DeletionError::Unsupported => Self::Unsupported,
12902            }
12903        }
12904    }
12905
12906    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DeletionError> for crate::DeletionError {
12907        fn compat_from(value: ::fidl_fuchsia_component::DeletionError) -> Self {
12908            match value {
12909                ::fidl_fuchsia_component::DeletionError::Connection => Self::Connection,
12910
12911                ::fidl_fuchsia_component::DeletionError::Protocol => Self::Protocol,
12912
12913                ::fidl_fuchsia_component::DeletionError::NoneAvailable => Self::NoneAvailable,
12914
12915                ::fidl_fuchsia_component::DeletionError::Unsupported => Self::Unsupported,
12916            }
12917        }
12918    }
12919
12920    impl ::fidl_next::CompatFrom<crate::DestroyedPayload>
12921        for ::fidl_fuchsia_component::DestroyedPayload
12922    {
12923        fn compat_from(value: crate::DestroyedPayload) -> Self {
12924            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12925        }
12926    }
12927
12928    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DestroyedPayload>
12929        for crate::DestroyedPayload
12930    {
12931        fn compat_from(value: ::fidl_fuchsia_component::DestroyedPayload) -> Self {
12932            Self {}
12933        }
12934    }
12935
12936    impl ::fidl_next::CompatFrom<crate::DiscoveredPayload>
12937        for ::fidl_fuchsia_component::DiscoveredPayload
12938    {
12939        fn compat_from(value: crate::DiscoveredPayload) -> Self {
12940            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12941        }
12942    }
12943
12944    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::DiscoveredPayload>
12945        for crate::DiscoveredPayload
12946    {
12947        fn compat_from(value: ::fidl_fuchsia_component::DiscoveredPayload) -> Self {
12948            Self {}
12949        }
12950    }
12951
12952    impl ::fidl_next::CompatFrom<crate::PurgedPayload> for ::fidl_fuchsia_component::PurgedPayload {
12953        fn compat_from(value: crate::PurgedPayload) -> Self {
12954            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12955        }
12956    }
12957
12958    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::PurgedPayload> for crate::PurgedPayload {
12959        fn compat_from(value: ::fidl_fuchsia_component::PurgedPayload) -> Self {
12960            Self {}
12961        }
12962    }
12963
12964    impl ::fidl_next::CompatFrom<crate::ResolvedPayload> for ::fidl_fuchsia_component::ResolvedPayload {
12965        fn compat_from(value: crate::ResolvedPayload) -> Self {
12966            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12967        }
12968    }
12969
12970    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ResolvedPayload> for crate::ResolvedPayload {
12971        fn compat_from(value: ::fidl_fuchsia_component::ResolvedPayload) -> Self {
12972            Self {}
12973        }
12974    }
12975
12976    impl ::fidl_next::CompatFrom<crate::StartedPayload> for ::fidl_fuchsia_component::StartedPayload {
12977        fn compat_from(value: crate::StartedPayload) -> Self {
12978            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12979        }
12980    }
12981
12982    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StartedPayload> for crate::StartedPayload {
12983        fn compat_from(value: ::fidl_fuchsia_component::StartedPayload) -> Self {
12984            Self {}
12985        }
12986    }
12987
12988    impl ::fidl_next::CompatFrom<crate::UnresolvedPayload>
12989        for ::fidl_fuchsia_component::UnresolvedPayload
12990    {
12991        fn compat_from(value: crate::UnresolvedPayload) -> Self {
12992            Self { __source_breaking: ::fidl::marker::SourceBreaking }
12993        }
12994    }
12995
12996    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::UnresolvedPayload>
12997        for crate::UnresolvedPayload
12998    {
12999        fn compat_from(value: ::fidl_fuchsia_component::UnresolvedPayload) -> Self {
13000            Self {}
13001        }
13002    }
13003
13004    impl ::fidl_next::CompatFrom<crate::EventType> for ::fidl_fuchsia_component::EventType {
13005        fn compat_from(value: crate::EventType) -> Self {
13006            match value {
13007                crate::EventType::CapabilityRequested => Self::CapabilityRequested,
13008
13009                crate::EventType::Discovered => Self::Discovered,
13010
13011                crate::EventType::Destroyed => Self::Destroyed,
13012
13013                crate::EventType::Resolved => Self::Resolved,
13014
13015                crate::EventType::Started => Self::Started,
13016
13017                crate::EventType::Stopped => Self::Stopped,
13018
13019                crate::EventType::DebugStarted => Self::DebugStarted,
13020
13021                crate::EventType::Unresolved => Self::Unresolved,
13022            }
13023        }
13024    }
13025
13026    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventType> for crate::EventType {
13027        fn compat_from(value: ::fidl_fuchsia_component::EventType) -> Self {
13028            match value {
13029                ::fidl_fuchsia_component::EventType::CapabilityRequested => {
13030                    Self::CapabilityRequested
13031                }
13032
13033                ::fidl_fuchsia_component::EventType::Discovered => Self::Discovered,
13034
13035                ::fidl_fuchsia_component::EventType::Destroyed => Self::Destroyed,
13036
13037                ::fidl_fuchsia_component::EventType::Resolved => Self::Resolved,
13038
13039                ::fidl_fuchsia_component::EventType::Started => Self::Started,
13040
13041                ::fidl_fuchsia_component::EventType::Stopped => Self::Stopped,
13042
13043                ::fidl_fuchsia_component::EventType::DebugStarted => Self::DebugStarted,
13044
13045                ::fidl_fuchsia_component::EventType::Unresolved => Self::Unresolved,
13046            }
13047        }
13048    }
13049
13050    impl ::fidl_next::CompatFrom<crate::StoppedPayload> for ::fidl_fuchsia_component::StoppedPayload {
13051        fn compat_from(value: crate::StoppedPayload) -> Self {
13052            Self {
13053                status: ::fidl_next::CompatFrom::compat_from(value.status),
13054
13055                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
13056
13057                __source_breaking: ::fidl::marker::SourceBreaking,
13058            }
13059        }
13060    }
13061
13062    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StoppedPayload> for crate::StoppedPayload {
13063        fn compat_from(value: ::fidl_fuchsia_component::StoppedPayload) -> Self {
13064            Self {
13065                status: ::fidl_next::CompatFrom::compat_from(value.status),
13066
13067                exit_code: ::fidl_next::CompatFrom::compat_from(value.exit_code),
13068            }
13069        }
13070    }
13071
13072    impl ::fidl_next::CompatFrom<crate::EventHeader> for ::fidl_fuchsia_component::EventHeader {
13073        fn compat_from(value: crate::EventHeader) -> Self {
13074            Self {
13075                event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
13076
13077                moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
13078
13079                component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
13080
13081                timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
13082
13083                __source_breaking: ::fidl::marker::SourceBreaking,
13084            }
13085        }
13086    }
13087
13088    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventHeader> for crate::EventHeader {
13089        fn compat_from(value: ::fidl_fuchsia_component::EventHeader) -> Self {
13090            Self {
13091                event_type: ::fidl_next::CompatFrom::compat_from(value.event_type),
13092
13093                moniker: ::fidl_next::CompatFrom::compat_from(value.moniker),
13094
13095                component_url: ::fidl_next::CompatFrom::compat_from(value.component_url),
13096
13097                timestamp: ::fidl_next::CompatFrom::compat_from(value.timestamp),
13098            }
13099        }
13100    }
13101
13102    impl ::fidl_next::CompatFrom<crate::EventPayload> for ::fidl_fuchsia_component::EventPayload {
13103        fn compat_from(value: crate::EventPayload) -> Self {
13104            match value {
13105                crate::EventPayload::CapabilityRequested(value) => {
13106                    Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
13107                }
13108
13109                crate::EventPayload::Purged(value) => {
13110                    Self::Purged(::fidl_next::CompatFrom::compat_from(value))
13111                }
13112
13113                crate::EventPayload::Discovered(value) => {
13114                    Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
13115                }
13116
13117                crate::EventPayload::Destroyed(value) => {
13118                    Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
13119                }
13120
13121                crate::EventPayload::Resolved(value) => {
13122                    Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
13123                }
13124
13125                crate::EventPayload::Started(value) => {
13126                    Self::Started(::fidl_next::CompatFrom::compat_from(value))
13127                }
13128
13129                crate::EventPayload::Stopped(value) => {
13130                    Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
13131                }
13132
13133                crate::EventPayload::DebugStarted(value) => {
13134                    Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
13135                }
13136
13137                crate::EventPayload::Unresolved(value) => {
13138                    Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
13139                }
13140
13141                crate::EventPayload::UnknownOrdinal_(unknown_ordinal) => {
13142                    Self::__SourceBreaking { unknown_ordinal }
13143                }
13144            }
13145        }
13146    }
13147
13148    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventPayload> for crate::EventPayload {
13149        fn compat_from(value: ::fidl_fuchsia_component::EventPayload) -> Self {
13150            match value {
13151                ::fidl_fuchsia_component::EventPayload::CapabilityRequested(value) => {
13152                    Self::CapabilityRequested(::fidl_next::CompatFrom::compat_from(value))
13153                }
13154
13155                ::fidl_fuchsia_component::EventPayload::Purged(value) => {
13156                    Self::Purged(::fidl_next::CompatFrom::compat_from(value))
13157                }
13158
13159                ::fidl_fuchsia_component::EventPayload::Discovered(value) => {
13160                    Self::Discovered(::fidl_next::CompatFrom::compat_from(value))
13161                }
13162
13163                ::fidl_fuchsia_component::EventPayload::Destroyed(value) => {
13164                    Self::Destroyed(::fidl_next::CompatFrom::compat_from(value))
13165                }
13166
13167                ::fidl_fuchsia_component::EventPayload::Resolved(value) => {
13168                    Self::Resolved(::fidl_next::CompatFrom::compat_from(value))
13169                }
13170
13171                ::fidl_fuchsia_component::EventPayload::Started(value) => {
13172                    Self::Started(::fidl_next::CompatFrom::compat_from(value))
13173                }
13174
13175                ::fidl_fuchsia_component::EventPayload::Stopped(value) => {
13176                    Self::Stopped(::fidl_next::CompatFrom::compat_from(value))
13177                }
13178
13179                ::fidl_fuchsia_component::EventPayload::DebugStarted(value) => {
13180                    Self::DebugStarted(::fidl_next::CompatFrom::compat_from(value))
13181                }
13182
13183                ::fidl_fuchsia_component::EventPayload::Unresolved(value) => {
13184                    Self::Unresolved(::fidl_next::CompatFrom::compat_from(value))
13185                }
13186
13187                ::fidl_fuchsia_component::EventPayload::__SourceBreaking { unknown_ordinal } => {
13188                    Self::UnknownOrdinal_(unknown_ordinal)
13189                }
13190            }
13191        }
13192    }
13193
13194    impl ::fidl_next::CompatFrom<crate::Event> for ::fidl_fuchsia_component::Event {
13195        fn compat_from(value: crate::Event) -> Self {
13196            Self {
13197                header: ::fidl_next::CompatFrom::compat_from(value.header),
13198
13199                payload: ::fidl_next::CompatFrom::compat_from(value.payload),
13200
13201                __source_breaking: ::fidl::marker::SourceBreaking,
13202            }
13203        }
13204    }
13205
13206    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::Event> for crate::Event {
13207        fn compat_from(value: ::fidl_fuchsia_component::Event) -> Self {
13208            Self {
13209                header: ::fidl_next::CompatFrom::compat_from(value.header),
13210
13211                payload: ::fidl_next::CompatFrom::compat_from(value.payload),
13212            }
13213        }
13214    }
13215
13216    impl ::fidl_next::CompatFrom<crate::EventStreamGetNextResponse>
13217        for ::fidl_fuchsia_component::EventStreamGetNextResponse
13218    {
13219        #[inline]
13220        fn compat_from(value: crate::EventStreamGetNextResponse) -> Self {
13221            Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
13222        }
13223    }
13224
13225    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamGetNextResponse>
13226        for crate::EventStreamGetNextResponse
13227    {
13228        #[inline]
13229        fn compat_from(value: ::fidl_fuchsia_component::EventStreamGetNextResponse) -> Self {
13230            Self { events: ::fidl_next::CompatFrom::compat_from(value.events) }
13231        }
13232    }
13233
13234    #[cfg(target_os = "fuchsia")]
13235    /// An alias for a client over `zx::Channel` for the `EventStream`
13236    /// protocol.
13237    pub type EventStreamProxy = ::fidl_next::Client<crate::EventStream>;
13238
13239    impl ::fidl_next::CompatFrom<crate::EventStream> for ::fidl_fuchsia_component::EventStreamMarker {
13240        fn compat_from(_: crate::EventStream) -> Self {
13241            Self
13242        }
13243    }
13244
13245    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::EventStreamMarker> for crate::EventStream {
13246        fn compat_from(_: ::fidl_fuchsia_component::EventStreamMarker) -> Self {
13247            Self
13248        }
13249    }
13250
13251    #[cfg(target_os = "fuchsia")]
13252
13253    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::EventStreamProxy>
13254        for crate::EventStream
13255    {
13256        fn client_compat_from(
13257            proxy: ::fidl_fuchsia_component::EventStreamProxy,
13258        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13259            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13260            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13261            ::fidl_next::ClientDispatcher::new(client_end)
13262        }
13263    }
13264
13265    impl ::fidl_next::CompatFrom<crate::ExecutionControllerOnStopRequest>
13266        for ::fidl_fuchsia_component::ExecutionControllerOnStopRequest
13267    {
13268        #[inline]
13269        fn compat_from(value: crate::ExecutionControllerOnStopRequest) -> Self {
13270            Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
13271        }
13272    }
13273
13274    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerOnStopRequest>
13275        for crate::ExecutionControllerOnStopRequest
13276    {
13277        #[inline]
13278        fn compat_from(value: ::fidl_fuchsia_component::ExecutionControllerOnStopRequest) -> Self {
13279            Self { stopped_payload: ::fidl_next::CompatFrom::compat_from(value.stopped_payload) }
13280        }
13281    }
13282
13283    #[cfg(target_os = "fuchsia")]
13284    /// An alias for a client over `zx::Channel` for the `ExecutionController`
13285    /// protocol.
13286    pub type ExecutionControllerProxy = ::fidl_next::Client<crate::ExecutionController>;
13287
13288    impl ::fidl_next::CompatFrom<crate::ExecutionController>
13289        for ::fidl_fuchsia_component::ExecutionControllerMarker
13290    {
13291        fn compat_from(_: crate::ExecutionController) -> Self {
13292            Self
13293        }
13294    }
13295
13296    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::ExecutionControllerMarker>
13297        for crate::ExecutionController
13298    {
13299        fn compat_from(_: ::fidl_fuchsia_component::ExecutionControllerMarker) -> Self {
13300            Self
13301        }
13302    }
13303
13304    #[cfg(target_os = "fuchsia")]
13305
13306    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::ExecutionControllerProxy>
13307        for crate::ExecutionController
13308    {
13309        fn client_compat_from(
13310            proxy: ::fidl_fuchsia_component::ExecutionControllerProxy,
13311        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13312            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13313            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13314            ::fidl_next::ClientDispatcher::new(client_end)
13315        }
13316    }
13317
13318    impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerRequest>
13319        for ::fidl_fuchsia_component::IntrospectorGetMonikerRequest
13320    {
13321        #[inline]
13322        fn compat_from(value: crate::IntrospectorGetMonikerRequest) -> Self {
13323            Self {
13324                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
13325            }
13326        }
13327    }
13328
13329    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerRequest>
13330        for crate::IntrospectorGetMonikerRequest
13331    {
13332        #[inline]
13333        fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerRequest) -> Self {
13334            Self {
13335                component_instance: ::fidl_next::CompatFrom::compat_from(value.component_instance),
13336            }
13337        }
13338    }
13339
13340    impl ::fidl_next::CompatFrom<crate::IntrospectorGetMonikerResponse>
13341        for ::fidl_fuchsia_component::IntrospectorGetMonikerResponse
13342    {
13343        #[inline]
13344        fn compat_from(value: crate::IntrospectorGetMonikerResponse) -> Self {
13345            Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
13346        }
13347    }
13348
13349    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorGetMonikerResponse>
13350        for crate::IntrospectorGetMonikerResponse
13351    {
13352        #[inline]
13353        fn compat_from(value: ::fidl_fuchsia_component::IntrospectorGetMonikerResponse) -> Self {
13354            Self { moniker: ::fidl_next::CompatFrom::compat_from(value.moniker) }
13355        }
13356    }
13357
13358    #[cfg(target_os = "fuchsia")]
13359    /// An alias for a client over `zx::Channel` for the `Introspector`
13360    /// protocol.
13361    pub type IntrospectorProxy = ::fidl_next::Client<crate::Introspector>;
13362
13363    impl ::fidl_next::CompatFrom<crate::Introspector> for ::fidl_fuchsia_component::IntrospectorMarker {
13364        fn compat_from(_: crate::Introspector) -> Self {
13365            Self
13366        }
13367    }
13368
13369    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::IntrospectorMarker> for crate::Introspector {
13370        fn compat_from(_: ::fidl_fuchsia_component::IntrospectorMarker) -> Self {
13371            Self
13372        }
13373    }
13374
13375    #[cfg(target_os = "fuchsia")]
13376
13377    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::IntrospectorProxy>
13378        for crate::Introspector
13379    {
13380        fn client_compat_from(
13381            proxy: ::fidl_fuchsia_component::IntrospectorProxy,
13382        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13383            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13384            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13385            ::fidl_next::ClientDispatcher::new(client_end)
13386        }
13387    }
13388
13389    impl ::fidl_next::CompatFrom<crate::NamespaceInputEntry>
13390        for ::fidl_fuchsia_component::NamespaceInputEntry
13391    {
13392        #[inline]
13393        fn compat_from(value: crate::NamespaceInputEntry) -> Self {
13394            Self {
13395                path: ::fidl_next::CompatFrom::compat_from(value.path),
13396
13397                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
13398            }
13399        }
13400    }
13401
13402    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceInputEntry>
13403        for crate::NamespaceInputEntry
13404    {
13405        #[inline]
13406        fn compat_from(value: ::fidl_fuchsia_component::NamespaceInputEntry) -> Self {
13407            Self {
13408                path: ::fidl_next::CompatFrom::compat_from(value.path),
13409
13410                dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary),
13411            }
13412        }
13413    }
13414
13415    impl ::fidl_next::CompatFrom<crate::NamespaceCreateRequest>
13416        for ::fidl_fuchsia_component::NamespaceCreateRequest
13417    {
13418        #[inline]
13419        fn compat_from(value: crate::NamespaceCreateRequest) -> Self {
13420            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13421        }
13422    }
13423
13424    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateRequest>
13425        for crate::NamespaceCreateRequest
13426    {
13427        #[inline]
13428        fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateRequest) -> Self {
13429            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13430        }
13431    }
13432
13433    impl ::fidl_next::CompatFrom<crate::NamespaceError> for ::fidl_fuchsia_component::NamespaceError {
13434        fn compat_from(value: crate::NamespaceError) -> Self {
13435            match value {
13436                crate::NamespaceError::Shadow => Self::Shadow,
13437
13438                crate::NamespaceError::Duplicate => Self::Duplicate,
13439
13440                crate::NamespaceError::Conversion => Self::Conversion,
13441
13442                crate::NamespaceError::BadEntry => Self::BadEntry,
13443
13444                crate::NamespaceError::DictionaryRead => Self::DictionaryRead,
13445
13446                crate::NamespaceError::UnknownOrdinal_(unknown_ordinal) => {
13447                    Self::__SourceBreaking { unknown_ordinal }
13448                }
13449            }
13450        }
13451    }
13452
13453    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceError> for crate::NamespaceError {
13454        fn compat_from(value: ::fidl_fuchsia_component::NamespaceError) -> Self {
13455            match value {
13456                ::fidl_fuchsia_component::NamespaceError::Shadow => Self::Shadow,
13457
13458                ::fidl_fuchsia_component::NamespaceError::Duplicate => Self::Duplicate,
13459
13460                ::fidl_fuchsia_component::NamespaceError::Conversion => Self::Conversion,
13461
13462                ::fidl_fuchsia_component::NamespaceError::BadEntry => Self::BadEntry,
13463
13464                ::fidl_fuchsia_component::NamespaceError::DictionaryRead => Self::DictionaryRead,
13465
13466                ::fidl_fuchsia_component::NamespaceError::__SourceBreaking {
13467                    unknown_ordinal: value,
13468                } => Self::UnknownOrdinal_(value),
13469            }
13470        }
13471    }
13472
13473    impl ::fidl_next::CompatFrom<crate::NamespaceCreateResponse>
13474        for ::fidl_fuchsia_component::NamespaceCreateResponse
13475    {
13476        #[inline]
13477        fn compat_from(value: crate::NamespaceCreateResponse) -> Self {
13478            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13479        }
13480    }
13481
13482    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceCreateResponse>
13483        for crate::NamespaceCreateResponse
13484    {
13485        #[inline]
13486        fn compat_from(value: ::fidl_fuchsia_component::NamespaceCreateResponse) -> Self {
13487            Self { entries: ::fidl_next::CompatFrom::compat_from(value.entries) }
13488        }
13489    }
13490
13491    #[cfg(target_os = "fuchsia")]
13492    /// An alias for a client over `zx::Channel` for the `Namespace`
13493    /// protocol.
13494    pub type NamespaceProxy = ::fidl_next::Client<crate::Namespace>;
13495
13496    impl ::fidl_next::CompatFrom<crate::Namespace> for ::fidl_fuchsia_component::NamespaceMarker {
13497        fn compat_from(_: crate::Namespace) -> Self {
13498            Self
13499        }
13500    }
13501
13502    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::NamespaceMarker> for crate::Namespace {
13503        fn compat_from(_: ::fidl_fuchsia_component::NamespaceMarker) -> Self {
13504            Self
13505        }
13506    }
13507
13508    #[cfg(target_os = "fuchsia")]
13509
13510    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::NamespaceProxy> for crate::Namespace {
13511        fn client_compat_from(
13512            proxy: ::fidl_fuchsia_component::NamespaceProxy,
13513        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13514            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13515            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13516            ::fidl_next::ClientDispatcher::new(client_end)
13517        }
13518    }
13519
13520    impl ::fidl_next::CompatFrom<crate::RealmDestroyChildRequest>
13521        for ::fidl_fuchsia_component::RealmDestroyChildRequest
13522    {
13523        #[inline]
13524        fn compat_from(value: crate::RealmDestroyChildRequest) -> Self {
13525            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13526        }
13527    }
13528
13529    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmDestroyChildRequest>
13530        for crate::RealmDestroyChildRequest
13531    {
13532        #[inline]
13533        fn compat_from(value: ::fidl_fuchsia_component::RealmDestroyChildRequest) -> Self {
13534            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13535        }
13536    }
13537
13538    impl ::fidl_next::CompatFrom<crate::RealmListChildrenRequest>
13539        for ::fidl_fuchsia_component::RealmListChildrenRequest
13540    {
13541        #[inline]
13542        fn compat_from(value: crate::RealmListChildrenRequest) -> Self {
13543            Self {
13544                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13545
13546                iter: ::fidl_next::CompatFrom::compat_from(value.iter),
13547            }
13548        }
13549    }
13550
13551    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmListChildrenRequest>
13552        for crate::RealmListChildrenRequest
13553    {
13554        #[inline]
13555        fn compat_from(value: ::fidl_fuchsia_component::RealmListChildrenRequest) -> Self {
13556            Self {
13557                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13558
13559                iter: ::fidl_next::CompatFrom::compat_from(value.iter),
13560            }
13561        }
13562    }
13563
13564    impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryRequest>
13565        for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest
13566    {
13567        #[inline]
13568        fn compat_from(value: crate::RealmGetChildOutputDictionaryRequest) -> Self {
13569            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13570        }
13571    }
13572
13573    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest>
13574        for crate::RealmGetChildOutputDictionaryRequest
13575    {
13576        #[inline]
13577        fn compat_from(
13578            value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryRequest,
13579        ) -> Self {
13580            Self { child: ::fidl_next::CompatFrom::compat_from(value.child) }
13581        }
13582    }
13583
13584    impl ::fidl_next::CompatFrom<crate::RealmGetChildOutputDictionaryResponse>
13585        for ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse
13586    {
13587        #[inline]
13588        fn compat_from(value: crate::RealmGetChildOutputDictionaryResponse) -> Self {
13589            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
13590        }
13591    }
13592
13593    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse>
13594        for crate::RealmGetChildOutputDictionaryResponse
13595    {
13596        #[inline]
13597        fn compat_from(
13598            value: ::fidl_fuchsia_component::RealmGetChildOutputDictionaryResponse,
13599        ) -> Self {
13600            Self { dictionary: ::fidl_next::CompatFrom::compat_from(value.dictionary) }
13601        }
13602    }
13603
13604    impl ::fidl_next::CompatFrom<crate::RealmOpenControllerRequest>
13605        for ::fidl_fuchsia_component::RealmOpenControllerRequest
13606    {
13607        #[inline]
13608        fn compat_from(value: crate::RealmOpenControllerRequest) -> Self {
13609            Self {
13610                child: ::fidl_next::CompatFrom::compat_from(value.child),
13611
13612                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
13613            }
13614        }
13615    }
13616
13617    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenControllerRequest>
13618        for crate::RealmOpenControllerRequest
13619    {
13620        #[inline]
13621        fn compat_from(value: ::fidl_fuchsia_component::RealmOpenControllerRequest) -> Self {
13622            Self {
13623                child: ::fidl_next::CompatFrom::compat_from(value.child),
13624
13625                controller: ::fidl_next::CompatFrom::compat_from(value.controller),
13626            }
13627        }
13628    }
13629
13630    impl ::fidl_next::CompatFrom<crate::RealmOpenExposedDirRequest>
13631        for ::fidl_fuchsia_component::RealmOpenExposedDirRequest
13632    {
13633        #[inline]
13634        fn compat_from(value: crate::RealmOpenExposedDirRequest) -> Self {
13635            Self {
13636                child: ::fidl_next::CompatFrom::compat_from(value.child),
13637
13638                exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
13639            }
13640        }
13641    }
13642
13643    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmOpenExposedDirRequest>
13644        for crate::RealmOpenExposedDirRequest
13645    {
13646        #[inline]
13647        fn compat_from(value: ::fidl_fuchsia_component::RealmOpenExposedDirRequest) -> Self {
13648            Self {
13649                child: ::fidl_next::CompatFrom::compat_from(value.child),
13650
13651                exposed_dir: ::fidl_next::CompatFrom::compat_from(value.exposed_dir),
13652            }
13653        }
13654    }
13655
13656    impl ::fidl_next::CompatFrom<crate::RealmCreateChildRequest>
13657        for ::fidl_fuchsia_component::RealmCreateChildRequest
13658    {
13659        #[inline]
13660        fn compat_from(value: crate::RealmCreateChildRequest) -> Self {
13661            Self {
13662                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13663
13664                decl: ::fidl_next::CompatFrom::compat_from(value.decl),
13665
13666                args: ::fidl_next::CompatFrom::compat_from(value.args),
13667            }
13668        }
13669    }
13670
13671    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmCreateChildRequest>
13672        for crate::RealmCreateChildRequest
13673    {
13674        #[inline]
13675        fn compat_from(value: ::fidl_fuchsia_component::RealmCreateChildRequest) -> Self {
13676            Self {
13677                collection: ::fidl_next::CompatFrom::compat_from(value.collection),
13678
13679                decl: ::fidl_next::CompatFrom::compat_from(value.decl),
13680
13681                args: ::fidl_next::CompatFrom::compat_from(value.args),
13682            }
13683        }
13684    }
13685
13686    impl ::fidl_next::CompatFrom<crate::RealmGetResolvedInfoResponse>
13687        for ::fidl_fuchsia_component::RealmGetResolvedInfoResponse
13688    {
13689        #[inline]
13690        fn compat_from(value: crate::RealmGetResolvedInfoResponse) -> Self {
13691            Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
13692        }
13693    }
13694
13695    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmGetResolvedInfoResponse>
13696        for crate::RealmGetResolvedInfoResponse
13697    {
13698        #[inline]
13699        fn compat_from(value: ::fidl_fuchsia_component::RealmGetResolvedInfoResponse) -> Self {
13700            Self { resolved_info: ::fidl_next::CompatFrom::compat_from(value.resolved_info) }
13701        }
13702    }
13703
13704    #[cfg(target_os = "fuchsia")]
13705    /// An alias for a client over `zx::Channel` for the `Realm`
13706    /// protocol.
13707    pub type RealmProxy = ::fidl_next::Client<crate::Realm>;
13708
13709    impl ::fidl_next::CompatFrom<crate::Realm> for ::fidl_fuchsia_component::RealmMarker {
13710        fn compat_from(_: crate::Realm) -> Self {
13711            Self
13712        }
13713    }
13714
13715    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::RealmMarker> for crate::Realm {
13716        fn compat_from(_: ::fidl_fuchsia_component::RealmMarker) -> Self {
13717            Self
13718        }
13719    }
13720
13721    #[cfg(target_os = "fuchsia")]
13722
13723    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::RealmProxy> for crate::Realm {
13724        fn client_compat_from(
13725            proxy: ::fidl_fuchsia_component::RealmProxy,
13726        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13727            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13728            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13729            ::fidl_next::ClientDispatcher::new(client_end)
13730        }
13731    }
13732
13733    impl ::fidl_next::CompatFrom<crate::StatusError> for ::fidl_fuchsia_component::StatusError {
13734        fn compat_from(value: crate::StatusError) -> Self {
13735            match value {
13736                crate::StatusError::Provider => Self::Provider,
13737
13738                crate::StatusError::ResponseInvalid => Self::ResponseInvalid,
13739
13740                crate::StatusError::StatusUnknown => Self::StatusUnknown,
13741
13742                crate::StatusError::Unsupported => Self::Unsupported,
13743            }
13744        }
13745    }
13746
13747    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StatusError> for crate::StatusError {
13748        fn compat_from(value: ::fidl_fuchsia_component::StatusError) -> Self {
13749            match value {
13750                ::fidl_fuchsia_component::StatusError::Provider => Self::Provider,
13751
13752                ::fidl_fuchsia_component::StatusError::ResponseInvalid => Self::ResponseInvalid,
13753
13754                ::fidl_fuchsia_component::StatusError::StatusUnknown => Self::StatusUnknown,
13755
13756                ::fidl_fuchsia_component::StatusError::Unsupported => Self::Unsupported,
13757            }
13758        }
13759    }
13760
13761    impl ::fidl_next::CompatFrom<crate::StorageAdminListStorageInRealmRequest>
13762        for ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest
13763    {
13764        #[inline]
13765        fn compat_from(value: crate::StorageAdminListStorageInRealmRequest) -> Self {
13766            Self {
13767                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13768
13769                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
13770            }
13771        }
13772    }
13773
13774    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest>
13775        for crate::StorageAdminListStorageInRealmRequest
13776    {
13777        #[inline]
13778        fn compat_from(
13779            value: ::fidl_fuchsia_component::StorageAdminListStorageInRealmRequest,
13780        ) -> Self {
13781            Self {
13782                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13783
13784                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
13785            }
13786        }
13787    }
13788
13789    impl ::fidl_next::CompatFrom<crate::StorageAdminDeleteComponentStorageRequest>
13790        for ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest
13791    {
13792        #[inline]
13793        fn compat_from(value: crate::StorageAdminDeleteComponentStorageRequest) -> Self {
13794            Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
13795        }
13796    }
13797
13798    impl
13799        ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest>
13800        for crate::StorageAdminDeleteComponentStorageRequest
13801    {
13802        #[inline]
13803        fn compat_from(
13804            value: ::fidl_fuchsia_component::StorageAdminDeleteComponentStorageRequest,
13805        ) -> Self {
13806            Self { relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker) }
13807        }
13808    }
13809
13810    impl ::fidl_next::CompatFrom<crate::StorageStatus> for ::fidl_fuchsia_component::StorageStatus {
13811        fn compat_from(value: crate::StorageStatus) -> Self {
13812            Self {
13813                total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
13814
13815                used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
13816
13817                __source_breaking: ::fidl::marker::SourceBreaking,
13818            }
13819        }
13820    }
13821
13822    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageStatus> for crate::StorageStatus {
13823        fn compat_from(value: ::fidl_fuchsia_component::StorageStatus) -> Self {
13824            Self {
13825                total_size: ::fidl_next::CompatFrom::compat_from(value.total_size),
13826
13827                used_size: ::fidl_next::CompatFrom::compat_from(value.used_size),
13828            }
13829        }
13830    }
13831
13832    impl ::fidl_next::CompatFrom<crate::StorageAdminOpenStorageRequest>
13833        for ::fidl_fuchsia_component::StorageAdminOpenStorageRequest
13834    {
13835        #[inline]
13836        fn compat_from(value: crate::StorageAdminOpenStorageRequest) -> Self {
13837            Self {
13838                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13839
13840                object: ::fidl_next::CompatFrom::compat_from(value.object),
13841            }
13842        }
13843    }
13844
13845    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminOpenStorageRequest>
13846        for crate::StorageAdminOpenStorageRequest
13847    {
13848        #[inline]
13849        fn compat_from(value: ::fidl_fuchsia_component::StorageAdminOpenStorageRequest) -> Self {
13850            Self {
13851                relative_moniker: ::fidl_next::CompatFrom::compat_from(value.relative_moniker),
13852
13853                object: ::fidl_next::CompatFrom::compat_from(value.object),
13854            }
13855        }
13856    }
13857
13858    impl ::fidl_next::CompatFrom<crate::StorageAdminOpenComponentStorageByIdRequest>
13859        for ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest
13860    {
13861        #[inline]
13862        fn compat_from(value: crate::StorageAdminOpenComponentStorageByIdRequest) -> Self {
13863            Self {
13864                id: ::fidl_next::CompatFrom::compat_from(value.id),
13865
13866                object: ::fidl_next::CompatFrom::compat_from(value.object),
13867            }
13868        }
13869    }
13870
13871    impl
13872        ::fidl_next::CompatFrom<
13873            ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
13874        > for crate::StorageAdminOpenComponentStorageByIdRequest
13875    {
13876        #[inline]
13877        fn compat_from(
13878            value: ::fidl_fuchsia_component::StorageAdminOpenComponentStorageByIdRequest,
13879        ) -> Self {
13880            Self {
13881                id: ::fidl_next::CompatFrom::compat_from(value.id),
13882
13883                object: ::fidl_next::CompatFrom::compat_from(value.object),
13884            }
13885        }
13886    }
13887
13888    #[cfg(target_os = "fuchsia")]
13889    /// An alias for a client over `zx::Channel` for the `StorageAdmin`
13890    /// protocol.
13891    pub type StorageAdminProxy = ::fidl_next::Client<crate::StorageAdmin>;
13892
13893    impl ::fidl_next::CompatFrom<crate::StorageAdmin> for ::fidl_fuchsia_component::StorageAdminMarker {
13894        fn compat_from(_: crate::StorageAdmin) -> Self {
13895            Self
13896        }
13897    }
13898
13899    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageAdminMarker> for crate::StorageAdmin {
13900        fn compat_from(_: ::fidl_fuchsia_component::StorageAdminMarker) -> Self {
13901            Self
13902        }
13903    }
13904
13905    #[cfg(target_os = "fuchsia")]
13906
13907    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageAdminProxy>
13908        for crate::StorageAdmin
13909    {
13910        fn client_compat_from(
13911            proxy: ::fidl_fuchsia_component::StorageAdminProxy,
13912        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13913            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13914            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13915            ::fidl_next::ClientDispatcher::new(client_end)
13916        }
13917    }
13918
13919    impl ::fidl_next::CompatFrom<crate::StorageIteratorNextResponse>
13920        for ::fidl_fuchsia_component::StorageIteratorNextResponse
13921    {
13922        #[inline]
13923        fn compat_from(value: crate::StorageIteratorNextResponse) -> Self {
13924            Self {
13925                relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
13926            }
13927        }
13928    }
13929
13930    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorNextResponse>
13931        for crate::StorageIteratorNextResponse
13932    {
13933        #[inline]
13934        fn compat_from(value: ::fidl_fuchsia_component::StorageIteratorNextResponse) -> Self {
13935            Self {
13936                relative_monikers: ::fidl_next::CompatFrom::compat_from(value.relative_monikers),
13937            }
13938        }
13939    }
13940
13941    #[cfg(target_os = "fuchsia")]
13942    /// An alias for a client over `zx::Channel` for the `StorageIterator`
13943    /// protocol.
13944    pub type StorageIteratorProxy = ::fidl_next::Client<crate::StorageIterator>;
13945
13946    impl ::fidl_next::CompatFrom<crate::StorageIterator>
13947        for ::fidl_fuchsia_component::StorageIteratorMarker
13948    {
13949        fn compat_from(_: crate::StorageIterator) -> Self {
13950            Self
13951        }
13952    }
13953
13954    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component::StorageIteratorMarker>
13955        for crate::StorageIterator
13956    {
13957        fn compat_from(_: ::fidl_fuchsia_component::StorageIteratorMarker) -> Self {
13958            Self
13959        }
13960    }
13961
13962    #[cfg(target_os = "fuchsia")]
13963
13964    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component::StorageIteratorProxy>
13965        for crate::StorageIterator
13966    {
13967        fn client_compat_from(
13968            proxy: ::fidl_fuchsia_component::StorageIteratorProxy,
13969        ) -> ::fidl_next::ClientDispatcher<Self, ::fidl_next::fuchsia::zx::Channel> {
13970            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
13971            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
13972            ::fidl_next::ClientDispatcher::new(client_end)
13973        }
13974    }
13975}