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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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::RequestBuffer<___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                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5871                handler.duplicate(sender, buffer, responder);
5872            }
5873
5874            753328233834620249 => {
5875                let responder = ::fidl_next::Responder::from_untyped(responder);
5876
5877                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5878                handler.drop(sender, buffer, responder);
5879            }
5880
5881            226159162093533951 => {
5882                let responder = ::fidl_next::Responder::from_untyped(responder);
5883
5884                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5885                handler.export(sender, buffer, responder);
5886            }
5887
5888            2276030276116435867 => {
5889                let responder = ::fidl_next::Responder::from_untyped(responder);
5890
5891                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5892                handler.import(sender, buffer, responder);
5893            }
5894
5895            2979461408102095909 => {
5896                let responder = ::fidl_next::Responder::from_untyped(responder);
5897
5898                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5899                handler.connector_create(sender, buffer, responder);
5900            }
5901
5902            6016362336453278623 => {
5903                let responder = ::fidl_next::Responder::from_untyped(responder);
5904
5905                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5906                handler.connector_open(sender, buffer, responder);
5907            }
5908
5909            1756747594275428795 => {
5910                let responder = ::fidl_next::Responder::from_untyped(responder);
5911
5912                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5913                handler.dir_connector_create(sender, buffer, responder);
5914            }
5915
5916            6219704004220369153 => {
5917                let responder = ::fidl_next::Responder::from_untyped(responder);
5918
5919                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5920                handler.dir_connector_open(sender, buffer, responder);
5921            }
5922
5923            7608770958894948499 => {
5924                let responder = ::fidl_next::Responder::from_untyped(responder);
5925
5926                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5927                handler.dictionary_create(sender, buffer, responder);
5928            }
5929
5930            8285893703432012383 => {
5931                let responder = ::fidl_next::Responder::from_untyped(responder);
5932
5933                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5934                handler.dictionary_legacy_import(sender, buffer, responder);
5935            }
5936
5937            4647175832683306445 => {
5938                let responder = ::fidl_next::Responder::from_untyped(responder);
5939
5940                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5941                handler.dictionary_legacy_export(sender, buffer, responder);
5942            }
5943
5944            8575443262986538023 => {
5945                let responder = ::fidl_next::Responder::from_untyped(responder);
5946
5947                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5948                handler.dictionary_insert(sender, buffer, responder);
5949            }
5950
5951            5592951026866236882 => {
5952                let responder = ::fidl_next::Responder::from_untyped(responder);
5953
5954                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5955                handler.dictionary_get(sender, buffer, responder);
5956            }
5957
5958            343892214579320051 => {
5959                let responder = ::fidl_next::Responder::from_untyped(responder);
5960
5961                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5962                handler.dictionary_remove(sender, buffer, responder);
5963            }
5964
5965            3977783339739362383 => {
5966                let responder = ::fidl_next::Responder::from_untyped(responder);
5967
5968                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5969                handler.dictionary_copy(sender, buffer, responder);
5970            }
5971
5972            597577248872787102 => {
5973                let responder = ::fidl_next::Responder::from_untyped(responder);
5974
5975                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5976                handler.dictionary_keys(sender, buffer, responder);
5977            }
5978
5979            964467096271472193 => {
5980                let responder = ::fidl_next::Responder::from_untyped(responder);
5981
5982                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5983                handler.dictionary_enumerate(sender, buffer, responder);
5984            }
5985
5986            2928364469569621208 => {
5987                let responder = ::fidl_next::Responder::from_untyped(responder);
5988
5989                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
5990                handler.dictionary_drain(sender, buffer, responder);
5991            }
5992
5993            ordinal => handler.on_unknown_interaction(sender, ordinal),
5994        }
5995    }
5996}
5997
5998#[doc = " Represents an instance in the component tree, either a component\n instance or component manager\'s instance.\n"]
5999#[derive(Debug)]
6000#[repr(C)]
6001pub struct InstanceToken {
6002    pub token: ::fidl_next::fuchsia::zx::Handle,
6003}
6004
6005impl ::fidl_next::Encodable for InstanceToken {
6006    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
6007        ::fidl_next::CopyOptimization::enable_if(
6008            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6009                .is_enabled(),
6010        )
6011    };
6012
6013    type Encoded = WireInstanceToken;
6014}
6015
6016unsafe impl<___E> ::fidl_next::Encode<___E> for InstanceToken
6017where
6018    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6019
6020    ___E: ::fidl_next::fuchsia::HandleEncoder,
6021{
6022    #[inline]
6023    fn encode(
6024        &mut self,
6025        encoder: &mut ___E,
6026        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6027    ) -> Result<(), ::fidl_next::EncodeError> {
6028        ::fidl_next::munge! {
6029            let Self::Encoded {
6030                token,
6031
6032            } = out;
6033        }
6034
6035        ::fidl_next::Encode::encode(&mut self.token, encoder, token)?;
6036
6037        Ok(())
6038    }
6039}
6040
6041impl ::fidl_next::EncodableOption for Box<InstanceToken> {
6042    type EncodedOption = ::fidl_next::WireBox<WireInstanceToken>;
6043}
6044
6045unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<InstanceToken>
6046where
6047    ___E: ::fidl_next::Encoder + ?Sized,
6048    InstanceToken: ::fidl_next::Encode<___E>,
6049{
6050    #[inline]
6051    fn encode_option(
6052        this: Option<&mut Self>,
6053        encoder: &mut ___E,
6054        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6055    ) -> Result<(), ::fidl_next::EncodeError> {
6056        if let Some(inner) = this {
6057            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
6058            ::fidl_next::WireBox::encode_present(out);
6059        } else {
6060            ::fidl_next::WireBox::encode_absent(out);
6061        }
6062
6063        Ok(())
6064    }
6065}
6066
6067impl ::fidl_next::TakeFrom<WireInstanceToken> for InstanceToken {
6068    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
6069        ::fidl_next::CopyOptimization::enable_if(
6070            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
6071                .is_enabled(),
6072        )
6073    };
6074
6075    #[inline]
6076    fn take_from(from: &WireInstanceToken) -> Self {
6077        Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
6078    }
6079}
6080
6081/// The wire type corresponding to [`InstanceToken`].
6082#[derive(Debug)]
6083#[repr(C)]
6084pub struct WireInstanceToken {
6085    pub token: ::fidl_next::fuchsia::WireHandle,
6086}
6087
6088unsafe impl ::fidl_next::ZeroPadding for WireInstanceToken {
6089    #[inline]
6090    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
6091}
6092
6093unsafe impl<___D> ::fidl_next::Decode<___D> for WireInstanceToken
6094where
6095    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6096
6097    ___D: ::fidl_next::fuchsia::HandleDecoder,
6098{
6099    fn decode(
6100        slot: ::fidl_next::Slot<'_, Self>,
6101        decoder: &mut ___D,
6102    ) -> Result<(), ::fidl_next::DecodeError> {
6103        ::fidl_next::munge! {
6104            let Self {
6105                mut token,
6106
6107            } = slot;
6108        }
6109
6110        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
6111
6112        Ok(())
6113    }
6114}
6115
6116#[doc = " A request for a route.\n"]
6117#[derive(Debug, Default)]
6118pub struct RouteRequest {
6119    pub requesting: Option<crate::InstanceToken>,
6120
6121    pub metadata: Option<crate::DictionaryRef>,
6122}
6123
6124impl RouteRequest {
6125    fn __max_ordinal(&self) -> usize {
6126        if self.requesting.is_some() {
6127            return 1;
6128        }
6129
6130        if self.metadata.is_some() {
6131            return 2;
6132        }
6133
6134        0
6135    }
6136}
6137
6138impl ::fidl_next::Encodable for RouteRequest {
6139    type Encoded = WireRouteRequest;
6140}
6141
6142unsafe impl<___E> ::fidl_next::Encode<___E> for RouteRequest
6143where
6144    ___E: ::fidl_next::Encoder + ?Sized,
6145
6146    ___E: ::fidl_next::fuchsia::HandleEncoder,
6147{
6148    #[inline]
6149    fn encode(
6150        &mut self,
6151        encoder: &mut ___E,
6152        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6153    ) -> Result<(), ::fidl_next::EncodeError> {
6154        ::fidl_next::munge!(let WireRouteRequest { table } = out);
6155
6156        let max_ord = self.__max_ordinal();
6157
6158        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
6159        ::fidl_next::ZeroPadding::zero_padding(&mut out);
6160
6161        let mut preallocated =
6162            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
6163
6164        for i in 1..=max_ord {
6165            match i {
6166                2 => {
6167                    if let Some(metadata) = &mut self.metadata {
6168                        ::fidl_next::WireEnvelope::encode_value(
6169                            metadata,
6170                            preallocated.encoder,
6171                            &mut out,
6172                        )?;
6173                    } else {
6174                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
6175                    }
6176                }
6177
6178                1 => {
6179                    if let Some(requesting) = &mut self.requesting {
6180                        ::fidl_next::WireEnvelope::encode_value(
6181                            requesting,
6182                            preallocated.encoder,
6183                            &mut out,
6184                        )?;
6185                    } else {
6186                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
6187                    }
6188                }
6189
6190                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
6191            }
6192            unsafe {
6193                preallocated.write_next(out.assume_init_ref());
6194            }
6195        }
6196
6197        ::fidl_next::WireTable::encode_len(table, max_ord);
6198
6199        Ok(())
6200    }
6201}
6202
6203impl ::fidl_next::TakeFrom<WireRouteRequest> for RouteRequest {
6204    #[inline]
6205    fn take_from(from: &WireRouteRequest) -> Self {
6206        Self {
6207            requesting: from.requesting().map(::fidl_next::TakeFrom::take_from),
6208
6209            metadata: from.metadata().map(::fidl_next::TakeFrom::take_from),
6210        }
6211    }
6212}
6213
6214/// The wire type corresponding to [`RouteRequest`].
6215#[repr(C)]
6216pub struct WireRouteRequest {
6217    table: ::fidl_next::WireTable,
6218}
6219
6220unsafe impl ::fidl_next::ZeroPadding for WireRouteRequest {
6221    #[inline]
6222    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6223        ::fidl_next::munge!(let Self { table } = out);
6224        ::fidl_next::WireTable::zero_padding(table);
6225    }
6226}
6227
6228unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouteRequest
6229where
6230    ___D: ::fidl_next::Decoder + ?Sized,
6231
6232    ___D: ::fidl_next::fuchsia::HandleDecoder,
6233{
6234    fn decode(
6235        slot: ::fidl_next::Slot<'_, Self>,
6236        decoder: &mut ___D,
6237    ) -> Result<(), ::fidl_next::DecodeError> {
6238        ::fidl_next::munge!(let Self { table } = slot);
6239
6240        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
6241            match ordinal {
6242                0 => unsafe { ::core::hint::unreachable_unchecked() },
6243
6244                1 => {
6245                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireInstanceToken>(
6246                        slot.as_mut(),
6247                        decoder,
6248                    )?;
6249
6250                    Ok(())
6251                }
6252
6253                2 => {
6254                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireDictionaryRef>(
6255                        slot.as_mut(),
6256                        decoder,
6257                    )?;
6258
6259                    Ok(())
6260                }
6261
6262                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
6263            }
6264        })
6265    }
6266}
6267
6268impl WireRouteRequest {
6269    pub fn requesting(&self) -> Option<&crate::WireInstanceToken> {
6270        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
6271    }
6272
6273    pub fn metadata(&self) -> Option<&crate::WireDictionaryRef> {
6274        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
6275    }
6276}
6277
6278impl ::core::fmt::Debug for WireRouteRequest {
6279    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
6280        f.debug_struct("RouteRequest")
6281            .field("requesting", &self.requesting())
6282            .field("metadata", &self.metadata())
6283            .finish()
6284    }
6285}
6286
6287#[derive(Debug)]
6288pub enum ConnectorRouterRouteResponse {
6289    Connector(crate::Connector),
6290
6291    Unavailable(crate::Unit),
6292}
6293
6294impl ::fidl_next::Encodable for ConnectorRouterRouteResponse {
6295    type Encoded = WireConnectorRouterRouteResponse;
6296}
6297
6298unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectorRouterRouteResponse
6299where
6300    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6301
6302    ___E: ::fidl_next::fuchsia::HandleEncoder,
6303{
6304    #[inline]
6305    fn encode(
6306        &mut self,
6307        encoder: &mut ___E,
6308        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6309    ) -> Result<(), ::fidl_next::EncodeError> {
6310        ::fidl_next::munge!(let WireConnectorRouterRouteResponse { raw } = out);
6311
6312        match self {
6313            Self::Connector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
6314                ___E,
6315                crate::Connector,
6316            >(value, 1, encoder, raw)?,
6317
6318            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
6319                ___E,
6320                crate::Unit,
6321            >(value, 2, encoder, raw)?,
6322        }
6323
6324        Ok(())
6325    }
6326}
6327
6328impl ::fidl_next::EncodableOption for Box<ConnectorRouterRouteResponse> {
6329    type EncodedOption = WireOptionalConnectorRouterRouteResponse;
6330}
6331
6332unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ConnectorRouterRouteResponse>
6333where
6334    ___E: ?Sized,
6335    ConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
6336{
6337    #[inline]
6338    fn encode_option(
6339        this: Option<&mut Self>,
6340        encoder: &mut ___E,
6341        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6342    ) -> Result<(), ::fidl_next::EncodeError> {
6343        ::fidl_next::munge!(let WireOptionalConnectorRouterRouteResponse { raw } = &mut *out);
6344
6345        if let Some(inner) = this {
6346            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
6347            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
6348        } else {
6349            ::fidl_next::RawWireUnion::encode_absent(raw);
6350        }
6351
6352        Ok(())
6353    }
6354}
6355
6356impl ::fidl_next::TakeFrom<WireConnectorRouterRouteResponse> for ConnectorRouterRouteResponse {
6357    #[inline]
6358    fn take_from(from: &WireConnectorRouterRouteResponse) -> Self {
6359        match from.raw.ordinal() {
6360            1 => Self::Connector(::fidl_next::TakeFrom::take_from(unsafe {
6361                from.raw.get().deref_unchecked::<crate::WireConnector>()
6362            })),
6363
6364            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
6365                from.raw.get().deref_unchecked::<crate::WireUnit>()
6366            })),
6367
6368            _ => unsafe { ::core::hint::unreachable_unchecked() },
6369        }
6370    }
6371}
6372
6373impl ::fidl_next::TakeFrom<WireOptionalConnectorRouterRouteResponse>
6374    for Option<Box<ConnectorRouterRouteResponse>>
6375{
6376    #[inline]
6377    fn take_from(from: &WireOptionalConnectorRouterRouteResponse) -> Self {
6378        if let Some(inner) = from.as_ref() {
6379            Some(::fidl_next::TakeFrom::take_from(inner))
6380        } else {
6381            None
6382        }
6383    }
6384}
6385
6386/// The wire type corresponding to [`ConnectorRouterRouteResponse`].
6387#[repr(transparent)]
6388pub struct WireConnectorRouterRouteResponse {
6389    raw: ::fidl_next::RawWireUnion,
6390}
6391
6392unsafe impl ::fidl_next::ZeroPadding for WireConnectorRouterRouteResponse {
6393    #[inline]
6394    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6395        ::fidl_next::munge!(let Self { raw } = out);
6396        ::fidl_next::RawWireUnion::zero_padding(raw);
6397    }
6398}
6399
6400pub mod connector_router_route_response {
6401    pub enum Ref<'union> {
6402        Connector(&'union crate::WireConnector),
6403
6404        Unavailable(&'union crate::WireUnit),
6405    }
6406}
6407
6408impl WireConnectorRouterRouteResponse {
6409    pub fn as_ref(&self) -> crate::connector_router_route_response::Ref<'_> {
6410        match self.raw.ordinal() {
6411            1 => crate::connector_router_route_response::Ref::Connector(unsafe {
6412                self.raw.get().deref_unchecked::<crate::WireConnector>()
6413            }),
6414
6415            2 => crate::connector_router_route_response::Ref::Unavailable(unsafe {
6416                self.raw.get().deref_unchecked::<crate::WireUnit>()
6417            }),
6418
6419            _ => unsafe { ::core::hint::unreachable_unchecked() },
6420        }
6421    }
6422}
6423
6424unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnectorRouterRouteResponse
6425where
6426    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6427
6428    ___D: ::fidl_next::fuchsia::HandleDecoder,
6429{
6430    fn decode(
6431        mut slot: ::fidl_next::Slot<'_, Self>,
6432        decoder: &mut ___D,
6433    ) -> Result<(), ::fidl_next::DecodeError> {
6434        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
6435        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
6436            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
6437                raw, decoder,
6438            )?,
6439
6440            2 => {
6441                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
6442            }
6443
6444            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6445        }
6446
6447        Ok(())
6448    }
6449}
6450
6451impl ::core::fmt::Debug for WireConnectorRouterRouteResponse {
6452    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6453        match self.raw.ordinal() {
6454            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireConnector>().fmt(f) },
6455            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
6456            _ => unsafe { ::core::hint::unreachable_unchecked() },
6457        }
6458    }
6459}
6460
6461#[repr(transparent)]
6462pub struct WireOptionalConnectorRouterRouteResponse {
6463    raw: ::fidl_next::RawWireUnion,
6464}
6465
6466unsafe impl ::fidl_next::ZeroPadding for WireOptionalConnectorRouterRouteResponse {
6467    #[inline]
6468    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6469        ::fidl_next::munge!(let Self { raw } = out);
6470        ::fidl_next::RawWireUnion::zero_padding(raw);
6471    }
6472}
6473
6474impl WireOptionalConnectorRouterRouteResponse {
6475    pub fn is_some(&self) -> bool {
6476        self.raw.is_some()
6477    }
6478
6479    pub fn is_none(&self) -> bool {
6480        self.raw.is_none()
6481    }
6482
6483    pub fn as_ref(&self) -> Option<&WireConnectorRouterRouteResponse> {
6484        if self.is_some() {
6485            Some(unsafe { &*(self as *const Self).cast() })
6486        } else {
6487            None
6488        }
6489    }
6490}
6491
6492unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalConnectorRouterRouteResponse
6493where
6494    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6495
6496    ___D: ::fidl_next::fuchsia::HandleDecoder,
6497{
6498    fn decode(
6499        mut slot: ::fidl_next::Slot<'_, Self>,
6500        decoder: &mut ___D,
6501    ) -> Result<(), ::fidl_next::DecodeError> {
6502        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
6503        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
6504            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
6505                raw, decoder,
6506            )?,
6507
6508            2 => {
6509                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
6510            }
6511
6512            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
6513            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
6514        }
6515
6516        Ok(())
6517    }
6518}
6519
6520impl ::core::fmt::Debug for WireOptionalConnectorRouterRouteResponse {
6521    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
6522        self.as_ref().fmt(f)
6523    }
6524}
6525
6526#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6527#[repr(u32)]
6528pub enum RouterError {
6529    NotFound = 1,
6530    InvalidArgs = 2,
6531    NotSupported = 3,
6532    Internal = 4,
6533    UnknownOrdinal_(u32),
6534}
6535
6536impl ::fidl_next::Encodable for RouterError {
6537    type Encoded = WireRouterError;
6538}
6539impl ::std::convert::From<u32> for RouterError {
6540    fn from(value: u32) -> Self {
6541        match value {
6542            1 => Self::NotFound,
6543            2 => Self::InvalidArgs,
6544            3 => Self::NotSupported,
6545            4 => Self::Internal,
6546
6547            _ => Self::UnknownOrdinal_(value),
6548        }
6549    }
6550}
6551
6552unsafe impl<___E> ::fidl_next::Encode<___E> for RouterError
6553where
6554    ___E: ?Sized,
6555{
6556    #[inline]
6557    fn encode(
6558        &mut self,
6559        _: &mut ___E,
6560        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6561    ) -> Result<(), ::fidl_next::EncodeError> {
6562        ::fidl_next::munge!(let WireRouterError { value } = out);
6563        let _ = value.write(::fidl_next::WireU32::from(match *self {
6564            Self::NotFound => 1,
6565
6566            Self::InvalidArgs => 2,
6567
6568            Self::NotSupported => 3,
6569
6570            Self::Internal => 4,
6571
6572            Self::UnknownOrdinal_(value) => value,
6573        }));
6574
6575        Ok(())
6576    }
6577}
6578
6579impl ::core::convert::From<WireRouterError> for RouterError {
6580    fn from(wire: WireRouterError) -> Self {
6581        match u32::from(wire.value) {
6582            1 => Self::NotFound,
6583
6584            2 => Self::InvalidArgs,
6585
6586            3 => Self::NotSupported,
6587
6588            4 => Self::Internal,
6589
6590            value => Self::UnknownOrdinal_(value),
6591        }
6592    }
6593}
6594
6595impl ::fidl_next::TakeFrom<WireRouterError> for RouterError {
6596    #[inline]
6597    fn take_from(from: &WireRouterError) -> Self {
6598        Self::from(*from)
6599    }
6600}
6601
6602/// The wire type corresponding to [`RouterError`].
6603#[derive(Clone, Copy, Debug, PartialEq, Eq)]
6604#[repr(transparent)]
6605pub struct WireRouterError {
6606    value: ::fidl_next::WireU32,
6607}
6608
6609unsafe impl ::fidl_next::ZeroPadding for WireRouterError {
6610    #[inline]
6611    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
6612        // Wire enums have no padding
6613    }
6614}
6615
6616impl WireRouterError {
6617    pub const NOT_FOUND: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(1) };
6618
6619    pub const INVALID_ARGS: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(2) };
6620
6621    pub const NOT_SUPPORTED: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(3) };
6622
6623    pub const INTERNAL: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(4) };
6624}
6625
6626unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouterError
6627where
6628    ___D: ?Sized,
6629{
6630    fn decode(
6631        slot: ::fidl_next::Slot<'_, Self>,
6632        _: &mut ___D,
6633    ) -> Result<(), ::fidl_next::DecodeError> {
6634        Ok(())
6635    }
6636}
6637
6638impl ::core::convert::From<RouterError> for WireRouterError {
6639    fn from(natural: RouterError) -> Self {
6640        match natural {
6641            RouterError::NotFound => WireRouterError::NOT_FOUND,
6642
6643            RouterError::InvalidArgs => WireRouterError::INVALID_ARGS,
6644
6645            RouterError::NotSupported => WireRouterError::NOT_SUPPORTED,
6646
6647            RouterError::Internal => WireRouterError::INTERNAL,
6648
6649            RouterError::UnknownOrdinal_(value) => {
6650                WireRouterError { value: ::fidl_next::WireU32::from(value) }
6651            }
6652        }
6653    }
6654}
6655
6656/// The type corresponding to the ConnectorRouter protocol.
6657#[derive(Debug)]
6658pub struct ConnectorRouter;
6659
6660impl ::fidl_next::Discoverable for ConnectorRouter {
6661    const PROTOCOL_NAME: &'static str = "connector_router";
6662}
6663
6664pub mod connector_router {
6665    pub mod prelude {
6666        pub use crate::{
6667            connector_router, ConnectorRouter, ConnectorRouterClientHandler,
6668            ConnectorRouterClientSender, ConnectorRouterServerHandler, ConnectorRouterServerSender,
6669        };
6670
6671        pub use crate::ConnectorRouterRouteResponse;
6672
6673        pub use crate::RouteRequest;
6674
6675        pub use crate::RouterError;
6676    }
6677
6678    pub struct Route;
6679
6680    impl ::fidl_next::Method for Route {
6681        const ORDINAL: u64 = 8420527046218942310;
6682
6683        type Protocol = crate::ConnectorRouter;
6684
6685        type Request = crate::WireRouteRequest;
6686
6687        type Response = ::fidl_next::WireFlexibleResult<
6688            crate::WireConnectorRouterRouteResponse,
6689            crate::WireRouterError,
6690        >;
6691    }
6692}
6693
6694/// A helper trait for the `ConnectorRouter` client sender.
6695pub trait ConnectorRouterClientSender {
6696    type Transport: ::fidl_next::Transport;
6697
6698    fn route<___R>(
6699        &self,
6700        request: &mut ___R,
6701    ) -> Result<
6702        ::fidl_next::ResponseFuture<'_, Self::Transport, connector_router::Route>,
6703        ::fidl_next::EncodeError,
6704    >
6705    where
6706        ___R: ::fidl_next::Encode<
6707            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
6708            Encoded = crate::WireRouteRequest,
6709        >;
6710}
6711
6712impl<___T> ConnectorRouterClientSender for ::fidl_next::ClientSender<___T, ConnectorRouter>
6713where
6714    ___T: ::fidl_next::Transport,
6715{
6716    type Transport = ___T;
6717
6718    fn route<___R>(
6719        &self,
6720        request: &mut ___R,
6721    ) -> Result<
6722        ::fidl_next::ResponseFuture<'_, Self::Transport, connector_router::Route>,
6723        ::fidl_next::EncodeError,
6724    >
6725    where
6726        ___R: ::fidl_next::Encode<
6727            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
6728            Encoded = crate::WireRouteRequest,
6729        >,
6730    {
6731        self.as_untyped()
6732            .send_two_way(8420527046218942310, request)
6733            .map(::fidl_next::ResponseFuture::from_untyped)
6734    }
6735}
6736
6737/// A client handler for the ConnectorRouter protocol.
6738///
6739/// See [`ConnectorRouter`] for more details.
6740pub trait ConnectorRouterClientHandler<___T: ::fidl_next::Transport> {
6741    fn on_unknown_interaction(
6742        &mut self,
6743        sender: &::fidl_next::ClientSender<___T, ConnectorRouter>,
6744        ordinal: u64,
6745    ) {
6746        sender.close();
6747    }
6748}
6749
6750impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for ConnectorRouter
6751where
6752    ___T: ::fidl_next::Transport,
6753    ___H: ConnectorRouterClientHandler<___T>,
6754
6755    <connector_router::Route as ::fidl_next::Method>::Response:
6756        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6757{
6758    fn on_event(
6759        handler: &mut ___H,
6760        sender: &::fidl_next::ClientSender<___T, Self>,
6761        ordinal: u64,
6762        buffer: ___T::RecvBuffer,
6763    ) {
6764        match ordinal {
6765            ordinal => handler.on_unknown_interaction(sender, ordinal),
6766        }
6767    }
6768}
6769
6770/// A helper trait for the `ConnectorRouter` server sender.
6771pub trait ConnectorRouterServerSender {
6772    type Transport: ::fidl_next::Transport;
6773}
6774
6775impl<___T> ConnectorRouterServerSender for ::fidl_next::ServerSender<___T, ConnectorRouter>
6776where
6777    ___T: ::fidl_next::Transport,
6778{
6779    type Transport = ___T;
6780}
6781
6782/// A server handler for the ConnectorRouter protocol.
6783///
6784/// See [`ConnectorRouter`] for more details.
6785pub trait ConnectorRouterServerHandler<___T: ::fidl_next::Transport> {
6786    fn route(
6787        &mut self,
6788        sender: &::fidl_next::ServerSender<___T, ConnectorRouter>,
6789
6790        request: ::fidl_next::RequestBuffer<___T, connector_router::Route>,
6791
6792        responder: ::fidl_next::Responder<connector_router::Route>,
6793    );
6794
6795    fn on_unknown_interaction(
6796        &mut self,
6797        sender: &::fidl_next::ServerSender<___T, ConnectorRouter>,
6798        ordinal: u64,
6799    ) {
6800        sender.close();
6801    }
6802}
6803
6804impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for ConnectorRouter
6805where
6806    ___T: ::fidl_next::Transport,
6807    ___H: ConnectorRouterServerHandler<___T>,
6808
6809    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
6810{
6811    fn on_one_way(
6812        handler: &mut ___H,
6813        sender: &::fidl_next::ServerSender<___T, Self>,
6814        ordinal: u64,
6815        buffer: ___T::RecvBuffer,
6816    ) {
6817        match ordinal {
6818            ordinal => handler.on_unknown_interaction(sender, ordinal),
6819        }
6820    }
6821
6822    fn on_two_way(
6823        handler: &mut ___H,
6824        sender: &::fidl_next::ServerSender<___T, Self>,
6825        ordinal: u64,
6826        buffer: ___T::RecvBuffer,
6827        responder: ::fidl_next::protocol::Responder,
6828    ) {
6829        match ordinal {
6830            8420527046218942310 => {
6831                let responder = ::fidl_next::Responder::from_untyped(responder);
6832
6833                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
6834                handler.route(sender, buffer, responder);
6835            }
6836
6837            ordinal => handler.on_unknown_interaction(sender, ordinal),
6838        }
6839    }
6840}
6841
6842#[derive(Debug)]
6843pub enum DataRouterRouteResponse {
6844    Data(crate::Data),
6845
6846    Unavailable(crate::Unit),
6847}
6848
6849impl ::fidl_next::Encodable for DataRouterRouteResponse {
6850    type Encoded = WireDataRouterRouteResponse;
6851}
6852
6853unsafe impl<___E> ::fidl_next::Encode<___E> for DataRouterRouteResponse
6854where
6855    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6856
6857    ___E: ::fidl_next::Encoder,
6858
6859    ___E: ::fidl_next::fuchsia::HandleEncoder,
6860{
6861    #[inline]
6862    fn encode(
6863        &mut self,
6864        encoder: &mut ___E,
6865        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6866    ) -> Result<(), ::fidl_next::EncodeError> {
6867        ::fidl_next::munge!(let WireDataRouterRouteResponse { raw } = out);
6868
6869        match self {
6870            Self::Data(value) => {
6871                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Data>(value, 1, encoder, raw)?
6872            }
6873
6874            Self::Unavailable(value) => {
6875                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Unit>(value, 2, encoder, raw)?
6876            }
6877        }
6878
6879        Ok(())
6880    }
6881}
6882
6883impl ::fidl_next::EncodableOption for Box<DataRouterRouteResponse> {
6884    type EncodedOption = WireOptionalDataRouterRouteResponse;
6885}
6886
6887unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DataRouterRouteResponse>
6888where
6889    ___E: ?Sized,
6890    DataRouterRouteResponse: ::fidl_next::Encode<___E>,
6891{
6892    #[inline]
6893    fn encode_option(
6894        this: Option<&mut Self>,
6895        encoder: &mut ___E,
6896        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
6897    ) -> Result<(), ::fidl_next::EncodeError> {
6898        ::fidl_next::munge!(let WireOptionalDataRouterRouteResponse { raw } = &mut *out);
6899
6900        if let Some(inner) = this {
6901            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
6902            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
6903        } else {
6904            ::fidl_next::RawWireUnion::encode_absent(raw);
6905        }
6906
6907        Ok(())
6908    }
6909}
6910
6911impl ::fidl_next::TakeFrom<WireDataRouterRouteResponse> for DataRouterRouteResponse {
6912    #[inline]
6913    fn take_from(from: &WireDataRouterRouteResponse) -> Self {
6914        match from.raw.ordinal() {
6915            1 => Self::Data(::fidl_next::TakeFrom::take_from(unsafe {
6916                from.raw.get().deref_unchecked::<crate::WireData>()
6917            })),
6918
6919            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
6920                from.raw.get().deref_unchecked::<crate::WireUnit>()
6921            })),
6922
6923            _ => unsafe { ::core::hint::unreachable_unchecked() },
6924        }
6925    }
6926}
6927
6928impl ::fidl_next::TakeFrom<WireOptionalDataRouterRouteResponse>
6929    for Option<Box<DataRouterRouteResponse>>
6930{
6931    #[inline]
6932    fn take_from(from: &WireOptionalDataRouterRouteResponse) -> Self {
6933        if let Some(inner) = from.as_ref() {
6934            Some(::fidl_next::TakeFrom::take_from(inner))
6935        } else {
6936            None
6937        }
6938    }
6939}
6940
6941/// The wire type corresponding to [`DataRouterRouteResponse`].
6942#[repr(transparent)]
6943pub struct WireDataRouterRouteResponse {
6944    raw: ::fidl_next::RawWireUnion,
6945}
6946
6947unsafe impl ::fidl_next::ZeroPadding for WireDataRouterRouteResponse {
6948    #[inline]
6949    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
6950        ::fidl_next::munge!(let Self { raw } = out);
6951        ::fidl_next::RawWireUnion::zero_padding(raw);
6952    }
6953}
6954
6955pub mod data_router_route_response {
6956    pub enum Ref<'union> {
6957        Data(&'union crate::WireData),
6958
6959        Unavailable(&'union crate::WireUnit),
6960    }
6961}
6962
6963impl WireDataRouterRouteResponse {
6964    pub fn as_ref(&self) -> crate::data_router_route_response::Ref<'_> {
6965        match self.raw.ordinal() {
6966            1 => crate::data_router_route_response::Ref::Data(unsafe {
6967                self.raw.get().deref_unchecked::<crate::WireData>()
6968            }),
6969
6970            2 => crate::data_router_route_response::Ref::Unavailable(unsafe {
6971                self.raw.get().deref_unchecked::<crate::WireUnit>()
6972            }),
6973
6974            _ => unsafe { ::core::hint::unreachable_unchecked() },
6975        }
6976    }
6977}
6978
6979unsafe impl<___D> ::fidl_next::Decode<___D> for WireDataRouterRouteResponse
6980where
6981    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
6982
6983    ___D: ::fidl_next::Decoder,
6984
6985    ___D: ::fidl_next::fuchsia::HandleDecoder,
6986{
6987    fn decode(
6988        mut slot: ::fidl_next::Slot<'_, Self>,
6989        decoder: &mut ___D,
6990    ) -> Result<(), ::fidl_next::DecodeError> {
6991        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
6992        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
6993            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
6994
6995            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
6996
6997            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
6998        }
6999
7000        Ok(())
7001    }
7002}
7003
7004impl ::core::fmt::Debug for WireDataRouterRouteResponse {
7005    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7006        match self.raw.ordinal() {
7007            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireData>().fmt(f) },
7008            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
7009            _ => unsafe { ::core::hint::unreachable_unchecked() },
7010        }
7011    }
7012}
7013
7014#[repr(transparent)]
7015pub struct WireOptionalDataRouterRouteResponse {
7016    raw: ::fidl_next::RawWireUnion,
7017}
7018
7019unsafe impl ::fidl_next::ZeroPadding for WireOptionalDataRouterRouteResponse {
7020    #[inline]
7021    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7022        ::fidl_next::munge!(let Self { raw } = out);
7023        ::fidl_next::RawWireUnion::zero_padding(raw);
7024    }
7025}
7026
7027impl WireOptionalDataRouterRouteResponse {
7028    pub fn is_some(&self) -> bool {
7029        self.raw.is_some()
7030    }
7031
7032    pub fn is_none(&self) -> bool {
7033        self.raw.is_none()
7034    }
7035
7036    pub fn as_ref(&self) -> Option<&WireDataRouterRouteResponse> {
7037        if self.is_some() {
7038            Some(unsafe { &*(self as *const Self).cast() })
7039        } else {
7040            None
7041        }
7042    }
7043}
7044
7045unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDataRouterRouteResponse
7046where
7047    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7048
7049    ___D: ::fidl_next::Decoder,
7050
7051    ___D: ::fidl_next::fuchsia::HandleDecoder,
7052{
7053    fn decode(
7054        mut slot: ::fidl_next::Slot<'_, Self>,
7055        decoder: &mut ___D,
7056    ) -> Result<(), ::fidl_next::DecodeError> {
7057        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
7058        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
7059            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData>(raw, decoder)?,
7060
7061            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
7062
7063            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
7064            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
7065        }
7066
7067        Ok(())
7068    }
7069}
7070
7071impl ::core::fmt::Debug for WireOptionalDataRouterRouteResponse {
7072    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
7073        self.as_ref().fmt(f)
7074    }
7075}
7076
7077/// The type corresponding to the DataRouter protocol.
7078#[derive(Debug)]
7079pub struct DataRouter;
7080
7081impl ::fidl_next::Discoverable for DataRouter {
7082    const PROTOCOL_NAME: &'static str = "data_router";
7083}
7084
7085pub mod data_router {
7086    pub mod prelude {
7087        pub use crate::{
7088            data_router, DataRouter, DataRouterClientHandler, DataRouterClientSender,
7089            DataRouterServerHandler, DataRouterServerSender,
7090        };
7091
7092        pub use crate::DataRouterRouteResponse;
7093
7094        pub use crate::RouteRequest;
7095
7096        pub use crate::RouterError;
7097    }
7098
7099    pub struct Route;
7100
7101    impl ::fidl_next::Method for Route {
7102        const ORDINAL: u64 = 3352890635970754564;
7103
7104        type Protocol = crate::DataRouter;
7105
7106        type Request = crate::WireRouteRequest;
7107
7108        type Response = ::fidl_next::WireFlexibleResult<
7109            crate::WireDataRouterRouteResponse,
7110            crate::WireRouterError,
7111        >;
7112    }
7113}
7114
7115/// A helper trait for the `DataRouter` client sender.
7116pub trait DataRouterClientSender {
7117    type Transport: ::fidl_next::Transport;
7118
7119    fn route<___R>(
7120        &self,
7121        request: &mut ___R,
7122    ) -> Result<
7123        ::fidl_next::ResponseFuture<'_, Self::Transport, data_router::Route>,
7124        ::fidl_next::EncodeError,
7125    >
7126    where
7127        ___R: ::fidl_next::Encode<
7128            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7129            Encoded = crate::WireRouteRequest,
7130        >;
7131}
7132
7133impl<___T> DataRouterClientSender for ::fidl_next::ClientSender<___T, DataRouter>
7134where
7135    ___T: ::fidl_next::Transport,
7136{
7137    type Transport = ___T;
7138
7139    fn route<___R>(
7140        &self,
7141        request: &mut ___R,
7142    ) -> Result<
7143        ::fidl_next::ResponseFuture<'_, Self::Transport, data_router::Route>,
7144        ::fidl_next::EncodeError,
7145    >
7146    where
7147        ___R: ::fidl_next::Encode<
7148            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7149            Encoded = crate::WireRouteRequest,
7150        >,
7151    {
7152        self.as_untyped()
7153            .send_two_way(3352890635970754564, request)
7154            .map(::fidl_next::ResponseFuture::from_untyped)
7155    }
7156}
7157
7158/// A client handler for the DataRouter protocol.
7159///
7160/// See [`DataRouter`] for more details.
7161pub trait DataRouterClientHandler<___T: ::fidl_next::Transport> {
7162    fn on_unknown_interaction(
7163        &mut self,
7164        sender: &::fidl_next::ClientSender<___T, DataRouter>,
7165        ordinal: u64,
7166    ) {
7167        sender.close();
7168    }
7169}
7170
7171impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DataRouter
7172where
7173    ___T: ::fidl_next::Transport,
7174    ___H: DataRouterClientHandler<___T>,
7175
7176    <data_router::Route as ::fidl_next::Method>::Response:
7177        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7178{
7179    fn on_event(
7180        handler: &mut ___H,
7181        sender: &::fidl_next::ClientSender<___T, Self>,
7182        ordinal: u64,
7183        buffer: ___T::RecvBuffer,
7184    ) {
7185        match ordinal {
7186            ordinal => handler.on_unknown_interaction(sender, ordinal),
7187        }
7188    }
7189}
7190
7191/// A helper trait for the `DataRouter` server sender.
7192pub trait DataRouterServerSender {
7193    type Transport: ::fidl_next::Transport;
7194}
7195
7196impl<___T> DataRouterServerSender for ::fidl_next::ServerSender<___T, DataRouter>
7197where
7198    ___T: ::fidl_next::Transport,
7199{
7200    type Transport = ___T;
7201}
7202
7203/// A server handler for the DataRouter protocol.
7204///
7205/// See [`DataRouter`] for more details.
7206pub trait DataRouterServerHandler<___T: ::fidl_next::Transport> {
7207    fn route(
7208        &mut self,
7209        sender: &::fidl_next::ServerSender<___T, DataRouter>,
7210
7211        request: ::fidl_next::RequestBuffer<___T, data_router::Route>,
7212
7213        responder: ::fidl_next::Responder<data_router::Route>,
7214    );
7215
7216    fn on_unknown_interaction(
7217        &mut self,
7218        sender: &::fidl_next::ServerSender<___T, DataRouter>,
7219        ordinal: u64,
7220    ) {
7221        sender.close();
7222    }
7223}
7224
7225impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DataRouter
7226where
7227    ___T: ::fidl_next::Transport,
7228    ___H: DataRouterServerHandler<___T>,
7229
7230    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7231{
7232    fn on_one_way(
7233        handler: &mut ___H,
7234        sender: &::fidl_next::ServerSender<___T, Self>,
7235        ordinal: u64,
7236        buffer: ___T::RecvBuffer,
7237    ) {
7238        match ordinal {
7239            ordinal => handler.on_unknown_interaction(sender, ordinal),
7240        }
7241    }
7242
7243    fn on_two_way(
7244        handler: &mut ___H,
7245        sender: &::fidl_next::ServerSender<___T, Self>,
7246        ordinal: u64,
7247        buffer: ___T::RecvBuffer,
7248        responder: ::fidl_next::protocol::Responder,
7249    ) {
7250        match ordinal {
7251            3352890635970754564 => {
7252                let responder = ::fidl_next::Responder::from_untyped(responder);
7253
7254                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
7255                handler.route(sender, buffer, responder);
7256            }
7257
7258            ordinal => handler.on_unknown_interaction(sender, ordinal),
7259        }
7260    }
7261}
7262
7263/// The type corresponding to the Dictionary protocol.
7264#[derive(Debug)]
7265pub struct Dictionary;
7266
7267impl ::fidl_next::Discoverable for Dictionary {
7268    const PROTOCOL_NAME: &'static str = "dictionary";
7269}
7270
7271pub mod dictionary {
7272    pub mod prelude {
7273        pub use crate::{
7274            dictionary, Dictionary, DictionaryClientHandler, DictionaryClientSender,
7275            DictionaryServerHandler, DictionaryServerSender,
7276        };
7277    }
7278}
7279
7280/// A helper trait for the `Dictionary` client sender.
7281pub trait DictionaryClientSender {
7282    type Transport: ::fidl_next::Transport;
7283}
7284
7285impl<___T> DictionaryClientSender for ::fidl_next::ClientSender<___T, Dictionary>
7286where
7287    ___T: ::fidl_next::Transport,
7288{
7289    type Transport = ___T;
7290}
7291
7292/// A client handler for the Dictionary protocol.
7293///
7294/// See [`Dictionary`] for more details.
7295pub trait DictionaryClientHandler<___T: ::fidl_next::Transport> {
7296    fn on_unknown_interaction(
7297        &mut self,
7298        sender: &::fidl_next::ClientSender<___T, Dictionary>,
7299        ordinal: u64,
7300    ) {
7301        sender.close();
7302    }
7303}
7304
7305impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Dictionary
7306where
7307    ___T: ::fidl_next::Transport,
7308    ___H: DictionaryClientHandler<___T>,
7309{
7310    fn on_event(
7311        handler: &mut ___H,
7312        sender: &::fidl_next::ClientSender<___T, Self>,
7313        ordinal: u64,
7314        buffer: ___T::RecvBuffer,
7315    ) {
7316        match ordinal {
7317            ordinal => handler.on_unknown_interaction(sender, ordinal),
7318        }
7319    }
7320}
7321
7322/// A helper trait for the `Dictionary` server sender.
7323pub trait DictionaryServerSender {
7324    type Transport: ::fidl_next::Transport;
7325}
7326
7327impl<___T> DictionaryServerSender for ::fidl_next::ServerSender<___T, Dictionary>
7328where
7329    ___T: ::fidl_next::Transport,
7330{
7331    type Transport = ___T;
7332}
7333
7334/// A server handler for the Dictionary protocol.
7335///
7336/// See [`Dictionary`] for more details.
7337pub trait DictionaryServerHandler<___T: ::fidl_next::Transport> {
7338    fn on_unknown_interaction(
7339        &mut self,
7340        sender: &::fidl_next::ServerSender<___T, Dictionary>,
7341        ordinal: u64,
7342    ) {
7343        sender.close();
7344    }
7345}
7346
7347impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Dictionary
7348where
7349    ___T: ::fidl_next::Transport,
7350    ___H: DictionaryServerHandler<___T>,
7351{
7352    fn on_one_way(
7353        handler: &mut ___H,
7354        sender: &::fidl_next::ServerSender<___T, Self>,
7355        ordinal: u64,
7356        buffer: ___T::RecvBuffer,
7357    ) {
7358        match ordinal {
7359            ordinal => handler.on_unknown_interaction(sender, ordinal),
7360        }
7361    }
7362
7363    fn on_two_way(
7364        handler: &mut ___H,
7365        sender: &::fidl_next::ServerSender<___T, Self>,
7366        ordinal: u64,
7367        buffer: ___T::RecvBuffer,
7368        responder: ::fidl_next::protocol::Responder,
7369    ) {
7370        match ordinal {
7371            ordinal => handler.on_unknown_interaction(sender, ordinal),
7372        }
7373    }
7374}
7375
7376#[derive(Clone, Debug)]
7377pub struct DictionaryDrainIteratorGetNextRequest {
7378    pub start_id: u64,
7379
7380    pub limit: u32,
7381}
7382
7383impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextRequest {
7384    type Encoded = WireDictionaryDrainIteratorGetNextRequest;
7385}
7386
7387unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextRequest
7388where
7389    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7390{
7391    #[inline]
7392    fn encode(
7393        &mut self,
7394        encoder: &mut ___E,
7395        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7396    ) -> Result<(), ::fidl_next::EncodeError> {
7397        ::fidl_next::munge! {
7398            let Self::Encoded {
7399                start_id,
7400                limit,
7401
7402            } = out;
7403        }
7404
7405        ::fidl_next::Encode::encode(&mut self.start_id, encoder, start_id)?;
7406
7407        ::fidl_next::Encode::encode(&mut self.limit, encoder, limit)?;
7408
7409        Ok(())
7410    }
7411}
7412
7413impl ::fidl_next::EncodableOption for Box<DictionaryDrainIteratorGetNextRequest> {
7414    type EncodedOption = ::fidl_next::WireBox<WireDictionaryDrainIteratorGetNextRequest>;
7415}
7416
7417unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryDrainIteratorGetNextRequest>
7418where
7419    ___E: ::fidl_next::Encoder + ?Sized,
7420    DictionaryDrainIteratorGetNextRequest: ::fidl_next::Encode<___E>,
7421{
7422    #[inline]
7423    fn encode_option(
7424        this: Option<&mut Self>,
7425        encoder: &mut ___E,
7426        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7427    ) -> Result<(), ::fidl_next::EncodeError> {
7428        if let Some(inner) = this {
7429            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7430            ::fidl_next::WireBox::encode_present(out);
7431        } else {
7432            ::fidl_next::WireBox::encode_absent(out);
7433        }
7434
7435        Ok(())
7436    }
7437}
7438
7439impl ::fidl_next::TakeFrom<WireDictionaryDrainIteratorGetNextRequest>
7440    for DictionaryDrainIteratorGetNextRequest
7441{
7442    #[inline]
7443    fn take_from(from: &WireDictionaryDrainIteratorGetNextRequest) -> Self {
7444        Self {
7445            start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
7446
7447            limit: ::fidl_next::TakeFrom::take_from(&from.limit),
7448        }
7449    }
7450}
7451
7452/// The wire type corresponding to [`DictionaryDrainIteratorGetNextRequest`].
7453#[derive(Clone, Debug)]
7454#[repr(C)]
7455pub struct WireDictionaryDrainIteratorGetNextRequest {
7456    pub start_id: ::fidl_next::WireU64,
7457
7458    pub limit: ::fidl_next::WireU32,
7459}
7460
7461unsafe impl ::fidl_next::ZeroPadding for WireDictionaryDrainIteratorGetNextRequest {
7462    #[inline]
7463    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7464        unsafe {
7465            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
7466        }
7467    }
7468}
7469
7470unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextRequest
7471where
7472    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7473{
7474    fn decode(
7475        slot: ::fidl_next::Slot<'_, Self>,
7476        decoder: &mut ___D,
7477    ) -> Result<(), ::fidl_next::DecodeError> {
7478        ::fidl_next::munge! {
7479            let Self {
7480                mut start_id,
7481                mut limit,
7482
7483            } = slot;
7484        }
7485
7486        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
7487
7488        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
7489
7490        Ok(())
7491    }
7492}
7493
7494#[doc = " Maximum number of items returned by dictionary iterator.\n"]
7495pub const MAX_DICTIONARY_ITERATOR_CHUNK: u32 = 128;
7496
7497#[derive(Debug)]
7498pub struct DictionaryDrainIteratorGetNextResponse {
7499    pub items: Vec<crate::DictionaryItem>,
7500
7501    pub end_id: u64,
7502}
7503
7504impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextResponse {
7505    type Encoded = WireDictionaryDrainIteratorGetNextResponse;
7506}
7507
7508unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextResponse
7509where
7510    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7511
7512    ___E: ::fidl_next::Encoder,
7513
7514    ___E: ::fidl_next::fuchsia::HandleEncoder,
7515{
7516    #[inline]
7517    fn encode(
7518        &mut self,
7519        encoder: &mut ___E,
7520        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7521    ) -> Result<(), ::fidl_next::EncodeError> {
7522        ::fidl_next::munge! {
7523            let Self::Encoded {
7524                items,
7525                end_id,
7526
7527            } = out;
7528        }
7529
7530        ::fidl_next::Encode::encode(&mut self.items, encoder, items)?;
7531
7532        ::fidl_next::Encode::encode(&mut self.end_id, encoder, end_id)?;
7533
7534        Ok(())
7535    }
7536}
7537
7538impl ::fidl_next::EncodableOption for Box<DictionaryDrainIteratorGetNextResponse> {
7539    type EncodedOption = ::fidl_next::WireBox<WireDictionaryDrainIteratorGetNextResponse>;
7540}
7541
7542unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryDrainIteratorGetNextResponse>
7543where
7544    ___E: ::fidl_next::Encoder + ?Sized,
7545    DictionaryDrainIteratorGetNextResponse: ::fidl_next::Encode<___E>,
7546{
7547    #[inline]
7548    fn encode_option(
7549        this: Option<&mut Self>,
7550        encoder: &mut ___E,
7551        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7552    ) -> Result<(), ::fidl_next::EncodeError> {
7553        if let Some(inner) = this {
7554            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7555            ::fidl_next::WireBox::encode_present(out);
7556        } else {
7557            ::fidl_next::WireBox::encode_absent(out);
7558        }
7559
7560        Ok(())
7561    }
7562}
7563
7564impl ::fidl_next::TakeFrom<WireDictionaryDrainIteratorGetNextResponse>
7565    for DictionaryDrainIteratorGetNextResponse
7566{
7567    #[inline]
7568    fn take_from(from: &WireDictionaryDrainIteratorGetNextResponse) -> Self {
7569        Self {
7570            items: ::fidl_next::TakeFrom::take_from(&from.items),
7571
7572            end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
7573        }
7574    }
7575}
7576
7577/// The wire type corresponding to [`DictionaryDrainIteratorGetNextResponse`].
7578#[derive(Debug)]
7579#[repr(C)]
7580pub struct WireDictionaryDrainIteratorGetNextResponse {
7581    pub items: ::fidl_next::WireVector<crate::WireDictionaryItem>,
7582
7583    pub end_id: ::fidl_next::WireU64,
7584}
7585
7586unsafe impl ::fidl_next::ZeroPadding for WireDictionaryDrainIteratorGetNextResponse {
7587    #[inline]
7588    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
7589}
7590
7591unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextResponse
7592where
7593    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7594
7595    ___D: ::fidl_next::Decoder,
7596
7597    ___D: ::fidl_next::fuchsia::HandleDecoder,
7598{
7599    fn decode(
7600        slot: ::fidl_next::Slot<'_, Self>,
7601        decoder: &mut ___D,
7602    ) -> Result<(), ::fidl_next::DecodeError> {
7603        ::fidl_next::munge! {
7604            let Self {
7605                mut items,
7606                mut end_id,
7607
7608            } = slot;
7609        }
7610
7611        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
7612
7613        let items = unsafe { items.deref_unchecked() };
7614
7615        if items.len() > 128 {
7616            return Err(::fidl_next::DecodeError::VectorTooLong {
7617                size: items.len() as u64,
7618                limit: 128,
7619            });
7620        }
7621
7622        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
7623
7624        Ok(())
7625    }
7626}
7627
7628/// The type corresponding to the DictionaryDrainIterator protocol.
7629#[derive(Debug)]
7630pub struct DictionaryDrainIterator;
7631
7632pub mod dictionary_drain_iterator {
7633    pub mod prelude {
7634        pub use crate::{
7635            dictionary_drain_iterator, DictionaryDrainIterator,
7636            DictionaryDrainIteratorClientHandler, DictionaryDrainIteratorClientSender,
7637            DictionaryDrainIteratorServerHandler, DictionaryDrainIteratorServerSender,
7638        };
7639
7640        pub use crate::CapabilityStoreError;
7641
7642        pub use crate::DictionaryDrainIteratorGetNextRequest;
7643
7644        pub use crate::DictionaryDrainIteratorGetNextResponse;
7645    }
7646
7647    pub struct GetNext;
7648
7649    impl ::fidl_next::Method for GetNext {
7650        const ORDINAL: u64 = 5728722530628427873;
7651
7652        type Protocol = crate::DictionaryDrainIterator;
7653
7654        type Request = crate::WireDictionaryDrainIteratorGetNextRequest;
7655
7656        type Response = ::fidl_next::WireFlexibleResult<
7657            crate::WireDictionaryDrainIteratorGetNextResponse,
7658            crate::WireCapabilityStoreError,
7659        >;
7660    }
7661}
7662
7663/// A helper trait for the `DictionaryDrainIterator` client sender.
7664pub trait DictionaryDrainIteratorClientSender {
7665    type Transport: ::fidl_next::Transport;
7666
7667    #[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"]
7668    fn get_next<___R>(
7669        &self,
7670        request: &mut ___R,
7671    ) -> Result<
7672        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_drain_iterator::GetNext>,
7673        ::fidl_next::EncodeError,
7674    >
7675    where
7676        ___R: ::fidl_next::Encode<
7677            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7678            Encoded = crate::WireDictionaryDrainIteratorGetNextRequest,
7679        >;
7680}
7681
7682impl<___T> DictionaryDrainIteratorClientSender
7683    for ::fidl_next::ClientSender<___T, DictionaryDrainIterator>
7684where
7685    ___T: ::fidl_next::Transport,
7686{
7687    type Transport = ___T;
7688
7689    #[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"]
7690    fn get_next<___R>(
7691        &self,
7692        request: &mut ___R,
7693    ) -> Result<
7694        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_drain_iterator::GetNext>,
7695        ::fidl_next::EncodeError,
7696    >
7697    where
7698        ___R: ::fidl_next::Encode<
7699            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
7700            Encoded = crate::WireDictionaryDrainIteratorGetNextRequest,
7701        >,
7702    {
7703        self.as_untyped()
7704            .send_two_way(5728722530628427873, request)
7705            .map(::fidl_next::ResponseFuture::from_untyped)
7706    }
7707}
7708
7709/// A client handler for the DictionaryDrainIterator protocol.
7710///
7711/// See [`DictionaryDrainIterator`] for more details.
7712pub trait DictionaryDrainIteratorClientHandler<___T: ::fidl_next::Transport> {
7713    fn on_unknown_interaction(
7714        &mut self,
7715        sender: &::fidl_next::ClientSender<___T, DictionaryDrainIterator>,
7716        ordinal: u64,
7717    ) {
7718        sender.close();
7719    }
7720}
7721
7722impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryDrainIterator
7723where
7724    ___T: ::fidl_next::Transport,
7725    ___H: DictionaryDrainIteratorClientHandler<___T>,
7726
7727    <dictionary_drain_iterator::GetNext as ::fidl_next::Method>::Response:
7728        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7729{
7730    fn on_event(
7731        handler: &mut ___H,
7732        sender: &::fidl_next::ClientSender<___T, Self>,
7733        ordinal: u64,
7734        buffer: ___T::RecvBuffer,
7735    ) {
7736        match ordinal {
7737            ordinal => handler.on_unknown_interaction(sender, ordinal),
7738        }
7739    }
7740}
7741
7742/// A helper trait for the `DictionaryDrainIterator` server sender.
7743pub trait DictionaryDrainIteratorServerSender {
7744    type Transport: ::fidl_next::Transport;
7745}
7746
7747impl<___T> DictionaryDrainIteratorServerSender
7748    for ::fidl_next::ServerSender<___T, DictionaryDrainIterator>
7749where
7750    ___T: ::fidl_next::Transport,
7751{
7752    type Transport = ___T;
7753}
7754
7755/// A server handler for the DictionaryDrainIterator protocol.
7756///
7757/// See [`DictionaryDrainIterator`] for more details.
7758pub trait DictionaryDrainIteratorServerHandler<___T: ::fidl_next::Transport> {
7759    #[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"]
7760    fn get_next(
7761        &mut self,
7762        sender: &::fidl_next::ServerSender<___T, DictionaryDrainIterator>,
7763
7764        request: ::fidl_next::RequestBuffer<___T, dictionary_drain_iterator::GetNext>,
7765
7766        responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext>,
7767    );
7768
7769    fn on_unknown_interaction(
7770        &mut self,
7771        sender: &::fidl_next::ServerSender<___T, DictionaryDrainIterator>,
7772        ordinal: u64,
7773    ) {
7774        sender.close();
7775    }
7776}
7777
7778impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryDrainIterator
7779where
7780    ___T: ::fidl_next::Transport,
7781    ___H: DictionaryDrainIteratorServerHandler<___T>,
7782
7783    crate::WireDictionaryDrainIteratorGetNextRequest:
7784        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7785{
7786    fn on_one_way(
7787        handler: &mut ___H,
7788        sender: &::fidl_next::ServerSender<___T, Self>,
7789        ordinal: u64,
7790        buffer: ___T::RecvBuffer,
7791    ) {
7792        match ordinal {
7793            ordinal => handler.on_unknown_interaction(sender, ordinal),
7794        }
7795    }
7796
7797    fn on_two_way(
7798        handler: &mut ___H,
7799        sender: &::fidl_next::ServerSender<___T, Self>,
7800        ordinal: u64,
7801        buffer: ___T::RecvBuffer,
7802        responder: ::fidl_next::protocol::Responder,
7803    ) {
7804        match ordinal {
7805            5728722530628427873 => {
7806                let responder = ::fidl_next::Responder::from_untyped(responder);
7807
7808                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
7809                handler.get_next(sender, buffer, responder);
7810            }
7811
7812            ordinal => handler.on_unknown_interaction(sender, ordinal),
7813        }
7814    }
7815}
7816
7817#[derive(Clone, Debug)]
7818pub struct DictionaryEnumerateIteratorGetNextRequest {
7819    pub start_id: u64,
7820
7821    pub limit: u32,
7822}
7823
7824impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextRequest {
7825    type Encoded = WireDictionaryEnumerateIteratorGetNextRequest;
7826}
7827
7828unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextRequest
7829where
7830    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7831{
7832    #[inline]
7833    fn encode(
7834        &mut self,
7835        encoder: &mut ___E,
7836        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7837    ) -> Result<(), ::fidl_next::EncodeError> {
7838        ::fidl_next::munge! {
7839            let Self::Encoded {
7840                start_id,
7841                limit,
7842
7843            } = out;
7844        }
7845
7846        ::fidl_next::Encode::encode(&mut self.start_id, encoder, start_id)?;
7847
7848        ::fidl_next::Encode::encode(&mut self.limit, encoder, limit)?;
7849
7850        Ok(())
7851    }
7852}
7853
7854impl ::fidl_next::EncodableOption for Box<DictionaryEnumerateIteratorGetNextRequest> {
7855    type EncodedOption = ::fidl_next::WireBox<WireDictionaryEnumerateIteratorGetNextRequest>;
7856}
7857
7858unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryEnumerateIteratorGetNextRequest>
7859where
7860    ___E: ::fidl_next::Encoder + ?Sized,
7861    DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Encode<___E>,
7862{
7863    #[inline]
7864    fn encode_option(
7865        this: Option<&mut Self>,
7866        encoder: &mut ___E,
7867        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7868    ) -> Result<(), ::fidl_next::EncodeError> {
7869        if let Some(inner) = this {
7870            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7871            ::fidl_next::WireBox::encode_present(out);
7872        } else {
7873            ::fidl_next::WireBox::encode_absent(out);
7874        }
7875
7876        Ok(())
7877    }
7878}
7879
7880impl ::fidl_next::TakeFrom<WireDictionaryEnumerateIteratorGetNextRequest>
7881    for DictionaryEnumerateIteratorGetNextRequest
7882{
7883    #[inline]
7884    fn take_from(from: &WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
7885        Self {
7886            start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
7887
7888            limit: ::fidl_next::TakeFrom::take_from(&from.limit),
7889        }
7890    }
7891}
7892
7893/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextRequest`].
7894#[derive(Clone, Debug)]
7895#[repr(C)]
7896pub struct WireDictionaryEnumerateIteratorGetNextRequest {
7897    pub start_id: ::fidl_next::WireU64,
7898
7899    pub limit: ::fidl_next::WireU32,
7900}
7901
7902unsafe impl ::fidl_next::ZeroPadding for WireDictionaryEnumerateIteratorGetNextRequest {
7903    #[inline]
7904    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
7905        unsafe {
7906            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
7907        }
7908    }
7909}
7910
7911unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryEnumerateIteratorGetNextRequest
7912where
7913    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
7914{
7915    fn decode(
7916        slot: ::fidl_next::Slot<'_, Self>,
7917        decoder: &mut ___D,
7918    ) -> Result<(), ::fidl_next::DecodeError> {
7919        ::fidl_next::munge! {
7920            let Self {
7921                mut start_id,
7922                mut limit,
7923
7924            } = slot;
7925        }
7926
7927        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
7928
7929        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
7930
7931        Ok(())
7932    }
7933}
7934
7935#[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"]
7936#[derive(Debug)]
7937pub struct DictionaryOptionalItem {
7938    pub key: String,
7939
7940    pub value: Option<Box<crate::WrappedCapabilityId>>,
7941}
7942
7943impl ::fidl_next::Encodable for DictionaryOptionalItem {
7944    type Encoded = WireDictionaryOptionalItem;
7945}
7946
7947unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryOptionalItem
7948where
7949    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7950
7951    ___E: ::fidl_next::Encoder,
7952
7953    ___E: ::fidl_next::fuchsia::HandleEncoder,
7954{
7955    #[inline]
7956    fn encode(
7957        &mut self,
7958        encoder: &mut ___E,
7959        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7960    ) -> Result<(), ::fidl_next::EncodeError> {
7961        ::fidl_next::munge! {
7962            let Self::Encoded {
7963                key,
7964                value,
7965
7966            } = out;
7967        }
7968
7969        ::fidl_next::Encode::encode(&mut self.key, encoder, key)?;
7970
7971        ::fidl_next::Encode::encode(&mut self.value, encoder, value)?;
7972
7973        Ok(())
7974    }
7975}
7976
7977impl ::fidl_next::EncodableOption for Box<DictionaryOptionalItem> {
7978    type EncodedOption = ::fidl_next::WireBox<WireDictionaryOptionalItem>;
7979}
7980
7981unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryOptionalItem>
7982where
7983    ___E: ::fidl_next::Encoder + ?Sized,
7984    DictionaryOptionalItem: ::fidl_next::Encode<___E>,
7985{
7986    #[inline]
7987    fn encode_option(
7988        this: Option<&mut Self>,
7989        encoder: &mut ___E,
7990        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
7991    ) -> Result<(), ::fidl_next::EncodeError> {
7992        if let Some(inner) = this {
7993            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
7994            ::fidl_next::WireBox::encode_present(out);
7995        } else {
7996            ::fidl_next::WireBox::encode_absent(out);
7997        }
7998
7999        Ok(())
8000    }
8001}
8002
8003impl ::fidl_next::TakeFrom<WireDictionaryOptionalItem> for DictionaryOptionalItem {
8004    #[inline]
8005    fn take_from(from: &WireDictionaryOptionalItem) -> Self {
8006        Self {
8007            key: ::fidl_next::TakeFrom::take_from(&from.key),
8008
8009            value: ::fidl_next::TakeFrom::take_from(&from.value),
8010        }
8011    }
8012}
8013
8014/// The wire type corresponding to [`DictionaryOptionalItem`].
8015#[derive(Debug)]
8016#[repr(C)]
8017pub struct WireDictionaryOptionalItem {
8018    pub key: ::fidl_next::WireString,
8019
8020    pub value: ::fidl_next::WireBox<crate::WireWrappedCapabilityId>,
8021}
8022
8023unsafe impl ::fidl_next::ZeroPadding for WireDictionaryOptionalItem {
8024    #[inline]
8025    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8026}
8027
8028unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryOptionalItem
8029where
8030    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8031
8032    ___D: ::fidl_next::Decoder,
8033
8034    ___D: ::fidl_next::fuchsia::HandleDecoder,
8035{
8036    fn decode(
8037        slot: ::fidl_next::Slot<'_, Self>,
8038        decoder: &mut ___D,
8039    ) -> Result<(), ::fidl_next::DecodeError> {
8040        ::fidl_next::munge! {
8041            let Self {
8042                mut key,
8043                mut value,
8044
8045            } = slot;
8046        }
8047
8048        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
8049
8050        let key = unsafe { key.deref_unchecked() };
8051
8052        if key.len() > 255 {
8053            return Err(::fidl_next::DecodeError::VectorTooLong {
8054                size: key.len() as u64,
8055                limit: 255,
8056            });
8057        }
8058
8059        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
8060
8061        Ok(())
8062    }
8063}
8064
8065#[derive(Debug)]
8066pub struct DictionaryEnumerateIteratorGetNextResponse {
8067    pub items: Vec<crate::DictionaryOptionalItem>,
8068
8069    pub end_id: u64,
8070}
8071
8072impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextResponse {
8073    type Encoded = WireDictionaryEnumerateIteratorGetNextResponse;
8074}
8075
8076unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextResponse
8077where
8078    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8079
8080    ___E: ::fidl_next::Encoder,
8081
8082    ___E: ::fidl_next::fuchsia::HandleEncoder,
8083{
8084    #[inline]
8085    fn encode(
8086        &mut self,
8087        encoder: &mut ___E,
8088        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8089    ) -> Result<(), ::fidl_next::EncodeError> {
8090        ::fidl_next::munge! {
8091            let Self::Encoded {
8092                items,
8093                end_id,
8094
8095            } = out;
8096        }
8097
8098        ::fidl_next::Encode::encode(&mut self.items, encoder, items)?;
8099
8100        ::fidl_next::Encode::encode(&mut self.end_id, encoder, end_id)?;
8101
8102        Ok(())
8103    }
8104}
8105
8106impl ::fidl_next::EncodableOption for Box<DictionaryEnumerateIteratorGetNextResponse> {
8107    type EncodedOption = ::fidl_next::WireBox<WireDictionaryEnumerateIteratorGetNextResponse>;
8108}
8109
8110unsafe impl<___E> ::fidl_next::EncodeOption<___E>
8111    for Box<DictionaryEnumerateIteratorGetNextResponse>
8112where
8113    ___E: ::fidl_next::Encoder + ?Sized,
8114    DictionaryEnumerateIteratorGetNextResponse: ::fidl_next::Encode<___E>,
8115{
8116    #[inline]
8117    fn encode_option(
8118        this: Option<&mut Self>,
8119        encoder: &mut ___E,
8120        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8121    ) -> Result<(), ::fidl_next::EncodeError> {
8122        if let Some(inner) = this {
8123            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8124            ::fidl_next::WireBox::encode_present(out);
8125        } else {
8126            ::fidl_next::WireBox::encode_absent(out);
8127        }
8128
8129        Ok(())
8130    }
8131}
8132
8133impl ::fidl_next::TakeFrom<WireDictionaryEnumerateIteratorGetNextResponse>
8134    for DictionaryEnumerateIteratorGetNextResponse
8135{
8136    #[inline]
8137    fn take_from(from: &WireDictionaryEnumerateIteratorGetNextResponse) -> Self {
8138        Self {
8139            items: ::fidl_next::TakeFrom::take_from(&from.items),
8140
8141            end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
8142        }
8143    }
8144}
8145
8146/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextResponse`].
8147#[derive(Debug)]
8148#[repr(C)]
8149pub struct WireDictionaryEnumerateIteratorGetNextResponse {
8150    pub items: ::fidl_next::WireVector<crate::WireDictionaryOptionalItem>,
8151
8152    pub end_id: ::fidl_next::WireU64,
8153}
8154
8155unsafe impl ::fidl_next::ZeroPadding for WireDictionaryEnumerateIteratorGetNextResponse {
8156    #[inline]
8157    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8158}
8159
8160unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryEnumerateIteratorGetNextResponse
8161where
8162    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8163
8164    ___D: ::fidl_next::Decoder,
8165
8166    ___D: ::fidl_next::fuchsia::HandleDecoder,
8167{
8168    fn decode(
8169        slot: ::fidl_next::Slot<'_, Self>,
8170        decoder: &mut ___D,
8171    ) -> Result<(), ::fidl_next::DecodeError> {
8172        ::fidl_next::munge! {
8173            let Self {
8174                mut items,
8175                mut end_id,
8176
8177            } = slot;
8178        }
8179
8180        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
8181
8182        let items = unsafe { items.deref_unchecked() };
8183
8184        if items.len() > 128 {
8185            return Err(::fidl_next::DecodeError::VectorTooLong {
8186                size: items.len() as u64,
8187                limit: 128,
8188            });
8189        }
8190
8191        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
8192
8193        Ok(())
8194    }
8195}
8196
8197/// The type corresponding to the DictionaryEnumerateIterator protocol.
8198#[derive(Debug)]
8199pub struct DictionaryEnumerateIterator;
8200
8201pub mod dictionary_enumerate_iterator {
8202    pub mod prelude {
8203        pub use crate::{
8204            dictionary_enumerate_iterator, DictionaryEnumerateIterator,
8205            DictionaryEnumerateIteratorClientHandler, DictionaryEnumerateIteratorClientSender,
8206            DictionaryEnumerateIteratorServerHandler, DictionaryEnumerateIteratorServerSender,
8207        };
8208
8209        pub use crate::CapabilityStoreError;
8210
8211        pub use crate::DictionaryEnumerateIteratorGetNextRequest;
8212
8213        pub use crate::DictionaryEnumerateIteratorGetNextResponse;
8214    }
8215
8216    pub struct GetNext;
8217
8218    impl ::fidl_next::Method for GetNext {
8219        const ORDINAL: u64 = 1511164556663256527;
8220
8221        type Protocol = crate::DictionaryEnumerateIterator;
8222
8223        type Request = crate::WireDictionaryEnumerateIteratorGetNextRequest;
8224
8225        type Response = ::fidl_next::WireFlexibleResult<
8226            crate::WireDictionaryEnumerateIteratorGetNextResponse,
8227            crate::WireCapabilityStoreError,
8228        >;
8229    }
8230}
8231
8232/// A helper trait for the `DictionaryEnumerateIterator` client sender.
8233pub trait DictionaryEnumerateIteratorClientSender {
8234    type Transport: ::fidl_next::Transport;
8235
8236    #[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"]
8237    fn get_next<___R>(
8238        &self,
8239        request: &mut ___R,
8240    ) -> Result<
8241        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_enumerate_iterator::GetNext>,
8242        ::fidl_next::EncodeError,
8243    >
8244    where
8245        ___R: ::fidl_next::Encode<
8246            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
8247            Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest,
8248        >;
8249}
8250
8251impl<___T> DictionaryEnumerateIteratorClientSender
8252    for ::fidl_next::ClientSender<___T, DictionaryEnumerateIterator>
8253where
8254    ___T: ::fidl_next::Transport,
8255{
8256    type Transport = ___T;
8257
8258    #[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"]
8259    fn get_next<___R>(
8260        &self,
8261        request: &mut ___R,
8262    ) -> Result<
8263        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_enumerate_iterator::GetNext>,
8264        ::fidl_next::EncodeError,
8265    >
8266    where
8267        ___R: ::fidl_next::Encode<
8268            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
8269            Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest,
8270        >,
8271    {
8272        self.as_untyped()
8273            .send_two_way(1511164556663256527, request)
8274            .map(::fidl_next::ResponseFuture::from_untyped)
8275    }
8276}
8277
8278/// A client handler for the DictionaryEnumerateIterator protocol.
8279///
8280/// See [`DictionaryEnumerateIterator`] for more details.
8281pub trait DictionaryEnumerateIteratorClientHandler<___T: ::fidl_next::Transport> {
8282    fn on_unknown_interaction(
8283        &mut self,
8284        sender: &::fidl_next::ClientSender<___T, DictionaryEnumerateIterator>,
8285        ordinal: u64,
8286    ) {
8287        sender.close();
8288    }
8289}
8290
8291impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryEnumerateIterator
8292where
8293    ___T: ::fidl_next::Transport,
8294    ___H: DictionaryEnumerateIteratorClientHandler<___T>,
8295
8296    <dictionary_enumerate_iterator::GetNext as ::fidl_next::Method>::Response:
8297        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8298{
8299    fn on_event(
8300        handler: &mut ___H,
8301        sender: &::fidl_next::ClientSender<___T, Self>,
8302        ordinal: u64,
8303        buffer: ___T::RecvBuffer,
8304    ) {
8305        match ordinal {
8306            ordinal => handler.on_unknown_interaction(sender, ordinal),
8307        }
8308    }
8309}
8310
8311/// A helper trait for the `DictionaryEnumerateIterator` server sender.
8312pub trait DictionaryEnumerateIteratorServerSender {
8313    type Transport: ::fidl_next::Transport;
8314}
8315
8316impl<___T> DictionaryEnumerateIteratorServerSender
8317    for ::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>
8318where
8319    ___T: ::fidl_next::Transport,
8320{
8321    type Transport = ___T;
8322}
8323
8324/// A server handler for the DictionaryEnumerateIterator protocol.
8325///
8326/// See [`DictionaryEnumerateIterator`] for more details.
8327pub trait DictionaryEnumerateIteratorServerHandler<___T: ::fidl_next::Transport> {
8328    #[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"]
8329    fn get_next(
8330        &mut self,
8331        sender: &::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>,
8332
8333        request: ::fidl_next::RequestBuffer<___T, dictionary_enumerate_iterator::GetNext>,
8334
8335        responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext>,
8336    );
8337
8338    fn on_unknown_interaction(
8339        &mut self,
8340        sender: &::fidl_next::ServerSender<___T, DictionaryEnumerateIterator>,
8341        ordinal: u64,
8342    ) {
8343        sender.close();
8344    }
8345}
8346
8347impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryEnumerateIterator
8348where
8349    ___T: ::fidl_next::Transport,
8350    ___H: DictionaryEnumerateIteratorServerHandler<___T>,
8351
8352    crate::WireDictionaryEnumerateIteratorGetNextRequest:
8353        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8354{
8355    fn on_one_way(
8356        handler: &mut ___H,
8357        sender: &::fidl_next::ServerSender<___T, Self>,
8358        ordinal: u64,
8359        buffer: ___T::RecvBuffer,
8360    ) {
8361        match ordinal {
8362            ordinal => handler.on_unknown_interaction(sender, ordinal),
8363        }
8364    }
8365
8366    fn on_two_way(
8367        handler: &mut ___H,
8368        sender: &::fidl_next::ServerSender<___T, Self>,
8369        ordinal: u64,
8370        buffer: ___T::RecvBuffer,
8371        responder: ::fidl_next::protocol::Responder,
8372    ) {
8373        match ordinal {
8374            1511164556663256527 => {
8375                let responder = ::fidl_next::Responder::from_untyped(responder);
8376
8377                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
8378                handler.get_next(sender, buffer, responder);
8379            }
8380
8381            ordinal => handler.on_unknown_interaction(sender, ordinal),
8382        }
8383    }
8384}
8385
8386#[doc = " Error returned from [CapabilityStore/Dictionary*] methods.\n"]
8387#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8388#[repr(u32)]
8389pub enum DictionaryError {
8390    NotFound = 1,
8391    AlreadyExists = 2,
8392    BadCapability = 3,
8393    InvalidKey = 4,
8394    NotCloneable = 5,
8395    UnknownOrdinal_(u32),
8396}
8397
8398impl ::fidl_next::Encodable for DictionaryError {
8399    type Encoded = WireDictionaryError;
8400}
8401impl ::std::convert::From<u32> for DictionaryError {
8402    fn from(value: u32) -> Self {
8403        match value {
8404            1 => Self::NotFound,
8405            2 => Self::AlreadyExists,
8406            3 => Self::BadCapability,
8407            4 => Self::InvalidKey,
8408            5 => Self::NotCloneable,
8409
8410            _ => Self::UnknownOrdinal_(value),
8411        }
8412    }
8413}
8414
8415unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryError
8416where
8417    ___E: ?Sized,
8418{
8419    #[inline]
8420    fn encode(
8421        &mut self,
8422        _: &mut ___E,
8423        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8424    ) -> Result<(), ::fidl_next::EncodeError> {
8425        ::fidl_next::munge!(let WireDictionaryError { value } = out);
8426        let _ = value.write(::fidl_next::WireU32::from(match *self {
8427            Self::NotFound => 1,
8428
8429            Self::AlreadyExists => 2,
8430
8431            Self::BadCapability => 3,
8432
8433            Self::InvalidKey => 4,
8434
8435            Self::NotCloneable => 5,
8436
8437            Self::UnknownOrdinal_(value) => value,
8438        }));
8439
8440        Ok(())
8441    }
8442}
8443
8444impl ::core::convert::From<WireDictionaryError> for DictionaryError {
8445    fn from(wire: WireDictionaryError) -> Self {
8446        match u32::from(wire.value) {
8447            1 => Self::NotFound,
8448
8449            2 => Self::AlreadyExists,
8450
8451            3 => Self::BadCapability,
8452
8453            4 => Self::InvalidKey,
8454
8455            5 => Self::NotCloneable,
8456
8457            value => Self::UnknownOrdinal_(value),
8458        }
8459    }
8460}
8461
8462impl ::fidl_next::TakeFrom<WireDictionaryError> for DictionaryError {
8463    #[inline]
8464    fn take_from(from: &WireDictionaryError) -> Self {
8465        Self::from(*from)
8466    }
8467}
8468
8469/// The wire type corresponding to [`DictionaryError`].
8470#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8471#[repr(transparent)]
8472pub struct WireDictionaryError {
8473    value: ::fidl_next::WireU32,
8474}
8475
8476unsafe impl ::fidl_next::ZeroPadding for WireDictionaryError {
8477    #[inline]
8478    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8479        // Wire enums have no padding
8480    }
8481}
8482
8483impl WireDictionaryError {
8484    pub const NOT_FOUND: WireDictionaryError =
8485        WireDictionaryError { value: ::fidl_next::WireU32(1) };
8486
8487    pub const ALREADY_EXISTS: WireDictionaryError =
8488        WireDictionaryError { value: ::fidl_next::WireU32(2) };
8489
8490    pub const BAD_CAPABILITY: WireDictionaryError =
8491        WireDictionaryError { value: ::fidl_next::WireU32(3) };
8492
8493    pub const INVALID_KEY: WireDictionaryError =
8494        WireDictionaryError { value: ::fidl_next::WireU32(4) };
8495
8496    pub const NOT_CLONEABLE: WireDictionaryError =
8497        WireDictionaryError { value: ::fidl_next::WireU32(5) };
8498}
8499
8500unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryError
8501where
8502    ___D: ?Sized,
8503{
8504    fn decode(
8505        slot: ::fidl_next::Slot<'_, Self>,
8506        _: &mut ___D,
8507    ) -> Result<(), ::fidl_next::DecodeError> {
8508        Ok(())
8509    }
8510}
8511
8512impl ::core::convert::From<DictionaryError> for WireDictionaryError {
8513    fn from(natural: DictionaryError) -> Self {
8514        match natural {
8515            DictionaryError::NotFound => WireDictionaryError::NOT_FOUND,
8516
8517            DictionaryError::AlreadyExists => WireDictionaryError::ALREADY_EXISTS,
8518
8519            DictionaryError::BadCapability => WireDictionaryError::BAD_CAPABILITY,
8520
8521            DictionaryError::InvalidKey => WireDictionaryError::INVALID_KEY,
8522
8523            DictionaryError::NotCloneable => WireDictionaryError::NOT_CLONEABLE,
8524
8525            DictionaryError::UnknownOrdinal_(value) => {
8526                WireDictionaryError { value: ::fidl_next::WireU32::from(value) }
8527            }
8528        }
8529    }
8530}
8531
8532#[derive(Debug)]
8533pub struct DictionaryKeysIteratorGetNextResponse {
8534    pub keys: Vec<String>,
8535}
8536
8537impl ::fidl_next::Encodable for DictionaryKeysIteratorGetNextResponse {
8538    type Encoded = WireDictionaryKeysIteratorGetNextResponse;
8539}
8540
8541unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryKeysIteratorGetNextResponse
8542where
8543    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8544
8545    ___E: ::fidl_next::Encoder,
8546
8547    ___E: ::fidl_next::fuchsia::HandleEncoder,
8548{
8549    #[inline]
8550    fn encode(
8551        &mut self,
8552        encoder: &mut ___E,
8553        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8554    ) -> Result<(), ::fidl_next::EncodeError> {
8555        ::fidl_next::munge! {
8556            let Self::Encoded {
8557                keys,
8558
8559            } = out;
8560        }
8561
8562        ::fidl_next::Encode::encode(&mut self.keys, encoder, keys)?;
8563
8564        Ok(())
8565    }
8566}
8567
8568impl ::fidl_next::EncodableOption for Box<DictionaryKeysIteratorGetNextResponse> {
8569    type EncodedOption = ::fidl_next::WireBox<WireDictionaryKeysIteratorGetNextResponse>;
8570}
8571
8572unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryKeysIteratorGetNextResponse>
8573where
8574    ___E: ::fidl_next::Encoder + ?Sized,
8575    DictionaryKeysIteratorGetNextResponse: ::fidl_next::Encode<___E>,
8576{
8577    #[inline]
8578    fn encode_option(
8579        this: Option<&mut Self>,
8580        encoder: &mut ___E,
8581        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8582    ) -> Result<(), ::fidl_next::EncodeError> {
8583        if let Some(inner) = this {
8584            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8585            ::fidl_next::WireBox::encode_present(out);
8586        } else {
8587            ::fidl_next::WireBox::encode_absent(out);
8588        }
8589
8590        Ok(())
8591    }
8592}
8593
8594impl ::fidl_next::TakeFrom<WireDictionaryKeysIteratorGetNextResponse>
8595    for DictionaryKeysIteratorGetNextResponse
8596{
8597    #[inline]
8598    fn take_from(from: &WireDictionaryKeysIteratorGetNextResponse) -> Self {
8599        Self { keys: ::fidl_next::TakeFrom::take_from(&from.keys) }
8600    }
8601}
8602
8603/// The wire type corresponding to [`DictionaryKeysIteratorGetNextResponse`].
8604#[derive(Debug)]
8605#[repr(C)]
8606pub struct WireDictionaryKeysIteratorGetNextResponse {
8607    pub keys: ::fidl_next::WireVector<::fidl_next::WireString>,
8608}
8609
8610unsafe impl ::fidl_next::ZeroPadding for WireDictionaryKeysIteratorGetNextResponse {
8611    #[inline]
8612    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8613}
8614
8615unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryKeysIteratorGetNextResponse
8616where
8617    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8618
8619    ___D: ::fidl_next::Decoder,
8620
8621    ___D: ::fidl_next::fuchsia::HandleDecoder,
8622{
8623    fn decode(
8624        slot: ::fidl_next::Slot<'_, Self>,
8625        decoder: &mut ___D,
8626    ) -> Result<(), ::fidl_next::DecodeError> {
8627        ::fidl_next::munge! {
8628            let Self {
8629                mut keys,
8630
8631            } = slot;
8632        }
8633
8634        ::fidl_next::Decode::decode(keys.as_mut(), decoder)?;
8635
8636        let keys = unsafe { keys.deref_unchecked() };
8637
8638        if keys.len() > 128 {
8639            return Err(::fidl_next::DecodeError::VectorTooLong {
8640                size: keys.len() as u64,
8641                limit: 128,
8642            });
8643        }
8644
8645        Ok(())
8646    }
8647}
8648
8649/// The type corresponding to the DictionaryKeysIterator protocol.
8650#[derive(Debug)]
8651pub struct DictionaryKeysIterator;
8652
8653pub mod dictionary_keys_iterator {
8654    pub mod prelude {
8655        pub use crate::{
8656            dictionary_keys_iterator, DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
8657            DictionaryKeysIteratorClientSender, DictionaryKeysIteratorServerHandler,
8658            DictionaryKeysIteratorServerSender,
8659        };
8660
8661        pub use crate::DictionaryKeysIteratorGetNextResponse;
8662    }
8663
8664    pub struct GetNext;
8665
8666    impl ::fidl_next::Method for GetNext {
8667        const ORDINAL: u64 = 4987781442555247955;
8668
8669        type Protocol = crate::DictionaryKeysIterator;
8670
8671        type Request = ();
8672
8673        type Response = ::fidl_next::WireFlexible<crate::WireDictionaryKeysIteratorGetNextResponse>;
8674    }
8675}
8676
8677/// A helper trait for the `DictionaryKeysIterator` client sender.
8678pub trait DictionaryKeysIteratorClientSender {
8679    type Transport: ::fidl_next::Transport;
8680
8681    fn get_next(
8682        &self,
8683    ) -> Result<
8684        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_keys_iterator::GetNext>,
8685        ::fidl_next::EncodeError,
8686    >;
8687}
8688
8689impl<___T> DictionaryKeysIteratorClientSender
8690    for ::fidl_next::ClientSender<___T, DictionaryKeysIterator>
8691where
8692    ___T: ::fidl_next::Transport,
8693{
8694    type Transport = ___T;
8695
8696    fn get_next(
8697        &self,
8698    ) -> Result<
8699        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_keys_iterator::GetNext>,
8700        ::fidl_next::EncodeError,
8701    > {
8702        self.as_untyped()
8703            .send_two_way(4987781442555247955, &mut ())
8704            .map(::fidl_next::ResponseFuture::from_untyped)
8705    }
8706}
8707
8708/// A client handler for the DictionaryKeysIterator protocol.
8709///
8710/// See [`DictionaryKeysIterator`] for more details.
8711pub trait DictionaryKeysIteratorClientHandler<___T: ::fidl_next::Transport> {
8712    fn on_unknown_interaction(
8713        &mut self,
8714        sender: &::fidl_next::ClientSender<___T, DictionaryKeysIterator>,
8715        ordinal: u64,
8716    ) {
8717        sender.close();
8718    }
8719}
8720
8721impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryKeysIterator
8722where
8723    ___T: ::fidl_next::Transport,
8724    ___H: DictionaryKeysIteratorClientHandler<___T>,
8725
8726    <dictionary_keys_iterator::GetNext as ::fidl_next::Method>::Response:
8727        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8728{
8729    fn on_event(
8730        handler: &mut ___H,
8731        sender: &::fidl_next::ClientSender<___T, Self>,
8732        ordinal: u64,
8733        buffer: ___T::RecvBuffer,
8734    ) {
8735        match ordinal {
8736            ordinal => handler.on_unknown_interaction(sender, ordinal),
8737        }
8738    }
8739}
8740
8741/// A helper trait for the `DictionaryKeysIterator` server sender.
8742pub trait DictionaryKeysIteratorServerSender {
8743    type Transport: ::fidl_next::Transport;
8744}
8745
8746impl<___T> DictionaryKeysIteratorServerSender
8747    for ::fidl_next::ServerSender<___T, DictionaryKeysIterator>
8748where
8749    ___T: ::fidl_next::Transport,
8750{
8751    type Transport = ___T;
8752}
8753
8754/// A server handler for the DictionaryKeysIterator protocol.
8755///
8756/// See [`DictionaryKeysIterator`] for more details.
8757pub trait DictionaryKeysIteratorServerHandler<___T: ::fidl_next::Transport> {
8758    fn get_next(
8759        &mut self,
8760        sender: &::fidl_next::ServerSender<___T, DictionaryKeysIterator>,
8761
8762        responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext>,
8763    );
8764
8765    fn on_unknown_interaction(
8766        &mut self,
8767        sender: &::fidl_next::ServerSender<___T, DictionaryKeysIterator>,
8768        ordinal: u64,
8769    ) {
8770        sender.close();
8771    }
8772}
8773
8774impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryKeysIterator
8775where
8776    ___T: ::fidl_next::Transport,
8777    ___H: DictionaryKeysIteratorServerHandler<___T>,
8778{
8779    fn on_one_way(
8780        handler: &mut ___H,
8781        sender: &::fidl_next::ServerSender<___T, Self>,
8782        ordinal: u64,
8783        buffer: ___T::RecvBuffer,
8784    ) {
8785        match ordinal {
8786            ordinal => handler.on_unknown_interaction(sender, ordinal),
8787        }
8788    }
8789
8790    fn on_two_way(
8791        handler: &mut ___H,
8792        sender: &::fidl_next::ServerSender<___T, Self>,
8793        ordinal: u64,
8794        buffer: ___T::RecvBuffer,
8795        responder: ::fidl_next::protocol::Responder,
8796    ) {
8797        match ordinal {
8798            4987781442555247955 => {
8799                let responder = ::fidl_next::Responder::from_untyped(responder);
8800
8801                handler.get_next(sender, responder);
8802            }
8803
8804            ordinal => handler.on_unknown_interaction(sender, ordinal),
8805        }
8806    }
8807}
8808
8809#[derive(Debug)]
8810pub enum DictionaryRouterRouteResponse {
8811    Dictionary(crate::DictionaryRef),
8812
8813    Unavailable(crate::Unit),
8814}
8815
8816impl ::fidl_next::Encodable for DictionaryRouterRouteResponse {
8817    type Encoded = WireDictionaryRouterRouteResponse;
8818}
8819
8820unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryRouterRouteResponse
8821where
8822    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8823
8824    ___E: ::fidl_next::fuchsia::HandleEncoder,
8825{
8826    #[inline]
8827    fn encode(
8828        &mut self,
8829        encoder: &mut ___E,
8830        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8831    ) -> Result<(), ::fidl_next::EncodeError> {
8832        ::fidl_next::munge!(let WireDictionaryRouterRouteResponse { raw } = out);
8833
8834        match self {
8835            Self::Dictionary(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8836                ___E,
8837                crate::DictionaryRef,
8838            >(value, 1, encoder, raw)?,
8839
8840            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8841                ___E,
8842                crate::Unit,
8843            >(value, 2, encoder, raw)?,
8844        }
8845
8846        Ok(())
8847    }
8848}
8849
8850impl ::fidl_next::EncodableOption for Box<DictionaryRouterRouteResponse> {
8851    type EncodedOption = WireOptionalDictionaryRouterRouteResponse;
8852}
8853
8854unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DictionaryRouterRouteResponse>
8855where
8856    ___E: ?Sized,
8857    DictionaryRouterRouteResponse: ::fidl_next::Encode<___E>,
8858{
8859    #[inline]
8860    fn encode_option(
8861        this: Option<&mut Self>,
8862        encoder: &mut ___E,
8863        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8864    ) -> Result<(), ::fidl_next::EncodeError> {
8865        ::fidl_next::munge!(let WireOptionalDictionaryRouterRouteResponse { raw } = &mut *out);
8866
8867        if let Some(inner) = this {
8868            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8869            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
8870        } else {
8871            ::fidl_next::RawWireUnion::encode_absent(raw);
8872        }
8873
8874        Ok(())
8875    }
8876}
8877
8878impl ::fidl_next::TakeFrom<WireDictionaryRouterRouteResponse> for DictionaryRouterRouteResponse {
8879    #[inline]
8880    fn take_from(from: &WireDictionaryRouterRouteResponse) -> Self {
8881        match from.raw.ordinal() {
8882            1 => Self::Dictionary(::fidl_next::TakeFrom::take_from(unsafe {
8883                from.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
8884            })),
8885
8886            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
8887                from.raw.get().deref_unchecked::<crate::WireUnit>()
8888            })),
8889
8890            _ => unsafe { ::core::hint::unreachable_unchecked() },
8891        }
8892    }
8893}
8894
8895impl ::fidl_next::TakeFrom<WireOptionalDictionaryRouterRouteResponse>
8896    for Option<Box<DictionaryRouterRouteResponse>>
8897{
8898    #[inline]
8899    fn take_from(from: &WireOptionalDictionaryRouterRouteResponse) -> Self {
8900        if let Some(inner) = from.as_ref() {
8901            Some(::fidl_next::TakeFrom::take_from(inner))
8902        } else {
8903            None
8904        }
8905    }
8906}
8907
8908/// The wire type corresponding to [`DictionaryRouterRouteResponse`].
8909#[repr(transparent)]
8910pub struct WireDictionaryRouterRouteResponse {
8911    raw: ::fidl_next::RawWireUnion,
8912}
8913
8914unsafe impl ::fidl_next::ZeroPadding for WireDictionaryRouterRouteResponse {
8915    #[inline]
8916    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8917        ::fidl_next::munge!(let Self { raw } = out);
8918        ::fidl_next::RawWireUnion::zero_padding(raw);
8919    }
8920}
8921
8922pub mod dictionary_router_route_response {
8923    pub enum Ref<'union> {
8924        Dictionary(&'union crate::WireDictionaryRef),
8925
8926        Unavailable(&'union crate::WireUnit),
8927    }
8928}
8929
8930impl WireDictionaryRouterRouteResponse {
8931    pub fn as_ref(&self) -> crate::dictionary_router_route_response::Ref<'_> {
8932        match self.raw.ordinal() {
8933            1 => crate::dictionary_router_route_response::Ref::Dictionary(unsafe {
8934                self.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
8935            }),
8936
8937            2 => crate::dictionary_router_route_response::Ref::Unavailable(unsafe {
8938                self.raw.get().deref_unchecked::<crate::WireUnit>()
8939            }),
8940
8941            _ => unsafe { ::core::hint::unreachable_unchecked() },
8942        }
8943    }
8944}
8945
8946unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryRouterRouteResponse
8947where
8948    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8949
8950    ___D: ::fidl_next::fuchsia::HandleDecoder,
8951{
8952    fn decode(
8953        mut slot: ::fidl_next::Slot<'_, Self>,
8954        decoder: &mut ___D,
8955    ) -> Result<(), ::fidl_next::DecodeError> {
8956        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
8957        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
8958            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
8959                raw, decoder,
8960            )?,
8961
8962            2 => {
8963                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
8964            }
8965
8966            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
8967        }
8968
8969        Ok(())
8970    }
8971}
8972
8973impl ::core::fmt::Debug for WireDictionaryRouterRouteResponse {
8974    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8975        match self.raw.ordinal() {
8976            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDictionaryRef>().fmt(f) },
8977            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
8978            _ => unsafe { ::core::hint::unreachable_unchecked() },
8979        }
8980    }
8981}
8982
8983#[repr(transparent)]
8984pub struct WireOptionalDictionaryRouterRouteResponse {
8985    raw: ::fidl_next::RawWireUnion,
8986}
8987
8988unsafe impl ::fidl_next::ZeroPadding for WireOptionalDictionaryRouterRouteResponse {
8989    #[inline]
8990    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8991        ::fidl_next::munge!(let Self { raw } = out);
8992        ::fidl_next::RawWireUnion::zero_padding(raw);
8993    }
8994}
8995
8996impl WireOptionalDictionaryRouterRouteResponse {
8997    pub fn is_some(&self) -> bool {
8998        self.raw.is_some()
8999    }
9000
9001    pub fn is_none(&self) -> bool {
9002        self.raw.is_none()
9003    }
9004
9005    pub fn as_ref(&self) -> Option<&WireDictionaryRouterRouteResponse> {
9006        if self.is_some() {
9007            Some(unsafe { &*(self as *const Self).cast() })
9008        } else {
9009            None
9010        }
9011    }
9012}
9013
9014unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDictionaryRouterRouteResponse
9015where
9016    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9017
9018    ___D: ::fidl_next::fuchsia::HandleDecoder,
9019{
9020    fn decode(
9021        mut slot: ::fidl_next::Slot<'_, Self>,
9022        decoder: &mut ___D,
9023    ) -> Result<(), ::fidl_next::DecodeError> {
9024        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9025        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9026            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
9027                raw, decoder,
9028            )?,
9029
9030            2 => {
9031                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9032            }
9033
9034            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9035            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9036        }
9037
9038        Ok(())
9039    }
9040}
9041
9042impl ::core::fmt::Debug for WireOptionalDictionaryRouterRouteResponse {
9043    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9044        self.as_ref().fmt(f)
9045    }
9046}
9047
9048/// The type corresponding to the DictionaryRouter protocol.
9049#[derive(Debug)]
9050pub struct DictionaryRouter;
9051
9052impl ::fidl_next::Discoverable for DictionaryRouter {
9053    const PROTOCOL_NAME: &'static str = "dictionary_router";
9054}
9055
9056pub mod dictionary_router {
9057    pub mod prelude {
9058        pub use crate::{
9059            dictionary_router, DictionaryRouter, DictionaryRouterClientHandler,
9060            DictionaryRouterClientSender, DictionaryRouterServerHandler,
9061            DictionaryRouterServerSender,
9062        };
9063
9064        pub use crate::DictionaryRouterRouteResponse;
9065
9066        pub use crate::RouteRequest;
9067
9068        pub use crate::RouterError;
9069    }
9070
9071    pub struct Route;
9072
9073    impl ::fidl_next::Method for Route {
9074        const ORDINAL: u64 = 8164012099375978399;
9075
9076        type Protocol = crate::DictionaryRouter;
9077
9078        type Request = crate::WireRouteRequest;
9079
9080        type Response = ::fidl_next::WireFlexibleResult<
9081            crate::WireDictionaryRouterRouteResponse,
9082            crate::WireRouterError,
9083        >;
9084    }
9085}
9086
9087/// A helper trait for the `DictionaryRouter` client sender.
9088pub trait DictionaryRouterClientSender {
9089    type Transport: ::fidl_next::Transport;
9090
9091    fn route<___R>(
9092        &self,
9093        request: &mut ___R,
9094    ) -> Result<
9095        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_router::Route>,
9096        ::fidl_next::EncodeError,
9097    >
9098    where
9099        ___R: ::fidl_next::Encode<
9100            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9101            Encoded = crate::WireRouteRequest,
9102        >;
9103}
9104
9105impl<___T> DictionaryRouterClientSender for ::fidl_next::ClientSender<___T, DictionaryRouter>
9106where
9107    ___T: ::fidl_next::Transport,
9108{
9109    type Transport = ___T;
9110
9111    fn route<___R>(
9112        &self,
9113        request: &mut ___R,
9114    ) -> Result<
9115        ::fidl_next::ResponseFuture<'_, Self::Transport, dictionary_router::Route>,
9116        ::fidl_next::EncodeError,
9117    >
9118    where
9119        ___R: ::fidl_next::Encode<
9120            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9121            Encoded = crate::WireRouteRequest,
9122        >,
9123    {
9124        self.as_untyped()
9125            .send_two_way(8164012099375978399, request)
9126            .map(::fidl_next::ResponseFuture::from_untyped)
9127    }
9128}
9129
9130/// A client handler for the DictionaryRouter protocol.
9131///
9132/// See [`DictionaryRouter`] for more details.
9133pub trait DictionaryRouterClientHandler<___T: ::fidl_next::Transport> {
9134    fn on_unknown_interaction(
9135        &mut self,
9136        sender: &::fidl_next::ClientSender<___T, DictionaryRouter>,
9137        ordinal: u64,
9138    ) {
9139        sender.close();
9140    }
9141}
9142
9143impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DictionaryRouter
9144where
9145    ___T: ::fidl_next::Transport,
9146    ___H: DictionaryRouterClientHandler<___T>,
9147
9148    <dictionary_router::Route as ::fidl_next::Method>::Response:
9149        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9150{
9151    fn on_event(
9152        handler: &mut ___H,
9153        sender: &::fidl_next::ClientSender<___T, Self>,
9154        ordinal: u64,
9155        buffer: ___T::RecvBuffer,
9156    ) {
9157        match ordinal {
9158            ordinal => handler.on_unknown_interaction(sender, ordinal),
9159        }
9160    }
9161}
9162
9163/// A helper trait for the `DictionaryRouter` server sender.
9164pub trait DictionaryRouterServerSender {
9165    type Transport: ::fidl_next::Transport;
9166}
9167
9168impl<___T> DictionaryRouterServerSender for ::fidl_next::ServerSender<___T, DictionaryRouter>
9169where
9170    ___T: ::fidl_next::Transport,
9171{
9172    type Transport = ___T;
9173}
9174
9175/// A server handler for the DictionaryRouter protocol.
9176///
9177/// See [`DictionaryRouter`] for more details.
9178pub trait DictionaryRouterServerHandler<___T: ::fidl_next::Transport> {
9179    fn route(
9180        &mut self,
9181        sender: &::fidl_next::ServerSender<___T, DictionaryRouter>,
9182
9183        request: ::fidl_next::RequestBuffer<___T, dictionary_router::Route>,
9184
9185        responder: ::fidl_next::Responder<dictionary_router::Route>,
9186    );
9187
9188    fn on_unknown_interaction(
9189        &mut self,
9190        sender: &::fidl_next::ServerSender<___T, DictionaryRouter>,
9191        ordinal: u64,
9192    ) {
9193        sender.close();
9194    }
9195}
9196
9197impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DictionaryRouter
9198where
9199    ___T: ::fidl_next::Transport,
9200    ___H: DictionaryRouterServerHandler<___T>,
9201
9202    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9203{
9204    fn on_one_way(
9205        handler: &mut ___H,
9206        sender: &::fidl_next::ServerSender<___T, Self>,
9207        ordinal: u64,
9208        buffer: ___T::RecvBuffer,
9209    ) {
9210        match ordinal {
9211            ordinal => handler.on_unknown_interaction(sender, ordinal),
9212        }
9213    }
9214
9215    fn on_two_way(
9216        handler: &mut ___H,
9217        sender: &::fidl_next::ServerSender<___T, Self>,
9218        ordinal: u64,
9219        buffer: ___T::RecvBuffer,
9220        responder: ::fidl_next::protocol::Responder,
9221    ) {
9222        match ordinal {
9223            8164012099375978399 => {
9224                let responder = ::fidl_next::Responder::from_untyped(responder);
9225
9226                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
9227                handler.route(sender, buffer, responder);
9228            }
9229
9230            ordinal => handler.on_unknown_interaction(sender, ordinal),
9231        }
9232    }
9233}
9234
9235#[derive(Debug)]
9236pub enum DirConnectorRouterRouteResponse {
9237    DirConnector(crate::DirConnector),
9238
9239    Unavailable(crate::Unit),
9240}
9241
9242impl ::fidl_next::Encodable for DirConnectorRouterRouteResponse {
9243    type Encoded = WireDirConnectorRouterRouteResponse;
9244}
9245
9246unsafe impl<___E> ::fidl_next::Encode<___E> for DirConnectorRouterRouteResponse
9247where
9248    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9249
9250    ___E: ::fidl_next::fuchsia::HandleEncoder,
9251{
9252    #[inline]
9253    fn encode(
9254        &mut self,
9255        encoder: &mut ___E,
9256        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9257    ) -> Result<(), ::fidl_next::EncodeError> {
9258        ::fidl_next::munge!(let WireDirConnectorRouterRouteResponse { raw } = out);
9259
9260        match self {
9261            Self::DirConnector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9262                ___E,
9263                crate::DirConnector,
9264            >(value, 1, encoder, raw)?,
9265
9266            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9267                ___E,
9268                crate::Unit,
9269            >(value, 2, encoder, raw)?,
9270        }
9271
9272        Ok(())
9273    }
9274}
9275
9276impl ::fidl_next::EncodableOption for Box<DirConnectorRouterRouteResponse> {
9277    type EncodedOption = WireOptionalDirConnectorRouterRouteResponse;
9278}
9279
9280unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirConnectorRouterRouteResponse>
9281where
9282    ___E: ?Sized,
9283    DirConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
9284{
9285    #[inline]
9286    fn encode_option(
9287        this: Option<&mut Self>,
9288        encoder: &mut ___E,
9289        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9290    ) -> Result<(), ::fidl_next::EncodeError> {
9291        ::fidl_next::munge!(let WireOptionalDirConnectorRouterRouteResponse { raw } = &mut *out);
9292
9293        if let Some(inner) = this {
9294            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9295            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
9296        } else {
9297            ::fidl_next::RawWireUnion::encode_absent(raw);
9298        }
9299
9300        Ok(())
9301    }
9302}
9303
9304impl ::fidl_next::TakeFrom<WireDirConnectorRouterRouteResponse>
9305    for DirConnectorRouterRouteResponse
9306{
9307    #[inline]
9308    fn take_from(from: &WireDirConnectorRouterRouteResponse) -> Self {
9309        match from.raw.ordinal() {
9310            1 => Self::DirConnector(::fidl_next::TakeFrom::take_from(unsafe {
9311                from.raw.get().deref_unchecked::<crate::WireDirConnector>()
9312            })),
9313
9314            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
9315                from.raw.get().deref_unchecked::<crate::WireUnit>()
9316            })),
9317
9318            _ => unsafe { ::core::hint::unreachable_unchecked() },
9319        }
9320    }
9321}
9322
9323impl ::fidl_next::TakeFrom<WireOptionalDirConnectorRouterRouteResponse>
9324    for Option<Box<DirConnectorRouterRouteResponse>>
9325{
9326    #[inline]
9327    fn take_from(from: &WireOptionalDirConnectorRouterRouteResponse) -> Self {
9328        if let Some(inner) = from.as_ref() {
9329            Some(::fidl_next::TakeFrom::take_from(inner))
9330        } else {
9331            None
9332        }
9333    }
9334}
9335
9336/// The wire type corresponding to [`DirConnectorRouterRouteResponse`].
9337#[repr(transparent)]
9338pub struct WireDirConnectorRouterRouteResponse {
9339    raw: ::fidl_next::RawWireUnion,
9340}
9341
9342unsafe impl ::fidl_next::ZeroPadding for WireDirConnectorRouterRouteResponse {
9343    #[inline]
9344    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9345        ::fidl_next::munge!(let Self { raw } = out);
9346        ::fidl_next::RawWireUnion::zero_padding(raw);
9347    }
9348}
9349
9350pub mod dir_connector_router_route_response {
9351    pub enum Ref<'union> {
9352        DirConnector(&'union crate::WireDirConnector),
9353
9354        Unavailable(&'union crate::WireUnit),
9355    }
9356}
9357
9358impl WireDirConnectorRouterRouteResponse {
9359    pub fn as_ref(&self) -> crate::dir_connector_router_route_response::Ref<'_> {
9360        match self.raw.ordinal() {
9361            1 => crate::dir_connector_router_route_response::Ref::DirConnector(unsafe {
9362                self.raw.get().deref_unchecked::<crate::WireDirConnector>()
9363            }),
9364
9365            2 => crate::dir_connector_router_route_response::Ref::Unavailable(unsafe {
9366                self.raw.get().deref_unchecked::<crate::WireUnit>()
9367            }),
9368
9369            _ => unsafe { ::core::hint::unreachable_unchecked() },
9370        }
9371    }
9372}
9373
9374unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirConnectorRouterRouteResponse
9375where
9376    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9377
9378    ___D: ::fidl_next::fuchsia::HandleDecoder,
9379{
9380    fn decode(
9381        mut slot: ::fidl_next::Slot<'_, Self>,
9382        decoder: &mut ___D,
9383    ) -> Result<(), ::fidl_next::DecodeError> {
9384        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9385        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9386            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
9387                raw, decoder,
9388            )?,
9389
9390            2 => {
9391                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9392            }
9393
9394            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9395        }
9396
9397        Ok(())
9398    }
9399}
9400
9401impl ::core::fmt::Debug for WireDirConnectorRouterRouteResponse {
9402    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9403        match self.raw.ordinal() {
9404            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirConnector>().fmt(f) },
9405            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9406            _ => unsafe { ::core::hint::unreachable_unchecked() },
9407        }
9408    }
9409}
9410
9411#[repr(transparent)]
9412pub struct WireOptionalDirConnectorRouterRouteResponse {
9413    raw: ::fidl_next::RawWireUnion,
9414}
9415
9416unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirConnectorRouterRouteResponse {
9417    #[inline]
9418    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9419        ::fidl_next::munge!(let Self { raw } = out);
9420        ::fidl_next::RawWireUnion::zero_padding(raw);
9421    }
9422}
9423
9424impl WireOptionalDirConnectorRouterRouteResponse {
9425    pub fn is_some(&self) -> bool {
9426        self.raw.is_some()
9427    }
9428
9429    pub fn is_none(&self) -> bool {
9430        self.raw.is_none()
9431    }
9432
9433    pub fn as_ref(&self) -> Option<&WireDirConnectorRouterRouteResponse> {
9434        if self.is_some() {
9435            Some(unsafe { &*(self as *const Self).cast() })
9436        } else {
9437            None
9438        }
9439    }
9440}
9441
9442unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirConnectorRouterRouteResponse
9443where
9444    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9445
9446    ___D: ::fidl_next::fuchsia::HandleDecoder,
9447{
9448    fn decode(
9449        mut slot: ::fidl_next::Slot<'_, Self>,
9450        decoder: &mut ___D,
9451    ) -> Result<(), ::fidl_next::DecodeError> {
9452        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9453        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9454            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
9455                raw, decoder,
9456            )?,
9457
9458            2 => {
9459                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9460            }
9461
9462            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9463            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9464        }
9465
9466        Ok(())
9467    }
9468}
9469
9470impl ::core::fmt::Debug for WireOptionalDirConnectorRouterRouteResponse {
9471    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9472        self.as_ref().fmt(f)
9473    }
9474}
9475
9476/// The type corresponding to the DirConnectorRouter protocol.
9477#[derive(Debug)]
9478pub struct DirConnectorRouter;
9479
9480impl ::fidl_next::Discoverable for DirConnectorRouter {
9481    const PROTOCOL_NAME: &'static str = "dir_connector_router";
9482}
9483
9484pub mod dir_connector_router {
9485    pub mod prelude {
9486        pub use crate::{
9487            dir_connector_router, DirConnectorRouter, DirConnectorRouterClientHandler,
9488            DirConnectorRouterClientSender, DirConnectorRouterServerHandler,
9489            DirConnectorRouterServerSender,
9490        };
9491
9492        pub use crate::DirConnectorRouterRouteResponse;
9493
9494        pub use crate::RouteRequest;
9495
9496        pub use crate::RouterError;
9497    }
9498
9499    pub struct Route;
9500
9501    impl ::fidl_next::Method for Route {
9502        const ORDINAL: u64 = 972231070188342848;
9503
9504        type Protocol = crate::DirConnectorRouter;
9505
9506        type Request = crate::WireRouteRequest;
9507
9508        type Response = ::fidl_next::WireFlexibleResult<
9509            crate::WireDirConnectorRouterRouteResponse,
9510            crate::WireRouterError,
9511        >;
9512    }
9513}
9514
9515/// A helper trait for the `DirConnectorRouter` client sender.
9516pub trait DirConnectorRouterClientSender {
9517    type Transport: ::fidl_next::Transport;
9518
9519    fn route<___R>(
9520        &self,
9521        request: &mut ___R,
9522    ) -> Result<
9523        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_connector_router::Route>,
9524        ::fidl_next::EncodeError,
9525    >
9526    where
9527        ___R: ::fidl_next::Encode<
9528            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9529            Encoded = crate::WireRouteRequest,
9530        >;
9531}
9532
9533impl<___T> DirConnectorRouterClientSender for ::fidl_next::ClientSender<___T, DirConnectorRouter>
9534where
9535    ___T: ::fidl_next::Transport,
9536{
9537    type Transport = ___T;
9538
9539    fn route<___R>(
9540        &self,
9541        request: &mut ___R,
9542    ) -> Result<
9543        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_connector_router::Route>,
9544        ::fidl_next::EncodeError,
9545    >
9546    where
9547        ___R: ::fidl_next::Encode<
9548            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9549            Encoded = crate::WireRouteRequest,
9550        >,
9551    {
9552        self.as_untyped()
9553            .send_two_way(972231070188342848, request)
9554            .map(::fidl_next::ResponseFuture::from_untyped)
9555    }
9556}
9557
9558/// A client handler for the DirConnectorRouter protocol.
9559///
9560/// See [`DirConnectorRouter`] for more details.
9561pub trait DirConnectorRouterClientHandler<___T: ::fidl_next::Transport> {
9562    fn on_unknown_interaction(
9563        &mut self,
9564        sender: &::fidl_next::ClientSender<___T, DirConnectorRouter>,
9565        ordinal: u64,
9566    ) {
9567        sender.close();
9568    }
9569}
9570
9571impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirConnectorRouter
9572where
9573    ___T: ::fidl_next::Transport,
9574    ___H: DirConnectorRouterClientHandler<___T>,
9575
9576    <dir_connector_router::Route as ::fidl_next::Method>::Response:
9577        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9578{
9579    fn on_event(
9580        handler: &mut ___H,
9581        sender: &::fidl_next::ClientSender<___T, Self>,
9582        ordinal: u64,
9583        buffer: ___T::RecvBuffer,
9584    ) {
9585        match ordinal {
9586            ordinal => handler.on_unknown_interaction(sender, ordinal),
9587        }
9588    }
9589}
9590
9591/// A helper trait for the `DirConnectorRouter` server sender.
9592pub trait DirConnectorRouterServerSender {
9593    type Transport: ::fidl_next::Transport;
9594}
9595
9596impl<___T> DirConnectorRouterServerSender for ::fidl_next::ServerSender<___T, DirConnectorRouter>
9597where
9598    ___T: ::fidl_next::Transport,
9599{
9600    type Transport = ___T;
9601}
9602
9603/// A server handler for the DirConnectorRouter protocol.
9604///
9605/// See [`DirConnectorRouter`] for more details.
9606pub trait DirConnectorRouterServerHandler<___T: ::fidl_next::Transport> {
9607    fn route(
9608        &mut self,
9609        sender: &::fidl_next::ServerSender<___T, DirConnectorRouter>,
9610
9611        request: ::fidl_next::RequestBuffer<___T, dir_connector_router::Route>,
9612
9613        responder: ::fidl_next::Responder<dir_connector_router::Route>,
9614    );
9615
9616    fn on_unknown_interaction(
9617        &mut self,
9618        sender: &::fidl_next::ServerSender<___T, DirConnectorRouter>,
9619        ordinal: u64,
9620    ) {
9621        sender.close();
9622    }
9623}
9624
9625impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirConnectorRouter
9626where
9627    ___T: ::fidl_next::Transport,
9628    ___H: DirConnectorRouterServerHandler<___T>,
9629
9630    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9631{
9632    fn on_one_way(
9633        handler: &mut ___H,
9634        sender: &::fidl_next::ServerSender<___T, Self>,
9635        ordinal: u64,
9636        buffer: ___T::RecvBuffer,
9637    ) {
9638        match ordinal {
9639            ordinal => handler.on_unknown_interaction(sender, ordinal),
9640        }
9641    }
9642
9643    fn on_two_way(
9644        handler: &mut ___H,
9645        sender: &::fidl_next::ServerSender<___T, Self>,
9646        ordinal: u64,
9647        buffer: ___T::RecvBuffer,
9648        responder: ::fidl_next::protocol::Responder,
9649    ) {
9650        match ordinal {
9651            972231070188342848 => {
9652                let responder = ::fidl_next::Responder::from_untyped(responder);
9653
9654                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
9655                handler.route(sender, buffer, responder);
9656            }
9657
9658            ordinal => handler.on_unknown_interaction(sender, ordinal),
9659        }
9660    }
9661}
9662
9663#[derive(Debug)]
9664pub enum DirEntryRouterRouteResponse {
9665    DirEntry(crate::DirEntry),
9666
9667    Unavailable(crate::Unit),
9668}
9669
9670impl ::fidl_next::Encodable for DirEntryRouterRouteResponse {
9671    type Encoded = WireDirEntryRouterRouteResponse;
9672}
9673
9674unsafe impl<___E> ::fidl_next::Encode<___E> for DirEntryRouterRouteResponse
9675where
9676    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9677
9678    ___E: ::fidl_next::fuchsia::HandleEncoder,
9679{
9680    #[inline]
9681    fn encode(
9682        &mut self,
9683        encoder: &mut ___E,
9684        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9685    ) -> Result<(), ::fidl_next::EncodeError> {
9686        ::fidl_next::munge!(let WireDirEntryRouterRouteResponse { raw } = out);
9687
9688        match self {
9689            Self::DirEntry(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9690                ___E,
9691                crate::DirEntry,
9692            >(value, 1, encoder, raw)?,
9693
9694            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
9695                ___E,
9696                crate::Unit,
9697            >(value, 2, encoder, raw)?,
9698        }
9699
9700        Ok(())
9701    }
9702}
9703
9704impl ::fidl_next::EncodableOption for Box<DirEntryRouterRouteResponse> {
9705    type EncodedOption = WireOptionalDirEntryRouterRouteResponse;
9706}
9707
9708unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirEntryRouterRouteResponse>
9709where
9710    ___E: ?Sized,
9711    DirEntryRouterRouteResponse: ::fidl_next::Encode<___E>,
9712{
9713    #[inline]
9714    fn encode_option(
9715        this: Option<&mut Self>,
9716        encoder: &mut ___E,
9717        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9718    ) -> Result<(), ::fidl_next::EncodeError> {
9719        ::fidl_next::munge!(let WireOptionalDirEntryRouterRouteResponse { raw } = &mut *out);
9720
9721        if let Some(inner) = this {
9722            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
9723            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
9724        } else {
9725            ::fidl_next::RawWireUnion::encode_absent(raw);
9726        }
9727
9728        Ok(())
9729    }
9730}
9731
9732impl ::fidl_next::TakeFrom<WireDirEntryRouterRouteResponse> for DirEntryRouterRouteResponse {
9733    #[inline]
9734    fn take_from(from: &WireDirEntryRouterRouteResponse) -> Self {
9735        match from.raw.ordinal() {
9736            1 => Self::DirEntry(::fidl_next::TakeFrom::take_from(unsafe {
9737                from.raw.get().deref_unchecked::<crate::WireDirEntry>()
9738            })),
9739
9740            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
9741                from.raw.get().deref_unchecked::<crate::WireUnit>()
9742            })),
9743
9744            _ => unsafe { ::core::hint::unreachable_unchecked() },
9745        }
9746    }
9747}
9748
9749impl ::fidl_next::TakeFrom<WireOptionalDirEntryRouterRouteResponse>
9750    for Option<Box<DirEntryRouterRouteResponse>>
9751{
9752    #[inline]
9753    fn take_from(from: &WireOptionalDirEntryRouterRouteResponse) -> Self {
9754        if let Some(inner) = from.as_ref() {
9755            Some(::fidl_next::TakeFrom::take_from(inner))
9756        } else {
9757            None
9758        }
9759    }
9760}
9761
9762/// The wire type corresponding to [`DirEntryRouterRouteResponse`].
9763#[repr(transparent)]
9764pub struct WireDirEntryRouterRouteResponse {
9765    raw: ::fidl_next::RawWireUnion,
9766}
9767
9768unsafe impl ::fidl_next::ZeroPadding for WireDirEntryRouterRouteResponse {
9769    #[inline]
9770    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9771        ::fidl_next::munge!(let Self { raw } = out);
9772        ::fidl_next::RawWireUnion::zero_padding(raw);
9773    }
9774}
9775
9776pub mod dir_entry_router_route_response {
9777    pub enum Ref<'union> {
9778        DirEntry(&'union crate::WireDirEntry),
9779
9780        Unavailable(&'union crate::WireUnit),
9781    }
9782}
9783
9784impl WireDirEntryRouterRouteResponse {
9785    pub fn as_ref(&self) -> crate::dir_entry_router_route_response::Ref<'_> {
9786        match self.raw.ordinal() {
9787            1 => crate::dir_entry_router_route_response::Ref::DirEntry(unsafe {
9788                self.raw.get().deref_unchecked::<crate::WireDirEntry>()
9789            }),
9790
9791            2 => crate::dir_entry_router_route_response::Ref::Unavailable(unsafe {
9792                self.raw.get().deref_unchecked::<crate::WireUnit>()
9793            }),
9794
9795            _ => unsafe { ::core::hint::unreachable_unchecked() },
9796        }
9797    }
9798}
9799
9800unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirEntryRouterRouteResponse
9801where
9802    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9803
9804    ___D: ::fidl_next::fuchsia::HandleDecoder,
9805{
9806    fn decode(
9807        mut slot: ::fidl_next::Slot<'_, Self>,
9808        decoder: &mut ___D,
9809    ) -> Result<(), ::fidl_next::DecodeError> {
9810        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9811        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9812            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
9813                raw, decoder,
9814            )?,
9815
9816            2 => {
9817                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9818            }
9819
9820            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9821        }
9822
9823        Ok(())
9824    }
9825}
9826
9827impl ::core::fmt::Debug for WireDirEntryRouterRouteResponse {
9828    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9829        match self.raw.ordinal() {
9830            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirEntry>().fmt(f) },
9831            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9832            _ => unsafe { ::core::hint::unreachable_unchecked() },
9833        }
9834    }
9835}
9836
9837#[repr(transparent)]
9838pub struct WireOptionalDirEntryRouterRouteResponse {
9839    raw: ::fidl_next::RawWireUnion,
9840}
9841
9842unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirEntryRouterRouteResponse {
9843    #[inline]
9844    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9845        ::fidl_next::munge!(let Self { raw } = out);
9846        ::fidl_next::RawWireUnion::zero_padding(raw);
9847    }
9848}
9849
9850impl WireOptionalDirEntryRouterRouteResponse {
9851    pub fn is_some(&self) -> bool {
9852        self.raw.is_some()
9853    }
9854
9855    pub fn is_none(&self) -> bool {
9856        self.raw.is_none()
9857    }
9858
9859    pub fn as_ref(&self) -> Option<&WireDirEntryRouterRouteResponse> {
9860        if self.is_some() {
9861            Some(unsafe { &*(self as *const Self).cast() })
9862        } else {
9863            None
9864        }
9865    }
9866}
9867
9868unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirEntryRouterRouteResponse
9869where
9870    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9871
9872    ___D: ::fidl_next::fuchsia::HandleDecoder,
9873{
9874    fn decode(
9875        mut slot: ::fidl_next::Slot<'_, Self>,
9876        decoder: &mut ___D,
9877    ) -> Result<(), ::fidl_next::DecodeError> {
9878        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
9879        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9880            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
9881                raw, decoder,
9882            )?,
9883
9884            2 => {
9885                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
9886            }
9887
9888            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9889            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
9890        }
9891
9892        Ok(())
9893    }
9894}
9895
9896impl ::core::fmt::Debug for WireOptionalDirEntryRouterRouteResponse {
9897    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9898        self.as_ref().fmt(f)
9899    }
9900}
9901
9902/// The type corresponding to the DirEntryRouter protocol.
9903#[derive(Debug)]
9904pub struct DirEntryRouter;
9905
9906impl ::fidl_next::Discoverable for DirEntryRouter {
9907    const PROTOCOL_NAME: &'static str = "dir_entry_router";
9908}
9909
9910pub mod dir_entry_router {
9911    pub mod prelude {
9912        pub use crate::{
9913            dir_entry_router, DirEntryRouter, DirEntryRouterClientHandler,
9914            DirEntryRouterClientSender, DirEntryRouterServerHandler, DirEntryRouterServerSender,
9915        };
9916
9917        pub use crate::DirEntryRouterRouteResponse;
9918
9919        pub use crate::RouteRequest;
9920
9921        pub use crate::RouterError;
9922    }
9923
9924    pub struct Route;
9925
9926    impl ::fidl_next::Method for Route {
9927        const ORDINAL: u64 = 1929392218567642066;
9928
9929        type Protocol = crate::DirEntryRouter;
9930
9931        type Request = crate::WireRouteRequest;
9932
9933        type Response = ::fidl_next::WireFlexibleResult<
9934            crate::WireDirEntryRouterRouteResponse,
9935            crate::WireRouterError,
9936        >;
9937    }
9938}
9939
9940/// A helper trait for the `DirEntryRouter` client sender.
9941pub trait DirEntryRouterClientSender {
9942    type Transport: ::fidl_next::Transport;
9943
9944    fn route<___R>(
9945        &self,
9946        request: &mut ___R,
9947    ) -> Result<
9948        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_entry_router::Route>,
9949        ::fidl_next::EncodeError,
9950    >
9951    where
9952        ___R: ::fidl_next::Encode<
9953            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9954            Encoded = crate::WireRouteRequest,
9955        >;
9956}
9957
9958impl<___T> DirEntryRouterClientSender for ::fidl_next::ClientSender<___T, DirEntryRouter>
9959where
9960    ___T: ::fidl_next::Transport,
9961{
9962    type Transport = ___T;
9963
9964    fn route<___R>(
9965        &self,
9966        request: &mut ___R,
9967    ) -> Result<
9968        ::fidl_next::ResponseFuture<'_, Self::Transport, dir_entry_router::Route>,
9969        ::fidl_next::EncodeError,
9970    >
9971    where
9972        ___R: ::fidl_next::Encode<
9973            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
9974            Encoded = crate::WireRouteRequest,
9975        >,
9976    {
9977        self.as_untyped()
9978            .send_two_way(1929392218567642066, request)
9979            .map(::fidl_next::ResponseFuture::from_untyped)
9980    }
9981}
9982
9983/// A client handler for the DirEntryRouter protocol.
9984///
9985/// See [`DirEntryRouter`] for more details.
9986pub trait DirEntryRouterClientHandler<___T: ::fidl_next::Transport> {
9987    fn on_unknown_interaction(
9988        &mut self,
9989        sender: &::fidl_next::ClientSender<___T, DirEntryRouter>,
9990        ordinal: u64,
9991    ) {
9992        sender.close();
9993    }
9994}
9995
9996impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirEntryRouter
9997where
9998    ___T: ::fidl_next::Transport,
9999    ___H: DirEntryRouterClientHandler<___T>,
10000
10001    <dir_entry_router::Route as ::fidl_next::Method>::Response:
10002        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10003{
10004    fn on_event(
10005        handler: &mut ___H,
10006        sender: &::fidl_next::ClientSender<___T, Self>,
10007        ordinal: u64,
10008        buffer: ___T::RecvBuffer,
10009    ) {
10010        match ordinal {
10011            ordinal => handler.on_unknown_interaction(sender, ordinal),
10012        }
10013    }
10014}
10015
10016/// A helper trait for the `DirEntryRouter` server sender.
10017pub trait DirEntryRouterServerSender {
10018    type Transport: ::fidl_next::Transport;
10019}
10020
10021impl<___T> DirEntryRouterServerSender for ::fidl_next::ServerSender<___T, DirEntryRouter>
10022where
10023    ___T: ::fidl_next::Transport,
10024{
10025    type Transport = ___T;
10026}
10027
10028/// A server handler for the DirEntryRouter protocol.
10029///
10030/// See [`DirEntryRouter`] for more details.
10031pub trait DirEntryRouterServerHandler<___T: ::fidl_next::Transport> {
10032    fn route(
10033        &mut self,
10034        sender: &::fidl_next::ServerSender<___T, DirEntryRouter>,
10035
10036        request: ::fidl_next::RequestBuffer<___T, dir_entry_router::Route>,
10037
10038        responder: ::fidl_next::Responder<dir_entry_router::Route>,
10039    );
10040
10041    fn on_unknown_interaction(
10042        &mut self,
10043        sender: &::fidl_next::ServerSender<___T, DirEntryRouter>,
10044        ordinal: u64,
10045    ) {
10046        sender.close();
10047    }
10048}
10049
10050impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirEntryRouter
10051where
10052    ___T: ::fidl_next::Transport,
10053    ___H: DirEntryRouterServerHandler<___T>,
10054
10055    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10056{
10057    fn on_one_way(
10058        handler: &mut ___H,
10059        sender: &::fidl_next::ServerSender<___T, Self>,
10060        ordinal: u64,
10061        buffer: ___T::RecvBuffer,
10062    ) {
10063        match ordinal {
10064            ordinal => handler.on_unknown_interaction(sender, ordinal),
10065        }
10066    }
10067
10068    fn on_two_way(
10069        handler: &mut ___H,
10070        sender: &::fidl_next::ServerSender<___T, Self>,
10071        ordinal: u64,
10072        buffer: ___T::RecvBuffer,
10073        responder: ::fidl_next::protocol::Responder,
10074    ) {
10075        match ordinal {
10076            1929392218567642066 => {
10077                let responder = ::fidl_next::Responder::from_untyped(responder);
10078
10079                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
10080                handler.route(sender, buffer, responder);
10081            }
10082
10083            ordinal => handler.on_unknown_interaction(sender, ordinal),
10084        }
10085    }
10086}
10087
10088#[derive(Debug)]
10089#[repr(C)]
10090pub struct DirReceiverReceiveRequest {
10091    pub channel: ::fidl_next::ServerEnd<
10092        ::fidl_next::fuchsia::zx::Channel,
10093        ::fidl_next_fuchsia_io::Directory,
10094    >,
10095}
10096
10097impl ::fidl_next::Encodable for DirReceiverReceiveRequest {
10098    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10099        ::fidl_next::CopyOptimization::enable_if(
10100            true && <::fidl_next::ServerEnd<
10101                ::fidl_next::fuchsia::zx::Channel,
10102                ::fidl_next_fuchsia_io::Directory,
10103            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10104                .is_enabled(),
10105        )
10106    };
10107
10108    type Encoded = WireDirReceiverReceiveRequest;
10109}
10110
10111unsafe impl<___E> ::fidl_next::Encode<___E> for DirReceiverReceiveRequest
10112where
10113    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10114
10115    ___E: ::fidl_next::fuchsia::HandleEncoder,
10116{
10117    #[inline]
10118    fn encode(
10119        &mut self,
10120        encoder: &mut ___E,
10121        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10122    ) -> Result<(), ::fidl_next::EncodeError> {
10123        ::fidl_next::munge! {
10124            let Self::Encoded {
10125                channel,
10126
10127            } = out;
10128        }
10129
10130        ::fidl_next::Encode::encode(&mut self.channel, encoder, channel)?;
10131
10132        Ok(())
10133    }
10134}
10135
10136impl ::fidl_next::EncodableOption for Box<DirReceiverReceiveRequest> {
10137    type EncodedOption = ::fidl_next::WireBox<WireDirReceiverReceiveRequest>;
10138}
10139
10140unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirReceiverReceiveRequest>
10141where
10142    ___E: ::fidl_next::Encoder + ?Sized,
10143    DirReceiverReceiveRequest: ::fidl_next::Encode<___E>,
10144{
10145    #[inline]
10146    fn encode_option(
10147        this: Option<&mut Self>,
10148        encoder: &mut ___E,
10149        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10150    ) -> Result<(), ::fidl_next::EncodeError> {
10151        if let Some(inner) = this {
10152            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10153            ::fidl_next::WireBox::encode_present(out);
10154        } else {
10155            ::fidl_next::WireBox::encode_absent(out);
10156        }
10157
10158        Ok(())
10159    }
10160}
10161
10162impl ::fidl_next::TakeFrom<WireDirReceiverReceiveRequest> for DirReceiverReceiveRequest {
10163    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10164        ::fidl_next::CopyOptimization::enable_if(
10165            true && <::fidl_next::ServerEnd<
10166                ::fidl_next::fuchsia::zx::Channel,
10167                ::fidl_next_fuchsia_io::Directory,
10168            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10169                .is_enabled(),
10170        )
10171    };
10172
10173    #[inline]
10174    fn take_from(from: &WireDirReceiverReceiveRequest) -> Self {
10175        Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
10176    }
10177}
10178
10179/// The wire type corresponding to [`DirReceiverReceiveRequest`].
10180#[derive(Debug)]
10181#[repr(C)]
10182pub struct WireDirReceiverReceiveRequest {
10183    pub channel: ::fidl_next::ServerEnd<
10184        ::fidl_next::fuchsia::WireChannel,
10185        ::fidl_next_fuchsia_io::Directory,
10186    >,
10187}
10188
10189unsafe impl ::fidl_next::ZeroPadding for WireDirReceiverReceiveRequest {
10190    #[inline]
10191    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10192}
10193
10194unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirReceiverReceiveRequest
10195where
10196    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10197
10198    ___D: ::fidl_next::fuchsia::HandleDecoder,
10199{
10200    fn decode(
10201        slot: ::fidl_next::Slot<'_, Self>,
10202        decoder: &mut ___D,
10203    ) -> Result<(), ::fidl_next::DecodeError> {
10204        ::fidl_next::munge! {
10205            let Self {
10206                mut channel,
10207
10208            } = slot;
10209        }
10210
10211        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
10212
10213        Ok(())
10214    }
10215}
10216
10217/// The type corresponding to the DirReceiver protocol.
10218#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
10219#[derive(Debug)]
10220pub struct DirReceiver;
10221
10222impl ::fidl_next::Discoverable for DirReceiver {
10223    const PROTOCOL_NAME: &'static str = "dir_receiver";
10224}
10225
10226pub mod dir_receiver {
10227    pub mod prelude {
10228        pub use crate::{
10229            dir_receiver, DirReceiver, DirReceiverClientHandler, DirReceiverClientSender,
10230            DirReceiverServerHandler, DirReceiverServerSender,
10231        };
10232
10233        pub use crate::DirReceiverReceiveRequest;
10234    }
10235
10236    pub struct Receive;
10237
10238    impl ::fidl_next::Method for Receive {
10239        const ORDINAL: u64 = 926684461087488948;
10240
10241        type Protocol = crate::DirReceiver;
10242
10243        type Request = crate::WireDirReceiverReceiveRequest;
10244
10245        type Response = ::fidl_next::Never;
10246    }
10247}
10248
10249/// A helper trait for the `DirReceiver` client sender.
10250pub trait DirReceiverClientSender {
10251    type Transport: ::fidl_next::Transport;
10252
10253    #[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"]
10254    fn receive<___R>(
10255        &self,
10256        request: &mut ___R,
10257    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
10258    where
10259        ___R: ::fidl_next::Encode<
10260            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10261            Encoded = crate::WireDirReceiverReceiveRequest,
10262        >;
10263}
10264
10265impl<___T> DirReceiverClientSender for ::fidl_next::ClientSender<___T, DirReceiver>
10266where
10267    ___T: ::fidl_next::Transport,
10268{
10269    type Transport = ___T;
10270
10271    #[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"]
10272    fn receive<___R>(
10273        &self,
10274        request: &mut ___R,
10275    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
10276    where
10277        ___R: ::fidl_next::Encode<
10278            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10279            Encoded = crate::WireDirReceiverReceiveRequest,
10280        >,
10281    {
10282        self.as_untyped().send_one_way(926684461087488948, request)
10283    }
10284}
10285
10286/// A client handler for the DirReceiver protocol.
10287///
10288/// See [`DirReceiver`] for more details.
10289pub trait DirReceiverClientHandler<___T: ::fidl_next::Transport> {
10290    fn on_unknown_interaction(
10291        &mut self,
10292        sender: &::fidl_next::ClientSender<___T, DirReceiver>,
10293        ordinal: u64,
10294    ) {
10295        sender.close();
10296    }
10297}
10298
10299impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirReceiver
10300where
10301    ___T: ::fidl_next::Transport,
10302    ___H: DirReceiverClientHandler<___T>,
10303{
10304    fn on_event(
10305        handler: &mut ___H,
10306        sender: &::fidl_next::ClientSender<___T, Self>,
10307        ordinal: u64,
10308        buffer: ___T::RecvBuffer,
10309    ) {
10310        match ordinal {
10311            ordinal => handler.on_unknown_interaction(sender, ordinal),
10312        }
10313    }
10314}
10315
10316/// A helper trait for the `DirReceiver` server sender.
10317pub trait DirReceiverServerSender {
10318    type Transport: ::fidl_next::Transport;
10319}
10320
10321impl<___T> DirReceiverServerSender for ::fidl_next::ServerSender<___T, DirReceiver>
10322where
10323    ___T: ::fidl_next::Transport,
10324{
10325    type Transport = ___T;
10326}
10327
10328/// A server handler for the DirReceiver protocol.
10329///
10330/// See [`DirReceiver`] for more details.
10331pub trait DirReceiverServerHandler<___T: ::fidl_next::Transport> {
10332    #[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"]
10333    fn receive(
10334        &mut self,
10335        sender: &::fidl_next::ServerSender<___T, DirReceiver>,
10336
10337        request: ::fidl_next::RequestBuffer<___T, dir_receiver::Receive>,
10338    );
10339
10340    fn on_unknown_interaction(
10341        &mut self,
10342        sender: &::fidl_next::ServerSender<___T, DirReceiver>,
10343        ordinal: u64,
10344    ) {
10345        sender.close();
10346    }
10347}
10348
10349impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirReceiver
10350where
10351    ___T: ::fidl_next::Transport,
10352    ___H: DirReceiverServerHandler<___T>,
10353
10354    crate::WireDirReceiverReceiveRequest:
10355        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10356{
10357    fn on_one_way(
10358        handler: &mut ___H,
10359        sender: &::fidl_next::ServerSender<___T, Self>,
10360        ordinal: u64,
10361        buffer: ___T::RecvBuffer,
10362    ) {
10363        match ordinal {
10364            926684461087488948 => {
10365                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
10366                handler.receive(sender, buffer);
10367            }
10368
10369            ordinal => handler.on_unknown_interaction(sender, ordinal),
10370        }
10371    }
10372
10373    fn on_two_way(
10374        handler: &mut ___H,
10375        sender: &::fidl_next::ServerSender<___T, Self>,
10376        ordinal: u64,
10377        buffer: ___T::RecvBuffer,
10378        responder: ::fidl_next::protocol::Responder,
10379    ) {
10380        match ordinal {
10381            ordinal => handler.on_unknown_interaction(sender, ordinal),
10382        }
10383    }
10384}
10385
10386#[derive(Debug)]
10387pub enum DirectoryRouterRouteResponse {
10388    Directory(
10389        ::fidl_next::ClientEnd<
10390            ::fidl_next::fuchsia::zx::Channel,
10391            ::fidl_next_fuchsia_io::Directory,
10392        >,
10393    ),
10394
10395    Unavailable(crate::Unit),
10396}
10397
10398impl ::fidl_next::Encodable for DirectoryRouterRouteResponse {
10399    type Encoded = WireDirectoryRouterRouteResponse;
10400}
10401
10402unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryRouterRouteResponse
10403where
10404    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10405
10406    ___E: ::fidl_next::fuchsia::HandleEncoder,
10407{
10408    #[inline]
10409    fn encode(
10410        &mut self,
10411        encoder: &mut ___E,
10412        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10413    ) -> Result<(), ::fidl_next::EncodeError> {
10414        ::fidl_next::munge!(let WireDirectoryRouterRouteResponse { raw } = out);
10415
10416        match self {
10417            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as_static::<
10418                ___E,
10419                ::fidl_next::ClientEnd<
10420                    ::fidl_next::fuchsia::zx::Channel,
10421                    ::fidl_next_fuchsia_io::Directory,
10422                >,
10423            >(value, 1, encoder, raw)?,
10424
10425            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
10426                ___E,
10427                crate::Unit,
10428            >(value, 2, encoder, raw)?,
10429        }
10430
10431        Ok(())
10432    }
10433}
10434
10435impl ::fidl_next::EncodableOption for Box<DirectoryRouterRouteResponse> {
10436    type EncodedOption = WireOptionalDirectoryRouterRouteResponse;
10437}
10438
10439unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<DirectoryRouterRouteResponse>
10440where
10441    ___E: ?Sized,
10442    DirectoryRouterRouteResponse: ::fidl_next::Encode<___E>,
10443{
10444    #[inline]
10445    fn encode_option(
10446        this: Option<&mut Self>,
10447        encoder: &mut ___E,
10448        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10449    ) -> Result<(), ::fidl_next::EncodeError> {
10450        ::fidl_next::munge!(let WireOptionalDirectoryRouterRouteResponse { raw } = &mut *out);
10451
10452        if let Some(inner) = this {
10453            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
10454            ::fidl_next::Encode::encode(&mut **inner, encoder, value_out)?;
10455        } else {
10456            ::fidl_next::RawWireUnion::encode_absent(raw);
10457        }
10458
10459        Ok(())
10460    }
10461}
10462
10463impl ::fidl_next::TakeFrom<WireDirectoryRouterRouteResponse> for DirectoryRouterRouteResponse {
10464    #[inline]
10465    fn take_from(from: &WireDirectoryRouterRouteResponse) -> Self {
10466        match from.raw.ordinal() {
10467            1 => Self::Directory(::fidl_next::TakeFrom::take_from(unsafe {
10468                from.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
10469                    ::fidl_next::fuchsia::WireChannel,
10470                    ::fidl_next_fuchsia_io::Directory,
10471                >>()
10472            })),
10473
10474            2 => Self::Unavailable(::fidl_next::TakeFrom::take_from(unsafe {
10475                from.raw.get().deref_unchecked::<crate::WireUnit>()
10476            })),
10477
10478            _ => unsafe { ::core::hint::unreachable_unchecked() },
10479        }
10480    }
10481}
10482
10483impl ::fidl_next::TakeFrom<WireOptionalDirectoryRouterRouteResponse>
10484    for Option<Box<DirectoryRouterRouteResponse>>
10485{
10486    #[inline]
10487    fn take_from(from: &WireOptionalDirectoryRouterRouteResponse) -> Self {
10488        if let Some(inner) = from.as_ref() {
10489            Some(::fidl_next::TakeFrom::take_from(inner))
10490        } else {
10491            None
10492        }
10493    }
10494}
10495
10496/// The wire type corresponding to [`DirectoryRouterRouteResponse`].
10497#[repr(transparent)]
10498pub struct WireDirectoryRouterRouteResponse {
10499    raw: ::fidl_next::RawWireUnion,
10500}
10501
10502unsafe impl ::fidl_next::ZeroPadding for WireDirectoryRouterRouteResponse {
10503    #[inline]
10504    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10505        ::fidl_next::munge!(let Self { raw } = out);
10506        ::fidl_next::RawWireUnion::zero_padding(raw);
10507    }
10508}
10509
10510pub mod directory_router_route_response {
10511    pub enum Ref<'union> {
10512        Directory(
10513            &'union ::fidl_next::ClientEnd<
10514                ::fidl_next::fuchsia::WireChannel,
10515                ::fidl_next_fuchsia_io::Directory,
10516            >,
10517        ),
10518
10519        Unavailable(&'union crate::WireUnit),
10520    }
10521}
10522
10523impl WireDirectoryRouterRouteResponse {
10524    pub fn as_ref(&self) -> crate::directory_router_route_response::Ref<'_> {
10525        match self.raw.ordinal() {
10526            1 => crate::directory_router_route_response::Ref::Directory(unsafe {
10527                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
10528                    ::fidl_next::fuchsia::WireChannel,
10529                    ::fidl_next_fuchsia_io::Directory,
10530                >>()
10531            }),
10532
10533            2 => crate::directory_router_route_response::Ref::Unavailable(unsafe {
10534                self.raw.get().deref_unchecked::<crate::WireUnit>()
10535            }),
10536
10537            _ => unsafe { ::core::hint::unreachable_unchecked() },
10538        }
10539    }
10540}
10541
10542unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryRouterRouteResponse
10543where
10544    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10545
10546    ___D: ::fidl_next::fuchsia::HandleDecoder,
10547{
10548    fn decode(
10549        mut slot: ::fidl_next::Slot<'_, Self>,
10550        decoder: &mut ___D,
10551    ) -> Result<(), ::fidl_next::DecodeError> {
10552        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
10553        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
10554            1 => ::fidl_next::RawWireUnion::decode_as_static::<
10555                ___D,
10556                ::fidl_next::ClientEnd<
10557                    ::fidl_next::fuchsia::WireChannel,
10558                    ::fidl_next_fuchsia_io::Directory,
10559                >,
10560            >(raw, decoder)?,
10561
10562            2 => {
10563                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
10564            }
10565
10566            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
10567        }
10568
10569        Ok(())
10570    }
10571}
10572
10573impl ::core::fmt::Debug for WireDirectoryRouterRouteResponse {
10574    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10575        match self.raw.ordinal() {
10576            1 => unsafe {
10577                self.raw
10578                    .get()
10579                    .deref_unchecked::<::fidl_next::ClientEnd<
10580                        ::fidl_next::fuchsia::WireChannel,
10581                        ::fidl_next_fuchsia_io::Directory,
10582                    >>()
10583                    .fmt(f)
10584            },
10585            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
10586            _ => unsafe { ::core::hint::unreachable_unchecked() },
10587        }
10588    }
10589}
10590
10591#[repr(transparent)]
10592pub struct WireOptionalDirectoryRouterRouteResponse {
10593    raw: ::fidl_next::RawWireUnion,
10594}
10595
10596unsafe impl ::fidl_next::ZeroPadding for WireOptionalDirectoryRouterRouteResponse {
10597    #[inline]
10598    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10599        ::fidl_next::munge!(let Self { raw } = out);
10600        ::fidl_next::RawWireUnion::zero_padding(raw);
10601    }
10602}
10603
10604impl WireOptionalDirectoryRouterRouteResponse {
10605    pub fn is_some(&self) -> bool {
10606        self.raw.is_some()
10607    }
10608
10609    pub fn is_none(&self) -> bool {
10610        self.raw.is_none()
10611    }
10612
10613    pub fn as_ref(&self) -> Option<&WireDirectoryRouterRouteResponse> {
10614        if self.is_some() {
10615            Some(unsafe { &*(self as *const Self).cast() })
10616        } else {
10617            None
10618        }
10619    }
10620}
10621
10622unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirectoryRouterRouteResponse
10623where
10624    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10625
10626    ___D: ::fidl_next::fuchsia::HandleDecoder,
10627{
10628    fn decode(
10629        mut slot: ::fidl_next::Slot<'_, Self>,
10630        decoder: &mut ___D,
10631    ) -> Result<(), ::fidl_next::DecodeError> {
10632        ::fidl_next::munge!(let Self { mut raw } = slot.as_mut());
10633        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
10634            1 => ::fidl_next::RawWireUnion::decode_as_static::<
10635                ___D,
10636                ::fidl_next::ClientEnd<
10637                    ::fidl_next::fuchsia::WireChannel,
10638                    ::fidl_next_fuchsia_io::Directory,
10639                >,
10640            >(raw, decoder)?,
10641
10642            2 => {
10643                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
10644            }
10645
10646            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
10647            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
10648        }
10649
10650        Ok(())
10651    }
10652}
10653
10654impl ::core::fmt::Debug for WireOptionalDirectoryRouterRouteResponse {
10655    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
10656        self.as_ref().fmt(f)
10657    }
10658}
10659
10660/// The type corresponding to the DirectoryRouter protocol.
10661#[derive(Debug)]
10662pub struct DirectoryRouter;
10663
10664impl ::fidl_next::Discoverable for DirectoryRouter {
10665    const PROTOCOL_NAME: &'static str = "directory_router";
10666}
10667
10668pub mod directory_router {
10669    pub mod prelude {
10670        pub use crate::{
10671            directory_router, DirectoryRouter, DirectoryRouterClientHandler,
10672            DirectoryRouterClientSender, DirectoryRouterServerHandler, DirectoryRouterServerSender,
10673        };
10674
10675        pub use crate::DirectoryRouterRouteResponse;
10676
10677        pub use crate::RouteRequest;
10678
10679        pub use crate::RouterError;
10680    }
10681
10682    pub struct Route;
10683
10684    impl ::fidl_next::Method for Route {
10685        const ORDINAL: u64 = 7510716014181158689;
10686
10687        type Protocol = crate::DirectoryRouter;
10688
10689        type Request = crate::WireRouteRequest;
10690
10691        type Response = ::fidl_next::WireFlexibleResult<
10692            crate::WireDirectoryRouterRouteResponse,
10693            crate::WireRouterError,
10694        >;
10695    }
10696}
10697
10698/// A helper trait for the `DirectoryRouter` client sender.
10699pub trait DirectoryRouterClientSender {
10700    type Transport: ::fidl_next::Transport;
10701
10702    fn route<___R>(
10703        &self,
10704        request: &mut ___R,
10705    ) -> Result<
10706        ::fidl_next::ResponseFuture<'_, Self::Transport, directory_router::Route>,
10707        ::fidl_next::EncodeError,
10708    >
10709    where
10710        ___R: ::fidl_next::Encode<
10711            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10712            Encoded = crate::WireRouteRequest,
10713        >;
10714}
10715
10716impl<___T> DirectoryRouterClientSender for ::fidl_next::ClientSender<___T, DirectoryRouter>
10717where
10718    ___T: ::fidl_next::Transport,
10719{
10720    type Transport = ___T;
10721
10722    fn route<___R>(
10723        &self,
10724        request: &mut ___R,
10725    ) -> Result<
10726        ::fidl_next::ResponseFuture<'_, Self::Transport, directory_router::Route>,
10727        ::fidl_next::EncodeError,
10728    >
10729    where
10730        ___R: ::fidl_next::Encode<
10731            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
10732            Encoded = crate::WireRouteRequest,
10733        >,
10734    {
10735        self.as_untyped()
10736            .send_two_way(7510716014181158689, request)
10737            .map(::fidl_next::ResponseFuture::from_untyped)
10738    }
10739}
10740
10741/// A client handler for the DirectoryRouter protocol.
10742///
10743/// See [`DirectoryRouter`] for more details.
10744pub trait DirectoryRouterClientHandler<___T: ::fidl_next::Transport> {
10745    fn on_unknown_interaction(
10746        &mut self,
10747        sender: &::fidl_next::ClientSender<___T, DirectoryRouter>,
10748        ordinal: u64,
10749    ) {
10750        sender.close();
10751    }
10752}
10753
10754impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for DirectoryRouter
10755where
10756    ___T: ::fidl_next::Transport,
10757    ___H: DirectoryRouterClientHandler<___T>,
10758
10759    <directory_router::Route as ::fidl_next::Method>::Response:
10760        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10761{
10762    fn on_event(
10763        handler: &mut ___H,
10764        sender: &::fidl_next::ClientSender<___T, Self>,
10765        ordinal: u64,
10766        buffer: ___T::RecvBuffer,
10767    ) {
10768        match ordinal {
10769            ordinal => handler.on_unknown_interaction(sender, ordinal),
10770        }
10771    }
10772}
10773
10774/// A helper trait for the `DirectoryRouter` server sender.
10775pub trait DirectoryRouterServerSender {
10776    type Transport: ::fidl_next::Transport;
10777}
10778
10779impl<___T> DirectoryRouterServerSender for ::fidl_next::ServerSender<___T, DirectoryRouter>
10780where
10781    ___T: ::fidl_next::Transport,
10782{
10783    type Transport = ___T;
10784}
10785
10786/// A server handler for the DirectoryRouter protocol.
10787///
10788/// See [`DirectoryRouter`] for more details.
10789pub trait DirectoryRouterServerHandler<___T: ::fidl_next::Transport> {
10790    fn route(
10791        &mut self,
10792        sender: &::fidl_next::ServerSender<___T, DirectoryRouter>,
10793
10794        request: ::fidl_next::RequestBuffer<___T, directory_router::Route>,
10795
10796        responder: ::fidl_next::Responder<directory_router::Route>,
10797    );
10798
10799    fn on_unknown_interaction(
10800        &mut self,
10801        sender: &::fidl_next::ServerSender<___T, DirectoryRouter>,
10802        ordinal: u64,
10803    ) {
10804        sender.close();
10805    }
10806}
10807
10808impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for DirectoryRouter
10809where
10810    ___T: ::fidl_next::Transport,
10811    ___H: DirectoryRouterServerHandler<___T>,
10812
10813    crate::WireRouteRequest: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10814{
10815    fn on_one_way(
10816        handler: &mut ___H,
10817        sender: &::fidl_next::ServerSender<___T, Self>,
10818        ordinal: u64,
10819        buffer: ___T::RecvBuffer,
10820    ) {
10821        match ordinal {
10822            ordinal => handler.on_unknown_interaction(sender, ordinal),
10823        }
10824    }
10825
10826    fn on_two_way(
10827        handler: &mut ___H,
10828        sender: &::fidl_next::ServerSender<___T, Self>,
10829        ordinal: u64,
10830        buffer: ___T::RecvBuffer,
10831        responder: ::fidl_next::protocol::Responder,
10832    ) {
10833        match ordinal {
10834            7510716014181158689 => {
10835                let responder = ::fidl_next::Responder::from_untyped(responder);
10836
10837                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
10838                handler.route(sender, buffer, responder);
10839            }
10840
10841            ordinal => handler.on_unknown_interaction(sender, ordinal),
10842        }
10843    }
10844}
10845
10846#[doc = " Contains a protocol open request.\n"]
10847#[derive(Debug)]
10848#[repr(C)]
10849pub struct ProtocolPayload {
10850    pub channel: ::fidl_next::fuchsia::zx::Handle,
10851}
10852
10853impl ::fidl_next::Encodable for ProtocolPayload {
10854    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10855        ::fidl_next::CopyOptimization::enable_if(
10856            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10857                .is_enabled(),
10858        )
10859    };
10860
10861    type Encoded = WireProtocolPayload;
10862}
10863
10864unsafe impl<___E> ::fidl_next::Encode<___E> for ProtocolPayload
10865where
10866    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10867
10868    ___E: ::fidl_next::fuchsia::HandleEncoder,
10869{
10870    #[inline]
10871    fn encode(
10872        &mut self,
10873        encoder: &mut ___E,
10874        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10875    ) -> Result<(), ::fidl_next::EncodeError> {
10876        ::fidl_next::munge! {
10877            let Self::Encoded {
10878                channel,
10879
10880            } = out;
10881        }
10882
10883        ::fidl_next::Encode::encode(&mut self.channel, encoder, channel)?;
10884
10885        Ok(())
10886    }
10887}
10888
10889impl ::fidl_next::EncodableOption for Box<ProtocolPayload> {
10890    type EncodedOption = ::fidl_next::WireBox<WireProtocolPayload>;
10891}
10892
10893unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<ProtocolPayload>
10894where
10895    ___E: ::fidl_next::Encoder + ?Sized,
10896    ProtocolPayload: ::fidl_next::Encode<___E>,
10897{
10898    #[inline]
10899    fn encode_option(
10900        this: Option<&mut Self>,
10901        encoder: &mut ___E,
10902        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10903    ) -> Result<(), ::fidl_next::EncodeError> {
10904        if let Some(inner) = this {
10905            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10906            ::fidl_next::WireBox::encode_present(out);
10907        } else {
10908            ::fidl_next::WireBox::encode_absent(out);
10909        }
10910
10911        Ok(())
10912    }
10913}
10914
10915impl ::fidl_next::TakeFrom<WireProtocolPayload> for ProtocolPayload {
10916    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> = unsafe {
10917        ::fidl_next::CopyOptimization::enable_if(
10918            true && <::fidl_next::fuchsia::zx::Handle as ::fidl_next::Encodable>::COPY_OPTIMIZATION
10919                .is_enabled(),
10920        )
10921    };
10922
10923    #[inline]
10924    fn take_from(from: &WireProtocolPayload) -> Self {
10925        Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
10926    }
10927}
10928
10929/// The wire type corresponding to [`ProtocolPayload`].
10930#[derive(Debug)]
10931#[repr(C)]
10932pub struct WireProtocolPayload {
10933    pub channel: ::fidl_next::fuchsia::WireHandle,
10934}
10935
10936unsafe impl ::fidl_next::ZeroPadding for WireProtocolPayload {
10937    #[inline]
10938    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10939}
10940
10941unsafe impl<___D> ::fidl_next::Decode<___D> for WireProtocolPayload
10942where
10943    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10944
10945    ___D: ::fidl_next::fuchsia::HandleDecoder,
10946{
10947    fn decode(
10948        slot: ::fidl_next::Slot<'_, Self>,
10949        decoder: &mut ___D,
10950    ) -> Result<(), ::fidl_next::DecodeError> {
10951        ::fidl_next::munge! {
10952            let Self {
10953                mut channel,
10954
10955            } = slot;
10956        }
10957
10958        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
10959
10960        Ok(())
10961    }
10962}
10963
10964/// The type corresponding to the Receiver protocol.
10965#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
10966#[derive(Debug)]
10967pub struct Receiver;
10968
10969impl ::fidl_next::Discoverable for Receiver {
10970    const PROTOCOL_NAME: &'static str = "receiver";
10971}
10972
10973pub mod receiver {
10974    pub mod prelude {
10975        pub use crate::{
10976            receiver, Receiver, ReceiverClientHandler, ReceiverClientSender, ReceiverServerHandler,
10977            ReceiverServerSender,
10978        };
10979
10980        pub use crate::ProtocolPayload;
10981    }
10982
10983    pub struct Receive;
10984
10985    impl ::fidl_next::Method for Receive {
10986        const ORDINAL: u64 = 340832707723008660;
10987
10988        type Protocol = crate::Receiver;
10989
10990        type Request = crate::WireProtocolPayload;
10991
10992        type Response = ::fidl_next::Never;
10993    }
10994}
10995
10996/// A helper trait for the `Receiver` client sender.
10997pub trait ReceiverClientSender {
10998    type Transport: ::fidl_next::Transport;
10999
11000    #[doc = " Sends a channel to this receiver.\n"]
11001    fn receive<___R>(
11002        &self,
11003        request: &mut ___R,
11004    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
11005    where
11006        ___R: ::fidl_next::Encode<
11007            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
11008            Encoded = crate::WireProtocolPayload,
11009        >;
11010}
11011
11012impl<___T> ReceiverClientSender for ::fidl_next::ClientSender<___T, Receiver>
11013where
11014    ___T: ::fidl_next::Transport,
11015{
11016    type Transport = ___T;
11017
11018    #[doc = " Sends a channel to this receiver.\n"]
11019    fn receive<___R>(
11020        &self,
11021        request: &mut ___R,
11022    ) -> Result<::fidl_next::SendFuture<'_, Self::Transport>, ::fidl_next::EncodeError>
11023    where
11024        ___R: ::fidl_next::Encode<
11025            <Self::Transport as ::fidl_next::Transport>::SendBuffer,
11026            Encoded = crate::WireProtocolPayload,
11027        >,
11028    {
11029        self.as_untyped().send_one_way(340832707723008660, request)
11030    }
11031}
11032
11033/// A client handler for the Receiver protocol.
11034///
11035/// See [`Receiver`] for more details.
11036pub trait ReceiverClientHandler<___T: ::fidl_next::Transport> {
11037    fn on_unknown_interaction(
11038        &mut self,
11039        sender: &::fidl_next::ClientSender<___T, Receiver>,
11040        ordinal: u64,
11041    ) {
11042        sender.close();
11043    }
11044}
11045
11046impl<___T, ___H> ::fidl_next::ClientProtocol<___T, ___H> for Receiver
11047where
11048    ___T: ::fidl_next::Transport,
11049    ___H: ReceiverClientHandler<___T>,
11050{
11051    fn on_event(
11052        handler: &mut ___H,
11053        sender: &::fidl_next::ClientSender<___T, Self>,
11054        ordinal: u64,
11055        buffer: ___T::RecvBuffer,
11056    ) {
11057        match ordinal {
11058            ordinal => handler.on_unknown_interaction(sender, ordinal),
11059        }
11060    }
11061}
11062
11063/// A helper trait for the `Receiver` server sender.
11064pub trait ReceiverServerSender {
11065    type Transport: ::fidl_next::Transport;
11066}
11067
11068impl<___T> ReceiverServerSender for ::fidl_next::ServerSender<___T, Receiver>
11069where
11070    ___T: ::fidl_next::Transport,
11071{
11072    type Transport = ___T;
11073}
11074
11075/// A server handler for the Receiver protocol.
11076///
11077/// See [`Receiver`] for more details.
11078pub trait ReceiverServerHandler<___T: ::fidl_next::Transport> {
11079    #[doc = " Sends a channel to this receiver.\n"]
11080    fn receive(
11081        &mut self,
11082        sender: &::fidl_next::ServerSender<___T, Receiver>,
11083
11084        request: ::fidl_next::RequestBuffer<___T, receiver::Receive>,
11085    );
11086
11087    fn on_unknown_interaction(
11088        &mut self,
11089        sender: &::fidl_next::ServerSender<___T, Receiver>,
11090        ordinal: u64,
11091    ) {
11092        sender.close();
11093    }
11094}
11095
11096impl<___T, ___H> ::fidl_next::ServerProtocol<___T, ___H> for Receiver
11097where
11098    ___T: ::fidl_next::Transport,
11099    ___H: ReceiverServerHandler<___T>,
11100
11101    crate::WireProtocolPayload: ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11102{
11103    fn on_one_way(
11104        handler: &mut ___H,
11105        sender: &::fidl_next::ServerSender<___T, Self>,
11106        ordinal: u64,
11107        buffer: ___T::RecvBuffer,
11108    ) {
11109        match ordinal {
11110            340832707723008660 => {
11111                let buffer = ::fidl_next::RequestBuffer::from_untyped(buffer);
11112                handler.receive(sender, buffer);
11113            }
11114
11115            ordinal => handler.on_unknown_interaction(sender, ordinal),
11116        }
11117    }
11118
11119    fn on_two_way(
11120        handler: &mut ___H,
11121        sender: &::fidl_next::ServerSender<___T, Self>,
11122        ordinal: u64,
11123        buffer: ___T::RecvBuffer,
11124        responder: ::fidl_next::protocol::Responder,
11125    ) {
11126        match ordinal {
11127            ordinal => handler.on_unknown_interaction(sender, ordinal),
11128        }
11129    }
11130}
11131
11132#[derive(Clone, Debug)]
11133#[repr(C)]
11134pub struct Unavailable {}
11135
11136impl ::fidl_next::Encodable for Unavailable {
11137    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
11138        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11139
11140    type Encoded = WireUnavailable;
11141}
11142
11143unsafe impl<___E> ::fidl_next::Encode<___E> for Unavailable
11144where
11145    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11146{
11147    #[inline]
11148    fn encode(
11149        &mut self,
11150        encoder: &mut ___E,
11151        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11152    ) -> Result<(), ::fidl_next::EncodeError> {
11153        ::fidl_next::munge! {
11154            let Self::Encoded {
11155
11156            } = out;
11157        }
11158
11159        Ok(())
11160    }
11161}
11162
11163impl ::fidl_next::EncodableOption for Box<Unavailable> {
11164    type EncodedOption = ::fidl_next::WireBox<WireUnavailable>;
11165}
11166
11167unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Box<Unavailable>
11168where
11169    ___E: ::fidl_next::Encoder + ?Sized,
11170    Unavailable: ::fidl_next::Encode<___E>,
11171{
11172    #[inline]
11173    fn encode_option(
11174        this: Option<&mut Self>,
11175        encoder: &mut ___E,
11176        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11177    ) -> Result<(), ::fidl_next::EncodeError> {
11178        if let Some(inner) = this {
11179            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
11180            ::fidl_next::WireBox::encode_present(out);
11181        } else {
11182            ::fidl_next::WireBox::encode_absent(out);
11183        }
11184
11185        Ok(())
11186    }
11187}
11188
11189impl ::fidl_next::TakeFrom<WireUnavailable> for Unavailable {
11190    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self> =
11191        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
11192
11193    #[inline]
11194    fn take_from(from: &WireUnavailable) -> Self {
11195        Self {}
11196    }
11197}
11198
11199/// The wire type corresponding to [`Unavailable`].
11200#[derive(Clone, Debug)]
11201#[repr(C)]
11202pub struct WireUnavailable {}
11203
11204unsafe impl ::fidl_next::ZeroPadding for WireUnavailable {
11205    #[inline]
11206    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
11207}
11208
11209unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnavailable
11210where
11211    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11212{
11213    fn decode(
11214        slot: ::fidl_next::Slot<'_, Self>,
11215        decoder: &mut ___D,
11216    ) -> Result<(), ::fidl_next::DecodeError> {
11217        ::fidl_next::munge! {
11218            let Self {
11219
11220            } = slot;
11221        }
11222
11223        Ok(())
11224    }
11225}
11226
11227/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
11228pub mod compat {
11229
11230    impl ::fidl_next::TakeFrom<crate::WireAvailability>
11231        for ::fidl_fuchsia_component_sandbox::Availability
11232    {
11233        #[inline]
11234        fn take_from(from: &crate::WireAvailability) -> Self {
11235            match crate::Availability::from(*from) {
11236                crate::Availability::Required => Self::Required,
11237
11238                crate::Availability::Optional => Self::Optional,
11239
11240                crate::Availability::SameAsTarget => Self::SameAsTarget,
11241
11242                crate::Availability::Transitional => Self::Transitional,
11243            }
11244        }
11245    }
11246
11247    impl ::fidl_next::TakeFrom<crate::WireUnit> for ::fidl_fuchsia_component_sandbox::Unit {
11248        #[inline]
11249        fn take_from(from: &crate::WireUnit) -> Self {
11250            Self {}
11251        }
11252    }
11253
11254    impl ::fidl_next::TakeFrom<crate::WireData> for ::fidl_fuchsia_component_sandbox::Data {
11255        #[inline]
11256        fn take_from(from: &crate::WireData) -> Self {
11257            match from.as_ref() {
11258                crate::data::Ref::Bytes(value) => {
11259                    Self::Bytes(::fidl_next::TakeFrom::take_from(value))
11260                }
11261
11262                crate::data::Ref::String(value) => {
11263                    Self::String(::fidl_next::TakeFrom::take_from(value))
11264                }
11265
11266                crate::data::Ref::Int64(value) => {
11267                    Self::Int64(::fidl_next::TakeFrom::take_from(value))
11268                }
11269
11270                crate::data::Ref::Uint64(value) => {
11271                    Self::Uint64(::fidl_next::TakeFrom::take_from(value))
11272                }
11273
11274                crate::data::Ref::UnknownOrdinal_(unknown_ordinal) => {
11275                    Self::__SourceBreaking { unknown_ordinal }
11276                }
11277            }
11278        }
11279    }
11280
11281    impl ::fidl_next::TakeFrom<crate::WireOptionalData>
11282        for Option<Box<::fidl_fuchsia_component_sandbox::Data>>
11283    {
11284        #[inline]
11285        fn take_from(from: &crate::WireOptionalData) -> Self {
11286            if let Some(inner) = from.as_ref() {
11287                Some(::fidl_next::TakeFrom::take_from(inner))
11288            } else {
11289                None
11290            }
11291        }
11292    }
11293
11294    impl ::fidl_next::TakeFrom<crate::WireDictionaryRef>
11295        for ::fidl_fuchsia_component_sandbox::DictionaryRef
11296    {
11297        #[inline]
11298        fn take_from(from: &crate::WireDictionaryRef) -> Self {
11299            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11300        }
11301    }
11302
11303    impl ::fidl_next::TakeFrom<crate::WireConnector> for ::fidl_fuchsia_component_sandbox::Connector {
11304        #[inline]
11305        fn take_from(from: &crate::WireConnector) -> Self {
11306            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11307        }
11308    }
11309
11310    impl ::fidl_next::TakeFrom<crate::WireDirConnector>
11311        for ::fidl_fuchsia_component_sandbox::DirConnector
11312    {
11313        #[inline]
11314        fn take_from(from: &crate::WireDirConnector) -> Self {
11315            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11316        }
11317    }
11318
11319    impl ::fidl_next::TakeFrom<crate::WireDirEntry> for ::fidl_fuchsia_component_sandbox::DirEntry {
11320        #[inline]
11321        fn take_from(from: &crate::WireDirEntry) -> Self {
11322            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11323        }
11324    }
11325
11326    impl ::fidl_next::TakeFrom<crate::WireCapability> for ::fidl_fuchsia_component_sandbox::Capability {
11327        #[inline]
11328        fn take_from(from: &crate::WireCapability) -> Self {
11329            match from.as_ref() {
11330                crate::capability::Ref::Unit(value) => {
11331                    Self::Unit(::fidl_next::TakeFrom::take_from(value))
11332                }
11333
11334                crate::capability::Ref::Handle(value) => {
11335                    Self::Handle(::fidl_next::TakeFrom::take_from(value))
11336                }
11337
11338                crate::capability::Ref::Data(value) => {
11339                    Self::Data(::fidl_next::TakeFrom::take_from(value))
11340                }
11341
11342                crate::capability::Ref::Dictionary(value) => {
11343                    Self::Dictionary(::fidl_next::TakeFrom::take_from(value))
11344                }
11345
11346                crate::capability::Ref::Connector(value) => {
11347                    Self::Connector(::fidl_next::TakeFrom::take_from(value))
11348                }
11349
11350                crate::capability::Ref::DirConnector(value) => {
11351                    Self::DirConnector(::fidl_next::TakeFrom::take_from(value))
11352                }
11353
11354                crate::capability::Ref::Directory(value) => {
11355                    Self::Directory(::fidl_next::TakeFrom::take_from(value))
11356                }
11357
11358                crate::capability::Ref::DirEntry(value) => {
11359                    Self::DirEntry(::fidl_next::TakeFrom::take_from(value))
11360                }
11361
11362                crate::capability::Ref::ConnectorRouter(value) => {
11363                    Self::ConnectorRouter(::fidl_next::TakeFrom::take_from(value))
11364                }
11365
11366                crate::capability::Ref::DictionaryRouter(value) => {
11367                    Self::DictionaryRouter(::fidl_next::TakeFrom::take_from(value))
11368                }
11369
11370                crate::capability::Ref::DirEntryRouter(value) => {
11371                    Self::DirEntryRouter(::fidl_next::TakeFrom::take_from(value))
11372                }
11373
11374                crate::capability::Ref::DataRouter(value) => {
11375                    Self::DataRouter(::fidl_next::TakeFrom::take_from(value))
11376                }
11377
11378                crate::capability::Ref::DirConnectorRouter(value) => {
11379                    Self::DirConnectorRouter(::fidl_next::TakeFrom::take_from(value))
11380                }
11381
11382                crate::capability::Ref::UnknownOrdinal_(unknown_ordinal) => {
11383                    Self::__SourceBreaking { unknown_ordinal }
11384                }
11385            }
11386        }
11387    }
11388
11389    impl ::fidl_next::TakeFrom<crate::WireOptionalCapability>
11390        for Option<Box<::fidl_fuchsia_component_sandbox::Capability>>
11391    {
11392        #[inline]
11393        fn take_from(from: &crate::WireOptionalCapability) -> 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::WireCapabilityStoreDuplicateRequest>
11403        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDuplicateRequest
11404    {
11405        #[inline]
11406        fn take_from(from: &crate::WireCapabilityStoreDuplicateRequest) -> Self {
11407            Self {
11408                id: ::fidl_next::TakeFrom::take_from(&from.id),
11409
11410                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11411            }
11412        }
11413    }
11414
11415    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreError>
11416        for ::fidl_fuchsia_component_sandbox::CapabilityStoreError
11417    {
11418        #[inline]
11419        fn take_from(from: &crate::WireCapabilityStoreError) -> Self {
11420            match crate::CapabilityStoreError::from(*from) {
11421                crate::CapabilityStoreError::IdNotFound => Self::IdNotFound,
11422
11423                crate::CapabilityStoreError::IdAlreadyExists => Self::IdAlreadyExists,
11424
11425                crate::CapabilityStoreError::BadCapability => Self::BadCapability,
11426
11427                crate::CapabilityStoreError::WrongType => Self::WrongType,
11428
11429                crate::CapabilityStoreError::NotDuplicatable => Self::NotDuplicatable,
11430
11431                crate::CapabilityStoreError::ItemNotFound => Self::ItemNotFound,
11432
11433                crate::CapabilityStoreError::ItemAlreadyExists => Self::ItemAlreadyExists,
11434
11435                crate::CapabilityStoreError::InvalidKey => Self::InvalidKey,
11436
11437                crate::CapabilityStoreError::InvalidArgs => Self::InvalidArgs,
11438
11439                crate::CapabilityStoreError::UnknownOrdinal_(value) => {
11440                    Self::__SourceBreaking { unknown_ordinal: value }
11441                }
11442            }
11443        }
11444    }
11445
11446    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDropRequest>
11447        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDropRequest
11448    {
11449        #[inline]
11450        fn take_from(from: &crate::WireCapabilityStoreDropRequest) -> Self {
11451            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11452        }
11453    }
11454
11455    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreExportRequest>
11456        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportRequest
11457    {
11458        #[inline]
11459        fn take_from(from: &crate::WireCapabilityStoreExportRequest) -> Self {
11460            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11461        }
11462    }
11463
11464    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreExportResponse>
11465        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportResponse
11466    {
11467        #[inline]
11468        fn take_from(from: &crate::WireCapabilityStoreExportResponse) -> Self {
11469            Self { capability: ::fidl_next::TakeFrom::take_from(&from.capability) }
11470        }
11471    }
11472
11473    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreImportRequest>
11474        for ::fidl_fuchsia_component_sandbox::CapabilityStoreImportRequest
11475    {
11476        #[inline]
11477        fn take_from(from: &crate::WireCapabilityStoreImportRequest) -> Self {
11478            Self {
11479                id: ::fidl_next::TakeFrom::take_from(&from.id),
11480
11481                capability: ::fidl_next::TakeFrom::take_from(&from.capability),
11482            }
11483        }
11484    }
11485
11486    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreConnectorCreateRequest>
11487        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorCreateRequest
11488    {
11489        #[inline]
11490        fn take_from(from: &crate::WireCapabilityStoreConnectorCreateRequest) -> Self {
11491            Self {
11492                id: ::fidl_next::TakeFrom::take_from(&from.id),
11493
11494                receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
11495            }
11496        }
11497    }
11498
11499    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreConnectorOpenRequest>
11500        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorOpenRequest
11501    {
11502        #[inline]
11503        fn take_from(from: &crate::WireCapabilityStoreConnectorOpenRequest) -> Self {
11504            Self {
11505                id: ::fidl_next::TakeFrom::take_from(&from.id),
11506
11507                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11508            }
11509        }
11510    }
11511
11512    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDirConnectorCreateRequest>
11513        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorCreateRequest
11514    {
11515        #[inline]
11516        fn take_from(from: &crate::WireCapabilityStoreDirConnectorCreateRequest) -> Self {
11517            Self {
11518                id: ::fidl_next::TakeFrom::take_from(&from.id),
11519
11520                receiver: ::fidl_next::TakeFrom::take_from(&from.receiver),
11521            }
11522        }
11523    }
11524
11525    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDirConnectorOpenRequest>
11526        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorOpenRequest
11527    {
11528        #[inline]
11529        fn take_from(from: &crate::WireCapabilityStoreDirConnectorOpenRequest) -> Self {
11530            Self {
11531                id: ::fidl_next::TakeFrom::take_from(&from.id),
11532
11533                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11534            }
11535        }
11536    }
11537
11538    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryCreateRequest>
11539        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCreateRequest
11540    {
11541        #[inline]
11542        fn take_from(from: &crate::WireCapabilityStoreDictionaryCreateRequest) -> Self {
11543            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11544        }
11545    }
11546
11547    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryLegacyImportRequest>
11548        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyImportRequest
11549    {
11550        #[inline]
11551        fn take_from(from: &crate::WireCapabilityStoreDictionaryLegacyImportRequest) -> Self {
11552            Self {
11553                id: ::fidl_next::TakeFrom::take_from(&from.id),
11554
11555                client_end: ::fidl_next::TakeFrom::take_from(&from.client_end),
11556            }
11557        }
11558    }
11559
11560    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryLegacyExportRequest>
11561        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyExportRequest
11562    {
11563        #[inline]
11564        fn take_from(from: &crate::WireCapabilityStoreDictionaryLegacyExportRequest) -> Self {
11565            Self {
11566                id: ::fidl_next::TakeFrom::take_from(&from.id),
11567
11568                server_end: ::fidl_next::TakeFrom::take_from(&from.server_end),
11569            }
11570        }
11571    }
11572
11573    impl ::fidl_next::TakeFrom<crate::WireDictionaryItem>
11574        for ::fidl_fuchsia_component_sandbox::DictionaryItem
11575    {
11576        #[inline]
11577        fn take_from(from: &crate::WireDictionaryItem) -> Self {
11578            Self {
11579                key: ::fidl_next::TakeFrom::take_from(&from.key),
11580
11581                value: ::fidl_next::TakeFrom::take_from(&from.value),
11582            }
11583        }
11584    }
11585
11586    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryInsertRequest>
11587        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryInsertRequest
11588    {
11589        #[inline]
11590        fn take_from(from: &crate::WireCapabilityStoreDictionaryInsertRequest) -> Self {
11591            Self {
11592                id: ::fidl_next::TakeFrom::take_from(&from.id),
11593
11594                item: ::fidl_next::TakeFrom::take_from(&from.item),
11595            }
11596        }
11597    }
11598
11599    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryGetRequest>
11600        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryGetRequest
11601    {
11602        #[inline]
11603        fn take_from(from: &crate::WireCapabilityStoreDictionaryGetRequest) -> Self {
11604            Self {
11605                id: ::fidl_next::TakeFrom::take_from(&from.id),
11606
11607                key: ::fidl_next::TakeFrom::take_from(&from.key),
11608
11609                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11610            }
11611        }
11612    }
11613
11614    impl ::fidl_next::TakeFrom<crate::WireWrappedCapabilityId>
11615        for ::fidl_fuchsia_component_sandbox::WrappedCapabilityId
11616    {
11617        #[inline]
11618        fn take_from(from: &crate::WireWrappedCapabilityId) -> Self {
11619            Self { id: ::fidl_next::TakeFrom::take_from(&from.id) }
11620        }
11621    }
11622
11623    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryRemoveRequest>
11624        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryRemoveRequest
11625    {
11626        #[inline]
11627        fn take_from(from: &crate::WireCapabilityStoreDictionaryRemoveRequest) -> Self {
11628            Self {
11629                id: ::fidl_next::TakeFrom::take_from(&from.id),
11630
11631                key: ::fidl_next::TakeFrom::take_from(&from.key),
11632
11633                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11634            }
11635        }
11636    }
11637
11638    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryCopyRequest>
11639        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCopyRequest
11640    {
11641        #[inline]
11642        fn take_from(from: &crate::WireCapabilityStoreDictionaryCopyRequest) -> Self {
11643            Self {
11644                id: ::fidl_next::TakeFrom::take_from(&from.id),
11645
11646                dest_id: ::fidl_next::TakeFrom::take_from(&from.dest_id),
11647            }
11648        }
11649    }
11650
11651    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryKeysRequest>
11652        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryKeysRequest
11653    {
11654        #[inline]
11655        fn take_from(from: &crate::WireCapabilityStoreDictionaryKeysRequest) -> Self {
11656            Self {
11657                id: ::fidl_next::TakeFrom::take_from(&from.id),
11658
11659                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11660            }
11661        }
11662    }
11663
11664    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryEnumerateRequest>
11665        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryEnumerateRequest
11666    {
11667        #[inline]
11668        fn take_from(from: &crate::WireCapabilityStoreDictionaryEnumerateRequest) -> Self {
11669            Self {
11670                id: ::fidl_next::TakeFrom::take_from(&from.id),
11671
11672                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11673            }
11674        }
11675    }
11676
11677    impl ::fidl_next::TakeFrom<crate::WireCapabilityStoreDictionaryDrainRequest>
11678        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryDrainRequest
11679    {
11680        #[inline]
11681        fn take_from(from: &crate::WireCapabilityStoreDictionaryDrainRequest) -> Self {
11682            Self {
11683                id: ::fidl_next::TakeFrom::take_from(&from.id),
11684
11685                iterator: ::fidl_next::TakeFrom::take_from(&from.iterator),
11686            }
11687        }
11688    }
11689
11690    #[cfg(target_os = "fuchsia")]
11691    /// An alias for a client sender over `zx::Channel` for the `CapabilityStore`
11692    /// protocol.
11693    pub type CapabilityStoreProxy =
11694        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::CapabilityStore>;
11695
11696    impl ::fidl_next::TakeFrom<crate::CapabilityStore>
11697        for ::fidl_fuchsia_component_sandbox::CapabilityStoreMarker
11698    {
11699        #[inline]
11700        fn take_from(from: &crate::CapabilityStore) -> Self {
11701            Self
11702        }
11703    }
11704
11705    impl ::fidl_next::TakeFrom<crate::WireInstanceToken>
11706        for ::fidl_fuchsia_component_sandbox::InstanceToken
11707    {
11708        #[inline]
11709        fn take_from(from: &crate::WireInstanceToken) -> Self {
11710            Self { token: ::fidl_next::TakeFrom::take_from(&from.token) }
11711        }
11712    }
11713
11714    impl ::fidl_next::TakeFrom<crate::WireRouteRequest>
11715        for ::fidl_fuchsia_component_sandbox::RouteRequest
11716    {
11717        #[inline]
11718        fn take_from(from: &crate::WireRouteRequest) -> Self {
11719            Self {
11720                requesting: from.requesting().map(::fidl_next::TakeFrom::take_from),
11721
11722                metadata: from.metadata().map(::fidl_next::TakeFrom::take_from),
11723
11724                __source_breaking: ::fidl::marker::SourceBreaking,
11725            }
11726        }
11727    }
11728
11729    impl ::fidl_next::TakeFrom<crate::WireConnectorRouterRouteResponse>
11730        for ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse
11731    {
11732        #[inline]
11733        fn take_from(from: &crate::WireConnectorRouterRouteResponse) -> Self {
11734            match from.as_ref() {
11735                crate::connector_router_route_response::Ref::Connector(value) => {
11736                    Self::Connector(::fidl_next::TakeFrom::take_from(value))
11737                }
11738
11739                crate::connector_router_route_response::Ref::Unavailable(value) => {
11740                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
11741                }
11742            }
11743        }
11744    }
11745
11746    impl ::fidl_next::TakeFrom<crate::WireOptionalConnectorRouterRouteResponse>
11747        for Option<Box<::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse>>
11748    {
11749        #[inline]
11750        fn take_from(from: &crate::WireOptionalConnectorRouterRouteResponse) -> Self {
11751            if let Some(inner) = from.as_ref() {
11752                Some(::fidl_next::TakeFrom::take_from(inner))
11753            } else {
11754                None
11755            }
11756        }
11757    }
11758
11759    impl ::fidl_next::TakeFrom<crate::WireRouterError>
11760        for ::fidl_fuchsia_component_sandbox::RouterError
11761    {
11762        #[inline]
11763        fn take_from(from: &crate::WireRouterError) -> Self {
11764            match crate::RouterError::from(*from) {
11765                crate::RouterError::NotFound => Self::NotFound,
11766
11767                crate::RouterError::InvalidArgs => Self::InvalidArgs,
11768
11769                crate::RouterError::NotSupported => Self::NotSupported,
11770
11771                crate::RouterError::Internal => Self::Internal,
11772
11773                crate::RouterError::UnknownOrdinal_(value) => {
11774                    Self::__SourceBreaking { unknown_ordinal: value }
11775                }
11776            }
11777        }
11778    }
11779
11780    #[cfg(target_os = "fuchsia")]
11781    /// An alias for a client sender over `zx::Channel` for the `ConnectorRouter`
11782    /// protocol.
11783    pub type ConnectorRouterProxy =
11784        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::ConnectorRouter>;
11785
11786    impl ::fidl_next::TakeFrom<crate::ConnectorRouter>
11787        for ::fidl_fuchsia_component_sandbox::ConnectorRouterMarker
11788    {
11789        #[inline]
11790        fn take_from(from: &crate::ConnectorRouter) -> Self {
11791            Self
11792        }
11793    }
11794
11795    impl ::fidl_next::TakeFrom<crate::WireDataRouterRouteResponse>
11796        for ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse
11797    {
11798        #[inline]
11799        fn take_from(from: &crate::WireDataRouterRouteResponse) -> Self {
11800            match from.as_ref() {
11801                crate::data_router_route_response::Ref::Data(value) => {
11802                    Self::Data(::fidl_next::TakeFrom::take_from(value))
11803                }
11804
11805                crate::data_router_route_response::Ref::Unavailable(value) => {
11806                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
11807                }
11808            }
11809        }
11810    }
11811
11812    impl ::fidl_next::TakeFrom<crate::WireOptionalDataRouterRouteResponse>
11813        for Option<Box<::fidl_fuchsia_component_sandbox::DataRouterRouteResponse>>
11814    {
11815        #[inline]
11816        fn take_from(from: &crate::WireOptionalDataRouterRouteResponse) -> Self {
11817            if let Some(inner) = from.as_ref() {
11818                Some(::fidl_next::TakeFrom::take_from(inner))
11819            } else {
11820                None
11821            }
11822        }
11823    }
11824
11825    #[cfg(target_os = "fuchsia")]
11826    /// An alias for a client sender over `zx::Channel` for the `DataRouter`
11827    /// protocol.
11828    pub type DataRouterProxy =
11829        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DataRouter>;
11830
11831    impl ::fidl_next::TakeFrom<crate::DataRouter>
11832        for ::fidl_fuchsia_component_sandbox::DataRouterMarker
11833    {
11834        #[inline]
11835        fn take_from(from: &crate::DataRouter) -> Self {
11836            Self
11837        }
11838    }
11839
11840    #[cfg(target_os = "fuchsia")]
11841    /// An alias for a client sender over `zx::Channel` for the `Dictionary`
11842    /// protocol.
11843    pub type DictionaryProxy =
11844        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Dictionary>;
11845
11846    impl ::fidl_next::TakeFrom<crate::Dictionary>
11847        for ::fidl_fuchsia_component_sandbox::DictionaryMarker
11848    {
11849        #[inline]
11850        fn take_from(from: &crate::Dictionary) -> Self {
11851            Self
11852        }
11853    }
11854
11855    impl ::fidl_next::TakeFrom<crate::WireDictionaryDrainIteratorGetNextRequest>
11856        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextRequest
11857    {
11858        #[inline]
11859        fn take_from(from: &crate::WireDictionaryDrainIteratorGetNextRequest) -> Self {
11860            Self {
11861                start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
11862
11863                limit: ::fidl_next::TakeFrom::take_from(&from.limit),
11864            }
11865        }
11866    }
11867
11868    impl ::fidl_next::TakeFrom<crate::WireDictionaryDrainIteratorGetNextResponse>
11869        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextResponse
11870    {
11871        #[inline]
11872        fn take_from(from: &crate::WireDictionaryDrainIteratorGetNextResponse) -> Self {
11873            Self {
11874                items: ::fidl_next::TakeFrom::take_from(&from.items),
11875
11876                end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
11877            }
11878        }
11879    }
11880
11881    #[cfg(target_os = "fuchsia")]
11882    /// An alias for a client sender over `zx::Channel` for the `DictionaryDrainIterator`
11883    /// protocol.
11884    pub type DictionaryDrainIteratorProxy = ::fidl_next::ClientSender<
11885        ::fidl_next::fuchsia::zx::Channel,
11886        crate::DictionaryDrainIterator,
11887    >;
11888
11889    impl ::fidl_next::TakeFrom<crate::DictionaryDrainIterator>
11890        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorMarker
11891    {
11892        #[inline]
11893        fn take_from(from: &crate::DictionaryDrainIterator) -> Self {
11894            Self
11895        }
11896    }
11897
11898    impl ::fidl_next::TakeFrom<crate::WireDictionaryEnumerateIteratorGetNextRequest>
11899        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextRequest
11900    {
11901        #[inline]
11902        fn take_from(from: &crate::WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
11903            Self {
11904                start_id: ::fidl_next::TakeFrom::take_from(&from.start_id),
11905
11906                limit: ::fidl_next::TakeFrom::take_from(&from.limit),
11907            }
11908        }
11909    }
11910
11911    impl ::fidl_next::TakeFrom<crate::WireDictionaryOptionalItem>
11912        for ::fidl_fuchsia_component_sandbox::DictionaryOptionalItem
11913    {
11914        #[inline]
11915        fn take_from(from: &crate::WireDictionaryOptionalItem) -> Self {
11916            Self {
11917                key: ::fidl_next::TakeFrom::take_from(&from.key),
11918
11919                value: ::fidl_next::TakeFrom::take_from(&from.value),
11920            }
11921        }
11922    }
11923
11924    impl ::fidl_next::TakeFrom<crate::WireDictionaryEnumerateIteratorGetNextResponse>
11925        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextResponse
11926    {
11927        #[inline]
11928        fn take_from(from: &crate::WireDictionaryEnumerateIteratorGetNextResponse) -> Self {
11929            Self {
11930                items: ::fidl_next::TakeFrom::take_from(&from.items),
11931
11932                end_id: ::fidl_next::TakeFrom::take_from(&from.end_id),
11933            }
11934        }
11935    }
11936
11937    #[cfg(target_os = "fuchsia")]
11938    /// An alias for a client sender over `zx::Channel` for the `DictionaryEnumerateIterator`
11939    /// protocol.
11940    pub type DictionaryEnumerateIteratorProxy = ::fidl_next::ClientSender<
11941        ::fidl_next::fuchsia::zx::Channel,
11942        crate::DictionaryEnumerateIterator,
11943    >;
11944
11945    impl ::fidl_next::TakeFrom<crate::DictionaryEnumerateIterator>
11946        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorMarker
11947    {
11948        #[inline]
11949        fn take_from(from: &crate::DictionaryEnumerateIterator) -> Self {
11950            Self
11951        }
11952    }
11953
11954    impl ::fidl_next::TakeFrom<crate::WireDictionaryError>
11955        for ::fidl_fuchsia_component_sandbox::DictionaryError
11956    {
11957        #[inline]
11958        fn take_from(from: &crate::WireDictionaryError) -> Self {
11959            match crate::DictionaryError::from(*from) {
11960                crate::DictionaryError::NotFound => Self::NotFound,
11961
11962                crate::DictionaryError::AlreadyExists => Self::AlreadyExists,
11963
11964                crate::DictionaryError::BadCapability => Self::BadCapability,
11965
11966                crate::DictionaryError::InvalidKey => Self::InvalidKey,
11967
11968                crate::DictionaryError::NotCloneable => Self::NotCloneable,
11969
11970                crate::DictionaryError::UnknownOrdinal_(value) => {
11971                    Self::__SourceBreaking { unknown_ordinal: value }
11972                }
11973            }
11974        }
11975    }
11976
11977    impl ::fidl_next::TakeFrom<crate::WireDictionaryKeysIteratorGetNextResponse>
11978        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorGetNextResponse
11979    {
11980        #[inline]
11981        fn take_from(from: &crate::WireDictionaryKeysIteratorGetNextResponse) -> Self {
11982            Self { keys: ::fidl_next::TakeFrom::take_from(&from.keys) }
11983        }
11984    }
11985
11986    #[cfg(target_os = "fuchsia")]
11987    /// An alias for a client sender over `zx::Channel` for the `DictionaryKeysIterator`
11988    /// protocol.
11989    pub type DictionaryKeysIteratorProxy =
11990        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DictionaryKeysIterator>;
11991
11992    impl ::fidl_next::TakeFrom<crate::DictionaryKeysIterator>
11993        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorMarker
11994    {
11995        #[inline]
11996        fn take_from(from: &crate::DictionaryKeysIterator) -> Self {
11997            Self
11998        }
11999    }
12000
12001    impl ::fidl_next::TakeFrom<crate::WireDictionaryRouterRouteResponse>
12002        for ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse
12003    {
12004        #[inline]
12005        fn take_from(from: &crate::WireDictionaryRouterRouteResponse) -> Self {
12006            match from.as_ref() {
12007                crate::dictionary_router_route_response::Ref::Dictionary(value) => {
12008                    Self::Dictionary(::fidl_next::TakeFrom::take_from(value))
12009                }
12010
12011                crate::dictionary_router_route_response::Ref::Unavailable(value) => {
12012                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12013                }
12014            }
12015        }
12016    }
12017
12018    impl ::fidl_next::TakeFrom<crate::WireOptionalDictionaryRouterRouteResponse>
12019        for Option<Box<::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse>>
12020    {
12021        #[inline]
12022        fn take_from(from: &crate::WireOptionalDictionaryRouterRouteResponse) -> Self {
12023            if let Some(inner) = from.as_ref() {
12024                Some(::fidl_next::TakeFrom::take_from(inner))
12025            } else {
12026                None
12027            }
12028        }
12029    }
12030
12031    #[cfg(target_os = "fuchsia")]
12032    /// An alias for a client sender over `zx::Channel` for the `DictionaryRouter`
12033    /// protocol.
12034    pub type DictionaryRouterProxy =
12035        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DictionaryRouter>;
12036
12037    impl ::fidl_next::TakeFrom<crate::DictionaryRouter>
12038        for ::fidl_fuchsia_component_sandbox::DictionaryRouterMarker
12039    {
12040        #[inline]
12041        fn take_from(from: &crate::DictionaryRouter) -> Self {
12042            Self
12043        }
12044    }
12045
12046    impl ::fidl_next::TakeFrom<crate::WireDirConnectorRouterRouteResponse>
12047        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse
12048    {
12049        #[inline]
12050        fn take_from(from: &crate::WireDirConnectorRouterRouteResponse) -> Self {
12051            match from.as_ref() {
12052                crate::dir_connector_router_route_response::Ref::DirConnector(value) => {
12053                    Self::DirConnector(::fidl_next::TakeFrom::take_from(value))
12054                }
12055
12056                crate::dir_connector_router_route_response::Ref::Unavailable(value) => {
12057                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12058                }
12059            }
12060        }
12061    }
12062
12063    impl ::fidl_next::TakeFrom<crate::WireOptionalDirConnectorRouterRouteResponse>
12064        for Option<Box<::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse>>
12065    {
12066        #[inline]
12067        fn take_from(from: &crate::WireOptionalDirConnectorRouterRouteResponse) -> Self {
12068            if let Some(inner) = from.as_ref() {
12069                Some(::fidl_next::TakeFrom::take_from(inner))
12070            } else {
12071                None
12072            }
12073        }
12074    }
12075
12076    #[cfg(target_os = "fuchsia")]
12077    /// An alias for a client sender over `zx::Channel` for the `DirConnectorRouter`
12078    /// protocol.
12079    pub type DirConnectorRouterProxy =
12080        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirConnectorRouter>;
12081
12082    impl ::fidl_next::TakeFrom<crate::DirConnectorRouter>
12083        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterMarker
12084    {
12085        #[inline]
12086        fn take_from(from: &crate::DirConnectorRouter) -> Self {
12087            Self
12088        }
12089    }
12090
12091    impl ::fidl_next::TakeFrom<crate::WireDirEntryRouterRouteResponse>
12092        for ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse
12093    {
12094        #[inline]
12095        fn take_from(from: &crate::WireDirEntryRouterRouteResponse) -> Self {
12096            match from.as_ref() {
12097                crate::dir_entry_router_route_response::Ref::DirEntry(value) => {
12098                    Self::DirEntry(::fidl_next::TakeFrom::take_from(value))
12099                }
12100
12101                crate::dir_entry_router_route_response::Ref::Unavailable(value) => {
12102                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12103                }
12104            }
12105        }
12106    }
12107
12108    impl ::fidl_next::TakeFrom<crate::WireOptionalDirEntryRouterRouteResponse>
12109        for Option<Box<::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse>>
12110    {
12111        #[inline]
12112        fn take_from(from: &crate::WireOptionalDirEntryRouterRouteResponse) -> Self {
12113            if let Some(inner) = from.as_ref() {
12114                Some(::fidl_next::TakeFrom::take_from(inner))
12115            } else {
12116                None
12117            }
12118        }
12119    }
12120
12121    #[cfg(target_os = "fuchsia")]
12122    /// An alias for a client sender over `zx::Channel` for the `DirEntryRouter`
12123    /// protocol.
12124    pub type DirEntryRouterProxy =
12125        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirEntryRouter>;
12126
12127    impl ::fidl_next::TakeFrom<crate::DirEntryRouter>
12128        for ::fidl_fuchsia_component_sandbox::DirEntryRouterMarker
12129    {
12130        #[inline]
12131        fn take_from(from: &crate::DirEntryRouter) -> Self {
12132            Self
12133        }
12134    }
12135
12136    impl ::fidl_next::TakeFrom<crate::WireDirReceiverReceiveRequest>
12137        for ::fidl_fuchsia_component_sandbox::DirReceiverReceiveRequest
12138    {
12139        #[inline]
12140        fn take_from(from: &crate::WireDirReceiverReceiveRequest) -> Self {
12141            Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
12142        }
12143    }
12144
12145    #[cfg(target_os = "fuchsia")]
12146    /// An alias for a client sender over `zx::Channel` for the `DirReceiver`
12147    /// protocol.
12148    pub type DirReceiverProxy =
12149        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirReceiver>;
12150
12151    impl ::fidl_next::TakeFrom<crate::DirReceiver>
12152        for ::fidl_fuchsia_component_sandbox::DirReceiverMarker
12153    {
12154        #[inline]
12155        fn take_from(from: &crate::DirReceiver) -> Self {
12156            Self
12157        }
12158    }
12159
12160    impl ::fidl_next::TakeFrom<crate::WireDirectoryRouterRouteResponse>
12161        for ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse
12162    {
12163        #[inline]
12164        fn take_from(from: &crate::WireDirectoryRouterRouteResponse) -> Self {
12165            match from.as_ref() {
12166                crate::directory_router_route_response::Ref::Directory(value) => {
12167                    Self::Directory(::fidl_next::TakeFrom::take_from(value))
12168                }
12169
12170                crate::directory_router_route_response::Ref::Unavailable(value) => {
12171                    Self::Unavailable(::fidl_next::TakeFrom::take_from(value))
12172                }
12173            }
12174        }
12175    }
12176
12177    impl ::fidl_next::TakeFrom<crate::WireOptionalDirectoryRouterRouteResponse>
12178        for Option<Box<::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse>>
12179    {
12180        #[inline]
12181        fn take_from(from: &crate::WireOptionalDirectoryRouterRouteResponse) -> Self {
12182            if let Some(inner) = from.as_ref() {
12183                Some(::fidl_next::TakeFrom::take_from(inner))
12184            } else {
12185                None
12186            }
12187        }
12188    }
12189
12190    #[cfg(target_os = "fuchsia")]
12191    /// An alias for a client sender over `zx::Channel` for the `DirectoryRouter`
12192    /// protocol.
12193    pub type DirectoryRouterProxy =
12194        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::DirectoryRouter>;
12195
12196    impl ::fidl_next::TakeFrom<crate::DirectoryRouter>
12197        for ::fidl_fuchsia_component_sandbox::DirectoryRouterMarker
12198    {
12199        #[inline]
12200        fn take_from(from: &crate::DirectoryRouter) -> Self {
12201            Self
12202        }
12203    }
12204
12205    impl ::fidl_next::TakeFrom<crate::WireProtocolPayload>
12206        for ::fidl_fuchsia_component_sandbox::ProtocolPayload
12207    {
12208        #[inline]
12209        fn take_from(from: &crate::WireProtocolPayload) -> Self {
12210            Self { channel: ::fidl_next::TakeFrom::take_from(&from.channel) }
12211        }
12212    }
12213
12214    #[cfg(target_os = "fuchsia")]
12215    /// An alias for a client sender over `zx::Channel` for the `Receiver`
12216    /// protocol.
12217    pub type ReceiverProxy =
12218        ::fidl_next::ClientSender<::fidl_next::fuchsia::zx::Channel, crate::Receiver>;
12219
12220    impl ::fidl_next::TakeFrom<crate::Receiver> for ::fidl_fuchsia_component_sandbox::ReceiverMarker {
12221        #[inline]
12222        fn take_from(from: &crate::Receiver) -> Self {
12223            Self
12224        }
12225    }
12226
12227    impl ::fidl_next::TakeFrom<crate::WireUnavailable>
12228        for ::fidl_fuchsia_component_sandbox::Unavailable
12229    {
12230        #[inline]
12231        fn take_from(from: &crate::WireUnavailable) -> Self {
12232            Self {}
12233        }
12234    }
12235}