fidl_next_fuchsia_component_sandbox/
fidl_next_fuchsia_component_sandbox.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#[doc = " Describes the expected availability of the capability.\n\n Some capabilities may not be present on all system configurations. In those\n cases, the availability will be declared as `OPTIONAL` along the chains of\n exposes/offers/uses, and the capability would be routed from `void` on\n system configurations where it does not make sense to route or provide a\n particular capability (e.g. graphical capabilities on a headless system).\n"]
6#[derive(Clone, Copy, Debug, PartialEq, Eq)]
7#[repr(u32)]
8pub enum Availability {
9    Required = 1,
10    Optional = 2,
11    SameAsTarget = 3,
12    Transitional = 4,
13}
14
15impl ::fidl_next::Encodable for Availability {
16    type Encoded = WireAvailability;
17}
18impl ::std::convert::TryFrom<u32> for Availability {
19    type Error = ::fidl_next::UnknownStrictEnumMemberError;
20    fn try_from(value: u32) -> Result<Self, Self::Error> {
21        match value {
22            1 => Ok(Self::Required),
23            2 => Ok(Self::Optional),
24            3 => Ok(Self::SameAsTarget),
25            4 => Ok(Self::Transitional),
26
27            _ => Err(Self::Error::new(value.into())),
28        }
29    }
30}
31
32unsafe impl<___E> ::fidl_next::Encode<___E> for Availability
33where
34    ___E: ?Sized,
35{
36    #[inline]
37    fn encode(
38        &mut self,
39        _: &mut ___E,
40        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
41    ) -> Result<(), ::fidl_next::EncodeError> {
42        ::fidl_next::munge!(let WireAvailability { value } = out);
43        let _ = value.write(::fidl_next::WireU32::from(match *self {
44            Self::Required => 1,
45
46            Self::Optional => 2,
47
48            Self::SameAsTarget => 3,
49
50            Self::Transitional => 4,
51        }));
52
53        Ok(())
54    }
55}
56
57impl ::core::convert::From<WireAvailability> for Availability {
58    fn from(wire: WireAvailability) -> Self {
59        match u32::from(wire.value) {
60            1 => Self::Required,
61
62            2 => Self::Optional,
63
64            3 => Self::SameAsTarget,
65
66            4 => Self::Transitional,
67
68            _ => unsafe { ::core::hint::unreachable_unchecked() },
69        }
70    }
71}
72
73impl ::fidl_next::TakeFrom<WireAvailability> for Availability {
74    #[inline]
75    fn take_from(from: &WireAvailability) -> Self {
76        Self::from(*from)
77    }
78}
79
80/// The wire type corresponding to [`Availability`].
81#[derive(Clone, Copy, Debug, PartialEq, Eq)]
82#[repr(transparent)]
83pub struct WireAvailability {
84    value: ::fidl_next::WireU32,
85}
86
87unsafe impl ::fidl_next::ZeroPadding for WireAvailability {
88    #[inline]
89    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
90        // Wire enums have no padding
91    }
92}
93
94impl WireAvailability {
95    pub const REQUIRED: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(1) };
96
97    pub const OPTIONAL: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(2) };
98
99    pub const SAME_AS_TARGET: WireAvailability =
100        WireAvailability { value: ::fidl_next::WireU32(3) };
101
102    pub const TRANSITIONAL: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(4) };
103}
104
105unsafe impl<___D> ::fidl_next::Decode<___D> for WireAvailability
106where
107    ___D: ?Sized,
108{
109    fn decode(
110        slot: ::fidl_next::Slot<'_, Self>,
111        _: &mut ___D,
112    ) -> Result<(), ::fidl_next::DecodeError> {
113        ::fidl_next::munge!(let Self { value } = slot);
114
115        match u32::from(*value) {
116            1 | 2 | 3 | 4 => (),
117            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
118        }
119
120        Ok(())
121    }
122}
123
124impl ::core::convert::From<Availability> for WireAvailability {
125    fn from(natural: Availability) -> Self {
126        match natural {
127            Availability::Required => WireAvailability::REQUIRED,
128
129            Availability::Optional => WireAvailability::OPTIONAL,
130
131            Availability::SameAsTarget => WireAvailability::SAME_AS_TARGET,
132
133            Availability::Transitional => WireAvailability::TRANSITIONAL,
134        }
135    }
136}
137
138#[derive(Clone, Debug)]
139#[repr(C)]
140pub struct Unit {}
141
142impl ::fidl_next::Encodable for Unit {
143    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
144        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
145
146    type Encoded = WireUnit;
147}
148
149unsafe impl<___E> ::fidl_next::Encode<___E> for Unit
150where
151    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
152{
153    #[inline]
154    fn encode(
155        &mut self,
156        encoder: &mut ___E,
157        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
158    ) -> Result<(), ::fidl_next::EncodeError> {
159        ::fidl_next::munge! {
160            let Self::Encoded {
161
162            } = out;
163        }
164
165        Ok(())
166    }
167}
168
169impl ::fidl_next::EncodableOption for Box<Unit> {
170    type EncodedOption = ::fidl_next::WireBox<WireUnit>;
171}
172
173unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Unit>
174where
175    ___E: ::fidl_next::Encoder + ?Sized,
176    Unit: ::fidl_next::Encode<___E>,
177{
178    #[inline]
179    fn encode_option(
180        this: Option<&mut Self>,
181        encoder: &mut ___E,
182        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
183    ) -> Result<(), ::fidl_next::EncodeError> {
184        if let Some(inner) = this {
185            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
186            ::fidl_next::WireBox::encode_present(out);
187        } else {
188            ::fidl_next::WireBox::encode_absent(out);
189        }
190
191        Ok(())
192    }
193}
194
195impl ::fidl_next::TakeFrom<WireUnit> for Unit {
196    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
197        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
198
199    #[inline]
200    fn take_from(from: &WireUnit) -> Self {
201        Self {}
202    }
203}
204
205/// The wire type corresponding to [`Unit`].
206#[derive(Clone, Debug)]
207#[repr(C)]
208pub struct WireUnit {}
209
210unsafe impl ::fidl_next::ZeroPadding for WireUnit {
211    #[inline]
212    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
213}
214
215unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnit
216where
217    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
218{
219    fn decode(
220        slot: ::fidl_next::Slot<'_, Self>,
221        decoder: &mut ___D,
222    ) -> Result<(), ::fidl_next::DecodeError> {
223        ::fidl_next::munge! {
224            let Self {
225
226            } = slot;
227        }
228
229        Ok(())
230    }
231}
232
233#[doc = " Maximum number of bytes in a [Data].\n"]
234pub const MAX_DATA_LENGTH: u32 = 8192;
235
236#[derive(Clone, Debug)]
237pub enum Data {
238    Bytes(Vec<u8>),
239
240    String(String),
241
242    Int64(i64),
243
244    Uint64(u64),
245
246    UnknownOrdinal_(u64),
247}
248
249impl ::fidl_next::Encodable for Data {
250    type Encoded = WireData;
251}
252
253unsafe impl<___E> ::fidl_next::Encode<___E> for Data
254where
255    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
256
257    ___E: ::fidl_next::Encoder,
258{
259    #[inline]
260    fn encode(
261        &mut self,
262        encoder: &mut ___E,
263        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
264    ) -> Result<(), ::fidl_next::EncodeError> {
265        ::fidl_next::munge!(let WireData { raw } = out);
266
267        match self {
268            Self::Bytes(value) => {
269                ::fidl_next::RawWireUnion::encode_as::<___E, Vec<u8>>(value, 1, encoder, raw)?
270            }
271
272            Self::String(value) => {
273                ::fidl_next::RawWireUnion::encode_as::<___E, String>(value, 2, encoder, raw)?
274            }
275
276            Self::Int64(value) => {
277                ::fidl_next::RawWireUnion::encode_as::<___E, i64>(value, 3, encoder, raw)?
278            }
279
280            Self::Uint64(value) => {
281                ::fidl_next::RawWireUnion::encode_as::<___E, u64>(value, 4, encoder, raw)?
282            }
283
284            Self::UnknownOrdinal_(ordinal) => {
285                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize))
286            }
287        }
288
289        Ok(())
290    }
291}
292
293impl ::fidl_next::EncodableOption for Box<Data> {
294    type EncodedOption = WireOptionalData;
295}
296
297unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Data>
298where
299    ___E: ?Sized,
300    Data: ::fidl_next::Encode<___E>,
301{
302    #[inline]
303    fn encode_option(
304        this: Option<&mut Self>,
305        encoder: &mut ___E,
306        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
307    ) -> Result<(), ::fidl_next::EncodeError> {
308        ::fidl_next::munge!(let WireOptionalData { raw } = &mut *out);
309
310        if let Some(inner) = this {
311            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
312            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
313        } else {
314            ::fidl_next::RawWireUnion::encode_absent(raw);
315        }
316
317        Ok(())
318    }
319}
320
321impl ::fidl_next::TakeFrom<WireData> for Data {
322    #[inline]
323    fn take_from(from: &WireData) -> Self {
324        match from.raw.ordinal() {
325            1 => Self::Bytes(::fidl_next::TakeFrom::take_from(unsafe {
326                from.raw.get().deref_unchecked::<::fidl_next::WireVector<u8>>()
327            })),
328
329            2 => Self::String(::fidl_next::TakeFrom::take_from(unsafe {
330                from.raw.get().deref_unchecked::<::fidl_next::WireString>()
331            })),
332
333            3 => Self::Int64(::fidl_next::TakeFrom::take_from(unsafe {
334                from.raw.get().deref_unchecked::<::fidl_next::WireI64>()
335            })),
336
337            4 => Self::Uint64(::fidl_next::TakeFrom::take_from(unsafe {
338                from.raw.get().deref_unchecked::<::fidl_next::WireU64>()
339            })),
340
341            _ => unsafe { ::core::hint::unreachable_unchecked() },
342        }
343    }
344}
345
346impl ::fidl_next::TakeFrom<WireOptionalData> for Option<Box<Data>> {
347    #[inline]
348    fn take_from(from: &WireOptionalData) -> Self {
349        if let Some(inner) = from.as_ref() {
350            Some(::fidl_next::TakeFrom::take_from(inner))
351        } else {
352            None
353        }
354    }
355}
356
357/// The wire type corresponding to [`Data`].
358#[repr(transparent)]
359pub struct WireData {
360    raw: ::fidl_next::RawWireUnion,
361}
362
363unsafe impl ::fidl_next::ZeroPadding for WireData {
364    #[inline]
365    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
366        ::fidl_next::munge!(let Self { raw } = out);
367        ::fidl_next::RawWireUnion::zero_padding(raw);
368    }
369}
370
371pub mod data {
372    pub enum Ref<'union> {
373        Bytes(&'union ::fidl_next::WireVector<u8>),
374
375        String(&'union ::fidl_next::WireString),
376
377        Int64(&'union ::fidl_next::WireI64),
378
379        Uint64(&'union ::fidl_next::WireU64),
380
381        UnknownOrdinal_(u64),
382    }
383}
384
385impl WireData {
386    pub fn as_ref(&self) -> crate::data::Ref<'_> {
387        match self.raw.ordinal() {
388            1 => crate::data::Ref::Bytes(unsafe {
389                self.raw.get().deref_unchecked::<::fidl_next::WireVector<u8>>()
390            }),
391
392            2 => crate::data::Ref::String(unsafe {
393                self.raw.get().deref_unchecked::<::fidl_next::WireString>()
394            }),
395
396            3 => crate::data::Ref::Int64(unsafe {
397                self.raw.get().deref_unchecked::<::fidl_next::WireI64>()
398            }),
399
400            4 => crate::data::Ref::Uint64(unsafe {
401                self.raw.get().deref_unchecked::<::fidl_next::WireU64>()
402            }),
403
404            unknown => crate::data::Ref::UnknownOrdinal_(unknown),
405        }
406    }
407}
408
409unsafe impl<___D> ::fidl_next::Decode<___D> for WireData
410where
411    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
412
413    ___D: ::fidl_next::Decoder,
414{
415    fn decode(
416        mut slot: ::fidl_next::Slot<'_, Self>,
417        decoder: &mut ___D,
418    ) -> Result<(), ::fidl_next::DecodeError> {
419        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
420        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
421            1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<u8>>(
422                raw, decoder,
423            )?,
424
425            2 => {
426                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireString>(raw, decoder)?
427            }
428
429            3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI64>(raw, decoder)?,
430
431            4 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU64>(raw, decoder)?,
432
433            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
434        }
435
436        Ok(())
437    }
438}
439
440impl ::core::fmt::Debug for WireData {
441    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
442        match self.raw.ordinal() {
443            1 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireVector<u8>>().fmt(f) },
444            2 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireString>().fmt(f) },
445            3 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI64>().fmt(f) },
446            4 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireU64>().fmt(f) },
447            _ => unsafe { ::core::hint::unreachable_unchecked() },
448        }
449    }
450}
451
452#[repr(transparent)]
453pub struct WireOptionalData {
454    raw: ::fidl_next::RawWireUnion,
455}
456
457unsafe impl ::fidl_next::ZeroPadding for WireOptionalData {
458    #[inline]
459    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
460        ::fidl_next::munge!(let Self { raw } = out);
461        ::fidl_next::RawWireUnion::zero_padding(raw);
462    }
463}
464
465impl WireOptionalData {
466    pub fn is_some(&self) -> bool {
467        self.raw.is_some()
468    }
469
470    pub fn is_none(&self) -> bool {
471        self.raw.is_none()
472    }
473
474    pub fn as_ref(&self) -> Option<&WireData> {
475        if self.is_some() {
476            Some(unsafe { &*(self as *const Self).cast() })
477        } else {
478            None
479        }
480    }
481}
482
483unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalData
484where
485    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
486
487    ___D: ::fidl_next::Decoder,
488{
489    fn decode(
490        mut slot: ::fidl_next::Slot<'_, Self>,
491        decoder: &mut ___D,
492    ) -> Result<(), ::fidl_next::DecodeError> {
493        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
494        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
495            1 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<u8>>(
496                raw, decoder,
497            )?,
498
499            2 => {
500                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireString>(raw, decoder)?
501            }
502
503            3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI64>(raw, decoder)?,
504
505            4 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU64>(raw, decoder)?,
506
507            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
508            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
509        }
510
511        Ok(())
512    }
513}
514
515impl ::core::fmt::Debug for WireOptionalData {
516    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
517        self.as_ref().fmt(f)
518    }
519}
520
521#[doc = " A token represents a bedrock object. Tokens are reference counted, dropping\n all counts of the token removes the object.\n"]
522pub type Token = ::fidl_next::fuchsia::zx::Handle;
523
524/// The wire type corresponding to [`Token`].
525pub type WireToken = ::fidl_next::fuchsia::WireHandle;
526
527#[derive(Debug)]
528#[repr(C)]
529pub struct DictionaryRef {
530    pub token: ::fidl_next::fuchsia::zx::Handle,
531}
532
533impl ::fidl_next::Encodable for DictionaryRef {
534    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
535        ::fidl_next::CopyOptimization::enable_if(
536            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
537                .is_enabled(),
538        )
539    };
540
541    type Encoded = WireDictionaryRef;
542}
543
544unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryRef
545where
546    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
547
548    ___E: ::fidl_next::fuchsia::HandleEncoder,
549{
550    #[inline]
551    fn encode(
552        &mut self,
553        encoder: &mut ___E,
554        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
555    ) -> Result<(), ::fidl_next::EncodeError> {
556        ::fidl_next::munge! {
557            let Self::Encoded {
558                token,
559
560            } = out;
561        }
562
563        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
564
565        Ok(())
566    }
567}
568
569impl ::fidl_next::EncodableOption for Box<DictionaryRef> {
570    type EncodedOption = ::fidl_next::WireBox<WireDictionaryRef>;
571}
572
573unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryRef>
574where
575    ___E: ::fidl_next::Encoder + ?Sized,
576    DictionaryRef: ::fidl_next::Encode<___E>,
577{
578    #[inline]
579    fn encode_option(
580        this: Option<&mut Self>,
581        encoder: &mut ___E,
582        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
583    ) -> Result<(), ::fidl_next::EncodeError> {
584        if let Some(inner) = this {
585            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
586            ::fidl_next::WireBox::encode_present(out);
587        } else {
588            ::fidl_next::WireBox::encode_absent(out);
589        }
590
591        Ok(())
592    }
593}
594
595impl ::fidl_next::TakeFrom<WireDictionaryRef> for DictionaryRef {
596    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
597        ::fidl_next::CopyOptimization::enable_if(
598            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
599                .is_enabled(),
600        )
601    };
602
603    #[inline]
604    fn take_from(from: &WireDictionaryRef) -> Self {
605        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
606    }
607}
608
609/// The wire type corresponding to [`DictionaryRef`].
610#[derive(Debug)]
611#[repr(C)]
612pub struct WireDictionaryRef {
613    pub token: ::fidl_next::fuchsia::WireHandle,
614}
615
616unsafe impl ::fidl_next::ZeroPadding for WireDictionaryRef {
617    #[inline]
618    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
619}
620
621unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryRef
622where
623    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
624
625    ___D: ::fidl_next::fuchsia::HandleDecoder,
626{
627    fn decode(
628        slot: ::fidl_next::Slot<'_, Self>,
629        decoder: &mut ___D,
630    ) -> Result<(), ::fidl_next::DecodeError> {
631        ::fidl_next::munge! {
632            let Self {
633                mut token,
634
635            } = slot;
636        }
637
638        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
639
640        Ok(())
641    }
642}
643
644#[derive(Debug)]
645#[repr(C)]
646pub struct Connector {
647    pub token: ::fidl_next::fuchsia::zx::Handle,
648}
649
650impl ::fidl_next::Encodable for Connector {
651    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
652        ::fidl_next::CopyOptimization::enable_if(
653            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
654                .is_enabled(),
655        )
656    };
657
658    type Encoded = WireConnector;
659}
660
661unsafe impl<___E> ::fidl_next::Encode<___E> for Connector
662where
663    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
664
665    ___E: ::fidl_next::fuchsia::HandleEncoder,
666{
667    #[inline]
668    fn encode(
669        &mut self,
670        encoder: &mut ___E,
671        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
672    ) -> Result<(), ::fidl_next::EncodeError> {
673        ::fidl_next::munge! {
674            let Self::Encoded {
675                token,
676
677            } = out;
678        }
679
680        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
681
682        Ok(())
683    }
684}
685
686impl ::fidl_next::EncodableOption for Box<Connector> {
687    type EncodedOption = ::fidl_next::WireBox<WireConnector>;
688}
689
690unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Connector>
691where
692    ___E: ::fidl_next::Encoder + ?Sized,
693    Connector: ::fidl_next::Encode<___E>,
694{
695    #[inline]
696    fn encode_option(
697        this: Option<&mut Self>,
698        encoder: &mut ___E,
699        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
700    ) -> Result<(), ::fidl_next::EncodeError> {
701        if let Some(inner) = this {
702            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
703            ::fidl_next::WireBox::encode_present(out);
704        } else {
705            ::fidl_next::WireBox::encode_absent(out);
706        }
707
708        Ok(())
709    }
710}
711
712impl ::fidl_next::TakeFrom<WireConnector> for Connector {
713    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
714        ::fidl_next::CopyOptimization::enable_if(
715            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
716                .is_enabled(),
717        )
718    };
719
720    #[inline]
721    fn take_from(from: &WireConnector) -> Self {
722        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
723    }
724}
725
726/// The wire type corresponding to [`Connector`].
727#[derive(Debug)]
728#[repr(C)]
729pub struct WireConnector {
730    pub token: ::fidl_next::fuchsia::WireHandle,
731}
732
733unsafe impl ::fidl_next::ZeroPadding for WireConnector {
734    #[inline]
735    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
736}
737
738unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnector
739where
740    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
741
742    ___D: ::fidl_next::fuchsia::HandleDecoder,
743{
744    fn decode(
745        slot: ::fidl_next::Slot<'_, Self>,
746        decoder: &mut ___D,
747    ) -> Result<(), ::fidl_next::DecodeError> {
748        ::fidl_next::munge! {
749            let Self {
750                mut token,
751
752            } = slot;
753        }
754
755        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
756
757        Ok(())
758    }
759}
760
761#[derive(Debug)]
762#[repr(C)]
763pub struct DirConnector {
764    pub token: ::fidl_next::fuchsia::zx::Handle,
765}
766
767impl ::fidl_next::Encodable for DirConnector {
768    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
769        ::fidl_next::CopyOptimization::enable_if(
770            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
771                .is_enabled(),
772        )
773    };
774
775    type Encoded = WireDirConnector;
776}
777
778unsafe impl<___E> ::fidl_next::Encode<___E> for DirConnector
779where
780    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
781
782    ___E: ::fidl_next::fuchsia::HandleEncoder,
783{
784    #[inline]
785    fn encode(
786        &mut self,
787        encoder: &mut ___E,
788        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
789    ) -> Result<(), ::fidl_next::EncodeError> {
790        ::fidl_next::munge! {
791            let Self::Encoded {
792                token,
793
794            } = out;
795        }
796
797        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
798
799        Ok(())
800    }
801}
802
803impl ::fidl_next::EncodableOption for Box<DirConnector> {
804    type EncodedOption = ::fidl_next::WireBox<WireDirConnector>;
805}
806
807unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirConnector>
808where
809    ___E: ::fidl_next::Encoder + ?Sized,
810    DirConnector: ::fidl_next::Encode<___E>,
811{
812    #[inline]
813    fn encode_option(
814        this: Option<&mut Self>,
815        encoder: &mut ___E,
816        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
817    ) -> Result<(), ::fidl_next::EncodeError> {
818        if let Some(inner) = this {
819            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
820            ::fidl_next::WireBox::encode_present(out);
821        } else {
822            ::fidl_next::WireBox::encode_absent(out);
823        }
824
825        Ok(())
826    }
827}
828
829impl ::fidl_next::TakeFrom<WireDirConnector> for DirConnector {
830    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
831        ::fidl_next::CopyOptimization::enable_if(
832            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
833                .is_enabled(),
834        )
835    };
836
837    #[inline]
838    fn take_from(from: &WireDirConnector) -> Self {
839        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
840    }
841}
842
843/// The wire type corresponding to [`DirConnector`].
844#[derive(Debug)]
845#[repr(C)]
846pub struct WireDirConnector {
847    pub token: ::fidl_next::fuchsia::WireHandle,
848}
849
850unsafe impl ::fidl_next::ZeroPadding for WireDirConnector {
851    #[inline]
852    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
853}
854
855unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirConnector
856where
857    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
858
859    ___D: ::fidl_next::fuchsia::HandleDecoder,
860{
861    fn decode(
862        slot: ::fidl_next::Slot<'_, Self>,
863        decoder: &mut ___D,
864    ) -> Result<(), ::fidl_next::DecodeError> {
865        ::fidl_next::munge! {
866            let Self {
867                mut token,
868
869            } = slot;
870        }
871
872        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
873
874        Ok(())
875    }
876}
877
878#[derive(Debug)]
879#[repr(C)]
880pub struct DirEntry {
881    pub token: ::fidl_next::fuchsia::zx::Handle,
882}
883
884impl ::fidl_next::Encodable for DirEntry {
885    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
886        ::fidl_next::CopyOptimization::enable_if(
887            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
888                .is_enabled(),
889        )
890    };
891
892    type Encoded = WireDirEntry;
893}
894
895unsafe impl<___E> ::fidl_next::Encode<___E> for DirEntry
896where
897    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
898
899    ___E: ::fidl_next::fuchsia::HandleEncoder,
900{
901    #[inline]
902    fn encode(
903        &mut self,
904        encoder: &mut ___E,
905        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
906    ) -> Result<(), ::fidl_next::EncodeError> {
907        ::fidl_next::munge! {
908            let Self::Encoded {
909                token,
910
911            } = out;
912        }
913
914        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
915
916        Ok(())
917    }
918}
919
920impl ::fidl_next::EncodableOption for Box<DirEntry> {
921    type EncodedOption = ::fidl_next::WireBox<WireDirEntry>;
922}
923
924unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirEntry>
925where
926    ___E: ::fidl_next::Encoder + ?Sized,
927    DirEntry: ::fidl_next::Encode<___E>,
928{
929    #[inline]
930    fn encode_option(
931        this: Option<&mut Self>,
932        encoder: &mut ___E,
933        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
934    ) -> Result<(), ::fidl_next::EncodeError> {
935        if let Some(inner) = this {
936            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
937            ::fidl_next::WireBox::encode_present(out);
938        } else {
939            ::fidl_next::WireBox::encode_absent(out);
940        }
941
942        Ok(())
943    }
944}
945
946impl ::fidl_next::TakeFrom<WireDirEntry> for DirEntry {
947    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
948        ::fidl_next::CopyOptimization::enable_if(
949            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
950                .is_enabled(),
951        )
952    };
953
954    #[inline]
955    fn take_from(from: &WireDirEntry) -> Self {
956        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
957    }
958}
959
960/// The wire type corresponding to [`DirEntry`].
961#[derive(Debug)]
962#[repr(C)]
963pub struct WireDirEntry {
964    pub token: ::fidl_next::fuchsia::WireHandle,
965}
966
967unsafe impl ::fidl_next::ZeroPadding for WireDirEntry {
968    #[inline]
969    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
970}
971
972unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirEntry
973where
974    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
975
976    ___D: ::fidl_next::fuchsia::HandleDecoder,
977{
978    fn decode(
979        slot: ::fidl_next::Slot<'_, Self>,
980        decoder: &mut ___D,
981    ) -> Result<(), ::fidl_next::DecodeError> {
982        ::fidl_next::munge! {
983            let Self {
984                mut token,
985
986            } = slot;
987        }
988
989        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
990
991        Ok(())
992    }
993}
994
995#[derive(Debug)]
996pub enum Capability {
997    Unit(crate::Unit),
998
999    Handle(::fidl_next::fuchsia::zx::Handle),
1000
1001    Data(crate::Data),
1002
1003    Dictionary(crate::DictionaryRef),
1004
1005    Connector(crate::Connector),
1006
1007    DirConnector(crate::DirConnector),
1008
1009    Directory(
1010        ::fidl_next::ClientEnd<
1011            ::fidl_next::fuchsia::zx::Channel,
1012            ::fidl_next_fuchsia_io::Directory,
1013        >,
1014    ),
1015
1016    DirEntry(crate::DirEntry),
1017
1018    ConnectorRouter(
1019        ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::ConnectorRouter>,
1020    ),
1021
1022    DictionaryRouter(
1023        ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DictionaryRouter>,
1024    ),
1025
1026    DirEntryRouter(
1027        ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DirEntryRouter>,
1028    ),
1029
1030    DataRouter(::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DataRouter>),
1031
1032    DirConnectorRouter(
1033        ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DirConnectorRouter>,
1034    ),
1035
1036    UnknownOrdinal_(u64),
1037}
1038
1039impl ::fidl_next::Encodable for Capability {
1040    type Encoded = WireCapability;
1041}
1042
1043unsafe impl<___E> ::fidl_next::Encode<___E> for Capability
1044where
1045    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1046
1047    ___E: ::fidl_next::Encoder,
1048
1049    ___E: ::fidl_next::fuchsia::HandleEncoder,
1050{
1051    #[inline]
1052    fn encode(
1053        &mut self,
1054        encoder: &mut ___E,
1055        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1056    ) -> Result<(), ::fidl_next::EncodeError> {
1057        ::fidl_next::munge!(let WireCapability { raw } = out);
1058
1059        match self {
1060            Self::Unit(value) => {
1061                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Unit>(value, 1, encoder, raw)?
1062            }
1063
1064            Self::Handle(value) => ::fidl_next::RawWireUnion::encode_as::<
1065                ___E,
1066                ::fidl_next::fuchsia::zx::Handle,
1067            >(value, 2, encoder, raw)?,
1068
1069            Self::Data(value) => {
1070                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Data>(value, 3, encoder, raw)?
1071            }
1072
1073            Self::Dictionary(value) => ::fidl_next::RawWireUnion::encode_as::<
1074                ___E,
1075                crate::DictionaryRef,
1076            >(value, 4, encoder, raw)?,
1077
1078            Self::Connector(value) => {
1079                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Connector>(
1080                    value, 5, encoder, raw,
1081                )?
1082            }
1083
1084            Self::DirConnector(value) => ::fidl_next::RawWireUnion::encode_as::<
1085                ___E,
1086                crate::DirConnector,
1087            >(value, 6, encoder, raw)?,
1088
1089            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as::<
1090                ___E,
1091                ::fidl_next::ClientEnd<
1092                    ::fidl_next::fuchsia::zx::Channel,
1093                    ::fidl_next_fuchsia_io::Directory,
1094                >,
1095            >(value, 7, encoder, raw)?,
1096
1097            Self::DirEntry(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::DirEntry>(
1098                value, 8, encoder, raw,
1099            )?,
1100
1101            Self::ConnectorRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1102                ___E,
1103                ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::ConnectorRouter>,
1104            >(value, 9, encoder, raw)?,
1105
1106            Self::DictionaryRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1107                ___E,
1108                ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DictionaryRouter>,
1109            >(value, 10, encoder, raw)?,
1110
1111            Self::DirEntryRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1112                ___E,
1113                ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DirEntryRouter>,
1114            >(value, 11, encoder, raw)?,
1115
1116            Self::DataRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1117                ___E,
1118                ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DataRouter>,
1119            >(value, 12, encoder, raw)?,
1120
1121            Self::DirConnectorRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1122                ___E,
1123                ::fidl_next::ClientEnd<
1124                    ::fidl_next::fuchsia::zx::Channel,
1125                    crate::DirConnectorRouter,
1126                >,
1127            >(value, 13, encoder, raw)?,
1128
1129            Self::UnknownOrdinal_(ordinal) => {
1130                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize))
1131            }
1132        }
1133
1134        Ok(())
1135    }
1136}
1137
1138impl ::fidl_next::EncodableOption for Box<Capability> {
1139    type EncodedOption = WireOptionalCapability;
1140}
1141
1142unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Capability>
1143where
1144    ___E: ?Sized,
1145    Capability: ::fidl_next::Encode<___E>,
1146{
1147    #[inline]
1148    fn encode_option(
1149        this: Option<&mut Self>,
1150        encoder: &mut ___E,
1151        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1152    ) -> Result<(), ::fidl_next::EncodeError> {
1153        ::fidl_next::munge!(let WireOptionalCapability { raw } = &mut *out);
1154
1155        if let Some(inner) = this {
1156            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1157            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
1158        } else {
1159            ::fidl_next::RawWireUnion::encode_absent(raw);
1160        }
1161
1162        Ok(())
1163    }
1164}
1165
1166impl ::fidl_next::TakeFrom<WireCapability> for Capability {
1167    #[inline]
1168    fn take_from(from: &WireCapability) -> Self {
1169        match from.raw.ordinal() {
1170            1 => Self::Unit(::fidl_next::TakeFrom::take_from(unsafe {
1171                from.raw.get().deref_unchecked::<crate::WireUnit>()
1172            })),
1173
1174            2 => Self::Handle(::fidl_next::TakeFrom::take_from(unsafe {
1175                from.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>()
1176            })),
1177
1178            3 => Self::Data(::fidl_next::TakeFrom::take_from(unsafe {
1179                from.raw.get().deref_unchecked::<crate::WireData>()
1180            })),
1181
1182            4 => Self::Dictionary(::fidl_next::TakeFrom::take_from(unsafe {
1183                from.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
1184            })),
1185
1186            5 => Self::Connector(::fidl_next::TakeFrom::take_from(unsafe {
1187                from.raw.get().deref_unchecked::<crate::WireConnector>()
1188            })),
1189
1190            6 => Self::DirConnector(::fidl_next::TakeFrom::take_from(unsafe {
1191                from.raw.get().deref_unchecked::<crate::WireDirConnector>()
1192            })),
1193
1194            7 => Self::Directory(::fidl_next::TakeFrom::take_from(unsafe {
1195                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1196                    ::fidl_next::fuchsia::WireChannel,
1197                    ::fidl_next_fuchsia_io::Directory,
1198                >>()
1199            })),
1200
1201            8 => Self::DirEntry(::fidl_next::TakeFrom::take_from(unsafe {
1202                from.raw.get().deref_unchecked::<crate::WireDirEntry>()
1203            })),
1204
1205            9 => Self::ConnectorRouter(::fidl_next::TakeFrom::take_from(unsafe {
1206                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1207                    ::fidl_next::fuchsia::WireChannel,
1208                    crate::ConnectorRouter,
1209                >>()
1210            })),
1211
1212            10 => Self::DictionaryRouter(::fidl_next::TakeFrom::take_from(unsafe {
1213                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1214                    ::fidl_next::fuchsia::WireChannel,
1215                    crate::DictionaryRouter,
1216                >>()
1217            })),
1218
1219            11 => Self::DirEntryRouter(::fidl_next::TakeFrom::take_from(unsafe {
1220                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DirEntryRouter,
1221        >>()
1222            })),
1223
1224            12 => Self::DataRouter(::fidl_next::TakeFrom::take_from(unsafe {
1225                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DataRouter,
1226        >>()
1227            })),
1228
1229            13 => Self::DirConnectorRouter(::fidl_next::TakeFrom::take_from(unsafe {
1230                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1231                    ::fidl_next::fuchsia::WireChannel,
1232                    crate::DirConnectorRouter,
1233                >>()
1234            })),
1235
1236            _ => unsafe { ::core::hint::unreachable_unchecked() },
1237        }
1238    }
1239}
1240
1241impl ::fidl_next::TakeFrom<WireOptionalCapability> for Option<Box<Capability>> {
1242    #[inline]
1243    fn take_from(from: &WireOptionalCapability) -> Self {
1244        if let Some(inner) = from.as_ref() {
1245            Some(::fidl_next::TakeFrom::take_from(inner))
1246        } else {
1247            None
1248        }
1249    }
1250}
1251
1252/// The wire type corresponding to [`Capability`].
1253#[repr(transparent)]
1254pub struct WireCapability {
1255    raw: ::fidl_next::RawWireUnion,
1256}
1257
1258unsafe impl ::fidl_next::ZeroPadding for WireCapability {
1259    #[inline]
1260    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1261        ::fidl_next::munge!(let Self { raw } = out);
1262        ::fidl_next::RawWireUnion::zero_padding(raw);
1263    }
1264}
1265
1266pub mod capability {
1267    pub enum Ref<'union> {
1268        Unit(&'union crate::WireUnit),
1269
1270        Handle(&'union ::fidl_next::fuchsia::WireHandle),
1271
1272        Data(&'union crate::WireData),
1273
1274        Dictionary(&'union crate::WireDictionaryRef),
1275
1276        Connector(&'union crate::WireConnector),
1277
1278        DirConnector(&'union crate::WireDirConnector),
1279
1280        Directory(
1281            &'union ::fidl_next::ClientEnd<
1282                ::fidl_next::fuchsia::WireChannel,
1283                ::fidl_next_fuchsia_io::Directory,
1284            >,
1285        ),
1286
1287        DirEntry(&'union crate::WireDirEntry),
1288
1289        ConnectorRouter(
1290            &'union ::fidl_next::ClientEnd<
1291                ::fidl_next::fuchsia::WireChannel,
1292                crate::ConnectorRouter,
1293            >,
1294        ),
1295
1296        DictionaryRouter(
1297            &'union ::fidl_next::ClientEnd<
1298                ::fidl_next::fuchsia::WireChannel,
1299                crate::DictionaryRouter,
1300            >,
1301        ),
1302
1303        DirEntryRouter(
1304            &'union ::fidl_next::ClientEnd<
1305                ::fidl_next::fuchsia::WireChannel,
1306                crate::DirEntryRouter,
1307            >,
1308        ),
1309
1310        DataRouter(
1311            &'union ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DataRouter>,
1312        ),
1313
1314        DirConnectorRouter(
1315            &'union ::fidl_next::ClientEnd<
1316                ::fidl_next::fuchsia::WireChannel,
1317                crate::DirConnectorRouter,
1318            >,
1319        ),
1320
1321        UnknownOrdinal_(u64),
1322    }
1323}
1324
1325impl WireCapability {
1326    pub fn as_ref(&self) -> crate::capability::Ref<'_> {
1327        match self.raw.ordinal() {
1328            1 => crate::capability::Ref::Unit(unsafe {
1329                self.raw.get().deref_unchecked::<crate::WireUnit>()
1330            }),
1331
1332            2 => crate::capability::Ref::Handle(unsafe {
1333                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>()
1334            }),
1335
1336            3 => crate::capability::Ref::Data(unsafe {
1337                self.raw.get().deref_unchecked::<crate::WireData>()
1338            }),
1339
1340            4 => crate::capability::Ref::Dictionary(unsafe {
1341                self.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
1342            }),
1343
1344            5 => crate::capability::Ref::Connector(unsafe {
1345                self.raw.get().deref_unchecked::<crate::WireConnector>()
1346            }),
1347
1348            6 => crate::capability::Ref::DirConnector(unsafe {
1349                self.raw.get().deref_unchecked::<crate::WireDirConnector>()
1350            }),
1351
1352            7 => crate::capability::Ref::Directory(unsafe {
1353                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1354                    ::fidl_next::fuchsia::WireChannel,
1355                    ::fidl_next_fuchsia_io::Directory,
1356                >>()
1357            }),
1358
1359            8 => crate::capability::Ref::DirEntry(unsafe {
1360                self.raw.get().deref_unchecked::<crate::WireDirEntry>()
1361            }),
1362
1363            9 => crate::capability::Ref::ConnectorRouter(unsafe {
1364                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1365                    ::fidl_next::fuchsia::WireChannel,
1366                    crate::ConnectorRouter,
1367                >>()
1368            }),
1369
1370            10 => crate::capability::Ref::DictionaryRouter(unsafe {
1371                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1372                    ::fidl_next::fuchsia::WireChannel,
1373                    crate::DictionaryRouter,
1374                >>()
1375            }),
1376
1377            11 => crate::capability::Ref::DirEntryRouter(unsafe {
1378                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DirEntryRouter,
1379        >>()
1380            }),
1381
1382            12 => crate::capability::Ref::DataRouter(unsafe {
1383                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DataRouter,
1384        >>()
1385            }),
1386
1387            13 => crate::capability::Ref::DirConnectorRouter(unsafe {
1388                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1389                    ::fidl_next::fuchsia::WireChannel,
1390                    crate::DirConnectorRouter,
1391                >>()
1392            }),
1393
1394            unknown => crate::capability::Ref::UnknownOrdinal_(unknown),
1395        }
1396    }
1397}
1398
1399unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapability
1400where
1401    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1402
1403    ___D: ::fidl_next::Decoder,
1404
1405    ___D: ::fidl_next::fuchsia::HandleDecoder,
1406{
1407    fn decode(
1408        mut slot: ::fidl_next::Slot<'_, Self>,
1409        decoder: &mut ___D,
1410    ) -> Result<(), ::fidl_next::DecodeError> {
1411        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
1412        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1413            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
1414
1415            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
1416                raw, decoder,
1417            )?,
1418
1419            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
1420
1421            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDictionaryRef>(
1422                raw, decoder,
1423            )?,
1424
1425            5 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireConnector>(raw, decoder)?,
1426
1427            6 => {
1428                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirConnector>(raw, decoder)?
1429            }
1430
1431            7 => ::fidl_next::RawWireUnion::decode_as::<
1432                ___D,
1433                ::fidl_next::ClientEnd<
1434                    ::fidl_next::fuchsia::WireChannel,
1435                    ::fidl_next_fuchsia_io::Directory,
1436                >,
1437            >(raw, decoder)?,
1438
1439            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirEntry>(raw, decoder)?,
1440
1441            9 => ::fidl_next::RawWireUnion::decode_as::<
1442                ___D,
1443                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::ConnectorRouter>,
1444            >(raw, decoder)?,
1445
1446            10 => ::fidl_next::RawWireUnion::decode_as::<
1447                ___D,
1448                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DictionaryRouter>,
1449            >(raw, decoder)?,
1450
1451            11 => ::fidl_next::RawWireUnion::decode_as::<
1452                ___D,
1453                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DirEntryRouter>,
1454            >(raw, decoder)?,
1455
1456            12 => ::fidl_next::RawWireUnion::decode_as::<
1457                ___D,
1458                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DataRouter>,
1459            >(raw, decoder)?,
1460
1461            13 => ::fidl_next::RawWireUnion::decode_as::<
1462                ___D,
1463                ::fidl_next::ClientEnd<
1464                    ::fidl_next::fuchsia::WireChannel,
1465                    crate::DirConnectorRouter,
1466                >,
1467            >(raw, decoder)?,
1468
1469            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1470        }
1471
1472        Ok(())
1473    }
1474}
1475
1476impl ::core::fmt::Debug for WireCapability {
1477    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1478        match self.raw.ordinal() {
1479            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
1480            2 => unsafe {
1481                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>().fmt(f)
1482            },
1483            3 => unsafe { self.raw.get().deref_unchecked::<crate::WireData>().fmt(f) },
1484            4 => unsafe { self.raw.get().deref_unchecked::<crate::WireDictionaryRef>().fmt(f) },
1485            5 => unsafe { self.raw.get().deref_unchecked::<crate::WireConnector>().fmt(f) },
1486            6 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirConnector>().fmt(f) },
1487            7 => unsafe {
1488                self.raw
1489                    .get()
1490                    .deref_unchecked::<::fidl_next::ClientEnd<
1491                        ::fidl_next::fuchsia::WireChannel,
1492                        ::fidl_next_fuchsia_io::Directory,
1493                    >>()
1494                    .fmt(f)
1495            },
1496            8 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirEntry>().fmt(f) },
1497            9 => unsafe {
1498                self.raw
1499                    .get()
1500                    .deref_unchecked::<::fidl_next::ClientEnd<
1501                        ::fidl_next::fuchsia::WireChannel,
1502                        crate::ConnectorRouter,
1503                    >>()
1504                    .fmt(f)
1505            },
1506            10 => unsafe {
1507                self.raw
1508                    .get()
1509                    .deref_unchecked::<::fidl_next::ClientEnd<
1510                        ::fidl_next::fuchsia::WireChannel,
1511                        crate::DictionaryRouter,
1512                    >>()
1513                    .fmt(f)
1514            },
1515            11 => unsafe {
1516                self.raw.get().deref_unchecked::<
1517                            ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DirEntryRouter,
1518        >
1519                        >().fmt(f)
1520            },
1521            12 => unsafe {
1522                self.raw.get().deref_unchecked::<
1523                            ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel,crate::DataRouter,
1524        >
1525                        >().fmt(f)
1526            },
1527            13 => unsafe {
1528                self.raw
1529                    .get()
1530                    .deref_unchecked::<::fidl_next::ClientEnd<
1531                        ::fidl_next::fuchsia::WireChannel,
1532                        crate::DirConnectorRouter,
1533                    >>()
1534                    .fmt(f)
1535            },
1536            _ => unsafe { ::core::hint::unreachable_unchecked() },
1537        }
1538    }
1539}
1540
1541#[repr(transparent)]
1542pub struct WireOptionalCapability {
1543    raw: ::fidl_next::RawWireUnion,
1544}
1545
1546unsafe impl ::fidl_next::ZeroPadding for WireOptionalCapability {
1547    #[inline]
1548    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1549        ::fidl_next::munge!(let Self { raw } = out);
1550        ::fidl_next::RawWireUnion::zero_padding(raw);
1551    }
1552}
1553
1554impl WireOptionalCapability {
1555    pub fn is_some(&self) -> bool {
1556        self.raw.is_some()
1557    }
1558
1559    pub fn is_none(&self) -> bool {
1560        self.raw.is_none()
1561    }
1562
1563    pub fn as_ref(&self) -> Option<&WireCapability> {
1564        if self.is_some() {
1565            Some(unsafe { &*(self as *const Self).cast() })
1566        } else {
1567            None
1568        }
1569    }
1570}
1571
1572unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalCapability
1573where
1574    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1575
1576    ___D: ::fidl_next::Decoder,
1577
1578    ___D: ::fidl_next::fuchsia::HandleDecoder,
1579{
1580    fn decode(
1581        mut slot: ::fidl_next::Slot<'_, Self>,
1582        decoder: &mut ___D,
1583    ) -> Result<(), ::fidl_next::DecodeError> {
1584        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
1585        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1586            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
1587
1588            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
1589                raw, decoder,
1590            )?,
1591
1592            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
1593
1594            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDictionaryRef>(
1595                raw, decoder,
1596            )?,
1597
1598            5 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireConnector>(raw, decoder)?,
1599
1600            6 => {
1601                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirConnector>(raw, decoder)?
1602            }
1603
1604            7 => ::fidl_next::RawWireUnion::decode_as::<
1605                ___D,
1606                ::fidl_next::ClientEnd<
1607                    ::fidl_next::fuchsia::WireChannel,
1608                    ::fidl_next_fuchsia_io::Directory,
1609                >,
1610            >(raw, decoder)?,
1611
1612            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirEntry>(raw, decoder)?,
1613
1614            9 => ::fidl_next::RawWireUnion::decode_as::<
1615                ___D,
1616                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::ConnectorRouter>,
1617            >(raw, decoder)?,
1618
1619            10 => ::fidl_next::RawWireUnion::decode_as::<
1620                ___D,
1621                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DictionaryRouter>,
1622            >(raw, decoder)?,
1623
1624            11 => ::fidl_next::RawWireUnion::decode_as::<
1625                ___D,
1626                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DirEntryRouter>,
1627            >(raw, decoder)?,
1628
1629            12 => ::fidl_next::RawWireUnion::decode_as::<
1630                ___D,
1631                ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DataRouter>,
1632            >(raw, decoder)?,
1633
1634            13 => ::fidl_next::RawWireUnion::decode_as::<
1635                ___D,
1636                ::fidl_next::ClientEnd<
1637                    ::fidl_next::fuchsia::WireChannel,
1638                    crate::DirConnectorRouter,
1639                >,
1640            >(raw, decoder)?,
1641
1642            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
1643            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1644        }
1645
1646        Ok(())
1647    }
1648}
1649
1650impl ::core::fmt::Debug for WireOptionalCapability {
1651    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1652        self.as_ref().fmt(f)
1653    }
1654}
1655
1656#[doc = " A client-assigned id of a [Capability] in a [CapabilityStore].\n\n The id is relative to the [CapabilityStore]. In the case where two\n [CapabilityStore]s have a capability / assigned to the same id, there is\n no relation between them\n"]
1657pub type CapabilityId = u64;
1658
1659/// The wire type corresponding to [`CapabilityId`].
1660pub type WireCapabilityId = ::fidl_next::WireU64;
1661
1662#[doc = " A client-assigned id of a new [Capability] in a [CapabilityStore]. Same as [CapabilityId],\n but used to distinguish output parameters in [CapabilityStore] methods.\n"]
1663pub type NewCapabilityId = u64;
1664
1665/// The wire type corresponding to [`NewCapabilityId`].
1666pub type WireNewCapabilityId = ::fidl_next::WireU64;
1667
1668#[derive(Clone, Debug)]
1669#[repr(C)]
1670pub struct CapabilityStoreDuplicateRequest {
1671    pub id: u64,
1672
1673    pub dest_id: u64,
1674}
1675
1676impl ::fidl_next::Encodable for CapabilityStoreDuplicateRequest {
1677    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
1678        ::fidl_next::CopyOptimization::enable_if(
1679            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
1680                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
1681        )
1682    };
1683
1684    type Encoded = WireCapabilityStoreDuplicateRequest;
1685}
1686
1687unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDuplicateRequest
1688where
1689    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1690{
1691    #[inline]
1692    fn encode(
1693        &mut self,
1694        encoder: &mut ___E,
1695        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1696    ) -> Result<(), ::fidl_next::EncodeError> {
1697        ::fidl_next::munge! {
1698            let Self::Encoded {
1699                id,
1700                dest_id,
1701
1702            } = out;
1703        }
1704
1705        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
1706
1707        ::fidl_next::Encode::encode(&mut self.dest_id, encoder, dest_id)?;
1708
1709        Ok(())
1710    }
1711}
1712
1713impl ::fidl_next::EncodableOption for Box<CapabilityStoreDuplicateRequest> {
1714    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDuplicateRequest>;
1715}
1716
1717unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDuplicateRequest>
1718where
1719    ___E: ::fidl_next::Encoder + ?Sized,
1720    CapabilityStoreDuplicateRequest: ::fidl_next::Encode<___E>,
1721{
1722    #[inline]
1723    fn encode_option(
1724        this: Option<&mut Self>,
1725        encoder: &mut ___E,
1726        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1727    ) -> Result<(), ::fidl_next::EncodeError> {
1728        if let Some(inner) = this {
1729            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1730            ::fidl_next::WireBox::encode_present(out);
1731        } else {
1732            ::fidl_next::WireBox::encode_absent(out);
1733        }
1734
1735        Ok(())
1736    }
1737}
1738
1739impl ::fidl_next::TakeFrom<WireCapabilityStoreDuplicateRequest>
1740    for CapabilityStoreDuplicateRequest
1741{
1742    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
1743        ::fidl_next::CopyOptimization::enable_if(
1744            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
1745                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
1746        )
1747    };
1748
1749    #[inline]
1750    fn take_from(from: &WireCapabilityStoreDuplicateRequest) -> Self {
1751        Self {
1752            id: ::fidl_next::TakeFrom::take_from(&from.id),
1753
1754            dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
1755        }
1756    }
1757}
1758
1759/// The wire type corresponding to [`CapabilityStoreDuplicateRequest`].
1760#[derive(Clone, Debug)]
1761#[repr(C)]
1762pub struct WireCapabilityStoreDuplicateRequest {
1763    pub id: ::fidl_next::WireU64,
1764
1765    pub dest_id: ::fidl_next::WireU64,
1766}
1767
1768unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDuplicateRequest {
1769    #[inline]
1770    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1771}
1772
1773unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDuplicateRequest
1774where
1775    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1776{
1777    fn decode(
1778        slot: ::fidl_next::Slot<'_, Self>,
1779        decoder: &mut ___D,
1780    ) -> Result<(), ::fidl_next::DecodeError> {
1781        ::fidl_next::munge! {
1782            let Self {
1783                mut id,
1784                mut dest_id,
1785
1786            } = slot;
1787        }
1788
1789        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
1790
1791        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
1792
1793        Ok(())
1794    }
1795}
1796
1797pub type CapabilityStoreDuplicateResponse = ();
1798
1799/// The wire type corresponding to [`CapabilityStoreDuplicateResponse`].
1800pub type WireCapabilityStoreDuplicateResponse = ();
1801
1802#[doc = " Error returned from methods in [CapabilityStore].\n"]
1803#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1804#[repr(u32)]
1805pub enum CapabilityStoreError {
1806    IdNotFound = 1,
1807    IdAlreadyExists = 2,
1808    BadCapability = 3,
1809    WrongType = 4,
1810    NotDuplicatable = 5,
1811    ItemNotFound = 6,
1812    ItemAlreadyExists = 7,
1813    InvalidKey = 8,
1814    InvalidArgs = 9,
1815    UnknownOrdinal_(u32),
1816}
1817
1818impl ::fidl_next::Encodable for CapabilityStoreError {
1819    type Encoded = WireCapabilityStoreError;
1820}
1821impl ::std::convert::From<u32> for CapabilityStoreError {
1822    fn from(value: u32) -> Self {
1823        match value {
1824            1 => Self::IdNotFound,
1825            2 => Self::IdAlreadyExists,
1826            3 => Self::BadCapability,
1827            4 => Self::WrongType,
1828            5 => Self::NotDuplicatable,
1829            6 => Self::ItemNotFound,
1830            7 => Self::ItemAlreadyExists,
1831            8 => Self::InvalidKey,
1832            9 => Self::InvalidArgs,
1833
1834            _ => Self::UnknownOrdinal_(value),
1835        }
1836    }
1837}
1838
1839unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreError
1840where
1841    ___E: ?Sized,
1842{
1843    #[inline]
1844    fn encode(
1845        &mut self,
1846        _: &mut ___E,
1847        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1848    ) -> Result<(), ::fidl_next::EncodeError> {
1849        ::fidl_next::munge!(let WireCapabilityStoreError { value } = out);
1850        let _ = value.write(::fidl_next::WireU32::from(match *self {
1851            Self::IdNotFound => 1,
1852
1853            Self::IdAlreadyExists => 2,
1854
1855            Self::BadCapability => 3,
1856
1857            Self::WrongType => 4,
1858
1859            Self::NotDuplicatable => 5,
1860
1861            Self::ItemNotFound => 6,
1862
1863            Self::ItemAlreadyExists => 7,
1864
1865            Self::InvalidKey => 8,
1866
1867            Self::InvalidArgs => 9,
1868
1869            Self::UnknownOrdinal_(value) => value,
1870        }));
1871
1872        Ok(())
1873    }
1874}
1875
1876impl ::core::convert::From<WireCapabilityStoreError> for CapabilityStoreError {
1877    fn from(wire: WireCapabilityStoreError) -> Self {
1878        match u32::from(wire.value) {
1879            1 => Self::IdNotFound,
1880
1881            2 => Self::IdAlreadyExists,
1882
1883            3 => Self::BadCapability,
1884
1885            4 => Self::WrongType,
1886
1887            5 => Self::NotDuplicatable,
1888
1889            6 => Self::ItemNotFound,
1890
1891            7 => Self::ItemAlreadyExists,
1892
1893            8 => Self::InvalidKey,
1894
1895            9 => Self::InvalidArgs,
1896
1897            value => Self::UnknownOrdinal_(value),
1898        }
1899    }
1900}
1901
1902impl ::fidl_next::TakeFrom<WireCapabilityStoreError> for CapabilityStoreError {
1903    #[inline]
1904    fn take_from(from: &WireCapabilityStoreError) -> Self {
1905        Self::from(*from)
1906    }
1907}
1908
1909/// The wire type corresponding to [`CapabilityStoreError`].
1910#[derive(Clone, Copy, Debug, PartialEq, Eq)]
1911#[repr(transparent)]
1912pub struct WireCapabilityStoreError {
1913    value: ::fidl_next::WireU32,
1914}
1915
1916unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreError {
1917    #[inline]
1918    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
1919        // Wire enums have no padding
1920    }
1921}
1922
1923impl WireCapabilityStoreError {
1924    pub const ID_NOT_FOUND: WireCapabilityStoreError =
1925        WireCapabilityStoreError { value: ::fidl_next::WireU32(1) };
1926
1927    pub const ID_ALREADY_EXISTS: WireCapabilityStoreError =
1928        WireCapabilityStoreError { value: ::fidl_next::WireU32(2) };
1929
1930    pub const BAD_CAPABILITY: WireCapabilityStoreError =
1931        WireCapabilityStoreError { value: ::fidl_next::WireU32(3) };
1932
1933    pub const WRONG_TYPE: WireCapabilityStoreError =
1934        WireCapabilityStoreError { value: ::fidl_next::WireU32(4) };
1935
1936    pub const NOT_DUPLICATABLE: WireCapabilityStoreError =
1937        WireCapabilityStoreError { value: ::fidl_next::WireU32(5) };
1938
1939    pub const ITEM_NOT_FOUND: WireCapabilityStoreError =
1940        WireCapabilityStoreError { value: ::fidl_next::WireU32(6) };
1941
1942    pub const ITEM_ALREADY_EXISTS: WireCapabilityStoreError =
1943        WireCapabilityStoreError { value: ::fidl_next::WireU32(7) };
1944
1945    pub const INVALID_KEY: WireCapabilityStoreError =
1946        WireCapabilityStoreError { value: ::fidl_next::WireU32(8) };
1947
1948    pub const INVALID_ARGS: WireCapabilityStoreError =
1949        WireCapabilityStoreError { value: ::fidl_next::WireU32(9) };
1950}
1951
1952unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreError
1953where
1954    ___D: ?Sized,
1955{
1956    fn decode(
1957        slot: ::fidl_next::Slot<'_, Self>,
1958        _: &mut ___D,
1959    ) -> Result<(), ::fidl_next::DecodeError> {
1960        Ok(())
1961    }
1962}
1963
1964impl ::core::convert::From<CapabilityStoreError> for WireCapabilityStoreError {
1965    fn from(natural: CapabilityStoreError) -> Self {
1966        match natural {
1967            CapabilityStoreError::IdNotFound => WireCapabilityStoreError::ID_NOT_FOUND,
1968
1969            CapabilityStoreError::IdAlreadyExists => WireCapabilityStoreError::ID_ALREADY_EXISTS,
1970
1971            CapabilityStoreError::BadCapability => WireCapabilityStoreError::BAD_CAPABILITY,
1972
1973            CapabilityStoreError::WrongType => WireCapabilityStoreError::WRONG_TYPE,
1974
1975            CapabilityStoreError::NotDuplicatable => WireCapabilityStoreError::NOT_DUPLICATABLE,
1976
1977            CapabilityStoreError::ItemNotFound => WireCapabilityStoreError::ITEM_NOT_FOUND,
1978
1979            CapabilityStoreError::ItemAlreadyExists => {
1980                WireCapabilityStoreError::ITEM_ALREADY_EXISTS
1981            }
1982
1983            CapabilityStoreError::InvalidKey => WireCapabilityStoreError::INVALID_KEY,
1984
1985            CapabilityStoreError::InvalidArgs => WireCapabilityStoreError::INVALID_ARGS,
1986
1987            CapabilityStoreError::UnknownOrdinal_(value) => {
1988                WireCapabilityStoreError { value: ::fidl_next::WireU32::from(value) }
1989            }
1990        }
1991    }
1992}
1993
1994#[derive(Clone, Debug)]
1995#[repr(C)]
1996pub struct CapabilityStoreDropRequest {
1997    pub id: u64,
1998}
1999
2000impl ::fidl_next::Encodable for CapabilityStoreDropRequest {
2001    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2002        ::fidl_next::CopyOptimization::enable_if(
2003            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2004        )
2005    };
2006
2007    type Encoded = WireCapabilityStoreDropRequest;
2008}
2009
2010unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDropRequest
2011where
2012    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2013{
2014    #[inline]
2015    fn encode(
2016        &mut self,
2017        encoder: &mut ___E,
2018        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2019    ) -> Result<(), ::fidl_next::EncodeError> {
2020        ::fidl_next::munge! {
2021            let Self::Encoded {
2022                id,
2023
2024            } = out;
2025        }
2026
2027        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2028
2029        Ok(())
2030    }
2031}
2032
2033impl ::fidl_next::EncodableOption for Box<CapabilityStoreDropRequest> {
2034    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDropRequest>;
2035}
2036
2037unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDropRequest>
2038where
2039    ___E: ::fidl_next::Encoder + ?Sized,
2040    CapabilityStoreDropRequest: ::fidl_next::Encode<___E>,
2041{
2042    #[inline]
2043    fn encode_option(
2044        this: Option<&mut Self>,
2045        encoder: &mut ___E,
2046        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2047    ) -> Result<(), ::fidl_next::EncodeError> {
2048        if let Some(inner) = this {
2049            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2050            ::fidl_next::WireBox::encode_present(out);
2051        } else {
2052            ::fidl_next::WireBox::encode_absent(out);
2053        }
2054
2055        Ok(())
2056    }
2057}
2058
2059impl ::fidl_next::TakeFrom<WireCapabilityStoreDropRequest> for CapabilityStoreDropRequest {
2060    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2061        ::fidl_next::CopyOptimization::enable_if(
2062            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2063        )
2064    };
2065
2066    #[inline]
2067    fn take_from(from: &WireCapabilityStoreDropRequest) -> Self {
2068        Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
2069    }
2070}
2071
2072/// The wire type corresponding to [`CapabilityStoreDropRequest`].
2073#[derive(Clone, Debug)]
2074#[repr(C)]
2075pub struct WireCapabilityStoreDropRequest {
2076    pub id: ::fidl_next::WireU64,
2077}
2078
2079unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDropRequest {
2080    #[inline]
2081    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2082}
2083
2084unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDropRequest
2085where
2086    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2087{
2088    fn decode(
2089        slot: ::fidl_next::Slot<'_, Self>,
2090        decoder: &mut ___D,
2091    ) -> Result<(), ::fidl_next::DecodeError> {
2092        ::fidl_next::munge! {
2093            let Self {
2094                mut id,
2095
2096            } = slot;
2097        }
2098
2099        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2100
2101        Ok(())
2102    }
2103}
2104
2105pub type CapabilityStoreDropResponse = ();
2106
2107/// The wire type corresponding to [`CapabilityStoreDropResponse`].
2108pub type WireCapabilityStoreDropResponse = ();
2109
2110#[derive(Clone, Debug)]
2111#[repr(C)]
2112pub struct CapabilityStoreExportRequest {
2113    pub id: u64,
2114}
2115
2116impl ::fidl_next::Encodable for CapabilityStoreExportRequest {
2117    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2118        ::fidl_next::CopyOptimization::enable_if(
2119            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2120        )
2121    };
2122
2123    type Encoded = WireCapabilityStoreExportRequest;
2124}
2125
2126unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreExportRequest
2127where
2128    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2129{
2130    #[inline]
2131    fn encode(
2132        &mut self,
2133        encoder: &mut ___E,
2134        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2135    ) -> Result<(), ::fidl_next::EncodeError> {
2136        ::fidl_next::munge! {
2137            let Self::Encoded {
2138                id,
2139
2140            } = out;
2141        }
2142
2143        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2144
2145        Ok(())
2146    }
2147}
2148
2149impl ::fidl_next::EncodableOption for Box<CapabilityStoreExportRequest> {
2150    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreExportRequest>;
2151}
2152
2153unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreExportRequest>
2154where
2155    ___E: ::fidl_next::Encoder + ?Sized,
2156    CapabilityStoreExportRequest: ::fidl_next::Encode<___E>,
2157{
2158    #[inline]
2159    fn encode_option(
2160        this: Option<&mut Self>,
2161        encoder: &mut ___E,
2162        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2163    ) -> Result<(), ::fidl_next::EncodeError> {
2164        if let Some(inner) = this {
2165            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2166            ::fidl_next::WireBox::encode_present(out);
2167        } else {
2168            ::fidl_next::WireBox::encode_absent(out);
2169        }
2170
2171        Ok(())
2172    }
2173}
2174
2175impl ::fidl_next::TakeFrom<WireCapabilityStoreExportRequest> for CapabilityStoreExportRequest {
2176    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2177        ::fidl_next::CopyOptimization::enable_if(
2178            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2179        )
2180    };
2181
2182    #[inline]
2183    fn take_from(from: &WireCapabilityStoreExportRequest) -> Self {
2184        Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
2185    }
2186}
2187
2188/// The wire type corresponding to [`CapabilityStoreExportRequest`].
2189#[derive(Clone, Debug)]
2190#[repr(C)]
2191pub struct WireCapabilityStoreExportRequest {
2192    pub id: ::fidl_next::WireU64,
2193}
2194
2195unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreExportRequest {
2196    #[inline]
2197    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2198}
2199
2200unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreExportRequest
2201where
2202    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2203{
2204    fn decode(
2205        slot: ::fidl_next::Slot<'_, Self>,
2206        decoder: &mut ___D,
2207    ) -> Result<(), ::fidl_next::DecodeError> {
2208        ::fidl_next::munge! {
2209            let Self {
2210                mut id,
2211
2212            } = slot;
2213        }
2214
2215        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2216
2217        Ok(())
2218    }
2219}
2220
2221#[derive(Debug)]
2222pub struct CapabilityStoreExportResponse {
2223    pub capability: crate::Capability,
2224}
2225
2226impl ::fidl_next::Encodable for CapabilityStoreExportResponse {
2227    type Encoded = WireCapabilityStoreExportResponse;
2228}
2229
2230unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreExportResponse
2231where
2232    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2233
2234    ___E: ::fidl_next::Encoder,
2235
2236    ___E: ::fidl_next::fuchsia::HandleEncoder,
2237{
2238    #[inline]
2239    fn encode(
2240        &mut self,
2241        encoder: &mut ___E,
2242        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2243    ) -> Result<(), ::fidl_next::EncodeError> {
2244        ::fidl_next::munge! {
2245            let Self::Encoded {
2246                capability,
2247
2248            } = out;
2249        }
2250
2251        ::fidl_next::Encode::encode(&mut self.capability, encoder, capability)?;
2252
2253        Ok(())
2254    }
2255}
2256
2257impl ::fidl_next::EncodableOption for Box<CapabilityStoreExportResponse> {
2258    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreExportResponse>;
2259}
2260
2261unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreExportResponse>
2262where
2263    ___E: ::fidl_next::Encoder + ?Sized,
2264    CapabilityStoreExportResponse: ::fidl_next::Encode<___E>,
2265{
2266    #[inline]
2267    fn encode_option(
2268        this: Option<&mut Self>,
2269        encoder: &mut ___E,
2270        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2271    ) -> Result<(), ::fidl_next::EncodeError> {
2272        if let Some(inner) = this {
2273            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2274            ::fidl_next::WireBox::encode_present(out);
2275        } else {
2276            ::fidl_next::WireBox::encode_absent(out);
2277        }
2278
2279        Ok(())
2280    }
2281}
2282
2283impl ::fidl_next::TakeFrom<WireCapabilityStoreExportResponse> for CapabilityStoreExportResponse {
2284    #[inline]
2285    fn take_from(from: &WireCapabilityStoreExportResponse) -> Self {
2286        Self { capability: ::fidl_next::TakeFrom::take_from(&from.capability) }
2287    }
2288}
2289
2290/// The wire type corresponding to [`CapabilityStoreExportResponse`].
2291#[derive(Debug)]
2292#[repr(C)]
2293pub struct WireCapabilityStoreExportResponse {
2294    pub capability: crate::WireCapability,
2295}
2296
2297unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreExportResponse {
2298    #[inline]
2299    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2300}
2301
2302unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreExportResponse
2303where
2304    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2305
2306    ___D: ::fidl_next::Decoder,
2307
2308    ___D: ::fidl_next::fuchsia::HandleDecoder,
2309{
2310    fn decode(
2311        slot: ::fidl_next::Slot<'_, Self>,
2312        decoder: &mut ___D,
2313    ) -> Result<(), ::fidl_next::DecodeError> {
2314        ::fidl_next::munge! {
2315            let Self {
2316                mut capability,
2317
2318            } = slot;
2319        }
2320
2321        ::fidl_next::Decode::decode(capability.as_mut(), decoder)?;
2322
2323        Ok(())
2324    }
2325}
2326
2327#[derive(Debug)]
2328pub struct CapabilityStoreImportRequest {
2329    pub id: u64,
2330
2331    pub capability: crate::Capability,
2332}
2333
2334impl ::fidl_next::Encodable for CapabilityStoreImportRequest {
2335    type Encoded = WireCapabilityStoreImportRequest;
2336}
2337
2338unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreImportRequest
2339where
2340    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2341
2342    ___E: ::fidl_next::Encoder,
2343
2344    ___E: ::fidl_next::fuchsia::HandleEncoder,
2345{
2346    #[inline]
2347    fn encode(
2348        &mut self,
2349        encoder: &mut ___E,
2350        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2351    ) -> Result<(), ::fidl_next::EncodeError> {
2352        ::fidl_next::munge! {
2353            let Self::Encoded {
2354                id,
2355                capability,
2356
2357            } = out;
2358        }
2359
2360        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2361
2362        ::fidl_next::Encode::encode(&mut self.capability, encoder, capability)?;
2363
2364        Ok(())
2365    }
2366}
2367
2368impl ::fidl_next::EncodableOption for Box<CapabilityStoreImportRequest> {
2369    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreImportRequest>;
2370}
2371
2372unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreImportRequest>
2373where
2374    ___E: ::fidl_next::Encoder + ?Sized,
2375    CapabilityStoreImportRequest: ::fidl_next::Encode<___E>,
2376{
2377    #[inline]
2378    fn encode_option(
2379        this: Option<&mut Self>,
2380        encoder: &mut ___E,
2381        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2382    ) -> Result<(), ::fidl_next::EncodeError> {
2383        if let Some(inner) = this {
2384            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2385            ::fidl_next::WireBox::encode_present(out);
2386        } else {
2387            ::fidl_next::WireBox::encode_absent(out);
2388        }
2389
2390        Ok(())
2391    }
2392}
2393
2394impl ::fidl_next::TakeFrom<WireCapabilityStoreImportRequest> for CapabilityStoreImportRequest {
2395    #[inline]
2396    fn take_from(from: &WireCapabilityStoreImportRequest) -> Self {
2397        Self {
2398            id: ::fidl_next::TakeFrom::take_from(&from.id),
2399
2400            capability: ::fidl_next::TakeFrom::take_from(&from.capability),
2401        }
2402    }
2403}
2404
2405/// The wire type corresponding to [`CapabilityStoreImportRequest`].
2406#[derive(Debug)]
2407#[repr(C)]
2408pub struct WireCapabilityStoreImportRequest {
2409    pub id: ::fidl_next::WireU64,
2410
2411    pub capability: crate::WireCapability,
2412}
2413
2414unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreImportRequest {
2415    #[inline]
2416    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2417}
2418
2419unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreImportRequest
2420where
2421    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2422
2423    ___D: ::fidl_next::Decoder,
2424
2425    ___D: ::fidl_next::fuchsia::HandleDecoder,
2426{
2427    fn decode(
2428        slot: ::fidl_next::Slot<'_, Self>,
2429        decoder: &mut ___D,
2430    ) -> Result<(), ::fidl_next::DecodeError> {
2431        ::fidl_next::munge! {
2432            let Self {
2433                mut id,
2434                mut capability,
2435
2436            } = slot;
2437        }
2438
2439        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2440
2441        ::fidl_next::Decode::decode(capability.as_mut(), decoder)?;
2442
2443        Ok(())
2444    }
2445}
2446
2447pub type CapabilityStoreImportResponse = ();
2448
2449/// The wire type corresponding to [`CapabilityStoreImportResponse`].
2450pub type WireCapabilityStoreImportResponse = ();
2451
2452#[derive(Debug)]
2453pub struct CapabilityStoreConnectorCreateRequest {
2454    pub id: u64,
2455
2456    pub receiver: ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::Receiver>,
2457}
2458
2459impl ::fidl_next::Encodable for CapabilityStoreConnectorCreateRequest {
2460    type Encoded = WireCapabilityStoreConnectorCreateRequest;
2461}
2462
2463unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreConnectorCreateRequest
2464where
2465    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2466
2467    ___E: ::fidl_next::fuchsia::HandleEncoder,
2468{
2469    #[inline]
2470    fn encode(
2471        &mut self,
2472        encoder: &mut ___E,
2473        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2474    ) -> Result<(), ::fidl_next::EncodeError> {
2475        ::fidl_next::munge! {
2476            let Self::Encoded {
2477                id,
2478                receiver,
2479
2480            } = out;
2481        }
2482
2483        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2484
2485        ::fidl_next::Encode::encode(&mut self.receiver, encoder, receiver)?;
2486
2487        Ok(())
2488    }
2489}
2490
2491impl ::fidl_next::EncodableOption for Box<CapabilityStoreConnectorCreateRequest> {
2492    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreConnectorCreateRequest>;
2493}
2494
2495unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreConnectorCreateRequest>
2496where
2497    ___E: ::fidl_next::Encoder + ?Sized,
2498    CapabilityStoreConnectorCreateRequest: ::fidl_next::Encode<___E>,
2499{
2500    #[inline]
2501    fn encode_option(
2502        this: Option<&mut Self>,
2503        encoder: &mut ___E,
2504        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2505    ) -> Result<(), ::fidl_next::EncodeError> {
2506        if let Some(inner) = this {
2507            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2508            ::fidl_next::WireBox::encode_present(out);
2509        } else {
2510            ::fidl_next::WireBox::encode_absent(out);
2511        }
2512
2513        Ok(())
2514    }
2515}
2516
2517impl ::fidl_next::TakeFrom<WireCapabilityStoreConnectorCreateRequest>
2518    for CapabilityStoreConnectorCreateRequest
2519{
2520    #[inline]
2521    fn take_from(from: &WireCapabilityStoreConnectorCreateRequest) -> Self {
2522        Self {
2523            id: ::fidl_next::TakeFrom::take_from(&from.id),
2524
2525            receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
2526        }
2527    }
2528}
2529
2530/// The wire type corresponding to [`CapabilityStoreConnectorCreateRequest`].
2531#[derive(Debug)]
2532#[repr(C)]
2533pub struct WireCapabilityStoreConnectorCreateRequest {
2534    pub id: ::fidl_next::WireU64,
2535
2536    pub receiver: ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::Receiver>,
2537}
2538
2539unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreConnectorCreateRequest {
2540    #[inline]
2541    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2542        unsafe {
2543            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2544        }
2545    }
2546}
2547
2548unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreConnectorCreateRequest
2549where
2550    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2551
2552    ___D: ::fidl_next::fuchsia::HandleDecoder,
2553{
2554    fn decode(
2555        slot: ::fidl_next::Slot<'_, Self>,
2556        decoder: &mut ___D,
2557    ) -> Result<(), ::fidl_next::DecodeError> {
2558        ::fidl_next::munge! {
2559            let Self {
2560                mut id,
2561                mut receiver,
2562
2563            } = slot;
2564        }
2565
2566        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2567
2568        ::fidl_next::Decode::decode(receiver.as_mut(), decoder)?;
2569
2570        Ok(())
2571    }
2572}
2573
2574pub type CapabilityStoreConnectorCreateResponse = ();
2575
2576/// The wire type corresponding to [`CapabilityStoreConnectorCreateResponse`].
2577pub type WireCapabilityStoreConnectorCreateResponse = ();
2578
2579#[derive(Debug)]
2580pub struct CapabilityStoreConnectorOpenRequest {
2581    pub id: u64,
2582
2583    pub server_end: ::fidl_next::fuchsia::zx::Handle,
2584}
2585
2586impl ::fidl_next::Encodable for CapabilityStoreConnectorOpenRequest {
2587    type Encoded = WireCapabilityStoreConnectorOpenRequest;
2588}
2589
2590unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreConnectorOpenRequest
2591where
2592    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2593
2594    ___E: ::fidl_next::fuchsia::HandleEncoder,
2595{
2596    #[inline]
2597    fn encode(
2598        &mut self,
2599        encoder: &mut ___E,
2600        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2601    ) -> Result<(), ::fidl_next::EncodeError> {
2602        ::fidl_next::munge! {
2603            let Self::Encoded {
2604                id,
2605                server_end,
2606
2607            } = out;
2608        }
2609
2610        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2611
2612        ::fidl_next::Encode::encode(&mut self.server_end, encoder, server_end)?;
2613
2614        Ok(())
2615    }
2616}
2617
2618impl ::fidl_next::EncodableOption for Box<CapabilityStoreConnectorOpenRequest> {
2619    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreConnectorOpenRequest>;
2620}
2621
2622unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreConnectorOpenRequest>
2623where
2624    ___E: ::fidl_next::Encoder + ?Sized,
2625    CapabilityStoreConnectorOpenRequest: ::fidl_next::Encode<___E>,
2626{
2627    #[inline]
2628    fn encode_option(
2629        this: Option<&mut Self>,
2630        encoder: &mut ___E,
2631        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2632    ) -> Result<(), ::fidl_next::EncodeError> {
2633        if let Some(inner) = this {
2634            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2635            ::fidl_next::WireBox::encode_present(out);
2636        } else {
2637            ::fidl_next::WireBox::encode_absent(out);
2638        }
2639
2640        Ok(())
2641    }
2642}
2643
2644impl ::fidl_next::TakeFrom<WireCapabilityStoreConnectorOpenRequest>
2645    for CapabilityStoreConnectorOpenRequest
2646{
2647    #[inline]
2648    fn take_from(from: &WireCapabilityStoreConnectorOpenRequest) -> Self {
2649        Self {
2650            id: ::fidl_next::TakeFrom::take_from(&from.id),
2651
2652            server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
2653        }
2654    }
2655}
2656
2657/// The wire type corresponding to [`CapabilityStoreConnectorOpenRequest`].
2658#[derive(Debug)]
2659#[repr(C)]
2660pub struct WireCapabilityStoreConnectorOpenRequest {
2661    pub id: ::fidl_next::WireU64,
2662
2663    pub server_end: ::fidl_next::fuchsia::WireHandle,
2664}
2665
2666unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreConnectorOpenRequest {
2667    #[inline]
2668    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2669        unsafe {
2670            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2671        }
2672    }
2673}
2674
2675unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreConnectorOpenRequest
2676where
2677    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2678
2679    ___D: ::fidl_next::fuchsia::HandleDecoder,
2680{
2681    fn decode(
2682        slot: ::fidl_next::Slot<'_, Self>,
2683        decoder: &mut ___D,
2684    ) -> Result<(), ::fidl_next::DecodeError> {
2685        ::fidl_next::munge! {
2686            let Self {
2687                mut id,
2688                mut server_end,
2689
2690            } = slot;
2691        }
2692
2693        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2694
2695        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
2696
2697        Ok(())
2698    }
2699}
2700
2701pub type CapabilityStoreConnectorOpenResponse = ();
2702
2703/// The wire type corresponding to [`CapabilityStoreConnectorOpenResponse`].
2704pub type WireCapabilityStoreConnectorOpenResponse = ();
2705
2706#[derive(Debug)]
2707pub struct CapabilityStoreDirConnectorCreateRequest {
2708    pub id: u64,
2709
2710    pub receiver: ::fidl_next::ClientEnd<::fidl_next::fuchsia::zx::Channel, crate::DirReceiver>,
2711}
2712
2713impl ::fidl_next::Encodable for CapabilityStoreDirConnectorCreateRequest {
2714    type Encoded = WireCapabilityStoreDirConnectorCreateRequest;
2715}
2716
2717unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDirConnectorCreateRequest
2718where
2719    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2720
2721    ___E: ::fidl_next::fuchsia::HandleEncoder,
2722{
2723    #[inline]
2724    fn encode(
2725        &mut self,
2726        encoder: &mut ___E,
2727        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2728    ) -> Result<(), ::fidl_next::EncodeError> {
2729        ::fidl_next::munge! {
2730            let Self::Encoded {
2731                id,
2732                receiver,
2733
2734            } = out;
2735        }
2736
2737        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2738
2739        ::fidl_next::Encode::encode(&mut self.receiver, encoder, receiver)?;
2740
2741        Ok(())
2742    }
2743}
2744
2745impl ::fidl_next::EncodableOption for Box<CapabilityStoreDirConnectorCreateRequest> {
2746    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDirConnectorCreateRequest>;
2747}
2748
2749unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDirConnectorCreateRequest>
2750where
2751    ___E: ::fidl_next::Encoder + ?Sized,
2752    CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Encode<___E>,
2753{
2754    #[inline]
2755    fn encode_option(
2756        this: Option<&mut Self>,
2757        encoder: &mut ___E,
2758        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2759    ) -> Result<(), ::fidl_next::EncodeError> {
2760        if let Some(inner) = this {
2761            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2762            ::fidl_next::WireBox::encode_present(out);
2763        } else {
2764            ::fidl_next::WireBox::encode_absent(out);
2765        }
2766
2767        Ok(())
2768    }
2769}
2770
2771impl ::fidl_next::TakeFrom<WireCapabilityStoreDirConnectorCreateRequest>
2772    for CapabilityStoreDirConnectorCreateRequest
2773{
2774    #[inline]
2775    fn take_from(from: &WireCapabilityStoreDirConnectorCreateRequest) -> Self {
2776        Self {
2777            id: ::fidl_next::TakeFrom::take_from(&from.id),
2778
2779            receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
2780        }
2781    }
2782}
2783
2784/// The wire type corresponding to [`CapabilityStoreDirConnectorCreateRequest`].
2785#[derive(Debug)]
2786#[repr(C)]
2787pub struct WireCapabilityStoreDirConnectorCreateRequest {
2788    pub id: ::fidl_next::WireU64,
2789
2790    pub receiver: ::fidl_next::ClientEnd<::fidl_next::fuchsia::WireChannel, crate::DirReceiver>,
2791}
2792
2793unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDirConnectorCreateRequest {
2794    #[inline]
2795    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2796        unsafe {
2797            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2798        }
2799    }
2800}
2801
2802unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDirConnectorCreateRequest
2803where
2804    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2805
2806    ___D: ::fidl_next::fuchsia::HandleDecoder,
2807{
2808    fn decode(
2809        slot: ::fidl_next::Slot<'_, Self>,
2810        decoder: &mut ___D,
2811    ) -> Result<(), ::fidl_next::DecodeError> {
2812        ::fidl_next::munge! {
2813            let Self {
2814                mut id,
2815                mut receiver,
2816
2817            } = slot;
2818        }
2819
2820        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2821
2822        ::fidl_next::Decode::decode(receiver.as_mut(), decoder)?;
2823
2824        Ok(())
2825    }
2826}
2827
2828pub type CapabilityStoreDirConnectorCreateResponse = ();
2829
2830/// The wire type corresponding to [`CapabilityStoreDirConnectorCreateResponse`].
2831pub type WireCapabilityStoreDirConnectorCreateResponse = ();
2832
2833#[derive(Debug)]
2834pub struct CapabilityStoreDirConnectorOpenRequest {
2835    pub id: u64,
2836
2837    pub server_end: ::fidl_next::ServerEnd<
2838        ::fidl_next::fuchsia::zx::Channel,
2839        ::fidl_next_fuchsia_io::Directory,
2840    >,
2841}
2842
2843impl ::fidl_next::Encodable for CapabilityStoreDirConnectorOpenRequest {
2844    type Encoded = WireCapabilityStoreDirConnectorOpenRequest;
2845}
2846
2847unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDirConnectorOpenRequest
2848where
2849    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2850
2851    ___E: ::fidl_next::fuchsia::HandleEncoder,
2852{
2853    #[inline]
2854    fn encode(
2855        &mut self,
2856        encoder: &mut ___E,
2857        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2858    ) -> Result<(), ::fidl_next::EncodeError> {
2859        ::fidl_next::munge! {
2860            let Self::Encoded {
2861                id,
2862                server_end,
2863
2864            } = out;
2865        }
2866
2867        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
2868
2869        ::fidl_next::Encode::encode(&mut self.server_end, encoder, server_end)?;
2870
2871        Ok(())
2872    }
2873}
2874
2875impl ::fidl_next::EncodableOption for Box<CapabilityStoreDirConnectorOpenRequest> {
2876    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDirConnectorOpenRequest>;
2877}
2878
2879unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDirConnectorOpenRequest>
2880where
2881    ___E: ::fidl_next::Encoder + ?Sized,
2882    CapabilityStoreDirConnectorOpenRequest: ::fidl_next::Encode<___E>,
2883{
2884    #[inline]
2885    fn encode_option(
2886        this: Option<&mut Self>,
2887        encoder: &mut ___E,
2888        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2889    ) -> Result<(), ::fidl_next::EncodeError> {
2890        if let Some(inner) = this {
2891            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2892            ::fidl_next::WireBox::encode_present(out);
2893        } else {
2894            ::fidl_next::WireBox::encode_absent(out);
2895        }
2896
2897        Ok(())
2898    }
2899}
2900
2901impl ::fidl_next::TakeFrom<WireCapabilityStoreDirConnectorOpenRequest>
2902    for CapabilityStoreDirConnectorOpenRequest
2903{
2904    #[inline]
2905    fn take_from(from: &WireCapabilityStoreDirConnectorOpenRequest) -> Self {
2906        Self {
2907            id: ::fidl_next::TakeFrom::take_from(&from.id),
2908
2909            server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
2910        }
2911    }
2912}
2913
2914/// The wire type corresponding to [`CapabilityStoreDirConnectorOpenRequest`].
2915#[derive(Debug)]
2916#[repr(C)]
2917pub struct WireCapabilityStoreDirConnectorOpenRequest {
2918    pub id: ::fidl_next::WireU64,
2919
2920    pub server_end: ::fidl_next::ServerEnd<
2921        ::fidl_next::fuchsia::WireChannel,
2922        ::fidl_next_fuchsia_io::Directory,
2923    >,
2924}
2925
2926unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDirConnectorOpenRequest {
2927    #[inline]
2928    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2929        unsafe {
2930            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2931        }
2932    }
2933}
2934
2935unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDirConnectorOpenRequest
2936where
2937    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2938
2939    ___D: ::fidl_next::fuchsia::HandleDecoder,
2940{
2941    fn decode(
2942        slot: ::fidl_next::Slot<'_, Self>,
2943        decoder: &mut ___D,
2944    ) -> Result<(), ::fidl_next::DecodeError> {
2945        ::fidl_next::munge! {
2946            let Self {
2947                mut id,
2948                mut server_end,
2949
2950            } = slot;
2951        }
2952
2953        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2954
2955        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
2956
2957        Ok(())
2958    }
2959}
2960
2961pub type CapabilityStoreDirConnectorOpenResponse = ();
2962
2963/// The wire type corresponding to [`CapabilityStoreDirConnectorOpenResponse`].
2964pub type WireCapabilityStoreDirConnectorOpenResponse = ();
2965
2966#[derive(Clone, Debug)]
2967#[repr(C)]
2968pub struct CapabilityStoreDictionaryCreateRequest {
2969    pub id: u64,
2970}
2971
2972impl ::fidl_next::Encodable for CapabilityStoreDictionaryCreateRequest {
2973    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
2974        ::fidl_next::CopyOptimization::enable_if(
2975            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2976        )
2977    };
2978
2979    type Encoded = WireCapabilityStoreDictionaryCreateRequest;
2980}
2981
2982unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryCreateRequest
2983where
2984    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2985{
2986    #[inline]
2987    fn encode(
2988        &mut self,
2989        encoder: &mut ___E,
2990        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2991    ) -> Result<(), ::fidl_next::EncodeError> {
2992        ::fidl_next::munge! {
2993            let Self::Encoded {
2994                id,
2995
2996            } = out;
2997        }
2998
2999        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3000
3001        Ok(())
3002    }
3003}
3004
3005impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryCreateRequest> {
3006    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryCreateRequest>;
3007}
3008
3009unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryCreateRequest>
3010where
3011    ___E: ::fidl_next::Encoder + ?Sized,
3012    CapabilityStoreDictionaryCreateRequest: ::fidl_next::Encode<___E>,
3013{
3014    #[inline]
3015    fn encode_option(
3016        this: Option<&mut Self>,
3017        encoder: &mut ___E,
3018        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3019    ) -> Result<(), ::fidl_next::EncodeError> {
3020        if let Some(inner) = this {
3021            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3022            ::fidl_next::WireBox::encode_present(out);
3023        } else {
3024            ::fidl_next::WireBox::encode_absent(out);
3025        }
3026
3027        Ok(())
3028    }
3029}
3030
3031impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryCreateRequest>
3032    for CapabilityStoreDictionaryCreateRequest
3033{
3034    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
3035        ::fidl_next::CopyOptimization::enable_if(
3036            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
3037        )
3038    };
3039
3040    #[inline]
3041    fn take_from(from: &WireCapabilityStoreDictionaryCreateRequest) -> Self {
3042        Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
3043    }
3044}
3045
3046/// The wire type corresponding to [`CapabilityStoreDictionaryCreateRequest`].
3047#[derive(Clone, Debug)]
3048#[repr(C)]
3049pub struct WireCapabilityStoreDictionaryCreateRequest {
3050    pub id: ::fidl_next::WireU64,
3051}
3052
3053unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryCreateRequest {
3054    #[inline]
3055    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3056}
3057
3058unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryCreateRequest
3059where
3060    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3061{
3062    fn decode(
3063        slot: ::fidl_next::Slot<'_, Self>,
3064        decoder: &mut ___D,
3065    ) -> Result<(), ::fidl_next::DecodeError> {
3066        ::fidl_next::munge! {
3067            let Self {
3068                mut id,
3069
3070            } = slot;
3071        }
3072
3073        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3074
3075        Ok(())
3076    }
3077}
3078
3079pub type CapabilityStoreDictionaryCreateResponse = ();
3080
3081/// The wire type corresponding to [`CapabilityStoreDictionaryCreateResponse`].
3082pub type WireCapabilityStoreDictionaryCreateResponse = ();
3083
3084#[derive(Debug)]
3085pub struct CapabilityStoreDictionaryLegacyImportRequest {
3086    pub id: u64,
3087
3088    pub client_end: ::fidl_next::fuchsia::zx::Handle,
3089}
3090
3091impl ::fidl_next::Encodable for CapabilityStoreDictionaryLegacyImportRequest {
3092    type Encoded = WireCapabilityStoreDictionaryLegacyImportRequest;
3093}
3094
3095unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryLegacyImportRequest
3096where
3097    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3098
3099    ___E: ::fidl_next::fuchsia::HandleEncoder,
3100{
3101    #[inline]
3102    fn encode(
3103        &mut self,
3104        encoder: &mut ___E,
3105        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3106    ) -> Result<(), ::fidl_next::EncodeError> {
3107        ::fidl_next::munge! {
3108            let Self::Encoded {
3109                id,
3110                client_end,
3111
3112            } = out;
3113        }
3114
3115        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3116
3117        ::fidl_next::Encode::encode(&mut self.client_end, encoder, client_end)?;
3118
3119        Ok(())
3120    }
3121}
3122
3123impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryLegacyImportRequest> {
3124    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryLegacyImportRequest>;
3125}
3126
3127unsafe impl<___E> ::fidl_next::EncodeOption<___E>
3128    for Box<CapabilityStoreDictionaryLegacyImportRequest>
3129where
3130    ___E: ::fidl_next::Encoder + ?Sized,
3131    CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Encode<___E>,
3132{
3133    #[inline]
3134    fn encode_option(
3135        this: Option<&mut Self>,
3136        encoder: &mut ___E,
3137        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3138    ) -> Result<(), ::fidl_next::EncodeError> {
3139        if let Some(inner) = this {
3140            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3141            ::fidl_next::WireBox::encode_present(out);
3142        } else {
3143            ::fidl_next::WireBox::encode_absent(out);
3144        }
3145
3146        Ok(())
3147    }
3148}
3149
3150impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryLegacyImportRequest>
3151    for CapabilityStoreDictionaryLegacyImportRequest
3152{
3153    #[inline]
3154    fn take_from(from: &WireCapabilityStoreDictionaryLegacyImportRequest) -> Self {
3155        Self {
3156            id: ::fidl_next::TakeFrom::take_from(&from.id),
3157
3158            client_end: ::fidl_next::TakeFrom::take_from(&from.client_end),
3159        }
3160    }
3161}
3162
3163/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyImportRequest`].
3164#[derive(Debug)]
3165#[repr(C)]
3166pub struct WireCapabilityStoreDictionaryLegacyImportRequest {
3167    pub id: ::fidl_next::WireU64,
3168
3169    pub client_end: ::fidl_next::fuchsia::WireHandle,
3170}
3171
3172unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryLegacyImportRequest {
3173    #[inline]
3174    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3175        unsafe {
3176            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
3177        }
3178    }
3179}
3180
3181unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryLegacyImportRequest
3182where
3183    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3184
3185    ___D: ::fidl_next::fuchsia::HandleDecoder,
3186{
3187    fn decode(
3188        slot: ::fidl_next::Slot<'_, Self>,
3189        decoder: &mut ___D,
3190    ) -> Result<(), ::fidl_next::DecodeError> {
3191        ::fidl_next::munge! {
3192            let Self {
3193                mut id,
3194                mut client_end,
3195
3196            } = slot;
3197        }
3198
3199        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3200
3201        ::fidl_next::Decode::decode(client_end.as_mut(), decoder)?;
3202
3203        Ok(())
3204    }
3205}
3206
3207pub type CapabilityStoreDictionaryLegacyImportResponse = ();
3208
3209/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyImportResponse`].
3210pub type WireCapabilityStoreDictionaryLegacyImportResponse = ();
3211
3212#[derive(Debug)]
3213pub struct CapabilityStoreDictionaryLegacyExportRequest {
3214    pub id: u64,
3215
3216    pub server_end: ::fidl_next::fuchsia::zx::Handle,
3217}
3218
3219impl ::fidl_next::Encodable for CapabilityStoreDictionaryLegacyExportRequest {
3220    type Encoded = WireCapabilityStoreDictionaryLegacyExportRequest;
3221}
3222
3223unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryLegacyExportRequest
3224where
3225    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3226
3227    ___E: ::fidl_next::fuchsia::HandleEncoder,
3228{
3229    #[inline]
3230    fn encode(
3231        &mut self,
3232        encoder: &mut ___E,
3233        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3234    ) -> Result<(), ::fidl_next::EncodeError> {
3235        ::fidl_next::munge! {
3236            let Self::Encoded {
3237                id,
3238                server_end,
3239
3240            } = out;
3241        }
3242
3243        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3244
3245        ::fidl_next::Encode::encode(&mut self.server_end, encoder, server_end)?;
3246
3247        Ok(())
3248    }
3249}
3250
3251impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryLegacyExportRequest> {
3252    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryLegacyExportRequest>;
3253}
3254
3255unsafe impl<___E> ::fidl_next::EncodeOption<___E>
3256    for Box<CapabilityStoreDictionaryLegacyExportRequest>
3257where
3258    ___E: ::fidl_next::Encoder + ?Sized,
3259    CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Encode<___E>,
3260{
3261    #[inline]
3262    fn encode_option(
3263        this: Option<&mut Self>,
3264        encoder: &mut ___E,
3265        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3266    ) -> Result<(), ::fidl_next::EncodeError> {
3267        if let Some(inner) = this {
3268            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3269            ::fidl_next::WireBox::encode_present(out);
3270        } else {
3271            ::fidl_next::WireBox::encode_absent(out);
3272        }
3273
3274        Ok(())
3275    }
3276}
3277
3278impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryLegacyExportRequest>
3279    for CapabilityStoreDictionaryLegacyExportRequest
3280{
3281    #[inline]
3282    fn take_from(from: &WireCapabilityStoreDictionaryLegacyExportRequest) -> Self {
3283        Self {
3284            id: ::fidl_next::TakeFrom::take_from(&from.id),
3285
3286            server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
3287        }
3288    }
3289}
3290
3291/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyExportRequest`].
3292#[derive(Debug)]
3293#[repr(C)]
3294pub struct WireCapabilityStoreDictionaryLegacyExportRequest {
3295    pub id: ::fidl_next::WireU64,
3296
3297    pub server_end: ::fidl_next::fuchsia::WireHandle,
3298}
3299
3300unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryLegacyExportRequest {
3301    #[inline]
3302    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3303        unsafe {
3304            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
3305        }
3306    }
3307}
3308
3309unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryLegacyExportRequest
3310where
3311    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3312
3313    ___D: ::fidl_next::fuchsia::HandleDecoder,
3314{
3315    fn decode(
3316        slot: ::fidl_next::Slot<'_, Self>,
3317        decoder: &mut ___D,
3318    ) -> Result<(), ::fidl_next::DecodeError> {
3319        ::fidl_next::munge! {
3320            let Self {
3321                mut id,
3322                mut server_end,
3323
3324            } = slot;
3325        }
3326
3327        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3328
3329        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
3330
3331        Ok(())
3332    }
3333}
3334
3335pub type CapabilityStoreDictionaryLegacyExportResponse = ();
3336
3337/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyExportResponse`].
3338pub type WireCapabilityStoreDictionaryLegacyExportResponse = ();
3339
3340#[doc = " The maximum length of a dictionary key. This should coincide with\n fuchsia.component.MAX_NAME_LENGTH.\n"]
3341pub const MAX_NAME_LENGTH: u64 = 255;
3342
3343#[doc = " The key of a [`DictionaryItem`]. The constraints for valid keys are documented at\n https://fuchsia.dev/reference/cml#names.\n"]
3344pub type DictionaryKey = String;
3345
3346/// The wire type corresponding to [`DictionaryKey`].
3347pub type WireDictionaryKey = ::fidl_next::WireString;
3348
3349#[doc = " A key-value pair in a [`DictionaryRef`].\n"]
3350#[derive(Clone, Debug)]
3351pub struct DictionaryItem {
3352    pub key: String,
3353
3354    pub value: u64,
3355}
3356
3357impl ::fidl_next::Encodable for DictionaryItem {
3358    type Encoded = WireDictionaryItem;
3359}
3360
3361unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryItem
3362where
3363    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3364
3365    ___E: ::fidl_next::Encoder,
3366{
3367    #[inline]
3368    fn encode(
3369        &mut self,
3370        encoder: &mut ___E,
3371        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3372    ) -> Result<(), ::fidl_next::EncodeError> {
3373        ::fidl_next::munge! {
3374            let Self::Encoded {
3375                key,
3376                value,
3377
3378            } = out;
3379        }
3380
3381        ::fidl_next::Encode::encode(&mut self.key, encoder, key)?;
3382
3383        ::fidl_next::Encode::encode(&mut self.value, encoder, value)?;
3384
3385        Ok(())
3386    }
3387}
3388
3389impl ::fidl_next::EncodableOption for Box<DictionaryItem> {
3390    type EncodedOption = ::fidl_next::WireBox<WireDictionaryItem>;
3391}
3392
3393unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryItem>
3394where
3395    ___E: ::fidl_next::Encoder + ?Sized,
3396    DictionaryItem: ::fidl_next::Encode<___E>,
3397{
3398    #[inline]
3399    fn encode_option(
3400        this: Option<&mut Self>,
3401        encoder: &mut ___E,
3402        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3403    ) -> Result<(), ::fidl_next::EncodeError> {
3404        if let Some(inner) = this {
3405            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3406            ::fidl_next::WireBox::encode_present(out);
3407        } else {
3408            ::fidl_next::WireBox::encode_absent(out);
3409        }
3410
3411        Ok(())
3412    }
3413}
3414
3415impl ::fidl_next::TakeFrom<WireDictionaryItem> for DictionaryItem {
3416    #[inline]
3417    fn take_from(from: &WireDictionaryItem) -> Self {
3418        Self {
3419            key: ::fidl_next::TakeFrom::take_from(&from.key),
3420
3421            value: ::fidl_next::TakeFrom::take_from(&from.value),
3422        }
3423    }
3424}
3425
3426/// The wire type corresponding to [`DictionaryItem`].
3427#[derive(Debug)]
3428#[repr(C)]
3429pub struct WireDictionaryItem {
3430    pub key: ::fidl_next::WireString,
3431
3432    pub value: ::fidl_next::WireU64,
3433}
3434
3435unsafe impl ::fidl_next::ZeroPadding for WireDictionaryItem {
3436    #[inline]
3437    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3438}
3439
3440unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryItem
3441where
3442    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3443
3444    ___D: ::fidl_next::Decoder,
3445{
3446    fn decode(
3447        slot: ::fidl_next::Slot<'_, Self>,
3448        decoder: &mut ___D,
3449    ) -> Result<(), ::fidl_next::DecodeError> {
3450        ::fidl_next::munge! {
3451            let Self {
3452                mut key,
3453                mut value,
3454
3455            } = slot;
3456        }
3457
3458        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
3459
3460        let key = unsafe { key.deref_unchecked() };
3461
3462        if key.len() > 255 {
3463            return Err(::fidl_next::DecodeError::VectorTooLong {
3464                size: key.len() as u64,
3465                limit: 255,
3466            });
3467        }
3468
3469        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
3470
3471        Ok(())
3472    }
3473}
3474
3475#[derive(Clone, Debug)]
3476pub struct CapabilityStoreDictionaryInsertRequest {
3477    pub id: u64,
3478
3479    pub item: crate::DictionaryItem,
3480}
3481
3482impl ::fidl_next::Encodable for CapabilityStoreDictionaryInsertRequest {
3483    type Encoded = WireCapabilityStoreDictionaryInsertRequest;
3484}
3485
3486unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryInsertRequest
3487where
3488    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3489
3490    ___E: ::fidl_next::Encoder,
3491{
3492    #[inline]
3493    fn encode(
3494        &mut self,
3495        encoder: &mut ___E,
3496        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3497    ) -> Result<(), ::fidl_next::EncodeError> {
3498        ::fidl_next::munge! {
3499            let Self::Encoded {
3500                id,
3501                item,
3502
3503            } = out;
3504        }
3505
3506        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3507
3508        ::fidl_next::Encode::encode(&mut self.item, encoder, item)?;
3509
3510        Ok(())
3511    }
3512}
3513
3514impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryInsertRequest> {
3515    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryInsertRequest>;
3516}
3517
3518unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryInsertRequest>
3519where
3520    ___E: ::fidl_next::Encoder + ?Sized,
3521    CapabilityStoreDictionaryInsertRequest: ::fidl_next::Encode<___E>,
3522{
3523    #[inline]
3524    fn encode_option(
3525        this: Option<&mut Self>,
3526        encoder: &mut ___E,
3527        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3528    ) -> Result<(), ::fidl_next::EncodeError> {
3529        if let Some(inner) = this {
3530            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3531            ::fidl_next::WireBox::encode_present(out);
3532        } else {
3533            ::fidl_next::WireBox::encode_absent(out);
3534        }
3535
3536        Ok(())
3537    }
3538}
3539
3540impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryInsertRequest>
3541    for CapabilityStoreDictionaryInsertRequest
3542{
3543    #[inline]
3544    fn take_from(from: &WireCapabilityStoreDictionaryInsertRequest) -> Self {
3545        Self {
3546            id: ::fidl_next::TakeFrom::take_from(&from.id),
3547
3548            item: ::fidl_next::TakeFrom::take_from(&from.item),
3549        }
3550    }
3551}
3552
3553/// The wire type corresponding to [`CapabilityStoreDictionaryInsertRequest`].
3554#[derive(Debug)]
3555#[repr(C)]
3556pub struct WireCapabilityStoreDictionaryInsertRequest {
3557    pub id: ::fidl_next::WireU64,
3558
3559    pub item: crate::WireDictionaryItem,
3560}
3561
3562unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryInsertRequest {
3563    #[inline]
3564    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3565}
3566
3567unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryInsertRequest
3568where
3569    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3570
3571    ___D: ::fidl_next::Decoder,
3572{
3573    fn decode(
3574        slot: ::fidl_next::Slot<'_, Self>,
3575        decoder: &mut ___D,
3576    ) -> Result<(), ::fidl_next::DecodeError> {
3577        ::fidl_next::munge! {
3578            let Self {
3579                mut id,
3580                mut item,
3581
3582            } = slot;
3583        }
3584
3585        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3586
3587        ::fidl_next::Decode::decode(item.as_mut(), decoder)?;
3588
3589        Ok(())
3590    }
3591}
3592
3593pub type CapabilityStoreDictionaryInsertResponse = ();
3594
3595/// The wire type corresponding to [`CapabilityStoreDictionaryInsertResponse`].
3596pub type WireCapabilityStoreDictionaryInsertResponse = ();
3597
3598#[derive(Clone, Debug)]
3599pub struct CapabilityStoreDictionaryGetRequest {
3600    pub id: u64,
3601
3602    pub key: String,
3603
3604    pub dest_id: u64,
3605}
3606
3607impl ::fidl_next::Encodable for CapabilityStoreDictionaryGetRequest {
3608    type Encoded = WireCapabilityStoreDictionaryGetRequest;
3609}
3610
3611unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryGetRequest
3612where
3613    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3614
3615    ___E: ::fidl_next::Encoder,
3616{
3617    #[inline]
3618    fn encode(
3619        &mut self,
3620        encoder: &mut ___E,
3621        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3622    ) -> Result<(), ::fidl_next::EncodeError> {
3623        ::fidl_next::munge! {
3624            let Self::Encoded {
3625                id,
3626                key,
3627                dest_id,
3628
3629            } = out;
3630        }
3631
3632        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3633
3634        ::fidl_next::Encode::encode(&mut self.key, encoder, key)?;
3635
3636        ::fidl_next::Encode::encode(&mut self.dest_id, encoder, dest_id)?;
3637
3638        Ok(())
3639    }
3640}
3641
3642impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryGetRequest> {
3643    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryGetRequest>;
3644}
3645
3646unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryGetRequest>
3647where
3648    ___E: ::fidl_next::Encoder + ?Sized,
3649    CapabilityStoreDictionaryGetRequest: ::fidl_next::Encode<___E>,
3650{
3651    #[inline]
3652    fn encode_option(
3653        this: Option<&mut Self>,
3654        encoder: &mut ___E,
3655        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3656    ) -> Result<(), ::fidl_next::EncodeError> {
3657        if let Some(inner) = this {
3658            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3659            ::fidl_next::WireBox::encode_present(out);
3660        } else {
3661            ::fidl_next::WireBox::encode_absent(out);
3662        }
3663
3664        Ok(())
3665    }
3666}
3667
3668impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryGetRequest>
3669    for CapabilityStoreDictionaryGetRequest
3670{
3671    #[inline]
3672    fn take_from(from: &WireCapabilityStoreDictionaryGetRequest) -> Self {
3673        Self {
3674            id: ::fidl_next::TakeFrom::take_from(&from.id),
3675
3676            key: ::fidl_next::TakeFrom::take_from(&from.key),
3677
3678            dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
3679        }
3680    }
3681}
3682
3683/// The wire type corresponding to [`CapabilityStoreDictionaryGetRequest`].
3684#[derive(Debug)]
3685#[repr(C)]
3686pub struct WireCapabilityStoreDictionaryGetRequest {
3687    pub id: ::fidl_next::WireU64,
3688
3689    pub key: ::fidl_next::WireString,
3690
3691    pub dest_id: ::fidl_next::WireU64,
3692}
3693
3694unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryGetRequest {
3695    #[inline]
3696    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3697}
3698
3699unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryGetRequest
3700where
3701    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3702
3703    ___D: ::fidl_next::Decoder,
3704{
3705    fn decode(
3706        slot: ::fidl_next::Slot<'_, Self>,
3707        decoder: &mut ___D,
3708    ) -> Result<(), ::fidl_next::DecodeError> {
3709        ::fidl_next::munge! {
3710            let Self {
3711                mut id,
3712                mut key,
3713                mut dest_id,
3714
3715            } = slot;
3716        }
3717
3718        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3719
3720        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
3721
3722        let key = unsafe { key.deref_unchecked() };
3723
3724        if key.len() > 255 {
3725            return Err(::fidl_next::DecodeError::VectorTooLong {
3726                size: key.len() as u64,
3727                limit: 255,
3728            });
3729        }
3730
3731        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
3732
3733        Ok(())
3734    }
3735}
3736
3737pub type CapabilityStoreDictionaryGetResponse = ();
3738
3739/// The wire type corresponding to [`CapabilityStoreDictionaryGetResponse`].
3740pub type WireCapabilityStoreDictionaryGetResponse = ();
3741
3742#[doc = " A [CapabilityId] wrapped in a struct. This is useful for putting a [CapabilityId] in a `box<>`,\n which FIDL does not allow for pure integral types.\n"]
3743#[derive(Clone, Debug)]
3744#[repr(C)]
3745pub struct WrappedCapabilityId {
3746    pub id: u64,
3747}
3748
3749impl ::fidl_next::Encodable for WrappedCapabilityId {
3750    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
3751        ::fidl_next::CopyOptimization::enable_if(
3752            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
3753        )
3754    };
3755
3756    type Encoded = WireWrappedCapabilityId;
3757}
3758
3759unsafe impl<___E> ::fidl_next::Encode<___E> for WrappedCapabilityId
3760where
3761    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3762{
3763    #[inline]
3764    fn encode(
3765        &mut self,
3766        encoder: &mut ___E,
3767        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3768    ) -> Result<(), ::fidl_next::EncodeError> {
3769        ::fidl_next::munge! {
3770            let Self::Encoded {
3771                id,
3772
3773            } = out;
3774        }
3775
3776        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3777
3778        Ok(())
3779    }
3780}
3781
3782impl ::fidl_next::EncodableOption for Box<WrappedCapabilityId> {
3783    type EncodedOption = ::fidl_next::WireBox<WireWrappedCapabilityId>;
3784}
3785
3786unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<WrappedCapabilityId>
3787where
3788    ___E: ::fidl_next::Encoder + ?Sized,
3789    WrappedCapabilityId: ::fidl_next::Encode<___E>,
3790{
3791    #[inline]
3792    fn encode_option(
3793        this: Option<&mut Self>,
3794        encoder: &mut ___E,
3795        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3796    ) -> Result<(), ::fidl_next::EncodeError> {
3797        if let Some(inner) = this {
3798            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3799            ::fidl_next::WireBox::encode_present(out);
3800        } else {
3801            ::fidl_next::WireBox::encode_absent(out);
3802        }
3803
3804        Ok(())
3805    }
3806}
3807
3808impl ::fidl_next::TakeFrom<WireWrappedCapabilityId> for WrappedCapabilityId {
3809    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
3810        ::fidl_next::CopyOptimization::enable_if(
3811            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
3812        )
3813    };
3814
3815    #[inline]
3816    fn take_from(from: &WireWrappedCapabilityId) -> Self {
3817        Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
3818    }
3819}
3820
3821/// The wire type corresponding to [`WrappedCapabilityId`].
3822#[derive(Clone, Debug)]
3823#[repr(C)]
3824pub struct WireWrappedCapabilityId {
3825    pub id: ::fidl_next::WireU64,
3826}
3827
3828unsafe impl ::fidl_next::ZeroPadding for WireWrappedCapabilityId {
3829    #[inline]
3830    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3831}
3832
3833unsafe impl<___D> ::fidl_next::Decode<___D> for WireWrappedCapabilityId
3834where
3835    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3836{
3837    fn decode(
3838        slot: ::fidl_next::Slot<'_, Self>,
3839        decoder: &mut ___D,
3840    ) -> Result<(), ::fidl_next::DecodeError> {
3841        ::fidl_next::munge! {
3842            let Self {
3843                mut id,
3844
3845            } = slot;
3846        }
3847
3848        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3849
3850        Ok(())
3851    }
3852}
3853
3854pub type WrappedNewCapabilityId = crate::WrappedCapabilityId;
3855
3856/// The wire type corresponding to [`WrappedNewCapabilityId`].
3857pub type WireWrappedNewCapabilityId = crate::WireWrappedCapabilityId;
3858
3859#[derive(Clone, Debug)]
3860pub struct CapabilityStoreDictionaryRemoveRequest {
3861    pub id: u64,
3862
3863    pub key: String,
3864
3865    pub dest_id: Option<Box<crate::WrappedCapabilityId>>,
3866}
3867
3868impl ::fidl_next::Encodable for CapabilityStoreDictionaryRemoveRequest {
3869    type Encoded = WireCapabilityStoreDictionaryRemoveRequest;
3870}
3871
3872unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryRemoveRequest
3873where
3874    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3875
3876    ___E: ::fidl_next::Encoder,
3877{
3878    #[inline]
3879    fn encode(
3880        &mut self,
3881        encoder: &mut ___E,
3882        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3883    ) -> Result<(), ::fidl_next::EncodeError> {
3884        ::fidl_next::munge! {
3885            let Self::Encoded {
3886                id,
3887                key,
3888                dest_id,
3889
3890            } = out;
3891        }
3892
3893        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
3894
3895        ::fidl_next::Encode::encode(&mut self.key, encoder, key)?;
3896
3897        ::fidl_next::Encode::encode(&mut self.dest_id, encoder, dest_id)?;
3898
3899        Ok(())
3900    }
3901}
3902
3903impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryRemoveRequest> {
3904    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryRemoveRequest>;
3905}
3906
3907unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryRemoveRequest>
3908where
3909    ___E: ::fidl_next::Encoder + ?Sized,
3910    CapabilityStoreDictionaryRemoveRequest: ::fidl_next::Encode<___E>,
3911{
3912    #[inline]
3913    fn encode_option(
3914        this: Option<&mut Self>,
3915        encoder: &mut ___E,
3916        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3917    ) -> Result<(), ::fidl_next::EncodeError> {
3918        if let Some(inner) = this {
3919            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3920            ::fidl_next::WireBox::encode_present(out);
3921        } else {
3922            ::fidl_next::WireBox::encode_absent(out);
3923        }
3924
3925        Ok(())
3926    }
3927}
3928
3929impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryRemoveRequest>
3930    for CapabilityStoreDictionaryRemoveRequest
3931{
3932    #[inline]
3933    fn take_from(from: &WireCapabilityStoreDictionaryRemoveRequest) -> Self {
3934        Self {
3935            id: ::fidl_next::TakeFrom::take_from(&from.id),
3936
3937            key: ::fidl_next::TakeFrom::take_from(&from.key),
3938
3939            dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
3940        }
3941    }
3942}
3943
3944/// The wire type corresponding to [`CapabilityStoreDictionaryRemoveRequest`].
3945#[derive(Debug)]
3946#[repr(C)]
3947pub struct WireCapabilityStoreDictionaryRemoveRequest {
3948    pub id: ::fidl_next::WireU64,
3949
3950    pub key: ::fidl_next::WireString,
3951
3952    pub dest_id: ::fidl_next::WireBox<crate::WireWrappedCapabilityId>,
3953}
3954
3955unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryRemoveRequest {
3956    #[inline]
3957    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3958}
3959
3960unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryRemoveRequest
3961where
3962    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3963
3964    ___D: ::fidl_next::Decoder,
3965{
3966    fn decode(
3967        slot: ::fidl_next::Slot<'_, Self>,
3968        decoder: &mut ___D,
3969    ) -> Result<(), ::fidl_next::DecodeError> {
3970        ::fidl_next::munge! {
3971            let Self {
3972                mut id,
3973                mut key,
3974                mut dest_id,
3975
3976            } = slot;
3977        }
3978
3979        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3980
3981        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
3982
3983        let key = unsafe { key.deref_unchecked() };
3984
3985        if key.len() > 255 {
3986            return Err(::fidl_next::DecodeError::VectorTooLong {
3987                size: key.len() as u64,
3988                limit: 255,
3989            });
3990        }
3991
3992        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
3993
3994        Ok(())
3995    }
3996}
3997
3998pub type CapabilityStoreDictionaryRemoveResponse = ();
3999
4000/// The wire type corresponding to [`CapabilityStoreDictionaryRemoveResponse`].
4001pub type WireCapabilityStoreDictionaryRemoveResponse = ();
4002
4003#[derive(Clone, Debug)]
4004#[repr(C)]
4005pub struct CapabilityStoreDictionaryCopyRequest {
4006    pub id: u64,
4007
4008    pub dest_id: u64,
4009}
4010
4011impl ::fidl_next::Encodable for CapabilityStoreDictionaryCopyRequest {
4012    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
4013        ::fidl_next::CopyOptimization::enable_if(
4014            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
4015                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
4016        )
4017    };
4018
4019    type Encoded = WireCapabilityStoreDictionaryCopyRequest;
4020}
4021
4022unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryCopyRequest
4023where
4024    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4025{
4026    #[inline]
4027    fn encode(
4028        &mut self,
4029        encoder: &mut ___E,
4030        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4031    ) -> Result<(), ::fidl_next::EncodeError> {
4032        ::fidl_next::munge! {
4033            let Self::Encoded {
4034                id,
4035                dest_id,
4036
4037            } = out;
4038        }
4039
4040        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
4041
4042        ::fidl_next::Encode::encode(&mut self.dest_id, encoder, dest_id)?;
4043
4044        Ok(())
4045    }
4046}
4047
4048impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryCopyRequest> {
4049    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryCopyRequest>;
4050}
4051
4052unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryCopyRequest>
4053where
4054    ___E: ::fidl_next::Encoder + ?Sized,
4055    CapabilityStoreDictionaryCopyRequest: ::fidl_next::Encode<___E>,
4056{
4057    #[inline]
4058    fn encode_option(
4059        this: Option<&mut Self>,
4060        encoder: &mut ___E,
4061        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4062    ) -> Result<(), ::fidl_next::EncodeError> {
4063        if let Some(inner) = this {
4064            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4065            ::fidl_next::WireBox::encode_present(out);
4066        } else {
4067            ::fidl_next::WireBox::encode_absent(out);
4068        }
4069
4070        Ok(())
4071    }
4072}
4073
4074impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryCopyRequest>
4075    for CapabilityStoreDictionaryCopyRequest
4076{
4077    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
4078        ::fidl_next::CopyOptimization::enable_if(
4079            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
4080                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
4081        )
4082    };
4083
4084    #[inline]
4085    fn take_from(from: &WireCapabilityStoreDictionaryCopyRequest) -> Self {
4086        Self {
4087            id: ::fidl_next::TakeFrom::take_from(&from.id),
4088
4089            dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
4090        }
4091    }
4092}
4093
4094/// The wire type corresponding to [`CapabilityStoreDictionaryCopyRequest`].
4095#[derive(Clone, Debug)]
4096#[repr(C)]
4097pub struct WireCapabilityStoreDictionaryCopyRequest {
4098    pub id: ::fidl_next::WireU64,
4099
4100    pub dest_id: ::fidl_next::WireU64,
4101}
4102
4103unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryCopyRequest {
4104    #[inline]
4105    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4106}
4107
4108unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryCopyRequest
4109where
4110    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4111{
4112    fn decode(
4113        slot: ::fidl_next::Slot<'_, Self>,
4114        decoder: &mut ___D,
4115    ) -> Result<(), ::fidl_next::DecodeError> {
4116        ::fidl_next::munge! {
4117            let Self {
4118                mut id,
4119                mut dest_id,
4120
4121            } = slot;
4122        }
4123
4124        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4125
4126        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
4127
4128        Ok(())
4129    }
4130}
4131
4132pub type CapabilityStoreDictionaryCopyResponse = ();
4133
4134/// The wire type corresponding to [`CapabilityStoreDictionaryCopyResponse`].
4135pub type WireCapabilityStoreDictionaryCopyResponse = ();
4136
4137#[derive(Debug)]
4138pub struct CapabilityStoreDictionaryKeysRequest {
4139    pub id: u64,
4140
4141    pub iterator:
4142        ::fidl_next::ServerEnd<::fidl_next::fuchsia::zx::Channel, crate::DictionaryKeysIterator>,
4143}
4144
4145impl ::fidl_next::Encodable for CapabilityStoreDictionaryKeysRequest {
4146    type Encoded = WireCapabilityStoreDictionaryKeysRequest;
4147}
4148
4149unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryKeysRequest
4150where
4151    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4152
4153    ___E: ::fidl_next::fuchsia::HandleEncoder,
4154{
4155    #[inline]
4156    fn encode(
4157        &mut self,
4158        encoder: &mut ___E,
4159        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4160    ) -> Result<(), ::fidl_next::EncodeError> {
4161        ::fidl_next::munge! {
4162            let Self::Encoded {
4163                id,
4164                iterator,
4165
4166            } = out;
4167        }
4168
4169        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
4170
4171        ::fidl_next::Encode::encode(&mut self.iterator, encoder, iterator)?;
4172
4173        Ok(())
4174    }
4175}
4176
4177impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryKeysRequest> {
4178    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryKeysRequest>;
4179}
4180
4181unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryKeysRequest>
4182where
4183    ___E: ::fidl_next::Encoder + ?Sized,
4184    CapabilityStoreDictionaryKeysRequest: ::fidl_next::Encode<___E>,
4185{
4186    #[inline]
4187    fn encode_option(
4188        this: Option<&mut Self>,
4189        encoder: &mut ___E,
4190        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4191    ) -> Result<(), ::fidl_next::EncodeError> {
4192        if let Some(inner) = this {
4193            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4194            ::fidl_next::WireBox::encode_present(out);
4195        } else {
4196            ::fidl_next::WireBox::encode_absent(out);
4197        }
4198
4199        Ok(())
4200    }
4201}
4202
4203impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryKeysRequest>
4204    for CapabilityStoreDictionaryKeysRequest
4205{
4206    #[inline]
4207    fn take_from(from: &WireCapabilityStoreDictionaryKeysRequest) -> Self {
4208        Self {
4209            id: ::fidl_next::TakeFrom::take_from(&from.id),
4210
4211            iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
4212        }
4213    }
4214}
4215
4216/// The wire type corresponding to [`CapabilityStoreDictionaryKeysRequest`].
4217#[derive(Debug)]
4218#[repr(C)]
4219pub struct WireCapabilityStoreDictionaryKeysRequest {
4220    pub id: ::fidl_next::WireU64,
4221
4222    pub iterator:
4223        ::fidl_next::ServerEnd<::fidl_next::fuchsia::WireChannel, crate::DictionaryKeysIterator>,
4224}
4225
4226unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryKeysRequest {
4227    #[inline]
4228    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4229        unsafe {
4230            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4231        }
4232    }
4233}
4234
4235unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryKeysRequest
4236where
4237    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4238
4239    ___D: ::fidl_next::fuchsia::HandleDecoder,
4240{
4241    fn decode(
4242        slot: ::fidl_next::Slot<'_, Self>,
4243        decoder: &mut ___D,
4244    ) -> Result<(), ::fidl_next::DecodeError> {
4245        ::fidl_next::munge! {
4246            let Self {
4247                mut id,
4248                mut iterator,
4249
4250            } = slot;
4251        }
4252
4253        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4254
4255        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4256
4257        Ok(())
4258    }
4259}
4260
4261pub type CapabilityStoreDictionaryKeysResponse = ();
4262
4263/// The wire type corresponding to [`CapabilityStoreDictionaryKeysResponse`].
4264pub type WireCapabilityStoreDictionaryKeysResponse = ();
4265
4266#[derive(Debug)]
4267pub struct CapabilityStoreDictionaryEnumerateRequest {
4268    pub id: u64,
4269
4270    pub iterator: ::fidl_next::ServerEnd<
4271        ::fidl_next::fuchsia::zx::Channel,
4272        crate::DictionaryEnumerateIterator,
4273    >,
4274}
4275
4276impl ::fidl_next::Encodable for CapabilityStoreDictionaryEnumerateRequest {
4277    type Encoded = WireCapabilityStoreDictionaryEnumerateRequest;
4278}
4279
4280unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryEnumerateRequest
4281where
4282    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4283
4284    ___E: ::fidl_next::fuchsia::HandleEncoder,
4285{
4286    #[inline]
4287    fn encode(
4288        &mut self,
4289        encoder: &mut ___E,
4290        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4291    ) -> Result<(), ::fidl_next::EncodeError> {
4292        ::fidl_next::munge! {
4293            let Self::Encoded {
4294                id,
4295                iterator,
4296
4297            } = out;
4298        }
4299
4300        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
4301
4302        ::fidl_next::Encode::encode(&mut self.iterator, encoder, iterator)?;
4303
4304        Ok(())
4305    }
4306}
4307
4308impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryEnumerateRequest> {
4309    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryEnumerateRequest>;
4310}
4311
4312unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryEnumerateRequest>
4313where
4314    ___E: ::fidl_next::Encoder + ?Sized,
4315    CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Encode<___E>,
4316{
4317    #[inline]
4318    fn encode_option(
4319        this: Option<&mut Self>,
4320        encoder: &mut ___E,
4321        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4322    ) -> Result<(), ::fidl_next::EncodeError> {
4323        if let Some(inner) = this {
4324            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4325            ::fidl_next::WireBox::encode_present(out);
4326        } else {
4327            ::fidl_next::WireBox::encode_absent(out);
4328        }
4329
4330        Ok(())
4331    }
4332}
4333
4334impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryEnumerateRequest>
4335    for CapabilityStoreDictionaryEnumerateRequest
4336{
4337    #[inline]
4338    fn take_from(from: &WireCapabilityStoreDictionaryEnumerateRequest) -> Self {
4339        Self {
4340            id: ::fidl_next::TakeFrom::take_from(&from.id),
4341
4342            iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
4343        }
4344    }
4345}
4346
4347/// The wire type corresponding to [`CapabilityStoreDictionaryEnumerateRequest`].
4348#[derive(Debug)]
4349#[repr(C)]
4350pub struct WireCapabilityStoreDictionaryEnumerateRequest {
4351    pub id: ::fidl_next::WireU64,
4352
4353    pub iterator: ::fidl_next::ServerEnd<
4354        ::fidl_next::fuchsia::WireChannel,
4355        crate::DictionaryEnumerateIterator,
4356    >,
4357}
4358
4359unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryEnumerateRequest {
4360    #[inline]
4361    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4362        unsafe {
4363            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4364        }
4365    }
4366}
4367
4368unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryEnumerateRequest
4369where
4370    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4371
4372    ___D: ::fidl_next::fuchsia::HandleDecoder,
4373{
4374    fn decode(
4375        slot: ::fidl_next::Slot<'_, Self>,
4376        decoder: &mut ___D,
4377    ) -> Result<(), ::fidl_next::DecodeError> {
4378        ::fidl_next::munge! {
4379            let Self {
4380                mut id,
4381                mut iterator,
4382
4383            } = slot;
4384        }
4385
4386        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4387
4388        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4389
4390        Ok(())
4391    }
4392}
4393
4394pub type CapabilityStoreDictionaryEnumerateResponse = ();
4395
4396/// The wire type corresponding to [`CapabilityStoreDictionaryEnumerateResponse`].
4397pub type WireCapabilityStoreDictionaryEnumerateResponse = ();
4398
4399#[derive(Debug)]
4400pub struct CapabilityStoreDictionaryDrainRequest {
4401    pub id: u64,
4402
4403    pub iterator: ::fidl_next::ServerEnd<
4404        Option<::fidl_next::fuchsia::zx::Channel>,
4405        crate::DictionaryDrainIterator,
4406    >,
4407}
4408
4409impl ::fidl_next::Encodable for CapabilityStoreDictionaryDrainRequest {
4410    type Encoded = WireCapabilityStoreDictionaryDrainRequest;
4411}
4412
4413unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryDrainRequest
4414where
4415    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4416
4417    ___E: ::fidl_next::fuchsia::HandleEncoder,
4418{
4419    #[inline]
4420    fn encode(
4421        &mut self,
4422        encoder: &mut ___E,
4423        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4424    ) -> Result<(), ::fidl_next::EncodeError> {
4425        ::fidl_next::munge! {
4426            let Self::Encoded {
4427                id,
4428                iterator,
4429
4430            } = out;
4431        }
4432
4433        ::fidl_next::Encode::encode(&mut self.id, encoder, id)?;
4434
4435        ::fidl_next::Encode::encode(&mut self.iterator, encoder, iterator)?;
4436
4437        Ok(())
4438    }
4439}
4440
4441impl ::fidl_next::EncodableOption for Box<CapabilityStoreDictionaryDrainRequest> {
4442    type EncodedOption = ::fidl_next::WireBox<WireCapabilityStoreDictionaryDrainRequest>;
4443}
4444
4445unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<CapabilityStoreDictionaryDrainRequest>
4446where
4447    ___E: ::fidl_next::Encoder + ?Sized,
4448    CapabilityStoreDictionaryDrainRequest: ::fidl_next::Encode<___E>,
4449{
4450    #[inline]
4451    fn encode_option(
4452        this: Option<&mut Self>,
4453        encoder: &mut ___E,
4454        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4455    ) -> Result<(), ::fidl_next::EncodeError> {
4456        if let Some(inner) = this {
4457            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4458            ::fidl_next::WireBox::encode_present(out);
4459        } else {
4460            ::fidl_next::WireBox::encode_absent(out);
4461        }
4462
4463        Ok(())
4464    }
4465}
4466
4467impl ::fidl_next::TakeFrom<WireCapabilityStoreDictionaryDrainRequest>
4468    for CapabilityStoreDictionaryDrainRequest
4469{
4470    #[inline]
4471    fn take_from(from: &WireCapabilityStoreDictionaryDrainRequest) -> Self {
4472        Self {
4473            id: ::fidl_next::TakeFrom::take_from(&from.id),
4474
4475            iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
4476        }
4477    }
4478}
4479
4480/// The wire type corresponding to [`CapabilityStoreDictionaryDrainRequest`].
4481#[derive(Debug)]
4482#[repr(C)]
4483pub struct WireCapabilityStoreDictionaryDrainRequest {
4484    pub id: ::fidl_next::WireU64,
4485
4486    pub iterator: ::fidl_next::ServerEnd<
4487        ::fidl_next::fuchsia::WireOptionalChannel,
4488        crate::DictionaryDrainIterator,
4489    >,
4490}
4491
4492unsafe impl ::fidl_next::ZeroPadding for WireCapabilityStoreDictionaryDrainRequest {
4493    #[inline]
4494    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4495        unsafe {
4496            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4497        }
4498    }
4499}
4500
4501unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryDrainRequest
4502where
4503    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4504
4505    ___D: ::fidl_next::fuchsia::HandleDecoder,
4506{
4507    fn decode(
4508        slot: ::fidl_next::Slot<'_, Self>,
4509        decoder: &mut ___D,
4510    ) -> Result<(), ::fidl_next::DecodeError> {
4511        ::fidl_next::munge! {
4512            let Self {
4513                mut id,
4514                mut iterator,
4515
4516            } = slot;
4517        }
4518
4519        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4520
4521        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4522
4523        Ok(())
4524    }
4525}
4526
4527pub type CapabilityStoreDictionaryDrainResponse = ();
4528
4529/// The wire type corresponding to [`CapabilityStoreDictionaryDrainResponse`].
4530pub type WireCapabilityStoreDictionaryDrainResponse = ();
4531
4532/// The type corresponding to the CapabilityStore protocol.
4533#[doc = " Protocol that represents the concept of a \"capability store\", a repository\n for [Capability]s that are held by the component framework runtime.\n\n [CapabilityStore] serves as the main bridge between the component runtime and clients\n that enables them to operate on and exchange [Capability]s. A [CapabilityStore] instance\n contains a set of [Capability]s, each of which has a [CapabilityId] assigned by the client.\n\n Normally, a program would not exchange a [CapabilityStore] or [CapabilityId] with other\n programs -- a [CapabilityStore] connection and its enclosed capabilities are intended to\n be \"local\" to a program. Instead, if a program wishes to exchange a [Capability] with other\n programs, it should [Export] the [Capability] out of the store, send the [Capability] to the\n target program, which can then [Import] the capability into its own store.\n\n [CapabilityStore] is also used to manage capability lifetimes. The lifetime of a capability is\n scoped to the [CapabilityStore] in which it resides; i.e. to drop the [CapabilityStore]\n connections to release the capabilities instead it. In addition, [CapabilityStore] supports a\n [Drop] API to drop an individual [Capability] reference. (Note that it is possible for a\n some capabilities, like [DictionaryRef], to have multiple references, in which case all of\n the references must be dropped for the underlying resource to be released.)\n\n A note about semantics: the [CapabilityStore] APIs do not return [CapabilityId]s, because\n [CapabilityId]s are assigned by the client. Instead, when a method would semantically return\n a capability, this is expressed by taking the destination [CapabilityId] as an output parameter.\n"]
4534#[derive(Debug)]
4535pub struct CapabilityStore;
4536
4537impl ::fidl_next::Discoverable for CapabilityStore {
4538    const PROTOCOL_NAME: &'static str = "capability_store";
4539}
4540
4541pub mod capability_store {
4542    pub mod prelude {
4543        pub use crate::{
4544            capability_store, CapabilityStore, CapabilityStoreClientHandler,
4545            CapabilityStoreClientSender, CapabilityStoreServerHandler, CapabilityStoreServerSender,
4546        };
4547
4548        pub use crate::CapabilityStoreConnectorCreateRequest;
4549
4550        pub use crate::CapabilityStoreConnectorOpenRequest;
4551
4552        pub use crate::CapabilityStoreDictionaryCopyRequest;
4553
4554        pub use crate::CapabilityStoreDictionaryCreateRequest;
4555
4556        pub use crate::CapabilityStoreDictionaryDrainRequest;
4557
4558        pub use crate::CapabilityStoreDictionaryEnumerateRequest;
4559
4560        pub use crate::CapabilityStoreDictionaryGetRequest;
4561
4562        pub use crate::CapabilityStoreDictionaryInsertRequest;
4563
4564        pub use crate::CapabilityStoreDictionaryKeysRequest;
4565
4566        pub use crate::CapabilityStoreDictionaryLegacyExportRequest;
4567
4568        pub use crate::CapabilityStoreDictionaryLegacyImportRequest;
4569
4570        pub use crate::CapabilityStoreDictionaryRemoveRequest;
4571
4572        pub use crate::CapabilityStoreDirConnectorCreateRequest;
4573
4574        pub use crate::CapabilityStoreDirConnectorOpenRequest;
4575
4576        pub use crate::CapabilityStoreDropRequest;
4577
4578        pub use crate::CapabilityStoreDuplicateRequest;
4579
4580        pub use crate::CapabilityStoreError;
4581
4582        pub use crate::CapabilityStoreExportRequest;
4583
4584        pub use crate::CapabilityStoreImportRequest;
4585
4586        pub use crate::CapabilityStoreConnectorCreateResponse;
4587
4588        pub use crate::CapabilityStoreConnectorOpenResponse;
4589
4590        pub use crate::CapabilityStoreDictionaryCopyResponse;
4591
4592        pub use crate::CapabilityStoreDictionaryCreateResponse;
4593
4594        pub use crate::CapabilityStoreDictionaryDrainResponse;
4595
4596        pub use crate::CapabilityStoreDictionaryEnumerateResponse;
4597
4598        pub use crate::CapabilityStoreDictionaryGetResponse;
4599
4600        pub use crate::CapabilityStoreDictionaryInsertResponse;
4601
4602        pub use crate::CapabilityStoreDictionaryKeysResponse;
4603
4604        pub use crate::CapabilityStoreDictionaryLegacyExportResponse;
4605
4606        pub use crate::CapabilityStoreDictionaryLegacyImportResponse;
4607
4608        pub use crate::CapabilityStoreDictionaryRemoveResponse;
4609
4610        pub use crate::CapabilityStoreDirConnectorCreateResponse;
4611
4612        pub use crate::CapabilityStoreDirConnectorOpenResponse;
4613
4614        pub use crate::CapabilityStoreDropResponse;
4615
4616        pub use crate::CapabilityStoreDuplicateResponse;
4617
4618        pub use crate::CapabilityStoreExportResponse;
4619
4620        pub use crate::CapabilityStoreImportResponse;
4621    }
4622
4623    pub struct Duplicate;
4624
4625    impl ::fidl_next::Method for Duplicate {
4626        const ORDINAL: u64 = 6727592627741008260;
4627
4628        type Protocol = crate::CapabilityStore;
4629
4630        type Request = crate::WireCapabilityStoreDuplicateRequest;
4631
4632        type Response = ::fidl_next::WireFlexibleResult<
4633            crate::WireCapabilityStoreDuplicateResponse,
4634            crate::WireCapabilityStoreError,
4635        >;
4636    }
4637
4638    pub struct Drop;
4639
4640    impl ::fidl_next::Method for Drop {
4641        const ORDINAL: u64 = 753328233834620249;
4642
4643        type Protocol = crate::CapabilityStore;
4644
4645        type Request = crate::WireCapabilityStoreDropRequest;
4646
4647        type Response = ::fidl_next::WireFlexibleResult<
4648            crate::WireCapabilityStoreDropResponse,
4649            crate::WireCapabilityStoreError,
4650        >;
4651    }
4652
4653    pub struct Export;
4654
4655    impl ::fidl_next::Method for Export {
4656        const ORDINAL: u64 = 226159162093533951;
4657
4658        type Protocol = crate::CapabilityStore;
4659
4660        type Request = crate::WireCapabilityStoreExportRequest;
4661
4662        type Response = ::fidl_next::WireFlexibleResult<
4663            crate::WireCapabilityStoreExportResponse,
4664            crate::WireCapabilityStoreError,
4665        >;
4666    }
4667
4668    pub struct Import;
4669
4670    impl ::fidl_next::Method for Import {
4671        const ORDINAL: u64 = 2276030276116435867;
4672
4673        type Protocol = crate::CapabilityStore;
4674
4675        type Request = crate::WireCapabilityStoreImportRequest;
4676
4677        type Response = ::fidl_next::WireFlexibleResult<
4678            crate::WireCapabilityStoreImportResponse,
4679            crate::WireCapabilityStoreError,
4680        >;
4681    }
4682
4683    pub struct ConnectorCreate;
4684
4685    impl ::fidl_next::Method for ConnectorCreate {
4686        const ORDINAL: u64 = 2979461408102095909;
4687
4688        type Protocol = crate::CapabilityStore;
4689
4690        type Request = crate::WireCapabilityStoreConnectorCreateRequest;
4691
4692        type Response = ::fidl_next::WireFlexibleResult<
4693            crate::WireCapabilityStoreConnectorCreateResponse,
4694            crate::WireCapabilityStoreError,
4695        >;
4696    }
4697
4698    pub struct ConnectorOpen;
4699
4700    impl ::fidl_next::Method for ConnectorOpen {
4701        const ORDINAL: u64 = 6016362336453278623;
4702
4703        type Protocol = crate::CapabilityStore;
4704
4705        type Request = crate::WireCapabilityStoreConnectorOpenRequest;
4706
4707        type Response = ::fidl_next::WireFlexibleResult<
4708            crate::WireCapabilityStoreConnectorOpenResponse,
4709            crate::WireCapabilityStoreError,
4710        >;
4711    }
4712
4713    pub struct DirConnectorCreate;
4714
4715    impl ::fidl_next::Method for DirConnectorCreate {
4716        const ORDINAL: u64 = 1756747594275428795;
4717
4718        type Protocol = crate::CapabilityStore;
4719
4720        type Request = crate::WireCapabilityStoreDirConnectorCreateRequest;
4721
4722        type Response = ::fidl_next::WireFlexibleResult<
4723            crate::WireCapabilityStoreDirConnectorCreateResponse,
4724            crate::WireCapabilityStoreError,
4725        >;
4726    }
4727
4728    pub struct DirConnectorOpen;
4729
4730    impl ::fidl_next::Method for DirConnectorOpen {
4731        const ORDINAL: u64 = 6219704004220369153;
4732
4733        type Protocol = crate::CapabilityStore;
4734
4735        type Request = crate::WireCapabilityStoreDirConnectorOpenRequest;
4736
4737        type Response = ::fidl_next::WireFlexibleResult<
4738            crate::WireCapabilityStoreDirConnectorOpenResponse,
4739            crate::WireCapabilityStoreError,
4740        >;
4741    }
4742
4743    pub struct DictionaryCreate;
4744
4745    impl ::fidl_next::Method for DictionaryCreate {
4746        const ORDINAL: u64 = 7608770958894948499;
4747
4748        type Protocol = crate::CapabilityStore;
4749
4750        type Request = crate::WireCapabilityStoreDictionaryCreateRequest;
4751
4752        type Response = ::fidl_next::WireFlexibleResult<
4753            crate::WireCapabilityStoreDictionaryCreateResponse,
4754            crate::WireCapabilityStoreError,
4755        >;
4756    }
4757
4758    pub struct DictionaryLegacyImport;
4759
4760    impl ::fidl_next::Method for DictionaryLegacyImport {
4761        const ORDINAL: u64 = 8285893703432012383;
4762
4763        type Protocol = crate::CapabilityStore;
4764
4765        type Request = crate::WireCapabilityStoreDictionaryLegacyImportRequest;
4766
4767        type Response = ::fidl_next::WireFlexibleResult<
4768            crate::WireCapabilityStoreDictionaryLegacyImportResponse,
4769            crate::WireCapabilityStoreError,
4770        >;
4771    }
4772
4773    pub struct DictionaryLegacyExport;
4774
4775    impl ::fidl_next::Method for DictionaryLegacyExport {
4776        const ORDINAL: u64 = 4647175832683306445;
4777
4778        type Protocol = crate::CapabilityStore;
4779
4780        type Request = crate::WireCapabilityStoreDictionaryLegacyExportRequest;
4781
4782        type Response = ::fidl_next::WireFlexibleResult<
4783            crate::WireCapabilityStoreDictionaryLegacyExportResponse,
4784            crate::WireCapabilityStoreError,
4785        >;
4786    }
4787
4788    pub struct DictionaryInsert;
4789
4790    impl ::fidl_next::Method for DictionaryInsert {
4791        const ORDINAL: u64 = 8575443262986538023;
4792
4793        type Protocol = crate::CapabilityStore;
4794
4795        type Request = crate::WireCapabilityStoreDictionaryInsertRequest;
4796
4797        type Response = ::fidl_next::WireFlexibleResult<
4798            crate::WireCapabilityStoreDictionaryInsertResponse,
4799            crate::WireCapabilityStoreError,
4800        >;
4801    }
4802
4803    pub struct DictionaryGet;
4804
4805    impl ::fidl_next::Method for DictionaryGet {
4806        const ORDINAL: u64 = 5592951026866236882;
4807
4808        type Protocol = crate::CapabilityStore;
4809
4810        type Request = crate::WireCapabilityStoreDictionaryGetRequest;
4811
4812        type Response = ::fidl_next::WireFlexibleResult<
4813            crate::WireCapabilityStoreDictionaryGetResponse,
4814            crate::WireCapabilityStoreError,
4815        >;
4816    }
4817
4818    pub struct DictionaryRemove;
4819
4820    impl ::fidl_next::Method for DictionaryRemove {
4821        const ORDINAL: u64 = 343892214579320051;
4822
4823        type Protocol = crate::CapabilityStore;
4824
4825        type Request = crate::WireCapabilityStoreDictionaryRemoveRequest;
4826
4827        type Response = ::fidl_next::WireFlexibleResult<
4828            crate::WireCapabilityStoreDictionaryRemoveResponse,
4829            crate::WireCapabilityStoreError,
4830        >;
4831    }
4832
4833    pub struct DictionaryCopy;
4834
4835    impl ::fidl_next::Method for DictionaryCopy {
4836        const ORDINAL: u64 = 3977783339739362383;
4837
4838        type Protocol = crate::CapabilityStore;
4839
4840        type Request = crate::WireCapabilityStoreDictionaryCopyRequest;
4841
4842        type Response = ::fidl_next::WireFlexibleResult<
4843            crate::WireCapabilityStoreDictionaryCopyResponse,
4844            crate::WireCapabilityStoreError,
4845        >;
4846    }
4847
4848    pub struct DictionaryKeys;
4849
4850    impl ::fidl_next::Method for DictionaryKeys {
4851        const ORDINAL: u64 = 597577248872787102;
4852
4853        type Protocol = crate::CapabilityStore;
4854
4855        type Request = crate::WireCapabilityStoreDictionaryKeysRequest;
4856
4857        type Response = ::fidl_next::WireFlexibleResult<
4858            crate::WireCapabilityStoreDictionaryKeysResponse,
4859            crate::WireCapabilityStoreError,
4860        >;
4861    }
4862
4863    pub struct DictionaryEnumerate;
4864
4865    impl ::fidl_next::Method for DictionaryEnumerate {
4866        const ORDINAL: u64 = 964467096271472193;
4867
4868        type Protocol = crate::CapabilityStore;
4869
4870        type Request = crate::WireCapabilityStoreDictionaryEnumerateRequest;
4871
4872        type Response = ::fidl_next::WireFlexibleResult<
4873            crate::WireCapabilityStoreDictionaryEnumerateResponse,
4874            crate::WireCapabilityStoreError,
4875        >;
4876    }
4877
4878    pub struct DictionaryDrain;
4879
4880    impl ::fidl_next::Method for DictionaryDrain {
4881        const ORDINAL: u64 = 2928364469569621208;
4882
4883        type Protocol = crate::CapabilityStore;
4884
4885        type Request = crate::WireCapabilityStoreDictionaryDrainRequest;
4886
4887        type Response = ::fidl_next::WireFlexibleResult<
4888            crate::WireCapabilityStoreDictionaryDrainResponse,
4889            crate::WireCapabilityStoreError,
4890        >;
4891    }
4892}
4893
4894/// A helper trait for the `CapabilityStore` client sender.
4895pub trait CapabilityStoreClientSender {
4896    type Transport: ::fidl_next::Transport;
4897
4898    #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
4899    fn duplicate<___R>(
4900        &self,
4901        request: &mut ___R,
4902    ) -> Result<
4903        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Duplicate>,
4904        ::fidl_next::EncodeError,
4905    >
4906    where
4907        ___R: ::fidl_next::Encode<
4908            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4909            Encoded = crate::WireCapabilityStoreDuplicateRequest,
4910        >;
4911
4912    #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
4913    fn drop<___R>(
4914        &self,
4915        request: &mut ___R,
4916    ) -> Result<
4917        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Drop>,
4918        ::fidl_next::EncodeError,
4919    >
4920    where
4921        ___R: ::fidl_next::Encode<
4922            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4923            Encoded = crate::WireCapabilityStoreDropRequest,
4924        >;
4925
4926    #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
4927    fn export<___R>(
4928        &self,
4929        request: &mut ___R,
4930    ) -> Result<
4931        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Export>,
4932        ::fidl_next::EncodeError,
4933    >
4934    where
4935        ___R: ::fidl_next::Encode<
4936            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4937            Encoded = crate::WireCapabilityStoreExportRequest,
4938        >;
4939
4940    #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
4941    fn import<___R>(
4942        &self,
4943        request: &mut ___R,
4944    ) -> Result<
4945        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Import>,
4946        ::fidl_next::EncodeError,
4947    >
4948    where
4949        ___R: ::fidl_next::Encode<
4950            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4951            Encoded = crate::WireCapabilityStoreImportRequest,
4952        >;
4953
4954    #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
4955    fn connector_create<___R>(
4956        &self,
4957        request: &mut ___R,
4958    ) -> Result<
4959        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::ConnectorCreate>,
4960        ::fidl_next::EncodeError,
4961    >
4962    where
4963        ___R: ::fidl_next::Encode<
4964            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4965            Encoded = crate::WireCapabilityStoreConnectorCreateRequest,
4966        >;
4967
4968    #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
4969    fn connector_open<___R>(
4970        &self,
4971        request: &mut ___R,
4972    ) -> Result<
4973        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::ConnectorOpen>,
4974        ::fidl_next::EncodeError,
4975    >
4976    where
4977        ___R: ::fidl_next::Encode<
4978            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4979            Encoded = crate::WireCapabilityStoreConnectorOpenRequest,
4980        >;
4981
4982    #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
4983    fn dir_connector_create<___R>(
4984        &self,
4985        request: &mut ___R,
4986    ) -> Result<
4987        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DirConnectorCreate>,
4988        ::fidl_next::EncodeError,
4989    >
4990    where
4991        ___R: ::fidl_next::Encode<
4992            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
4993            Encoded = crate::WireCapabilityStoreDirConnectorCreateRequest,
4994        >;
4995
4996    #[doc = " Open a connection from the provided [DirConnector] capability that will be dispatched to\n the [DirReceiver] on the other end.\n\n This method does not take `Open`/`Open3` parameters such as `flags` or `path`.\n Clients that wish to specify these can get an initial connection from this method\n and call `fuchsia.io/Directory.Open` on it. See the [DirReceiver] documentation for\n more information about the expectations of the server side.\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
4997    fn dir_connector_open<___R>(
4998        &self,
4999        request: &mut ___R,
5000    ) -> Result<
5001        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DirConnectorOpen>,
5002        ::fidl_next::EncodeError,
5003    >
5004    where
5005        ___R: ::fidl_next::Encode<
5006            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5007            Encoded = crate::WireCapabilityStoreDirConnectorOpenRequest,
5008        >;
5009
5010    #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5011    fn dictionary_create<___R>(
5012        &self,
5013        request: &mut ___R,
5014    ) -> Result<
5015        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryCreate>,
5016        ::fidl_next::EncodeError,
5017    >
5018    where
5019        ___R: ::fidl_next::Encode<
5020            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5021            Encoded = crate::WireCapabilityStoreDictionaryCreateRequest,
5022        >;
5023
5024    #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
5025    fn dictionary_legacy_import<___R>(
5026        &self,
5027        request: &mut ___R,
5028    ) -> Result<
5029        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryLegacyImport>,
5030        ::fidl_next::EncodeError,
5031    >
5032    where
5033        ___R: ::fidl_next::Encode<
5034            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5035            Encoded = crate::WireCapabilityStoreDictionaryLegacyImportRequest,
5036        >;
5037
5038    #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5039    fn dictionary_legacy_export<___R>(
5040        &self,
5041        request: &mut ___R,
5042    ) -> Result<
5043        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryLegacyExport>,
5044        ::fidl_next::EncodeError,
5045    >
5046    where
5047        ___R: ::fidl_next::Encode<
5048            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5049            Encoded = crate::WireCapabilityStoreDictionaryLegacyExportRequest,
5050        >;
5051
5052    #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
5053    fn dictionary_insert<___R>(
5054        &self,
5055        request: &mut ___R,
5056    ) -> Result<
5057        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryInsert>,
5058        ::fidl_next::EncodeError,
5059    >
5060    where
5061        ___R: ::fidl_next::Encode<
5062            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5063            Encoded = crate::WireCapabilityStoreDictionaryInsertRequest,
5064        >;
5065
5066    #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
5067    fn dictionary_get<___R>(
5068        &self,
5069        request: &mut ___R,
5070    ) -> Result<
5071        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryGet>,
5072        ::fidl_next::EncodeError,
5073    >
5074    where
5075        ___R: ::fidl_next::Encode<
5076            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5077            Encoded = crate::WireCapabilityStoreDictionaryGetRequest,
5078        >;
5079
5080    #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
5081    fn dictionary_remove<___R>(
5082        &self,
5083        request: &mut ___R,
5084    ) -> Result<
5085        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryRemove>,
5086        ::fidl_next::EncodeError,
5087    >
5088    where
5089        ___R: ::fidl_next::Encode<
5090            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5091            Encoded = crate::WireCapabilityStoreDictionaryRemoveRequest,
5092        >;
5093
5094    #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
5095    fn dictionary_copy<___R>(
5096        &self,
5097        request: &mut ___R,
5098    ) -> Result<
5099        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryCopy>,
5100        ::fidl_next::EncodeError,
5101    >
5102    where
5103        ___R: ::fidl_next::Encode<
5104            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5105            Encoded = crate::WireCapabilityStoreDictionaryCopyRequest,
5106        >;
5107
5108    #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5109    fn dictionary_keys<___R>(
5110        &self,
5111        request: &mut ___R,
5112    ) -> Result<
5113        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryKeys>,
5114        ::fidl_next::EncodeError,
5115    >
5116    where
5117        ___R: ::fidl_next::Encode<
5118            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5119            Encoded = crate::WireCapabilityStoreDictionaryKeysRequest,
5120        >;
5121
5122    #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5123    fn dictionary_enumerate<___R>(
5124        &self,
5125        request: &mut ___R,
5126    ) -> Result<
5127        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryEnumerate>,
5128        ::fidl_next::EncodeError,
5129    >
5130    where
5131        ___R: ::fidl_next::Encode<
5132            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5133            Encoded = crate::WireCapabilityStoreDictionaryEnumerateRequest,
5134        >;
5135
5136    #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5137    fn dictionary_drain<___R>(
5138        &self,
5139        request: &mut ___R,
5140    ) -> Result<
5141        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryDrain>,
5142        ::fidl_next::EncodeError,
5143    >
5144    where
5145        ___R: ::fidl_next::Encode<
5146            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5147            Encoded = crate::WireCapabilityStoreDictionaryDrainRequest,
5148        >;
5149}
5150
5151impl<___T> CapabilityStoreClientSender for ::fidl_next::ClientSender<___T, CapabilityStore>
5152where
5153    ___T: ::fidl_next::Transport,
5154{
5155    type Transport = ___T;
5156
5157    #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
5158    fn duplicate<___R>(
5159        &self,
5160        request: &mut ___R,
5161    ) -> Result<
5162        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Duplicate>,
5163        ::fidl_next::EncodeError,
5164    >
5165    where
5166        ___R: ::fidl_next::Encode<
5167            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5168            Encoded = crate::WireCapabilityStoreDuplicateRequest,
5169        >,
5170    {
5171        self.as_untyped()
5172            .send_two_way(6727592627741008260, request)
5173            .map(::fidl_next::ResponseFuture::from_untyped)
5174    }
5175
5176    #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5177    fn drop<___R>(
5178        &self,
5179        request: &mut ___R,
5180    ) -> Result<
5181        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Drop>,
5182        ::fidl_next::EncodeError,
5183    >
5184    where
5185        ___R: ::fidl_next::Encode<
5186            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5187            Encoded = crate::WireCapabilityStoreDropRequest,
5188        >,
5189    {
5190        self.as_untyped()
5191            .send_two_way(753328233834620249, request)
5192            .map(::fidl_next::ResponseFuture::from_untyped)
5193    }
5194
5195    #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5196    fn export<___R>(
5197        &self,
5198        request: &mut ___R,
5199    ) -> Result<
5200        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Export>,
5201        ::fidl_next::EncodeError,
5202    >
5203    where
5204        ___R: ::fidl_next::Encode<
5205            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5206            Encoded = crate::WireCapabilityStoreExportRequest,
5207        >,
5208    {
5209        self.as_untyped()
5210            .send_two_way(226159162093533951, request)
5211            .map(::fidl_next::ResponseFuture::from_untyped)
5212    }
5213
5214    #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
5215    fn import<___R>(
5216        &self,
5217        request: &mut ___R,
5218    ) -> Result<
5219        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::Import>,
5220        ::fidl_next::EncodeError,
5221    >
5222    where
5223        ___R: ::fidl_next::Encode<
5224            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5225            Encoded = crate::WireCapabilityStoreImportRequest,
5226        >,
5227    {
5228        self.as_untyped()
5229            .send_two_way(2276030276116435867, request)
5230            .map(::fidl_next::ResponseFuture::from_untyped)
5231    }
5232
5233    #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5234    fn connector_create<___R>(
5235        &self,
5236        request: &mut ___R,
5237    ) -> Result<
5238        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::ConnectorCreate>,
5239        ::fidl_next::EncodeError,
5240    >
5241    where
5242        ___R: ::fidl_next::Encode<
5243            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5244            Encoded = crate::WireCapabilityStoreConnectorCreateRequest,
5245        >,
5246    {
5247        self.as_untyped()
5248            .send_two_way(2979461408102095909, request)
5249            .map(::fidl_next::ResponseFuture::from_untyped)
5250    }
5251
5252    #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
5253    fn connector_open<___R>(
5254        &self,
5255        request: &mut ___R,
5256    ) -> Result<
5257        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::ConnectorOpen>,
5258        ::fidl_next::EncodeError,
5259    >
5260    where
5261        ___R: ::fidl_next::Encode<
5262            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5263            Encoded = crate::WireCapabilityStoreConnectorOpenRequest,
5264        >,
5265    {
5266        self.as_untyped()
5267            .send_two_way(6016362336453278623, request)
5268            .map(::fidl_next::ResponseFuture::from_untyped)
5269    }
5270
5271    #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5272    fn dir_connector_create<___R>(
5273        &self,
5274        request: &mut ___R,
5275    ) -> Result<
5276        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DirConnectorCreate>,
5277        ::fidl_next::EncodeError,
5278    >
5279    where
5280        ___R: ::fidl_next::Encode<
5281            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5282            Encoded = crate::WireCapabilityStoreDirConnectorCreateRequest,
5283        >,
5284    {
5285        self.as_untyped()
5286            .send_two_way(1756747594275428795, request)
5287            .map(::fidl_next::ResponseFuture::from_untyped)
5288    }
5289
5290    #[doc = " Open a connection from the provided [DirConnector] capability that will be dispatched to\n the [DirReceiver] on the other end.\n\n This method does not take `Open`/`Open3` parameters such as `flags` or `path`.\n Clients that wish to specify these can get an initial connection from this method\n and call `fuchsia.io/Directory.Open` on it. See the [DirReceiver] documentation for\n more information about the expectations of the server side.\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
5291    fn dir_connector_open<___R>(
5292        &self,
5293        request: &mut ___R,
5294    ) -> Result<
5295        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DirConnectorOpen>,
5296        ::fidl_next::EncodeError,
5297    >
5298    where
5299        ___R: ::fidl_next::Encode<
5300            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5301            Encoded = crate::WireCapabilityStoreDirConnectorOpenRequest,
5302        >,
5303    {
5304        self.as_untyped()
5305            .send_two_way(6219704004220369153, request)
5306            .map(::fidl_next::ResponseFuture::from_untyped)
5307    }
5308
5309    #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5310    fn dictionary_create<___R>(
5311        &self,
5312        request: &mut ___R,
5313    ) -> Result<
5314        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryCreate>,
5315        ::fidl_next::EncodeError,
5316    >
5317    where
5318        ___R: ::fidl_next::Encode<
5319            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5320            Encoded = crate::WireCapabilityStoreDictionaryCreateRequest,
5321        >,
5322    {
5323        self.as_untyped()
5324            .send_two_way(7608770958894948499, request)
5325            .map(::fidl_next::ResponseFuture::from_untyped)
5326    }
5327
5328    #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
5329    fn dictionary_legacy_import<___R>(
5330        &self,
5331        request: &mut ___R,
5332    ) -> Result<
5333        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryLegacyImport>,
5334        ::fidl_next::EncodeError,
5335    >
5336    where
5337        ___R: ::fidl_next::Encode<
5338            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5339            Encoded = crate::WireCapabilityStoreDictionaryLegacyImportRequest,
5340        >,
5341    {
5342        self.as_untyped()
5343            .send_two_way(8285893703432012383, request)
5344            .map(::fidl_next::ResponseFuture::from_untyped)
5345    }
5346
5347    #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5348    fn dictionary_legacy_export<___R>(
5349        &self,
5350        request: &mut ___R,
5351    ) -> Result<
5352        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryLegacyExport>,
5353        ::fidl_next::EncodeError,
5354    >
5355    where
5356        ___R: ::fidl_next::Encode<
5357            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5358            Encoded = crate::WireCapabilityStoreDictionaryLegacyExportRequest,
5359        >,
5360    {
5361        self.as_untyped()
5362            .send_two_way(4647175832683306445, request)
5363            .map(::fidl_next::ResponseFuture::from_untyped)
5364    }
5365
5366    #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
5367    fn dictionary_insert<___R>(
5368        &self,
5369        request: &mut ___R,
5370    ) -> Result<
5371        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryInsert>,
5372        ::fidl_next::EncodeError,
5373    >
5374    where
5375        ___R: ::fidl_next::Encode<
5376            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5377            Encoded = crate::WireCapabilityStoreDictionaryInsertRequest,
5378        >,
5379    {
5380        self.as_untyped()
5381            .send_two_way(8575443262986538023, request)
5382            .map(::fidl_next::ResponseFuture::from_untyped)
5383    }
5384
5385    #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
5386    fn dictionary_get<___R>(
5387        &self,
5388        request: &mut ___R,
5389    ) -> Result<
5390        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryGet>,
5391        ::fidl_next::EncodeError,
5392    >
5393    where
5394        ___R: ::fidl_next::Encode<
5395            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5396            Encoded = crate::WireCapabilityStoreDictionaryGetRequest,
5397        >,
5398    {
5399        self.as_untyped()
5400            .send_two_way(5592951026866236882, request)
5401            .map(::fidl_next::ResponseFuture::from_untyped)
5402    }
5403
5404    #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
5405    fn dictionary_remove<___R>(
5406        &self,
5407        request: &mut ___R,
5408    ) -> Result<
5409        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryRemove>,
5410        ::fidl_next::EncodeError,
5411    >
5412    where
5413        ___R: ::fidl_next::Encode<
5414            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5415            Encoded = crate::WireCapabilityStoreDictionaryRemoveRequest,
5416        >,
5417    {
5418        self.as_untyped()
5419            .send_two_way(343892214579320051, request)
5420            .map(::fidl_next::ResponseFuture::from_untyped)
5421    }
5422
5423    #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
5424    fn dictionary_copy<___R>(
5425        &self,
5426        request: &mut ___R,
5427    ) -> Result<
5428        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryCopy>,
5429        ::fidl_next::EncodeError,
5430    >
5431    where
5432        ___R: ::fidl_next::Encode<
5433            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5434            Encoded = crate::WireCapabilityStoreDictionaryCopyRequest,
5435        >,
5436    {
5437        self.as_untyped()
5438            .send_two_way(3977783339739362383, request)
5439            .map(::fidl_next::ResponseFuture::from_untyped)
5440    }
5441
5442    #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5443    fn dictionary_keys<___R>(
5444        &self,
5445        request: &mut ___R,
5446    ) -> Result<
5447        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryKeys>,
5448        ::fidl_next::EncodeError,
5449    >
5450    where
5451        ___R: ::fidl_next::Encode<
5452            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5453            Encoded = crate::WireCapabilityStoreDictionaryKeysRequest,
5454        >,
5455    {
5456        self.as_untyped()
5457            .send_two_way(597577248872787102, request)
5458            .map(::fidl_next::ResponseFuture::from_untyped)
5459    }
5460
5461    #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5462    fn dictionary_enumerate<___R>(
5463        &self,
5464        request: &mut ___R,
5465    ) -> Result<
5466        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryEnumerate>,
5467        ::fidl_next::EncodeError,
5468    >
5469    where
5470        ___R: ::fidl_next::Encode<
5471            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5472            Encoded = crate::WireCapabilityStoreDictionaryEnumerateRequest,
5473        >,
5474    {
5475        self.as_untyped()
5476            .send_two_way(964467096271472193, request)
5477            .map(::fidl_next::ResponseFuture::from_untyped)
5478    }
5479
5480    #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5481    fn dictionary_drain<___R>(
5482        &self,
5483        request: &mut ___R,
5484    ) -> Result<
5485        ::fidl_next::ResponseFuture<'_, Self::Transport, capability_store::DictionaryDrain>,
5486        ::fidl_next::EncodeError,
5487    >
5488    where
5489        ___R: ::fidl_next::Encode<
5490            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
5491            Encoded = crate::WireCapabilityStoreDictionaryDrainRequest,
5492        >,
5493    {
5494        self.as_untyped()
5495            .send_two_way(2928364469569621208, request)
5496            .map(::fidl_next::ResponseFuture::from_untyped)
5497    }
5498}
5499
5500/// A client handler for the CapabilityStore protocol.
5501///
5502/// See [`CapabilityStore`] for more details.
5503pub trait CapabilityStoreClientHandler<___T: ::fidl_next::Transport> {
5504    fn on_unknown_interaction(
5505        &mut self,
5506        sender: &::fidl_next::ClientSender<___T, CapabilityStore>,
5507        ordinal: u64,
5508    ) {
5509        sender.close();
5510    }
5511}
5512
5513impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for CapabilityStore
5514where
5515    ___T: ::fidl_next::Transport,
5516    ___H: CapabilityStoreClientHandler<___T>,
5517
5518    <capability_store::Duplicate as ::fidl_next::Method>::Response:
5519        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5520
5521    <capability_store::Drop as ::fidl_next::Method>::Response:
5522        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5523
5524    <capability_store::Export as ::fidl_next::Method>::Response:
5525        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5526
5527    <capability_store::Import as ::fidl_next::Method>::Response:
5528        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5529
5530    <capability_store::ConnectorCreate as ::fidl_next::Method>::Response:
5531        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5532
5533    <capability_store::ConnectorOpen as ::fidl_next::Method>::Response:
5534        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5535
5536    <capability_store::DirConnectorCreate as ::fidl_next::Method>::Response:
5537        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5538
5539    <capability_store::DirConnectorOpen as ::fidl_next::Method>::Response:
5540        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5541
5542    <capability_store::DictionaryCreate as ::fidl_next::Method>::Response:
5543        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5544
5545    <capability_store::DictionaryLegacyImport as ::fidl_next::Method>::Response:
5546        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5547
5548    <capability_store::DictionaryLegacyExport as ::fidl_next::Method>::Response:
5549        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5550
5551    <capability_store::DictionaryInsert as ::fidl_next::Method>::Response:
5552        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5553
5554    <capability_store::DictionaryGet as ::fidl_next::Method>::Response:
5555        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5556
5557    <capability_store::DictionaryRemove as ::fidl_next::Method>::Response:
5558        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5559
5560    <capability_store::DictionaryCopy as ::fidl_next::Method>::Response:
5561        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5562
5563    <capability_store::DictionaryKeys as ::fidl_next::Method>::Response:
5564        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5565
5566    <capability_store::DictionaryEnumerate as ::fidl_next::Method>::Response:
5567        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5568
5569    <capability_store::DictionaryDrain as ::fidl_next::Method>::Response:
5570        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5571{
5572    fn on_event(
5573        handler: &mut ___H,
5574        sender: &::fidl_next::ClientSender<___T, Self>,
5575        ordinal: u64,
5576        buffer: ___T::RecvBuffer,
5577    ) {
5578        match ordinal {
5579            ordinal => handler.on_unknown_interaction(sender, ordinal),
5580        }
5581    }
5582}
5583
5584/// A helper trait for the `CapabilityStore` server sender.
5585pub trait CapabilityStoreServerSender {
5586    type Transport: ::fidl_next::Transport;
5587}
5588
5589impl<___T> CapabilityStoreServerSender for ::fidl_next::ServerSender<___T, CapabilityStore>
5590where
5591    ___T: ::fidl_next::Transport,
5592{
5593    type Transport = ___T;
5594}
5595
5596/// A server handler for the CapabilityStore protocol.
5597///
5598/// See [`CapabilityStore`] for more details.
5599pub trait CapabilityStoreServerHandler<___T: ::fidl_next::Transport> {
5600    #[doc = " Duplicates the capability with `id` to `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `NOT_DUPLICATABLE` if `id` could not be duplicated.\n"]
5601    fn duplicate(
5602        &mut self,
5603        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5604
5605        request: ::fidl_next::Request<___T, capability_store::Duplicate>,
5606
5607        responder: ::fidl_next::Responder<capability_store::Duplicate>,
5608    );
5609
5610    #[doc = " Drops the capability with `id` from this [`CapabilityStore`].\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5611    fn drop(
5612        &mut self,
5613        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5614
5615        request: ::fidl_next::Request<___T, capability_store::Drop>,
5616
5617        responder: ::fidl_next::Responder<capability_store::Drop>,
5618    );
5619
5620    #[doc = " Exports the capability with the client-assigned identifier `id` to\n `capability`. This operation removes the capability from the store. If\n this is not desired, [Duplicate] the capability first.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5621    fn export(
5622        &mut self,
5623        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5624
5625        request: ::fidl_next::Request<___T, capability_store::Export>,
5626
5627        responder: ::fidl_next::Responder<capability_store::Export>,
5628    );
5629
5630    #[doc = " Imports `capability` into this store with the client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `capability` was not a valid [Capability].\n"]
5631    fn import(
5632        &mut self,
5633        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5634
5635        request: ::fidl_next::Request<___T, capability_store::Import>,
5636
5637        responder: ::fidl_next::Responder<capability_store::Import>,
5638    );
5639
5640    #[doc = " Creates a [Connector] from a [Receiver]. Incoming connections to the [Connector] will be\n dispatched to this [Receiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5641    fn connector_create(
5642        &mut self,
5643        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5644
5645        request: ::fidl_next::Request<___T, capability_store::ConnectorCreate>,
5646
5647        responder: ::fidl_next::Responder<capability_store::ConnectorCreate>,
5648    );
5649
5650    #[doc = " Open a connection from the provided [Connector] capability that will be dispatched to\n the [Receiver] on the other end.\n\n If there is an error, it will be reported as a zx.Status epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
5651    fn connector_open(
5652        &mut self,
5653        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5654
5655        request: ::fidl_next::Request<___T, capability_store::ConnectorOpen>,
5656
5657        responder: ::fidl_next::Responder<capability_store::ConnectorOpen>,
5658    );
5659
5660    #[doc = " Creates a [DirConnector] from a [DirReceiver]. Incoming connections to the [DirConnector]\n will be dispatched to this [DirReceiver].\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5661    fn dir_connector_create(
5662        &mut self,
5663        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5664
5665        request: ::fidl_next::Request<___T, capability_store::DirConnectorCreate>,
5666
5667        responder: ::fidl_next::Responder<capability_store::DirConnectorCreate>,
5668    );
5669
5670    #[doc = " Open a connection from the provided [DirConnector] capability that will be dispatched to\n the [DirReceiver] on the other end.\n\n This method does not take `Open`/`Open3` parameters such as `flags` or `path`.\n Clients that wish to specify these can get an initial connection from this method\n and call `fuchsia.io/Directory.Open` on it. See the [DirReceiver] documentation for\n more information about the expectations of the server side.\n\n If there was an error making the connection, it will be reported as a zx.Status\n epitaph on `server_end`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a connector capability.\n"]
5671    fn dir_connector_open(
5672        &mut self,
5673        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5674
5675        request: ::fidl_next::Request<___T, capability_store::DirConnectorOpen>,
5676
5677        responder: ::fidl_next::Responder<capability_store::DirConnectorOpen>,
5678    );
5679
5680    #[doc = " Creates a new empty dictionary in this [`CapabilityStore`] with client-assigned `id`.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n"]
5681    fn dictionary_create(
5682        &mut self,
5683        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5684
5685        request: ::fidl_next::Request<___T, capability_store::DictionaryCreate>,
5686
5687        responder: ::fidl_next::Responder<capability_store::DictionaryCreate>,
5688    );
5689
5690    #[doc = " Imports a dictionary in the form of a channel.\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if a capability with `id` already exists in this store.\n - `BAD_CAPABILITY` if `client_end` was not a valid dictionary channel.\n"]
5691    fn dictionary_legacy_import(
5692        &mut self,
5693        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5694
5695        request: ::fidl_next::Request<___T, capability_store::DictionaryLegacyImport>,
5696
5697        responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport>,
5698    );
5699
5700    #[doc = " Binds a channel to the dictionary with `id`. The channel can\n be re-imported into a [CapabilityStore] with [DictionaryImportLegacy].\n\n This is a legacy API to support backward compatibility with APIs that take a [Dictionary]\n channel.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n"]
5701    fn dictionary_legacy_export(
5702        &mut self,
5703        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5704
5705        request: ::fidl_next::Request<___T, capability_store::DictionaryLegacyExport>,
5706
5707        responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport>,
5708    );
5709
5710    #[doc = " Inserts `item` into the dictionary with `id`. `item.value` is moved into the dictionary and\n its id is released if this call succeeds.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_ALREADY_EXISTS` if the dictionary already contains an item with `item.key`.\n"]
5711    fn dictionary_insert(
5712        &mut self,
5713        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5714
5715        request: ::fidl_next::Request<___T, capability_store::DictionaryInsert>,
5716
5717        responder: ::fidl_next::Responder<capability_store::DictionaryInsert>,
5718    );
5719
5720    #[doc = " Get a duplicate of a capability from the dictionary with `id`, which is\n loaded into `dest_id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a recognized capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `item.key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain `key`.\n - `NOT_DUPLICATABLE` if the capability could not be duplicated.\n"]
5721    fn dictionary_get(
5722        &mut self,
5723        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5724
5725        request: ::fidl_next::Request<___T, capability_store::DictionaryGet>,
5726
5727        responder: ::fidl_next::Responder<capability_store::DictionaryGet>,
5728    );
5729
5730    #[doc = " Removes a key from the dictionary with `id`. If `dest_id` is present, loads the value\n into it, otherwise discards the value.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `INVALID_KEY` if `key` was invalid.\n - `ITEM_NOT_FOUND` if the dictionary does not contain the key.\n"]
5731    fn dictionary_remove(
5732        &mut self,
5733        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5734
5735        request: ::fidl_next::Request<___T, capability_store::DictionaryRemove>,
5736
5737        responder: ::fidl_next::Responder<capability_store::DictionaryRemove>,
5738    );
5739
5740    #[doc = " Create a new dictionary that contains a duplicate of all the entries in\n the dictionary with `id`, assigning `dest_id` to the new dictionary.\n The runtime of this method is linear in the number of top-level entries\n in the dictionary.\n\n For example, if the dictionary contains nested dictionaries, the newly\n created dictionary will contain references to those same nested\n dictionaries because the entries are duplicated rather than deep-copied.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `ID_ALREADY_EXISTS` if a capability with `dest_id` already exists in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n - `NOT_DUPLICATABLE` if one of the capabilities in `id` could not be duplicated.\n"]
5741    fn dictionary_copy(
5742        &mut self,
5743        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5744
5745        request: ::fidl_next::Request<___T, capability_store::DictionaryCopy>,
5746
5747        responder: ::fidl_next::Responder<capability_store::DictionaryCopy>,
5748    );
5749
5750    #[doc = " Enumerates the keys in the dictionary with `id`.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5751    fn dictionary_keys(
5752        &mut self,
5753        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5754
5755        request: ::fidl_next::Request<___T, capability_store::DictionaryKeys>,
5756
5757        responder: ::fidl_next::Responder<capability_store::DictionaryKeys>,
5758    );
5759
5760    #[doc = " Enumerates the items (keys and values) in the dictionary with `id`.\n\n Creates a duplicate of each value (capability). If a value could not be duplicated,\n the value will be null.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5761    fn dictionary_enumerate(
5762        &mut self,
5763        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5764
5765        request: ::fidl_next::Request<___T, capability_store::DictionaryEnumerate>,
5766
5767        responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate>,
5768    );
5769
5770    #[doc = " Removes all the entries in this dictionary, returning them in `contents` if provided.\n If `contents` is not provided, all the items are discarded without enumerating them.\n\n Errors:\n\n - `ID_NOT_FOUND` if `id` was not a valid capability id in this store.\n - `WRONG_TYPE` if `id` was not a dictionary.\n"]
5771    fn dictionary_drain(
5772        &mut self,
5773        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5774
5775        request: ::fidl_next::Request<___T, capability_store::DictionaryDrain>,
5776
5777        responder: ::fidl_next::Responder<capability_store::DictionaryDrain>,
5778    );
5779
5780    fn on_unknown_interaction(
5781        &mut self,
5782        sender: &::fidl_next::ServerSender<___T, CapabilityStore>,
5783        ordinal: u64,
5784    ) {
5785        sender.close();
5786    }
5787}
5788
5789impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for CapabilityStore
5790where
5791    ___T: ::fidl_next::Transport,
5792    ___H: CapabilityStoreServerHandler<___T>,
5793
5794    crate::WireCapabilityStoreDuplicateRequest:
5795        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5796
5797    crate::WireCapabilityStoreDropRequest:
5798        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5799
5800    crate::WireCapabilityStoreExportRequest:
5801        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5802
5803    crate::WireCapabilityStoreImportRequest:
5804        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5805
5806    crate::WireCapabilityStoreConnectorCreateRequest:
5807        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5808
5809    crate::WireCapabilityStoreConnectorOpenRequest:
5810        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5811
5812    crate::WireCapabilityStoreDirConnectorCreateRequest:
5813        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5814
5815    crate::WireCapabilityStoreDirConnectorOpenRequest:
5816        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5817
5818    crate::WireCapabilityStoreDictionaryCreateRequest:
5819        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5820
5821    crate::WireCapabilityStoreDictionaryLegacyImportRequest:
5822        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5823
5824    crate::WireCapabilityStoreDictionaryLegacyExportRequest:
5825        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5826
5827    crate::WireCapabilityStoreDictionaryInsertRequest:
5828        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5829
5830    crate::WireCapabilityStoreDictionaryGetRequest:
5831        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5832
5833    crate::WireCapabilityStoreDictionaryRemoveRequest:
5834        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5835
5836    crate::WireCapabilityStoreDictionaryCopyRequest:
5837        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5838
5839    crate::WireCapabilityStoreDictionaryKeysRequest:
5840        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5841
5842    crate::WireCapabilityStoreDictionaryEnumerateRequest:
5843        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5844
5845    crate::WireCapabilityStoreDictionaryDrainRequest:
5846        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
5847{
5848    fn on_one_way(
5849        handler: &mut ___H,
5850        sender: &::fidl_next::ServerSender<___T, Self>,
5851        ordinal: u64,
5852        buffer: ___T::RecvBuffer,
5853    ) {
5854        match ordinal {
5855            ordinal => handler.on_unknown_interaction(sender, ordinal),
5856        }
5857    }
5858
5859    fn on_two_way(
5860        handler: &mut ___H,
5861        sender: &::fidl_next::ServerSender<___T, Self>,
5862        ordinal: u64,
5863        buffer: ___T::RecvBuffer,
5864        responder: ::fidl_next::protocol::Responder,
5865    ) {
5866        match ordinal {
5867            6727592627741008260 => {
5868                let responder = ::fidl_next::Responder::from_untyped(responder);
5869
5870                match ::fidl_next::DecoderExt::decode(buffer) {
5871                    Ok(decoded) => handler.duplicate(sender, decoded, responder),
5872                    Err(e) => {
5873                        sender.close();
5874                    }
5875                }
5876            }
5877
5878            753328233834620249 => {
5879                let responder = ::fidl_next::Responder::from_untyped(responder);
5880
5881                match ::fidl_next::DecoderExt::decode(buffer) {
5882                    Ok(decoded) => handler.drop(sender, decoded, responder),
5883                    Err(e) => {
5884                        sender.close();
5885                    }
5886                }
5887            }
5888
5889            226159162093533951 => {
5890                let responder = ::fidl_next::Responder::from_untyped(responder);
5891
5892                match ::fidl_next::DecoderExt::decode(buffer) {
5893                    Ok(decoded) => handler.export(sender, decoded, responder),
5894                    Err(e) => {
5895                        sender.close();
5896                    }
5897                }
5898            }
5899
5900            2276030276116435867 => {
5901                let responder = ::fidl_next::Responder::from_untyped(responder);
5902
5903                match ::fidl_next::DecoderExt::decode(buffer) {
5904                    Ok(decoded) => handler.import(sender, decoded, responder),
5905                    Err(e) => {
5906                        sender.close();
5907                    }
5908                }
5909            }
5910
5911            2979461408102095909 => {
5912                let responder = ::fidl_next::Responder::from_untyped(responder);
5913
5914                match ::fidl_next::DecoderExt::decode(buffer) {
5915                    Ok(decoded) => handler.connector_create(sender, decoded, responder),
5916                    Err(e) => {
5917                        sender.close();
5918                    }
5919                }
5920            }
5921
5922            6016362336453278623 => {
5923                let responder = ::fidl_next::Responder::from_untyped(responder);
5924
5925                match ::fidl_next::DecoderExt::decode(buffer) {
5926                    Ok(decoded) => handler.connector_open(sender, decoded, responder),
5927                    Err(e) => {
5928                        sender.close();
5929                    }
5930                }
5931            }
5932
5933            1756747594275428795 => {
5934                let responder = ::fidl_next::Responder::from_untyped(responder);
5935
5936                match ::fidl_next::DecoderExt::decode(buffer) {
5937                    Ok(decoded) => handler.dir_connector_create(sender, decoded, responder),
5938                    Err(e) => {
5939                        sender.close();
5940                    }
5941                }
5942            }
5943
5944            6219704004220369153 => {
5945                let responder = ::fidl_next::Responder::from_untyped(responder);
5946
5947                match ::fidl_next::DecoderExt::decode(buffer) {
5948                    Ok(decoded) => handler.dir_connector_open(sender, decoded, responder),
5949                    Err(e) => {
5950                        sender.close();
5951                    }
5952                }
5953            }
5954
5955            7608770958894948499 => {
5956                let responder = ::fidl_next::Responder::from_untyped(responder);
5957
5958                match ::fidl_next::DecoderExt::decode(buffer) {
5959                    Ok(decoded) => handler.dictionary_create(sender, decoded, responder),
5960                    Err(e) => {
5961                        sender.close();
5962                    }
5963                }
5964            }
5965
5966            8285893703432012383 => {
5967                let responder = ::fidl_next::Responder::from_untyped(responder);
5968
5969                match ::fidl_next::DecoderExt::decode(buffer) {
5970                    Ok(decoded) => handler.dictionary_legacy_import(sender, decoded, responder),
5971                    Err(e) => {
5972                        sender.close();
5973                    }
5974                }
5975            }
5976
5977            4647175832683306445 => {
5978                let responder = ::fidl_next::Responder::from_untyped(responder);
5979
5980                match ::fidl_next::DecoderExt::decode(buffer) {
5981                    Ok(decoded) => handler.dictionary_legacy_export(sender, decoded, responder),
5982                    Err(e) => {
5983                        sender.close();
5984                    }
5985                }
5986            }
5987
5988            8575443262986538023 => {
5989                let responder = ::fidl_next::Responder::from_untyped(responder);
5990
5991                match ::fidl_next::DecoderExt::decode(buffer) {
5992                    Ok(decoded) => handler.dictionary_insert(sender, decoded, responder),
5993                    Err(e) => {
5994                        sender.close();
5995                    }
5996                }
5997            }
5998
5999            5592951026866236882 => {
6000                let responder = ::fidl_next::Responder::from_untyped(responder);
6001
6002                match ::fidl_next::DecoderExt::decode(buffer) {
6003                    Ok(decoded) => handler.dictionary_get(sender, decoded, responder),
6004                    Err(e) => {
6005                        sender.close();
6006                    }
6007                }
6008            }
6009
6010            343892214579320051 => {
6011                let responder = ::fidl_next::Responder::from_untyped(responder);
6012
6013                match ::fidl_next::DecoderExt::decode(buffer) {
6014                    Ok(decoded) => handler.dictionary_remove(sender, decoded, responder),
6015                    Err(e) => {
6016                        sender.close();
6017                    }
6018                }
6019            }
6020
6021            3977783339739362383 => {
6022                let responder = ::fidl_next::Responder::from_untyped(responder);
6023
6024                match ::fidl_next::DecoderExt::decode(buffer) {
6025                    Ok(decoded) => handler.dictionary_copy(sender, decoded, responder),
6026                    Err(e) => {
6027                        sender.close();
6028                    }
6029                }
6030            }
6031
6032            597577248872787102 => {
6033                let responder = ::fidl_next::Responder::from_untyped(responder);
6034
6035                match ::fidl_next::DecoderExt::decode(buffer) {
6036                    Ok(decoded) => handler.dictionary_keys(sender, decoded, responder),
6037                    Err(e) => {
6038                        sender.close();
6039                    }
6040                }
6041            }
6042
6043            964467096271472193 => {
6044                let responder = ::fidl_next::Responder::from_untyped(responder);
6045
6046                match ::fidl_next::DecoderExt::decode(buffer) {
6047                    Ok(decoded) => handler.dictionary_enumerate(sender, decoded, responder),
6048                    Err(e) => {
6049                        sender.close();
6050                    }
6051                }
6052            }
6053
6054            2928364469569621208 => {
6055                let responder = ::fidl_next::Responder::from_untyped(responder);
6056
6057                match ::fidl_next::DecoderExt::decode(buffer) {
6058                    Ok(decoded) => handler.dictionary_drain(sender, decoded, responder),
6059                    Err(e) => {
6060                        sender.close();
6061                    }
6062                }
6063            }
6064
6065            ordinal => handler.on_unknown_interaction(sender, ordinal),
6066        }
6067    }
6068}
6069
6070#[doc = " Represents an instance in the component tree, either a component\n instance or component manager\'s instance.\n"]
6071#[derive(Debug)]
6072#[repr(C)]
6073pub struct InstanceToken {
6074    pub token: ::fidl_next::fuchsia::zx::Handle,
6075}
6076
6077impl ::fidl_next::Encodable for InstanceToken {
6078    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
6079        ::fidl_next::CopyOptimization::enable_if(
6080            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6081                .is_enabled(),
6082        )
6083    };
6084
6085    type Encoded = WireInstanceToken;
6086}
6087
6088unsafe impl<___E> ::fidl_next::Encode<___E> for InstanceToken
6089where
6090    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6091
6092    ___E: ::fidl_next::fuchsia::HandleEncoder,
6093{
6094    #[inline]
6095    fn encode(
6096        &mut self,
6097        encoder: &mut ___E,
6098        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6099    ) -> Result<(), ::fidl_next::EncodeError> {
6100        ::fidl_next::munge! {
6101            let Self::Encoded {
6102                token,
6103
6104            } = out;
6105        }
6106
6107        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
6108
6109        Ok(())
6110    }
6111}
6112
6113impl ::fidl_next::EncodableOption for Box<InstanceToken> {
6114    type EncodedOption = ::fidl_next::WireBox<WireInstanceToken>;
6115}
6116
6117unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<InstanceToken>
6118where
6119    ___E: ::fidl_next::Encoder + ?Sized,
6120    InstanceToken: ::fidl_next::Encode<___E>,
6121{
6122    #[inline]
6123    fn encode_option(
6124        this: Option<&mut Self>,
6125        encoder: &mut ___E,
6126        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6127    ) -> Result<(), ::fidl_next::EncodeError> {
6128        if let Some(inner) = this {
6129            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6130            ::fidl_next::WireBox::encode_present(out);
6131        } else {
6132            ::fidl_next::WireBox::encode_absent(out);
6133        }
6134
6135        Ok(())
6136    }
6137}
6138
6139impl ::fidl_next::TakeFrom<WireInstanceToken> for InstanceToken {
6140    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
6141        ::fidl_next::CopyOptimization::enable_if(
6142            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6143                .is_enabled(),
6144        )
6145    };
6146
6147    #[inline]
6148    fn take_from(from: &WireInstanceToken) -> Self {
6149        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
6150    }
6151}
6152
6153/// The wire type corresponding to [`InstanceToken`].
6154#[derive(Debug)]
6155#[repr(C)]
6156pub struct WireInstanceToken {
6157    pub token: ::fidl_next::fuchsia::WireHandle,
6158}
6159
6160unsafe impl ::fidl_next::ZeroPadding for WireInstanceToken {
6161    #[inline]
6162    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6163}
6164
6165unsafe impl<___D> ::fidl_next::Decode<___D> for WireInstanceToken
6166where
6167    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6168
6169    ___D: ::fidl_next::fuchsia::HandleDecoder,
6170{
6171    fn decode(
6172        slot: ::fidl_next::Slot<'_, Self>,
6173        decoder: &mut ___D,
6174    ) -> Result<(), ::fidl_next::DecodeError> {
6175        ::fidl_next::munge! {
6176            let Self {
6177                mut token,
6178
6179            } = slot;
6180        }
6181
6182        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
6183
6184        Ok(())
6185    }
6186}
6187
6188#[doc = " A request for a route.\n"]
6189#[derive(Debug, Default)]
6190pub struct RouteRequest {
6191    pub requesting: Option<crate::InstanceToken>,
6192
6193    pub metadata: Option<crate::DictionaryRef>,
6194}
6195
6196impl RouteRequest {
6197    fn __max_ordinal(&self) -> usize {
6198        if self.requesting.is_some() {
6199            return 1;
6200        }
6201
6202        if self.metadata.is_some() {
6203            return 2;
6204        }
6205
6206        0
6207    }
6208}
6209
6210impl ::fidl_next::Encodable for RouteRequest {
6211    type Encoded = WireRouteRequest;
6212}
6213
6214unsafe impl<___E> ::fidl_next::Encode<___E> for RouteRequest
6215where
6216    ___E: ::fidl_next::Encoder + ?Sized,
6217
6218    ___E: ::fidl_next::fuchsia::HandleEncoder,
6219{
6220    #[inline]
6221    fn encode(
6222        &mut self,
6223        encoder: &mut ___E,
6224        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6225    ) -> Result<(), ::fidl_next::EncodeError> {
6226        ::fidl_next::munge!(let WireRouteRequest { table } = out);
6227
6228        let max_ord = self.__max_ordinal();
6229
6230        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6231        ::fidl_next::ZeroPadding::zero_padding(&mut out);
6232
6233        let mut preallocated =
6234            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6235
6236        for i in 1..=max_ord {
6237            match i {
6238                2 => {
6239                    if let Some(metadata) = &mut self.metadata {
6240                        ::fidl_next::WireEnvelope::encode_value(
6241                            metadata,
6242                            preallocated.encoder,
6243                            &mut out,
6244                        )?;
6245                    } else {
6246                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
6247                    }
6248                }
6249
6250                1 => {
6251                    if let Some(requesting) = &mut self.requesting {
6252                        ::fidl_next::WireEnvelope::encode_value(
6253                            requesting,
6254                            preallocated.encoder,
6255                            &mut out,
6256                        )?;
6257                    } else {
6258                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
6259                    }
6260                }
6261
6262                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6263            }
6264            unsafe {
6265                preallocated.write_next(out.assume_init_ref());
6266            }
6267        }
6268
6269        ::fidl_next::WireTable::encode_len(table, max_ord);
6270
6271        Ok(())
6272    }
6273}
6274
6275impl ::fidl_next::TakeFrom<WireRouteRequest> for RouteRequest {
6276    #[inline]
6277    fn take_from(from: &WireRouteRequest) -> Self {
6278        Self {
6279            requesting: from.requesting().map(::fidl_next::TakeFrom::take_from),
6280
6281            metadata: from.metadata().map(::fidl_next::TakeFrom::take_from),
6282        }
6283    }
6284}
6285
6286/// The wire type corresponding to [`RouteRequest`].
6287#[repr(C)]
6288pub struct WireRouteRequest {
6289    table: ::fidl_next::WireTable,
6290}
6291
6292unsafe impl ::fidl_next::ZeroPadding for WireRouteRequest {
6293    #[inline]
6294    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6295        ::fidl_next::munge!(let Self { table } = out);
6296        ::fidl_next::WireTable::zero_padding(table);
6297    }
6298}
6299
6300unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouteRequest
6301where
6302    ___D: ::fidl_next::Decoder + ?Sized,
6303
6304    ___D: ::fidl_next::fuchsia::HandleDecoder,
6305{
6306    fn decode(
6307        slot: ::fidl_next::Slot<'_, Self>,
6308        decoder: &mut ___D,
6309    ) -> Result<(), ::fidl_next::DecodeError> {
6310        ::fidl_next::munge!(let Self { table } = slot);
6311
6312        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6313            match ordinal {
6314                0 => unsafe { ::core::hint::unreachable_unchecked() },
6315
6316                1 => {
6317                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireInstanceToken>(
6318                        slot.as_mut(),
6319                        decoder,
6320                    )?;
6321
6322                    Ok(())
6323                }
6324
6325                2 => {
6326                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireDictionaryRef>(
6327                        slot.as_mut(),
6328                        decoder,
6329                    )?;
6330
6331                    Ok(())
6332                }
6333
6334                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6335            }
6336        })
6337    }
6338}
6339
6340impl WireRouteRequest {
6341    pub fn requesting(&self) -> Option<&crate::WireInstanceToken> {
6342        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6343    }
6344
6345    pub fn metadata(&self) -> Option<&crate::WireDictionaryRef> {
6346        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6347    }
6348}
6349
6350impl ::core::fmt::Debug for WireRouteRequest {
6351    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
6352        f.debug_struct("RouteRequest")
6353            .field("requesting", &self.requesting())
6354            .field("metadata", &self.metadata())
6355            .finish()
6356    }
6357}
6358
6359#[derive(Debug)]
6360pub enum ConnectorRouterRouteResponse {
6361    Connector(crate::Connector),
6362
6363    Unavailable(crate::Unit),
6364}
6365
6366impl ::fidl_next::Encodable for ConnectorRouterRouteResponse {
6367    type Encoded = WireConnectorRouterRouteResponse;
6368}
6369
6370unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectorRouterRouteResponse
6371where
6372    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6373
6374    ___E: ::fidl_next::fuchsia::HandleEncoder,
6375{
6376    #[inline]
6377    fn encode(
6378        &mut self,
6379        encoder: &mut ___E,
6380        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6381    ) -> Result<(), ::fidl_next::EncodeError> {
6382        ::fidl_next::munge!(let WireConnectorRouterRouteResponse { raw } = out);
6383
6384        match self {
6385            Self::Connector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
6386                ___E,
6387                crate::Connector,
6388            >(value, 1, encoder, raw)?,
6389
6390            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
6391                ___E,
6392                crate::Unit,
6393            >(value, 2, encoder, raw)?,
6394        }
6395
6396        Ok(())
6397    }
6398}
6399
6400impl ::fidl_next::EncodableOption for Box<ConnectorRouterRouteResponse> {
6401    type EncodedOption = WireOptionalConnectorRouterRouteResponse;
6402}
6403
6404unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ConnectorRouterRouteResponse>
6405where
6406    ___E: ?Sized,
6407    ConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
6408{
6409    #[inline]
6410    fn encode_option(
6411        this: Option<&mut Self>,
6412        encoder: &mut ___E,
6413        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6414    ) -> Result<(), ::fidl_next::EncodeError> {
6415        ::fidl_next::munge!(let WireOptionalConnectorRouterRouteResponse { raw } = &mut *out);
6416
6417        if let Some(inner) = this {
6418            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
6419            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
6420        } else {
6421            ::fidl_next::RawWireUnion::encode_absent(raw);
6422        }
6423
6424        Ok(())
6425    }
6426}
6427
6428impl ::fidl_next::TakeFrom<WireConnectorRouterRouteResponse> for ConnectorRouterRouteResponse {
6429    #[inline]
6430    fn take_from(from: &WireConnectorRouterRouteResponse) -> Self {
6431        match from.raw.ordinal() {
6432            1 => Self::Connector(::fidl_next::TakeFrom::take_from(unsafe {
6433                from.raw.get().deref_unchecked::<crate::WireConnector>()
6434            })),
6435
6436            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
6437                from.raw.get().deref_unchecked::<crate::WireUnit>()
6438            })),
6439
6440            _ => unsafe { ::core::hint::unreachable_unchecked() },
6441        }
6442    }
6443}
6444
6445impl ::fidl_next::TakeFrom<WireOptionalConnectorRouterRouteResponse>
6446    for Option<Box<ConnectorRouterRouteResponse>>
6447{
6448    #[inline]
6449    fn take_from(from: &WireOptionalConnectorRouterRouteResponse) -> Self {
6450        if let Some(inner) = from.as_ref() {
6451            Some(::fidl_next::TakeFrom::take_from(inner))
6452        } else {
6453            None
6454        }
6455    }
6456}
6457
6458/// The wire type corresponding to [`ConnectorRouterRouteResponse`].
6459#[repr(transparent)]
6460pub struct WireConnectorRouterRouteResponse {
6461    raw: ::fidl_next::RawWireUnion,
6462}
6463
6464unsafe impl ::fidl_next::ZeroPadding for WireConnectorRouterRouteResponse {
6465    #[inline]
6466    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6467        ::fidl_next::munge!(let Self { raw } = out);
6468        ::fidl_next::RawWireUnion::zero_padding(raw);
6469    }
6470}
6471
6472pub mod connector_router_route_response {
6473    pub enum Ref<'union> {
6474        Connector(&'union crate::WireConnector),
6475
6476        Unavailable(&'union crate::WireUnit),
6477    }
6478}
6479
6480impl WireConnectorRouterRouteResponse {
6481    pub fn as_ref(&self) -> crate::connector_router_route_response::Ref<'_> {
6482        match self.raw.ordinal() {
6483            1 => crate::connector_router_route_response::Ref::Connector(unsafe {
6484                self.raw.get().deref_unchecked::<crate::WireConnector>()
6485            }),
6486
6487            2 => crate::connector_router_route_response::Ref::Unavailable(unsafe {
6488                self.raw.get().deref_unchecked::<crate::WireUnit>()
6489            }),
6490
6491            _ => unsafe { ::core::hint::unreachable_unchecked() },
6492        }
6493    }
6494}
6495
6496unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnectorRouterRouteResponse
6497where
6498    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6499
6500    ___D: ::fidl_next::fuchsia::HandleDecoder,
6501{
6502    fn decode(
6503        mut slot: ::fidl_next::Slot<'_, Self>,
6504        decoder: &mut ___D,
6505    ) -> Result<(), ::fidl_next::DecodeError> {
6506        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
6507        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
6508            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
6509                raw, decoder,
6510            )?,
6511
6512            2 => {
6513                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
6514            }
6515
6516            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6517        }
6518
6519        Ok(())
6520    }
6521}
6522
6523impl ::core::fmt::Debug for WireConnectorRouterRouteResponse {
6524    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6525        match self.raw.ordinal() {
6526            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireConnector>().fmt(f) },
6527            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
6528            _ => unsafe { ::core::hint::unreachable_unchecked() },
6529        }
6530    }
6531}
6532
6533#[repr(transparent)]
6534pub struct WireOptionalConnectorRouterRouteResponse {
6535    raw: ::fidl_next::RawWireUnion,
6536}
6537
6538unsafe impl ::fidl_next::ZeroPadding for WireOptionalConnectorRouterRouteResponse {
6539    #[inline]
6540    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6541        ::fidl_next::munge!(let Self { raw } = out);
6542        ::fidl_next::RawWireUnion::zero_padding(raw);
6543    }
6544}
6545
6546impl WireOptionalConnectorRouterRouteResponse {
6547    pub fn is_some(&self) -> bool {
6548        self.raw.is_some()
6549    }
6550
6551    pub fn is_none(&self) -> bool {
6552        self.raw.is_none()
6553    }
6554
6555    pub fn as_ref(&self) -> Option<&WireConnectorRouterRouteResponse> {
6556        if self.is_some() {
6557            Some(unsafe { &*(self as *const Self).cast() })
6558        } else {
6559            None
6560        }
6561    }
6562}
6563
6564unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalConnectorRouterRouteResponse
6565where
6566    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6567
6568    ___D: ::fidl_next::fuchsia::HandleDecoder,
6569{
6570    fn decode(
6571        mut slot: ::fidl_next::Slot<'_, Self>,
6572        decoder: &mut ___D,
6573    ) -> Result<(), ::fidl_next::DecodeError> {
6574        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
6575        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
6576            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
6577                raw, decoder,
6578            )?,
6579
6580            2 => {
6581                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
6582            }
6583
6584            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
6585            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
6586        }
6587
6588        Ok(())
6589    }
6590}
6591
6592impl ::core::fmt::Debug for WireOptionalConnectorRouterRouteResponse {
6593    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6594        self.as_ref().fmt(f)
6595    }
6596}
6597
6598#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6599#[repr(u32)]
6600pub enum RouterError {
6601    NotFound = 1,
6602    InvalidArgs = 2,
6603    NotSupported = 3,
6604    Internal = 4,
6605    UnknownOrdinal_(u32),
6606}
6607
6608impl ::fidl_next::Encodable for RouterError {
6609    type Encoded = WireRouterError;
6610}
6611impl ::std::convert::From<u32> for RouterError {
6612    fn from(value: u32) -> Self {
6613        match value {
6614            1 => Self::NotFound,
6615            2 => Self::InvalidArgs,
6616            3 => Self::NotSupported,
6617            4 => Self::Internal,
6618
6619            _ => Self::UnknownOrdinal_(value),
6620        }
6621    }
6622}
6623
6624unsafe impl<___E> ::fidl_next::Encode<___E> for RouterError
6625where
6626    ___E: ?Sized,
6627{
6628    #[inline]
6629    fn encode(
6630        &mut self,
6631        _: &mut ___E,
6632        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6633    ) -> Result<(), ::fidl_next::EncodeError> {
6634        ::fidl_next::munge!(let WireRouterError { value } = out);
6635        let _ = value.write(::fidl_next::WireU32::from(match *self {
6636            Self::NotFound => 1,
6637
6638            Self::InvalidArgs => 2,
6639
6640            Self::NotSupported => 3,
6641
6642            Self::Internal => 4,
6643
6644            Self::UnknownOrdinal_(value) => value,
6645        }));
6646
6647        Ok(())
6648    }
6649}
6650
6651impl ::core::convert::From<WireRouterError> for RouterError {
6652    fn from(wire: WireRouterError) -> Self {
6653        match u32::from(wire.value) {
6654            1 => Self::NotFound,
6655
6656            2 => Self::InvalidArgs,
6657
6658            3 => Self::NotSupported,
6659
6660            4 => Self::Internal,
6661
6662            value => Self::UnknownOrdinal_(value),
6663        }
6664    }
6665}
6666
6667impl ::fidl_next::TakeFrom<WireRouterError> for RouterError {
6668    #[inline]
6669    fn take_from(from: &WireRouterError) -> Self {
6670        Self::from(*from)
6671    }
6672}
6673
6674/// The wire type corresponding to [`RouterError`].
6675#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6676#[repr(transparent)]
6677pub struct WireRouterError {
6678    value: ::fidl_next::WireU32,
6679}
6680
6681unsafe impl ::fidl_next::ZeroPadding for WireRouterError {
6682    #[inline]
6683    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6684        // Wire enums have no padding
6685    }
6686}
6687
6688impl WireRouterError {
6689    pub const NOT_FOUND: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(1) };
6690
6691    pub const INVALID_ARGS: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(2) };
6692
6693    pub const NOT_SUPPORTED: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(3) };
6694
6695    pub const INTERNAL: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(4) };
6696}
6697
6698unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouterError
6699where
6700    ___D: ?Sized,
6701{
6702    fn decode(
6703        slot: ::fidl_next::Slot<'_, Self>,
6704        _: &mut ___D,
6705    ) -> Result<(), ::fidl_next::DecodeError> {
6706        Ok(())
6707    }
6708}
6709
6710impl ::core::convert::From<RouterError> for WireRouterError {
6711    fn from(natural: RouterError) -> Self {
6712        match natural {
6713            RouterError::NotFound => WireRouterError::NOT_FOUND,
6714
6715            RouterError::InvalidArgs => WireRouterError::INVALID_ARGS,
6716
6717            RouterError::NotSupported => WireRouterError::NOT_SUPPORTED,
6718
6719            RouterError::Internal => WireRouterError::INTERNAL,
6720
6721            RouterError::UnknownOrdinal_(value) => {
6722                WireRouterError { value: ::fidl_next::WireU32::from(value) }
6723            }
6724        }
6725    }
6726}
6727
6728/// The type corresponding to the ConnectorRouter protocol.
6729#[derive(Debug)]
6730pub struct ConnectorRouter;
6731
6732impl ::fidl_next::Discoverable for ConnectorRouter {
6733    const PROTOCOL_NAME: &'static str = "connector_router";
6734}
6735
6736pub mod connector_router {
6737    pub mod prelude {
6738        pub use crate::{
6739            connector_router, ConnectorRouter, ConnectorRouterClientHandler,
6740            ConnectorRouterClientSender, ConnectorRouterServerHandler, ConnectorRouterServerSender,
6741        };
6742
6743        pub use crate::ConnectorRouterRouteResponse;
6744
6745        pub use crate::RouteRequest;
6746
6747        pub use crate::RouterError;
6748    }
6749
6750    pub struct Route;
6751
6752    impl ::fidl_next::Method for Route {
6753        const ORDINAL: u64 = 8420527046218942310;
6754
6755        type Protocol = crate::ConnectorRouter;
6756
6757        type Request = crate::WireRouteRequest;
6758
6759        type Response = ::fidl_next::WireFlexibleResult<
6760            crate::WireConnectorRouterRouteResponse,
6761            crate::WireRouterError,
6762        >;
6763    }
6764}
6765
6766/// A helper trait for the `ConnectorRouter` client sender.
6767pub trait ConnectorRouterClientSender {
6768    type Transport: ::fidl_next::Transport;
6769
6770    fn route<___R>(
6771        &self,
6772        request: &mut ___R,
6773    ) -> Result<
6774        ::fidl_next::ResponseFuture<'_, Self::Transport, connector_router::Route>,
6775        ::fidl_next::EncodeError,
6776    >
6777    where
6778        ___R: ::fidl_next::Encode<
6779            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
6780            Encoded = crate::WireRouteRequest,
6781        >;
6782}
6783
6784impl<___T> ConnectorRouterClientSender for ::fidl_next::ClientSender<___T, ConnectorRouter>
6785where
6786    ___T: ::fidl_next::Transport,
6787{
6788    type Transport = ___T;
6789
6790    fn route<___R>(
6791        &self,
6792        request: &mut ___R,
6793    ) -> Result<
6794        ::fidl_next::ResponseFuture<'_, Self::Transport, connector_router::Route>,
6795        ::fidl_next::EncodeError,
6796    >
6797    where
6798        ___R: ::fidl_next::Encode<
6799            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
6800            Encoded = crate::WireRouteRequest,
6801        >,
6802    {
6803        self.as_untyped()
6804            .send_two_way(8420527046218942310, request)
6805            .map(::fidl_next::ResponseFuture::from_untyped)
6806    }
6807}
6808
6809/// A client handler for the ConnectorRouter protocol.
6810///
6811/// See [`ConnectorRouter`] for more details.
6812pub trait ConnectorRouterClientHandler<___T: ::fidl_next::Transport> {
6813    fn on_unknown_interaction(
6814        &mut self,
6815        sender: &::fidl_next::ClientSender<___T, ConnectorRouter>,
6816        ordinal: u64,
6817    ) {
6818        sender.close();
6819    }
6820}
6821
6822impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for ConnectorRouter
6823where
6824    ___T: ::fidl_next::Transport,
6825    ___H: ConnectorRouterClientHandler<___T>,
6826
6827    <connector_router::Route as ::fidl_next::Method>::Response:
6828        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6829{
6830    fn on_event(
6831        handler: &mut ___H,
6832        sender: &::fidl_next::ClientSender<___T, Self>,
6833        ordinal: u64,
6834        buffer: ___T::RecvBuffer,
6835    ) {
6836        match ordinal {
6837            ordinal => handler.on_unknown_interaction(sender, ordinal),
6838        }
6839    }
6840}
6841
6842/// A helper trait for the `ConnectorRouter` server sender.
6843pub trait ConnectorRouterServerSender {
6844    type Transport: ::fidl_next::Transport;
6845}
6846
6847impl<___T> ConnectorRouterServerSender for ::fidl_next::ServerSender<___T, ConnectorRouter>
6848where
6849    ___T: ::fidl_next::Transport,
6850{
6851    type Transport = ___T;
6852}
6853
6854/// A server handler for the ConnectorRouter protocol.
6855///
6856/// See [`ConnectorRouter`] for more details.
6857pub trait ConnectorRouterServerHandler<___T: ::fidl_next::Transport> {
6858    fn route(
6859        &mut self,
6860        sender: &::fidl_next::ServerSender<___T, ConnectorRouter>,
6861
6862        request: ::fidl_next::Request<___T, connector_router::Route>,
6863
6864        responder: ::fidl_next::Responder<connector_router::Route>,
6865    );
6866
6867    fn on_unknown_interaction(
6868        &mut self,
6869        sender: &::fidl_next::ServerSender<___T, ConnectorRouter>,
6870        ordinal: u64,
6871    ) {
6872        sender.close();
6873    }
6874}
6875
6876impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for ConnectorRouter
6877where
6878    ___T: ::fidl_next::Transport,
6879    ___H: ConnectorRouterServerHandler<___T>,
6880
6881    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6882{
6883    fn on_one_way(
6884        handler: &mut ___H,
6885        sender: &::fidl_next::ServerSender<___T, Self>,
6886        ordinal: u64,
6887        buffer: ___T::RecvBuffer,
6888    ) {
6889        match ordinal {
6890            ordinal => handler.on_unknown_interaction(sender, ordinal),
6891        }
6892    }
6893
6894    fn on_two_way(
6895        handler: &mut ___H,
6896        sender: &::fidl_next::ServerSender<___T, Self>,
6897        ordinal: u64,
6898        buffer: ___T::RecvBuffer,
6899        responder: ::fidl_next::protocol::Responder,
6900    ) {
6901        match ordinal {
6902            8420527046218942310 => {
6903                let responder = ::fidl_next::Responder::from_untyped(responder);
6904
6905                match ::fidl_next::DecoderExt::decode(buffer) {
6906                    Ok(decoded) => handler.route(sender, decoded, responder),
6907                    Err(e) => {
6908                        sender.close();
6909                    }
6910                }
6911            }
6912
6913            ordinal => handler.on_unknown_interaction(sender, ordinal),
6914        }
6915    }
6916}
6917
6918#[derive(Debug)]
6919pub enum DataRouterRouteResponse {
6920    Data(crate::Data),
6921
6922    Unavailable(crate::Unit),
6923}
6924
6925impl ::fidl_next::Encodable for DataRouterRouteResponse {
6926    type Encoded = WireDataRouterRouteResponse;
6927}
6928
6929unsafe impl<___E> ::fidl_next::Encode<___E> for DataRouterRouteResponse
6930where
6931    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6932
6933    ___E: ::fidl_next::Encoder,
6934
6935    ___E: ::fidl_next::fuchsia::HandleEncoder,
6936{
6937    #[inline]
6938    fn encode(
6939        &mut self,
6940        encoder: &mut ___E,
6941        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6942    ) -> Result<(), ::fidl_next::EncodeError> {
6943        ::fidl_next::munge!(let WireDataRouterRouteResponse { raw } = out);
6944
6945        match self {
6946            Self::Data(value) => {
6947                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Data>(value, 1, encoder, raw)?
6948            }
6949
6950            Self::Unavailable(value) => {
6951                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Unit>(value, 2, encoder, raw)?
6952            }
6953        }
6954
6955        Ok(())
6956    }
6957}
6958
6959impl ::fidl_next::EncodableOption for Box<DataRouterRouteResponse> {
6960    type EncodedOption = WireOptionalDataRouterRouteResponse;
6961}
6962
6963unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DataRouterRouteResponse>
6964where
6965    ___E: ?Sized,
6966    DataRouterRouteResponse: ::fidl_next::Encode<___E>,
6967{
6968    #[inline]
6969    fn encode_option(
6970        this: Option<&mut Self>,
6971        encoder: &mut ___E,
6972        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6973    ) -> Result<(), ::fidl_next::EncodeError> {
6974        ::fidl_next::munge!(let WireOptionalDataRouterRouteResponse { raw } = &mut *out);
6975
6976        if let Some(inner) = this {
6977            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
6978            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
6979        } else {
6980            ::fidl_next::RawWireUnion::encode_absent(raw);
6981        }
6982
6983        Ok(())
6984    }
6985}
6986
6987impl ::fidl_next::TakeFrom<WireDataRouterRouteResponse> for DataRouterRouteResponse {
6988    #[inline]
6989    fn take_from(from: &WireDataRouterRouteResponse) -> Self {
6990        match from.raw.ordinal() {
6991            1 => Self::Data(::fidl_next::TakeFrom::take_from(unsafe {
6992                from.raw.get().deref_unchecked::<crate::WireData>()
6993            })),
6994
6995            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
6996                from.raw.get().deref_unchecked::<crate::WireUnit>()
6997            })),
6998
6999            _ => unsafe { ::core::hint::unreachable_unchecked() },
7000        }
7001    }
7002}
7003
7004impl ::fidl_next::TakeFrom<WireOptionalDataRouterRouteResponse>
7005    for Option<Box<DataRouterRouteResponse>>
7006{
7007    #[inline]
7008    fn take_from(from: &WireOptionalDataRouterRouteResponse) -> Self {
7009        if let Some(inner) = from.as_ref() {
7010            Some(::fidl_next::TakeFrom::take_from(inner))
7011        } else {
7012            None
7013        }
7014    }
7015}
7016
7017/// The wire type corresponding to [`DataRouterRouteResponse`].
7018#[repr(transparent)]
7019pub struct WireDataRouterRouteResponse {
7020    raw: ::fidl_next::RawWireUnion,
7021}
7022
7023unsafe impl ::fidl_next::ZeroPadding for WireDataRouterRouteResponse {
7024    #[inline]
7025    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7026        ::fidl_next::munge!(let Self { raw } = out);
7027        ::fidl_next::RawWireUnion::zero_padding(raw);
7028    }
7029}
7030
7031pub mod data_router_route_response {
7032    pub enum Ref<'union> {
7033        Data(&'union crate::WireData),
7034
7035        Unavailable(&'union crate::WireUnit),
7036    }
7037}
7038
7039impl WireDataRouterRouteResponse {
7040    pub fn as_ref(&self) -> crate::data_router_route_response::Ref<'_> {
7041        match self.raw.ordinal() {
7042            1 => crate::data_router_route_response::Ref::Data(unsafe {
7043                self.raw.get().deref_unchecked::<crate::WireData>()
7044            }),
7045
7046            2 => crate::data_router_route_response::Ref::Unavailable(unsafe {
7047                self.raw.get().deref_unchecked::<crate::WireUnit>()
7048            }),
7049
7050            _ => unsafe { ::core::hint::unreachable_unchecked() },
7051        }
7052    }
7053}
7054
7055unsafe impl<___D> ::fidl_next::Decode<___D> for WireDataRouterRouteResponse
7056where
7057    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7058
7059    ___D: ::fidl_next::Decoder,
7060
7061    ___D: ::fidl_next::fuchsia::HandleDecoder,
7062{
7063    fn decode(
7064        mut slot: ::fidl_next::Slot<'_, Self>,
7065        decoder: &mut ___D,
7066    ) -> Result<(), ::fidl_next::DecodeError> {
7067        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
7068        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7069            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
7070
7071            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
7072
7073            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
7074        }
7075
7076        Ok(())
7077    }
7078}
7079
7080impl ::core::fmt::Debug for WireDataRouterRouteResponse {
7081    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7082        match self.raw.ordinal() {
7083            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireData>().fmt(f) },
7084            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
7085            _ => unsafe { ::core::hint::unreachable_unchecked() },
7086        }
7087    }
7088}
7089
7090#[repr(transparent)]
7091pub struct WireOptionalDataRouterRouteResponse {
7092    raw: ::fidl_next::RawWireUnion,
7093}
7094
7095unsafe impl ::fidl_next::ZeroPadding for WireOptionalDataRouterRouteResponse {
7096    #[inline]
7097    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7098        ::fidl_next::munge!(let Self { raw } = out);
7099        ::fidl_next::RawWireUnion::zero_padding(raw);
7100    }
7101}
7102
7103impl WireOptionalDataRouterRouteResponse {
7104    pub fn is_some(&self) -> bool {
7105        self.raw.is_some()
7106    }
7107
7108    pub fn is_none(&self) -> bool {
7109        self.raw.is_none()
7110    }
7111
7112    pub fn as_ref(&self) -> Option<&WireDataRouterRouteResponse> {
7113        if self.is_some() {
7114            Some(unsafe { &*(self as *const Self).cast() })
7115        } else {
7116            None
7117        }
7118    }
7119}
7120
7121unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDataRouterRouteResponse
7122where
7123    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7124
7125    ___D: ::fidl_next::Decoder,
7126
7127    ___D: ::fidl_next::fuchsia::HandleDecoder,
7128{
7129    fn decode(
7130        mut slot: ::fidl_next::Slot<'_, Self>,
7131        decoder: &mut ___D,
7132    ) -> Result<(), ::fidl_next::DecodeError> {
7133        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
7134        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7135            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
7136
7137            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
7138
7139            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
7140            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
7141        }
7142
7143        Ok(())
7144    }
7145}
7146
7147impl ::core::fmt::Debug for WireOptionalDataRouterRouteResponse {
7148    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7149        self.as_ref().fmt(f)
7150    }
7151}
7152
7153/// The type corresponding to the DataRouter protocol.
7154#[derive(Debug)]
7155pub struct DataRouter;
7156
7157impl ::fidl_next::Discoverable for DataRouter {
7158    const PROTOCOL_NAME: &'static str = "data_router";
7159}
7160
7161pub mod data_router {
7162    pub mod prelude {
7163        pub use crate::{
7164            data_router, DataRouter, DataRouterClientHandler, DataRouterClientSender,
7165            DataRouterServerHandler, DataRouterServerSender,
7166        };
7167
7168        pub use crate::DataRouterRouteResponse;
7169
7170        pub use crate::RouteRequest;
7171
7172        pub use crate::RouterError;
7173    }
7174
7175    pub struct Route;
7176
7177    impl ::fidl_next::Method for Route {
7178        const ORDINAL: u64 = 3352890635970754564;
7179
7180        type Protocol = crate::DataRouter;
7181
7182        type Request = crate::WireRouteRequest;
7183
7184        type Response = ::fidl_next::WireFlexibleResult<
7185            crate::WireDataRouterRouteResponse,
7186            crate::WireRouterError,
7187        >;
7188    }
7189}
7190
7191/// A helper trait for the `DataRouter` client sender.
7192pub trait DataRouterClientSender {
7193    type Transport: ::fidl_next::Transport;
7194
7195    fn route<___R>(
7196        &self,
7197        request: &mut ___R,
7198    ) -> Result<
7199        ::fidl_next::ResponseFuture<'_, Self::Transport, data_router::Route>,
7200        ::fidl_next::EncodeError,
7201    >
7202    where
7203        ___R: ::fidl_next::Encode<
7204            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7205            Encoded = crate::WireRouteRequest,
7206        >;
7207}
7208
7209impl<___T> DataRouterClientSender for ::fidl_next::ClientSender<___T, DataRouter>
7210where
7211    ___T: ::fidl_next::Transport,
7212{
7213    type Transport = ___T;
7214
7215    fn route<___R>(
7216        &self,
7217        request: &mut ___R,
7218    ) -> Result<
7219        ::fidl_next::ResponseFuture<'_, Self::Transport, data_router::Route>,
7220        ::fidl_next::EncodeError,
7221    >
7222    where
7223        ___R: ::fidl_next::Encode<
7224            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7225            Encoded = crate::WireRouteRequest,
7226        >,
7227    {
7228        self.as_untyped()
7229            .send_two_way(3352890635970754564, request)
7230            .map(::fidl_next::ResponseFuture::from_untyped)
7231    }
7232}
7233
7234/// A client handler for the DataRouter protocol.
7235///
7236/// See [`DataRouter`] for more details.
7237pub trait DataRouterClientHandler<___T: ::fidl_next::Transport> {
7238    fn on_unknown_interaction(
7239        &mut self,
7240        sender: &::fidl_next::ClientSender<___T, DataRouter>,
7241        ordinal: u64,
7242    ) {
7243        sender.close();
7244    }
7245}
7246
7247impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DataRouter
7248where
7249    ___T: ::fidl_next::Transport,
7250    ___H: DataRouterClientHandler<___T>,
7251
7252    <data_router::Route as ::fidl_next::Method>::Response:
7253        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7254{
7255    fn on_event(
7256        handler: &mut ___H,
7257        sender: &::fidl_next::ClientSender<___T, Self>,
7258        ordinal: u64,
7259        buffer: ___T::RecvBuffer,
7260    ) {
7261        match ordinal {
7262            ordinal => handler.on_unknown_interaction(sender, ordinal),
7263        }
7264    }
7265}
7266
7267/// A helper trait for the `DataRouter` server sender.
7268pub trait DataRouterServerSender {
7269    type Transport: ::fidl_next::Transport;
7270}
7271
7272impl<___T> DataRouterServerSender for ::fidl_next::ServerSender<___T, DataRouter>
7273where
7274    ___T: ::fidl_next::Transport,
7275{
7276    type Transport = ___T;
7277}
7278
7279/// A server handler for the DataRouter protocol.
7280///
7281/// See [`DataRouter`] for more details.
7282pub trait DataRouterServerHandler<___T: ::fidl_next::Transport> {
7283    fn route(
7284        &mut self,
7285        sender: &::fidl_next::ServerSender<___T, DataRouter>,
7286
7287        request: ::fidl_next::Request<___T, data_router::Route>,
7288
7289        responder: ::fidl_next::Responder<data_router::Route>,
7290    );
7291
7292    fn on_unknown_interaction(
7293        &mut self,
7294        sender: &::fidl_next::ServerSender<___T, DataRouter>,
7295        ordinal: u64,
7296    ) {
7297        sender.close();
7298    }
7299}
7300
7301impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DataRouter
7302where
7303    ___T: ::fidl_next::Transport,
7304    ___H: DataRouterServerHandler<___T>,
7305
7306    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7307{
7308    fn on_one_way(
7309        handler: &mut ___H,
7310        sender: &::fidl_next::ServerSender<___T, Self>,
7311        ordinal: u64,
7312        buffer: ___T::RecvBuffer,
7313    ) {
7314        match ordinal {
7315            ordinal => handler.on_unknown_interaction(sender, ordinal),
7316        }
7317    }
7318
7319    fn on_two_way(
7320        handler: &mut ___H,
7321        sender: &::fidl_next::ServerSender<___T, Self>,
7322        ordinal: u64,
7323        buffer: ___T::RecvBuffer,
7324        responder: ::fidl_next::protocol::Responder,
7325    ) {
7326        match ordinal {
7327            3352890635970754564 => {
7328                let responder = ::fidl_next::Responder::from_untyped(responder);
7329
7330                match ::fidl_next::DecoderExt::decode(buffer) {
7331                    Ok(decoded) => handler.route(sender, decoded, responder),
7332                    Err(e) => {
7333                        sender.close();
7334                    }
7335                }
7336            }
7337
7338            ordinal => handler.on_unknown_interaction(sender, ordinal),
7339        }
7340    }
7341}
7342
7343/// The type corresponding to the Dictionary protocol.
7344#[derive(Debug)]
7345pub struct Dictionary;
7346
7347impl ::fidl_next::Discoverable for Dictionary {
7348    const PROTOCOL_NAME: &'static str = "dictionary";
7349}
7350
7351pub mod dictionary {
7352    pub mod prelude {
7353        pub use crate::{
7354            dictionary, Dictionary, DictionaryClientHandler, DictionaryClientSender,
7355            DictionaryServerHandler, DictionaryServerSender,
7356        };
7357    }
7358}
7359
7360/// A helper trait for the `Dictionary` client sender.
7361pub trait DictionaryClientSender {
7362    type Transport: ::fidl_next::Transport;
7363}
7364
7365impl<___T> DictionaryClientSender for ::fidl_next::ClientSender<___T, Dictionary>
7366where
7367    ___T: ::fidl_next::Transport,
7368{
7369    type Transport = ___T;
7370}
7371
7372/// A client handler for the Dictionary protocol.
7373///
7374/// See [`Dictionary`] for more details.
7375pub trait DictionaryClientHandler<___T: ::fidl_next::Transport> {
7376    fn on_unknown_interaction(
7377        &mut self,
7378        sender: &::fidl_next::ClientSender<___T, Dictionary>,
7379        ordinal: u64,
7380    ) {
7381        sender.close();
7382    }
7383}
7384
7385impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Dictionary
7386where
7387    ___T: ::fidl_next::Transport,
7388    ___H: DictionaryClientHandler<___T>,
7389{
7390    fn on_event(
7391        handler: &mut ___H,
7392        sender: &::fidl_next::ClientSender<___T, Self>,
7393        ordinal: u64,
7394        buffer: ___T::RecvBuffer,
7395    ) {
7396        match ordinal {
7397            ordinal => handler.on_unknown_interaction(sender, ordinal),
7398        }
7399    }
7400}
7401
7402/// A helper trait for the `Dictionary` server sender.
7403pub trait DictionaryServerSender {
7404    type Transport: ::fidl_next::Transport;
7405}
7406
7407impl<___T> DictionaryServerSender for ::fidl_next::ServerSender<___T, Dictionary>
7408where
7409    ___T: ::fidl_next::Transport,
7410{
7411    type Transport = ___T;
7412}
7413
7414/// A server handler for the Dictionary protocol.
7415///
7416/// See [`Dictionary`] for more details.
7417pub trait DictionaryServerHandler<___T: ::fidl_next::Transport> {
7418    fn on_unknown_interaction(
7419        &mut self,
7420        sender: &::fidl_next::ServerSender<___T, Dictionary>,
7421        ordinal: u64,
7422    ) {
7423        sender.close();
7424    }
7425}
7426
7427impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Dictionary
7428where
7429    ___T: ::fidl_next::Transport,
7430    ___H: DictionaryServerHandler<___T>,
7431{
7432    fn on_one_way(
7433        handler: &mut ___H,
7434        sender: &::fidl_next::ServerSender<___T, Self>,
7435        ordinal: u64,
7436        buffer: ___T::RecvBuffer,
7437    ) {
7438        match ordinal {
7439            ordinal => handler.on_unknown_interaction(sender, ordinal),
7440        }
7441    }
7442
7443    fn on_two_way(
7444        handler: &mut ___H,
7445        sender: &::fidl_next::ServerSender<___T, Self>,
7446        ordinal: u64,
7447        buffer: ___T::RecvBuffer,
7448        responder: ::fidl_next::protocol::Responder,
7449    ) {
7450        match ordinal {
7451            ordinal => handler.on_unknown_interaction(sender, ordinal),
7452        }
7453    }
7454}
7455
7456#[derive(Clone, Debug)]
7457pub struct DictionaryDrainIteratorGetNextRequest {
7458    pub start_id: u64,
7459
7460    pub limit: u32,
7461}
7462
7463impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextRequest {
7464    type Encoded = WireDictionaryDrainIteratorGetNextRequest;
7465}
7466
7467unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextRequest
7468where
7469    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7470{
7471    #[inline]
7472    fn encode(
7473        &mut self,
7474        encoder: &mut ___E,
7475        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7476    ) -> Result<(), ::fidl_next::EncodeError> {
7477        ::fidl_next::munge! {
7478            let Self::Encoded {
7479                start_id,
7480                limit,
7481
7482            } = out;
7483        }
7484
7485        ::fidl_next::Encode::encode(&mut self.start_id, encoder, start_id)?;
7486
7487        ::fidl_next::Encode::encode(&mut self.limit, encoder, limit)?;
7488
7489        Ok(())
7490    }
7491}
7492
7493impl ::fidl_next::EncodableOption for Box<DictionaryDrainIteratorGetNextRequest> {
7494    type EncodedOption = ::fidl_next::WireBox<WireDictionaryDrainIteratorGetNextRequest>;
7495}
7496
7497unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryDrainIteratorGetNextRequest>
7498where
7499    ___E: ::fidl_next::Encoder + ?Sized,
7500    DictionaryDrainIteratorGetNextRequest: ::fidl_next::Encode<___E>,
7501{
7502    #[inline]
7503    fn encode_option(
7504        this: Option<&mut Self>,
7505        encoder: &mut ___E,
7506        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7507    ) -> Result<(), ::fidl_next::EncodeError> {
7508        if let Some(inner) = this {
7509            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7510            ::fidl_next::WireBox::encode_present(out);
7511        } else {
7512            ::fidl_next::WireBox::encode_absent(out);
7513        }
7514
7515        Ok(())
7516    }
7517}
7518
7519impl ::fidl_next::TakeFrom<WireDictionaryDrainIteratorGetNextRequest>
7520    for DictionaryDrainIteratorGetNextRequest
7521{
7522    #[inline]
7523    fn take_from(from: &WireDictionaryDrainIteratorGetNextRequest) -> Self {
7524        Self {
7525            start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
7526
7527            limit: ::fidl_next::TakeFrom::take_from(&from.limit),
7528        }
7529    }
7530}
7531
7532/// The wire type corresponding to [`DictionaryDrainIteratorGetNextRequest`].
7533#[derive(Clone, Debug)]
7534#[repr(C)]
7535pub struct WireDictionaryDrainIteratorGetNextRequest {
7536    pub start_id: ::fidl_next::WireU64,
7537
7538    pub limit: ::fidl_next::WireU32,
7539}
7540
7541unsafe impl ::fidl_next::ZeroPadding for WireDictionaryDrainIteratorGetNextRequest {
7542    #[inline]
7543    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7544        unsafe {
7545            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
7546        }
7547    }
7548}
7549
7550unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextRequest
7551where
7552    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7553{
7554    fn decode(
7555        slot: ::fidl_next::Slot<'_, Self>,
7556        decoder: &mut ___D,
7557    ) -> Result<(), ::fidl_next::DecodeError> {
7558        ::fidl_next::munge! {
7559            let Self {
7560                mut start_id,
7561                mut limit,
7562
7563            } = slot;
7564        }
7565
7566        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
7567
7568        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
7569
7570        Ok(())
7571    }
7572}
7573
7574#[doc = " Maximum number of items returned by dictionary iterator.\n"]
7575pub const MAX_DICTIONARY_ITERATOR_CHUNK: u32 = 128;
7576
7577#[derive(Debug)]
7578pub struct DictionaryDrainIteratorGetNextResponse {
7579    pub items: Vec<crate::DictionaryItem>,
7580
7581    pub end_id: u64,
7582}
7583
7584impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextResponse {
7585    type Encoded = WireDictionaryDrainIteratorGetNextResponse;
7586}
7587
7588unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextResponse
7589where
7590    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7591
7592    ___E: ::fidl_next::Encoder,
7593
7594    ___E: ::fidl_next::fuchsia::HandleEncoder,
7595{
7596    #[inline]
7597    fn encode(
7598        &mut self,
7599        encoder: &mut ___E,
7600        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7601    ) -> Result<(), ::fidl_next::EncodeError> {
7602        ::fidl_next::munge! {
7603            let Self::Encoded {
7604                items,
7605                end_id,
7606
7607            } = out;
7608        }
7609
7610        ::fidl_next::Encode::encode(&mut self.items, encoder, items)?;
7611
7612        ::fidl_next::Encode::encode(&mut self.end_id, encoder, end_id)?;
7613
7614        Ok(())
7615    }
7616}
7617
7618impl ::fidl_next::EncodableOption for Box<DictionaryDrainIteratorGetNextResponse> {
7619    type EncodedOption = ::fidl_next::WireBox<WireDictionaryDrainIteratorGetNextResponse>;
7620}
7621
7622unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryDrainIteratorGetNextResponse>
7623where
7624    ___E: ::fidl_next::Encoder + ?Sized,
7625    DictionaryDrainIteratorGetNextResponse: ::fidl_next::Encode<___E>,
7626{
7627    #[inline]
7628    fn encode_option(
7629        this: Option<&mut Self>,
7630        encoder: &mut ___E,
7631        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7632    ) -> Result<(), ::fidl_next::EncodeError> {
7633        if let Some(inner) = this {
7634            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7635            ::fidl_next::WireBox::encode_present(out);
7636        } else {
7637            ::fidl_next::WireBox::encode_absent(out);
7638        }
7639
7640        Ok(())
7641    }
7642}
7643
7644impl ::fidl_next::TakeFrom<WireDictionaryDrainIteratorGetNextResponse>
7645    for DictionaryDrainIteratorGetNextResponse
7646{
7647    #[inline]
7648    fn take_from(from: &WireDictionaryDrainIteratorGetNextResponse) -> Self {
7649        Self {
7650            items: ::fidl_next::TakeFrom::take_from(&from.items),
7651
7652            end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
7653        }
7654    }
7655}
7656
7657/// The wire type corresponding to [`DictionaryDrainIteratorGetNextResponse`].
7658#[derive(Debug)]
7659#[repr(C)]
7660pub struct WireDictionaryDrainIteratorGetNextResponse {
7661    pub items: ::fidl_next::WireVector<crate::WireDictionaryItem>,
7662
7663    pub end_id: ::fidl_next::WireU64,
7664}
7665
7666unsafe impl ::fidl_next::ZeroPadding for WireDictionaryDrainIteratorGetNextResponse {
7667    #[inline]
7668    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7669}
7670
7671unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextResponse
7672where
7673    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7674
7675    ___D: ::fidl_next::Decoder,
7676
7677    ___D: ::fidl_next::fuchsia::HandleDecoder,
7678{
7679    fn decode(
7680        slot: ::fidl_next::Slot<'_, Self>,
7681        decoder: &mut ___D,
7682    ) -> Result<(), ::fidl_next::DecodeError> {
7683        ::fidl_next::munge! {
7684            let Self {
7685                mut items,
7686                mut end_id,
7687
7688            } = slot;
7689        }
7690
7691        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
7692
7693        let items = unsafe { items.deref_unchecked() };
7694
7695        if items.len() > 128 {
7696            return Err(::fidl_next::DecodeError::VectorTooLong {
7697                size: items.len() as u64,
7698                limit: 128,
7699            });
7700        }
7701
7702        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
7703
7704        Ok(())
7705    }
7706}
7707
7708/// The type corresponding to the DictionaryDrainIterator protocol.
7709#[derive(Debug)]
7710pub struct DictionaryDrainIterator;
7711
7712pub mod dictionary_drain_iterator {
7713    pub mod prelude {
7714        pub use crate::{
7715            dictionary_drain_iterator, DictionaryDrainIterator,
7716            DictionaryDrainIteratorClientHandler, DictionaryDrainIteratorClientSender,
7717            DictionaryDrainIteratorServerHandler, DictionaryDrainIteratorServerSender,
7718        };
7719
7720        pub use crate::CapabilityStoreError;
7721
7722        pub use crate::DictionaryDrainIteratorGetNextRequest;
7723
7724        pub use crate::DictionaryDrainIteratorGetNextResponse;
7725    }
7726
7727    pub struct GetNext;
7728
7729    impl ::fidl_next::Method for GetNext {
7730        const ORDINAL: u64 = 5728722530628427873;
7731
7732        type Protocol = crate::DictionaryDrainIterator;
7733
7734        type Request = crate::WireDictionaryDrainIteratorGetNextRequest;
7735
7736        type Response = ::fidl_next::WireFlexibleResult<
7737            crate::WireDictionaryDrainIteratorGetNextResponse,
7738            crate::WireCapabilityStoreError,
7739        >;
7740    }
7741}
7742
7743/// A helper trait for the `DictionaryDrainIterator` client sender.
7744pub trait DictionaryDrainIteratorClientSender {
7745    type Transport: ::fidl_next::Transport;
7746
7747    #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
7748    fn get_next<___R>(
7749        &self,
7750        request: &mut ___R,
7751    ) -> Result<
7752        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_drain_iterator::GetNext>,
7753        ::fidl_next::EncodeError,
7754    >
7755    where
7756        ___R: ::fidl_next::Encode<
7757            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7758            Encoded = crate::WireDictionaryDrainIteratorGetNextRequest,
7759        >;
7760}
7761
7762impl<___T> DictionaryDrainIteratorClientSender
7763    for ::fidl_next::ClientSender<___T, DictionaryDrainIterator>
7764where
7765    ___T: ::fidl_next::Transport,
7766{
7767    type Transport = ___T;
7768
7769    #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
7770    fn get_next<___R>(
7771        &self,
7772        request: &mut ___R,
7773    ) -> Result<
7774        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_drain_iterator::GetNext>,
7775        ::fidl_next::EncodeError,
7776    >
7777    where
7778        ___R: ::fidl_next::Encode<
7779            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7780            Encoded = crate::WireDictionaryDrainIteratorGetNextRequest,
7781        >,
7782    {
7783        self.as_untyped()
7784            .send_two_way(5728722530628427873, request)
7785            .map(::fidl_next::ResponseFuture::from_untyped)
7786    }
7787}
7788
7789/// A client handler for the DictionaryDrainIterator protocol.
7790///
7791/// See [`DictionaryDrainIterator`] for more details.
7792pub trait DictionaryDrainIteratorClientHandler<___T: ::fidl_next::Transport> {
7793    fn on_unknown_interaction(
7794        &mut self,
7795        sender: &::fidl_next::ClientSender<___T, DictionaryDrainIterator>,
7796        ordinal: u64,
7797    ) {
7798        sender.close();
7799    }
7800}
7801
7802impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryDrainIterator
7803where
7804    ___T: ::fidl_next::Transport,
7805    ___H: DictionaryDrainIteratorClientHandler<___T>,
7806
7807    <dictionary_drain_iterator::GetNext as ::fidl_next::Method>::Response:
7808        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7809{
7810    fn on_event(
7811        handler: &mut ___H,
7812        sender: &::fidl_next::ClientSender<___T, Self>,
7813        ordinal: u64,
7814        buffer: ___T::RecvBuffer,
7815    ) {
7816        match ordinal {
7817            ordinal => handler.on_unknown_interaction(sender, ordinal),
7818        }
7819    }
7820}
7821
7822/// A helper trait for the `DictionaryDrainIterator` server sender.
7823pub trait DictionaryDrainIteratorServerSender {
7824    type Transport: ::fidl_next::Transport;
7825}
7826
7827impl<___T> DictionaryDrainIteratorServerSender
7828    for ::fidl_next::ServerSender<___T, DictionaryDrainIterator>
7829where
7830    ___T: ::fidl_next::Transport,
7831{
7832    type Transport = ___T;
7833}
7834
7835/// A server handler for the DictionaryDrainIterator protocol.
7836///
7837/// See [`DictionaryDrainIterator`] for more details.
7838pub trait DictionaryDrainIteratorServerHandler<___T: ::fidl_next::Transport> {
7839    #[doc = " Returns the next batch of results for a [Dictionary.Drain] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
7840    fn get_next(
7841        &mut self,
7842        sender: &::fidl_next::ServerSender<___T, DictionaryDrainIterator>,
7843
7844        request: ::fidl_next::Request<___T, dictionary_drain_iterator::GetNext>,
7845
7846        responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext>,
7847    );
7848
7849    fn on_unknown_interaction(
7850        &mut self,
7851        sender: &::fidl_next::ServerSender<___T, DictionaryDrainIterator>,
7852        ordinal: u64,
7853    ) {
7854        sender.close();
7855    }
7856}
7857
7858impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryDrainIterator
7859where
7860    ___T: ::fidl_next::Transport,
7861    ___H: DictionaryDrainIteratorServerHandler<___T>,
7862
7863    crate::WireDictionaryDrainIteratorGetNextRequest:
7864        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7865{
7866    fn on_one_way(
7867        handler: &mut ___H,
7868        sender: &::fidl_next::ServerSender<___T, Self>,
7869        ordinal: u64,
7870        buffer: ___T::RecvBuffer,
7871    ) {
7872        match ordinal {
7873            ordinal => handler.on_unknown_interaction(sender, ordinal),
7874        }
7875    }
7876
7877    fn on_two_way(
7878        handler: &mut ___H,
7879        sender: &::fidl_next::ServerSender<___T, Self>,
7880        ordinal: u64,
7881        buffer: ___T::RecvBuffer,
7882        responder: ::fidl_next::protocol::Responder,
7883    ) {
7884        match ordinal {
7885            5728722530628427873 => {
7886                let responder = ::fidl_next::Responder::from_untyped(responder);
7887
7888                match ::fidl_next::DecoderExt::decode(buffer) {
7889                    Ok(decoded) => handler.get_next(sender, decoded, responder),
7890                    Err(e) => {
7891                        sender.close();
7892                    }
7893                }
7894            }
7895
7896            ordinal => handler.on_unknown_interaction(sender, ordinal),
7897        }
7898    }
7899}
7900
7901#[derive(Clone, Debug)]
7902pub struct DictionaryEnumerateIteratorGetNextRequest {
7903    pub start_id: u64,
7904
7905    pub limit: u32,
7906}
7907
7908impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextRequest {
7909    type Encoded = WireDictionaryEnumerateIteratorGetNextRequest;
7910}
7911
7912unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextRequest
7913where
7914    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7915{
7916    #[inline]
7917    fn encode(
7918        &mut self,
7919        encoder: &mut ___E,
7920        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7921    ) -> Result<(), ::fidl_next::EncodeError> {
7922        ::fidl_next::munge! {
7923            let Self::Encoded {
7924                start_id,
7925                limit,
7926
7927            } = out;
7928        }
7929
7930        ::fidl_next::Encode::encode(&mut self.start_id, encoder, start_id)?;
7931
7932        ::fidl_next::Encode::encode(&mut self.limit, encoder, limit)?;
7933
7934        Ok(())
7935    }
7936}
7937
7938impl ::fidl_next::EncodableOption for Box<DictionaryEnumerateIteratorGetNextRequest> {
7939    type EncodedOption = ::fidl_next::WireBox<WireDictionaryEnumerateIteratorGetNextRequest>;
7940}
7941
7942unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryEnumerateIteratorGetNextRequest>
7943where
7944    ___E: ::fidl_next::Encoder + ?Sized,
7945    DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Encode<___E>,
7946{
7947    #[inline]
7948    fn encode_option(
7949        this: Option<&mut Self>,
7950        encoder: &mut ___E,
7951        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7952    ) -> Result<(), ::fidl_next::EncodeError> {
7953        if let Some(inner) = this {
7954            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7955            ::fidl_next::WireBox::encode_present(out);
7956        } else {
7957            ::fidl_next::WireBox::encode_absent(out);
7958        }
7959
7960        Ok(())
7961    }
7962}
7963
7964impl ::fidl_next::TakeFrom<WireDictionaryEnumerateIteratorGetNextRequest>
7965    for DictionaryEnumerateIteratorGetNextRequest
7966{
7967    #[inline]
7968    fn take_from(from: &WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
7969        Self {
7970            start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
7971
7972            limit: ::fidl_next::TakeFrom::take_from(&from.limit),
7973        }
7974    }
7975}
7976
7977/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextRequest`].
7978#[derive(Clone, Debug)]
7979#[repr(C)]
7980pub struct WireDictionaryEnumerateIteratorGetNextRequest {
7981    pub start_id: ::fidl_next::WireU64,
7982
7983    pub limit: ::fidl_next::WireU32,
7984}
7985
7986unsafe impl ::fidl_next::ZeroPadding for WireDictionaryEnumerateIteratorGetNextRequest {
7987    #[inline]
7988    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7989        unsafe {
7990            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
7991        }
7992    }
7993}
7994
7995unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryEnumerateIteratorGetNextRequest
7996where
7997    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7998{
7999    fn decode(
8000        slot: ::fidl_next::Slot<'_, Self>,
8001        decoder: &mut ___D,
8002    ) -> Result<(), ::fidl_next::DecodeError> {
8003        ::fidl_next::munge! {
8004            let Self {
8005                mut start_id,
8006                mut limit,
8007
8008            } = slot;
8009        }
8010
8011        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
8012
8013        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
8014
8015        Ok(())
8016    }
8017}
8018
8019#[doc = " A key-value pair in a [`DictionaryRef`], where the value may be elided.\n This is useful for APIs that may wish to omit the value, for example if it could not be\n duplicated.\n"]
8020#[derive(Debug)]
8021pub struct DictionaryOptionalItem {
8022    pub key: String,
8023
8024    pub value: Option<Box<crate::WrappedCapabilityId>>,
8025}
8026
8027impl ::fidl_next::Encodable for DictionaryOptionalItem {
8028    type Encoded = WireDictionaryOptionalItem;
8029}
8030
8031unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryOptionalItem
8032where
8033    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8034
8035    ___E: ::fidl_next::Encoder,
8036
8037    ___E: ::fidl_next::fuchsia::HandleEncoder,
8038{
8039    #[inline]
8040    fn encode(
8041        &mut self,
8042        encoder: &mut ___E,
8043        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8044    ) -> Result<(), ::fidl_next::EncodeError> {
8045        ::fidl_next::munge! {
8046            let Self::Encoded {
8047                key,
8048                value,
8049
8050            } = out;
8051        }
8052
8053        ::fidl_next::Encode::encode(&mut self.key, encoder, key)?;
8054
8055        ::fidl_next::Encode::encode(&mut self.value, encoder, value)?;
8056
8057        Ok(())
8058    }
8059}
8060
8061impl ::fidl_next::EncodableOption for Box<DictionaryOptionalItem> {
8062    type EncodedOption = ::fidl_next::WireBox<WireDictionaryOptionalItem>;
8063}
8064
8065unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryOptionalItem>
8066where
8067    ___E: ::fidl_next::Encoder + ?Sized,
8068    DictionaryOptionalItem: ::fidl_next::Encode<___E>,
8069{
8070    #[inline]
8071    fn encode_option(
8072        this: Option<&mut Self>,
8073        encoder: &mut ___E,
8074        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8075    ) -> Result<(), ::fidl_next::EncodeError> {
8076        if let Some(inner) = this {
8077            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8078            ::fidl_next::WireBox::encode_present(out);
8079        } else {
8080            ::fidl_next::WireBox::encode_absent(out);
8081        }
8082
8083        Ok(())
8084    }
8085}
8086
8087impl ::fidl_next::TakeFrom<WireDictionaryOptionalItem> for DictionaryOptionalItem {
8088    #[inline]
8089    fn take_from(from: &WireDictionaryOptionalItem) -> Self {
8090        Self {
8091            key: ::fidl_next::TakeFrom::take_from(&from.key),
8092
8093            value: ::fidl_next::TakeFrom::take_from(&from.value),
8094        }
8095    }
8096}
8097
8098/// The wire type corresponding to [`DictionaryOptionalItem`].
8099#[derive(Debug)]
8100#[repr(C)]
8101pub struct WireDictionaryOptionalItem {
8102    pub key: ::fidl_next::WireString,
8103
8104    pub value: ::fidl_next::WireBox<crate::WireWrappedCapabilityId>,
8105}
8106
8107unsafe impl ::fidl_next::ZeroPadding for WireDictionaryOptionalItem {
8108    #[inline]
8109    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8110}
8111
8112unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryOptionalItem
8113where
8114    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8115
8116    ___D: ::fidl_next::Decoder,
8117
8118    ___D: ::fidl_next::fuchsia::HandleDecoder,
8119{
8120    fn decode(
8121        slot: ::fidl_next::Slot<'_, Self>,
8122        decoder: &mut ___D,
8123    ) -> Result<(), ::fidl_next::DecodeError> {
8124        ::fidl_next::munge! {
8125            let Self {
8126                mut key,
8127                mut value,
8128
8129            } = slot;
8130        }
8131
8132        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
8133
8134        let key = unsafe { key.deref_unchecked() };
8135
8136        if key.len() > 255 {
8137            return Err(::fidl_next::DecodeError::VectorTooLong {
8138                size: key.len() as u64,
8139                limit: 255,
8140            });
8141        }
8142
8143        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
8144
8145        Ok(())
8146    }
8147}
8148
8149#[derive(Debug)]
8150pub struct DictionaryEnumerateIteratorGetNextResponse {
8151    pub items: Vec<crate::DictionaryOptionalItem>,
8152
8153    pub end_id: u64,
8154}
8155
8156impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextResponse {
8157    type Encoded = WireDictionaryEnumerateIteratorGetNextResponse;
8158}
8159
8160unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextResponse
8161where
8162    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8163
8164    ___E: ::fidl_next::Encoder,
8165
8166    ___E: ::fidl_next::fuchsia::HandleEncoder,
8167{
8168    #[inline]
8169    fn encode(
8170        &mut self,
8171        encoder: &mut ___E,
8172        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8173    ) -> Result<(), ::fidl_next::EncodeError> {
8174        ::fidl_next::munge! {
8175            let Self::Encoded {
8176                items,
8177                end_id,
8178
8179            } = out;
8180        }
8181
8182        ::fidl_next::Encode::encode(&mut self.items, encoder, items)?;
8183
8184        ::fidl_next::Encode::encode(&mut self.end_id, encoder, end_id)?;
8185
8186        Ok(())
8187    }
8188}
8189
8190impl ::fidl_next::EncodableOption for Box<DictionaryEnumerateIteratorGetNextResponse> {
8191    type EncodedOption = ::fidl_next::WireBox<WireDictionaryEnumerateIteratorGetNextResponse>;
8192}
8193
8194unsafe impl<___E> ::fidl_next::EncodeOption<___E>
8195    for Box<DictionaryEnumerateIteratorGetNextResponse>
8196where
8197    ___E: ::fidl_next::Encoder + ?Sized,
8198    DictionaryEnumerateIteratorGetNextResponse: ::fidl_next::Encode<___E>,
8199{
8200    #[inline]
8201    fn encode_option(
8202        this: Option<&mut Self>,
8203        encoder: &mut ___E,
8204        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8205    ) -> Result<(), ::fidl_next::EncodeError> {
8206        if let Some(inner) = this {
8207            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8208            ::fidl_next::WireBox::encode_present(out);
8209        } else {
8210            ::fidl_next::WireBox::encode_absent(out);
8211        }
8212
8213        Ok(())
8214    }
8215}
8216
8217impl ::fidl_next::TakeFrom<WireDictionaryEnumerateIteratorGetNextResponse>
8218    for DictionaryEnumerateIteratorGetNextResponse
8219{
8220    #[inline]
8221    fn take_from(from: &WireDictionaryEnumerateIteratorGetNextResponse) -> Self {
8222        Self {
8223            items: ::fidl_next::TakeFrom::take_from(&from.items),
8224
8225            end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
8226        }
8227    }
8228}
8229
8230/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextResponse`].
8231#[derive(Debug)]
8232#[repr(C)]
8233pub struct WireDictionaryEnumerateIteratorGetNextResponse {
8234    pub items: ::fidl_next::WireVector<crate::WireDictionaryOptionalItem>,
8235
8236    pub end_id: ::fidl_next::WireU64,
8237}
8238
8239unsafe impl ::fidl_next::ZeroPadding for WireDictionaryEnumerateIteratorGetNextResponse {
8240    #[inline]
8241    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8242}
8243
8244unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryEnumerateIteratorGetNextResponse
8245where
8246    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8247
8248    ___D: ::fidl_next::Decoder,
8249
8250    ___D: ::fidl_next::fuchsia::HandleDecoder,
8251{
8252    fn decode(
8253        slot: ::fidl_next::Slot<'_, Self>,
8254        decoder: &mut ___D,
8255    ) -> Result<(), ::fidl_next::DecodeError> {
8256        ::fidl_next::munge! {
8257            let Self {
8258                mut items,
8259                mut end_id,
8260
8261            } = slot;
8262        }
8263
8264        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
8265
8266        let items = unsafe { items.deref_unchecked() };
8267
8268        if items.len() > 128 {
8269            return Err(::fidl_next::DecodeError::VectorTooLong {
8270                size: items.len() as u64,
8271                limit: 128,
8272            });
8273        }
8274
8275        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
8276
8277        Ok(())
8278    }
8279}
8280
8281/// The type corresponding to the DictionaryEnumerateIterator protocol.
8282#[derive(Debug)]
8283pub struct DictionaryEnumerateIterator;
8284
8285pub mod dictionary_enumerate_iterator {
8286    pub mod prelude {
8287        pub use crate::{
8288            dictionary_enumerate_iterator, DictionaryEnumerateIterator,
8289            DictionaryEnumerateIteratorClientHandler, DictionaryEnumerateIteratorClientSender,
8290            DictionaryEnumerateIteratorServerHandler, DictionaryEnumerateIteratorServerSender,
8291        };
8292
8293        pub use crate::CapabilityStoreError;
8294
8295        pub use crate::DictionaryEnumerateIteratorGetNextRequest;
8296
8297        pub use crate::DictionaryEnumerateIteratorGetNextResponse;
8298    }
8299
8300    pub struct GetNext;
8301
8302    impl ::fidl_next::Method for GetNext {
8303        const ORDINAL: u64 = 1511164556663256527;
8304
8305        type Protocol = crate::DictionaryEnumerateIterator;
8306
8307        type Request = crate::WireDictionaryEnumerateIteratorGetNextRequest;
8308
8309        type Response = ::fidl_next::WireFlexibleResult<
8310            crate::WireDictionaryEnumerateIteratorGetNextResponse,
8311            crate::WireCapabilityStoreError,
8312        >;
8313    }
8314}
8315
8316/// A helper trait for the `DictionaryEnumerateIterator` client sender.
8317pub trait DictionaryEnumerateIteratorClientSender {
8318    type Transport: ::fidl_next::Transport;
8319
8320    #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
8321    fn get_next<___R>(
8322        &self,
8323        request: &mut ___R,
8324    ) -> Result<
8325        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_enumerate_iterator::GetNext>,
8326        ::fidl_next::EncodeError,
8327    >
8328    where
8329        ___R: ::fidl_next::Encode<
8330            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
8331            Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest,
8332        >;
8333}
8334
8335impl<___T> DictionaryEnumerateIteratorClientSender
8336    for ::fidl_next::ClientSender<___T, DictionaryEnumerateIterator>
8337where
8338    ___T: ::fidl_next::Transport,
8339{
8340    type Transport = ___T;
8341
8342    #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
8343    fn get_next<___R>(
8344        &self,
8345        request: &mut ___R,
8346    ) -> Result<
8347        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_enumerate_iterator::GetNext>,
8348        ::fidl_next::EncodeError,
8349    >
8350    where
8351        ___R: ::fidl_next::Encode<
8352            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
8353            Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest,
8354        >,
8355    {
8356        self.as_untyped()
8357            .send_two_way(1511164556663256527, request)
8358            .map(::fidl_next::ResponseFuture::from_untyped)
8359    }
8360}
8361
8362/// A client handler for the DictionaryEnumerateIterator protocol.
8363///
8364/// See [`DictionaryEnumerateIterator`] for more details.
8365pub trait DictionaryEnumerateIteratorClientHandler<___T: ::fidl_next::Transport> {
8366    fn on_unknown_interaction(
8367        &mut self,
8368        sender: &::fidl_next::ClientSender<___T, DictionaryEnumerateIterator>,
8369        ordinal: u64,
8370    ) {
8371        sender.close();
8372    }
8373}
8374
8375impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryEnumerateIterator
8376where
8377    ___T: ::fidl_next::Transport,
8378    ___H: DictionaryEnumerateIteratorClientHandler<___T>,
8379
8380    <dictionary_enumerate_iterator::GetNext as ::fidl_next::Method>::Response:
8381        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8382{
8383    fn on_event(
8384        handler: &mut ___H,
8385        sender: &::fidl_next::ClientSender<___T, Self>,
8386        ordinal: u64,
8387        buffer: ___T::RecvBuffer,
8388    ) {
8389        match ordinal {
8390            ordinal => handler.on_unknown_interaction(sender, ordinal),
8391        }
8392    }
8393}
8394
8395/// A helper trait for the `DictionaryEnumerateIterator` server sender.
8396pub trait DictionaryEnumerateIteratorServerSender {
8397    type Transport: ::fidl_next::Transport;
8398}
8399
8400impl<___T> DictionaryEnumerateIteratorServerSender
8401    for ::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>
8402where
8403    ___T: ::fidl_next::Transport,
8404{
8405    type Transport = ___T;
8406}
8407
8408/// A server handler for the DictionaryEnumerateIterator protocol.
8409///
8410/// See [`DictionaryEnumerateIterator`] for more details.
8411pub trait DictionaryEnumerateIteratorServerHandler<___T: ::fidl_next::Transport> {
8412    #[doc = " Returns the next batch of results for a [Dictionary.Enumerate] call, returning up to\n `limit` results. `limit` can be at most [MAX_DICTIONARY_ITERATOR_CHUNK].\n\n The value of each of `items` is a duplicate of the original capability\n ([CapabilityStore.Duplicate]), unless it could not be duplicated, it which case it will\n be null.\n\n Each returned capability will be assigned a monotonically increasing [CapabilityId] starting\n from `start_id`.\n\n In addition to the `items`, returns `end_id`, which is one more than the highest id reserved\n by [GetNext]. `end_id` can be used as the `start_id` for the next call to [GetNext].\n\n If [GetNext] returns an error, the server will also close the channel.\n\n Errors:\n\n - `ID_ALREADY_EXISTS` if some id in the range `[start_id, limit)` already exists in this\n   store.\n - `INVALID_ARGS` if `limit` was `0` or greater than `MAX_DICTIONARY_ITERATOR_CHUNK`.\n"]
8413    fn get_next(
8414        &mut self,
8415        sender: &::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>,
8416
8417        request: ::fidl_next::Request<___T, dictionary_enumerate_iterator::GetNext>,
8418
8419        responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext>,
8420    );
8421
8422    fn on_unknown_interaction(
8423        &mut self,
8424        sender: &::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>,
8425        ordinal: u64,
8426    ) {
8427        sender.close();
8428    }
8429}
8430
8431impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryEnumerateIterator
8432where
8433    ___T: ::fidl_next::Transport,
8434    ___H: DictionaryEnumerateIteratorServerHandler<___T>,
8435
8436    crate::WireDictionaryEnumerateIteratorGetNextRequest:
8437        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8438{
8439    fn on_one_way(
8440        handler: &mut ___H,
8441        sender: &::fidl_next::ServerSender<___T, Self>,
8442        ordinal: u64,
8443        buffer: ___T::RecvBuffer,
8444    ) {
8445        match ordinal {
8446            ordinal => handler.on_unknown_interaction(sender, ordinal),
8447        }
8448    }
8449
8450    fn on_two_way(
8451        handler: &mut ___H,
8452        sender: &::fidl_next::ServerSender<___T, Self>,
8453        ordinal: u64,
8454        buffer: ___T::RecvBuffer,
8455        responder: ::fidl_next::protocol::Responder,
8456    ) {
8457        match ordinal {
8458            1511164556663256527 => {
8459                let responder = ::fidl_next::Responder::from_untyped(responder);
8460
8461                match ::fidl_next::DecoderExt::decode(buffer) {
8462                    Ok(decoded) => handler.get_next(sender, decoded, responder),
8463                    Err(e) => {
8464                        sender.close();
8465                    }
8466                }
8467            }
8468
8469            ordinal => handler.on_unknown_interaction(sender, ordinal),
8470        }
8471    }
8472}
8473
8474#[doc = " Error returned from [CapabilityStore/Dictionary*] methods.\n"]
8475#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8476#[repr(u32)]
8477pub enum DictionaryError {
8478    NotFound = 1,
8479    AlreadyExists = 2,
8480    BadCapability = 3,
8481    InvalidKey = 4,
8482    NotCloneable = 5,
8483    UnknownOrdinal_(u32),
8484}
8485
8486impl ::fidl_next::Encodable for DictionaryError {
8487    type Encoded = WireDictionaryError;
8488}
8489impl ::std::convert::From<u32> for DictionaryError {
8490    fn from(value: u32) -> Self {
8491        match value {
8492            1 => Self::NotFound,
8493            2 => Self::AlreadyExists,
8494            3 => Self::BadCapability,
8495            4 => Self::InvalidKey,
8496            5 => Self::NotCloneable,
8497
8498            _ => Self::UnknownOrdinal_(value),
8499        }
8500    }
8501}
8502
8503unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryError
8504where
8505    ___E: ?Sized,
8506{
8507    #[inline]
8508    fn encode(
8509        &mut self,
8510        _: &mut ___E,
8511        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8512    ) -> Result<(), ::fidl_next::EncodeError> {
8513        ::fidl_next::munge!(let WireDictionaryError { value } = out);
8514        let _ = value.write(::fidl_next::WireU32::from(match *self {
8515            Self::NotFound => 1,
8516
8517            Self::AlreadyExists => 2,
8518
8519            Self::BadCapability => 3,
8520
8521            Self::InvalidKey => 4,
8522
8523            Self::NotCloneable => 5,
8524
8525            Self::UnknownOrdinal_(value) => value,
8526        }));
8527
8528        Ok(())
8529    }
8530}
8531
8532impl ::core::convert::From<WireDictionaryError> for DictionaryError {
8533    fn from(wire: WireDictionaryError) -> Self {
8534        match u32::from(wire.value) {
8535            1 => Self::NotFound,
8536
8537            2 => Self::AlreadyExists,
8538
8539            3 => Self::BadCapability,
8540
8541            4 => Self::InvalidKey,
8542
8543            5 => Self::NotCloneable,
8544
8545            value => Self::UnknownOrdinal_(value),
8546        }
8547    }
8548}
8549
8550impl ::fidl_next::TakeFrom<WireDictionaryError> for DictionaryError {
8551    #[inline]
8552    fn take_from(from: &WireDictionaryError) -> Self {
8553        Self::from(*from)
8554    }
8555}
8556
8557/// The wire type corresponding to [`DictionaryError`].
8558#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8559#[repr(transparent)]
8560pub struct WireDictionaryError {
8561    value: ::fidl_next::WireU32,
8562}
8563
8564unsafe impl ::fidl_next::ZeroPadding for WireDictionaryError {
8565    #[inline]
8566    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8567        // Wire enums have no padding
8568    }
8569}
8570
8571impl WireDictionaryError {
8572    pub const NOT_FOUND: WireDictionaryError =
8573        WireDictionaryError { value: ::fidl_next::WireU32(1) };
8574
8575    pub const ALREADY_EXISTS: WireDictionaryError =
8576        WireDictionaryError { value: ::fidl_next::WireU32(2) };
8577
8578    pub const BAD_CAPABILITY: WireDictionaryError =
8579        WireDictionaryError { value: ::fidl_next::WireU32(3) };
8580
8581    pub const INVALID_KEY: WireDictionaryError =
8582        WireDictionaryError { value: ::fidl_next::WireU32(4) };
8583
8584    pub const NOT_CLONEABLE: WireDictionaryError =
8585        WireDictionaryError { value: ::fidl_next::WireU32(5) };
8586}
8587
8588unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryError
8589where
8590    ___D: ?Sized,
8591{
8592    fn decode(
8593        slot: ::fidl_next::Slot<'_, Self>,
8594        _: &mut ___D,
8595    ) -> Result<(), ::fidl_next::DecodeError> {
8596        Ok(())
8597    }
8598}
8599
8600impl ::core::convert::From<DictionaryError> for WireDictionaryError {
8601    fn from(natural: DictionaryError) -> Self {
8602        match natural {
8603            DictionaryError::NotFound => WireDictionaryError::NOT_FOUND,
8604
8605            DictionaryError::AlreadyExists => WireDictionaryError::ALREADY_EXISTS,
8606
8607            DictionaryError::BadCapability => WireDictionaryError::BAD_CAPABILITY,
8608
8609            DictionaryError::InvalidKey => WireDictionaryError::INVALID_KEY,
8610
8611            DictionaryError::NotCloneable => WireDictionaryError::NOT_CLONEABLE,
8612
8613            DictionaryError::UnknownOrdinal_(value) => {
8614                WireDictionaryError { value: ::fidl_next::WireU32::from(value) }
8615            }
8616        }
8617    }
8618}
8619
8620#[derive(Debug)]
8621pub struct DictionaryKeysIteratorGetNextResponse {
8622    pub keys: Vec<String>,
8623}
8624
8625impl ::fidl_next::Encodable for DictionaryKeysIteratorGetNextResponse {
8626    type Encoded = WireDictionaryKeysIteratorGetNextResponse;
8627}
8628
8629unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryKeysIteratorGetNextResponse
8630where
8631    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8632
8633    ___E: ::fidl_next::Encoder,
8634
8635    ___E: ::fidl_next::fuchsia::HandleEncoder,
8636{
8637    #[inline]
8638    fn encode(
8639        &mut self,
8640        encoder: &mut ___E,
8641        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8642    ) -> Result<(), ::fidl_next::EncodeError> {
8643        ::fidl_next::munge! {
8644            let Self::Encoded {
8645                keys,
8646
8647            } = out;
8648        }
8649
8650        ::fidl_next::Encode::encode(&mut self.keys, encoder, keys)?;
8651
8652        Ok(())
8653    }
8654}
8655
8656impl ::fidl_next::EncodableOption for Box<DictionaryKeysIteratorGetNextResponse> {
8657    type EncodedOption = ::fidl_next::WireBox<WireDictionaryKeysIteratorGetNextResponse>;
8658}
8659
8660unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryKeysIteratorGetNextResponse>
8661where
8662    ___E: ::fidl_next::Encoder + ?Sized,
8663    DictionaryKeysIteratorGetNextResponse: ::fidl_next::Encode<___E>,
8664{
8665    #[inline]
8666    fn encode_option(
8667        this: Option<&mut Self>,
8668        encoder: &mut ___E,
8669        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8670    ) -> Result<(), ::fidl_next::EncodeError> {
8671        if let Some(inner) = this {
8672            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8673            ::fidl_next::WireBox::encode_present(out);
8674        } else {
8675            ::fidl_next::WireBox::encode_absent(out);
8676        }
8677
8678        Ok(())
8679    }
8680}
8681
8682impl ::fidl_next::TakeFrom<WireDictionaryKeysIteratorGetNextResponse>
8683    for DictionaryKeysIteratorGetNextResponse
8684{
8685    #[inline]
8686    fn take_from(from: &WireDictionaryKeysIteratorGetNextResponse) -> Self {
8687        Self { keys: ::fidl_next::TakeFrom::take_from(&from.keys) }
8688    }
8689}
8690
8691/// The wire type corresponding to [`DictionaryKeysIteratorGetNextResponse`].
8692#[derive(Debug)]
8693#[repr(C)]
8694pub struct WireDictionaryKeysIteratorGetNextResponse {
8695    pub keys: ::fidl_next::WireVector<::fidl_next::WireString>,
8696}
8697
8698unsafe impl ::fidl_next::ZeroPadding for WireDictionaryKeysIteratorGetNextResponse {
8699    #[inline]
8700    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8701}
8702
8703unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryKeysIteratorGetNextResponse
8704where
8705    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8706
8707    ___D: ::fidl_next::Decoder,
8708
8709    ___D: ::fidl_next::fuchsia::HandleDecoder,
8710{
8711    fn decode(
8712        slot: ::fidl_next::Slot<'_, Self>,
8713        decoder: &mut ___D,
8714    ) -> Result<(), ::fidl_next::DecodeError> {
8715        ::fidl_next::munge! {
8716            let Self {
8717                mut keys,
8718
8719            } = slot;
8720        }
8721
8722        ::fidl_next::Decode::decode(keys.as_mut(), decoder)?;
8723
8724        let keys = unsafe { keys.deref_unchecked() };
8725
8726        if keys.len() > 128 {
8727            return Err(::fidl_next::DecodeError::VectorTooLong {
8728                size: keys.len() as u64,
8729                limit: 128,
8730            });
8731        }
8732
8733        Ok(())
8734    }
8735}
8736
8737/// The type corresponding to the DictionaryKeysIterator protocol.
8738#[derive(Debug)]
8739pub struct DictionaryKeysIterator;
8740
8741pub mod dictionary_keys_iterator {
8742    pub mod prelude {
8743        pub use crate::{
8744            dictionary_keys_iterator, DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
8745            DictionaryKeysIteratorClientSender, DictionaryKeysIteratorServerHandler,
8746            DictionaryKeysIteratorServerSender,
8747        };
8748
8749        pub use crate::DictionaryKeysIteratorGetNextResponse;
8750    }
8751
8752    pub struct GetNext;
8753
8754    impl ::fidl_next::Method for GetNext {
8755        const ORDINAL: u64 = 4987781442555247955;
8756
8757        type Protocol = crate::DictionaryKeysIterator;
8758
8759        type Request = ();
8760
8761        type Response = ::fidl_next::WireFlexible<crate::WireDictionaryKeysIteratorGetNextResponse>;
8762    }
8763}
8764
8765/// A helper trait for the `DictionaryKeysIterator` client sender.
8766pub trait DictionaryKeysIteratorClientSender {
8767    type Transport: ::fidl_next::Transport;
8768
8769    fn get_next(
8770        &self,
8771    ) -> Result<
8772        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_keys_iterator::GetNext>,
8773        ::fidl_next::EncodeError,
8774    >;
8775}
8776
8777impl<___T> DictionaryKeysIteratorClientSender
8778    for ::fidl_next::ClientSender<___T, DictionaryKeysIterator>
8779where
8780    ___T: ::fidl_next::Transport,
8781{
8782    type Transport = ___T;
8783
8784    fn get_next(
8785        &self,
8786    ) -> Result<
8787        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_keys_iterator::GetNext>,
8788        ::fidl_next::EncodeError,
8789    > {
8790        self.as_untyped()
8791            .send_two_way(4987781442555247955, &mut ())
8792            .map(::fidl_next::ResponseFuture::from_untyped)
8793    }
8794}
8795
8796/// A client handler for the DictionaryKeysIterator protocol.
8797///
8798/// See [`DictionaryKeysIterator`] for more details.
8799pub trait DictionaryKeysIteratorClientHandler<___T: ::fidl_next::Transport> {
8800    fn on_unknown_interaction(
8801        &mut self,
8802        sender: &::fidl_next::ClientSender<___T, DictionaryKeysIterator>,
8803        ordinal: u64,
8804    ) {
8805        sender.close();
8806    }
8807}
8808
8809impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryKeysIterator
8810where
8811    ___T: ::fidl_next::Transport,
8812    ___H: DictionaryKeysIteratorClientHandler<___T>,
8813
8814    <dictionary_keys_iterator::GetNext as ::fidl_next::Method>::Response:
8815        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8816{
8817    fn on_event(
8818        handler: &mut ___H,
8819        sender: &::fidl_next::ClientSender<___T, Self>,
8820        ordinal: u64,
8821        buffer: ___T::RecvBuffer,
8822    ) {
8823        match ordinal {
8824            ordinal => handler.on_unknown_interaction(sender, ordinal),
8825        }
8826    }
8827}
8828
8829/// A helper trait for the `DictionaryKeysIterator` server sender.
8830pub trait DictionaryKeysIteratorServerSender {
8831    type Transport: ::fidl_next::Transport;
8832}
8833
8834impl<___T> DictionaryKeysIteratorServerSender
8835    for ::fidl_next::ServerSender<___T, DictionaryKeysIterator>
8836where
8837    ___T: ::fidl_next::Transport,
8838{
8839    type Transport = ___T;
8840}
8841
8842/// A server handler for the DictionaryKeysIterator protocol.
8843///
8844/// See [`DictionaryKeysIterator`] for more details.
8845pub trait DictionaryKeysIteratorServerHandler<___T: ::fidl_next::Transport> {
8846    fn get_next(
8847        &mut self,
8848        sender: &::fidl_next::ServerSender<___T, DictionaryKeysIterator>,
8849
8850        responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext>,
8851    );
8852
8853    fn on_unknown_interaction(
8854        &mut self,
8855        sender: &::fidl_next::ServerSender<___T, DictionaryKeysIterator>,
8856        ordinal: u64,
8857    ) {
8858        sender.close();
8859    }
8860}
8861
8862impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryKeysIterator
8863where
8864    ___T: ::fidl_next::Transport,
8865    ___H: DictionaryKeysIteratorServerHandler<___T>,
8866{
8867    fn on_one_way(
8868        handler: &mut ___H,
8869        sender: &::fidl_next::ServerSender<___T, Self>,
8870        ordinal: u64,
8871        buffer: ___T::RecvBuffer,
8872    ) {
8873        match ordinal {
8874            ordinal => handler.on_unknown_interaction(sender, ordinal),
8875        }
8876    }
8877
8878    fn on_two_way(
8879        handler: &mut ___H,
8880        sender: &::fidl_next::ServerSender<___T, Self>,
8881        ordinal: u64,
8882        buffer: ___T::RecvBuffer,
8883        responder: ::fidl_next::protocol::Responder,
8884    ) {
8885        match ordinal {
8886            4987781442555247955 => {
8887                let responder = ::fidl_next::Responder::from_untyped(responder);
8888
8889                handler.get_next(sender, responder);
8890            }
8891
8892            ordinal => handler.on_unknown_interaction(sender, ordinal),
8893        }
8894    }
8895}
8896
8897#[derive(Debug)]
8898pub enum DictionaryRouterRouteResponse {
8899    Dictionary(crate::DictionaryRef),
8900
8901    Unavailable(crate::Unit),
8902}
8903
8904impl ::fidl_next::Encodable for DictionaryRouterRouteResponse {
8905    type Encoded = WireDictionaryRouterRouteResponse;
8906}
8907
8908unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryRouterRouteResponse
8909where
8910    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8911
8912    ___E: ::fidl_next::fuchsia::HandleEncoder,
8913{
8914    #[inline]
8915    fn encode(
8916        &mut self,
8917        encoder: &mut ___E,
8918        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8919    ) -> Result<(), ::fidl_next::EncodeError> {
8920        ::fidl_next::munge!(let WireDictionaryRouterRouteResponse { raw } = out);
8921
8922        match self {
8923            Self::Dictionary(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8924                ___E,
8925                crate::DictionaryRef,
8926            >(value, 1, encoder, raw)?,
8927
8928            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8929                ___E,
8930                crate::Unit,
8931            >(value, 2, encoder, raw)?,
8932        }
8933
8934        Ok(())
8935    }
8936}
8937
8938impl ::fidl_next::EncodableOption for Box<DictionaryRouterRouteResponse> {
8939    type EncodedOption = WireOptionalDictionaryRouterRouteResponse;
8940}
8941
8942unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryRouterRouteResponse>
8943where
8944    ___E: ?Sized,
8945    DictionaryRouterRouteResponse: ::fidl_next::Encode<___E>,
8946{
8947    #[inline]
8948    fn encode_option(
8949        this: Option<&mut Self>,
8950        encoder: &mut ___E,
8951        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8952    ) -> Result<(), ::fidl_next::EncodeError> {
8953        ::fidl_next::munge!(let WireOptionalDictionaryRouterRouteResponse { raw } = &mut *out);
8954
8955        if let Some(inner) = this {
8956            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8957            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
8958        } else {
8959            ::fidl_next::RawWireUnion::encode_absent(raw);
8960        }
8961
8962        Ok(())
8963    }
8964}
8965
8966impl ::fidl_next::TakeFrom<WireDictionaryRouterRouteResponse> for DictionaryRouterRouteResponse {
8967    #[inline]
8968    fn take_from(from: &WireDictionaryRouterRouteResponse) -> Self {
8969        match from.raw.ordinal() {
8970            1 => Self::Dictionary(::fidl_next::TakeFrom::take_from(unsafe {
8971                from.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
8972            })),
8973
8974            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
8975                from.raw.get().deref_unchecked::<crate::WireUnit>()
8976            })),
8977
8978            _ => unsafe { ::core::hint::unreachable_unchecked() },
8979        }
8980    }
8981}
8982
8983impl ::fidl_next::TakeFrom<WireOptionalDictionaryRouterRouteResponse>
8984    for Option<Box<DictionaryRouterRouteResponse>>
8985{
8986    #[inline]
8987    fn take_from(from: &WireOptionalDictionaryRouterRouteResponse) -> Self {
8988        if let Some(inner) = from.as_ref() {
8989            Some(::fidl_next::TakeFrom::take_from(inner))
8990        } else {
8991            None
8992        }
8993    }
8994}
8995
8996/// The wire type corresponding to [`DictionaryRouterRouteResponse`].
8997#[repr(transparent)]
8998pub struct WireDictionaryRouterRouteResponse {
8999    raw: ::fidl_next::RawWireUnion,
9000}
9001
9002unsafe impl ::fidl_next::ZeroPadding for WireDictionaryRouterRouteResponse {
9003    #[inline]
9004    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9005        ::fidl_next::munge!(let Self { raw } = out);
9006        ::fidl_next::RawWireUnion::zero_padding(raw);
9007    }
9008}
9009
9010pub mod dictionary_router_route_response {
9011    pub enum Ref<'union> {
9012        Dictionary(&'union crate::WireDictionaryRef),
9013
9014        Unavailable(&'union crate::WireUnit),
9015    }
9016}
9017
9018impl WireDictionaryRouterRouteResponse {
9019    pub fn as_ref(&self) -> crate::dictionary_router_route_response::Ref<'_> {
9020        match self.raw.ordinal() {
9021            1 => crate::dictionary_router_route_response::Ref::Dictionary(unsafe {
9022                self.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
9023            }),
9024
9025            2 => crate::dictionary_router_route_response::Ref::Unavailable(unsafe {
9026                self.raw.get().deref_unchecked::<crate::WireUnit>()
9027            }),
9028
9029            _ => unsafe { ::core::hint::unreachable_unchecked() },
9030        }
9031    }
9032}
9033
9034unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryRouterRouteResponse
9035where
9036    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9037
9038    ___D: ::fidl_next::fuchsia::HandleDecoder,
9039{
9040    fn decode(
9041        mut slot: ::fidl_next::Slot<'_, Self>,
9042        decoder: &mut ___D,
9043    ) -> Result<(), ::fidl_next::DecodeError> {
9044        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9045        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9046            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
9047                raw, decoder,
9048            )?,
9049
9050            2 => {
9051                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9052            }
9053
9054            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9055        }
9056
9057        Ok(())
9058    }
9059}
9060
9061impl ::core::fmt::Debug for WireDictionaryRouterRouteResponse {
9062    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9063        match self.raw.ordinal() {
9064            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDictionaryRef>().fmt(f) },
9065            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9066            _ => unsafe { ::core::hint::unreachable_unchecked() },
9067        }
9068    }
9069}
9070
9071#[repr(transparent)]
9072pub struct WireOptionalDictionaryRouterRouteResponse {
9073    raw: ::fidl_next::RawWireUnion,
9074}
9075
9076unsafe impl ::fidl_next::ZeroPadding for WireOptionalDictionaryRouterRouteResponse {
9077    #[inline]
9078    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9079        ::fidl_next::munge!(let Self { raw } = out);
9080        ::fidl_next::RawWireUnion::zero_padding(raw);
9081    }
9082}
9083
9084impl WireOptionalDictionaryRouterRouteResponse {
9085    pub fn is_some(&self) -> bool {
9086        self.raw.is_some()
9087    }
9088
9089    pub fn is_none(&self) -> bool {
9090        self.raw.is_none()
9091    }
9092
9093    pub fn as_ref(&self) -> Option<&WireDictionaryRouterRouteResponse> {
9094        if self.is_some() {
9095            Some(unsafe { &*(self as *const Self).cast() })
9096        } else {
9097            None
9098        }
9099    }
9100}
9101
9102unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDictionaryRouterRouteResponse
9103where
9104    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9105
9106    ___D: ::fidl_next::fuchsia::HandleDecoder,
9107{
9108    fn decode(
9109        mut slot: ::fidl_next::Slot<'_, Self>,
9110        decoder: &mut ___D,
9111    ) -> Result<(), ::fidl_next::DecodeError> {
9112        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9113        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9114            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
9115                raw, decoder,
9116            )?,
9117
9118            2 => {
9119                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9120            }
9121
9122            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9123            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9124        }
9125
9126        Ok(())
9127    }
9128}
9129
9130impl ::core::fmt::Debug for WireOptionalDictionaryRouterRouteResponse {
9131    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9132        self.as_ref().fmt(f)
9133    }
9134}
9135
9136/// The type corresponding to the DictionaryRouter protocol.
9137#[derive(Debug)]
9138pub struct DictionaryRouter;
9139
9140impl ::fidl_next::Discoverable for DictionaryRouter {
9141    const PROTOCOL_NAME: &'static str = "dictionary_router";
9142}
9143
9144pub mod dictionary_router {
9145    pub mod prelude {
9146        pub use crate::{
9147            dictionary_router, DictionaryRouter, DictionaryRouterClientHandler,
9148            DictionaryRouterClientSender, DictionaryRouterServerHandler,
9149            DictionaryRouterServerSender,
9150        };
9151
9152        pub use crate::DictionaryRouterRouteResponse;
9153
9154        pub use crate::RouteRequest;
9155
9156        pub use crate::RouterError;
9157    }
9158
9159    pub struct Route;
9160
9161    impl ::fidl_next::Method for Route {
9162        const ORDINAL: u64 = 8164012099375978399;
9163
9164        type Protocol = crate::DictionaryRouter;
9165
9166        type Request = crate::WireRouteRequest;
9167
9168        type Response = ::fidl_next::WireFlexibleResult<
9169            crate::WireDictionaryRouterRouteResponse,
9170            crate::WireRouterError,
9171        >;
9172    }
9173}
9174
9175/// A helper trait for the `DictionaryRouter` client sender.
9176pub trait DictionaryRouterClientSender {
9177    type Transport: ::fidl_next::Transport;
9178
9179    fn route<___R>(
9180        &self,
9181        request: &mut ___R,
9182    ) -> Result<
9183        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_router::Route>,
9184        ::fidl_next::EncodeError,
9185    >
9186    where
9187        ___R: ::fidl_next::Encode<
9188            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9189            Encoded = crate::WireRouteRequest,
9190        >;
9191}
9192
9193impl<___T> DictionaryRouterClientSender for ::fidl_next::ClientSender<___T, DictionaryRouter>
9194where
9195    ___T: ::fidl_next::Transport,
9196{
9197    type Transport = ___T;
9198
9199    fn route<___R>(
9200        &self,
9201        request: &mut ___R,
9202    ) -> Result<
9203        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_router::Route>,
9204        ::fidl_next::EncodeError,
9205    >
9206    where
9207        ___R: ::fidl_next::Encode<
9208            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9209            Encoded = crate::WireRouteRequest,
9210        >,
9211    {
9212        self.as_untyped()
9213            .send_two_way(8164012099375978399, request)
9214            .map(::fidl_next::ResponseFuture::from_untyped)
9215    }
9216}
9217
9218/// A client handler for the DictionaryRouter protocol.
9219///
9220/// See [`DictionaryRouter`] for more details.
9221pub trait DictionaryRouterClientHandler<___T: ::fidl_next::Transport> {
9222    fn on_unknown_interaction(
9223        &mut self,
9224        sender: &::fidl_next::ClientSender<___T, DictionaryRouter>,
9225        ordinal: u64,
9226    ) {
9227        sender.close();
9228    }
9229}
9230
9231impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryRouter
9232where
9233    ___T: ::fidl_next::Transport,
9234    ___H: DictionaryRouterClientHandler<___T>,
9235
9236    <dictionary_router::Route as ::fidl_next::Method>::Response:
9237        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9238{
9239    fn on_event(
9240        handler: &mut ___H,
9241        sender: &::fidl_next::ClientSender<___T, Self>,
9242        ordinal: u64,
9243        buffer: ___T::RecvBuffer,
9244    ) {
9245        match ordinal {
9246            ordinal => handler.on_unknown_interaction(sender, ordinal),
9247        }
9248    }
9249}
9250
9251/// A helper trait for the `DictionaryRouter` server sender.
9252pub trait DictionaryRouterServerSender {
9253    type Transport: ::fidl_next::Transport;
9254}
9255
9256impl<___T> DictionaryRouterServerSender for ::fidl_next::ServerSender<___T, DictionaryRouter>
9257where
9258    ___T: ::fidl_next::Transport,
9259{
9260    type Transport = ___T;
9261}
9262
9263/// A server handler for the DictionaryRouter protocol.
9264///
9265/// See [`DictionaryRouter`] for more details.
9266pub trait DictionaryRouterServerHandler<___T: ::fidl_next::Transport> {
9267    fn route(
9268        &mut self,
9269        sender: &::fidl_next::ServerSender<___T, DictionaryRouter>,
9270
9271        request: ::fidl_next::Request<___T, dictionary_router::Route>,
9272
9273        responder: ::fidl_next::Responder<dictionary_router::Route>,
9274    );
9275
9276    fn on_unknown_interaction(
9277        &mut self,
9278        sender: &::fidl_next::ServerSender<___T, DictionaryRouter>,
9279        ordinal: u64,
9280    ) {
9281        sender.close();
9282    }
9283}
9284
9285impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryRouter
9286where
9287    ___T: ::fidl_next::Transport,
9288    ___H: DictionaryRouterServerHandler<___T>,
9289
9290    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9291{
9292    fn on_one_way(
9293        handler: &mut ___H,
9294        sender: &::fidl_next::ServerSender<___T, Self>,
9295        ordinal: u64,
9296        buffer: ___T::RecvBuffer,
9297    ) {
9298        match ordinal {
9299            ordinal => handler.on_unknown_interaction(sender, ordinal),
9300        }
9301    }
9302
9303    fn on_two_way(
9304        handler: &mut ___H,
9305        sender: &::fidl_next::ServerSender<___T, Self>,
9306        ordinal: u64,
9307        buffer: ___T::RecvBuffer,
9308        responder: ::fidl_next::protocol::Responder,
9309    ) {
9310        match ordinal {
9311            8164012099375978399 => {
9312                let responder = ::fidl_next::Responder::from_untyped(responder);
9313
9314                match ::fidl_next::DecoderExt::decode(buffer) {
9315                    Ok(decoded) => handler.route(sender, decoded, responder),
9316                    Err(e) => {
9317                        sender.close();
9318                    }
9319                }
9320            }
9321
9322            ordinal => handler.on_unknown_interaction(sender, ordinal),
9323        }
9324    }
9325}
9326
9327#[derive(Debug)]
9328pub enum DirConnectorRouterRouteResponse {
9329    DirConnector(crate::DirConnector),
9330
9331    Unavailable(crate::Unit),
9332}
9333
9334impl ::fidl_next::Encodable for DirConnectorRouterRouteResponse {
9335    type Encoded = WireDirConnectorRouterRouteResponse;
9336}
9337
9338unsafe impl<___E> ::fidl_next::Encode<___E> for DirConnectorRouterRouteResponse
9339where
9340    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9341
9342    ___E: ::fidl_next::fuchsia::HandleEncoder,
9343{
9344    #[inline]
9345    fn encode(
9346        &mut self,
9347        encoder: &mut ___E,
9348        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9349    ) -> Result<(), ::fidl_next::EncodeError> {
9350        ::fidl_next::munge!(let WireDirConnectorRouterRouteResponse { raw } = out);
9351
9352        match self {
9353            Self::DirConnector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9354                ___E,
9355                crate::DirConnector,
9356            >(value, 1, encoder, raw)?,
9357
9358            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9359                ___E,
9360                crate::Unit,
9361            >(value, 2, encoder, raw)?,
9362        }
9363
9364        Ok(())
9365    }
9366}
9367
9368impl ::fidl_next::EncodableOption for Box<DirConnectorRouterRouteResponse> {
9369    type EncodedOption = WireOptionalDirConnectorRouterRouteResponse;
9370}
9371
9372unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirConnectorRouterRouteResponse>
9373where
9374    ___E: ?Sized,
9375    DirConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
9376{
9377    #[inline]
9378    fn encode_option(
9379        this: Option<&mut Self>,
9380        encoder: &mut ___E,
9381        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9382    ) -> Result<(), ::fidl_next::EncodeError> {
9383        ::fidl_next::munge!(let WireOptionalDirConnectorRouterRouteResponse { raw } = &mut *out);
9384
9385        if let Some(inner) = this {
9386            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9387            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
9388        } else {
9389            ::fidl_next::RawWireUnion::encode_absent(raw);
9390        }
9391
9392        Ok(())
9393    }
9394}
9395
9396impl ::fidl_next::TakeFrom<WireDirConnectorRouterRouteResponse>
9397    for DirConnectorRouterRouteResponse
9398{
9399    #[inline]
9400    fn take_from(from: &WireDirConnectorRouterRouteResponse) -> Self {
9401        match from.raw.ordinal() {
9402            1 => Self::DirConnector(::fidl_next::TakeFrom::take_from(unsafe {
9403                from.raw.get().deref_unchecked::<crate::WireDirConnector>()
9404            })),
9405
9406            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
9407                from.raw.get().deref_unchecked::<crate::WireUnit>()
9408            })),
9409
9410            _ => unsafe { ::core::hint::unreachable_unchecked() },
9411        }
9412    }
9413}
9414
9415impl ::fidl_next::TakeFrom<WireOptionalDirConnectorRouterRouteResponse>
9416    for Option<Box<DirConnectorRouterRouteResponse>>
9417{
9418    #[inline]
9419    fn take_from(from: &WireOptionalDirConnectorRouterRouteResponse) -> Self {
9420        if let Some(inner) = from.as_ref() {
9421            Some(::fidl_next::TakeFrom::take_from(inner))
9422        } else {
9423            None
9424        }
9425    }
9426}
9427
9428/// The wire type corresponding to [`DirConnectorRouterRouteResponse`].
9429#[repr(transparent)]
9430pub struct WireDirConnectorRouterRouteResponse {
9431    raw: ::fidl_next::RawWireUnion,
9432}
9433
9434unsafe impl ::fidl_next::ZeroPadding for WireDirConnectorRouterRouteResponse {
9435    #[inline]
9436    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9437        ::fidl_next::munge!(let Self { raw } = out);
9438        ::fidl_next::RawWireUnion::zero_padding(raw);
9439    }
9440}
9441
9442pub mod dir_connector_router_route_response {
9443    pub enum Ref<'union> {
9444        DirConnector(&'union crate::WireDirConnector),
9445
9446        Unavailable(&'union crate::WireUnit),
9447    }
9448}
9449
9450impl WireDirConnectorRouterRouteResponse {
9451    pub fn as_ref(&self) -> crate::dir_connector_router_route_response::Ref<'_> {
9452        match self.raw.ordinal() {
9453            1 => crate::dir_connector_router_route_response::Ref::DirConnector(unsafe {
9454                self.raw.get().deref_unchecked::<crate::WireDirConnector>()
9455            }),
9456
9457            2 => crate::dir_connector_router_route_response::Ref::Unavailable(unsafe {
9458                self.raw.get().deref_unchecked::<crate::WireUnit>()
9459            }),
9460
9461            _ => unsafe { ::core::hint::unreachable_unchecked() },
9462        }
9463    }
9464}
9465
9466unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirConnectorRouterRouteResponse
9467where
9468    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9469
9470    ___D: ::fidl_next::fuchsia::HandleDecoder,
9471{
9472    fn decode(
9473        mut slot: ::fidl_next::Slot<'_, Self>,
9474        decoder: &mut ___D,
9475    ) -> Result<(), ::fidl_next::DecodeError> {
9476        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9477        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9478            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
9479                raw, decoder,
9480            )?,
9481
9482            2 => {
9483                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9484            }
9485
9486            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9487        }
9488
9489        Ok(())
9490    }
9491}
9492
9493impl ::core::fmt::Debug for WireDirConnectorRouterRouteResponse {
9494    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9495        match self.raw.ordinal() {
9496            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirConnector>().fmt(f) },
9497            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9498            _ => unsafe { ::core::hint::unreachable_unchecked() },
9499        }
9500    }
9501}
9502
9503#[repr(transparent)]
9504pub struct WireOptionalDirConnectorRouterRouteResponse {
9505    raw: ::fidl_next::RawWireUnion,
9506}
9507
9508unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirConnectorRouterRouteResponse {
9509    #[inline]
9510    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9511        ::fidl_next::munge!(let Self { raw } = out);
9512        ::fidl_next::RawWireUnion::zero_padding(raw);
9513    }
9514}
9515
9516impl WireOptionalDirConnectorRouterRouteResponse {
9517    pub fn is_some(&self) -> bool {
9518        self.raw.is_some()
9519    }
9520
9521    pub fn is_none(&self) -> bool {
9522        self.raw.is_none()
9523    }
9524
9525    pub fn as_ref(&self) -> Option<&WireDirConnectorRouterRouteResponse> {
9526        if self.is_some() {
9527            Some(unsafe { &*(self as *const Self).cast() })
9528        } else {
9529            None
9530        }
9531    }
9532}
9533
9534unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirConnectorRouterRouteResponse
9535where
9536    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9537
9538    ___D: ::fidl_next::fuchsia::HandleDecoder,
9539{
9540    fn decode(
9541        mut slot: ::fidl_next::Slot<'_, Self>,
9542        decoder: &mut ___D,
9543    ) -> Result<(), ::fidl_next::DecodeError> {
9544        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9545        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9546            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
9547                raw, decoder,
9548            )?,
9549
9550            2 => {
9551                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9552            }
9553
9554            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9555            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9556        }
9557
9558        Ok(())
9559    }
9560}
9561
9562impl ::core::fmt::Debug for WireOptionalDirConnectorRouterRouteResponse {
9563    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9564        self.as_ref().fmt(f)
9565    }
9566}
9567
9568/// The type corresponding to the DirConnectorRouter protocol.
9569#[derive(Debug)]
9570pub struct DirConnectorRouter;
9571
9572impl ::fidl_next::Discoverable for DirConnectorRouter {
9573    const PROTOCOL_NAME: &'static str = "dir_connector_router";
9574}
9575
9576pub mod dir_connector_router {
9577    pub mod prelude {
9578        pub use crate::{
9579            dir_connector_router, DirConnectorRouter, DirConnectorRouterClientHandler,
9580            DirConnectorRouterClientSender, DirConnectorRouterServerHandler,
9581            DirConnectorRouterServerSender,
9582        };
9583
9584        pub use crate::DirConnectorRouterRouteResponse;
9585
9586        pub use crate::RouteRequest;
9587
9588        pub use crate::RouterError;
9589    }
9590
9591    pub struct Route;
9592
9593    impl ::fidl_next::Method for Route {
9594        const ORDINAL: u64 = 972231070188342848;
9595
9596        type Protocol = crate::DirConnectorRouter;
9597
9598        type Request = crate::WireRouteRequest;
9599
9600        type Response = ::fidl_next::WireFlexibleResult<
9601            crate::WireDirConnectorRouterRouteResponse,
9602            crate::WireRouterError,
9603        >;
9604    }
9605}
9606
9607/// A helper trait for the `DirConnectorRouter` client sender.
9608pub trait DirConnectorRouterClientSender {
9609    type Transport: ::fidl_next::Transport;
9610
9611    fn route<___R>(
9612        &self,
9613        request: &mut ___R,
9614    ) -> Result<
9615        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_connector_router::Route>,
9616        ::fidl_next::EncodeError,
9617    >
9618    where
9619        ___R: ::fidl_next::Encode<
9620            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9621            Encoded = crate::WireRouteRequest,
9622        >;
9623}
9624
9625impl<___T> DirConnectorRouterClientSender for ::fidl_next::ClientSender<___T, DirConnectorRouter>
9626where
9627    ___T: ::fidl_next::Transport,
9628{
9629    type Transport = ___T;
9630
9631    fn route<___R>(
9632        &self,
9633        request: &mut ___R,
9634    ) -> Result<
9635        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_connector_router::Route>,
9636        ::fidl_next::EncodeError,
9637    >
9638    where
9639        ___R: ::fidl_next::Encode<
9640            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9641            Encoded = crate::WireRouteRequest,
9642        >,
9643    {
9644        self.as_untyped()
9645            .send_two_way(972231070188342848, request)
9646            .map(::fidl_next::ResponseFuture::from_untyped)
9647    }
9648}
9649
9650/// A client handler for the DirConnectorRouter protocol.
9651///
9652/// See [`DirConnectorRouter`] for more details.
9653pub trait DirConnectorRouterClientHandler<___T: ::fidl_next::Transport> {
9654    fn on_unknown_interaction(
9655        &mut self,
9656        sender: &::fidl_next::ClientSender<___T, DirConnectorRouter>,
9657        ordinal: u64,
9658    ) {
9659        sender.close();
9660    }
9661}
9662
9663impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirConnectorRouter
9664where
9665    ___T: ::fidl_next::Transport,
9666    ___H: DirConnectorRouterClientHandler<___T>,
9667
9668    <dir_connector_router::Route as ::fidl_next::Method>::Response:
9669        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9670{
9671    fn on_event(
9672        handler: &mut ___H,
9673        sender: &::fidl_next::ClientSender<___T, Self>,
9674        ordinal: u64,
9675        buffer: ___T::RecvBuffer,
9676    ) {
9677        match ordinal {
9678            ordinal => handler.on_unknown_interaction(sender, ordinal),
9679        }
9680    }
9681}
9682
9683/// A helper trait for the `DirConnectorRouter` server sender.
9684pub trait DirConnectorRouterServerSender {
9685    type Transport: ::fidl_next::Transport;
9686}
9687
9688impl<___T> DirConnectorRouterServerSender for ::fidl_next::ServerSender<___T, DirConnectorRouter>
9689where
9690    ___T: ::fidl_next::Transport,
9691{
9692    type Transport = ___T;
9693}
9694
9695/// A server handler for the DirConnectorRouter protocol.
9696///
9697/// See [`DirConnectorRouter`] for more details.
9698pub trait DirConnectorRouterServerHandler<___T: ::fidl_next::Transport> {
9699    fn route(
9700        &mut self,
9701        sender: &::fidl_next::ServerSender<___T, DirConnectorRouter>,
9702
9703        request: ::fidl_next::Request<___T, dir_connector_router::Route>,
9704
9705        responder: ::fidl_next::Responder<dir_connector_router::Route>,
9706    );
9707
9708    fn on_unknown_interaction(
9709        &mut self,
9710        sender: &::fidl_next::ServerSender<___T, DirConnectorRouter>,
9711        ordinal: u64,
9712    ) {
9713        sender.close();
9714    }
9715}
9716
9717impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirConnectorRouter
9718where
9719    ___T: ::fidl_next::Transport,
9720    ___H: DirConnectorRouterServerHandler<___T>,
9721
9722    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9723{
9724    fn on_one_way(
9725        handler: &mut ___H,
9726        sender: &::fidl_next::ServerSender<___T, Self>,
9727        ordinal: u64,
9728        buffer: ___T::RecvBuffer,
9729    ) {
9730        match ordinal {
9731            ordinal => handler.on_unknown_interaction(sender, ordinal),
9732        }
9733    }
9734
9735    fn on_two_way(
9736        handler: &mut ___H,
9737        sender: &::fidl_next::ServerSender<___T, Self>,
9738        ordinal: u64,
9739        buffer: ___T::RecvBuffer,
9740        responder: ::fidl_next::protocol::Responder,
9741    ) {
9742        match ordinal {
9743            972231070188342848 => {
9744                let responder = ::fidl_next::Responder::from_untyped(responder);
9745
9746                match ::fidl_next::DecoderExt::decode(buffer) {
9747                    Ok(decoded) => handler.route(sender, decoded, responder),
9748                    Err(e) => {
9749                        sender.close();
9750                    }
9751                }
9752            }
9753
9754            ordinal => handler.on_unknown_interaction(sender, ordinal),
9755        }
9756    }
9757}
9758
9759#[derive(Debug)]
9760pub enum DirEntryRouterRouteResponse {
9761    DirEntry(crate::DirEntry),
9762
9763    Unavailable(crate::Unit),
9764}
9765
9766impl ::fidl_next::Encodable for DirEntryRouterRouteResponse {
9767    type Encoded = WireDirEntryRouterRouteResponse;
9768}
9769
9770unsafe impl<___E> ::fidl_next::Encode<___E> for DirEntryRouterRouteResponse
9771where
9772    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9773
9774    ___E: ::fidl_next::fuchsia::HandleEncoder,
9775{
9776    #[inline]
9777    fn encode(
9778        &mut self,
9779        encoder: &mut ___E,
9780        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9781    ) -> Result<(), ::fidl_next::EncodeError> {
9782        ::fidl_next::munge!(let WireDirEntryRouterRouteResponse { raw } = out);
9783
9784        match self {
9785            Self::DirEntry(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9786                ___E,
9787                crate::DirEntry,
9788            >(value, 1, encoder, raw)?,
9789
9790            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9791                ___E,
9792                crate::Unit,
9793            >(value, 2, encoder, raw)?,
9794        }
9795
9796        Ok(())
9797    }
9798}
9799
9800impl ::fidl_next::EncodableOption for Box<DirEntryRouterRouteResponse> {
9801    type EncodedOption = WireOptionalDirEntryRouterRouteResponse;
9802}
9803
9804unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirEntryRouterRouteResponse>
9805where
9806    ___E: ?Sized,
9807    DirEntryRouterRouteResponse: ::fidl_next::Encode<___E>,
9808{
9809    #[inline]
9810    fn encode_option(
9811        this: Option<&mut Self>,
9812        encoder: &mut ___E,
9813        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9814    ) -> Result<(), ::fidl_next::EncodeError> {
9815        ::fidl_next::munge!(let WireOptionalDirEntryRouterRouteResponse { raw } = &mut *out);
9816
9817        if let Some(inner) = this {
9818            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9819            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
9820        } else {
9821            ::fidl_next::RawWireUnion::encode_absent(raw);
9822        }
9823
9824        Ok(())
9825    }
9826}
9827
9828impl ::fidl_next::TakeFrom<WireDirEntryRouterRouteResponse> for DirEntryRouterRouteResponse {
9829    #[inline]
9830    fn take_from(from: &WireDirEntryRouterRouteResponse) -> Self {
9831        match from.raw.ordinal() {
9832            1 => Self::DirEntry(::fidl_next::TakeFrom::take_from(unsafe {
9833                from.raw.get().deref_unchecked::<crate::WireDirEntry>()
9834            })),
9835
9836            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
9837                from.raw.get().deref_unchecked::<crate::WireUnit>()
9838            })),
9839
9840            _ => unsafe { ::core::hint::unreachable_unchecked() },
9841        }
9842    }
9843}
9844
9845impl ::fidl_next::TakeFrom<WireOptionalDirEntryRouterRouteResponse>
9846    for Option<Box<DirEntryRouterRouteResponse>>
9847{
9848    #[inline]
9849    fn take_from(from: &WireOptionalDirEntryRouterRouteResponse) -> Self {
9850        if let Some(inner) = from.as_ref() {
9851            Some(::fidl_next::TakeFrom::take_from(inner))
9852        } else {
9853            None
9854        }
9855    }
9856}
9857
9858/// The wire type corresponding to [`DirEntryRouterRouteResponse`].
9859#[repr(transparent)]
9860pub struct WireDirEntryRouterRouteResponse {
9861    raw: ::fidl_next::RawWireUnion,
9862}
9863
9864unsafe impl ::fidl_next::ZeroPadding for WireDirEntryRouterRouteResponse {
9865    #[inline]
9866    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9867        ::fidl_next::munge!(let Self { raw } = out);
9868        ::fidl_next::RawWireUnion::zero_padding(raw);
9869    }
9870}
9871
9872pub mod dir_entry_router_route_response {
9873    pub enum Ref<'union> {
9874        DirEntry(&'union crate::WireDirEntry),
9875
9876        Unavailable(&'union crate::WireUnit),
9877    }
9878}
9879
9880impl WireDirEntryRouterRouteResponse {
9881    pub fn as_ref(&self) -> crate::dir_entry_router_route_response::Ref<'_> {
9882        match self.raw.ordinal() {
9883            1 => crate::dir_entry_router_route_response::Ref::DirEntry(unsafe {
9884                self.raw.get().deref_unchecked::<crate::WireDirEntry>()
9885            }),
9886
9887            2 => crate::dir_entry_router_route_response::Ref::Unavailable(unsafe {
9888                self.raw.get().deref_unchecked::<crate::WireUnit>()
9889            }),
9890
9891            _ => unsafe { ::core::hint::unreachable_unchecked() },
9892        }
9893    }
9894}
9895
9896unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirEntryRouterRouteResponse
9897where
9898    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9899
9900    ___D: ::fidl_next::fuchsia::HandleDecoder,
9901{
9902    fn decode(
9903        mut slot: ::fidl_next::Slot<'_, Self>,
9904        decoder: &mut ___D,
9905    ) -> Result<(), ::fidl_next::DecodeError> {
9906        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9907        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9908            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
9909                raw, decoder,
9910            )?,
9911
9912            2 => {
9913                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9914            }
9915
9916            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9917        }
9918
9919        Ok(())
9920    }
9921}
9922
9923impl ::core::fmt::Debug for WireDirEntryRouterRouteResponse {
9924    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9925        match self.raw.ordinal() {
9926            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirEntry>().fmt(f) },
9927            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9928            _ => unsafe { ::core::hint::unreachable_unchecked() },
9929        }
9930    }
9931}
9932
9933#[repr(transparent)]
9934pub struct WireOptionalDirEntryRouterRouteResponse {
9935    raw: ::fidl_next::RawWireUnion,
9936}
9937
9938unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirEntryRouterRouteResponse {
9939    #[inline]
9940    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9941        ::fidl_next::munge!(let Self { raw } = out);
9942        ::fidl_next::RawWireUnion::zero_padding(raw);
9943    }
9944}
9945
9946impl WireOptionalDirEntryRouterRouteResponse {
9947    pub fn is_some(&self) -> bool {
9948        self.raw.is_some()
9949    }
9950
9951    pub fn is_none(&self) -> bool {
9952        self.raw.is_none()
9953    }
9954
9955    pub fn as_ref(&self) -> Option<&WireDirEntryRouterRouteResponse> {
9956        if self.is_some() {
9957            Some(unsafe { &*(self as *const Self).cast() })
9958        } else {
9959            None
9960        }
9961    }
9962}
9963
9964unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirEntryRouterRouteResponse
9965where
9966    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9967
9968    ___D: ::fidl_next::fuchsia::HandleDecoder,
9969{
9970    fn decode(
9971        mut slot: ::fidl_next::Slot<'_, Self>,
9972        decoder: &mut ___D,
9973    ) -> Result<(), ::fidl_next::DecodeError> {
9974        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9975        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9976            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
9977                raw, decoder,
9978            )?,
9979
9980            2 => {
9981                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9982            }
9983
9984            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9985            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9986        }
9987
9988        Ok(())
9989    }
9990}
9991
9992impl ::core::fmt::Debug for WireOptionalDirEntryRouterRouteResponse {
9993    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9994        self.as_ref().fmt(f)
9995    }
9996}
9997
9998/// The type corresponding to the DirEntryRouter protocol.
9999#[derive(Debug)]
10000pub struct DirEntryRouter;
10001
10002impl ::fidl_next::Discoverable for DirEntryRouter {
10003    const PROTOCOL_NAME: &'static str = "dir_entry_router";
10004}
10005
10006pub mod dir_entry_router {
10007    pub mod prelude {
10008        pub use crate::{
10009            dir_entry_router, DirEntryRouter, DirEntryRouterClientHandler,
10010            DirEntryRouterClientSender, DirEntryRouterServerHandler, DirEntryRouterServerSender,
10011        };
10012
10013        pub use crate::DirEntryRouterRouteResponse;
10014
10015        pub use crate::RouteRequest;
10016
10017        pub use crate::RouterError;
10018    }
10019
10020    pub struct Route;
10021
10022    impl ::fidl_next::Method for Route {
10023        const ORDINAL: u64 = 1929392218567642066;
10024
10025        type Protocol = crate::DirEntryRouter;
10026
10027        type Request = crate::WireRouteRequest;
10028
10029        type Response = ::fidl_next::WireFlexibleResult<
10030            crate::WireDirEntryRouterRouteResponse,
10031            crate::WireRouterError,
10032        >;
10033    }
10034}
10035
10036/// A helper trait for the `DirEntryRouter` client sender.
10037pub trait DirEntryRouterClientSender {
10038    type Transport: ::fidl_next::Transport;
10039
10040    fn route<___R>(
10041        &self,
10042        request: &mut ___R,
10043    ) -> Result<
10044        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_entry_router::Route>,
10045        ::fidl_next::EncodeError,
10046    >
10047    where
10048        ___R: ::fidl_next::Encode<
10049            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10050            Encoded = crate::WireRouteRequest,
10051        >;
10052}
10053
10054impl<___T> DirEntryRouterClientSender for ::fidl_next::ClientSender<___T, DirEntryRouter>
10055where
10056    ___T: ::fidl_next::Transport,
10057{
10058    type Transport = ___T;
10059
10060    fn route<___R>(
10061        &self,
10062        request: &mut ___R,
10063    ) -> Result<
10064        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_entry_router::Route>,
10065        ::fidl_next::EncodeError,
10066    >
10067    where
10068        ___R: ::fidl_next::Encode<
10069            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10070            Encoded = crate::WireRouteRequest,
10071        >,
10072    {
10073        self.as_untyped()
10074            .send_two_way(1929392218567642066, request)
10075            .map(::fidl_next::ResponseFuture::from_untyped)
10076    }
10077}
10078
10079/// A client handler for the DirEntryRouter protocol.
10080///
10081/// See [`DirEntryRouter`] for more details.
10082pub trait DirEntryRouterClientHandler<___T: ::fidl_next::Transport> {
10083    fn on_unknown_interaction(
10084        &mut self,
10085        sender: &::fidl_next::ClientSender<___T, DirEntryRouter>,
10086        ordinal: u64,
10087    ) {
10088        sender.close();
10089    }
10090}
10091
10092impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirEntryRouter
10093where
10094    ___T: ::fidl_next::Transport,
10095    ___H: DirEntryRouterClientHandler<___T>,
10096
10097    <dir_entry_router::Route as ::fidl_next::Method>::Response:
10098        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10099{
10100    fn on_event(
10101        handler: &mut ___H,
10102        sender: &::fidl_next::ClientSender<___T, Self>,
10103        ordinal: u64,
10104        buffer: ___T::RecvBuffer,
10105    ) {
10106        match ordinal {
10107            ordinal => handler.on_unknown_interaction(sender, ordinal),
10108        }
10109    }
10110}
10111
10112/// A helper trait for the `DirEntryRouter` server sender.
10113pub trait DirEntryRouterServerSender {
10114    type Transport: ::fidl_next::Transport;
10115}
10116
10117impl<___T> DirEntryRouterServerSender for ::fidl_next::ServerSender<___T, DirEntryRouter>
10118where
10119    ___T: ::fidl_next::Transport,
10120{
10121    type Transport = ___T;
10122}
10123
10124/// A server handler for the DirEntryRouter protocol.
10125///
10126/// See [`DirEntryRouter`] for more details.
10127pub trait DirEntryRouterServerHandler<___T: ::fidl_next::Transport> {
10128    fn route(
10129        &mut self,
10130        sender: &::fidl_next::ServerSender<___T, DirEntryRouter>,
10131
10132        request: ::fidl_next::Request<___T, dir_entry_router::Route>,
10133
10134        responder: ::fidl_next::Responder<dir_entry_router::Route>,
10135    );
10136
10137    fn on_unknown_interaction(
10138        &mut self,
10139        sender: &::fidl_next::ServerSender<___T, DirEntryRouter>,
10140        ordinal: u64,
10141    ) {
10142        sender.close();
10143    }
10144}
10145
10146impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirEntryRouter
10147where
10148    ___T: ::fidl_next::Transport,
10149    ___H: DirEntryRouterServerHandler<___T>,
10150
10151    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10152{
10153    fn on_one_way(
10154        handler: &mut ___H,
10155        sender: &::fidl_next::ServerSender<___T, Self>,
10156        ordinal: u64,
10157        buffer: ___T::RecvBuffer,
10158    ) {
10159        match ordinal {
10160            ordinal => handler.on_unknown_interaction(sender, ordinal),
10161        }
10162    }
10163
10164    fn on_two_way(
10165        handler: &mut ___H,
10166        sender: &::fidl_next::ServerSender<___T, Self>,
10167        ordinal: u64,
10168        buffer: ___T::RecvBuffer,
10169        responder: ::fidl_next::protocol::Responder,
10170    ) {
10171        match ordinal {
10172            1929392218567642066 => {
10173                let responder = ::fidl_next::Responder::from_untyped(responder);
10174
10175                match ::fidl_next::DecoderExt::decode(buffer) {
10176                    Ok(decoded) => handler.route(sender, decoded, responder),
10177                    Err(e) => {
10178                        sender.close();
10179                    }
10180                }
10181            }
10182
10183            ordinal => handler.on_unknown_interaction(sender, ordinal),
10184        }
10185    }
10186}
10187
10188#[derive(Debug)]
10189#[repr(C)]
10190pub struct DirReceiverReceiveRequest {
10191    pub channel: ::fidl_next::ServerEnd<
10192        ::fidl_next::fuchsia::zx::Channel,
10193        ::fidl_next_fuchsia_io::Directory,
10194    >,
10195}
10196
10197impl ::fidl_next::Encodable for DirReceiverReceiveRequest {
10198    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10199        ::fidl_next::CopyOptimization::enable_if(
10200            true && <::fidl_next::ServerEnd<
10201                ::fidl_next::fuchsia::zx::Channel,
10202                ::fidl_next_fuchsia_io::Directory,
10203            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10204                .is_enabled(),
10205        )
10206    };
10207
10208    type Encoded = WireDirReceiverReceiveRequest;
10209}
10210
10211unsafe impl<___E> ::fidl_next::Encode<___E> for DirReceiverReceiveRequest
10212where
10213    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10214
10215    ___E: ::fidl_next::fuchsia::HandleEncoder,
10216{
10217    #[inline]
10218    fn encode(
10219        &mut self,
10220        encoder: &mut ___E,
10221        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10222    ) -> Result<(), ::fidl_next::EncodeError> {
10223        ::fidl_next::munge! {
10224            let Self::Encoded {
10225                channel,
10226
10227            } = out;
10228        }
10229
10230        ::fidl_next::Encode::encode(&mut self.channel, encoder, channel)?;
10231
10232        Ok(())
10233    }
10234}
10235
10236impl ::fidl_next::EncodableOption for Box<DirReceiverReceiveRequest> {
10237    type EncodedOption = ::fidl_next::WireBox<WireDirReceiverReceiveRequest>;
10238}
10239
10240unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirReceiverReceiveRequest>
10241where
10242    ___E: ::fidl_next::Encoder + ?Sized,
10243    DirReceiverReceiveRequest: ::fidl_next::Encode<___E>,
10244{
10245    #[inline]
10246    fn encode_option(
10247        this: Option<&mut Self>,
10248        encoder: &mut ___E,
10249        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10250    ) -> Result<(), ::fidl_next::EncodeError> {
10251        if let Some(inner) = this {
10252            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10253            ::fidl_next::WireBox::encode_present(out);
10254        } else {
10255            ::fidl_next::WireBox::encode_absent(out);
10256        }
10257
10258        Ok(())
10259    }
10260}
10261
10262impl ::fidl_next::TakeFrom<WireDirReceiverReceiveRequest> for DirReceiverReceiveRequest {
10263    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10264        ::fidl_next::CopyOptimization::enable_if(
10265            true && <::fidl_next::ServerEnd<
10266                ::fidl_next::fuchsia::zx::Channel,
10267                ::fidl_next_fuchsia_io::Directory,
10268            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10269                .is_enabled(),
10270        )
10271    };
10272
10273    #[inline]
10274    fn take_from(from: &WireDirReceiverReceiveRequest) -> Self {
10275        Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
10276    }
10277}
10278
10279/// The wire type corresponding to [`DirReceiverReceiveRequest`].
10280#[derive(Debug)]
10281#[repr(C)]
10282pub struct WireDirReceiverReceiveRequest {
10283    pub channel: ::fidl_next::ServerEnd<
10284        ::fidl_next::fuchsia::WireChannel,
10285        ::fidl_next_fuchsia_io::Directory,
10286    >,
10287}
10288
10289unsafe impl ::fidl_next::ZeroPadding for WireDirReceiverReceiveRequest {
10290    #[inline]
10291    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10292}
10293
10294unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirReceiverReceiveRequest
10295where
10296    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10297
10298    ___D: ::fidl_next::fuchsia::HandleDecoder,
10299{
10300    fn decode(
10301        slot: ::fidl_next::Slot<'_, Self>,
10302        decoder: &mut ___D,
10303    ) -> Result<(), ::fidl_next::DecodeError> {
10304        ::fidl_next::munge! {
10305            let Self {
10306                mut channel,
10307
10308            } = slot;
10309        }
10310
10311        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
10312
10313        Ok(())
10314    }
10315}
10316
10317/// The type corresponding to the DirReceiver protocol.
10318#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
10319#[derive(Debug)]
10320pub struct DirReceiver;
10321
10322impl ::fidl_next::Discoverable for DirReceiver {
10323    const PROTOCOL_NAME: &'static str = "dir_receiver";
10324}
10325
10326pub mod dir_receiver {
10327    pub mod prelude {
10328        pub use crate::{
10329            dir_receiver, DirReceiver, DirReceiverClientHandler, DirReceiverClientSender,
10330            DirReceiverServerHandler, DirReceiverServerSender,
10331        };
10332
10333        pub use crate::DirReceiverReceiveRequest;
10334    }
10335
10336    pub struct Receive;
10337
10338    impl ::fidl_next::Method for Receive {
10339        const ORDINAL: u64 = 926684461087488948;
10340
10341        type Protocol = crate::DirReceiver;
10342
10343        type Request = crate::WireDirReceiverReceiveRequest;
10344
10345        type Response = ::fidl_next::Never;
10346    }
10347}
10348
10349/// A helper trait for the `DirReceiver` client sender.
10350pub trait DirReceiverClientSender {
10351    type Transport: ::fidl_next::Transport;
10352
10353    #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library. To keep this interface decoupled from\n `fuchsia.io`, it deliberately omits `Open`/`Open3` parameters such as `flags` and\n `path`. If a client wishes to specify these, they can obtain an initial\n [fuchsia.io/Directory] channel first and then call `Open`/`Open3` on it.\n"]
10354    fn receive<___R>(
10355        &self,
10356        request: &mut ___R,
10357    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
10358    where
10359        ___R: ::fidl_next::Encode<
10360            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10361            Encoded = crate::WireDirReceiverReceiveRequest,
10362        >;
10363}
10364
10365impl<___T> DirReceiverClientSender for ::fidl_next::ClientSender<___T, DirReceiver>
10366where
10367    ___T: ::fidl_next::Transport,
10368{
10369    type Transport = ___T;
10370
10371    #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library. To keep this interface decoupled from\n `fuchsia.io`, it deliberately omits `Open`/`Open3` parameters such as `flags` and\n `path`. If a client wishes to specify these, they can obtain an initial\n [fuchsia.io/Directory] channel first and then call `Open`/`Open3` on it.\n"]
10372    fn receive<___R>(
10373        &self,
10374        request: &mut ___R,
10375    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
10376    where
10377        ___R: ::fidl_next::Encode<
10378            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10379            Encoded = crate::WireDirReceiverReceiveRequest,
10380        >,
10381    {
10382        self.as_untyped().send_one_way(926684461087488948, request)
10383    }
10384}
10385
10386/// A client handler for the DirReceiver protocol.
10387///
10388/// See [`DirReceiver`] for more details.
10389pub trait DirReceiverClientHandler<___T: ::fidl_next::Transport> {
10390    fn on_unknown_interaction(
10391        &mut self,
10392        sender: &::fidl_next::ClientSender<___T, DirReceiver>,
10393        ordinal: u64,
10394    ) {
10395        sender.close();
10396    }
10397}
10398
10399impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirReceiver
10400where
10401    ___T: ::fidl_next::Transport,
10402    ___H: DirReceiverClientHandler<___T>,
10403{
10404    fn on_event(
10405        handler: &mut ___H,
10406        sender: &::fidl_next::ClientSender<___T, Self>,
10407        ordinal: u64,
10408        buffer: ___T::RecvBuffer,
10409    ) {
10410        match ordinal {
10411            ordinal => handler.on_unknown_interaction(sender, ordinal),
10412        }
10413    }
10414}
10415
10416/// A helper trait for the `DirReceiver` server sender.
10417pub trait DirReceiverServerSender {
10418    type Transport: ::fidl_next::Transport;
10419}
10420
10421impl<___T> DirReceiverServerSender for ::fidl_next::ServerSender<___T, DirReceiver>
10422where
10423    ___T: ::fidl_next::Transport,
10424{
10425    type Transport = ___T;
10426}
10427
10428/// A server handler for the DirReceiver protocol.
10429///
10430/// See [`DirReceiver`] for more details.
10431pub trait DirReceiverServerHandler<___T: ::fidl_next::Transport> {
10432    #[doc = " Sends a directory channel to this receiver.\n\n The server should implement this method by forwarding `channel` to a vfs instance\n of the language appropriate `vfs` library. To keep this interface decoupled from\n `fuchsia.io`, it deliberately omits `Open`/`Open3` parameters such as `flags` and\n `path`. If a client wishes to specify these, they can obtain an initial\n [fuchsia.io/Directory] channel first and then call `Open`/`Open3` on it.\n"]
10433    fn receive(
10434        &mut self,
10435        sender: &::fidl_next::ServerSender<___T, DirReceiver>,
10436
10437        request: ::fidl_next::Request<___T, dir_receiver::Receive>,
10438    );
10439
10440    fn on_unknown_interaction(
10441        &mut self,
10442        sender: &::fidl_next::ServerSender<___T, DirReceiver>,
10443        ordinal: u64,
10444    ) {
10445        sender.close();
10446    }
10447}
10448
10449impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirReceiver
10450where
10451    ___T: ::fidl_next::Transport,
10452    ___H: DirReceiverServerHandler<___T>,
10453
10454    crate::WireDirReceiverReceiveRequest:
10455        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10456{
10457    fn on_one_way(
10458        handler: &mut ___H,
10459        sender: &::fidl_next::ServerSender<___T, Self>,
10460        ordinal: u64,
10461        buffer: ___T::RecvBuffer,
10462    ) {
10463        match ordinal {
10464            926684461087488948 => match ::fidl_next::DecoderExt::decode(buffer) {
10465                Ok(decoded) => handler.receive(sender, decoded),
10466                Err(e) => {
10467                    sender.close();
10468                }
10469            },
10470
10471            ordinal => handler.on_unknown_interaction(sender, ordinal),
10472        }
10473    }
10474
10475    fn on_two_way(
10476        handler: &mut ___H,
10477        sender: &::fidl_next::ServerSender<___T, Self>,
10478        ordinal: u64,
10479        buffer: ___T::RecvBuffer,
10480        responder: ::fidl_next::protocol::Responder,
10481    ) {
10482        match ordinal {
10483            ordinal => handler.on_unknown_interaction(sender, ordinal),
10484        }
10485    }
10486}
10487
10488#[derive(Debug)]
10489pub enum DirectoryRouterRouteResponse {
10490    Directory(
10491        ::fidl_next::ClientEnd<
10492            ::fidl_next::fuchsia::zx::Channel,
10493            ::fidl_next_fuchsia_io::Directory,
10494        >,
10495    ),
10496
10497    Unavailable(crate::Unit),
10498}
10499
10500impl ::fidl_next::Encodable for DirectoryRouterRouteResponse {
10501    type Encoded = WireDirectoryRouterRouteResponse;
10502}
10503
10504unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryRouterRouteResponse
10505where
10506    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10507
10508    ___E: ::fidl_next::fuchsia::HandleEncoder,
10509{
10510    #[inline]
10511    fn encode(
10512        &mut self,
10513        encoder: &mut ___E,
10514        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10515    ) -> Result<(), ::fidl_next::EncodeError> {
10516        ::fidl_next::munge!(let WireDirectoryRouterRouteResponse { raw } = out);
10517
10518        match self {
10519            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as_static::<
10520                ___E,
10521                ::fidl_next::ClientEnd<
10522                    ::fidl_next::fuchsia::zx::Channel,
10523                    ::fidl_next_fuchsia_io::Directory,
10524                >,
10525            >(value, 1, encoder, raw)?,
10526
10527            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
10528                ___E,
10529                crate::Unit,
10530            >(value, 2, encoder, raw)?,
10531        }
10532
10533        Ok(())
10534    }
10535}
10536
10537impl ::fidl_next::EncodableOption for Box<DirectoryRouterRouteResponse> {
10538    type EncodedOption = WireOptionalDirectoryRouterRouteResponse;
10539}
10540
10541unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirectoryRouterRouteResponse>
10542where
10543    ___E: ?Sized,
10544    DirectoryRouterRouteResponse: ::fidl_next::Encode<___E>,
10545{
10546    #[inline]
10547    fn encode_option(
10548        this: Option<&mut Self>,
10549        encoder: &mut ___E,
10550        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10551    ) -> Result<(), ::fidl_next::EncodeError> {
10552        ::fidl_next::munge!(let WireOptionalDirectoryRouterRouteResponse { raw } = &mut *out);
10553
10554        if let Some(inner) = this {
10555            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
10556            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
10557        } else {
10558            ::fidl_next::RawWireUnion::encode_absent(raw);
10559        }
10560
10561        Ok(())
10562    }
10563}
10564
10565impl ::fidl_next::TakeFrom<WireDirectoryRouterRouteResponse> for DirectoryRouterRouteResponse {
10566    #[inline]
10567    fn take_from(from: &WireDirectoryRouterRouteResponse) -> Self {
10568        match from.raw.ordinal() {
10569            1 => Self::Directory(::fidl_next::TakeFrom::take_from(unsafe {
10570                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
10571                    ::fidl_next::fuchsia::WireChannel,
10572                    ::fidl_next_fuchsia_io::Directory,
10573                >>()
10574            })),
10575
10576            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
10577                from.raw.get().deref_unchecked::<crate::WireUnit>()
10578            })),
10579
10580            _ => unsafe { ::core::hint::unreachable_unchecked() },
10581        }
10582    }
10583}
10584
10585impl ::fidl_next::TakeFrom<WireOptionalDirectoryRouterRouteResponse>
10586    for Option<Box<DirectoryRouterRouteResponse>>
10587{
10588    #[inline]
10589    fn take_from(from: &WireOptionalDirectoryRouterRouteResponse) -> Self {
10590        if let Some(inner) = from.as_ref() {
10591            Some(::fidl_next::TakeFrom::take_from(inner))
10592        } else {
10593            None
10594        }
10595    }
10596}
10597
10598/// The wire type corresponding to [`DirectoryRouterRouteResponse`].
10599#[repr(transparent)]
10600pub struct WireDirectoryRouterRouteResponse {
10601    raw: ::fidl_next::RawWireUnion,
10602}
10603
10604unsafe impl ::fidl_next::ZeroPadding for WireDirectoryRouterRouteResponse {
10605    #[inline]
10606    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10607        ::fidl_next::munge!(let Self { raw } = out);
10608        ::fidl_next::RawWireUnion::zero_padding(raw);
10609    }
10610}
10611
10612pub mod directory_router_route_response {
10613    pub enum Ref<'union> {
10614        Directory(
10615            &'union ::fidl_next::ClientEnd<
10616                ::fidl_next::fuchsia::WireChannel,
10617                ::fidl_next_fuchsia_io::Directory,
10618            >,
10619        ),
10620
10621        Unavailable(&'union crate::WireUnit),
10622    }
10623}
10624
10625impl WireDirectoryRouterRouteResponse {
10626    pub fn as_ref(&self) -> crate::directory_router_route_response::Ref<'_> {
10627        match self.raw.ordinal() {
10628            1 => crate::directory_router_route_response::Ref::Directory(unsafe {
10629                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
10630                    ::fidl_next::fuchsia::WireChannel,
10631                    ::fidl_next_fuchsia_io::Directory,
10632                >>()
10633            }),
10634
10635            2 => crate::directory_router_route_response::Ref::Unavailable(unsafe {
10636                self.raw.get().deref_unchecked::<crate::WireUnit>()
10637            }),
10638
10639            _ => unsafe { ::core::hint::unreachable_unchecked() },
10640        }
10641    }
10642}
10643
10644unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryRouterRouteResponse
10645where
10646    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10647
10648    ___D: ::fidl_next::fuchsia::HandleDecoder,
10649{
10650    fn decode(
10651        mut slot: ::fidl_next::Slot<'_, Self>,
10652        decoder: &mut ___D,
10653    ) -> Result<(), ::fidl_next::DecodeError> {
10654        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
10655        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
10656            1 => ::fidl_next::RawWireUnion::decode_as_static::<
10657                ___D,
10658                ::fidl_next::ClientEnd<
10659                    ::fidl_next::fuchsia::WireChannel,
10660                    ::fidl_next_fuchsia_io::Directory,
10661                >,
10662            >(raw, decoder)?,
10663
10664            2 => {
10665                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
10666            }
10667
10668            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
10669        }
10670
10671        Ok(())
10672    }
10673}
10674
10675impl ::core::fmt::Debug for WireDirectoryRouterRouteResponse {
10676    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10677        match self.raw.ordinal() {
10678            1 => unsafe {
10679                self.raw
10680                    .get()
10681                    .deref_unchecked::<::fidl_next::ClientEnd<
10682                        ::fidl_next::fuchsia::WireChannel,
10683                        ::fidl_next_fuchsia_io::Directory,
10684                    >>()
10685                    .fmt(f)
10686            },
10687            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
10688            _ => unsafe { ::core::hint::unreachable_unchecked() },
10689        }
10690    }
10691}
10692
10693#[repr(transparent)]
10694pub struct WireOptionalDirectoryRouterRouteResponse {
10695    raw: ::fidl_next::RawWireUnion,
10696}
10697
10698unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirectoryRouterRouteResponse {
10699    #[inline]
10700    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10701        ::fidl_next::munge!(let Self { raw } = out);
10702        ::fidl_next::RawWireUnion::zero_padding(raw);
10703    }
10704}
10705
10706impl WireOptionalDirectoryRouterRouteResponse {
10707    pub fn is_some(&self) -> bool {
10708        self.raw.is_some()
10709    }
10710
10711    pub fn is_none(&self) -> bool {
10712        self.raw.is_none()
10713    }
10714
10715    pub fn as_ref(&self) -> Option<&WireDirectoryRouterRouteResponse> {
10716        if self.is_some() {
10717            Some(unsafe { &*(self as *const Self).cast() })
10718        } else {
10719            None
10720        }
10721    }
10722}
10723
10724unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirectoryRouterRouteResponse
10725where
10726    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10727
10728    ___D: ::fidl_next::fuchsia::HandleDecoder,
10729{
10730    fn decode(
10731        mut slot: ::fidl_next::Slot<'_, Self>,
10732        decoder: &mut ___D,
10733    ) -> Result<(), ::fidl_next::DecodeError> {
10734        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
10735        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
10736            1 => ::fidl_next::RawWireUnion::decode_as_static::<
10737                ___D,
10738                ::fidl_next::ClientEnd<
10739                    ::fidl_next::fuchsia::WireChannel,
10740                    ::fidl_next_fuchsia_io::Directory,
10741                >,
10742            >(raw, decoder)?,
10743
10744            2 => {
10745                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
10746            }
10747
10748            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
10749            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
10750        }
10751
10752        Ok(())
10753    }
10754}
10755
10756impl ::core::fmt::Debug for WireOptionalDirectoryRouterRouteResponse {
10757    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10758        self.as_ref().fmt(f)
10759    }
10760}
10761
10762/// The type corresponding to the DirectoryRouter protocol.
10763#[derive(Debug)]
10764pub struct DirectoryRouter;
10765
10766impl ::fidl_next::Discoverable for DirectoryRouter {
10767    const PROTOCOL_NAME: &'static str = "directory_router";
10768}
10769
10770pub mod directory_router {
10771    pub mod prelude {
10772        pub use crate::{
10773            directory_router, DirectoryRouter, DirectoryRouterClientHandler,
10774            DirectoryRouterClientSender, DirectoryRouterServerHandler, DirectoryRouterServerSender,
10775        };
10776
10777        pub use crate::DirectoryRouterRouteResponse;
10778
10779        pub use crate::RouteRequest;
10780
10781        pub use crate::RouterError;
10782    }
10783
10784    pub struct Route;
10785
10786    impl ::fidl_next::Method for Route {
10787        const ORDINAL: u64 = 7510716014181158689;
10788
10789        type Protocol = crate::DirectoryRouter;
10790
10791        type Request = crate::WireRouteRequest;
10792
10793        type Response = ::fidl_next::WireFlexibleResult<
10794            crate::WireDirectoryRouterRouteResponse,
10795            crate::WireRouterError,
10796        >;
10797    }
10798}
10799
10800/// A helper trait for the `DirectoryRouter` client sender.
10801pub trait DirectoryRouterClientSender {
10802    type Transport: ::fidl_next::Transport;
10803
10804    fn route<___R>(
10805        &self,
10806        request: &mut ___R,
10807    ) -> Result<
10808        ::fidl_next::ResponseFuture<'_, Self::Transport, directory_router::Route>,
10809        ::fidl_next::EncodeError,
10810    >
10811    where
10812        ___R: ::fidl_next::Encode<
10813            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10814            Encoded = crate::WireRouteRequest,
10815        >;
10816}
10817
10818impl<___T> DirectoryRouterClientSender for ::fidl_next::ClientSender<___T, DirectoryRouter>
10819where
10820    ___T: ::fidl_next::Transport,
10821{
10822    type Transport = ___T;
10823
10824    fn route<___R>(
10825        &self,
10826        request: &mut ___R,
10827    ) -> Result<
10828        ::fidl_next::ResponseFuture<'_, Self::Transport, directory_router::Route>,
10829        ::fidl_next::EncodeError,
10830    >
10831    where
10832        ___R: ::fidl_next::Encode<
10833            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10834            Encoded = crate::WireRouteRequest,
10835        >,
10836    {
10837        self.as_untyped()
10838            .send_two_way(7510716014181158689, request)
10839            .map(::fidl_next::ResponseFuture::from_untyped)
10840    }
10841}
10842
10843/// A client handler for the DirectoryRouter protocol.
10844///
10845/// See [`DirectoryRouter`] for more details.
10846pub trait DirectoryRouterClientHandler<___T: ::fidl_next::Transport> {
10847    fn on_unknown_interaction(
10848        &mut self,
10849        sender: &::fidl_next::ClientSender<___T, DirectoryRouter>,
10850        ordinal: u64,
10851    ) {
10852        sender.close();
10853    }
10854}
10855
10856impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirectoryRouter
10857where
10858    ___T: ::fidl_next::Transport,
10859    ___H: DirectoryRouterClientHandler<___T>,
10860
10861    <directory_router::Route as ::fidl_next::Method>::Response:
10862        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10863{
10864    fn on_event(
10865        handler: &mut ___H,
10866        sender: &::fidl_next::ClientSender<___T, Self>,
10867        ordinal: u64,
10868        buffer: ___T::RecvBuffer,
10869    ) {
10870        match ordinal {
10871            ordinal => handler.on_unknown_interaction(sender, ordinal),
10872        }
10873    }
10874}
10875
10876/// A helper trait for the `DirectoryRouter` server sender.
10877pub trait DirectoryRouterServerSender {
10878    type Transport: ::fidl_next::Transport;
10879}
10880
10881impl<___T> DirectoryRouterServerSender for ::fidl_next::ServerSender<___T, DirectoryRouter>
10882where
10883    ___T: ::fidl_next::Transport,
10884{
10885    type Transport = ___T;
10886}
10887
10888/// A server handler for the DirectoryRouter protocol.
10889///
10890/// See [`DirectoryRouter`] for more details.
10891pub trait DirectoryRouterServerHandler<___T: ::fidl_next::Transport> {
10892    fn route(
10893        &mut self,
10894        sender: &::fidl_next::ServerSender<___T, DirectoryRouter>,
10895
10896        request: ::fidl_next::Request<___T, directory_router::Route>,
10897
10898        responder: ::fidl_next::Responder<directory_router::Route>,
10899    );
10900
10901    fn on_unknown_interaction(
10902        &mut self,
10903        sender: &::fidl_next::ServerSender<___T, DirectoryRouter>,
10904        ordinal: u64,
10905    ) {
10906        sender.close();
10907    }
10908}
10909
10910impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirectoryRouter
10911where
10912    ___T: ::fidl_next::Transport,
10913    ___H: DirectoryRouterServerHandler<___T>,
10914
10915    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10916{
10917    fn on_one_way(
10918        handler: &mut ___H,
10919        sender: &::fidl_next::ServerSender<___T, Self>,
10920        ordinal: u64,
10921        buffer: ___T::RecvBuffer,
10922    ) {
10923        match ordinal {
10924            ordinal => handler.on_unknown_interaction(sender, ordinal),
10925        }
10926    }
10927
10928    fn on_two_way(
10929        handler: &mut ___H,
10930        sender: &::fidl_next::ServerSender<___T, Self>,
10931        ordinal: u64,
10932        buffer: ___T::RecvBuffer,
10933        responder: ::fidl_next::protocol::Responder,
10934    ) {
10935        match ordinal {
10936            7510716014181158689 => {
10937                let responder = ::fidl_next::Responder::from_untyped(responder);
10938
10939                match ::fidl_next::DecoderExt::decode(buffer) {
10940                    Ok(decoded) => handler.route(sender, decoded, responder),
10941                    Err(e) => {
10942                        sender.close();
10943                    }
10944                }
10945            }
10946
10947            ordinal => handler.on_unknown_interaction(sender, ordinal),
10948        }
10949    }
10950}
10951
10952#[doc = " Contains a protocol open request.\n"]
10953#[derive(Debug)]
10954#[repr(C)]
10955pub struct ProtocolPayload {
10956    pub channel: ::fidl_next::fuchsia::zx::Handle,
10957}
10958
10959impl ::fidl_next::Encodable for ProtocolPayload {
10960    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10961        ::fidl_next::CopyOptimization::enable_if(
10962            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10963                .is_enabled(),
10964        )
10965    };
10966
10967    type Encoded = WireProtocolPayload;
10968}
10969
10970unsafe impl<___E> ::fidl_next::Encode<___E> for ProtocolPayload
10971where
10972    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10973
10974    ___E: ::fidl_next::fuchsia::HandleEncoder,
10975{
10976    #[inline]
10977    fn encode(
10978        &mut self,
10979        encoder: &mut ___E,
10980        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10981    ) -> Result<(), ::fidl_next::EncodeError> {
10982        ::fidl_next::munge! {
10983            let Self::Encoded {
10984                channel,
10985
10986            } = out;
10987        }
10988
10989        ::fidl_next::Encode::encode(&mut self.channel, encoder, channel)?;
10990
10991        Ok(())
10992    }
10993}
10994
10995impl ::fidl_next::EncodableOption for Box<ProtocolPayload> {
10996    type EncodedOption = ::fidl_next::WireBox<WireProtocolPayload>;
10997}
10998
10999unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ProtocolPayload>
11000where
11001    ___E: ::fidl_next::Encoder + ?Sized,
11002    ProtocolPayload: ::fidl_next::Encode<___E>,
11003{
11004    #[inline]
11005    fn encode_option(
11006        this: Option<&mut Self>,
11007        encoder: &mut ___E,
11008        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11009    ) -> Result<(), ::fidl_next::EncodeError> {
11010        if let Some(inner) = this {
11011            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11012            ::fidl_next::WireBox::encode_present(out);
11013        } else {
11014            ::fidl_next::WireBox::encode_absent(out);
11015        }
11016
11017        Ok(())
11018    }
11019}
11020
11021impl ::fidl_next::TakeFrom<WireProtocolPayload> for ProtocolPayload {
11022    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
11023        ::fidl_next::CopyOptimization::enable_if(
11024            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
11025                .is_enabled(),
11026        )
11027    };
11028
11029    #[inline]
11030    fn take_from(from: &WireProtocolPayload) -> Self {
11031        Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
11032    }
11033}
11034
11035/// The wire type corresponding to [`ProtocolPayload`].
11036#[derive(Debug)]
11037#[repr(C)]
11038pub struct WireProtocolPayload {
11039    pub channel: ::fidl_next::fuchsia::WireHandle,
11040}
11041
11042unsafe impl ::fidl_next::ZeroPadding for WireProtocolPayload {
11043    #[inline]
11044    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
11045}
11046
11047unsafe impl<___D> ::fidl_next::Decode<___D> for WireProtocolPayload
11048where
11049    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11050
11051    ___D: ::fidl_next::fuchsia::HandleDecoder,
11052{
11053    fn decode(
11054        slot: ::fidl_next::Slot<'_, Self>,
11055        decoder: &mut ___D,
11056    ) -> Result<(), ::fidl_next::DecodeError> {
11057        ::fidl_next::munge! {
11058            let Self {
11059                mut channel,
11060
11061            } = slot;
11062        }
11063
11064        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
11065
11066        Ok(())
11067    }
11068}
11069
11070/// The type corresponding to the Receiver protocol.
11071#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
11072#[derive(Debug)]
11073pub struct Receiver;
11074
11075impl ::fidl_next::Discoverable for Receiver {
11076    const PROTOCOL_NAME: &'static str = "receiver";
11077}
11078
11079pub mod receiver {
11080    pub mod prelude {
11081        pub use crate::{
11082            receiver, Receiver, ReceiverClientHandler, ReceiverClientSender, ReceiverServerHandler,
11083            ReceiverServerSender,
11084        };
11085
11086        pub use crate::ProtocolPayload;
11087    }
11088
11089    pub struct Receive;
11090
11091    impl ::fidl_next::Method for Receive {
11092        const ORDINAL: u64 = 340832707723008660;
11093
11094        type Protocol = crate::Receiver;
11095
11096        type Request = crate::WireProtocolPayload;
11097
11098        type Response = ::fidl_next::Never;
11099    }
11100}
11101
11102/// A helper trait for the `Receiver` client sender.
11103pub trait ReceiverClientSender {
11104    type Transport: ::fidl_next::Transport;
11105
11106    #[doc = " Sends a channel to this receiver.\n"]
11107    fn receive<___R>(
11108        &self,
11109        request: &mut ___R,
11110    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
11111    where
11112        ___R: ::fidl_next::Encode<
11113            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
11114            Encoded = crate::WireProtocolPayload,
11115        >;
11116}
11117
11118impl<___T> ReceiverClientSender for ::fidl_next::ClientSender<___T, Receiver>
11119where
11120    ___T: ::fidl_next::Transport,
11121{
11122    type Transport = ___T;
11123
11124    #[doc = " Sends a channel to this receiver.\n"]
11125    fn receive<___R>(
11126        &self,
11127        request: &mut ___R,
11128    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
11129    where
11130        ___R: ::fidl_next::Encode<
11131            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
11132            Encoded = crate::WireProtocolPayload,
11133        >,
11134    {
11135        self.as_untyped().send_one_way(340832707723008660, request)
11136    }
11137}
11138
11139/// A client handler for the Receiver protocol.
11140///
11141/// See [`Receiver`] for more details.
11142pub trait ReceiverClientHandler<___T: ::fidl_next::Transport> {
11143    fn on_unknown_interaction(
11144        &mut self,
11145        sender: &::fidl_next::ClientSender<___T, Receiver>,
11146        ordinal: u64,
11147    ) {
11148        sender.close();
11149    }
11150}
11151
11152impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Receiver
11153where
11154    ___T: ::fidl_next::Transport,
11155    ___H: ReceiverClientHandler<___T>,
11156{
11157    fn on_event(
11158        handler: &mut ___H,
11159        sender: &::fidl_next::ClientSender<___T, Self>,
11160        ordinal: u64,
11161        buffer: ___T::RecvBuffer,
11162    ) {
11163        match ordinal {
11164            ordinal => handler.on_unknown_interaction(sender, ordinal),
11165        }
11166    }
11167}
11168
11169/// A helper trait for the `Receiver` server sender.
11170pub trait ReceiverServerSender {
11171    type Transport: ::fidl_next::Transport;
11172}
11173
11174impl<___T> ReceiverServerSender for ::fidl_next::ServerSender<___T, Receiver>
11175where
11176    ___T: ::fidl_next::Transport,
11177{
11178    type Transport = ___T;
11179}
11180
11181/// A server handler for the Receiver protocol.
11182///
11183/// See [`Receiver`] for more details.
11184pub trait ReceiverServerHandler<___T: ::fidl_next::Transport> {
11185    #[doc = " Sends a channel to this receiver.\n"]
11186    fn receive(
11187        &mut self,
11188        sender: &::fidl_next::ServerSender<___T, Receiver>,
11189
11190        request: ::fidl_next::Request<___T, receiver::Receive>,
11191    );
11192
11193    fn on_unknown_interaction(
11194        &mut self,
11195        sender: &::fidl_next::ServerSender<___T, Receiver>,
11196        ordinal: u64,
11197    ) {
11198        sender.close();
11199    }
11200}
11201
11202impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Receiver
11203where
11204    ___T: ::fidl_next::Transport,
11205    ___H: ReceiverServerHandler<___T>,
11206
11207    crate::WireProtocolPayload: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11208{
11209    fn on_one_way(
11210        handler: &mut ___H,
11211        sender: &::fidl_next::ServerSender<___T, Self>,
11212        ordinal: u64,
11213        buffer: ___T::RecvBuffer,
11214    ) {
11215        match ordinal {
11216            340832707723008660 => match ::fidl_next::DecoderExt::decode(buffer) {
11217                Ok(decoded) => handler.receive(sender, decoded),
11218                Err(e) => {
11219                    sender.close();
11220                }
11221            },
11222
11223            ordinal => handler.on_unknown_interaction(sender, ordinal),
11224        }
11225    }
11226
11227    fn on_two_way(
11228        handler: &mut ___H,
11229        sender: &::fidl_next::ServerSender<___T, Self>,
11230        ordinal: u64,
11231        buffer: ___T::RecvBuffer,
11232        responder: ::fidl_next::protocol::Responder,
11233    ) {
11234        match ordinal {
11235            ordinal => handler.on_unknown_interaction(sender, ordinal),
11236        }
11237    }
11238}
11239
11240#[derive(Clone, Debug)]
11241#[repr(C)]
11242pub struct Unavailable {}
11243
11244impl ::fidl_next::Encodable for Unavailable {
11245    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
11246        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11247
11248    type Encoded = WireUnavailable;
11249}
11250
11251unsafe impl<___E> ::fidl_next::Encode<___E> for Unavailable
11252where
11253    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11254{
11255    #[inline]
11256    fn encode(
11257        &mut self,
11258        encoder: &mut ___E,
11259        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11260    ) -> Result<(), ::fidl_next::EncodeError> {
11261        ::fidl_next::munge! {
11262            let Self::Encoded {
11263
11264            } = out;
11265        }
11266
11267        Ok(())
11268    }
11269}
11270
11271impl ::fidl_next::EncodableOption for Box<Unavailable> {
11272    type EncodedOption = ::fidl_next::WireBox<WireUnavailable>;
11273}
11274
11275unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Unavailable>
11276where
11277    ___E: ::fidl_next::Encoder + ?Sized,
11278    Unavailable: ::fidl_next::Encode<___E>,
11279{
11280    #[inline]
11281    fn encode_option(
11282        this: Option<&mut Self>,
11283        encoder: &mut ___E,
11284        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11285    ) -> Result<(), ::fidl_next::EncodeError> {
11286        if let Some(inner) = this {
11287            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11288            ::fidl_next::WireBox::encode_present(out);
11289        } else {
11290            ::fidl_next::WireBox::encode_absent(out);
11291        }
11292
11293        Ok(())
11294    }
11295}
11296
11297impl ::fidl_next::TakeFrom<WireUnavailable> for Unavailable {
11298    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
11299        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11300
11301    #[inline]
11302    fn take_from(from: &WireUnavailable) -> Self {
11303        Self {}
11304    }
11305}
11306
11307/// The wire type corresponding to [`Unavailable`].
11308#[derive(Clone, Debug)]
11309#[repr(C)]
11310pub struct WireUnavailable {}
11311
11312unsafe impl ::fidl_next::ZeroPadding for WireUnavailable {
11313    #[inline]
11314    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
11315}
11316
11317unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnavailable
11318where
11319    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11320{
11321    fn decode(
11322        slot: ::fidl_next::Slot<'_, Self>,
11323        decoder: &mut ___D,
11324    ) -> Result<(), ::fidl_next::DecodeError> {
11325        ::fidl_next::munge! {
11326            let Self {
11327
11328            } = slot;
11329        }
11330
11331        Ok(())
11332    }
11333}
11334
11335/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
11336pub mod compat {
11337
11338    impl ::fidl_next::TakeFrom<crate::WireAvailability>
11339        for ::fidl_fuchsia_component_sandbox::Availability
11340    {
11341        #[inline]
11342        fn take_from(from: &crate::WireAvailability) -> Self {
11343            match crate::Availability::from(*from) {
11344                crate::Availability::Required => Self::Required,
11345
11346                crate::Availability::Optional => Self::Optional,
11347
11348                crate::Availability::SameAsTarget => Self::SameAsTarget,
11349
11350                crate::Availability::Transitional => Self::Transitional,
11351            }
11352        }
11353    }
11354
11355    impl ::fidl_next::TakeFrom<crate::WireUnit> for ::fidl_fuchsia_component_sandbox::Unit {
11356        #[inline]
11357        fn take_from(from: &crate::WireUnit) -> Self {
11358            Self {}
11359        }
11360    }
11361
11362    impl ::fidl_next::TakeFrom<crate::WireData> for ::fidl_fuchsia_component_sandbox::Data {
11363        #[inline]
11364        fn take_from(from: &crate::WireData) -> Self {
11365            match from.as_ref() {
11366                crate::data::Ref::Bytes(value) => {
11367                    Self::Bytes(::fidl_next::TakeFrom::take_from(value))
11368                }
11369
11370                crate::data::Ref::String(value) => {
11371                    Self::String(::fidl_next::TakeFrom::take_from(value))
11372                }
11373
11374                crate::data::Ref::Int64(value) => {
11375                    Self::Int64(::fidl_next::TakeFrom::take_from(value))
11376                }
11377
11378                crate::data::Ref::Uint64(value) => {
11379                    Self::Uint64(::fidl_next::TakeFrom::take_from(value))
11380                }
11381
11382                crate::data::Ref::UnknownOrdinal_(unknown_ordinal) => {
11383                    Self::__SourceBreaking { unknown_ordinal }
11384                }
11385            }
11386        }
11387    }
11388
11389    impl ::fidl_next::TakeFrom<crate::WireOptionalData>
11390        for Option<Box<::fidl_fuchsia_component_sandbox::Data>>
11391    {
11392        #[inline]
11393        fn take_from(from: &crate::WireOptionalData) -> Self {
11394            if let Some(inner) = from.as_ref() {
11395                Some(::fidl_next::TakeFrom::take_from(inner))
11396            } else {
11397                None
11398            }
11399        }
11400    }
11401
11402    impl ::fidl_next::TakeFrom<crate::WireDictionaryRef>
11403        for ::fidl_fuchsia_component_sandbox::DictionaryRef
11404    {
11405        #[inline]
11406        fn take_from(from: &crate::WireDictionaryRef) -> Self {
11407            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11408        }
11409    }
11410
11411    impl ::fidl_next::TakeFrom<crate::WireConnector> for ::fidl_fuchsia_component_sandbox::Connector {
11412        #[inline]
11413        fn take_from(from: &crate::WireConnector) -> Self {
11414            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11415        }
11416    }
11417
11418    impl ::fidl_next::TakeFrom<crate::WireDirConnector>
11419        for ::fidl_fuchsia_component_sandbox::DirConnector
11420    {
11421        #[inline]
11422        fn take_from(from: &crate::WireDirConnector) -> Self {
11423            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11424        }
11425    }
11426
11427    impl ::fidl_next::TakeFrom<crate::WireDirEntry> for ::fidl_fuchsia_component_sandbox::DirEntry {
11428        #[inline]
11429        fn take_from(from: &crate::WireDirEntry) -> Self {
11430            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11431        }
11432    }
11433
11434    impl ::fidl_next::TakeFrom<crate::WireCapability> for ::fidl_fuchsia_component_sandbox::Capability {
11435        #[inline]
11436        fn take_from(from: &crate::WireCapability) -> Self {
11437            match from.as_ref() {
11438                crate::capability::Ref::Unit(value) => {
11439                    Self::Unit(::fidl_next::TakeFrom::take_from(value))
11440                }
11441
11442                crate::capability::Ref::Handle(value) => {
11443                    Self::Handle(::fidl_next::TakeFrom::take_from(value))
11444                }
11445
11446                crate::capability::Ref::Data(value) => {
11447                    Self::Data(::fidl_next::TakeFrom::take_from(value))
11448                }
11449
11450                crate::capability::Ref::Dictionary(value) => {
11451                    Self::Dictionary(::fidl_next::TakeFrom::take_from(value))
11452                }
11453
11454                crate::capability::Ref::Connector(value) => {
11455                    Self::Connector(::fidl_next::TakeFrom::take_from(value))
11456                }
11457
11458                crate::capability::Ref::DirConnector(value) => {
11459                    Self::DirConnector(::fidl_next::TakeFrom::take_from(value))
11460                }
11461
11462                crate::capability::Ref::Directory(value) => {
11463                    Self::Directory(::fidl_next::TakeFrom::take_from(value))
11464                }
11465
11466                crate::capability::Ref::DirEntry(value) => {
11467                    Self::DirEntry(::fidl_next::TakeFrom::take_from(value))
11468                }
11469
11470                crate::capability::Ref::ConnectorRouter(value) => {
11471                    Self::ConnectorRouter(::fidl_next::TakeFrom::take_from(value))
11472                }
11473
11474                crate::capability::Ref::DictionaryRouter(value) => {
11475                    Self::DictionaryRouter(::fidl_next::TakeFrom::take_from(value))
11476                }
11477
11478                crate::capability::Ref::DirEntryRouter(value) => {
11479                    Self::DirEntryRouter(::fidl_next::TakeFrom::take_from(value))
11480                }
11481
11482                crate::capability::Ref::DataRouter(value) => {
11483                    Self::DataRouter(::fidl_next::TakeFrom::take_from(value))
11484                }
11485
11486                crate::capability::Ref::DirConnectorRouter(value) => {
11487                    Self::DirConnectorRouter(::fidl_next::TakeFrom::take_from(value))
11488                }
11489
11490                crate::capability::Ref::UnknownOrdinal_(unknown_ordinal) => {
11491                    Self::__SourceBreaking { unknown_ordinal }
11492                }
11493            }
11494        }
11495    }
11496
11497    impl ::fidl_next::TakeFrom<crate::WireOptionalCapability>
11498        for Option<Box<::fidl_fuchsia_component_sandbox::Capability>>
11499    {
11500        #[inline]
11501        fn take_from(from: &crate::WireOptionalCapability) -> Self {
11502            if let Some(inner) = from.as_ref() {
11503                Some(::fidl_next::TakeFrom::take_from(inner))
11504            } else {
11505                None
11506            }
11507        }
11508    }
11509
11510    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDuplicateRequest>
11511        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDuplicateRequest
11512    {
11513        #[inline]
11514        fn take_from(from: &crate::WireCapabilityStoreDuplicateRequest) -> Self {
11515            Self {
11516                id: ::fidl_next::TakeFrom::take_from(&from.id),
11517
11518                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11519            }
11520        }
11521    }
11522
11523    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreError>
11524        for ::fidl_fuchsia_component_sandbox::CapabilityStoreError
11525    {
11526        #[inline]
11527        fn take_from(from: &crate::WireCapabilityStoreError) -> Self {
11528            match crate::CapabilityStoreError::from(*from) {
11529                crate::CapabilityStoreError::IdNotFound => Self::IdNotFound,
11530
11531                crate::CapabilityStoreError::IdAlreadyExists => Self::IdAlreadyExists,
11532
11533                crate::CapabilityStoreError::BadCapability => Self::BadCapability,
11534
11535                crate::CapabilityStoreError::WrongType => Self::WrongType,
11536
11537                crate::CapabilityStoreError::NotDuplicatable => Self::NotDuplicatable,
11538
11539                crate::CapabilityStoreError::ItemNotFound => Self::ItemNotFound,
11540
11541                crate::CapabilityStoreError::ItemAlreadyExists => Self::ItemAlreadyExists,
11542
11543                crate::CapabilityStoreError::InvalidKey => Self::InvalidKey,
11544
11545                crate::CapabilityStoreError::InvalidArgs => Self::InvalidArgs,
11546
11547                crate::CapabilityStoreError::UnknownOrdinal_(value) => {
11548                    Self::__SourceBreaking { unknown_ordinal: value }
11549                }
11550            }
11551        }
11552    }
11553
11554    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDropRequest>
11555        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDropRequest
11556    {
11557        #[inline]
11558        fn take_from(from: &crate::WireCapabilityStoreDropRequest) -> Self {
11559            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11560        }
11561    }
11562
11563    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreExportRequest>
11564        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportRequest
11565    {
11566        #[inline]
11567        fn take_from(from: &crate::WireCapabilityStoreExportRequest) -> Self {
11568            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11569        }
11570    }
11571
11572    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreExportResponse>
11573        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportResponse
11574    {
11575        #[inline]
11576        fn take_from(from: &crate::WireCapabilityStoreExportResponse) -> Self {
11577            Self { capability: ::fidl_next::TakeFrom::take_from(&from.capability) }
11578        }
11579    }
11580
11581    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreImportRequest>
11582        for ::fidl_fuchsia_component_sandbox::CapabilityStoreImportRequest
11583    {
11584        #[inline]
11585        fn take_from(from: &crate::WireCapabilityStoreImportRequest) -> Self {
11586            Self {
11587                id: ::fidl_next::TakeFrom::take_from(&from.id),
11588
11589                capability: ::fidl_next::TakeFrom::take_from(&from.capability),
11590            }
11591        }
11592    }
11593
11594    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreConnectorCreateRequest>
11595        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorCreateRequest
11596    {
11597        #[inline]
11598        fn take_from(from: &crate::WireCapabilityStoreConnectorCreateRequest) -> Self {
11599            Self {
11600                id: ::fidl_next::TakeFrom::take_from(&from.id),
11601
11602                receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
11603            }
11604        }
11605    }
11606
11607    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreConnectorOpenRequest>
11608        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorOpenRequest
11609    {
11610        #[inline]
11611        fn take_from(from: &crate::WireCapabilityStoreConnectorOpenRequest) -> Self {
11612            Self {
11613                id: ::fidl_next::TakeFrom::take_from(&from.id),
11614
11615                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11616            }
11617        }
11618    }
11619
11620    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDirConnectorCreateRequest>
11621        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorCreateRequest
11622    {
11623        #[inline]
11624        fn take_from(from: &crate::WireCapabilityStoreDirConnectorCreateRequest) -> Self {
11625            Self {
11626                id: ::fidl_next::TakeFrom::take_from(&from.id),
11627
11628                receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
11629            }
11630        }
11631    }
11632
11633    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDirConnectorOpenRequest>
11634        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorOpenRequest
11635    {
11636        #[inline]
11637        fn take_from(from: &crate::WireCapabilityStoreDirConnectorOpenRequest) -> Self {
11638            Self {
11639                id: ::fidl_next::TakeFrom::take_from(&from.id),
11640
11641                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11642            }
11643        }
11644    }
11645
11646    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryCreateRequest>
11647        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCreateRequest
11648    {
11649        #[inline]
11650        fn take_from(from: &crate::WireCapabilityStoreDictionaryCreateRequest) -> Self {
11651            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11652        }
11653    }
11654
11655    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryLegacyImportRequest>
11656        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyImportRequest
11657    {
11658        #[inline]
11659        fn take_from(from: &crate::WireCapabilityStoreDictionaryLegacyImportRequest) -> Self {
11660            Self {
11661                id: ::fidl_next::TakeFrom::take_from(&from.id),
11662
11663                client_end: ::fidl_next::TakeFrom::take_from(&from.client_end),
11664            }
11665        }
11666    }
11667
11668    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryLegacyExportRequest>
11669        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyExportRequest
11670    {
11671        #[inline]
11672        fn take_from(from: &crate::WireCapabilityStoreDictionaryLegacyExportRequest) -> Self {
11673            Self {
11674                id: ::fidl_next::TakeFrom::take_from(&from.id),
11675
11676                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11677            }
11678        }
11679    }
11680
11681    impl ::fidl_next::TakeFrom<crate::WireDictionaryItem>
11682        for ::fidl_fuchsia_component_sandbox::DictionaryItem
11683    {
11684        #[inline]
11685        fn take_from(from: &crate::WireDictionaryItem) -> Self {
11686            Self {
11687                key: ::fidl_next::TakeFrom::take_from(&from.key),
11688
11689                value: ::fidl_next::TakeFrom::take_from(&from.value),
11690            }
11691        }
11692    }
11693
11694    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryInsertRequest>
11695        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryInsertRequest
11696    {
11697        #[inline]
11698        fn take_from(from: &crate::WireCapabilityStoreDictionaryInsertRequest) -> Self {
11699            Self {
11700                id: ::fidl_next::TakeFrom::take_from(&from.id),
11701
11702                item: ::fidl_next::TakeFrom::take_from(&from.item),
11703            }
11704        }
11705    }
11706
11707    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryGetRequest>
11708        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryGetRequest
11709    {
11710        #[inline]
11711        fn take_from(from: &crate::WireCapabilityStoreDictionaryGetRequest) -> Self {
11712            Self {
11713                id: ::fidl_next::TakeFrom::take_from(&from.id),
11714
11715                key: ::fidl_next::TakeFrom::take_from(&from.key),
11716
11717                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11718            }
11719        }
11720    }
11721
11722    impl ::fidl_next::TakeFrom<crate::WireWrappedCapabilityId>
11723        for ::fidl_fuchsia_component_sandbox::WrappedCapabilityId
11724    {
11725        #[inline]
11726        fn take_from(from: &crate::WireWrappedCapabilityId) -> Self {
11727            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11728        }
11729    }
11730
11731    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryRemoveRequest>
11732        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryRemoveRequest
11733    {
11734        #[inline]
11735        fn take_from(from: &crate::WireCapabilityStoreDictionaryRemoveRequest) -> Self {
11736            Self {
11737                id: ::fidl_next::TakeFrom::take_from(&from.id),
11738
11739                key: ::fidl_next::TakeFrom::take_from(&from.key),
11740
11741                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11742            }
11743        }
11744    }
11745
11746    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryCopyRequest>
11747        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCopyRequest
11748    {
11749        #[inline]
11750        fn take_from(from: &crate::WireCapabilityStoreDictionaryCopyRequest) -> Self {
11751            Self {
11752                id: ::fidl_next::TakeFrom::take_from(&from.id),
11753
11754                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11755            }
11756        }
11757    }
11758
11759    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryKeysRequest>
11760        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryKeysRequest
11761    {
11762        #[inline]
11763        fn take_from(from: &crate::WireCapabilityStoreDictionaryKeysRequest) -> Self {
11764            Self {
11765                id: ::fidl_next::TakeFrom::take_from(&from.id),
11766
11767                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11768            }
11769        }
11770    }
11771
11772    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryEnumerateRequest>
11773        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryEnumerateRequest
11774    {
11775        #[inline]
11776        fn take_from(from: &crate::WireCapabilityStoreDictionaryEnumerateRequest) -> Self {
11777            Self {
11778                id: ::fidl_next::TakeFrom::take_from(&from.id),
11779
11780                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11781            }
11782        }
11783    }
11784
11785    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryDrainRequest>
11786        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryDrainRequest
11787    {
11788        #[inline]
11789        fn take_from(from: &crate::WireCapabilityStoreDictionaryDrainRequest) -> Self {
11790            Self {
11791                id: ::fidl_next::TakeFrom::take_from(&from.id),
11792
11793                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11794            }
11795        }
11796    }
11797
11798    #[cfg(target_os = "fuchsia")]
11799    /// An alias for a client sender over `zx::Channel` for the `CapabilityStore`
11800    /// protocol.
11801    pub type CapabilityStoreProxy =
11802        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::CapabilityStore>;
11803
11804    impl ::fidl_next::TakeFrom<crate::CapabilityStore>
11805        for ::fidl_fuchsia_component_sandbox::CapabilityStoreMarker
11806    {
11807        #[inline]
11808        fn take_from(from: &crate::CapabilityStore) -> Self {
11809            Self
11810        }
11811    }
11812
11813    impl ::fidl_next::TakeFrom<crate::WireInstanceToken>
11814        for ::fidl_fuchsia_component_sandbox::InstanceToken
11815    {
11816        #[inline]
11817        fn take_from(from: &crate::WireInstanceToken) -> Self {
11818            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11819        }
11820    }
11821
11822    impl ::fidl_next::TakeFrom<crate::WireRouteRequest>
11823        for ::fidl_fuchsia_component_sandbox::RouteRequest
11824    {
11825        #[inline]
11826        fn take_from(from: &crate::WireRouteRequest) -> Self {
11827            Self {
11828                requesting: from.requesting().map(::fidl_next::TakeFrom::take_from),
11829
11830                metadata: from.metadata().map(::fidl_next::TakeFrom::take_from),
11831
11832                __source_breaking: ::fidl::marker::SourceBreaking,
11833            }
11834        }
11835    }
11836
11837    impl ::fidl_next::TakeFrom<crate::WireConnectorRouterRouteResponse>
11838        for ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse
11839    {
11840        #[inline]
11841        fn take_from(from: &crate::WireConnectorRouterRouteResponse) -> Self {
11842            match from.as_ref() {
11843                crate::connector_router_route_response::Ref::Connector(value) => {
11844                    Self::Connector(::fidl_next::TakeFrom::take_from(value))
11845                }
11846
11847                crate::connector_router_route_response::Ref::Unavailable(value) => {
11848                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
11849                }
11850            }
11851        }
11852    }
11853
11854    impl ::fidl_next::TakeFrom<crate::WireOptionalConnectorRouterRouteResponse>
11855        for Option<Box<::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse>>
11856    {
11857        #[inline]
11858        fn take_from(from: &crate::WireOptionalConnectorRouterRouteResponse) -> Self {
11859            if let Some(inner) = from.as_ref() {
11860                Some(::fidl_next::TakeFrom::take_from(inner))
11861            } else {
11862                None
11863            }
11864        }
11865    }
11866
11867    impl ::fidl_next::TakeFrom<crate::WireRouterError>
11868        for ::fidl_fuchsia_component_sandbox::RouterError
11869    {
11870        #[inline]
11871        fn take_from(from: &crate::WireRouterError) -> Self {
11872            match crate::RouterError::from(*from) {
11873                crate::RouterError::NotFound => Self::NotFound,
11874
11875                crate::RouterError::InvalidArgs => Self::InvalidArgs,
11876
11877                crate::RouterError::NotSupported => Self::NotSupported,
11878
11879                crate::RouterError::Internal => Self::Internal,
11880
11881                crate::RouterError::UnknownOrdinal_(value) => {
11882                    Self::__SourceBreaking { unknown_ordinal: value }
11883                }
11884            }
11885        }
11886    }
11887
11888    #[cfg(target_os = "fuchsia")]
11889    /// An alias for a client sender over `zx::Channel` for the `ConnectorRouter`
11890    /// protocol.
11891    pub type ConnectorRouterProxy =
11892        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::ConnectorRouter>;
11893
11894    impl ::fidl_next::TakeFrom<crate::ConnectorRouter>
11895        for ::fidl_fuchsia_component_sandbox::ConnectorRouterMarker
11896    {
11897        #[inline]
11898        fn take_from(from: &crate::ConnectorRouter) -> Self {
11899            Self
11900        }
11901    }
11902
11903    impl ::fidl_next::TakeFrom<crate::WireDataRouterRouteResponse>
11904        for ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse
11905    {
11906        #[inline]
11907        fn take_from(from: &crate::WireDataRouterRouteResponse) -> Self {
11908            match from.as_ref() {
11909                crate::data_router_route_response::Ref::Data(value) => {
11910                    Self::Data(::fidl_next::TakeFrom::take_from(value))
11911                }
11912
11913                crate::data_router_route_response::Ref::Unavailable(value) => {
11914                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
11915                }
11916            }
11917        }
11918    }
11919
11920    impl ::fidl_next::TakeFrom<crate::WireOptionalDataRouterRouteResponse>
11921        for Option<Box<::fidl_fuchsia_component_sandbox::DataRouterRouteResponse>>
11922    {
11923        #[inline]
11924        fn take_from(from: &crate::WireOptionalDataRouterRouteResponse) -> Self {
11925            if let Some(inner) = from.as_ref() {
11926                Some(::fidl_next::TakeFrom::take_from(inner))
11927            } else {
11928                None
11929            }
11930        }
11931    }
11932
11933    #[cfg(target_os = "fuchsia")]
11934    /// An alias for a client sender over `zx::Channel` for the `DataRouter`
11935    /// protocol.
11936    pub type DataRouterProxy =
11937        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DataRouter>;
11938
11939    impl ::fidl_next::TakeFrom<crate::DataRouter>
11940        for ::fidl_fuchsia_component_sandbox::DataRouterMarker
11941    {
11942        #[inline]
11943        fn take_from(from: &crate::DataRouter) -> Self {
11944            Self
11945        }
11946    }
11947
11948    #[cfg(target_os = "fuchsia")]
11949    /// An alias for a client sender over `zx::Channel` for the `Dictionary`
11950    /// protocol.
11951    pub type DictionaryProxy =
11952        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Dictionary>;
11953
11954    impl ::fidl_next::TakeFrom<crate::Dictionary>
11955        for ::fidl_fuchsia_component_sandbox::DictionaryMarker
11956    {
11957        #[inline]
11958        fn take_from(from: &crate::Dictionary) -> Self {
11959            Self
11960        }
11961    }
11962
11963    impl ::fidl_next::TakeFrom<crate::WireDictionaryDrainIteratorGetNextRequest>
11964        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextRequest
11965    {
11966        #[inline]
11967        fn take_from(from: &crate::WireDictionaryDrainIteratorGetNextRequest) -> Self {
11968            Self {
11969                start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
11970
11971                limit: ::fidl_next::TakeFrom::take_from(&from.limit),
11972            }
11973        }
11974    }
11975
11976    impl ::fidl_next::TakeFrom<crate::WireDictionaryDrainIteratorGetNextResponse>
11977        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextResponse
11978    {
11979        #[inline]
11980        fn take_from(from: &crate::WireDictionaryDrainIteratorGetNextResponse) -> Self {
11981            Self {
11982                items: ::fidl_next::TakeFrom::take_from(&from.items),
11983
11984                end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
11985            }
11986        }
11987    }
11988
11989    #[cfg(target_os = "fuchsia")]
11990    /// An alias for a client sender over `zx::Channel` for the `DictionaryDrainIterator`
11991    /// protocol.
11992    pub type DictionaryDrainIteratorProxy = ::fidl_next::ClientSender<
11993        ::fidl_next::fuchsia::zx::Channel,
11994        crate::DictionaryDrainIterator,
11995    >;
11996
11997    impl ::fidl_next::TakeFrom<crate::DictionaryDrainIterator>
11998        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorMarker
11999    {
12000        #[inline]
12001        fn take_from(from: &crate::DictionaryDrainIterator) -> Self {
12002            Self
12003        }
12004    }
12005
12006    impl ::fidl_next::TakeFrom<crate::WireDictionaryEnumerateIteratorGetNextRequest>
12007        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextRequest
12008    {
12009        #[inline]
12010        fn take_from(from: &crate::WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
12011            Self {
12012                start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
12013
12014                limit: ::fidl_next::TakeFrom::take_from(&from.limit),
12015            }
12016        }
12017    }
12018
12019    impl ::fidl_next::TakeFrom<crate::WireDictionaryOptionalItem>
12020        for ::fidl_fuchsia_component_sandbox::DictionaryOptionalItem
12021    {
12022        #[inline]
12023        fn take_from(from: &crate::WireDictionaryOptionalItem) -> Self {
12024            Self {
12025                key: ::fidl_next::TakeFrom::take_from(&from.key),
12026
12027                value: ::fidl_next::TakeFrom::take_from(&from.value),
12028            }
12029        }
12030    }
12031
12032    impl ::fidl_next::TakeFrom<crate::WireDictionaryEnumerateIteratorGetNextResponse>
12033        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextResponse
12034    {
12035        #[inline]
12036        fn take_from(from: &crate::WireDictionaryEnumerateIteratorGetNextResponse) -> Self {
12037            Self {
12038                items: ::fidl_next::TakeFrom::take_from(&from.items),
12039
12040                end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
12041            }
12042        }
12043    }
12044
12045    #[cfg(target_os = "fuchsia")]
12046    /// An alias for a client sender over `zx::Channel` for the `DictionaryEnumerateIterator`
12047    /// protocol.
12048    pub type DictionaryEnumerateIteratorProxy = ::fidl_next::ClientSender<
12049        ::fidl_next::fuchsia::zx::Channel,
12050        crate::DictionaryEnumerateIterator,
12051    >;
12052
12053    impl ::fidl_next::TakeFrom<crate::DictionaryEnumerateIterator>
12054        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorMarker
12055    {
12056        #[inline]
12057        fn take_from(from: &crate::DictionaryEnumerateIterator) -> Self {
12058            Self
12059        }
12060    }
12061
12062    impl ::fidl_next::TakeFrom<crate::WireDictionaryError>
12063        for ::fidl_fuchsia_component_sandbox::DictionaryError
12064    {
12065        #[inline]
12066        fn take_from(from: &crate::WireDictionaryError) -> Self {
12067            match crate::DictionaryError::from(*from) {
12068                crate::DictionaryError::NotFound => Self::NotFound,
12069
12070                crate::DictionaryError::AlreadyExists => Self::AlreadyExists,
12071
12072                crate::DictionaryError::BadCapability => Self::BadCapability,
12073
12074                crate::DictionaryError::InvalidKey => Self::InvalidKey,
12075
12076                crate::DictionaryError::NotCloneable => Self::NotCloneable,
12077
12078                crate::DictionaryError::UnknownOrdinal_(value) => {
12079                    Self::__SourceBreaking { unknown_ordinal: value }
12080                }
12081            }
12082        }
12083    }
12084
12085    impl ::fidl_next::TakeFrom<crate::WireDictionaryKeysIteratorGetNextResponse>
12086        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorGetNextResponse
12087    {
12088        #[inline]
12089        fn take_from(from: &crate::WireDictionaryKeysIteratorGetNextResponse) -> Self {
12090            Self { keys: ::fidl_next::TakeFrom::take_from(&from.keys) }
12091        }
12092    }
12093
12094    #[cfg(target_os = "fuchsia")]
12095    /// An alias for a client sender over `zx::Channel` for the `DictionaryKeysIterator`
12096    /// protocol.
12097    pub type DictionaryKeysIteratorProxy =
12098        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DictionaryKeysIterator>;
12099
12100    impl ::fidl_next::TakeFrom<crate::DictionaryKeysIterator>
12101        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorMarker
12102    {
12103        #[inline]
12104        fn take_from(from: &crate::DictionaryKeysIterator) -> Self {
12105            Self
12106        }
12107    }
12108
12109    impl ::fidl_next::TakeFrom<crate::WireDictionaryRouterRouteResponse>
12110        for ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse
12111    {
12112        #[inline]
12113        fn take_from(from: &crate::WireDictionaryRouterRouteResponse) -> Self {
12114            match from.as_ref() {
12115                crate::dictionary_router_route_response::Ref::Dictionary(value) => {
12116                    Self::Dictionary(::fidl_next::TakeFrom::take_from(value))
12117                }
12118
12119                crate::dictionary_router_route_response::Ref::Unavailable(value) => {
12120                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12121                }
12122            }
12123        }
12124    }
12125
12126    impl ::fidl_next::TakeFrom<crate::WireOptionalDictionaryRouterRouteResponse>
12127        for Option<Box<::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse>>
12128    {
12129        #[inline]
12130        fn take_from(from: &crate::WireOptionalDictionaryRouterRouteResponse) -> Self {
12131            if let Some(inner) = from.as_ref() {
12132                Some(::fidl_next::TakeFrom::take_from(inner))
12133            } else {
12134                None
12135            }
12136        }
12137    }
12138
12139    #[cfg(target_os = "fuchsia")]
12140    /// An alias for a client sender over `zx::Channel` for the `DictionaryRouter`
12141    /// protocol.
12142    pub type DictionaryRouterProxy =
12143        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DictionaryRouter>;
12144
12145    impl ::fidl_next::TakeFrom<crate::DictionaryRouter>
12146        for ::fidl_fuchsia_component_sandbox::DictionaryRouterMarker
12147    {
12148        #[inline]
12149        fn take_from(from: &crate::DictionaryRouter) -> Self {
12150            Self
12151        }
12152    }
12153
12154    impl ::fidl_next::TakeFrom<crate::WireDirConnectorRouterRouteResponse>
12155        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse
12156    {
12157        #[inline]
12158        fn take_from(from: &crate::WireDirConnectorRouterRouteResponse) -> Self {
12159            match from.as_ref() {
12160                crate::dir_connector_router_route_response::Ref::DirConnector(value) => {
12161                    Self::DirConnector(::fidl_next::TakeFrom::take_from(value))
12162                }
12163
12164                crate::dir_connector_router_route_response::Ref::Unavailable(value) => {
12165                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12166                }
12167            }
12168        }
12169    }
12170
12171    impl ::fidl_next::TakeFrom<crate::WireOptionalDirConnectorRouterRouteResponse>
12172        for Option<Box<::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse>>
12173    {
12174        #[inline]
12175        fn take_from(from: &crate::WireOptionalDirConnectorRouterRouteResponse) -> Self {
12176            if let Some(inner) = from.as_ref() {
12177                Some(::fidl_next::TakeFrom::take_from(inner))
12178            } else {
12179                None
12180            }
12181        }
12182    }
12183
12184    #[cfg(target_os = "fuchsia")]
12185    /// An alias for a client sender over `zx::Channel` for the `DirConnectorRouter`
12186    /// protocol.
12187    pub type DirConnectorRouterProxy =
12188        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirConnectorRouter>;
12189
12190    impl ::fidl_next::TakeFrom<crate::DirConnectorRouter>
12191        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterMarker
12192    {
12193        #[inline]
12194        fn take_from(from: &crate::DirConnectorRouter) -> Self {
12195            Self
12196        }
12197    }
12198
12199    impl ::fidl_next::TakeFrom<crate::WireDirEntryRouterRouteResponse>
12200        for ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse
12201    {
12202        #[inline]
12203        fn take_from(from: &crate::WireDirEntryRouterRouteResponse) -> Self {
12204            match from.as_ref() {
12205                crate::dir_entry_router_route_response::Ref::DirEntry(value) => {
12206                    Self::DirEntry(::fidl_next::TakeFrom::take_from(value))
12207                }
12208
12209                crate::dir_entry_router_route_response::Ref::Unavailable(value) => {
12210                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12211                }
12212            }
12213        }
12214    }
12215
12216    impl ::fidl_next::TakeFrom<crate::WireOptionalDirEntryRouterRouteResponse>
12217        for Option<Box<::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse>>
12218    {
12219        #[inline]
12220        fn take_from(from: &crate::WireOptionalDirEntryRouterRouteResponse) -> Self {
12221            if let Some(inner) = from.as_ref() {
12222                Some(::fidl_next::TakeFrom::take_from(inner))
12223            } else {
12224                None
12225            }
12226        }
12227    }
12228
12229    #[cfg(target_os = "fuchsia")]
12230    /// An alias for a client sender over `zx::Channel` for the `DirEntryRouter`
12231    /// protocol.
12232    pub type DirEntryRouterProxy =
12233        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirEntryRouter>;
12234
12235    impl ::fidl_next::TakeFrom<crate::DirEntryRouter>
12236        for ::fidl_fuchsia_component_sandbox::DirEntryRouterMarker
12237    {
12238        #[inline]
12239        fn take_from(from: &crate::DirEntryRouter) -> Self {
12240            Self
12241        }
12242    }
12243
12244    impl ::fidl_next::TakeFrom<crate::WireDirReceiverReceiveRequest>
12245        for ::fidl_fuchsia_component_sandbox::DirReceiverReceiveRequest
12246    {
12247        #[inline]
12248        fn take_from(from: &crate::WireDirReceiverReceiveRequest) -> Self {
12249            Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
12250        }
12251    }
12252
12253    #[cfg(target_os = "fuchsia")]
12254    /// An alias for a client sender over `zx::Channel` for the `DirReceiver`
12255    /// protocol.
12256    pub type DirReceiverProxy =
12257        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirReceiver>;
12258
12259    impl ::fidl_next::TakeFrom<crate::DirReceiver>
12260        for ::fidl_fuchsia_component_sandbox::DirReceiverMarker
12261    {
12262        #[inline]
12263        fn take_from(from: &crate::DirReceiver) -> Self {
12264            Self
12265        }
12266    }
12267
12268    impl ::fidl_next::TakeFrom<crate::WireDirectoryRouterRouteResponse>
12269        for ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse
12270    {
12271        #[inline]
12272        fn take_from(from: &crate::WireDirectoryRouterRouteResponse) -> Self {
12273            match from.as_ref() {
12274                crate::directory_router_route_response::Ref::Directory(value) => {
12275                    Self::Directory(::fidl_next::TakeFrom::take_from(value))
12276                }
12277
12278                crate::directory_router_route_response::Ref::Unavailable(value) => {
12279                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12280                }
12281            }
12282        }
12283    }
12284
12285    impl ::fidl_next::TakeFrom<crate::WireOptionalDirectoryRouterRouteResponse>
12286        for Option<Box<::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse>>
12287    {
12288        #[inline]
12289        fn take_from(from: &crate::WireOptionalDirectoryRouterRouteResponse) -> Self {
12290            if let Some(inner) = from.as_ref() {
12291                Some(::fidl_next::TakeFrom::take_from(inner))
12292            } else {
12293                None
12294            }
12295        }
12296    }
12297
12298    #[cfg(target_os = "fuchsia")]
12299    /// An alias for a client sender over `zx::Channel` for the `DirectoryRouter`
12300    /// protocol.
12301    pub type DirectoryRouterProxy =
12302        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirectoryRouter>;
12303
12304    impl ::fidl_next::TakeFrom<crate::DirectoryRouter>
12305        for ::fidl_fuchsia_component_sandbox::DirectoryRouterMarker
12306    {
12307        #[inline]
12308        fn take_from(from: &crate::DirectoryRouter) -> Self {
12309            Self
12310        }
12311    }
12312
12313    impl ::fidl_next::TakeFrom<crate::WireProtocolPayload>
12314        for ::fidl_fuchsia_component_sandbox::ProtocolPayload
12315    {
12316        #[inline]
12317        fn take_from(from: &crate::WireProtocolPayload) -> Self {
12318            Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
12319        }
12320    }
12321
12322    #[cfg(target_os = "fuchsia")]
12323    /// An alias for a client sender over `zx::Channel` for the `Receiver`
12324    /// protocol.
12325    pub type ReceiverProxy =
12326        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Receiver>;
12327
12328    impl ::fidl_next::TakeFrom<crate::Receiver> for ::fidl_fuchsia_component_sandbox::ReceiverMarker {
12329        #[inline]
12330        fn take_from(from: &crate::Receiver) -> Self {
12331            Self
12332        }
12333    }
12334
12335    impl ::fidl_next::TakeFrom<crate::WireUnavailable>
12336        for ::fidl_fuchsia_component_sandbox::Unavailable
12337    {
12338        #[inline]
12339        fn take_from(from: &crate::WireUnavailable) -> Self {
12340            Self {}
12341        }
12342    }
12343}