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        self,
39        encoder: &mut ___E,
40        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
41    ) -> Result<(), ::fidl_next::EncodeError> {
42        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
43    }
44}
45
46unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Availability
47where
48    ___E: ?Sized,
49{
50    #[inline]
51    fn encode_ref(
52        &self,
53        encoder: &mut ___E,
54        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
55    ) -> Result<(), ::fidl_next::EncodeError> {
56        ::fidl_next::munge!(let WireAvailability { value } = out);
57        let _ = value.write(::fidl_next::WireU32::from(match *self {
58            Self::Required => 1,
59
60            Self::Optional => 2,
61
62            Self::SameAsTarget => 3,
63
64            Self::Transitional => 4,
65        }));
66
67        Ok(())
68    }
69}
70
71impl ::core::convert::From<WireAvailability> for Availability {
72    fn from(wire: WireAvailability) -> Self {
73        match u32::from(wire.value) {
74            1 => Self::Required,
75
76            2 => Self::Optional,
77
78            3 => Self::SameAsTarget,
79
80            4 => Self::Transitional,
81
82            _ => unsafe { ::core::hint::unreachable_unchecked() },
83        }
84    }
85}
86
87impl ::fidl_next::FromWire<WireAvailability> for Availability {
88    #[inline]
89    fn from_wire(wire: WireAvailability) -> Self {
90        Self::from(wire)
91    }
92}
93
94impl ::fidl_next::FromWireRef<WireAvailability> for Availability {
95    #[inline]
96    fn from_wire_ref(wire: &WireAvailability) -> Self {
97        Self::from(*wire)
98    }
99}
100
101/// The wire type corresponding to [`Availability`].
102#[derive(Clone, Copy, Debug, PartialEq, Eq)]
103#[repr(transparent)]
104pub struct WireAvailability {
105    value: ::fidl_next::WireU32,
106}
107
108unsafe impl ::fidl_next::Wire for WireAvailability {
109    type Decoded<'de> = Self;
110
111    #[inline]
112    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
113        // Wire enums have no padding
114    }
115}
116
117impl WireAvailability {
118    pub const REQUIRED: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(1) };
119
120    pub const OPTIONAL: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(2) };
121
122    pub const SAME_AS_TARGET: WireAvailability =
123        WireAvailability { value: ::fidl_next::WireU32(3) };
124
125    pub const TRANSITIONAL: WireAvailability = WireAvailability { value: ::fidl_next::WireU32(4) };
126}
127
128unsafe impl<___D> ::fidl_next::Decode<___D> for WireAvailability
129where
130    ___D: ?Sized,
131{
132    fn decode(
133        slot: ::fidl_next::Slot<'_, Self>,
134        _: &mut ___D,
135    ) -> Result<(), ::fidl_next::DecodeError> {
136        ::fidl_next::munge!(let Self { value } = slot);
137
138        match u32::from(*value) {
139            1 | 2 | 3 | 4 => (),
140            unknown => return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128)),
141        }
142
143        Ok(())
144    }
145}
146
147impl ::core::convert::From<Availability> for WireAvailability {
148    fn from(natural: Availability) -> Self {
149        match natural {
150            Availability::Required => WireAvailability::REQUIRED,
151
152            Availability::Optional => WireAvailability::OPTIONAL,
153
154            Availability::SameAsTarget => WireAvailability::SAME_AS_TARGET,
155
156            Availability::Transitional => WireAvailability::TRANSITIONAL,
157        }
158    }
159}
160
161#[derive(Clone, Debug)]
162#[repr(C)]
163pub struct Unit {}
164
165impl ::fidl_next::Encodable for Unit {
166    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireUnit> =
167        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
168
169    type Encoded = WireUnit;
170}
171
172unsafe impl<___E> ::fidl_next::Encode<___E> for Unit
173where
174    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
175{
176    #[inline]
177    fn encode(
178        self,
179        encoder: &mut ___E,
180        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
181    ) -> Result<(), ::fidl_next::EncodeError> {
182        ::fidl_next::munge! {
183            let Self::Encoded {
184
185            } = out;
186        }
187
188        Ok(())
189    }
190}
191
192unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Unit
193where
194    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
195{
196    #[inline]
197    fn encode_ref(
198        &self,
199        encoder: &mut ___E,
200        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
201    ) -> Result<(), ::fidl_next::EncodeError> {
202        ::fidl_next::munge! {
203            let Self::Encoded {
204
205            } = out;
206        }
207
208        Ok(())
209    }
210}
211
212impl ::fidl_next::EncodableOption for Unit {
213    type EncodedOption = ::fidl_next::WireBox<'static, WireUnit>;
214}
215
216unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Unit
217where
218    ___E: ::fidl_next::Encoder + ?Sized,
219    Unit: ::fidl_next::Encode<___E>,
220{
221    #[inline]
222    fn encode_option(
223        this: Option<Self>,
224        encoder: &mut ___E,
225        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
226    ) -> Result<(), ::fidl_next::EncodeError> {
227        if let Some(inner) = this {
228            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
229            ::fidl_next::WireBox::encode_present(out);
230        } else {
231            ::fidl_next::WireBox::encode_absent(out);
232        }
233
234        Ok(())
235    }
236}
237
238unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for Unit
239where
240    ___E: ::fidl_next::Encoder + ?Sized,
241    Unit: ::fidl_next::EncodeRef<___E>,
242{
243    #[inline]
244    fn encode_option_ref(
245        this: Option<&Self>,
246        encoder: &mut ___E,
247        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
248    ) -> Result<(), ::fidl_next::EncodeError> {
249        if let Some(inner) = this {
250            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
251            ::fidl_next::WireBox::encode_present(out);
252        } else {
253            ::fidl_next::WireBox::encode_absent(out);
254        }
255
256        Ok(())
257    }
258}
259
260impl ::fidl_next::FromWire<WireUnit> for Unit {
261    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireUnit, Self> =
262        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
263
264    #[inline]
265    fn from_wire(wire: WireUnit) -> Self {
266        Self {}
267    }
268}
269
270impl ::fidl_next::FromWireRef<WireUnit> for Unit {
271    #[inline]
272    fn from_wire_ref(wire: &WireUnit) -> Self {
273        Self {}
274    }
275}
276
277/// The wire type corresponding to [`Unit`].
278#[derive(Clone, Debug)]
279#[repr(C)]
280pub struct WireUnit {}
281
282unsafe impl ::fidl_next::Wire for WireUnit {
283    type Decoded<'de> = WireUnit;
284
285    #[inline]
286    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
287}
288
289unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnit
290where
291    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
292{
293    fn decode(
294        slot: ::fidl_next::Slot<'_, Self>,
295        decoder: &mut ___D,
296    ) -> Result<(), ::fidl_next::DecodeError> {
297        ::fidl_next::munge! {
298            let Self {
299
300            } = slot;
301        }
302
303        Ok(())
304    }
305}
306
307#[doc = " Maximum number of bytes in a [Data].\n"]
308pub const MAX_DATA_LENGTH: u32 = 8192;
309
310#[derive(Clone, Debug)]
311pub enum Data {
312    Bytes(Vec<u8>),
313
314    String(String),
315
316    Int64(i64),
317
318    Uint64(u64),
319
320    UnknownOrdinal_(u64),
321}
322
323impl ::fidl_next::Encodable for Data {
324    type Encoded = WireData<'static>;
325}
326
327unsafe impl<___E> ::fidl_next::Encode<___E> for Data
328where
329    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
330    ___E: ::fidl_next::Encoder,
331{
332    #[inline]
333    fn encode(
334        self,
335        encoder: &mut ___E,
336        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
337    ) -> Result<(), ::fidl_next::EncodeError> {
338        ::fidl_next::munge!(let WireData { raw, _phantom: _ } = out);
339
340        match self {
341            Self::Bytes(value) => {
342                ::fidl_next::RawWireUnion::encode_as::<___E, Vec<u8>>(value, 1, encoder, raw)?
343            }
344
345            Self::String(value) => {
346                ::fidl_next::RawWireUnion::encode_as::<___E, String>(value, 2, encoder, raw)?
347            }
348
349            Self::Int64(value) => {
350                ::fidl_next::RawWireUnion::encode_as::<___E, i64>(value, 3, encoder, raw)?
351            }
352
353            Self::Uint64(value) => {
354                ::fidl_next::RawWireUnion::encode_as::<___E, u64>(value, 4, encoder, raw)?
355            }
356
357            Self::UnknownOrdinal_(ordinal) => {
358                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
359            }
360        }
361
362        Ok(())
363    }
364}
365
366unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Data
367where
368    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
369    ___E: ::fidl_next::Encoder,
370{
371    #[inline]
372    fn encode_ref(
373        &self,
374        encoder: &mut ___E,
375        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
376    ) -> Result<(), ::fidl_next::EncodeError> {
377        ::fidl_next::munge!(let WireData { raw, _phantom: _ } = out);
378
379        match self {
380            Self::Bytes(value) => {
381                ::fidl_next::RawWireUnion::encode_as::<___E, &Vec<u8>>(value, 1, encoder, raw)?
382            }
383
384            Self::String(value) => {
385                ::fidl_next::RawWireUnion::encode_as::<___E, &String>(value, 2, encoder, raw)?
386            }
387
388            Self::Int64(value) => {
389                ::fidl_next::RawWireUnion::encode_as::<___E, &i64>(value, 3, encoder, raw)?
390            }
391
392            Self::Uint64(value) => {
393                ::fidl_next::RawWireUnion::encode_as::<___E, &u64>(value, 4, encoder, raw)?
394            }
395
396            Self::UnknownOrdinal_(ordinal) => {
397                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
398            }
399        }
400
401        Ok(())
402    }
403}
404
405impl ::fidl_next::EncodableOption for Data {
406    type EncodedOption = WireOptionalData<'static>;
407}
408
409unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Data
410where
411    ___E: ?Sized,
412    Data: ::fidl_next::Encode<___E>,
413{
414    #[inline]
415    fn encode_option(
416        this: Option<Self>,
417        encoder: &mut ___E,
418        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
419    ) -> Result<(), ::fidl_next::EncodeError> {
420        ::fidl_next::munge!(let WireOptionalData { raw, _phantom: _ } = &mut *out);
421
422        if let Some(inner) = this {
423            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
424            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
425        } else {
426            ::fidl_next::RawWireUnion::encode_absent(raw);
427        }
428
429        Ok(())
430    }
431}
432
433unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for Data
434where
435    ___E: ?Sized,
436    Data: ::fidl_next::EncodeRef<___E>,
437{
438    #[inline]
439    fn encode_option_ref(
440        this: Option<&Self>,
441        encoder: &mut ___E,
442        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
443    ) -> Result<(), ::fidl_next::EncodeError> {
444        ::fidl_next::munge!(let WireOptionalData { raw, _phantom: _ } = &mut *out);
445
446        if let Some(inner) = this {
447            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
448            ::fidl_next::EncodeRef::encode_ref(inner, encoder, value_out)?;
449        } else {
450            ::fidl_next::RawWireUnion::encode_absent(raw);
451        }
452
453        Ok(())
454    }
455}
456
457impl<'de> ::fidl_next::FromWire<WireData<'de>> for Data {
458    #[inline]
459    fn from_wire(wire: WireData<'de>) -> Self {
460        let wire = ::core::mem::ManuallyDrop::new(wire);
461        match wire.raw.ordinal() {
462            1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
463                wire.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>()
464            })),
465
466            2 => Self::String(::fidl_next::FromWire::from_wire(unsafe {
467                wire.raw.get().read_unchecked::<::fidl_next::WireString<'de>>()
468            })),
469
470            3 => Self::Int64(::fidl_next::FromWire::from_wire(unsafe {
471                wire.raw.get().read_unchecked::<::fidl_next::WireI64>()
472            })),
473
474            4 => Self::Uint64(::fidl_next::FromWire::from_wire(unsafe {
475                wire.raw.get().read_unchecked::<::fidl_next::WireU64>()
476            })),
477
478            _ => unsafe { ::core::hint::unreachable_unchecked() },
479        }
480    }
481}
482
483impl<'de> ::fidl_next::FromWireRef<WireData<'de>> for Data {
484    #[inline]
485    fn from_wire_ref(wire: &WireData<'de>) -> Self {
486        match wire.raw.ordinal() {
487            1 => Self::Bytes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
488                wire.raw.get().deref_unchecked::<::fidl_next::WireVector<'de, u8>>()
489            })),
490
491            2 => Self::String(::fidl_next::FromWireRef::from_wire_ref(unsafe {
492                wire.raw.get().deref_unchecked::<::fidl_next::WireString<'de>>()
493            })),
494
495            3 => Self::Int64(::fidl_next::FromWireRef::from_wire_ref(unsafe {
496                wire.raw.get().deref_unchecked::<::fidl_next::WireI64>()
497            })),
498
499            4 => Self::Uint64(::fidl_next::FromWireRef::from_wire_ref(unsafe {
500                wire.raw.get().deref_unchecked::<::fidl_next::WireU64>()
501            })),
502
503            _ => unsafe { ::core::hint::unreachable_unchecked() },
504        }
505    }
506}
507
508impl<'de> ::fidl_next::FromWireOption<WireOptionalData<'de>> for Box<Data> {
509    #[inline]
510    fn from_wire_option(wire: WireOptionalData<'de>) -> Option<Self> {
511        if let Some(inner) = wire.into_option() {
512            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
513        } else {
514            None
515        }
516    }
517}
518
519impl<'de> ::fidl_next::FromWireOptionRef<WireOptionalData<'de>> for Box<Data> {
520    #[inline]
521    fn from_wire_option_ref(wire: &WireOptionalData<'de>) -> Option<Self> {
522        if let Some(inner) = wire.as_ref() {
523            Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
524        } else {
525            None
526        }
527    }
528}
529
530/// The wire type corresponding to [`Data`].
531#[repr(transparent)]
532pub struct WireData<'de> {
533    raw: ::fidl_next::RawWireUnion,
534    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
535}
536
537impl<'de> Drop for WireData<'de> {
538    fn drop(&mut self) {
539        match self.raw.ordinal() {
540            1 => {
541                let _ =
542                    unsafe { self.raw.get().read_unchecked::<::fidl_next::WireVector<'de, u8>>() };
543            }
544
545            2 => {
546                let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireString<'de>>() };
547            }
548
549            3 => {
550                let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireI64>() };
551            }
552
553            4 => {
554                let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::WireU64>() };
555            }
556
557            _ => (),
558        }
559    }
560}
561
562unsafe impl ::fidl_next::Wire for WireData<'static> {
563    type Decoded<'de> = WireData<'de>;
564
565    #[inline]
566    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
567        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
568        ::fidl_next::RawWireUnion::zero_padding(raw);
569    }
570}
571
572pub mod data {
573    pub enum Ref<'de> {
574        Bytes(&'de ::fidl_next::WireVector<'de, u8>),
575
576        String(&'de ::fidl_next::WireString<'de>),
577
578        Int64(&'de ::fidl_next::WireI64),
579
580        Uint64(&'de ::fidl_next::WireU64),
581
582        UnknownOrdinal_(u64),
583    }
584}
585
586impl<'de> WireData<'de> {
587    pub fn as_ref(&self) -> crate::data::Ref<'_> {
588        match self.raw.ordinal() {
589            1 => crate::data::Ref::Bytes(unsafe {
590                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>()
591            }),
592
593            2 => crate::data::Ref::String(unsafe {
594                self.raw.get().deref_unchecked::<::fidl_next::WireString<'_>>()
595            }),
596
597            3 => crate::data::Ref::Int64(unsafe {
598                self.raw.get().deref_unchecked::<::fidl_next::WireI64>()
599            }),
600
601            4 => crate::data::Ref::Uint64(unsafe {
602                self.raw.get().deref_unchecked::<::fidl_next::WireU64>()
603            }),
604
605            unknown => crate::data::Ref::UnknownOrdinal_(unknown),
606        }
607    }
608}
609
610unsafe impl<___D> ::fidl_next::Decode<___D> for WireData<'static>
611where
612    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
613    ___D: ::fidl_next::Decoder,
614{
615    fn decode(
616        mut slot: ::fidl_next::Slot<'_, Self>,
617        decoder: &mut ___D,
618    ) -> Result<(), ::fidl_next::DecodeError> {
619        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
620        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
621            1 => {
622                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
623                    raw, decoder,
624                )?
625            }
626
627            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireString<'static>>(
628                raw, decoder,
629            )?,
630
631            3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI64>(raw, decoder)?,
632
633            4 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU64>(raw, decoder)?,
634
635            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
636        }
637
638        Ok(())
639    }
640}
641
642impl<'de> ::core::fmt::Debug for WireData<'de> {
643    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
644        match self.raw.ordinal() {
645            1 => unsafe {
646                self.raw.get().deref_unchecked::<::fidl_next::WireVector<'_, u8>>().fmt(f)
647            },
648            2 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireString<'_>>().fmt(f) },
649            3 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireI64>().fmt(f) },
650            4 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::WireU64>().fmt(f) },
651            _ => unsafe { ::core::hint::unreachable_unchecked() },
652        }
653    }
654}
655
656#[repr(transparent)]
657pub struct WireOptionalData<'de> {
658    raw: ::fidl_next::RawWireUnion,
659    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
660}
661
662unsafe impl ::fidl_next::Wire for WireOptionalData<'static> {
663    type Decoded<'de> = WireOptionalData<'de>;
664
665    #[inline]
666    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
667        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
668        ::fidl_next::RawWireUnion::zero_padding(raw);
669    }
670}
671
672impl<'de> WireOptionalData<'de> {
673    pub fn is_some(&self) -> bool {
674        self.raw.is_some()
675    }
676
677    pub fn is_none(&self) -> bool {
678        self.raw.is_none()
679    }
680
681    pub fn as_ref(&self) -> Option<&WireData<'de>> {
682        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
683    }
684
685    pub fn into_option(self) -> Option<WireData<'de>> {
686        if self.is_some() {
687            Some(WireData { raw: self.raw, _phantom: ::core::marker::PhantomData })
688        } else {
689            None
690        }
691    }
692}
693
694unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalData<'static>
695where
696    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
697    ___D: ::fidl_next::Decoder,
698{
699    fn decode(
700        mut slot: ::fidl_next::Slot<'_, Self>,
701        decoder: &mut ___D,
702    ) -> Result<(), ::fidl_next::DecodeError> {
703        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
704        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
705            1 => {
706                ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireVector<'static, u8>>(
707                    raw, decoder,
708                )?
709            }
710
711            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireString<'static>>(
712                raw, decoder,
713            )?,
714
715            3 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireI64>(raw, decoder)?,
716
717            4 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::WireU64>(raw, decoder)?,
718
719            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
720            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
721        }
722
723        Ok(())
724    }
725}
726
727impl<'de> ::core::fmt::Debug for WireOptionalData<'de> {
728    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
729        self.as_ref().fmt(f)
730    }
731}
732
733#[doc = " A token represents a bedrock object. Tokens are reference counted, dropping\n all counts of the token removes the object.\n"]
734pub type Token = ::fidl_next::fuchsia::zx::EventPair;
735
736/// The wire type corresponding to [`Token`].
737pub type WireToken = ::fidl_next::fuchsia::WireEventPair;
738
739#[derive(Debug)]
740#[repr(C)]
741pub struct DictionaryRef {
742    pub token: ::fidl_next::fuchsia::zx::EventPair,
743}
744
745impl ::fidl_next::Encodable for DictionaryRef {
746    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDictionaryRef> = unsafe {
747        ::fidl_next::CopyOptimization::enable_if(
748            true
749
750                && <
751                    ::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encodable
752                >::COPY_OPTIMIZATION.is_enabled()
753
754        )
755    };
756
757    type Encoded = WireDictionaryRef;
758}
759
760unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryRef
761where
762    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
763    ___E: ::fidl_next::fuchsia::HandleEncoder,
764{
765    #[inline]
766    fn encode(
767        self,
768        encoder: &mut ___E,
769        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
770    ) -> Result<(), ::fidl_next::EncodeError> {
771        ::fidl_next::munge! {
772            let Self::Encoded {
773                token,
774
775            } = out;
776        }
777
778        ::fidl_next::Encode::encode(self.token, encoder, token)?;
779
780        Ok(())
781    }
782}
783
784impl ::fidl_next::EncodableOption for DictionaryRef {
785    type EncodedOption = ::fidl_next::WireBox<'static, WireDictionaryRef>;
786}
787
788unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryRef
789where
790    ___E: ::fidl_next::Encoder + ?Sized,
791    DictionaryRef: ::fidl_next::Encode<___E>,
792{
793    #[inline]
794    fn encode_option(
795        this: Option<Self>,
796        encoder: &mut ___E,
797        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
798    ) -> Result<(), ::fidl_next::EncodeError> {
799        if let Some(inner) = this {
800            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
801            ::fidl_next::WireBox::encode_present(out);
802        } else {
803            ::fidl_next::WireBox::encode_absent(out);
804        }
805
806        Ok(())
807    }
808}
809
810impl ::fidl_next::FromWire<WireDictionaryRef> for DictionaryRef {
811    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDictionaryRef, Self> = unsafe {
812        ::fidl_next::CopyOptimization::enable_if(
813            true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
814                ::fidl_next::fuchsia::WireEventPair,
815            >>::COPY_OPTIMIZATION
816                .is_enabled(),
817        )
818    };
819
820    #[inline]
821    fn from_wire(wire: WireDictionaryRef) -> Self {
822        Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
823    }
824}
825
826/// The wire type corresponding to [`DictionaryRef`].
827#[derive(Debug)]
828#[repr(C)]
829pub struct WireDictionaryRef {
830    pub token: ::fidl_next::fuchsia::WireEventPair,
831}
832
833unsafe impl ::fidl_next::Wire for WireDictionaryRef {
834    type Decoded<'de> = WireDictionaryRef;
835
836    #[inline]
837    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
838}
839
840unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryRef
841where
842    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
843    ___D: ::fidl_next::fuchsia::HandleDecoder,
844{
845    fn decode(
846        slot: ::fidl_next::Slot<'_, Self>,
847        decoder: &mut ___D,
848    ) -> Result<(), ::fidl_next::DecodeError> {
849        ::fidl_next::munge! {
850            let Self {
851                mut token,
852
853            } = slot;
854        }
855
856        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
857
858        Ok(())
859    }
860}
861
862#[derive(Debug)]
863#[repr(C)]
864pub struct Connector {
865    pub token: ::fidl_next::fuchsia::zx::EventPair,
866}
867
868impl ::fidl_next::Encodable for Connector {
869    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireConnector> = unsafe {
870        ::fidl_next::CopyOptimization::enable_if(
871            true
872
873                && <
874                    ::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encodable
875                >::COPY_OPTIMIZATION.is_enabled()
876
877        )
878    };
879
880    type Encoded = WireConnector;
881}
882
883unsafe impl<___E> ::fidl_next::Encode<___E> for Connector
884where
885    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
886    ___E: ::fidl_next::fuchsia::HandleEncoder,
887{
888    #[inline]
889    fn encode(
890        self,
891        encoder: &mut ___E,
892        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
893    ) -> Result<(), ::fidl_next::EncodeError> {
894        ::fidl_next::munge! {
895            let Self::Encoded {
896                token,
897
898            } = out;
899        }
900
901        ::fidl_next::Encode::encode(self.token, encoder, token)?;
902
903        Ok(())
904    }
905}
906
907impl ::fidl_next::EncodableOption for Connector {
908    type EncodedOption = ::fidl_next::WireBox<'static, WireConnector>;
909}
910
911unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Connector
912where
913    ___E: ::fidl_next::Encoder + ?Sized,
914    Connector: ::fidl_next::Encode<___E>,
915{
916    #[inline]
917    fn encode_option(
918        this: Option<Self>,
919        encoder: &mut ___E,
920        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
921    ) -> Result<(), ::fidl_next::EncodeError> {
922        if let Some(inner) = this {
923            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
924            ::fidl_next::WireBox::encode_present(out);
925        } else {
926            ::fidl_next::WireBox::encode_absent(out);
927        }
928
929        Ok(())
930    }
931}
932
933impl ::fidl_next::FromWire<WireConnector> for Connector {
934    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireConnector, Self> = unsafe {
935        ::fidl_next::CopyOptimization::enable_if(
936            true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
937                ::fidl_next::fuchsia::WireEventPair,
938            >>::COPY_OPTIMIZATION
939                .is_enabled(),
940        )
941    };
942
943    #[inline]
944    fn from_wire(wire: WireConnector) -> Self {
945        Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
946    }
947}
948
949/// The wire type corresponding to [`Connector`].
950#[derive(Debug)]
951#[repr(C)]
952pub struct WireConnector {
953    pub token: ::fidl_next::fuchsia::WireEventPair,
954}
955
956unsafe impl ::fidl_next::Wire for WireConnector {
957    type Decoded<'de> = WireConnector;
958
959    #[inline]
960    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
961}
962
963unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnector
964where
965    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
966    ___D: ::fidl_next::fuchsia::HandleDecoder,
967{
968    fn decode(
969        slot: ::fidl_next::Slot<'_, Self>,
970        decoder: &mut ___D,
971    ) -> Result<(), ::fidl_next::DecodeError> {
972        ::fidl_next::munge! {
973            let Self {
974                mut token,
975
976            } = slot;
977        }
978
979        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
980
981        Ok(())
982    }
983}
984
985#[derive(Debug)]
986#[repr(C)]
987pub struct DirConnector {
988    pub token: ::fidl_next::fuchsia::zx::EventPair,
989}
990
991impl ::fidl_next::Encodable for DirConnector {
992    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirConnector> = unsafe {
993        ::fidl_next::CopyOptimization::enable_if(
994            true
995
996                && <
997                    ::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encodable
998                >::COPY_OPTIMIZATION.is_enabled()
999
1000        )
1001    };
1002
1003    type Encoded = WireDirConnector;
1004}
1005
1006unsafe impl<___E> ::fidl_next::Encode<___E> for DirConnector
1007where
1008    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1009    ___E: ::fidl_next::fuchsia::HandleEncoder,
1010{
1011    #[inline]
1012    fn encode(
1013        self,
1014        encoder: &mut ___E,
1015        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1016    ) -> Result<(), ::fidl_next::EncodeError> {
1017        ::fidl_next::munge! {
1018            let Self::Encoded {
1019                token,
1020
1021            } = out;
1022        }
1023
1024        ::fidl_next::Encode::encode(self.token, encoder, token)?;
1025
1026        Ok(())
1027    }
1028}
1029
1030impl ::fidl_next::EncodableOption for DirConnector {
1031    type EncodedOption = ::fidl_next::WireBox<'static, WireDirConnector>;
1032}
1033
1034unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirConnector
1035where
1036    ___E: ::fidl_next::Encoder + ?Sized,
1037    DirConnector: ::fidl_next::Encode<___E>,
1038{
1039    #[inline]
1040    fn encode_option(
1041        this: Option<Self>,
1042        encoder: &mut ___E,
1043        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1044    ) -> Result<(), ::fidl_next::EncodeError> {
1045        if let Some(inner) = this {
1046            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1047            ::fidl_next::WireBox::encode_present(out);
1048        } else {
1049            ::fidl_next::WireBox::encode_absent(out);
1050        }
1051
1052        Ok(())
1053    }
1054}
1055
1056impl ::fidl_next::FromWire<WireDirConnector> for DirConnector {
1057    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirConnector, Self> = unsafe {
1058        ::fidl_next::CopyOptimization::enable_if(
1059            true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
1060                ::fidl_next::fuchsia::WireEventPair,
1061            >>::COPY_OPTIMIZATION
1062                .is_enabled(),
1063        )
1064    };
1065
1066    #[inline]
1067    fn from_wire(wire: WireDirConnector) -> Self {
1068        Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
1069    }
1070}
1071
1072/// The wire type corresponding to [`DirConnector`].
1073#[derive(Debug)]
1074#[repr(C)]
1075pub struct WireDirConnector {
1076    pub token: ::fidl_next::fuchsia::WireEventPair,
1077}
1078
1079unsafe impl ::fidl_next::Wire for WireDirConnector {
1080    type Decoded<'de> = WireDirConnector;
1081
1082    #[inline]
1083    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1084}
1085
1086unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirConnector
1087where
1088    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1089    ___D: ::fidl_next::fuchsia::HandleDecoder,
1090{
1091    fn decode(
1092        slot: ::fidl_next::Slot<'_, Self>,
1093        decoder: &mut ___D,
1094    ) -> Result<(), ::fidl_next::DecodeError> {
1095        ::fidl_next::munge! {
1096            let Self {
1097                mut token,
1098
1099            } = slot;
1100        }
1101
1102        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
1103
1104        Ok(())
1105    }
1106}
1107
1108#[derive(Debug)]
1109#[repr(C)]
1110pub struct DirEntry {
1111    pub token: ::fidl_next::fuchsia::zx::EventPair,
1112}
1113
1114impl ::fidl_next::Encodable for DirEntry {
1115    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirEntry> = unsafe {
1116        ::fidl_next::CopyOptimization::enable_if(
1117            true
1118
1119                && <
1120                    ::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encodable
1121                >::COPY_OPTIMIZATION.is_enabled()
1122
1123        )
1124    };
1125
1126    type Encoded = WireDirEntry;
1127}
1128
1129unsafe impl<___E> ::fidl_next::Encode<___E> for DirEntry
1130where
1131    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1132    ___E: ::fidl_next::fuchsia::HandleEncoder,
1133{
1134    #[inline]
1135    fn encode(
1136        self,
1137        encoder: &mut ___E,
1138        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1139    ) -> Result<(), ::fidl_next::EncodeError> {
1140        ::fidl_next::munge! {
1141            let Self::Encoded {
1142                token,
1143
1144            } = out;
1145        }
1146
1147        ::fidl_next::Encode::encode(self.token, encoder, token)?;
1148
1149        Ok(())
1150    }
1151}
1152
1153impl ::fidl_next::EncodableOption for DirEntry {
1154    type EncodedOption = ::fidl_next::WireBox<'static, WireDirEntry>;
1155}
1156
1157unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirEntry
1158where
1159    ___E: ::fidl_next::Encoder + ?Sized,
1160    DirEntry: ::fidl_next::Encode<___E>,
1161{
1162    #[inline]
1163    fn encode_option(
1164        this: Option<Self>,
1165        encoder: &mut ___E,
1166        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1167    ) -> Result<(), ::fidl_next::EncodeError> {
1168        if let Some(inner) = this {
1169            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1170            ::fidl_next::WireBox::encode_present(out);
1171        } else {
1172            ::fidl_next::WireBox::encode_absent(out);
1173        }
1174
1175        Ok(())
1176    }
1177}
1178
1179impl ::fidl_next::FromWire<WireDirEntry> for DirEntry {
1180    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirEntry, Self> = unsafe {
1181        ::fidl_next::CopyOptimization::enable_if(
1182            true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
1183                ::fidl_next::fuchsia::WireEventPair,
1184            >>::COPY_OPTIMIZATION
1185                .is_enabled(),
1186        )
1187    };
1188
1189    #[inline]
1190    fn from_wire(wire: WireDirEntry) -> Self {
1191        Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
1192    }
1193}
1194
1195/// The wire type corresponding to [`DirEntry`].
1196#[derive(Debug)]
1197#[repr(C)]
1198pub struct WireDirEntry {
1199    pub token: ::fidl_next::fuchsia::WireEventPair,
1200}
1201
1202unsafe impl ::fidl_next::Wire for WireDirEntry {
1203    type Decoded<'de> = WireDirEntry;
1204
1205    #[inline]
1206    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
1207}
1208
1209unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirEntry
1210where
1211    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1212    ___D: ::fidl_next::fuchsia::HandleDecoder,
1213{
1214    fn decode(
1215        slot: ::fidl_next::Slot<'_, Self>,
1216        decoder: &mut ___D,
1217    ) -> Result<(), ::fidl_next::DecodeError> {
1218        ::fidl_next::munge! {
1219            let Self {
1220                mut token,
1221
1222            } = slot;
1223        }
1224
1225        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
1226
1227        Ok(())
1228    }
1229}
1230
1231#[derive(Debug)]
1232pub enum Capability {
1233    Unit(crate::Unit),
1234
1235    Handle(::fidl_next::fuchsia::zx::Handle),
1236
1237    Data(crate::Data),
1238
1239    Dictionary(crate::DictionaryRef),
1240
1241    Connector(crate::Connector),
1242
1243    DirConnector(crate::DirConnector),
1244
1245    Directory(
1246        ::fidl_next::ClientEnd<
1247            ::fidl_next_fuchsia_io::Directory,
1248            ::fidl_next::fuchsia::zx::Channel,
1249        >,
1250    ),
1251
1252    DirEntry(crate::DirEntry),
1253
1254    ConnectorRouter(
1255        ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
1256    ),
1257
1258    DictionaryRouter(
1259        ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::zx::Channel>,
1260    ),
1261
1262    DirEntryRouter(
1263        ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::zx::Channel>,
1264    ),
1265
1266    DataRouter(::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::zx::Channel>),
1267
1268    DirConnectorRouter(
1269        ::fidl_next::ClientEnd<crate::DirConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
1270    ),
1271
1272    UnknownOrdinal_(u64),
1273}
1274
1275impl ::fidl_next::Encodable for Capability {
1276    type Encoded = WireCapability<'static>;
1277}
1278
1279unsafe impl<___E> ::fidl_next::Encode<___E> for Capability
1280where
1281    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1282    ___E: ::fidl_next::Encoder,
1283    ___E: ::fidl_next::fuchsia::HandleEncoder,
1284{
1285    #[inline]
1286    fn encode(
1287        self,
1288        encoder: &mut ___E,
1289        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
1290    ) -> Result<(), ::fidl_next::EncodeError> {
1291        ::fidl_next::munge!(let WireCapability { raw, _phantom: _ } = out);
1292
1293        match self {
1294            Self::Unit(value) => {
1295                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Unit>(value, 1, encoder, raw)?
1296            }
1297
1298            Self::Handle(value) => ::fidl_next::RawWireUnion::encode_as::<
1299                ___E,
1300                ::fidl_next::fuchsia::zx::Handle,
1301            >(value, 2, encoder, raw)?,
1302
1303            Self::Data(value) => {
1304                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Data>(value, 3, encoder, raw)?
1305            }
1306
1307            Self::Dictionary(value) => ::fidl_next::RawWireUnion::encode_as::<
1308                ___E,
1309                crate::DictionaryRef,
1310            >(value, 4, encoder, raw)?,
1311
1312            Self::Connector(value) => {
1313                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Connector>(
1314                    value, 5, encoder, raw,
1315                )?
1316            }
1317
1318            Self::DirConnector(value) => ::fidl_next::RawWireUnion::encode_as::<
1319                ___E,
1320                crate::DirConnector,
1321            >(value, 6, encoder, raw)?,
1322
1323            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as::<
1324                ___E,
1325                ::fidl_next::ClientEnd<
1326                    ::fidl_next_fuchsia_io::Directory,
1327                    ::fidl_next::fuchsia::zx::Channel,
1328                >,
1329            >(value, 7, encoder, raw)?,
1330
1331            Self::DirEntry(value) => ::fidl_next::RawWireUnion::encode_as::<___E, crate::DirEntry>(
1332                value, 8, encoder, raw,
1333            )?,
1334
1335            Self::ConnectorRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1336                ___E,
1337                ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::zx::Channel>,
1338            >(value, 9, encoder, raw)?,
1339
1340            Self::DictionaryRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1341                ___E,
1342                ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::zx::Channel>,
1343            >(value, 10, encoder, raw)?,
1344
1345            Self::DirEntryRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1346                ___E,
1347                ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::zx::Channel>,
1348            >(value, 11, encoder, raw)?,
1349
1350            Self::DataRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1351                ___E,
1352                ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::zx::Channel>,
1353            >(value, 12, encoder, raw)?,
1354
1355            Self::DirConnectorRouter(value) => ::fidl_next::RawWireUnion::encode_as::<
1356                ___E,
1357                ::fidl_next::ClientEnd<
1358                    crate::DirConnectorRouter,
1359                    ::fidl_next::fuchsia::zx::Channel,
1360                >,
1361            >(value, 13, encoder, raw)?,
1362
1363            Self::UnknownOrdinal_(ordinal) => {
1364                return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
1365            }
1366        }
1367
1368        Ok(())
1369    }
1370}
1371
1372impl ::fidl_next::EncodableOption for Capability {
1373    type EncodedOption = WireOptionalCapability<'static>;
1374}
1375
1376unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Capability
1377where
1378    ___E: ?Sized,
1379    Capability: ::fidl_next::Encode<___E>,
1380{
1381    #[inline]
1382    fn encode_option(
1383        this: Option<Self>,
1384        encoder: &mut ___E,
1385        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
1386    ) -> Result<(), ::fidl_next::EncodeError> {
1387        ::fidl_next::munge!(let WireOptionalCapability { raw, _phantom: _ } = &mut *out);
1388
1389        if let Some(inner) = this {
1390            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
1391            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
1392        } else {
1393            ::fidl_next::RawWireUnion::encode_absent(raw);
1394        }
1395
1396        Ok(())
1397    }
1398}
1399
1400impl<'de> ::fidl_next::FromWire<WireCapability<'de>> for Capability {
1401    #[inline]
1402    fn from_wire(wire: WireCapability<'de>) -> Self {
1403        let wire = ::core::mem::ManuallyDrop::new(wire);
1404        match wire.raw.ordinal() {
1405            1 => Self::Unit(::fidl_next::FromWire::from_wire(unsafe {
1406                wire.raw.get().read_unchecked::<crate::WireUnit>()
1407            })),
1408
1409            2 => Self::Handle(::fidl_next::FromWire::from_wire(unsafe {
1410                wire.raw.get().read_unchecked::<::fidl_next::fuchsia::WireHandle>()
1411            })),
1412
1413            3 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
1414                wire.raw.get().read_unchecked::<crate::WireData<'de>>()
1415            })),
1416
1417            4 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
1418                wire.raw.get().read_unchecked::<crate::WireDictionaryRef>()
1419            })),
1420
1421            5 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
1422                wire.raw.get().read_unchecked::<crate::WireConnector>()
1423            })),
1424
1425            6 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
1426                wire.raw.get().read_unchecked::<crate::WireDirConnector>()
1427            })),
1428
1429            7 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
1430                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1431                    ::fidl_next_fuchsia_io::Directory,
1432                    ::fidl_next::fuchsia::WireChannel,
1433                >>()
1434            })),
1435
1436            8 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
1437                wire.raw.get().read_unchecked::<crate::WireDirEntry>()
1438            })),
1439
1440            9 => Self::ConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
1441                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1442                    crate::ConnectorRouter,
1443                    ::fidl_next::fuchsia::WireChannel,
1444                >>()
1445            })),
1446
1447            10 => Self::DictionaryRouter(::fidl_next::FromWire::from_wire(unsafe {
1448                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1449                    crate::DictionaryRouter,
1450                    ::fidl_next::fuchsia::WireChannel,
1451                >>()
1452            })),
1453
1454            11 => Self::DirEntryRouter(::fidl_next::FromWire::from_wire(unsafe {
1455                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>>()
1456            })),
1457
1458            12 => Self::DataRouter(::fidl_next::FromWire::from_wire(unsafe {
1459                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>>()
1460            })),
1461
1462            13 => Self::DirConnectorRouter(::fidl_next::FromWire::from_wire(unsafe {
1463                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1464                    crate::DirConnectorRouter,
1465                    ::fidl_next::fuchsia::WireChannel,
1466                >>()
1467            })),
1468
1469            _ => unsafe { ::core::hint::unreachable_unchecked() },
1470        }
1471    }
1472}
1473
1474impl<'de> ::fidl_next::FromWireOption<WireOptionalCapability<'de>> for Box<Capability> {
1475    #[inline]
1476    fn from_wire_option(wire: WireOptionalCapability<'de>) -> Option<Self> {
1477        if let Some(inner) = wire.into_option() {
1478            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
1479        } else {
1480            None
1481        }
1482    }
1483}
1484
1485/// The wire type corresponding to [`Capability`].
1486#[repr(transparent)]
1487pub struct WireCapability<'de> {
1488    raw: ::fidl_next::RawWireUnion,
1489    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
1490}
1491
1492impl<'de> Drop for WireCapability<'de> {
1493    fn drop(&mut self) {
1494        match self.raw.ordinal() {
1495            1 => {
1496                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
1497            }
1498
1499            2 => {
1500                let _ =
1501                    unsafe { self.raw.get().read_unchecked::<::fidl_next::fuchsia::WireHandle>() };
1502            }
1503
1504            3 => {
1505                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireData<'de>>() };
1506            }
1507
1508            4 => {
1509                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDictionaryRef>() };
1510            }
1511
1512            5 => {
1513                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireConnector>() };
1514            }
1515
1516            6 => {
1517                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirConnector>() };
1518            }
1519
1520            7 => {
1521                let _ = unsafe {
1522                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1523                        ::fidl_next_fuchsia_io::Directory,
1524                        ::fidl_next::fuchsia::WireChannel,
1525                    >>()
1526                };
1527            }
1528
1529            8 => {
1530                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirEntry>() };
1531            }
1532
1533            9 => {
1534                let _ = unsafe {
1535                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1536                        crate::ConnectorRouter,
1537                        ::fidl_next::fuchsia::WireChannel,
1538                    >>()
1539                };
1540            }
1541
1542            10 => {
1543                let _ = unsafe {
1544                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1545                        crate::DictionaryRouter,
1546                        ::fidl_next::fuchsia::WireChannel,
1547                    >>()
1548                };
1549            }
1550
1551            11 => {
1552                let _ = unsafe {
1553                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1554                        crate::DirEntryRouter,
1555                        ::fidl_next::fuchsia::WireChannel,
1556                    >>()
1557                };
1558            }
1559
1560            12 => {
1561                let _ = unsafe {
1562                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>>()
1563                };
1564            }
1565
1566            13 => {
1567                let _ = unsafe {
1568                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
1569                        crate::DirConnectorRouter,
1570                        ::fidl_next::fuchsia::WireChannel,
1571                    >>()
1572                };
1573            }
1574
1575            _ => (),
1576        }
1577    }
1578}
1579
1580unsafe impl ::fidl_next::Wire for WireCapability<'static> {
1581    type Decoded<'de> = WireCapability<'de>;
1582
1583    #[inline]
1584    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1585        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1586        ::fidl_next::RawWireUnion::zero_padding(raw);
1587    }
1588}
1589
1590pub mod capability {
1591    pub enum Ref<'de> {
1592        Unit(&'de crate::WireUnit),
1593
1594        Handle(&'de ::fidl_next::fuchsia::WireHandle),
1595
1596        Data(&'de crate::WireData<'de>),
1597
1598        Dictionary(&'de crate::WireDictionaryRef),
1599
1600        Connector(&'de crate::WireConnector),
1601
1602        DirConnector(&'de crate::WireDirConnector),
1603
1604        Directory(
1605            &'de ::fidl_next::ClientEnd<
1606                ::fidl_next_fuchsia_io::Directory,
1607                ::fidl_next::fuchsia::WireChannel,
1608            >,
1609        ),
1610
1611        DirEntry(&'de crate::WireDirEntry),
1612
1613        ConnectorRouter(
1614            &'de ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::WireChannel>,
1615        ),
1616
1617        DictionaryRouter(
1618            &'de ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::WireChannel>,
1619        ),
1620
1621        DirEntryRouter(
1622            &'de ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>,
1623        ),
1624
1625        DataRouter(
1626            &'de ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>,
1627        ),
1628
1629        DirConnectorRouter(
1630            &'de ::fidl_next::ClientEnd<
1631                crate::DirConnectorRouter,
1632                ::fidl_next::fuchsia::WireChannel,
1633            >,
1634        ),
1635
1636        UnknownOrdinal_(u64),
1637    }
1638}
1639
1640impl<'de> WireCapability<'de> {
1641    pub fn as_ref(&self) -> crate::capability::Ref<'_> {
1642        match self.raw.ordinal() {
1643            1 => crate::capability::Ref::Unit(unsafe {
1644                self.raw.get().deref_unchecked::<crate::WireUnit>()
1645            }),
1646
1647            2 => crate::capability::Ref::Handle(unsafe {
1648                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>()
1649            }),
1650
1651            3 => crate::capability::Ref::Data(unsafe {
1652                self.raw.get().deref_unchecked::<crate::WireData<'_>>()
1653            }),
1654
1655            4 => crate::capability::Ref::Dictionary(unsafe {
1656                self.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
1657            }),
1658
1659            5 => crate::capability::Ref::Connector(unsafe {
1660                self.raw.get().deref_unchecked::<crate::WireConnector>()
1661            }),
1662
1663            6 => crate::capability::Ref::DirConnector(unsafe {
1664                self.raw.get().deref_unchecked::<crate::WireDirConnector>()
1665            }),
1666
1667            7 => crate::capability::Ref::Directory(unsafe {
1668                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1669                    ::fidl_next_fuchsia_io::Directory,
1670                    ::fidl_next::fuchsia::WireChannel,
1671                >>()
1672            }),
1673
1674            8 => crate::capability::Ref::DirEntry(unsafe {
1675                self.raw.get().deref_unchecked::<crate::WireDirEntry>()
1676            }),
1677
1678            9 => crate::capability::Ref::ConnectorRouter(unsafe {
1679                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1680                    crate::ConnectorRouter,
1681                    ::fidl_next::fuchsia::WireChannel,
1682                >>()
1683            }),
1684
1685            10 => crate::capability::Ref::DictionaryRouter(unsafe {
1686                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1687                    crate::DictionaryRouter,
1688                    ::fidl_next::fuchsia::WireChannel,
1689                >>()
1690            }),
1691
1692            11 => crate::capability::Ref::DirEntryRouter(unsafe {
1693                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>>()
1694            }),
1695
1696            12 => crate::capability::Ref::DataRouter(unsafe {
1697                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>>()
1698            }),
1699
1700            13 => crate::capability::Ref::DirConnectorRouter(unsafe {
1701                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
1702                    crate::DirConnectorRouter,
1703                    ::fidl_next::fuchsia::WireChannel,
1704                >>()
1705            }),
1706
1707            unknown => crate::capability::Ref::UnknownOrdinal_(unknown),
1708        }
1709    }
1710}
1711
1712unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapability<'static>
1713where
1714    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1715    ___D: ::fidl_next::Decoder,
1716    ___D: ::fidl_next::fuchsia::HandleDecoder,
1717{
1718    fn decode(
1719        mut slot: ::fidl_next::Slot<'_, Self>,
1720        decoder: &mut ___D,
1721    ) -> Result<(), ::fidl_next::DecodeError> {
1722        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1723        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1724            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
1725
1726            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
1727                raw, decoder,
1728            )?,
1729
1730            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData<'static>>(
1731                raw, decoder,
1732            )?,
1733
1734            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDictionaryRef>(
1735                raw, decoder,
1736            )?,
1737
1738            5 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireConnector>(raw, decoder)?,
1739
1740            6 => {
1741                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirConnector>(raw, decoder)?
1742            }
1743
1744            7 => ::fidl_next::RawWireUnion::decode_as::<
1745                ___D,
1746                ::fidl_next::ClientEnd<
1747                    ::fidl_next_fuchsia_io::Directory,
1748                    ::fidl_next::fuchsia::WireChannel,
1749                >,
1750            >(raw, decoder)?,
1751
1752            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirEntry>(raw, decoder)?,
1753
1754            9 => ::fidl_next::RawWireUnion::decode_as::<
1755                ___D,
1756                ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::WireChannel>,
1757            >(raw, decoder)?,
1758
1759            10 => ::fidl_next::RawWireUnion::decode_as::<
1760                ___D,
1761                ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::WireChannel>,
1762            >(raw, decoder)?,
1763
1764            11 => ::fidl_next::RawWireUnion::decode_as::<
1765                ___D,
1766                ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>,
1767            >(raw, decoder)?,
1768
1769            12 => ::fidl_next::RawWireUnion::decode_as::<
1770                ___D,
1771                ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>,
1772            >(raw, decoder)?,
1773
1774            13 => ::fidl_next::RawWireUnion::decode_as::<
1775                ___D,
1776                ::fidl_next::ClientEnd<
1777                    crate::DirConnectorRouter,
1778                    ::fidl_next::fuchsia::WireChannel,
1779                >,
1780            >(raw, decoder)?,
1781
1782            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1783        }
1784
1785        Ok(())
1786    }
1787}
1788
1789impl<'de> ::core::fmt::Debug for WireCapability<'de> {
1790    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1791        match self.raw.ordinal() {
1792            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
1793            2 => unsafe {
1794                self.raw.get().deref_unchecked::<::fidl_next::fuchsia::WireHandle>().fmt(f)
1795            },
1796            3 => unsafe { self.raw.get().deref_unchecked::<crate::WireData<'_>>().fmt(f) },
1797            4 => unsafe { self.raw.get().deref_unchecked::<crate::WireDictionaryRef>().fmt(f) },
1798            5 => unsafe { self.raw.get().deref_unchecked::<crate::WireConnector>().fmt(f) },
1799            6 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirConnector>().fmt(f) },
1800            7 => unsafe {
1801                self.raw
1802                    .get()
1803                    .deref_unchecked::<::fidl_next::ClientEnd<
1804                        ::fidl_next_fuchsia_io::Directory,
1805                        ::fidl_next::fuchsia::WireChannel,
1806                    >>()
1807                    .fmt(f)
1808            },
1809            8 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirEntry>().fmt(f) },
1810            9 => unsafe {
1811                self.raw
1812                    .get()
1813                    .deref_unchecked::<::fidl_next::ClientEnd<
1814                        crate::ConnectorRouter,
1815                        ::fidl_next::fuchsia::WireChannel,
1816                    >>()
1817                    .fmt(f)
1818            },
1819            10 => unsafe {
1820                self.raw
1821                    .get()
1822                    .deref_unchecked::<::fidl_next::ClientEnd<
1823                        crate::DictionaryRouter,
1824                        ::fidl_next::fuchsia::WireChannel,
1825                    >>()
1826                    .fmt(f)
1827            },
1828            11 => unsafe {
1829                self.raw.get().deref_unchecked::<
1830                            ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>
1831                        >().fmt(f)
1832            },
1833            12 => unsafe {
1834                self.raw.get().deref_unchecked::<
1835                            ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>
1836                        >().fmt(f)
1837            },
1838            13 => unsafe {
1839                self.raw
1840                    .get()
1841                    .deref_unchecked::<::fidl_next::ClientEnd<
1842                        crate::DirConnectorRouter,
1843                        ::fidl_next::fuchsia::WireChannel,
1844                    >>()
1845                    .fmt(f)
1846            },
1847            _ => unsafe { ::core::hint::unreachable_unchecked() },
1848        }
1849    }
1850}
1851
1852#[repr(transparent)]
1853pub struct WireOptionalCapability<'de> {
1854    raw: ::fidl_next::RawWireUnion,
1855    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
1856}
1857
1858unsafe impl ::fidl_next::Wire for WireOptionalCapability<'static> {
1859    type Decoded<'de> = WireOptionalCapability<'de>;
1860
1861    #[inline]
1862    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
1863        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
1864        ::fidl_next::RawWireUnion::zero_padding(raw);
1865    }
1866}
1867
1868impl<'de> WireOptionalCapability<'de> {
1869    pub fn is_some(&self) -> bool {
1870        self.raw.is_some()
1871    }
1872
1873    pub fn is_none(&self) -> bool {
1874        self.raw.is_none()
1875    }
1876
1877    pub fn as_ref(&self) -> Option<&WireCapability<'de>> {
1878        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
1879    }
1880
1881    pub fn into_option(self) -> Option<WireCapability<'de>> {
1882        if self.is_some() {
1883            Some(WireCapability { raw: self.raw, _phantom: ::core::marker::PhantomData })
1884        } else {
1885            None
1886        }
1887    }
1888}
1889
1890unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalCapability<'static>
1891where
1892    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
1893    ___D: ::fidl_next::Decoder,
1894    ___D: ::fidl_next::fuchsia::HandleDecoder,
1895{
1896    fn decode(
1897        mut slot: ::fidl_next::Slot<'_, Self>,
1898        decoder: &mut ___D,
1899    ) -> Result<(), ::fidl_next::DecodeError> {
1900        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
1901        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
1902            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
1903
1904            2 => ::fidl_next::RawWireUnion::decode_as::<___D, ::fidl_next::fuchsia::WireHandle>(
1905                raw, decoder,
1906            )?,
1907
1908            3 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData<'static>>(
1909                raw, decoder,
1910            )?,
1911
1912            4 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDictionaryRef>(
1913                raw, decoder,
1914            )?,
1915
1916            5 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireConnector>(raw, decoder)?,
1917
1918            6 => {
1919                ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirConnector>(raw, decoder)?
1920            }
1921
1922            7 => ::fidl_next::RawWireUnion::decode_as::<
1923                ___D,
1924                ::fidl_next::ClientEnd<
1925                    ::fidl_next_fuchsia_io::Directory,
1926                    ::fidl_next::fuchsia::WireChannel,
1927                >,
1928            >(raw, decoder)?,
1929
1930            8 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireDirEntry>(raw, decoder)?,
1931
1932            9 => ::fidl_next::RawWireUnion::decode_as::<
1933                ___D,
1934                ::fidl_next::ClientEnd<crate::ConnectorRouter, ::fidl_next::fuchsia::WireChannel>,
1935            >(raw, decoder)?,
1936
1937            10 => ::fidl_next::RawWireUnion::decode_as::<
1938                ___D,
1939                ::fidl_next::ClientEnd<crate::DictionaryRouter, ::fidl_next::fuchsia::WireChannel>,
1940            >(raw, decoder)?,
1941
1942            11 => ::fidl_next::RawWireUnion::decode_as::<
1943                ___D,
1944                ::fidl_next::ClientEnd<crate::DirEntryRouter, ::fidl_next::fuchsia::WireChannel>,
1945            >(raw, decoder)?,
1946
1947            12 => ::fidl_next::RawWireUnion::decode_as::<
1948                ___D,
1949                ::fidl_next::ClientEnd<crate::DataRouter, ::fidl_next::fuchsia::WireChannel>,
1950            >(raw, decoder)?,
1951
1952            13 => ::fidl_next::RawWireUnion::decode_as::<
1953                ___D,
1954                ::fidl_next::ClientEnd<
1955                    crate::DirConnectorRouter,
1956                    ::fidl_next::fuchsia::WireChannel,
1957                >,
1958            >(raw, decoder)?,
1959
1960            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
1961            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
1962        }
1963
1964        Ok(())
1965    }
1966}
1967
1968impl<'de> ::core::fmt::Debug for WireOptionalCapability<'de> {
1969    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
1970        self.as_ref().fmt(f)
1971    }
1972}
1973
1974#[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"]
1975pub type CapabilityId = u64;
1976
1977/// The wire type corresponding to [`CapabilityId`].
1978pub type WireCapabilityId = ::fidl_next::WireU64;
1979
1980#[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"]
1981pub type NewCapabilityId = u64;
1982
1983/// The wire type corresponding to [`NewCapabilityId`].
1984pub type WireNewCapabilityId = ::fidl_next::WireU64;
1985
1986#[derive(Clone, Debug)]
1987#[repr(C)]
1988pub struct CapabilityStoreDuplicateRequest {
1989    pub id: u64,
1990
1991    pub dest_id: u64,
1992}
1993
1994impl ::fidl_next::Encodable for CapabilityStoreDuplicateRequest {
1995    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1996        Self,
1997        WireCapabilityStoreDuplicateRequest,
1998    > = unsafe {
1999        ::fidl_next::CopyOptimization::enable_if(
2000            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
2001                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2002        )
2003    };
2004
2005    type Encoded = WireCapabilityStoreDuplicateRequest;
2006}
2007
2008unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDuplicateRequest
2009where
2010    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2011{
2012    #[inline]
2013    fn encode(
2014        self,
2015        encoder: &mut ___E,
2016        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2017    ) -> Result<(), ::fidl_next::EncodeError> {
2018        ::fidl_next::munge! {
2019            let Self::Encoded {
2020                id,
2021                dest_id,
2022
2023            } = out;
2024        }
2025
2026        ::fidl_next::Encode::encode(self.id, encoder, id)?;
2027
2028        ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
2029
2030        Ok(())
2031    }
2032}
2033
2034unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDuplicateRequest
2035where
2036    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2037{
2038    #[inline]
2039    fn encode_ref(
2040        &self,
2041        encoder: &mut ___E,
2042        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2043    ) -> Result<(), ::fidl_next::EncodeError> {
2044        ::fidl_next::munge! {
2045            let Self::Encoded {
2046                id,
2047                dest_id,
2048
2049            } = out;
2050        }
2051
2052        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
2053
2054        ::fidl_next::EncodeRef::encode_ref(&self.dest_id, encoder, dest_id)?;
2055
2056        Ok(())
2057    }
2058}
2059
2060impl ::fidl_next::EncodableOption for CapabilityStoreDuplicateRequest {
2061    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDuplicateRequest>;
2062}
2063
2064unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDuplicateRequest
2065where
2066    ___E: ::fidl_next::Encoder + ?Sized,
2067    CapabilityStoreDuplicateRequest: ::fidl_next::Encode<___E>,
2068{
2069    #[inline]
2070    fn encode_option(
2071        this: Option<Self>,
2072        encoder: &mut ___E,
2073        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2074    ) -> Result<(), ::fidl_next::EncodeError> {
2075        if let Some(inner) = this {
2076            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2077            ::fidl_next::WireBox::encode_present(out);
2078        } else {
2079            ::fidl_next::WireBox::encode_absent(out);
2080        }
2081
2082        Ok(())
2083    }
2084}
2085
2086unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDuplicateRequest
2087where
2088    ___E: ::fidl_next::Encoder + ?Sized,
2089    CapabilityStoreDuplicateRequest: ::fidl_next::EncodeRef<___E>,
2090{
2091    #[inline]
2092    fn encode_option_ref(
2093        this: Option<&Self>,
2094        encoder: &mut ___E,
2095        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2096    ) -> Result<(), ::fidl_next::EncodeError> {
2097        if let Some(inner) = this {
2098            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2099            ::fidl_next::WireBox::encode_present(out);
2100        } else {
2101            ::fidl_next::WireBox::encode_absent(out);
2102        }
2103
2104        Ok(())
2105    }
2106}
2107
2108impl ::fidl_next::FromWire<WireCapabilityStoreDuplicateRequest>
2109    for CapabilityStoreDuplicateRequest
2110{
2111    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2112        WireCapabilityStoreDuplicateRequest,
2113        Self,
2114    > = unsafe {
2115        ::fidl_next::CopyOptimization::enable_if(
2116            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2117                .is_enabled()
2118                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2119                    .is_enabled(),
2120        )
2121    };
2122
2123    #[inline]
2124    fn from_wire(wire: WireCapabilityStoreDuplicateRequest) -> Self {
2125        Self {
2126            id: ::fidl_next::FromWire::from_wire(wire.id),
2127
2128            dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
2129        }
2130    }
2131}
2132
2133impl ::fidl_next::FromWireRef<WireCapabilityStoreDuplicateRequest>
2134    for CapabilityStoreDuplicateRequest
2135{
2136    #[inline]
2137    fn from_wire_ref(wire: &WireCapabilityStoreDuplicateRequest) -> Self {
2138        Self {
2139            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
2140
2141            dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
2142        }
2143    }
2144}
2145
2146/// The wire type corresponding to [`CapabilityStoreDuplicateRequest`].
2147#[derive(Clone, Debug)]
2148#[repr(C)]
2149pub struct WireCapabilityStoreDuplicateRequest {
2150    pub id: ::fidl_next::WireU64,
2151
2152    pub dest_id: ::fidl_next::WireU64,
2153}
2154
2155unsafe impl ::fidl_next::Wire for WireCapabilityStoreDuplicateRequest {
2156    type Decoded<'de> = WireCapabilityStoreDuplicateRequest;
2157
2158    #[inline]
2159    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2160}
2161
2162unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDuplicateRequest
2163where
2164    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2165{
2166    fn decode(
2167        slot: ::fidl_next::Slot<'_, Self>,
2168        decoder: &mut ___D,
2169    ) -> Result<(), ::fidl_next::DecodeError> {
2170        ::fidl_next::munge! {
2171            let Self {
2172                mut id,
2173                mut dest_id,
2174
2175            } = slot;
2176        }
2177
2178        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2179
2180        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
2181
2182        Ok(())
2183    }
2184}
2185
2186pub type CapabilityStoreDuplicateResponse = ();
2187
2188/// The wire type corresponding to [`CapabilityStoreDuplicateResponse`].
2189pub type WireCapabilityStoreDuplicateResponse = ();
2190
2191#[doc = " Error returned from methods in [CapabilityStore].\n"]
2192#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2193#[repr(u32)]
2194pub enum CapabilityStoreError {
2195    IdNotFound = 1,
2196    IdAlreadyExists = 2,
2197    BadCapability = 3,
2198    WrongType = 4,
2199    NotDuplicatable = 5,
2200    ItemNotFound = 6,
2201    ItemAlreadyExists = 7,
2202    InvalidKey = 8,
2203    InvalidArgs = 9,
2204    UnknownOrdinal_(u32),
2205}
2206
2207impl ::fidl_next::Encodable for CapabilityStoreError {
2208    type Encoded = WireCapabilityStoreError;
2209}
2210impl ::std::convert::From<u32> for CapabilityStoreError {
2211    fn from(value: u32) -> Self {
2212        match value {
2213            1 => Self::IdNotFound,
2214            2 => Self::IdAlreadyExists,
2215            3 => Self::BadCapability,
2216            4 => Self::WrongType,
2217            5 => Self::NotDuplicatable,
2218            6 => Self::ItemNotFound,
2219            7 => Self::ItemAlreadyExists,
2220            8 => Self::InvalidKey,
2221            9 => Self::InvalidArgs,
2222
2223            _ => Self::UnknownOrdinal_(value),
2224        }
2225    }
2226}
2227
2228unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreError
2229where
2230    ___E: ?Sized,
2231{
2232    #[inline]
2233    fn encode(
2234        self,
2235        encoder: &mut ___E,
2236        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2237    ) -> Result<(), ::fidl_next::EncodeError> {
2238        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
2239    }
2240}
2241
2242unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreError
2243where
2244    ___E: ?Sized,
2245{
2246    #[inline]
2247    fn encode_ref(
2248        &self,
2249        encoder: &mut ___E,
2250        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2251    ) -> Result<(), ::fidl_next::EncodeError> {
2252        ::fidl_next::munge!(let WireCapabilityStoreError { value } = out);
2253        let _ = value.write(::fidl_next::WireU32::from(match *self {
2254            Self::IdNotFound => 1,
2255
2256            Self::IdAlreadyExists => 2,
2257
2258            Self::BadCapability => 3,
2259
2260            Self::WrongType => 4,
2261
2262            Self::NotDuplicatable => 5,
2263
2264            Self::ItemNotFound => 6,
2265
2266            Self::ItemAlreadyExists => 7,
2267
2268            Self::InvalidKey => 8,
2269
2270            Self::InvalidArgs => 9,
2271
2272            Self::UnknownOrdinal_(value) => value,
2273        }));
2274
2275        Ok(())
2276    }
2277}
2278
2279impl ::core::convert::From<WireCapabilityStoreError> for CapabilityStoreError {
2280    fn from(wire: WireCapabilityStoreError) -> Self {
2281        match u32::from(wire.value) {
2282            1 => Self::IdNotFound,
2283
2284            2 => Self::IdAlreadyExists,
2285
2286            3 => Self::BadCapability,
2287
2288            4 => Self::WrongType,
2289
2290            5 => Self::NotDuplicatable,
2291
2292            6 => Self::ItemNotFound,
2293
2294            7 => Self::ItemAlreadyExists,
2295
2296            8 => Self::InvalidKey,
2297
2298            9 => Self::InvalidArgs,
2299
2300            value => Self::UnknownOrdinal_(value),
2301        }
2302    }
2303}
2304
2305impl ::fidl_next::FromWire<WireCapabilityStoreError> for CapabilityStoreError {
2306    #[inline]
2307    fn from_wire(wire: WireCapabilityStoreError) -> Self {
2308        Self::from(wire)
2309    }
2310}
2311
2312impl ::fidl_next::FromWireRef<WireCapabilityStoreError> for CapabilityStoreError {
2313    #[inline]
2314    fn from_wire_ref(wire: &WireCapabilityStoreError) -> Self {
2315        Self::from(*wire)
2316    }
2317}
2318
2319/// The wire type corresponding to [`CapabilityStoreError`].
2320#[derive(Clone, Copy, Debug, PartialEq, Eq)]
2321#[repr(transparent)]
2322pub struct WireCapabilityStoreError {
2323    value: ::fidl_next::WireU32,
2324}
2325
2326unsafe impl ::fidl_next::Wire for WireCapabilityStoreError {
2327    type Decoded<'de> = Self;
2328
2329    #[inline]
2330    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2331        // Wire enums have no padding
2332    }
2333}
2334
2335impl WireCapabilityStoreError {
2336    pub const ID_NOT_FOUND: WireCapabilityStoreError =
2337        WireCapabilityStoreError { value: ::fidl_next::WireU32(1) };
2338
2339    pub const ID_ALREADY_EXISTS: WireCapabilityStoreError =
2340        WireCapabilityStoreError { value: ::fidl_next::WireU32(2) };
2341
2342    pub const BAD_CAPABILITY: WireCapabilityStoreError =
2343        WireCapabilityStoreError { value: ::fidl_next::WireU32(3) };
2344
2345    pub const WRONG_TYPE: WireCapabilityStoreError =
2346        WireCapabilityStoreError { value: ::fidl_next::WireU32(4) };
2347
2348    pub const NOT_DUPLICATABLE: WireCapabilityStoreError =
2349        WireCapabilityStoreError { value: ::fidl_next::WireU32(5) };
2350
2351    pub const ITEM_NOT_FOUND: WireCapabilityStoreError =
2352        WireCapabilityStoreError { value: ::fidl_next::WireU32(6) };
2353
2354    pub const ITEM_ALREADY_EXISTS: WireCapabilityStoreError =
2355        WireCapabilityStoreError { value: ::fidl_next::WireU32(7) };
2356
2357    pub const INVALID_KEY: WireCapabilityStoreError =
2358        WireCapabilityStoreError { value: ::fidl_next::WireU32(8) };
2359
2360    pub const INVALID_ARGS: WireCapabilityStoreError =
2361        WireCapabilityStoreError { value: ::fidl_next::WireU32(9) };
2362}
2363
2364unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreError
2365where
2366    ___D: ?Sized,
2367{
2368    fn decode(
2369        slot: ::fidl_next::Slot<'_, Self>,
2370        _: &mut ___D,
2371    ) -> Result<(), ::fidl_next::DecodeError> {
2372        Ok(())
2373    }
2374}
2375
2376impl ::core::convert::From<CapabilityStoreError> for WireCapabilityStoreError {
2377    fn from(natural: CapabilityStoreError) -> Self {
2378        match natural {
2379            CapabilityStoreError::IdNotFound => WireCapabilityStoreError::ID_NOT_FOUND,
2380
2381            CapabilityStoreError::IdAlreadyExists => WireCapabilityStoreError::ID_ALREADY_EXISTS,
2382
2383            CapabilityStoreError::BadCapability => WireCapabilityStoreError::BAD_CAPABILITY,
2384
2385            CapabilityStoreError::WrongType => WireCapabilityStoreError::WRONG_TYPE,
2386
2387            CapabilityStoreError::NotDuplicatable => WireCapabilityStoreError::NOT_DUPLICATABLE,
2388
2389            CapabilityStoreError::ItemNotFound => WireCapabilityStoreError::ITEM_NOT_FOUND,
2390
2391            CapabilityStoreError::ItemAlreadyExists => {
2392                WireCapabilityStoreError::ITEM_ALREADY_EXISTS
2393            }
2394
2395            CapabilityStoreError::InvalidKey => WireCapabilityStoreError::INVALID_KEY,
2396
2397            CapabilityStoreError::InvalidArgs => WireCapabilityStoreError::INVALID_ARGS,
2398
2399            CapabilityStoreError::UnknownOrdinal_(value) => {
2400                WireCapabilityStoreError { value: ::fidl_next::WireU32::from(value) }
2401            }
2402        }
2403    }
2404}
2405
2406#[derive(Clone, Debug)]
2407#[repr(C)]
2408pub struct CapabilityStoreDropRequest {
2409    pub id: u64,
2410}
2411
2412impl ::fidl_next::Encodable for CapabilityStoreDropRequest {
2413    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireCapabilityStoreDropRequest> = unsafe {
2414        ::fidl_next::CopyOptimization::enable_if(
2415            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2416        )
2417    };
2418
2419    type Encoded = WireCapabilityStoreDropRequest;
2420}
2421
2422unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDropRequest
2423where
2424    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2425{
2426    #[inline]
2427    fn encode(
2428        self,
2429        encoder: &mut ___E,
2430        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2431    ) -> Result<(), ::fidl_next::EncodeError> {
2432        ::fidl_next::munge! {
2433            let Self::Encoded {
2434                id,
2435
2436            } = out;
2437        }
2438
2439        ::fidl_next::Encode::encode(self.id, encoder, id)?;
2440
2441        Ok(())
2442    }
2443}
2444
2445unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDropRequest
2446where
2447    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2448{
2449    #[inline]
2450    fn encode_ref(
2451        &self,
2452        encoder: &mut ___E,
2453        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2454    ) -> Result<(), ::fidl_next::EncodeError> {
2455        ::fidl_next::munge! {
2456            let Self::Encoded {
2457                id,
2458
2459            } = out;
2460        }
2461
2462        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
2463
2464        Ok(())
2465    }
2466}
2467
2468impl ::fidl_next::EncodableOption for CapabilityStoreDropRequest {
2469    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDropRequest>;
2470}
2471
2472unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDropRequest
2473where
2474    ___E: ::fidl_next::Encoder + ?Sized,
2475    CapabilityStoreDropRequest: ::fidl_next::Encode<___E>,
2476{
2477    #[inline]
2478    fn encode_option(
2479        this: Option<Self>,
2480        encoder: &mut ___E,
2481        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2482    ) -> Result<(), ::fidl_next::EncodeError> {
2483        if let Some(inner) = this {
2484            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2485            ::fidl_next::WireBox::encode_present(out);
2486        } else {
2487            ::fidl_next::WireBox::encode_absent(out);
2488        }
2489
2490        Ok(())
2491    }
2492}
2493
2494unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDropRequest
2495where
2496    ___E: ::fidl_next::Encoder + ?Sized,
2497    CapabilityStoreDropRequest: ::fidl_next::EncodeRef<___E>,
2498{
2499    #[inline]
2500    fn encode_option_ref(
2501        this: Option<&Self>,
2502        encoder: &mut ___E,
2503        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2504    ) -> Result<(), ::fidl_next::EncodeError> {
2505        if let Some(inner) = this {
2506            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2507            ::fidl_next::WireBox::encode_present(out);
2508        } else {
2509            ::fidl_next::WireBox::encode_absent(out);
2510        }
2511
2512        Ok(())
2513    }
2514}
2515
2516impl ::fidl_next::FromWire<WireCapabilityStoreDropRequest> for CapabilityStoreDropRequest {
2517    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireCapabilityStoreDropRequest, Self> = unsafe {
2518        ::fidl_next::CopyOptimization::enable_if(
2519            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2520                .is_enabled(),
2521        )
2522    };
2523
2524    #[inline]
2525    fn from_wire(wire: WireCapabilityStoreDropRequest) -> Self {
2526        Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
2527    }
2528}
2529
2530impl ::fidl_next::FromWireRef<WireCapabilityStoreDropRequest> for CapabilityStoreDropRequest {
2531    #[inline]
2532    fn from_wire_ref(wire: &WireCapabilityStoreDropRequest) -> Self {
2533        Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
2534    }
2535}
2536
2537/// The wire type corresponding to [`CapabilityStoreDropRequest`].
2538#[derive(Clone, Debug)]
2539#[repr(C)]
2540pub struct WireCapabilityStoreDropRequest {
2541    pub id: ::fidl_next::WireU64,
2542}
2543
2544unsafe impl ::fidl_next::Wire for WireCapabilityStoreDropRequest {
2545    type Decoded<'de> = WireCapabilityStoreDropRequest;
2546
2547    #[inline]
2548    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2549}
2550
2551unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDropRequest
2552where
2553    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2554{
2555    fn decode(
2556        slot: ::fidl_next::Slot<'_, Self>,
2557        decoder: &mut ___D,
2558    ) -> Result<(), ::fidl_next::DecodeError> {
2559        ::fidl_next::munge! {
2560            let Self {
2561                mut id,
2562
2563            } = slot;
2564        }
2565
2566        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2567
2568        Ok(())
2569    }
2570}
2571
2572pub type CapabilityStoreDropResponse = ();
2573
2574/// The wire type corresponding to [`CapabilityStoreDropResponse`].
2575pub type WireCapabilityStoreDropResponse = ();
2576
2577#[derive(Clone, Debug)]
2578#[repr(C)]
2579pub struct CapabilityStoreExportRequest {
2580    pub id: u64,
2581}
2582
2583impl ::fidl_next::Encodable for CapabilityStoreExportRequest {
2584    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireCapabilityStoreExportRequest> = unsafe {
2585        ::fidl_next::CopyOptimization::enable_if(
2586            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
2587        )
2588    };
2589
2590    type Encoded = WireCapabilityStoreExportRequest;
2591}
2592
2593unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreExportRequest
2594where
2595    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2596{
2597    #[inline]
2598    fn encode(
2599        self,
2600        encoder: &mut ___E,
2601        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2602    ) -> Result<(), ::fidl_next::EncodeError> {
2603        ::fidl_next::munge! {
2604            let Self::Encoded {
2605                id,
2606
2607            } = out;
2608        }
2609
2610        ::fidl_next::Encode::encode(self.id, encoder, id)?;
2611
2612        Ok(())
2613    }
2614}
2615
2616unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreExportRequest
2617where
2618    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2619{
2620    #[inline]
2621    fn encode_ref(
2622        &self,
2623        encoder: &mut ___E,
2624        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2625    ) -> Result<(), ::fidl_next::EncodeError> {
2626        ::fidl_next::munge! {
2627            let Self::Encoded {
2628                id,
2629
2630            } = out;
2631        }
2632
2633        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
2634
2635        Ok(())
2636    }
2637}
2638
2639impl ::fidl_next::EncodableOption for CapabilityStoreExportRequest {
2640    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreExportRequest>;
2641}
2642
2643unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreExportRequest
2644where
2645    ___E: ::fidl_next::Encoder + ?Sized,
2646    CapabilityStoreExportRequest: ::fidl_next::Encode<___E>,
2647{
2648    #[inline]
2649    fn encode_option(
2650        this: Option<Self>,
2651        encoder: &mut ___E,
2652        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2653    ) -> Result<(), ::fidl_next::EncodeError> {
2654        if let Some(inner) = this {
2655            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2656            ::fidl_next::WireBox::encode_present(out);
2657        } else {
2658            ::fidl_next::WireBox::encode_absent(out);
2659        }
2660
2661        Ok(())
2662    }
2663}
2664
2665unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreExportRequest
2666where
2667    ___E: ::fidl_next::Encoder + ?Sized,
2668    CapabilityStoreExportRequest: ::fidl_next::EncodeRef<___E>,
2669{
2670    #[inline]
2671    fn encode_option_ref(
2672        this: Option<&Self>,
2673        encoder: &mut ___E,
2674        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2675    ) -> Result<(), ::fidl_next::EncodeError> {
2676        if let Some(inner) = this {
2677            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2678            ::fidl_next::WireBox::encode_present(out);
2679        } else {
2680            ::fidl_next::WireBox::encode_absent(out);
2681        }
2682
2683        Ok(())
2684    }
2685}
2686
2687impl ::fidl_next::FromWire<WireCapabilityStoreExportRequest> for CapabilityStoreExportRequest {
2688    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireCapabilityStoreExportRequest, Self> = unsafe {
2689        ::fidl_next::CopyOptimization::enable_if(
2690            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
2691                .is_enabled(),
2692        )
2693    };
2694
2695    #[inline]
2696    fn from_wire(wire: WireCapabilityStoreExportRequest) -> Self {
2697        Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
2698    }
2699}
2700
2701impl ::fidl_next::FromWireRef<WireCapabilityStoreExportRequest> for CapabilityStoreExportRequest {
2702    #[inline]
2703    fn from_wire_ref(wire: &WireCapabilityStoreExportRequest) -> Self {
2704        Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
2705    }
2706}
2707
2708/// The wire type corresponding to [`CapabilityStoreExportRequest`].
2709#[derive(Clone, Debug)]
2710#[repr(C)]
2711pub struct WireCapabilityStoreExportRequest {
2712    pub id: ::fidl_next::WireU64,
2713}
2714
2715unsafe impl ::fidl_next::Wire for WireCapabilityStoreExportRequest {
2716    type Decoded<'de> = WireCapabilityStoreExportRequest;
2717
2718    #[inline]
2719    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
2720}
2721
2722unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreExportRequest
2723where
2724    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2725{
2726    fn decode(
2727        slot: ::fidl_next::Slot<'_, Self>,
2728        decoder: &mut ___D,
2729    ) -> Result<(), ::fidl_next::DecodeError> {
2730        ::fidl_next::munge! {
2731            let Self {
2732                mut id,
2733
2734            } = slot;
2735        }
2736
2737        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2738
2739        Ok(())
2740    }
2741}
2742
2743pub type CapabilityStoreImportResponse = ();
2744
2745/// The wire type corresponding to [`CapabilityStoreImportResponse`].
2746pub type WireCapabilityStoreImportResponse = ();
2747
2748#[derive(Debug)]
2749pub struct CapabilityStoreConnectorCreateRequest {
2750    pub id: u64,
2751
2752    pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::fuchsia::zx::Channel>,
2753}
2754
2755impl ::fidl_next::Encodable for CapabilityStoreConnectorCreateRequest {
2756    type Encoded = WireCapabilityStoreConnectorCreateRequest;
2757}
2758
2759unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreConnectorCreateRequest
2760where
2761    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2762    ___E: ::fidl_next::fuchsia::HandleEncoder,
2763{
2764    #[inline]
2765    fn encode(
2766        self,
2767        encoder: &mut ___E,
2768        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2769    ) -> Result<(), ::fidl_next::EncodeError> {
2770        ::fidl_next::munge! {
2771            let Self::Encoded {
2772                id,
2773                receiver,
2774
2775            } = out;
2776        }
2777
2778        ::fidl_next::Encode::encode(self.id, encoder, id)?;
2779
2780        ::fidl_next::Encode::encode(self.receiver, encoder, receiver)?;
2781
2782        Ok(())
2783    }
2784}
2785
2786impl ::fidl_next::EncodableOption for CapabilityStoreConnectorCreateRequest {
2787    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreConnectorCreateRequest>;
2788}
2789
2790unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreConnectorCreateRequest
2791where
2792    ___E: ::fidl_next::Encoder + ?Sized,
2793    CapabilityStoreConnectorCreateRequest: ::fidl_next::Encode<___E>,
2794{
2795    #[inline]
2796    fn encode_option(
2797        this: Option<Self>,
2798        encoder: &mut ___E,
2799        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2800    ) -> Result<(), ::fidl_next::EncodeError> {
2801        if let Some(inner) = this {
2802            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2803            ::fidl_next::WireBox::encode_present(out);
2804        } else {
2805            ::fidl_next::WireBox::encode_absent(out);
2806        }
2807
2808        Ok(())
2809    }
2810}
2811
2812impl ::fidl_next::FromWire<WireCapabilityStoreConnectorCreateRequest>
2813    for CapabilityStoreConnectorCreateRequest
2814{
2815    #[inline]
2816    fn from_wire(wire: WireCapabilityStoreConnectorCreateRequest) -> Self {
2817        Self {
2818            id: ::fidl_next::FromWire::from_wire(wire.id),
2819
2820            receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
2821        }
2822    }
2823}
2824
2825/// The wire type corresponding to [`CapabilityStoreConnectorCreateRequest`].
2826#[derive(Debug)]
2827#[repr(C)]
2828pub struct WireCapabilityStoreConnectorCreateRequest {
2829    pub id: ::fidl_next::WireU64,
2830
2831    pub receiver: ::fidl_next::ClientEnd<crate::Receiver, ::fidl_next::fuchsia::WireChannel>,
2832}
2833
2834unsafe impl ::fidl_next::Wire for WireCapabilityStoreConnectorCreateRequest {
2835    type Decoded<'de> = WireCapabilityStoreConnectorCreateRequest;
2836
2837    #[inline]
2838    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2839        unsafe {
2840            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2841        }
2842    }
2843}
2844
2845unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreConnectorCreateRequest
2846where
2847    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2848    ___D: ::fidl_next::fuchsia::HandleDecoder,
2849{
2850    fn decode(
2851        slot: ::fidl_next::Slot<'_, Self>,
2852        decoder: &mut ___D,
2853    ) -> Result<(), ::fidl_next::DecodeError> {
2854        ::fidl_next::munge! {
2855            let Self {
2856                mut id,
2857                mut receiver,
2858
2859            } = slot;
2860        }
2861
2862        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2863
2864        ::fidl_next::Decode::decode(receiver.as_mut(), decoder)?;
2865
2866        Ok(())
2867    }
2868}
2869
2870pub type CapabilityStoreConnectorCreateResponse = ();
2871
2872/// The wire type corresponding to [`CapabilityStoreConnectorCreateResponse`].
2873pub type WireCapabilityStoreConnectorCreateResponse = ();
2874
2875#[derive(Debug)]
2876pub struct CapabilityStoreConnectorOpenRequest {
2877    pub id: u64,
2878
2879    pub server_end: ::fidl_next::fuchsia::zx::Channel,
2880}
2881
2882impl ::fidl_next::Encodable for CapabilityStoreConnectorOpenRequest {
2883    type Encoded = WireCapabilityStoreConnectorOpenRequest;
2884}
2885
2886unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreConnectorOpenRequest
2887where
2888    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2889    ___E: ::fidl_next::fuchsia::HandleEncoder,
2890{
2891    #[inline]
2892    fn encode(
2893        self,
2894        encoder: &mut ___E,
2895        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
2896    ) -> Result<(), ::fidl_next::EncodeError> {
2897        ::fidl_next::munge! {
2898            let Self::Encoded {
2899                id,
2900                server_end,
2901
2902            } = out;
2903        }
2904
2905        ::fidl_next::Encode::encode(self.id, encoder, id)?;
2906
2907        ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
2908
2909        Ok(())
2910    }
2911}
2912
2913impl ::fidl_next::EncodableOption for CapabilityStoreConnectorOpenRequest {
2914    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreConnectorOpenRequest>;
2915}
2916
2917unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreConnectorOpenRequest
2918where
2919    ___E: ::fidl_next::Encoder + ?Sized,
2920    CapabilityStoreConnectorOpenRequest: ::fidl_next::Encode<___E>,
2921{
2922    #[inline]
2923    fn encode_option(
2924        this: Option<Self>,
2925        encoder: &mut ___E,
2926        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
2927    ) -> Result<(), ::fidl_next::EncodeError> {
2928        if let Some(inner) = this {
2929            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2930            ::fidl_next::WireBox::encode_present(out);
2931        } else {
2932            ::fidl_next::WireBox::encode_absent(out);
2933        }
2934
2935        Ok(())
2936    }
2937}
2938
2939impl ::fidl_next::FromWire<WireCapabilityStoreConnectorOpenRequest>
2940    for CapabilityStoreConnectorOpenRequest
2941{
2942    #[inline]
2943    fn from_wire(wire: WireCapabilityStoreConnectorOpenRequest) -> Self {
2944        Self {
2945            id: ::fidl_next::FromWire::from_wire(wire.id),
2946
2947            server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
2948        }
2949    }
2950}
2951
2952/// The wire type corresponding to [`CapabilityStoreConnectorOpenRequest`].
2953#[derive(Debug)]
2954#[repr(C)]
2955pub struct WireCapabilityStoreConnectorOpenRequest {
2956    pub id: ::fidl_next::WireU64,
2957
2958    pub server_end: ::fidl_next::fuchsia::WireChannel,
2959}
2960
2961unsafe impl ::fidl_next::Wire for WireCapabilityStoreConnectorOpenRequest {
2962    type Decoded<'de> = WireCapabilityStoreConnectorOpenRequest;
2963
2964    #[inline]
2965    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2966        unsafe {
2967            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
2968        }
2969    }
2970}
2971
2972unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreConnectorOpenRequest
2973where
2974    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
2975    ___D: ::fidl_next::fuchsia::HandleDecoder,
2976{
2977    fn decode(
2978        slot: ::fidl_next::Slot<'_, Self>,
2979        decoder: &mut ___D,
2980    ) -> Result<(), ::fidl_next::DecodeError> {
2981        ::fidl_next::munge! {
2982            let Self {
2983                mut id,
2984                mut server_end,
2985
2986            } = slot;
2987        }
2988
2989        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
2990
2991        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
2992
2993        Ok(())
2994    }
2995}
2996
2997pub type CapabilityStoreConnectorOpenResponse = ();
2998
2999/// The wire type corresponding to [`CapabilityStoreConnectorOpenResponse`].
3000pub type WireCapabilityStoreConnectorOpenResponse = ();
3001
3002pub type CapabilityStoreDirConnectorCreateResponse = ();
3003
3004/// The wire type corresponding to [`CapabilityStoreDirConnectorCreateResponse`].
3005pub type WireCapabilityStoreDirConnectorCreateResponse = ();
3006
3007pub type CapabilityStoreDirConnectorOpenResponse = ();
3008
3009/// The wire type corresponding to [`CapabilityStoreDirConnectorOpenResponse`].
3010pub type WireCapabilityStoreDirConnectorOpenResponse = ();
3011
3012#[derive(Clone, Debug)]
3013#[repr(C)]
3014pub struct CapabilityStoreDictionaryCreateRequest {
3015    pub id: u64,
3016}
3017
3018impl ::fidl_next::Encodable for CapabilityStoreDictionaryCreateRequest {
3019    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3020        Self,
3021        WireCapabilityStoreDictionaryCreateRequest,
3022    > = unsafe {
3023        ::fidl_next::CopyOptimization::enable_if(
3024            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
3025        )
3026    };
3027
3028    type Encoded = WireCapabilityStoreDictionaryCreateRequest;
3029}
3030
3031unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryCreateRequest
3032where
3033    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3034{
3035    #[inline]
3036    fn encode(
3037        self,
3038        encoder: &mut ___E,
3039        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3040    ) -> Result<(), ::fidl_next::EncodeError> {
3041        ::fidl_next::munge! {
3042            let Self::Encoded {
3043                id,
3044
3045            } = out;
3046        }
3047
3048        ::fidl_next::Encode::encode(self.id, encoder, id)?;
3049
3050        Ok(())
3051    }
3052}
3053
3054unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDictionaryCreateRequest
3055where
3056    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3057{
3058    #[inline]
3059    fn encode_ref(
3060        &self,
3061        encoder: &mut ___E,
3062        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3063    ) -> Result<(), ::fidl_next::EncodeError> {
3064        ::fidl_next::munge! {
3065            let Self::Encoded {
3066                id,
3067
3068            } = out;
3069        }
3070
3071        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
3072
3073        Ok(())
3074    }
3075}
3076
3077impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryCreateRequest {
3078    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryCreateRequest>;
3079}
3080
3081unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryCreateRequest
3082where
3083    ___E: ::fidl_next::Encoder + ?Sized,
3084    CapabilityStoreDictionaryCreateRequest: ::fidl_next::Encode<___E>,
3085{
3086    #[inline]
3087    fn encode_option(
3088        this: Option<Self>,
3089        encoder: &mut ___E,
3090        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3091    ) -> Result<(), ::fidl_next::EncodeError> {
3092        if let Some(inner) = this {
3093            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3094            ::fidl_next::WireBox::encode_present(out);
3095        } else {
3096            ::fidl_next::WireBox::encode_absent(out);
3097        }
3098
3099        Ok(())
3100    }
3101}
3102
3103unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDictionaryCreateRequest
3104where
3105    ___E: ::fidl_next::Encoder + ?Sized,
3106    CapabilityStoreDictionaryCreateRequest: ::fidl_next::EncodeRef<___E>,
3107{
3108    #[inline]
3109    fn encode_option_ref(
3110        this: Option<&Self>,
3111        encoder: &mut ___E,
3112        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3113    ) -> Result<(), ::fidl_next::EncodeError> {
3114        if let Some(inner) = this {
3115            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3116            ::fidl_next::WireBox::encode_present(out);
3117        } else {
3118            ::fidl_next::WireBox::encode_absent(out);
3119        }
3120
3121        Ok(())
3122    }
3123}
3124
3125impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryCreateRequest>
3126    for CapabilityStoreDictionaryCreateRequest
3127{
3128    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
3129        WireCapabilityStoreDictionaryCreateRequest,
3130        Self,
3131    > = unsafe {
3132        ::fidl_next::CopyOptimization::enable_if(
3133            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
3134                .is_enabled(),
3135        )
3136    };
3137
3138    #[inline]
3139    fn from_wire(wire: WireCapabilityStoreDictionaryCreateRequest) -> Self {
3140        Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
3141    }
3142}
3143
3144impl ::fidl_next::FromWireRef<WireCapabilityStoreDictionaryCreateRequest>
3145    for CapabilityStoreDictionaryCreateRequest
3146{
3147    #[inline]
3148    fn from_wire_ref(wire: &WireCapabilityStoreDictionaryCreateRequest) -> Self {
3149        Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
3150    }
3151}
3152
3153/// The wire type corresponding to [`CapabilityStoreDictionaryCreateRequest`].
3154#[derive(Clone, Debug)]
3155#[repr(C)]
3156pub struct WireCapabilityStoreDictionaryCreateRequest {
3157    pub id: ::fidl_next::WireU64,
3158}
3159
3160unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryCreateRequest {
3161    type Decoded<'de> = WireCapabilityStoreDictionaryCreateRequest;
3162
3163    #[inline]
3164    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3165}
3166
3167unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryCreateRequest
3168where
3169    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3170{
3171    fn decode(
3172        slot: ::fidl_next::Slot<'_, Self>,
3173        decoder: &mut ___D,
3174    ) -> Result<(), ::fidl_next::DecodeError> {
3175        ::fidl_next::munge! {
3176            let Self {
3177                mut id,
3178
3179            } = slot;
3180        }
3181
3182        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3183
3184        Ok(())
3185    }
3186}
3187
3188pub type CapabilityStoreDictionaryCreateResponse = ();
3189
3190/// The wire type corresponding to [`CapabilityStoreDictionaryCreateResponse`].
3191pub type WireCapabilityStoreDictionaryCreateResponse = ();
3192
3193#[derive(Debug)]
3194pub struct CapabilityStoreDictionaryLegacyImportRequest {
3195    pub id: u64,
3196
3197    pub client_end: ::fidl_next::fuchsia::zx::Channel,
3198}
3199
3200impl ::fidl_next::Encodable for CapabilityStoreDictionaryLegacyImportRequest {
3201    type Encoded = WireCapabilityStoreDictionaryLegacyImportRequest;
3202}
3203
3204unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryLegacyImportRequest
3205where
3206    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3207    ___E: ::fidl_next::fuchsia::HandleEncoder,
3208{
3209    #[inline]
3210    fn encode(
3211        self,
3212        encoder: &mut ___E,
3213        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3214    ) -> Result<(), ::fidl_next::EncodeError> {
3215        ::fidl_next::munge! {
3216            let Self::Encoded {
3217                id,
3218                client_end,
3219
3220            } = out;
3221        }
3222
3223        ::fidl_next::Encode::encode(self.id, encoder, id)?;
3224
3225        ::fidl_next::Encode::encode(self.client_end, encoder, client_end)?;
3226
3227        Ok(())
3228    }
3229}
3230
3231impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryLegacyImportRequest {
3232    type EncodedOption =
3233        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryLegacyImportRequest>;
3234}
3235
3236unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryLegacyImportRequest
3237where
3238    ___E: ::fidl_next::Encoder + ?Sized,
3239    CapabilityStoreDictionaryLegacyImportRequest: ::fidl_next::Encode<___E>,
3240{
3241    #[inline]
3242    fn encode_option(
3243        this: Option<Self>,
3244        encoder: &mut ___E,
3245        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3246    ) -> Result<(), ::fidl_next::EncodeError> {
3247        if let Some(inner) = this {
3248            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3249            ::fidl_next::WireBox::encode_present(out);
3250        } else {
3251            ::fidl_next::WireBox::encode_absent(out);
3252        }
3253
3254        Ok(())
3255    }
3256}
3257
3258impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryLegacyImportRequest>
3259    for CapabilityStoreDictionaryLegacyImportRequest
3260{
3261    #[inline]
3262    fn from_wire(wire: WireCapabilityStoreDictionaryLegacyImportRequest) -> Self {
3263        Self {
3264            id: ::fidl_next::FromWire::from_wire(wire.id),
3265
3266            client_end: ::fidl_next::FromWire::from_wire(wire.client_end),
3267        }
3268    }
3269}
3270
3271/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyImportRequest`].
3272#[derive(Debug)]
3273#[repr(C)]
3274pub struct WireCapabilityStoreDictionaryLegacyImportRequest {
3275    pub id: ::fidl_next::WireU64,
3276
3277    pub client_end: ::fidl_next::fuchsia::WireChannel,
3278}
3279
3280unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryLegacyImportRequest {
3281    type Decoded<'de> = WireCapabilityStoreDictionaryLegacyImportRequest;
3282
3283    #[inline]
3284    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3285        unsafe {
3286            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
3287        }
3288    }
3289}
3290
3291unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryLegacyImportRequest
3292where
3293    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3294    ___D: ::fidl_next::fuchsia::HandleDecoder,
3295{
3296    fn decode(
3297        slot: ::fidl_next::Slot<'_, Self>,
3298        decoder: &mut ___D,
3299    ) -> Result<(), ::fidl_next::DecodeError> {
3300        ::fidl_next::munge! {
3301            let Self {
3302                mut id,
3303                mut client_end,
3304
3305            } = slot;
3306        }
3307
3308        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3309
3310        ::fidl_next::Decode::decode(client_end.as_mut(), decoder)?;
3311
3312        Ok(())
3313    }
3314}
3315
3316pub type CapabilityStoreDictionaryLegacyImportResponse = ();
3317
3318/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyImportResponse`].
3319pub type WireCapabilityStoreDictionaryLegacyImportResponse = ();
3320
3321#[derive(Debug)]
3322pub struct CapabilityStoreDictionaryLegacyExportRequest {
3323    pub id: u64,
3324
3325    pub server_end: ::fidl_next::fuchsia::zx::Channel,
3326}
3327
3328impl ::fidl_next::Encodable for CapabilityStoreDictionaryLegacyExportRequest {
3329    type Encoded = WireCapabilityStoreDictionaryLegacyExportRequest;
3330}
3331
3332unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryLegacyExportRequest
3333where
3334    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3335    ___E: ::fidl_next::fuchsia::HandleEncoder,
3336{
3337    #[inline]
3338    fn encode(
3339        self,
3340        encoder: &mut ___E,
3341        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3342    ) -> Result<(), ::fidl_next::EncodeError> {
3343        ::fidl_next::munge! {
3344            let Self::Encoded {
3345                id,
3346                server_end,
3347
3348            } = out;
3349        }
3350
3351        ::fidl_next::Encode::encode(self.id, encoder, id)?;
3352
3353        ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
3354
3355        Ok(())
3356    }
3357}
3358
3359impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryLegacyExportRequest {
3360    type EncodedOption =
3361        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryLegacyExportRequest>;
3362}
3363
3364unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryLegacyExportRequest
3365where
3366    ___E: ::fidl_next::Encoder + ?Sized,
3367    CapabilityStoreDictionaryLegacyExportRequest: ::fidl_next::Encode<___E>,
3368{
3369    #[inline]
3370    fn encode_option(
3371        this: Option<Self>,
3372        encoder: &mut ___E,
3373        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3374    ) -> Result<(), ::fidl_next::EncodeError> {
3375        if let Some(inner) = this {
3376            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3377            ::fidl_next::WireBox::encode_present(out);
3378        } else {
3379            ::fidl_next::WireBox::encode_absent(out);
3380        }
3381
3382        Ok(())
3383    }
3384}
3385
3386impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryLegacyExportRequest>
3387    for CapabilityStoreDictionaryLegacyExportRequest
3388{
3389    #[inline]
3390    fn from_wire(wire: WireCapabilityStoreDictionaryLegacyExportRequest) -> Self {
3391        Self {
3392            id: ::fidl_next::FromWire::from_wire(wire.id),
3393
3394            server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
3395        }
3396    }
3397}
3398
3399/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyExportRequest`].
3400#[derive(Debug)]
3401#[repr(C)]
3402pub struct WireCapabilityStoreDictionaryLegacyExportRequest {
3403    pub id: ::fidl_next::WireU64,
3404
3405    pub server_end: ::fidl_next::fuchsia::WireChannel,
3406}
3407
3408unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryLegacyExportRequest {
3409    type Decoded<'de> = WireCapabilityStoreDictionaryLegacyExportRequest;
3410
3411    #[inline]
3412    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
3413        unsafe {
3414            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
3415        }
3416    }
3417}
3418
3419unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryLegacyExportRequest
3420where
3421    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3422    ___D: ::fidl_next::fuchsia::HandleDecoder,
3423{
3424    fn decode(
3425        slot: ::fidl_next::Slot<'_, Self>,
3426        decoder: &mut ___D,
3427    ) -> Result<(), ::fidl_next::DecodeError> {
3428        ::fidl_next::munge! {
3429            let Self {
3430                mut id,
3431                mut server_end,
3432
3433            } = slot;
3434        }
3435
3436        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3437
3438        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
3439
3440        Ok(())
3441    }
3442}
3443
3444pub type CapabilityStoreDictionaryLegacyExportResponse = ();
3445
3446/// The wire type corresponding to [`CapabilityStoreDictionaryLegacyExportResponse`].
3447pub type WireCapabilityStoreDictionaryLegacyExportResponse = ();
3448
3449#[doc = " The maximum length of a dictionary key. This should coincide with\n fuchsia.component.MAX_NAME_LENGTH.\n"]
3450pub const MAX_NAME_LENGTH: u64 = 255;
3451
3452#[doc = " The key of a [`DictionaryItem`]. The constraints for valid keys are documented at\n https://fuchsia.dev/reference/cml#names.\n"]
3453pub type DictionaryKey = String;
3454
3455/// The wire type corresponding to [`DictionaryKey`].
3456pub type WireDictionaryKey<'de> = ::fidl_next::WireString<'de>;
3457
3458#[doc = " A key-value pair in a [`DictionaryRef`].\n"]
3459#[derive(Clone, Debug)]
3460pub struct DictionaryItem {
3461    pub key: String,
3462
3463    pub value: u64,
3464}
3465
3466impl ::fidl_next::Encodable for DictionaryItem {
3467    type Encoded = WireDictionaryItem<'static>;
3468}
3469
3470unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryItem
3471where
3472    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3473    ___E: ::fidl_next::Encoder,
3474{
3475    #[inline]
3476    fn encode(
3477        self,
3478        encoder: &mut ___E,
3479        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3480    ) -> Result<(), ::fidl_next::EncodeError> {
3481        ::fidl_next::munge! {
3482            let Self::Encoded {
3483                key,
3484                value,
3485
3486            } = out;
3487        }
3488
3489        ::fidl_next::Encode::encode(self.key, encoder, key)?;
3490
3491        ::fidl_next::Encode::encode(self.value, encoder, value)?;
3492
3493        Ok(())
3494    }
3495}
3496
3497unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DictionaryItem
3498where
3499    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3500    ___E: ::fidl_next::Encoder,
3501{
3502    #[inline]
3503    fn encode_ref(
3504        &self,
3505        encoder: &mut ___E,
3506        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3507    ) -> Result<(), ::fidl_next::EncodeError> {
3508        ::fidl_next::munge! {
3509            let Self::Encoded {
3510                key,
3511                value,
3512
3513            } = out;
3514        }
3515
3516        ::fidl_next::EncodeRef::encode_ref(&self.key, encoder, key)?;
3517
3518        ::fidl_next::EncodeRef::encode_ref(&self.value, encoder, value)?;
3519
3520        Ok(())
3521    }
3522}
3523
3524impl ::fidl_next::EncodableOption for DictionaryItem {
3525    type EncodedOption = ::fidl_next::WireBox<'static, WireDictionaryItem<'static>>;
3526}
3527
3528unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryItem
3529where
3530    ___E: ::fidl_next::Encoder + ?Sized,
3531    DictionaryItem: ::fidl_next::Encode<___E>,
3532{
3533    #[inline]
3534    fn encode_option(
3535        this: Option<Self>,
3536        encoder: &mut ___E,
3537        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3538    ) -> Result<(), ::fidl_next::EncodeError> {
3539        if let Some(inner) = this {
3540            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3541            ::fidl_next::WireBox::encode_present(out);
3542        } else {
3543            ::fidl_next::WireBox::encode_absent(out);
3544        }
3545
3546        Ok(())
3547    }
3548}
3549
3550unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DictionaryItem
3551where
3552    ___E: ::fidl_next::Encoder + ?Sized,
3553    DictionaryItem: ::fidl_next::EncodeRef<___E>,
3554{
3555    #[inline]
3556    fn encode_option_ref(
3557        this: Option<&Self>,
3558        encoder: &mut ___E,
3559        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3560    ) -> Result<(), ::fidl_next::EncodeError> {
3561        if let Some(inner) = this {
3562            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3563            ::fidl_next::WireBox::encode_present(out);
3564        } else {
3565            ::fidl_next::WireBox::encode_absent(out);
3566        }
3567
3568        Ok(())
3569    }
3570}
3571
3572impl<'de> ::fidl_next::FromWire<WireDictionaryItem<'de>> for DictionaryItem {
3573    #[inline]
3574    fn from_wire(wire: WireDictionaryItem<'de>) -> Self {
3575        Self {
3576            key: ::fidl_next::FromWire::from_wire(wire.key),
3577
3578            value: ::fidl_next::FromWire::from_wire(wire.value),
3579        }
3580    }
3581}
3582
3583impl<'de> ::fidl_next::FromWireRef<WireDictionaryItem<'de>> for DictionaryItem {
3584    #[inline]
3585    fn from_wire_ref(wire: &WireDictionaryItem<'de>) -> Self {
3586        Self {
3587            key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
3588
3589            value: ::fidl_next::FromWireRef::from_wire_ref(&wire.value),
3590        }
3591    }
3592}
3593
3594/// The wire type corresponding to [`DictionaryItem`].
3595#[derive(Debug)]
3596#[repr(C)]
3597pub struct WireDictionaryItem<'de> {
3598    pub key: ::fidl_next::WireString<'de>,
3599
3600    pub value: ::fidl_next::WireU64,
3601}
3602
3603unsafe impl ::fidl_next::Wire for WireDictionaryItem<'static> {
3604    type Decoded<'de> = WireDictionaryItem<'de>;
3605
3606    #[inline]
3607    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3608}
3609
3610unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryItem<'static>
3611where
3612    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3613    ___D: ::fidl_next::Decoder,
3614{
3615    fn decode(
3616        slot: ::fidl_next::Slot<'_, Self>,
3617        decoder: &mut ___D,
3618    ) -> Result<(), ::fidl_next::DecodeError> {
3619        ::fidl_next::munge! {
3620            let Self {
3621                mut key,
3622                mut value,
3623
3624            } = slot;
3625        }
3626
3627        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
3628
3629        let key = unsafe { key.deref_unchecked() };
3630
3631        if key.len() > 255 {
3632            return Err(::fidl_next::DecodeError::VectorTooLong {
3633                size: key.len() as u64,
3634                limit: 255,
3635            });
3636        }
3637
3638        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
3639
3640        Ok(())
3641    }
3642}
3643
3644#[derive(Clone, Debug)]
3645pub struct CapabilityStoreDictionaryInsertRequest {
3646    pub id: u64,
3647
3648    pub item: crate::DictionaryItem,
3649}
3650
3651impl ::fidl_next::Encodable for CapabilityStoreDictionaryInsertRequest {
3652    type Encoded = WireCapabilityStoreDictionaryInsertRequest<'static>;
3653}
3654
3655unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryInsertRequest
3656where
3657    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3658    ___E: ::fidl_next::Encoder,
3659{
3660    #[inline]
3661    fn encode(
3662        self,
3663        encoder: &mut ___E,
3664        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3665    ) -> Result<(), ::fidl_next::EncodeError> {
3666        ::fidl_next::munge! {
3667            let Self::Encoded {
3668                id,
3669                item,
3670
3671            } = out;
3672        }
3673
3674        ::fidl_next::Encode::encode(self.id, encoder, id)?;
3675
3676        ::fidl_next::Encode::encode(self.item, encoder, item)?;
3677
3678        Ok(())
3679    }
3680}
3681
3682unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDictionaryInsertRequest
3683where
3684    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3685    ___E: ::fidl_next::Encoder,
3686{
3687    #[inline]
3688    fn encode_ref(
3689        &self,
3690        encoder: &mut ___E,
3691        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3692    ) -> Result<(), ::fidl_next::EncodeError> {
3693        ::fidl_next::munge! {
3694            let Self::Encoded {
3695                id,
3696                item,
3697
3698            } = out;
3699        }
3700
3701        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
3702
3703        ::fidl_next::EncodeRef::encode_ref(&self.item, encoder, item)?;
3704
3705        Ok(())
3706    }
3707}
3708
3709impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryInsertRequest {
3710    type EncodedOption =
3711        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryInsertRequest<'static>>;
3712}
3713
3714unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryInsertRequest
3715where
3716    ___E: ::fidl_next::Encoder + ?Sized,
3717    CapabilityStoreDictionaryInsertRequest: ::fidl_next::Encode<___E>,
3718{
3719    #[inline]
3720    fn encode_option(
3721        this: Option<Self>,
3722        encoder: &mut ___E,
3723        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3724    ) -> Result<(), ::fidl_next::EncodeError> {
3725        if let Some(inner) = this {
3726            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3727            ::fidl_next::WireBox::encode_present(out);
3728        } else {
3729            ::fidl_next::WireBox::encode_absent(out);
3730        }
3731
3732        Ok(())
3733    }
3734}
3735
3736unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDictionaryInsertRequest
3737where
3738    ___E: ::fidl_next::Encoder + ?Sized,
3739    CapabilityStoreDictionaryInsertRequest: ::fidl_next::EncodeRef<___E>,
3740{
3741    #[inline]
3742    fn encode_option_ref(
3743        this: Option<&Self>,
3744        encoder: &mut ___E,
3745        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3746    ) -> Result<(), ::fidl_next::EncodeError> {
3747        if let Some(inner) = this {
3748            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3749            ::fidl_next::WireBox::encode_present(out);
3750        } else {
3751            ::fidl_next::WireBox::encode_absent(out);
3752        }
3753
3754        Ok(())
3755    }
3756}
3757
3758impl<'de> ::fidl_next::FromWire<WireCapabilityStoreDictionaryInsertRequest<'de>>
3759    for CapabilityStoreDictionaryInsertRequest
3760{
3761    #[inline]
3762    fn from_wire(wire: WireCapabilityStoreDictionaryInsertRequest<'de>) -> Self {
3763        Self {
3764            id: ::fidl_next::FromWire::from_wire(wire.id),
3765
3766            item: ::fidl_next::FromWire::from_wire(wire.item),
3767        }
3768    }
3769}
3770
3771impl<'de> ::fidl_next::FromWireRef<WireCapabilityStoreDictionaryInsertRequest<'de>>
3772    for CapabilityStoreDictionaryInsertRequest
3773{
3774    #[inline]
3775    fn from_wire_ref(wire: &WireCapabilityStoreDictionaryInsertRequest<'de>) -> Self {
3776        Self {
3777            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
3778
3779            item: ::fidl_next::FromWireRef::from_wire_ref(&wire.item),
3780        }
3781    }
3782}
3783
3784/// The wire type corresponding to [`CapabilityStoreDictionaryInsertRequest`].
3785#[derive(Debug)]
3786#[repr(C)]
3787pub struct WireCapabilityStoreDictionaryInsertRequest<'de> {
3788    pub id: ::fidl_next::WireU64,
3789
3790    pub item: crate::WireDictionaryItem<'de>,
3791}
3792
3793unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryInsertRequest<'static> {
3794    type Decoded<'de> = WireCapabilityStoreDictionaryInsertRequest<'de>;
3795
3796    #[inline]
3797    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3798}
3799
3800unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryInsertRequest<'static>
3801where
3802    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3803    ___D: ::fidl_next::Decoder,
3804{
3805    fn decode(
3806        slot: ::fidl_next::Slot<'_, Self>,
3807        decoder: &mut ___D,
3808    ) -> Result<(), ::fidl_next::DecodeError> {
3809        ::fidl_next::munge! {
3810            let Self {
3811                mut id,
3812                mut item,
3813
3814            } = slot;
3815        }
3816
3817        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
3818
3819        ::fidl_next::Decode::decode(item.as_mut(), decoder)?;
3820
3821        Ok(())
3822    }
3823}
3824
3825pub type CapabilityStoreDictionaryInsertResponse = ();
3826
3827/// The wire type corresponding to [`CapabilityStoreDictionaryInsertResponse`].
3828pub type WireCapabilityStoreDictionaryInsertResponse = ();
3829
3830#[derive(Clone, Debug)]
3831pub struct CapabilityStoreDictionaryGetRequest {
3832    pub id: u64,
3833
3834    pub key: String,
3835
3836    pub dest_id: u64,
3837}
3838
3839impl ::fidl_next::Encodable for CapabilityStoreDictionaryGetRequest {
3840    type Encoded = WireCapabilityStoreDictionaryGetRequest<'static>;
3841}
3842
3843unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryGetRequest
3844where
3845    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3846    ___E: ::fidl_next::Encoder,
3847{
3848    #[inline]
3849    fn encode(
3850        self,
3851        encoder: &mut ___E,
3852        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
3853    ) -> Result<(), ::fidl_next::EncodeError> {
3854        ::fidl_next::munge! {
3855            let Self::Encoded {
3856                id,
3857                key,
3858                dest_id,
3859
3860            } = out;
3861        }
3862
3863        ::fidl_next::Encode::encode(self.id, encoder, id)?;
3864
3865        ::fidl_next::Encode::encode(self.key, encoder, key)?;
3866
3867        ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
3868
3869        Ok(())
3870    }
3871}
3872
3873unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDictionaryGetRequest
3874where
3875    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
3876    ___E: ::fidl_next::Encoder,
3877{
3878    #[inline]
3879    fn encode_ref(
3880        &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::EncodeRef::encode_ref(&self.id, encoder, id)?;
3894
3895        ::fidl_next::EncodeRef::encode_ref(&self.key, encoder, key)?;
3896
3897        ::fidl_next::EncodeRef::encode_ref(&self.dest_id, encoder, dest_id)?;
3898
3899        Ok(())
3900    }
3901}
3902
3903impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryGetRequest {
3904    type EncodedOption =
3905        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryGetRequest<'static>>;
3906}
3907
3908unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryGetRequest
3909where
3910    ___E: ::fidl_next::Encoder + ?Sized,
3911    CapabilityStoreDictionaryGetRequest: ::fidl_next::Encode<___E>,
3912{
3913    #[inline]
3914    fn encode_option(
3915        this: Option<Self>,
3916        encoder: &mut ___E,
3917        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3918    ) -> Result<(), ::fidl_next::EncodeError> {
3919        if let Some(inner) = this {
3920            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3921            ::fidl_next::WireBox::encode_present(out);
3922        } else {
3923            ::fidl_next::WireBox::encode_absent(out);
3924        }
3925
3926        Ok(())
3927    }
3928}
3929
3930unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDictionaryGetRequest
3931where
3932    ___E: ::fidl_next::Encoder + ?Sized,
3933    CapabilityStoreDictionaryGetRequest: ::fidl_next::EncodeRef<___E>,
3934{
3935    #[inline]
3936    fn encode_option_ref(
3937        this: Option<&Self>,
3938        encoder: &mut ___E,
3939        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
3940    ) -> Result<(), ::fidl_next::EncodeError> {
3941        if let Some(inner) = this {
3942            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
3943            ::fidl_next::WireBox::encode_present(out);
3944        } else {
3945            ::fidl_next::WireBox::encode_absent(out);
3946        }
3947
3948        Ok(())
3949    }
3950}
3951
3952impl<'de> ::fidl_next::FromWire<WireCapabilityStoreDictionaryGetRequest<'de>>
3953    for CapabilityStoreDictionaryGetRequest
3954{
3955    #[inline]
3956    fn from_wire(wire: WireCapabilityStoreDictionaryGetRequest<'de>) -> Self {
3957        Self {
3958            id: ::fidl_next::FromWire::from_wire(wire.id),
3959
3960            key: ::fidl_next::FromWire::from_wire(wire.key),
3961
3962            dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
3963        }
3964    }
3965}
3966
3967impl<'de> ::fidl_next::FromWireRef<WireCapabilityStoreDictionaryGetRequest<'de>>
3968    for CapabilityStoreDictionaryGetRequest
3969{
3970    #[inline]
3971    fn from_wire_ref(wire: &WireCapabilityStoreDictionaryGetRequest<'de>) -> Self {
3972        Self {
3973            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
3974
3975            key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
3976
3977            dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
3978        }
3979    }
3980}
3981
3982/// The wire type corresponding to [`CapabilityStoreDictionaryGetRequest`].
3983#[derive(Debug)]
3984#[repr(C)]
3985pub struct WireCapabilityStoreDictionaryGetRequest<'de> {
3986    pub id: ::fidl_next::WireU64,
3987
3988    pub key: ::fidl_next::WireString<'de>,
3989
3990    pub dest_id: ::fidl_next::WireU64,
3991}
3992
3993unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryGetRequest<'static> {
3994    type Decoded<'de> = WireCapabilityStoreDictionaryGetRequest<'de>;
3995
3996    #[inline]
3997    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
3998}
3999
4000unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryGetRequest<'static>
4001where
4002    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4003    ___D: ::fidl_next::Decoder,
4004{
4005    fn decode(
4006        slot: ::fidl_next::Slot<'_, Self>,
4007        decoder: &mut ___D,
4008    ) -> Result<(), ::fidl_next::DecodeError> {
4009        ::fidl_next::munge! {
4010            let Self {
4011                mut id,
4012                mut key,
4013                mut dest_id,
4014
4015            } = slot;
4016        }
4017
4018        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4019
4020        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
4021
4022        let key = unsafe { key.deref_unchecked() };
4023
4024        if key.len() > 255 {
4025            return Err(::fidl_next::DecodeError::VectorTooLong {
4026                size: key.len() as u64,
4027                limit: 255,
4028            });
4029        }
4030
4031        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
4032
4033        Ok(())
4034    }
4035}
4036
4037pub type CapabilityStoreDictionaryGetResponse = ();
4038
4039/// The wire type corresponding to [`CapabilityStoreDictionaryGetResponse`].
4040pub type WireCapabilityStoreDictionaryGetResponse = ();
4041
4042#[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"]
4043#[derive(Clone, Debug)]
4044#[repr(C)]
4045pub struct WrappedCapabilityId {
4046    pub id: u64,
4047}
4048
4049impl ::fidl_next::Encodable for WrappedCapabilityId {
4050    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireWrappedCapabilityId> = unsafe {
4051        ::fidl_next::CopyOptimization::enable_if(
4052            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
4053        )
4054    };
4055
4056    type Encoded = WireWrappedCapabilityId;
4057}
4058
4059unsafe impl<___E> ::fidl_next::Encode<___E> for WrappedCapabilityId
4060where
4061    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4062{
4063    #[inline]
4064    fn encode(
4065        self,
4066        encoder: &mut ___E,
4067        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4068    ) -> Result<(), ::fidl_next::EncodeError> {
4069        ::fidl_next::munge! {
4070            let Self::Encoded {
4071                id,
4072
4073            } = out;
4074        }
4075
4076        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4077
4078        Ok(())
4079    }
4080}
4081
4082unsafe impl<___E> ::fidl_next::EncodeRef<___E> for WrappedCapabilityId
4083where
4084    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4085{
4086    #[inline]
4087    fn encode_ref(
4088        &self,
4089        encoder: &mut ___E,
4090        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4091    ) -> Result<(), ::fidl_next::EncodeError> {
4092        ::fidl_next::munge! {
4093            let Self::Encoded {
4094                id,
4095
4096            } = out;
4097        }
4098
4099        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
4100
4101        Ok(())
4102    }
4103}
4104
4105impl ::fidl_next::EncodableOption for WrappedCapabilityId {
4106    type EncodedOption = ::fidl_next::WireBox<'static, WireWrappedCapabilityId>;
4107}
4108
4109unsafe impl<___E> ::fidl_next::EncodeOption<___E> for WrappedCapabilityId
4110where
4111    ___E: ::fidl_next::Encoder + ?Sized,
4112    WrappedCapabilityId: ::fidl_next::Encode<___E>,
4113{
4114    #[inline]
4115    fn encode_option(
4116        this: Option<Self>,
4117        encoder: &mut ___E,
4118        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4119    ) -> Result<(), ::fidl_next::EncodeError> {
4120        if let Some(inner) = this {
4121            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4122            ::fidl_next::WireBox::encode_present(out);
4123        } else {
4124            ::fidl_next::WireBox::encode_absent(out);
4125        }
4126
4127        Ok(())
4128    }
4129}
4130
4131unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for WrappedCapabilityId
4132where
4133    ___E: ::fidl_next::Encoder + ?Sized,
4134    WrappedCapabilityId: ::fidl_next::EncodeRef<___E>,
4135{
4136    #[inline]
4137    fn encode_option_ref(
4138        this: Option<&Self>,
4139        encoder: &mut ___E,
4140        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4141    ) -> Result<(), ::fidl_next::EncodeError> {
4142        if let Some(inner) = this {
4143            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4144            ::fidl_next::WireBox::encode_present(out);
4145        } else {
4146            ::fidl_next::WireBox::encode_absent(out);
4147        }
4148
4149        Ok(())
4150    }
4151}
4152
4153impl ::fidl_next::FromWire<WireWrappedCapabilityId> for WrappedCapabilityId {
4154    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireWrappedCapabilityId, Self> = unsafe {
4155        ::fidl_next::CopyOptimization::enable_if(
4156            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
4157                .is_enabled(),
4158        )
4159    };
4160
4161    #[inline]
4162    fn from_wire(wire: WireWrappedCapabilityId) -> Self {
4163        Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
4164    }
4165}
4166
4167impl ::fidl_next::FromWireRef<WireWrappedCapabilityId> for WrappedCapabilityId {
4168    #[inline]
4169    fn from_wire_ref(wire: &WireWrappedCapabilityId) -> Self {
4170        Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
4171    }
4172}
4173
4174/// The wire type corresponding to [`WrappedCapabilityId`].
4175#[derive(Clone, Debug)]
4176#[repr(C)]
4177pub struct WireWrappedCapabilityId {
4178    pub id: ::fidl_next::WireU64,
4179}
4180
4181unsafe impl ::fidl_next::Wire for WireWrappedCapabilityId {
4182    type Decoded<'de> = WireWrappedCapabilityId;
4183
4184    #[inline]
4185    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4186}
4187
4188unsafe impl<___D> ::fidl_next::Decode<___D> for WireWrappedCapabilityId
4189where
4190    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4191{
4192    fn decode(
4193        slot: ::fidl_next::Slot<'_, Self>,
4194        decoder: &mut ___D,
4195    ) -> Result<(), ::fidl_next::DecodeError> {
4196        ::fidl_next::munge! {
4197            let Self {
4198                mut id,
4199
4200            } = slot;
4201        }
4202
4203        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4204
4205        Ok(())
4206    }
4207}
4208
4209pub type WrappedNewCapabilityId = crate::WrappedCapabilityId;
4210
4211/// The wire type corresponding to [`WrappedNewCapabilityId`].
4212pub type WireWrappedNewCapabilityId = crate::WireWrappedCapabilityId;
4213
4214#[derive(Clone, Debug)]
4215pub struct CapabilityStoreDictionaryRemoveRequest {
4216    pub id: u64,
4217
4218    pub key: String,
4219
4220    pub dest_id: Option<Box<crate::WrappedCapabilityId>>,
4221}
4222
4223impl ::fidl_next::Encodable for CapabilityStoreDictionaryRemoveRequest {
4224    type Encoded = WireCapabilityStoreDictionaryRemoveRequest<'static>;
4225}
4226
4227unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryRemoveRequest
4228where
4229    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4230    ___E: ::fidl_next::Encoder,
4231{
4232    #[inline]
4233    fn encode(
4234        self,
4235        encoder: &mut ___E,
4236        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4237    ) -> Result<(), ::fidl_next::EncodeError> {
4238        ::fidl_next::munge! {
4239            let Self::Encoded {
4240                id,
4241                key,
4242                dest_id,
4243
4244            } = out;
4245        }
4246
4247        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4248
4249        ::fidl_next::Encode::encode(self.key, encoder, key)?;
4250
4251        ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
4252
4253        Ok(())
4254    }
4255}
4256
4257unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDictionaryRemoveRequest
4258where
4259    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4260    ___E: ::fidl_next::Encoder,
4261{
4262    #[inline]
4263    fn encode_ref(
4264        &self,
4265        encoder: &mut ___E,
4266        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4267    ) -> Result<(), ::fidl_next::EncodeError> {
4268        ::fidl_next::munge! {
4269            let Self::Encoded {
4270                id,
4271                key,
4272                dest_id,
4273
4274            } = out;
4275        }
4276
4277        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
4278
4279        ::fidl_next::EncodeRef::encode_ref(&self.key, encoder, key)?;
4280
4281        ::fidl_next::EncodeRef::encode_ref(&self.dest_id, encoder, dest_id)?;
4282
4283        Ok(())
4284    }
4285}
4286
4287impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryRemoveRequest {
4288    type EncodedOption =
4289        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryRemoveRequest<'static>>;
4290}
4291
4292unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryRemoveRequest
4293where
4294    ___E: ::fidl_next::Encoder + ?Sized,
4295    CapabilityStoreDictionaryRemoveRequest: ::fidl_next::Encode<___E>,
4296{
4297    #[inline]
4298    fn encode_option(
4299        this: Option<Self>,
4300        encoder: &mut ___E,
4301        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4302    ) -> Result<(), ::fidl_next::EncodeError> {
4303        if let Some(inner) = this {
4304            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4305            ::fidl_next::WireBox::encode_present(out);
4306        } else {
4307            ::fidl_next::WireBox::encode_absent(out);
4308        }
4309
4310        Ok(())
4311    }
4312}
4313
4314unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDictionaryRemoveRequest
4315where
4316    ___E: ::fidl_next::Encoder + ?Sized,
4317    CapabilityStoreDictionaryRemoveRequest: ::fidl_next::EncodeRef<___E>,
4318{
4319    #[inline]
4320    fn encode_option_ref(
4321        this: Option<&Self>,
4322        encoder: &mut ___E,
4323        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4324    ) -> Result<(), ::fidl_next::EncodeError> {
4325        if let Some(inner) = this {
4326            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4327            ::fidl_next::WireBox::encode_present(out);
4328        } else {
4329            ::fidl_next::WireBox::encode_absent(out);
4330        }
4331
4332        Ok(())
4333    }
4334}
4335
4336impl<'de> ::fidl_next::FromWire<WireCapabilityStoreDictionaryRemoveRequest<'de>>
4337    for CapabilityStoreDictionaryRemoveRequest
4338{
4339    #[inline]
4340    fn from_wire(wire: WireCapabilityStoreDictionaryRemoveRequest<'de>) -> Self {
4341        Self {
4342            id: ::fidl_next::FromWire::from_wire(wire.id),
4343
4344            key: ::fidl_next::FromWire::from_wire(wire.key),
4345
4346            dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
4347        }
4348    }
4349}
4350
4351impl<'de> ::fidl_next::FromWireRef<WireCapabilityStoreDictionaryRemoveRequest<'de>>
4352    for CapabilityStoreDictionaryRemoveRequest
4353{
4354    #[inline]
4355    fn from_wire_ref(wire: &WireCapabilityStoreDictionaryRemoveRequest<'de>) -> Self {
4356        Self {
4357            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
4358
4359            key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
4360
4361            dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
4362        }
4363    }
4364}
4365
4366/// The wire type corresponding to [`CapabilityStoreDictionaryRemoveRequest`].
4367#[derive(Debug)]
4368#[repr(C)]
4369pub struct WireCapabilityStoreDictionaryRemoveRequest<'de> {
4370    pub id: ::fidl_next::WireU64,
4371
4372    pub key: ::fidl_next::WireString<'de>,
4373
4374    pub dest_id: ::fidl_next::WireBox<'de, crate::WireWrappedCapabilityId>,
4375}
4376
4377unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryRemoveRequest<'static> {
4378    type Decoded<'de> = WireCapabilityStoreDictionaryRemoveRequest<'de>;
4379
4380    #[inline]
4381    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4382}
4383
4384unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryRemoveRequest<'static>
4385where
4386    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4387    ___D: ::fidl_next::Decoder,
4388{
4389    fn decode(
4390        slot: ::fidl_next::Slot<'_, Self>,
4391        decoder: &mut ___D,
4392    ) -> Result<(), ::fidl_next::DecodeError> {
4393        ::fidl_next::munge! {
4394            let Self {
4395                mut id,
4396                mut key,
4397                mut dest_id,
4398
4399            } = slot;
4400        }
4401
4402        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4403
4404        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
4405
4406        let key = unsafe { key.deref_unchecked() };
4407
4408        if key.len() > 255 {
4409            return Err(::fidl_next::DecodeError::VectorTooLong {
4410                size: key.len() as u64,
4411                limit: 255,
4412            });
4413        }
4414
4415        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
4416
4417        Ok(())
4418    }
4419}
4420
4421pub type CapabilityStoreDictionaryRemoveResponse = ();
4422
4423/// The wire type corresponding to [`CapabilityStoreDictionaryRemoveResponse`].
4424pub type WireCapabilityStoreDictionaryRemoveResponse = ();
4425
4426#[derive(Clone, Debug)]
4427#[repr(C)]
4428pub struct CapabilityStoreDictionaryCopyRequest {
4429    pub id: u64,
4430
4431    pub dest_id: u64,
4432}
4433
4434impl ::fidl_next::Encodable for CapabilityStoreDictionaryCopyRequest {
4435    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4436        Self,
4437        WireCapabilityStoreDictionaryCopyRequest,
4438    > = unsafe {
4439        ::fidl_next::CopyOptimization::enable_if(
4440            true && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled()
4441                && <u64 as ::fidl_next::Encodable>::COPY_OPTIMIZATION.is_enabled(),
4442        )
4443    };
4444
4445    type Encoded = WireCapabilityStoreDictionaryCopyRequest;
4446}
4447
4448unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryCopyRequest
4449where
4450    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4451{
4452    #[inline]
4453    fn encode(
4454        self,
4455        encoder: &mut ___E,
4456        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4457    ) -> Result<(), ::fidl_next::EncodeError> {
4458        ::fidl_next::munge! {
4459            let Self::Encoded {
4460                id,
4461                dest_id,
4462
4463            } = out;
4464        }
4465
4466        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4467
4468        ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
4469
4470        Ok(())
4471    }
4472}
4473
4474unsafe impl<___E> ::fidl_next::EncodeRef<___E> for CapabilityStoreDictionaryCopyRequest
4475where
4476    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4477{
4478    #[inline]
4479    fn encode_ref(
4480        &self,
4481        encoder: &mut ___E,
4482        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4483    ) -> Result<(), ::fidl_next::EncodeError> {
4484        ::fidl_next::munge! {
4485            let Self::Encoded {
4486                id,
4487                dest_id,
4488
4489            } = out;
4490        }
4491
4492        ::fidl_next::EncodeRef::encode_ref(&self.id, encoder, id)?;
4493
4494        ::fidl_next::EncodeRef::encode_ref(&self.dest_id, encoder, dest_id)?;
4495
4496        Ok(())
4497    }
4498}
4499
4500impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryCopyRequest {
4501    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryCopyRequest>;
4502}
4503
4504unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryCopyRequest
4505where
4506    ___E: ::fidl_next::Encoder + ?Sized,
4507    CapabilityStoreDictionaryCopyRequest: ::fidl_next::Encode<___E>,
4508{
4509    #[inline]
4510    fn encode_option(
4511        this: Option<Self>,
4512        encoder: &mut ___E,
4513        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4514    ) -> Result<(), ::fidl_next::EncodeError> {
4515        if let Some(inner) = this {
4516            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4517            ::fidl_next::WireBox::encode_present(out);
4518        } else {
4519            ::fidl_next::WireBox::encode_absent(out);
4520        }
4521
4522        Ok(())
4523    }
4524}
4525
4526unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for CapabilityStoreDictionaryCopyRequest
4527where
4528    ___E: ::fidl_next::Encoder + ?Sized,
4529    CapabilityStoreDictionaryCopyRequest: ::fidl_next::EncodeRef<___E>,
4530{
4531    #[inline]
4532    fn encode_option_ref(
4533        this: Option<&Self>,
4534        encoder: &mut ___E,
4535        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4536    ) -> Result<(), ::fidl_next::EncodeError> {
4537        if let Some(inner) = this {
4538            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4539            ::fidl_next::WireBox::encode_present(out);
4540        } else {
4541            ::fidl_next::WireBox::encode_absent(out);
4542        }
4543
4544        Ok(())
4545    }
4546}
4547
4548impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryCopyRequest>
4549    for CapabilityStoreDictionaryCopyRequest
4550{
4551    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
4552        WireCapabilityStoreDictionaryCopyRequest,
4553        Self,
4554    > = unsafe {
4555        ::fidl_next::CopyOptimization::enable_if(
4556            true && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
4557                .is_enabled()
4558                && <u64 as ::fidl_next::FromWire<::fidl_next::WireU64>>::COPY_OPTIMIZATION
4559                    .is_enabled(),
4560        )
4561    };
4562
4563    #[inline]
4564    fn from_wire(wire: WireCapabilityStoreDictionaryCopyRequest) -> Self {
4565        Self {
4566            id: ::fidl_next::FromWire::from_wire(wire.id),
4567
4568            dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
4569        }
4570    }
4571}
4572
4573impl ::fidl_next::FromWireRef<WireCapabilityStoreDictionaryCopyRequest>
4574    for CapabilityStoreDictionaryCopyRequest
4575{
4576    #[inline]
4577    fn from_wire_ref(wire: &WireCapabilityStoreDictionaryCopyRequest) -> Self {
4578        Self {
4579            id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
4580
4581            dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
4582        }
4583    }
4584}
4585
4586/// The wire type corresponding to [`CapabilityStoreDictionaryCopyRequest`].
4587#[derive(Clone, Debug)]
4588#[repr(C)]
4589pub struct WireCapabilityStoreDictionaryCopyRequest {
4590    pub id: ::fidl_next::WireU64,
4591
4592    pub dest_id: ::fidl_next::WireU64,
4593}
4594
4595unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryCopyRequest {
4596    type Decoded<'de> = WireCapabilityStoreDictionaryCopyRequest;
4597
4598    #[inline]
4599    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
4600}
4601
4602unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryCopyRequest
4603where
4604    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4605{
4606    fn decode(
4607        slot: ::fidl_next::Slot<'_, Self>,
4608        decoder: &mut ___D,
4609    ) -> Result<(), ::fidl_next::DecodeError> {
4610        ::fidl_next::munge! {
4611            let Self {
4612                mut id,
4613                mut dest_id,
4614
4615            } = slot;
4616        }
4617
4618        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4619
4620        ::fidl_next::Decode::decode(dest_id.as_mut(), decoder)?;
4621
4622        Ok(())
4623    }
4624}
4625
4626pub type CapabilityStoreDictionaryCopyResponse = ();
4627
4628/// The wire type corresponding to [`CapabilityStoreDictionaryCopyResponse`].
4629pub type WireCapabilityStoreDictionaryCopyResponse = ();
4630
4631#[derive(Debug)]
4632pub struct CapabilityStoreDictionaryKeysRequest {
4633    pub id: u64,
4634
4635    pub iterator:
4636        ::fidl_next::ServerEnd<crate::DictionaryKeysIterator, ::fidl_next::fuchsia::zx::Channel>,
4637}
4638
4639impl ::fidl_next::Encodable for CapabilityStoreDictionaryKeysRequest {
4640    type Encoded = WireCapabilityStoreDictionaryKeysRequest;
4641}
4642
4643unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryKeysRequest
4644where
4645    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4646    ___E: ::fidl_next::fuchsia::HandleEncoder,
4647{
4648    #[inline]
4649    fn encode(
4650        self,
4651        encoder: &mut ___E,
4652        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4653    ) -> Result<(), ::fidl_next::EncodeError> {
4654        ::fidl_next::munge! {
4655            let Self::Encoded {
4656                id,
4657                iterator,
4658
4659            } = out;
4660        }
4661
4662        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4663
4664        ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
4665
4666        Ok(())
4667    }
4668}
4669
4670impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryKeysRequest {
4671    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryKeysRequest>;
4672}
4673
4674unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryKeysRequest
4675where
4676    ___E: ::fidl_next::Encoder + ?Sized,
4677    CapabilityStoreDictionaryKeysRequest: ::fidl_next::Encode<___E>,
4678{
4679    #[inline]
4680    fn encode_option(
4681        this: Option<Self>,
4682        encoder: &mut ___E,
4683        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4684    ) -> Result<(), ::fidl_next::EncodeError> {
4685        if let Some(inner) = this {
4686            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4687            ::fidl_next::WireBox::encode_present(out);
4688        } else {
4689            ::fidl_next::WireBox::encode_absent(out);
4690        }
4691
4692        Ok(())
4693    }
4694}
4695
4696impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryKeysRequest>
4697    for CapabilityStoreDictionaryKeysRequest
4698{
4699    #[inline]
4700    fn from_wire(wire: WireCapabilityStoreDictionaryKeysRequest) -> Self {
4701        Self {
4702            id: ::fidl_next::FromWire::from_wire(wire.id),
4703
4704            iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
4705        }
4706    }
4707}
4708
4709/// The wire type corresponding to [`CapabilityStoreDictionaryKeysRequest`].
4710#[derive(Debug)]
4711#[repr(C)]
4712pub struct WireCapabilityStoreDictionaryKeysRequest {
4713    pub id: ::fidl_next::WireU64,
4714
4715    pub iterator:
4716        ::fidl_next::ServerEnd<crate::DictionaryKeysIterator, ::fidl_next::fuchsia::WireChannel>,
4717}
4718
4719unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryKeysRequest {
4720    type Decoded<'de> = WireCapabilityStoreDictionaryKeysRequest;
4721
4722    #[inline]
4723    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4724        unsafe {
4725            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4726        }
4727    }
4728}
4729
4730unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryKeysRequest
4731where
4732    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4733    ___D: ::fidl_next::fuchsia::HandleDecoder,
4734{
4735    fn decode(
4736        slot: ::fidl_next::Slot<'_, Self>,
4737        decoder: &mut ___D,
4738    ) -> Result<(), ::fidl_next::DecodeError> {
4739        ::fidl_next::munge! {
4740            let Self {
4741                mut id,
4742                mut iterator,
4743
4744            } = slot;
4745        }
4746
4747        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4748
4749        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4750
4751        Ok(())
4752    }
4753}
4754
4755pub type CapabilityStoreDictionaryKeysResponse = ();
4756
4757/// The wire type corresponding to [`CapabilityStoreDictionaryKeysResponse`].
4758pub type WireCapabilityStoreDictionaryKeysResponse = ();
4759
4760#[derive(Debug)]
4761pub struct CapabilityStoreDictionaryEnumerateRequest {
4762    pub id: u64,
4763
4764    pub iterator: ::fidl_next::ServerEnd<
4765        crate::DictionaryEnumerateIterator,
4766        ::fidl_next::fuchsia::zx::Channel,
4767    >,
4768}
4769
4770impl ::fidl_next::Encodable for CapabilityStoreDictionaryEnumerateRequest {
4771    type Encoded = WireCapabilityStoreDictionaryEnumerateRequest;
4772}
4773
4774unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryEnumerateRequest
4775where
4776    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4777    ___E: ::fidl_next::fuchsia::HandleEncoder,
4778{
4779    #[inline]
4780    fn encode(
4781        self,
4782        encoder: &mut ___E,
4783        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4784    ) -> Result<(), ::fidl_next::EncodeError> {
4785        ::fidl_next::munge! {
4786            let Self::Encoded {
4787                id,
4788                iterator,
4789
4790            } = out;
4791        }
4792
4793        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4794
4795        ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
4796
4797        Ok(())
4798    }
4799}
4800
4801impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryEnumerateRequest {
4802    type EncodedOption =
4803        ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryEnumerateRequest>;
4804}
4805
4806unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryEnumerateRequest
4807where
4808    ___E: ::fidl_next::Encoder + ?Sized,
4809    CapabilityStoreDictionaryEnumerateRequest: ::fidl_next::Encode<___E>,
4810{
4811    #[inline]
4812    fn encode_option(
4813        this: Option<Self>,
4814        encoder: &mut ___E,
4815        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4816    ) -> Result<(), ::fidl_next::EncodeError> {
4817        if let Some(inner) = this {
4818            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4819            ::fidl_next::WireBox::encode_present(out);
4820        } else {
4821            ::fidl_next::WireBox::encode_absent(out);
4822        }
4823
4824        Ok(())
4825    }
4826}
4827
4828impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryEnumerateRequest>
4829    for CapabilityStoreDictionaryEnumerateRequest
4830{
4831    #[inline]
4832    fn from_wire(wire: WireCapabilityStoreDictionaryEnumerateRequest) -> Self {
4833        Self {
4834            id: ::fidl_next::FromWire::from_wire(wire.id),
4835
4836            iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
4837        }
4838    }
4839}
4840
4841/// The wire type corresponding to [`CapabilityStoreDictionaryEnumerateRequest`].
4842#[derive(Debug)]
4843#[repr(C)]
4844pub struct WireCapabilityStoreDictionaryEnumerateRequest {
4845    pub id: ::fidl_next::WireU64,
4846
4847    pub iterator: ::fidl_next::ServerEnd<
4848        crate::DictionaryEnumerateIterator,
4849        ::fidl_next::fuchsia::WireChannel,
4850    >,
4851}
4852
4853unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryEnumerateRequest {
4854    type Decoded<'de> = WireCapabilityStoreDictionaryEnumerateRequest;
4855
4856    #[inline]
4857    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4858        unsafe {
4859            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4860        }
4861    }
4862}
4863
4864unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryEnumerateRequest
4865where
4866    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4867    ___D: ::fidl_next::fuchsia::HandleDecoder,
4868{
4869    fn decode(
4870        slot: ::fidl_next::Slot<'_, Self>,
4871        decoder: &mut ___D,
4872    ) -> Result<(), ::fidl_next::DecodeError> {
4873        ::fidl_next::munge! {
4874            let Self {
4875                mut id,
4876                mut iterator,
4877
4878            } = slot;
4879        }
4880
4881        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
4882
4883        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
4884
4885        Ok(())
4886    }
4887}
4888
4889pub type CapabilityStoreDictionaryEnumerateResponse = ();
4890
4891/// The wire type corresponding to [`CapabilityStoreDictionaryEnumerateResponse`].
4892pub type WireCapabilityStoreDictionaryEnumerateResponse = ();
4893
4894#[derive(Debug)]
4895pub struct CapabilityStoreDictionaryDrainRequest {
4896    pub id: u64,
4897
4898    pub iterator: Option<
4899        ::fidl_next::ServerEnd<crate::DictionaryDrainIterator, ::fidl_next::fuchsia::zx::Channel>,
4900    >,
4901}
4902
4903impl ::fidl_next::Encodable for CapabilityStoreDictionaryDrainRequest {
4904    type Encoded = WireCapabilityStoreDictionaryDrainRequest;
4905}
4906
4907unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDictionaryDrainRequest
4908where
4909    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4910    ___E: ::fidl_next::fuchsia::HandleEncoder,
4911{
4912    #[inline]
4913    fn encode(
4914        self,
4915        encoder: &mut ___E,
4916        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
4917    ) -> Result<(), ::fidl_next::EncodeError> {
4918        ::fidl_next::munge! {
4919            let Self::Encoded {
4920                id,
4921                iterator,
4922
4923            } = out;
4924        }
4925
4926        ::fidl_next::Encode::encode(self.id, encoder, id)?;
4927
4928        ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
4929
4930        Ok(())
4931    }
4932}
4933
4934impl ::fidl_next::EncodableOption for CapabilityStoreDictionaryDrainRequest {
4935    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDictionaryDrainRequest>;
4936}
4937
4938unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDictionaryDrainRequest
4939where
4940    ___E: ::fidl_next::Encoder + ?Sized,
4941    CapabilityStoreDictionaryDrainRequest: ::fidl_next::Encode<___E>,
4942{
4943    #[inline]
4944    fn encode_option(
4945        this: Option<Self>,
4946        encoder: &mut ___E,
4947        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
4948    ) -> Result<(), ::fidl_next::EncodeError> {
4949        if let Some(inner) = this {
4950            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
4951            ::fidl_next::WireBox::encode_present(out);
4952        } else {
4953            ::fidl_next::WireBox::encode_absent(out);
4954        }
4955
4956        Ok(())
4957    }
4958}
4959
4960impl ::fidl_next::FromWire<WireCapabilityStoreDictionaryDrainRequest>
4961    for CapabilityStoreDictionaryDrainRequest
4962{
4963    #[inline]
4964    fn from_wire(wire: WireCapabilityStoreDictionaryDrainRequest) -> Self {
4965        Self {
4966            id: ::fidl_next::FromWire::from_wire(wire.id),
4967
4968            iterator: ::fidl_next::FromWire::from_wire(wire.iterator),
4969        }
4970    }
4971}
4972
4973/// The wire type corresponding to [`CapabilityStoreDictionaryDrainRequest`].
4974#[derive(Debug)]
4975#[repr(C)]
4976pub struct WireCapabilityStoreDictionaryDrainRequest {
4977    pub id: ::fidl_next::WireU64,
4978
4979    pub iterator: ::fidl_next::ServerEnd<
4980        crate::DictionaryDrainIterator,
4981        ::fidl_next::fuchsia::WireOptionalChannel,
4982    >,
4983}
4984
4985unsafe impl ::fidl_next::Wire for WireCapabilityStoreDictionaryDrainRequest {
4986    type Decoded<'de> = WireCapabilityStoreDictionaryDrainRequest;
4987
4988    #[inline]
4989    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4990        unsafe {
4991            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4992        }
4993    }
4994}
4995
4996unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDictionaryDrainRequest
4997where
4998    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4999    ___D: ::fidl_next::fuchsia::HandleDecoder,
5000{
5001    fn decode(
5002        slot: ::fidl_next::Slot<'_, Self>,
5003        decoder: &mut ___D,
5004    ) -> Result<(), ::fidl_next::DecodeError> {
5005        ::fidl_next::munge! {
5006            let Self {
5007                mut id,
5008                mut iterator,
5009
5010            } = slot;
5011        }
5012
5013        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
5014
5015        ::fidl_next::Decode::decode(iterator.as_mut(), decoder)?;
5016
5017        Ok(())
5018    }
5019}
5020
5021pub type CapabilityStoreDictionaryDrainResponse = ();
5022
5023/// The wire type corresponding to [`CapabilityStoreDictionaryDrainResponse`].
5024pub type WireCapabilityStoreDictionaryDrainResponse = ();
5025
5026#[derive(Debug)]
5027pub struct CapabilityStoreExportResponse {
5028    pub capability: crate::Capability,
5029}
5030
5031impl ::fidl_next::Encodable for CapabilityStoreExportResponse {
5032    type Encoded = WireCapabilityStoreExportResponse<'static>;
5033}
5034
5035unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreExportResponse
5036where
5037    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5038    ___E: ::fidl_next::Encoder,
5039    ___E: ::fidl_next::fuchsia::HandleEncoder,
5040{
5041    #[inline]
5042    fn encode(
5043        self,
5044        encoder: &mut ___E,
5045        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5046    ) -> Result<(), ::fidl_next::EncodeError> {
5047        ::fidl_next::munge! {
5048            let Self::Encoded {
5049                capability,
5050
5051            } = out;
5052        }
5053
5054        ::fidl_next::Encode::encode(self.capability, encoder, capability)?;
5055
5056        Ok(())
5057    }
5058}
5059
5060impl ::fidl_next::EncodableOption for CapabilityStoreExportResponse {
5061    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreExportResponse<'static>>;
5062}
5063
5064unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreExportResponse
5065where
5066    ___E: ::fidl_next::Encoder + ?Sized,
5067    CapabilityStoreExportResponse: ::fidl_next::Encode<___E>,
5068{
5069    #[inline]
5070    fn encode_option(
5071        this: Option<Self>,
5072        encoder: &mut ___E,
5073        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5074    ) -> Result<(), ::fidl_next::EncodeError> {
5075        if let Some(inner) = this {
5076            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5077            ::fidl_next::WireBox::encode_present(out);
5078        } else {
5079            ::fidl_next::WireBox::encode_absent(out);
5080        }
5081
5082        Ok(())
5083    }
5084}
5085
5086impl<'de> ::fidl_next::FromWire<WireCapabilityStoreExportResponse<'de>>
5087    for CapabilityStoreExportResponse
5088{
5089    #[inline]
5090    fn from_wire(wire: WireCapabilityStoreExportResponse<'de>) -> Self {
5091        Self { capability: ::fidl_next::FromWire::from_wire(wire.capability) }
5092    }
5093}
5094
5095/// The wire type corresponding to [`CapabilityStoreExportResponse`].
5096#[derive(Debug)]
5097#[repr(C)]
5098pub struct WireCapabilityStoreExportResponse<'de> {
5099    pub capability: crate::WireCapability<'de>,
5100}
5101
5102unsafe impl ::fidl_next::Wire for WireCapabilityStoreExportResponse<'static> {
5103    type Decoded<'de> = WireCapabilityStoreExportResponse<'de>;
5104
5105    #[inline]
5106    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5107}
5108
5109unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreExportResponse<'static>
5110where
5111    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5112    ___D: ::fidl_next::Decoder,
5113    ___D: ::fidl_next::fuchsia::HandleDecoder,
5114{
5115    fn decode(
5116        slot: ::fidl_next::Slot<'_, Self>,
5117        decoder: &mut ___D,
5118    ) -> Result<(), ::fidl_next::DecodeError> {
5119        ::fidl_next::munge! {
5120            let Self {
5121                mut capability,
5122
5123            } = slot;
5124        }
5125
5126        ::fidl_next::Decode::decode(capability.as_mut(), decoder)?;
5127
5128        Ok(())
5129    }
5130}
5131
5132#[derive(Debug)]
5133pub struct CapabilityStoreImportRequest {
5134    pub id: u64,
5135
5136    pub capability: crate::Capability,
5137}
5138
5139impl ::fidl_next::Encodable for CapabilityStoreImportRequest {
5140    type Encoded = WireCapabilityStoreImportRequest<'static>;
5141}
5142
5143unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreImportRequest
5144where
5145    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5146    ___E: ::fidl_next::Encoder,
5147    ___E: ::fidl_next::fuchsia::HandleEncoder,
5148{
5149    #[inline]
5150    fn encode(
5151        self,
5152        encoder: &mut ___E,
5153        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5154    ) -> Result<(), ::fidl_next::EncodeError> {
5155        ::fidl_next::munge! {
5156            let Self::Encoded {
5157                id,
5158                capability,
5159
5160            } = out;
5161        }
5162
5163        ::fidl_next::Encode::encode(self.id, encoder, id)?;
5164
5165        ::fidl_next::Encode::encode(self.capability, encoder, capability)?;
5166
5167        Ok(())
5168    }
5169}
5170
5171impl ::fidl_next::EncodableOption for CapabilityStoreImportRequest {
5172    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreImportRequest<'static>>;
5173}
5174
5175unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreImportRequest
5176where
5177    ___E: ::fidl_next::Encoder + ?Sized,
5178    CapabilityStoreImportRequest: ::fidl_next::Encode<___E>,
5179{
5180    #[inline]
5181    fn encode_option(
5182        this: Option<Self>,
5183        encoder: &mut ___E,
5184        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5185    ) -> Result<(), ::fidl_next::EncodeError> {
5186        if let Some(inner) = this {
5187            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5188            ::fidl_next::WireBox::encode_present(out);
5189        } else {
5190            ::fidl_next::WireBox::encode_absent(out);
5191        }
5192
5193        Ok(())
5194    }
5195}
5196
5197impl<'de> ::fidl_next::FromWire<WireCapabilityStoreImportRequest<'de>>
5198    for CapabilityStoreImportRequest
5199{
5200    #[inline]
5201    fn from_wire(wire: WireCapabilityStoreImportRequest<'de>) -> Self {
5202        Self {
5203            id: ::fidl_next::FromWire::from_wire(wire.id),
5204
5205            capability: ::fidl_next::FromWire::from_wire(wire.capability),
5206        }
5207    }
5208}
5209
5210/// The wire type corresponding to [`CapabilityStoreImportRequest`].
5211#[derive(Debug)]
5212#[repr(C)]
5213pub struct WireCapabilityStoreImportRequest<'de> {
5214    pub id: ::fidl_next::WireU64,
5215
5216    pub capability: crate::WireCapability<'de>,
5217}
5218
5219unsafe impl ::fidl_next::Wire for WireCapabilityStoreImportRequest<'static> {
5220    type Decoded<'de> = WireCapabilityStoreImportRequest<'de>;
5221
5222    #[inline]
5223    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
5224}
5225
5226unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreImportRequest<'static>
5227where
5228    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5229    ___D: ::fidl_next::Decoder,
5230    ___D: ::fidl_next::fuchsia::HandleDecoder,
5231{
5232    fn decode(
5233        slot: ::fidl_next::Slot<'_, Self>,
5234        decoder: &mut ___D,
5235    ) -> Result<(), ::fidl_next::DecodeError> {
5236        ::fidl_next::munge! {
5237            let Self {
5238                mut id,
5239                mut capability,
5240
5241            } = slot;
5242        }
5243
5244        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
5245
5246        ::fidl_next::Decode::decode(capability.as_mut(), decoder)?;
5247
5248        Ok(())
5249    }
5250}
5251
5252#[derive(Debug)]
5253pub struct CapabilityStoreDirConnectorCreateRequest {
5254    pub id: u64,
5255
5256    pub receiver: ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::fuchsia::zx::Channel>,
5257}
5258
5259impl ::fidl_next::Encodable for CapabilityStoreDirConnectorCreateRequest {
5260    type Encoded = WireCapabilityStoreDirConnectorCreateRequest;
5261}
5262
5263unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDirConnectorCreateRequest
5264where
5265    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5266    ___E: ::fidl_next::fuchsia::HandleEncoder,
5267{
5268    #[inline]
5269    fn encode(
5270        self,
5271        encoder: &mut ___E,
5272        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5273    ) -> Result<(), ::fidl_next::EncodeError> {
5274        ::fidl_next::munge! {
5275            let Self::Encoded {
5276                id,
5277                receiver,
5278
5279            } = out;
5280        }
5281
5282        ::fidl_next::Encode::encode(self.id, encoder, id)?;
5283
5284        ::fidl_next::Encode::encode(self.receiver, encoder, receiver)?;
5285
5286        Ok(())
5287    }
5288}
5289
5290impl ::fidl_next::EncodableOption for CapabilityStoreDirConnectorCreateRequest {
5291    type EncodedOption =
5292        ::fidl_next::WireBox<'static, WireCapabilityStoreDirConnectorCreateRequest>;
5293}
5294
5295unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDirConnectorCreateRequest
5296where
5297    ___E: ::fidl_next::Encoder + ?Sized,
5298    CapabilityStoreDirConnectorCreateRequest: ::fidl_next::Encode<___E>,
5299{
5300    #[inline]
5301    fn encode_option(
5302        this: Option<Self>,
5303        encoder: &mut ___E,
5304        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5305    ) -> Result<(), ::fidl_next::EncodeError> {
5306        if let Some(inner) = this {
5307            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5308            ::fidl_next::WireBox::encode_present(out);
5309        } else {
5310            ::fidl_next::WireBox::encode_absent(out);
5311        }
5312
5313        Ok(())
5314    }
5315}
5316
5317impl ::fidl_next::FromWire<WireCapabilityStoreDirConnectorCreateRequest>
5318    for CapabilityStoreDirConnectorCreateRequest
5319{
5320    #[inline]
5321    fn from_wire(wire: WireCapabilityStoreDirConnectorCreateRequest) -> Self {
5322        Self {
5323            id: ::fidl_next::FromWire::from_wire(wire.id),
5324
5325            receiver: ::fidl_next::FromWire::from_wire(wire.receiver),
5326        }
5327    }
5328}
5329
5330/// The wire type corresponding to [`CapabilityStoreDirConnectorCreateRequest`].
5331#[derive(Debug)]
5332#[repr(C)]
5333pub struct WireCapabilityStoreDirConnectorCreateRequest {
5334    pub id: ::fidl_next::WireU64,
5335
5336    pub receiver: ::fidl_next::ClientEnd<crate::DirReceiver, ::fidl_next::fuchsia::WireChannel>,
5337}
5338
5339unsafe impl ::fidl_next::Wire for WireCapabilityStoreDirConnectorCreateRequest {
5340    type Decoded<'de> = WireCapabilityStoreDirConnectorCreateRequest;
5341
5342    #[inline]
5343    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5344        unsafe {
5345            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5346        }
5347    }
5348}
5349
5350unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDirConnectorCreateRequest
5351where
5352    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5353    ___D: ::fidl_next::fuchsia::HandleDecoder,
5354{
5355    fn decode(
5356        slot: ::fidl_next::Slot<'_, Self>,
5357        decoder: &mut ___D,
5358    ) -> Result<(), ::fidl_next::DecodeError> {
5359        ::fidl_next::munge! {
5360            let Self {
5361                mut id,
5362                mut receiver,
5363
5364            } = slot;
5365        }
5366
5367        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
5368
5369        ::fidl_next::Decode::decode(receiver.as_mut(), decoder)?;
5370
5371        Ok(())
5372    }
5373}
5374
5375#[derive(Debug)]
5376pub struct CapabilityStoreDirConnectorOpenRequest {
5377    pub id: u64,
5378
5379    pub server_end: ::fidl_next::ServerEnd<
5380        ::fidl_next_fuchsia_io::Directory,
5381        ::fidl_next::fuchsia::zx::Channel,
5382    >,
5383}
5384
5385impl ::fidl_next::Encodable for CapabilityStoreDirConnectorOpenRequest {
5386    type Encoded = WireCapabilityStoreDirConnectorOpenRequest;
5387}
5388
5389unsafe impl<___E> ::fidl_next::Encode<___E> for CapabilityStoreDirConnectorOpenRequest
5390where
5391    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5392    ___E: ::fidl_next::fuchsia::HandleEncoder,
5393{
5394    #[inline]
5395    fn encode(
5396        self,
5397        encoder: &mut ___E,
5398        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5399    ) -> Result<(), ::fidl_next::EncodeError> {
5400        ::fidl_next::munge! {
5401            let Self::Encoded {
5402                id,
5403                server_end,
5404
5405            } = out;
5406        }
5407
5408        ::fidl_next::Encode::encode(self.id, encoder, id)?;
5409
5410        ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
5411
5412        Ok(())
5413    }
5414}
5415
5416impl ::fidl_next::EncodableOption for CapabilityStoreDirConnectorOpenRequest {
5417    type EncodedOption = ::fidl_next::WireBox<'static, WireCapabilityStoreDirConnectorOpenRequest>;
5418}
5419
5420unsafe impl<___E> ::fidl_next::EncodeOption<___E> for CapabilityStoreDirConnectorOpenRequest
5421where
5422    ___E: ::fidl_next::Encoder + ?Sized,
5423    CapabilityStoreDirConnectorOpenRequest: ::fidl_next::Encode<___E>,
5424{
5425    #[inline]
5426    fn encode_option(
5427        this: Option<Self>,
5428        encoder: &mut ___E,
5429        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
5430    ) -> Result<(), ::fidl_next::EncodeError> {
5431        if let Some(inner) = this {
5432            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
5433            ::fidl_next::WireBox::encode_present(out);
5434        } else {
5435            ::fidl_next::WireBox::encode_absent(out);
5436        }
5437
5438        Ok(())
5439    }
5440}
5441
5442impl ::fidl_next::FromWire<WireCapabilityStoreDirConnectorOpenRequest>
5443    for CapabilityStoreDirConnectorOpenRequest
5444{
5445    #[inline]
5446    fn from_wire(wire: WireCapabilityStoreDirConnectorOpenRequest) -> Self {
5447        Self {
5448            id: ::fidl_next::FromWire::from_wire(wire.id),
5449
5450            server_end: ::fidl_next::FromWire::from_wire(wire.server_end),
5451        }
5452    }
5453}
5454
5455/// The wire type corresponding to [`CapabilityStoreDirConnectorOpenRequest`].
5456#[derive(Debug)]
5457#[repr(C)]
5458pub struct WireCapabilityStoreDirConnectorOpenRequest {
5459    pub id: ::fidl_next::WireU64,
5460
5461    pub server_end: ::fidl_next::ServerEnd<
5462        ::fidl_next_fuchsia_io::Directory,
5463        ::fidl_next::fuchsia::WireChannel,
5464    >,
5465}
5466
5467unsafe impl ::fidl_next::Wire for WireCapabilityStoreDirConnectorOpenRequest {
5468    type Decoded<'de> = WireCapabilityStoreDirConnectorOpenRequest;
5469
5470    #[inline]
5471    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
5472        unsafe {
5473            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
5474        }
5475    }
5476}
5477
5478unsafe impl<___D> ::fidl_next::Decode<___D> for WireCapabilityStoreDirConnectorOpenRequest
5479where
5480    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
5481    ___D: ::fidl_next::fuchsia::HandleDecoder,
5482{
5483    fn decode(
5484        slot: ::fidl_next::Slot<'_, Self>,
5485        decoder: &mut ___D,
5486    ) -> Result<(), ::fidl_next::DecodeError> {
5487        ::fidl_next::munge! {
5488            let Self {
5489                mut id,
5490                mut server_end,
5491
5492            } = slot;
5493        }
5494
5495        ::fidl_next::Decode::decode(id.as_mut(), decoder)?;
5496
5497        ::fidl_next::Decode::decode(server_end.as_mut(), decoder)?;
5498
5499        Ok(())
5500    }
5501}
5502
5503/// The type corresponding to the CapabilityStore protocol.
5504#[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"]
5505#[derive(Debug)]
5506pub struct CapabilityStore;
5507
5508impl ::fidl_next::Discoverable for CapabilityStore {
5509    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.CapabilityStore";
5510}
5511
5512pub mod capability_store {
5513    pub mod prelude {
5514        pub use crate::{
5515            CapabilityStore, CapabilityStoreClientHandler, CapabilityStoreServerHandler,
5516            capability_store,
5517        };
5518
5519        pub use crate::CapabilityStoreConnectorCreateRequest;
5520
5521        pub use crate::CapabilityStoreConnectorOpenRequest;
5522
5523        pub use crate::CapabilityStoreDictionaryCopyRequest;
5524
5525        pub use crate::CapabilityStoreDictionaryCreateRequest;
5526
5527        pub use crate::CapabilityStoreDictionaryDrainRequest;
5528
5529        pub use crate::CapabilityStoreDictionaryEnumerateRequest;
5530
5531        pub use crate::CapabilityStoreDictionaryGetRequest;
5532
5533        pub use crate::CapabilityStoreDictionaryInsertRequest;
5534
5535        pub use crate::CapabilityStoreDictionaryKeysRequest;
5536
5537        pub use crate::CapabilityStoreDictionaryLegacyExportRequest;
5538
5539        pub use crate::CapabilityStoreDictionaryLegacyImportRequest;
5540
5541        pub use crate::CapabilityStoreDictionaryRemoveRequest;
5542
5543        pub use crate::CapabilityStoreDirConnectorCreateRequest;
5544
5545        pub use crate::CapabilityStoreDirConnectorOpenRequest;
5546
5547        pub use crate::CapabilityStoreDropRequest;
5548
5549        pub use crate::CapabilityStoreDuplicateRequest;
5550
5551        pub use crate::CapabilityStoreError;
5552
5553        pub use crate::CapabilityStoreExportRequest;
5554
5555        pub use crate::CapabilityStoreImportRequest;
5556
5557        pub use crate::CapabilityStoreConnectorCreateResponse;
5558
5559        pub use crate::CapabilityStoreConnectorOpenResponse;
5560
5561        pub use crate::CapabilityStoreDictionaryCopyResponse;
5562
5563        pub use crate::CapabilityStoreDictionaryCreateResponse;
5564
5565        pub use crate::CapabilityStoreDictionaryDrainResponse;
5566
5567        pub use crate::CapabilityStoreDictionaryEnumerateResponse;
5568
5569        pub use crate::CapabilityStoreDictionaryGetResponse;
5570
5571        pub use crate::CapabilityStoreDictionaryInsertResponse;
5572
5573        pub use crate::CapabilityStoreDictionaryKeysResponse;
5574
5575        pub use crate::CapabilityStoreDictionaryLegacyExportResponse;
5576
5577        pub use crate::CapabilityStoreDictionaryLegacyImportResponse;
5578
5579        pub use crate::CapabilityStoreDictionaryRemoveResponse;
5580
5581        pub use crate::CapabilityStoreDirConnectorCreateResponse;
5582
5583        pub use crate::CapabilityStoreDirConnectorOpenResponse;
5584
5585        pub use crate::CapabilityStoreDropResponse;
5586
5587        pub use crate::CapabilityStoreDuplicateResponse;
5588
5589        pub use crate::CapabilityStoreExportResponse;
5590
5591        pub use crate::CapabilityStoreImportResponse;
5592    }
5593
5594    pub struct Duplicate;
5595
5596    impl ::fidl_next::Method for Duplicate {
5597        const ORDINAL: u64 = 6727592627741008260;
5598
5599        type Protocol = crate::CapabilityStore;
5600
5601        type Request = crate::WireCapabilityStoreDuplicateRequest;
5602
5603        type Response = ::fidl_next::WireFlexibleResult<
5604            'static,
5605            crate::WireCapabilityStoreDuplicateResponse,
5606            crate::WireCapabilityStoreError,
5607        >;
5608    }
5609
5610    pub struct Drop;
5611
5612    impl ::fidl_next::Method for Drop {
5613        const ORDINAL: u64 = 753328233834620249;
5614
5615        type Protocol = crate::CapabilityStore;
5616
5617        type Request = crate::WireCapabilityStoreDropRequest;
5618
5619        type Response = ::fidl_next::WireFlexibleResult<
5620            'static,
5621            crate::WireCapabilityStoreDropResponse,
5622            crate::WireCapabilityStoreError,
5623        >;
5624    }
5625
5626    pub struct Export;
5627
5628    impl ::fidl_next::Method for Export {
5629        const ORDINAL: u64 = 226159162093533951;
5630
5631        type Protocol = crate::CapabilityStore;
5632
5633        type Request = crate::WireCapabilityStoreExportRequest;
5634
5635        type Response = ::fidl_next::WireFlexibleResult<
5636            'static,
5637            crate::WireCapabilityStoreExportResponse<'static>,
5638            crate::WireCapabilityStoreError,
5639        >;
5640    }
5641
5642    pub struct Import;
5643
5644    impl ::fidl_next::Method for Import {
5645        const ORDINAL: u64 = 2276030276116435867;
5646
5647        type Protocol = crate::CapabilityStore;
5648
5649        type Request = crate::WireCapabilityStoreImportRequest<'static>;
5650
5651        type Response = ::fidl_next::WireFlexibleResult<
5652            'static,
5653            crate::WireCapabilityStoreImportResponse,
5654            crate::WireCapabilityStoreError,
5655        >;
5656    }
5657
5658    pub struct ConnectorCreate;
5659
5660    impl ::fidl_next::Method for ConnectorCreate {
5661        const ORDINAL: u64 = 2979461408102095909;
5662
5663        type Protocol = crate::CapabilityStore;
5664
5665        type Request = crate::WireCapabilityStoreConnectorCreateRequest;
5666
5667        type Response = ::fidl_next::WireFlexibleResult<
5668            'static,
5669            crate::WireCapabilityStoreConnectorCreateResponse,
5670            crate::WireCapabilityStoreError,
5671        >;
5672    }
5673
5674    pub struct ConnectorOpen;
5675
5676    impl ::fidl_next::Method for ConnectorOpen {
5677        const ORDINAL: u64 = 6016362336453278623;
5678
5679        type Protocol = crate::CapabilityStore;
5680
5681        type Request = crate::WireCapabilityStoreConnectorOpenRequest;
5682
5683        type Response = ::fidl_next::WireFlexibleResult<
5684            'static,
5685            crate::WireCapabilityStoreConnectorOpenResponse,
5686            crate::WireCapabilityStoreError,
5687        >;
5688    }
5689
5690    pub struct DirConnectorCreate;
5691
5692    impl ::fidl_next::Method for DirConnectorCreate {
5693        const ORDINAL: u64 = 1756747594275428795;
5694
5695        type Protocol = crate::CapabilityStore;
5696
5697        type Request = crate::WireCapabilityStoreDirConnectorCreateRequest;
5698
5699        type Response = ::fidl_next::WireFlexibleResult<
5700            'static,
5701            crate::WireCapabilityStoreDirConnectorCreateResponse,
5702            crate::WireCapabilityStoreError,
5703        >;
5704    }
5705
5706    pub struct DirConnectorOpen;
5707
5708    impl ::fidl_next::Method for DirConnectorOpen {
5709        const ORDINAL: u64 = 6219704004220369153;
5710
5711        type Protocol = crate::CapabilityStore;
5712
5713        type Request = crate::WireCapabilityStoreDirConnectorOpenRequest;
5714
5715        type Response = ::fidl_next::WireFlexibleResult<
5716            'static,
5717            crate::WireCapabilityStoreDirConnectorOpenResponse,
5718            crate::WireCapabilityStoreError,
5719        >;
5720    }
5721
5722    pub struct DictionaryCreate;
5723
5724    impl ::fidl_next::Method for DictionaryCreate {
5725        const ORDINAL: u64 = 7608770958894948499;
5726
5727        type Protocol = crate::CapabilityStore;
5728
5729        type Request = crate::WireCapabilityStoreDictionaryCreateRequest;
5730
5731        type Response = ::fidl_next::WireFlexibleResult<
5732            'static,
5733            crate::WireCapabilityStoreDictionaryCreateResponse,
5734            crate::WireCapabilityStoreError,
5735        >;
5736    }
5737
5738    pub struct DictionaryLegacyImport;
5739
5740    impl ::fidl_next::Method for DictionaryLegacyImport {
5741        const ORDINAL: u64 = 8285893703432012383;
5742
5743        type Protocol = crate::CapabilityStore;
5744
5745        type Request = crate::WireCapabilityStoreDictionaryLegacyImportRequest;
5746
5747        type Response = ::fidl_next::WireFlexibleResult<
5748            'static,
5749            crate::WireCapabilityStoreDictionaryLegacyImportResponse,
5750            crate::WireCapabilityStoreError,
5751        >;
5752    }
5753
5754    pub struct DictionaryLegacyExport;
5755
5756    impl ::fidl_next::Method for DictionaryLegacyExport {
5757        const ORDINAL: u64 = 4647175832683306445;
5758
5759        type Protocol = crate::CapabilityStore;
5760
5761        type Request = crate::WireCapabilityStoreDictionaryLegacyExportRequest;
5762
5763        type Response = ::fidl_next::WireFlexibleResult<
5764            'static,
5765            crate::WireCapabilityStoreDictionaryLegacyExportResponse,
5766            crate::WireCapabilityStoreError,
5767        >;
5768    }
5769
5770    pub struct DictionaryInsert;
5771
5772    impl ::fidl_next::Method for DictionaryInsert {
5773        const ORDINAL: u64 = 8575443262986538023;
5774
5775        type Protocol = crate::CapabilityStore;
5776
5777        type Request = crate::WireCapabilityStoreDictionaryInsertRequest<'static>;
5778
5779        type Response = ::fidl_next::WireFlexibleResult<
5780            'static,
5781            crate::WireCapabilityStoreDictionaryInsertResponse,
5782            crate::WireCapabilityStoreError,
5783        >;
5784    }
5785
5786    pub struct DictionaryGet;
5787
5788    impl ::fidl_next::Method for DictionaryGet {
5789        const ORDINAL: u64 = 5592951026866236882;
5790
5791        type Protocol = crate::CapabilityStore;
5792
5793        type Request = crate::WireCapabilityStoreDictionaryGetRequest<'static>;
5794
5795        type Response = ::fidl_next::WireFlexibleResult<
5796            'static,
5797            crate::WireCapabilityStoreDictionaryGetResponse,
5798            crate::WireCapabilityStoreError,
5799        >;
5800    }
5801
5802    pub struct DictionaryRemove;
5803
5804    impl ::fidl_next::Method for DictionaryRemove {
5805        const ORDINAL: u64 = 343892214579320051;
5806
5807        type Protocol = crate::CapabilityStore;
5808
5809        type Request = crate::WireCapabilityStoreDictionaryRemoveRequest<'static>;
5810
5811        type Response = ::fidl_next::WireFlexibleResult<
5812            'static,
5813            crate::WireCapabilityStoreDictionaryRemoveResponse,
5814            crate::WireCapabilityStoreError,
5815        >;
5816    }
5817
5818    pub struct DictionaryCopy;
5819
5820    impl ::fidl_next::Method for DictionaryCopy {
5821        const ORDINAL: u64 = 3977783339739362383;
5822
5823        type Protocol = crate::CapabilityStore;
5824
5825        type Request = crate::WireCapabilityStoreDictionaryCopyRequest;
5826
5827        type Response = ::fidl_next::WireFlexibleResult<
5828            'static,
5829            crate::WireCapabilityStoreDictionaryCopyResponse,
5830            crate::WireCapabilityStoreError,
5831        >;
5832    }
5833
5834    pub struct DictionaryKeys;
5835
5836    impl ::fidl_next::Method for DictionaryKeys {
5837        const ORDINAL: u64 = 597577248872787102;
5838
5839        type Protocol = crate::CapabilityStore;
5840
5841        type Request = crate::WireCapabilityStoreDictionaryKeysRequest;
5842
5843        type Response = ::fidl_next::WireFlexibleResult<
5844            'static,
5845            crate::WireCapabilityStoreDictionaryKeysResponse,
5846            crate::WireCapabilityStoreError,
5847        >;
5848    }
5849
5850    pub struct DictionaryEnumerate;
5851
5852    impl ::fidl_next::Method for DictionaryEnumerate {
5853        const ORDINAL: u64 = 964467096271472193;
5854
5855        type Protocol = crate::CapabilityStore;
5856
5857        type Request = crate::WireCapabilityStoreDictionaryEnumerateRequest;
5858
5859        type Response = ::fidl_next::WireFlexibleResult<
5860            'static,
5861            crate::WireCapabilityStoreDictionaryEnumerateResponse,
5862            crate::WireCapabilityStoreError,
5863        >;
5864    }
5865
5866    pub struct DictionaryDrain;
5867
5868    impl ::fidl_next::Method for DictionaryDrain {
5869        const ORDINAL: u64 = 2928364469569621208;
5870
5871        type Protocol = crate::CapabilityStore;
5872
5873        type Request = crate::WireCapabilityStoreDictionaryDrainRequest;
5874
5875        type Response = ::fidl_next::WireFlexibleResult<
5876            'static,
5877            crate::WireCapabilityStoreDictionaryDrainResponse,
5878            crate::WireCapabilityStoreError,
5879        >;
5880    }
5881
5882    mod ___detail {
5883
5884        pub struct Duplicate<T0, T1> {
5885            id: T0,
5886
5887            dest_id: T1,
5888        }
5889
5890        impl<T0, T1> ::fidl_next::Encodable for Duplicate<T0, T1>
5891        where
5892            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
5893            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
5894        {
5895            type Encoded = crate::WireCapabilityStoreDuplicateRequest;
5896        }
5897
5898        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Duplicate<T0, T1>
5899        where
5900            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5901            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
5902            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
5903        {
5904            #[inline]
5905            fn encode(
5906                self,
5907                encoder: &mut ___E,
5908                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5909            ) -> Result<(), ::fidl_next::EncodeError> {
5910                ::fidl_next::munge! {
5911                    let Self::Encoded {
5912                        id,
5913                        dest_id,
5914
5915                    } = out;
5916                }
5917
5918                ::fidl_next::Encode::encode(self.id, encoder, id)?;
5919
5920                ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
5921
5922                Ok(())
5923            }
5924        }
5925
5926        pub struct Drop<T0> {
5927            id: T0,
5928        }
5929
5930        impl<T0> ::fidl_next::Encodable for Drop<T0>
5931        where
5932            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
5933        {
5934            type Encoded = crate::WireCapabilityStoreDropRequest;
5935        }
5936
5937        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Drop<T0>
5938        where
5939            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5940            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
5941        {
5942            #[inline]
5943            fn encode(
5944                self,
5945                encoder: &mut ___E,
5946                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5947            ) -> Result<(), ::fidl_next::EncodeError> {
5948                ::fidl_next::munge! {
5949                    let Self::Encoded {
5950                        id,
5951
5952                    } = out;
5953                }
5954
5955                ::fidl_next::Encode::encode(self.id, encoder, id)?;
5956
5957                Ok(())
5958            }
5959        }
5960
5961        pub struct Export<T0> {
5962            id: T0,
5963        }
5964
5965        impl<T0> ::fidl_next::Encodable for Export<T0>
5966        where
5967            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
5968        {
5969            type Encoded = crate::WireCapabilityStoreExportRequest;
5970        }
5971
5972        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Export<T0>
5973        where
5974            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5975            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
5976        {
5977            #[inline]
5978            fn encode(
5979                self,
5980                encoder: &mut ___E,
5981                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
5982            ) -> Result<(), ::fidl_next::EncodeError> {
5983                ::fidl_next::munge! {
5984                    let Self::Encoded {
5985                        id,
5986
5987                    } = out;
5988                }
5989
5990                ::fidl_next::Encode::encode(self.id, encoder, id)?;
5991
5992                Ok(())
5993            }
5994        }
5995
5996        pub struct Import<T0, T1> {
5997            id: T0,
5998
5999            capability: T1,
6000        }
6001
6002        impl<T0, T1> ::fidl_next::Encodable for Import<T0, T1>
6003        where
6004            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6005            T1: ::fidl_next::Encodable<Encoded = crate::WireCapability<'static>>,
6006        {
6007            type Encoded = crate::WireCapabilityStoreImportRequest<'static>;
6008        }
6009
6010        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for Import<T0, T1>
6011        where
6012            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6013            ___E: ::fidl_next::Encoder,
6014            ___E: ::fidl_next::fuchsia::HandleEncoder,
6015            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6016            T1: ::fidl_next::Encode<___E, Encoded = crate::WireCapability<'static>>,
6017        {
6018            #[inline]
6019            fn encode(
6020                self,
6021                encoder: &mut ___E,
6022                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6023            ) -> Result<(), ::fidl_next::EncodeError> {
6024                ::fidl_next::munge! {
6025                    let Self::Encoded {
6026                        id,
6027                        capability,
6028
6029                    } = out;
6030                }
6031
6032                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6033
6034                ::fidl_next::Encode::encode(self.capability, encoder, capability)?;
6035
6036                Ok(())
6037            }
6038        }
6039
6040        pub struct ConnectorCreate<T0, T1> {
6041            id: T0,
6042
6043            receiver: T1,
6044        }
6045
6046        impl<T0, T1> ::fidl_next::Encodable for ConnectorCreate<T0, T1>
6047        where
6048            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6049            T1: ::fidl_next::Encodable<
6050                    Encoded = ::fidl_next::ClientEnd<
6051                        crate::Receiver,
6052                        ::fidl_next::fuchsia::WireChannel,
6053                    >,
6054                >,
6055        {
6056            type Encoded = crate::WireCapabilityStoreConnectorCreateRequest;
6057        }
6058
6059        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ConnectorCreate<T0, T1>
6060        where
6061            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6062            ___E: ::fidl_next::fuchsia::HandleEncoder,
6063            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6064            T1: ::fidl_next::Encode<
6065                    ___E,
6066                    Encoded = ::fidl_next::ClientEnd<
6067                        crate::Receiver,
6068                        ::fidl_next::fuchsia::WireChannel,
6069                    >,
6070                >,
6071        {
6072            #[inline]
6073            fn encode(
6074                self,
6075                encoder: &mut ___E,
6076                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6077            ) -> Result<(), ::fidl_next::EncodeError> {
6078                ::fidl_next::munge! {
6079                    let Self::Encoded {
6080                        id,
6081                        receiver,
6082
6083                    } = out;
6084                }
6085
6086                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6087
6088                ::fidl_next::Encode::encode(self.receiver, encoder, receiver)?;
6089
6090                Ok(())
6091            }
6092        }
6093
6094        pub struct ConnectorOpen<T0, T1> {
6095            id: T0,
6096
6097            server_end: T1,
6098        }
6099
6100        impl<T0, T1> ::fidl_next::Encodable for ConnectorOpen<T0, T1>
6101        where
6102            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6103            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireChannel>,
6104        {
6105            type Encoded = crate::WireCapabilityStoreConnectorOpenRequest;
6106        }
6107
6108        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for ConnectorOpen<T0, T1>
6109        where
6110            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6111            ___E: ::fidl_next::fuchsia::HandleEncoder,
6112            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6113            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireChannel>,
6114        {
6115            #[inline]
6116            fn encode(
6117                self,
6118                encoder: &mut ___E,
6119                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6120            ) -> Result<(), ::fidl_next::EncodeError> {
6121                ::fidl_next::munge! {
6122                    let Self::Encoded {
6123                        id,
6124                        server_end,
6125
6126                    } = out;
6127                }
6128
6129                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6130
6131                ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
6132
6133                Ok(())
6134            }
6135        }
6136
6137        pub struct DirConnectorCreate<T0, T1> {
6138            id: T0,
6139
6140            receiver: T1,
6141        }
6142
6143        impl<T0, T1> ::fidl_next::Encodable for DirConnectorCreate<T0, T1>
6144        where
6145            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6146            T1: ::fidl_next::Encodable<
6147                    Encoded = ::fidl_next::ClientEnd<
6148                        crate::DirReceiver,
6149                        ::fidl_next::fuchsia::WireChannel,
6150                    >,
6151                >,
6152        {
6153            type Encoded = crate::WireCapabilityStoreDirConnectorCreateRequest;
6154        }
6155
6156        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DirConnectorCreate<T0, T1>
6157        where
6158            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6159            ___E: ::fidl_next::fuchsia::HandleEncoder,
6160            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6161            T1: ::fidl_next::Encode<
6162                    ___E,
6163                    Encoded = ::fidl_next::ClientEnd<
6164                        crate::DirReceiver,
6165                        ::fidl_next::fuchsia::WireChannel,
6166                    >,
6167                >,
6168        {
6169            #[inline]
6170            fn encode(
6171                self,
6172                encoder: &mut ___E,
6173                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6174            ) -> Result<(), ::fidl_next::EncodeError> {
6175                ::fidl_next::munge! {
6176                    let Self::Encoded {
6177                        id,
6178                        receiver,
6179
6180                    } = out;
6181                }
6182
6183                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6184
6185                ::fidl_next::Encode::encode(self.receiver, encoder, receiver)?;
6186
6187                Ok(())
6188            }
6189        }
6190
6191        pub struct DirConnectorOpen<T0, T1> {
6192            id: T0,
6193
6194            server_end: T1,
6195        }
6196
6197        impl<T0, T1> ::fidl_next::Encodable for DirConnectorOpen<T0, T1>
6198        where
6199            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6200            T1: ::fidl_next::Encodable<
6201                    Encoded = ::fidl_next::ServerEnd<
6202                        ::fidl_next_fuchsia_io::Directory,
6203                        ::fidl_next::fuchsia::WireChannel,
6204                    >,
6205                >,
6206        {
6207            type Encoded = crate::WireCapabilityStoreDirConnectorOpenRequest;
6208        }
6209
6210        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DirConnectorOpen<T0, T1>
6211        where
6212            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6213            ___E: ::fidl_next::fuchsia::HandleEncoder,
6214            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6215            T1: ::fidl_next::Encode<
6216                    ___E,
6217                    Encoded = ::fidl_next::ServerEnd<
6218                        ::fidl_next_fuchsia_io::Directory,
6219                        ::fidl_next::fuchsia::WireChannel,
6220                    >,
6221                >,
6222        {
6223            #[inline]
6224            fn encode(
6225                self,
6226                encoder: &mut ___E,
6227                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6228            ) -> Result<(), ::fidl_next::EncodeError> {
6229                ::fidl_next::munge! {
6230                    let Self::Encoded {
6231                        id,
6232                        server_end,
6233
6234                    } = out;
6235                }
6236
6237                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6238
6239                ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
6240
6241                Ok(())
6242            }
6243        }
6244
6245        pub struct DictionaryCreate<T0> {
6246            id: T0,
6247        }
6248
6249        impl<T0> ::fidl_next::Encodable for DictionaryCreate<T0>
6250        where
6251            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6252        {
6253            type Encoded = crate::WireCapabilityStoreDictionaryCreateRequest;
6254        }
6255
6256        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for DictionaryCreate<T0>
6257        where
6258            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6259            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6260        {
6261            #[inline]
6262            fn encode(
6263                self,
6264                encoder: &mut ___E,
6265                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6266            ) -> Result<(), ::fidl_next::EncodeError> {
6267                ::fidl_next::munge! {
6268                    let Self::Encoded {
6269                        id,
6270
6271                    } = out;
6272                }
6273
6274                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6275
6276                Ok(())
6277            }
6278        }
6279
6280        pub struct DictionaryLegacyImport<T0, T1> {
6281            id: T0,
6282
6283            client_end: T1,
6284        }
6285
6286        impl<T0, T1> ::fidl_next::Encodable for DictionaryLegacyImport<T0, T1>
6287        where
6288            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6289            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireChannel>,
6290        {
6291            type Encoded = crate::WireCapabilityStoreDictionaryLegacyImportRequest;
6292        }
6293
6294        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryLegacyImport<T0, T1>
6295        where
6296            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6297            ___E: ::fidl_next::fuchsia::HandleEncoder,
6298            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6299            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireChannel>,
6300        {
6301            #[inline]
6302            fn encode(
6303                self,
6304                encoder: &mut ___E,
6305                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6306            ) -> Result<(), ::fidl_next::EncodeError> {
6307                ::fidl_next::munge! {
6308                    let Self::Encoded {
6309                        id,
6310                        client_end,
6311
6312                    } = out;
6313                }
6314
6315                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6316
6317                ::fidl_next::Encode::encode(self.client_end, encoder, client_end)?;
6318
6319                Ok(())
6320            }
6321        }
6322
6323        pub struct DictionaryLegacyExport<T0, T1> {
6324            id: T0,
6325
6326            server_end: T1,
6327        }
6328
6329        impl<T0, T1> ::fidl_next::Encodable for DictionaryLegacyExport<T0, T1>
6330        where
6331            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6332            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireChannel>,
6333        {
6334            type Encoded = crate::WireCapabilityStoreDictionaryLegacyExportRequest;
6335        }
6336
6337        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryLegacyExport<T0, T1>
6338        where
6339            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6340            ___E: ::fidl_next::fuchsia::HandleEncoder,
6341            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6342            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireChannel>,
6343        {
6344            #[inline]
6345            fn encode(
6346                self,
6347                encoder: &mut ___E,
6348                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6349            ) -> Result<(), ::fidl_next::EncodeError> {
6350                ::fidl_next::munge! {
6351                    let Self::Encoded {
6352                        id,
6353                        server_end,
6354
6355                    } = out;
6356                }
6357
6358                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6359
6360                ::fidl_next::Encode::encode(self.server_end, encoder, server_end)?;
6361
6362                Ok(())
6363            }
6364        }
6365
6366        pub struct DictionaryInsert<T0, T1> {
6367            id: T0,
6368
6369            item: T1,
6370        }
6371
6372        impl<T0, T1> ::fidl_next::Encodable for DictionaryInsert<T0, T1>
6373        where
6374            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6375            T1: ::fidl_next::Encodable<Encoded = crate::WireDictionaryItem<'static>>,
6376        {
6377            type Encoded = crate::WireCapabilityStoreDictionaryInsertRequest<'static>;
6378        }
6379
6380        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryInsert<T0, T1>
6381        where
6382            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6383            ___E: ::fidl_next::Encoder,
6384            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6385            T1: ::fidl_next::Encode<___E, Encoded = crate::WireDictionaryItem<'static>>,
6386        {
6387            #[inline]
6388            fn encode(
6389                self,
6390                encoder: &mut ___E,
6391                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6392            ) -> Result<(), ::fidl_next::EncodeError> {
6393                ::fidl_next::munge! {
6394                    let Self::Encoded {
6395                        id,
6396                        item,
6397
6398                    } = out;
6399                }
6400
6401                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6402
6403                ::fidl_next::Encode::encode(self.item, encoder, item)?;
6404
6405                Ok(())
6406            }
6407        }
6408
6409        pub struct DictionaryGet<T0, T1, T2> {
6410            id: T0,
6411
6412            key: T1,
6413
6414            dest_id: T2,
6415        }
6416
6417        impl<T0, T1, T2> ::fidl_next::Encodable for DictionaryGet<T0, T1, T2>
6418        where
6419            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6420            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
6421            T2: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6422        {
6423            type Encoded = crate::WireCapabilityStoreDictionaryGetRequest<'static>;
6424        }
6425
6426        unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for DictionaryGet<T0, T1, T2>
6427        where
6428            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6429            ___E: ::fidl_next::Encoder,
6430            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6431            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
6432            T2: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6433        {
6434            #[inline]
6435            fn encode(
6436                self,
6437                encoder: &mut ___E,
6438                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6439            ) -> Result<(), ::fidl_next::EncodeError> {
6440                ::fidl_next::munge! {
6441                    let Self::Encoded {
6442                        id,
6443                        key,
6444                        dest_id,
6445
6446                    } = out;
6447                }
6448
6449                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6450
6451                ::fidl_next::Encode::encode(self.key, encoder, key)?;
6452
6453                ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
6454
6455                Ok(())
6456            }
6457        }
6458
6459        pub struct DictionaryRemove<T0, T1, T2> {
6460            id: T0,
6461
6462            key: T1,
6463
6464            dest_id: T2,
6465        }
6466
6467        impl<T0, T1, T2> ::fidl_next::Encodable for DictionaryRemove<T0, T1, T2>
6468        where
6469            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6470            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireString<'static>>,
6471            T2: ::fidl_next::Encodable<
6472                    Encoded = ::fidl_next::WireBox<'static, crate::WireWrappedCapabilityId>,
6473                >,
6474        {
6475            type Encoded = crate::WireCapabilityStoreDictionaryRemoveRequest<'static>;
6476        }
6477
6478        unsafe impl<___E, T0, T1, T2> ::fidl_next::Encode<___E> for DictionaryRemove<T0, T1, T2>
6479        where
6480            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6481            ___E: ::fidl_next::Encoder,
6482            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6483            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireString<'static>>,
6484            T2: ::fidl_next::Encode<
6485                    ___E,
6486                    Encoded = ::fidl_next::WireBox<'static, crate::WireWrappedCapabilityId>,
6487                >,
6488        {
6489            #[inline]
6490            fn encode(
6491                self,
6492                encoder: &mut ___E,
6493                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6494            ) -> Result<(), ::fidl_next::EncodeError> {
6495                ::fidl_next::munge! {
6496                    let Self::Encoded {
6497                        id,
6498                        key,
6499                        dest_id,
6500
6501                    } = out;
6502                }
6503
6504                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6505
6506                ::fidl_next::Encode::encode(self.key, encoder, key)?;
6507
6508                ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
6509
6510                Ok(())
6511            }
6512        }
6513
6514        pub struct DictionaryCopy<T0, T1> {
6515            id: T0,
6516
6517            dest_id: T1,
6518        }
6519
6520        impl<T0, T1> ::fidl_next::Encodable for DictionaryCopy<T0, T1>
6521        where
6522            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6523            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6524        {
6525            type Encoded = crate::WireCapabilityStoreDictionaryCopyRequest;
6526        }
6527
6528        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryCopy<T0, T1>
6529        where
6530            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6531            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6532            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6533        {
6534            #[inline]
6535            fn encode(
6536                self,
6537                encoder: &mut ___E,
6538                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6539            ) -> Result<(), ::fidl_next::EncodeError> {
6540                ::fidl_next::munge! {
6541                    let Self::Encoded {
6542                        id,
6543                        dest_id,
6544
6545                    } = out;
6546                }
6547
6548                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6549
6550                ::fidl_next::Encode::encode(self.dest_id, encoder, dest_id)?;
6551
6552                Ok(())
6553            }
6554        }
6555
6556        pub struct DictionaryKeys<T0, T1> {
6557            id: T0,
6558
6559            iterator: T1,
6560        }
6561
6562        impl<T0, T1> ::fidl_next::Encodable for DictionaryKeys<T0, T1>
6563        where
6564            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6565            T1: ::fidl_next::Encodable<
6566                    Encoded = ::fidl_next::ServerEnd<
6567                        crate::DictionaryKeysIterator,
6568                        ::fidl_next::fuchsia::WireChannel,
6569                    >,
6570                >,
6571        {
6572            type Encoded = crate::WireCapabilityStoreDictionaryKeysRequest;
6573        }
6574
6575        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryKeys<T0, T1>
6576        where
6577            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6578            ___E: ::fidl_next::fuchsia::HandleEncoder,
6579            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6580            T1: ::fidl_next::Encode<
6581                    ___E,
6582                    Encoded = ::fidl_next::ServerEnd<
6583                        crate::DictionaryKeysIterator,
6584                        ::fidl_next::fuchsia::WireChannel,
6585                    >,
6586                >,
6587        {
6588            #[inline]
6589            fn encode(
6590                self,
6591                encoder: &mut ___E,
6592                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6593            ) -> Result<(), ::fidl_next::EncodeError> {
6594                ::fidl_next::munge! {
6595                    let Self::Encoded {
6596                        id,
6597                        iterator,
6598
6599                    } = out;
6600                }
6601
6602                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6603
6604                ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
6605
6606                Ok(())
6607            }
6608        }
6609
6610        pub struct DictionaryEnumerate<T0, T1> {
6611            id: T0,
6612
6613            iterator: T1,
6614        }
6615
6616        impl<T0, T1> ::fidl_next::Encodable for DictionaryEnumerate<T0, T1>
6617        where
6618            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6619            T1: ::fidl_next::Encodable<
6620                    Encoded = ::fidl_next::ServerEnd<
6621                        crate::DictionaryEnumerateIterator,
6622                        ::fidl_next::fuchsia::WireChannel,
6623                    >,
6624                >,
6625        {
6626            type Encoded = crate::WireCapabilityStoreDictionaryEnumerateRequest;
6627        }
6628
6629        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryEnumerate<T0, T1>
6630        where
6631            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6632            ___E: ::fidl_next::fuchsia::HandleEncoder,
6633            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6634            T1: ::fidl_next::Encode<
6635                    ___E,
6636                    Encoded = ::fidl_next::ServerEnd<
6637                        crate::DictionaryEnumerateIterator,
6638                        ::fidl_next::fuchsia::WireChannel,
6639                    >,
6640                >,
6641        {
6642            #[inline]
6643            fn encode(
6644                self,
6645                encoder: &mut ___E,
6646                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6647            ) -> Result<(), ::fidl_next::EncodeError> {
6648                ::fidl_next::munge! {
6649                    let Self::Encoded {
6650                        id,
6651                        iterator,
6652
6653                    } = out;
6654                }
6655
6656                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6657
6658                ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
6659
6660                Ok(())
6661            }
6662        }
6663
6664        pub struct DictionaryDrain<T0, T1> {
6665            id: T0,
6666
6667            iterator: T1,
6668        }
6669
6670        impl<T0, T1> ::fidl_next::Encodable for DictionaryDrain<T0, T1>
6671        where
6672            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
6673            T1: ::fidl_next::Encodable<
6674                    Encoded = ::fidl_next::ServerEnd<
6675                        crate::DictionaryDrainIterator,
6676                        ::fidl_next::fuchsia::WireOptionalChannel,
6677                    >,
6678                >,
6679        {
6680            type Encoded = crate::WireCapabilityStoreDictionaryDrainRequest;
6681        }
6682
6683        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for DictionaryDrain<T0, T1>
6684        where
6685            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
6686            ___E: ::fidl_next::fuchsia::HandleEncoder,
6687            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
6688            T1: ::fidl_next::Encode<
6689                    ___E,
6690                    Encoded = ::fidl_next::ServerEnd<
6691                        crate::DictionaryDrainIterator,
6692                        ::fidl_next::fuchsia::WireOptionalChannel,
6693                    >,
6694                >,
6695        {
6696            #[inline]
6697            fn encode(
6698                self,
6699                encoder: &mut ___E,
6700                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
6701            ) -> Result<(), ::fidl_next::EncodeError> {
6702                ::fidl_next::munge! {
6703                    let Self::Encoded {
6704                        id,
6705                        iterator,
6706
6707                    } = out;
6708                }
6709
6710                ::fidl_next::Encode::encode(self.id, encoder, id)?;
6711
6712                ::fidl_next::Encode::encode(self.iterator, encoder, iterator)?;
6713
6714                Ok(())
6715            }
6716        }
6717
6718        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::CapabilityStore
6719        where
6720            ___T: ::fidl_next::Transport,
6721        {
6722            type ClientSender = CapabilityStoreClientSender<___T>;
6723            type ServerSender = CapabilityStoreServerSender<___T>;
6724        }
6725
6726        /// The client sender for the `CapabilityStore` protocol.
6727        #[repr(transparent)]
6728        pub struct CapabilityStoreClientSender<___T: ::fidl_next::Transport> {
6729            #[allow(dead_code)]
6730            sender: ::fidl_next::protocol::ClientSender<___T>,
6731        }
6732
6733        impl<___T> CapabilityStoreClientSender<___T>
6734        where
6735            ___T: ::fidl_next::Transport,
6736        {
6737            #[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"]
6738            pub fn duplicate(
6739                &self,
6740
6741                id: impl ::fidl_next::Encode<
6742                    <___T as ::fidl_next::Transport>::SendBuffer,
6743                    Encoded = ::fidl_next::WireU64,
6744                >,
6745
6746                dest_id: impl ::fidl_next::Encode<
6747                    <___T as ::fidl_next::Transport>::SendBuffer,
6748                    Encoded = ::fidl_next::WireU64,
6749                >,
6750            ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
6751            where
6752                <___T as ::fidl_next::Transport>::SendBuffer:
6753                    ::fidl_next::encoder::InternalHandleEncoder,
6754            {
6755                self.duplicate_with(Duplicate { id, dest_id })
6756            }
6757
6758            #[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"]
6759            pub fn duplicate_with<___R>(
6760                &self,
6761                request: ___R,
6762            ) -> ::fidl_next::TwoWayFuture<'_, super::Duplicate, ___T>
6763            where
6764                ___R: ::fidl_next::Encode<
6765                        <___T as ::fidl_next::Transport>::SendBuffer,
6766                        Encoded = crate::WireCapabilityStoreDuplicateRequest,
6767                    >,
6768            {
6769                ::fidl_next::TwoWayFuture::from_untyped(
6770                    self.sender.send_two_way(6727592627741008260, request),
6771                )
6772            }
6773
6774            #[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"]
6775            pub fn drop(
6776                &self,
6777
6778                id: impl ::fidl_next::Encode<
6779                    <___T as ::fidl_next::Transport>::SendBuffer,
6780                    Encoded = ::fidl_next::WireU64,
6781                >,
6782            ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
6783            where
6784                <___T as ::fidl_next::Transport>::SendBuffer:
6785                    ::fidl_next::encoder::InternalHandleEncoder,
6786            {
6787                self.drop_with(Drop { id })
6788            }
6789
6790            #[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"]
6791            pub fn drop_with<___R>(
6792                &self,
6793                request: ___R,
6794            ) -> ::fidl_next::TwoWayFuture<'_, super::Drop, ___T>
6795            where
6796                ___R: ::fidl_next::Encode<
6797                        <___T as ::fidl_next::Transport>::SendBuffer,
6798                        Encoded = crate::WireCapabilityStoreDropRequest,
6799                    >,
6800            {
6801                ::fidl_next::TwoWayFuture::from_untyped(
6802                    self.sender.send_two_way(753328233834620249, request),
6803                )
6804            }
6805
6806            #[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"]
6807            pub fn export(
6808                &self,
6809
6810                id: impl ::fidl_next::Encode<
6811                    <___T as ::fidl_next::Transport>::SendBuffer,
6812                    Encoded = ::fidl_next::WireU64,
6813                >,
6814            ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
6815            where
6816                <___T as ::fidl_next::Transport>::SendBuffer:
6817                    ::fidl_next::encoder::InternalHandleEncoder,
6818            {
6819                self.export_with(Export { id })
6820            }
6821
6822            #[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"]
6823            pub fn export_with<___R>(
6824                &self,
6825                request: ___R,
6826            ) -> ::fidl_next::TwoWayFuture<'_, super::Export, ___T>
6827            where
6828                ___R: ::fidl_next::Encode<
6829                        <___T as ::fidl_next::Transport>::SendBuffer,
6830                        Encoded = crate::WireCapabilityStoreExportRequest,
6831                    >,
6832            {
6833                ::fidl_next::TwoWayFuture::from_untyped(
6834                    self.sender.send_two_way(226159162093533951, request),
6835                )
6836            }
6837
6838            #[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"]
6839            pub fn import(
6840                &self,
6841
6842                id: impl ::fidl_next::Encode<
6843                    <___T as ::fidl_next::Transport>::SendBuffer,
6844                    Encoded = ::fidl_next::WireU64,
6845                >,
6846
6847                capability: impl ::fidl_next::Encode<
6848                    <___T as ::fidl_next::Transport>::SendBuffer,
6849                    Encoded = crate::WireCapability<'static>,
6850                >,
6851            ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
6852            where
6853                <___T as ::fidl_next::Transport>::SendBuffer:
6854                    ::fidl_next::encoder::InternalHandleEncoder,
6855                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
6856                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6857            {
6858                self.import_with(Import { id, capability })
6859            }
6860
6861            #[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"]
6862            pub fn import_with<___R>(
6863                &self,
6864                request: ___R,
6865            ) -> ::fidl_next::TwoWayFuture<'_, super::Import, ___T>
6866            where
6867                ___R: ::fidl_next::Encode<
6868                        <___T as ::fidl_next::Transport>::SendBuffer,
6869                        Encoded = crate::WireCapabilityStoreImportRequest<'static>,
6870                    >,
6871            {
6872                ::fidl_next::TwoWayFuture::from_untyped(
6873                    self.sender.send_two_way(2276030276116435867, request),
6874                )
6875            }
6876
6877            #[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"]
6878            pub fn connector_create(
6879                &self,
6880
6881                id: impl ::fidl_next::Encode<
6882                    <___T as ::fidl_next::Transport>::SendBuffer,
6883                    Encoded = ::fidl_next::WireU64,
6884                >,
6885
6886                receiver: impl ::fidl_next::Encode<
6887                    <___T as ::fidl_next::Transport>::SendBuffer,
6888                    Encoded = ::fidl_next::ClientEnd<
6889                        crate::Receiver,
6890                        ::fidl_next::fuchsia::WireChannel,
6891                    >,
6892                >,
6893            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
6894            where
6895                <___T as ::fidl_next::Transport>::SendBuffer:
6896                    ::fidl_next::encoder::InternalHandleEncoder,
6897                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6898            {
6899                self.connector_create_with(ConnectorCreate { id, receiver })
6900            }
6901
6902            #[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"]
6903            pub fn connector_create_with<___R>(
6904                &self,
6905                request: ___R,
6906            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorCreate, ___T>
6907            where
6908                ___R: ::fidl_next::Encode<
6909                        <___T as ::fidl_next::Transport>::SendBuffer,
6910                        Encoded = crate::WireCapabilityStoreConnectorCreateRequest,
6911                    >,
6912            {
6913                ::fidl_next::TwoWayFuture::from_untyped(
6914                    self.sender.send_two_way(2979461408102095909, request),
6915                )
6916            }
6917
6918            #[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"]
6919            pub fn connector_open(
6920                &self,
6921
6922                id: impl ::fidl_next::Encode<
6923                    <___T as ::fidl_next::Transport>::SendBuffer,
6924                    Encoded = ::fidl_next::WireU64,
6925                >,
6926
6927                server_end: impl ::fidl_next::Encode<
6928                    <___T as ::fidl_next::Transport>::SendBuffer,
6929                    Encoded = ::fidl_next::fuchsia::WireChannel,
6930                >,
6931            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
6932            where
6933                <___T as ::fidl_next::Transport>::SendBuffer:
6934                    ::fidl_next::encoder::InternalHandleEncoder,
6935                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6936            {
6937                self.connector_open_with(ConnectorOpen { id, server_end })
6938            }
6939
6940            #[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"]
6941            pub fn connector_open_with<___R>(
6942                &self,
6943                request: ___R,
6944            ) -> ::fidl_next::TwoWayFuture<'_, super::ConnectorOpen, ___T>
6945            where
6946                ___R: ::fidl_next::Encode<
6947                        <___T as ::fidl_next::Transport>::SendBuffer,
6948                        Encoded = crate::WireCapabilityStoreConnectorOpenRequest,
6949                    >,
6950            {
6951                ::fidl_next::TwoWayFuture::from_untyped(
6952                    self.sender.send_two_way(6016362336453278623, request),
6953                )
6954            }
6955
6956            #[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"]
6957            pub fn dir_connector_create(
6958                &self,
6959
6960                id: impl ::fidl_next::Encode<
6961                    <___T as ::fidl_next::Transport>::SendBuffer,
6962                    Encoded = ::fidl_next::WireU64,
6963                >,
6964
6965                receiver: impl ::fidl_next::Encode<
6966                    <___T as ::fidl_next::Transport>::SendBuffer,
6967                    Encoded = ::fidl_next::ClientEnd<
6968                        crate::DirReceiver,
6969                        ::fidl_next::fuchsia::WireChannel,
6970                    >,
6971                >,
6972            ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
6973            where
6974                <___T as ::fidl_next::Transport>::SendBuffer:
6975                    ::fidl_next::encoder::InternalHandleEncoder,
6976                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
6977            {
6978                self.dir_connector_create_with(DirConnectorCreate { id, receiver })
6979            }
6980
6981            #[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"]
6982            pub fn dir_connector_create_with<___R>(
6983                &self,
6984                request: ___R,
6985            ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorCreate, ___T>
6986            where
6987                ___R: ::fidl_next::Encode<
6988                        <___T as ::fidl_next::Transport>::SendBuffer,
6989                        Encoded = crate::WireCapabilityStoreDirConnectorCreateRequest,
6990                    >,
6991            {
6992                ::fidl_next::TwoWayFuture::from_untyped(
6993                    self.sender.send_two_way(1756747594275428795, request),
6994                )
6995            }
6996
6997            #[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"]
6998            pub fn dir_connector_open(
6999                &self,
7000
7001                id: impl ::fidl_next::Encode<
7002                    <___T as ::fidl_next::Transport>::SendBuffer,
7003                    Encoded = ::fidl_next::WireU64,
7004                >,
7005
7006                server_end: impl ::fidl_next::Encode<
7007                    <___T as ::fidl_next::Transport>::SendBuffer,
7008                    Encoded = ::fidl_next::ServerEnd<
7009                        ::fidl_next_fuchsia_io::Directory,
7010                        ::fidl_next::fuchsia::WireChannel,
7011                    >,
7012                >,
7013            ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorOpen, ___T>
7014            where
7015                <___T as ::fidl_next::Transport>::SendBuffer:
7016                    ::fidl_next::encoder::InternalHandleEncoder,
7017                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7018            {
7019                self.dir_connector_open_with(DirConnectorOpen { id, server_end })
7020            }
7021
7022            #[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"]
7023            pub fn dir_connector_open_with<___R>(
7024                &self,
7025                request: ___R,
7026            ) -> ::fidl_next::TwoWayFuture<'_, super::DirConnectorOpen, ___T>
7027            where
7028                ___R: ::fidl_next::Encode<
7029                        <___T as ::fidl_next::Transport>::SendBuffer,
7030                        Encoded = crate::WireCapabilityStoreDirConnectorOpenRequest,
7031                    >,
7032            {
7033                ::fidl_next::TwoWayFuture::from_untyped(
7034                    self.sender.send_two_way(6219704004220369153, request),
7035                )
7036            }
7037
7038            #[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"]
7039            pub fn dictionary_create(
7040                &self,
7041
7042                id: impl ::fidl_next::Encode<
7043                    <___T as ::fidl_next::Transport>::SendBuffer,
7044                    Encoded = ::fidl_next::WireU64,
7045                >,
7046            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
7047            where
7048                <___T as ::fidl_next::Transport>::SendBuffer:
7049                    ::fidl_next::encoder::InternalHandleEncoder,
7050            {
7051                self.dictionary_create_with(DictionaryCreate { id })
7052            }
7053
7054            #[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"]
7055            pub fn dictionary_create_with<___R>(
7056                &self,
7057                request: ___R,
7058            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCreate, ___T>
7059            where
7060                ___R: ::fidl_next::Encode<
7061                        <___T as ::fidl_next::Transport>::SendBuffer,
7062                        Encoded = crate::WireCapabilityStoreDictionaryCreateRequest,
7063                    >,
7064            {
7065                ::fidl_next::TwoWayFuture::from_untyped(
7066                    self.sender.send_two_way(7608770958894948499, request),
7067                )
7068            }
7069
7070            #[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"]
7071            pub fn dictionary_legacy_import(
7072                &self,
7073
7074                id: impl ::fidl_next::Encode<
7075                    <___T as ::fidl_next::Transport>::SendBuffer,
7076                    Encoded = ::fidl_next::WireU64,
7077                >,
7078
7079                client_end: impl ::fidl_next::Encode<
7080                    <___T as ::fidl_next::Transport>::SendBuffer,
7081                    Encoded = ::fidl_next::fuchsia::WireChannel,
7082                >,
7083            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
7084            where
7085                <___T as ::fidl_next::Transport>::SendBuffer:
7086                    ::fidl_next::encoder::InternalHandleEncoder,
7087                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7088            {
7089                self.dictionary_legacy_import_with(DictionaryLegacyImport { id, client_end })
7090            }
7091
7092            #[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"]
7093            pub fn dictionary_legacy_import_with<___R>(
7094                &self,
7095                request: ___R,
7096            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyImport, ___T>
7097            where
7098                ___R: ::fidl_next::Encode<
7099                        <___T as ::fidl_next::Transport>::SendBuffer,
7100                        Encoded = crate::WireCapabilityStoreDictionaryLegacyImportRequest,
7101                    >,
7102            {
7103                ::fidl_next::TwoWayFuture::from_untyped(
7104                    self.sender.send_two_way(8285893703432012383, request),
7105                )
7106            }
7107
7108            #[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"]
7109            pub fn dictionary_legacy_export(
7110                &self,
7111
7112                id: impl ::fidl_next::Encode<
7113                    <___T as ::fidl_next::Transport>::SendBuffer,
7114                    Encoded = ::fidl_next::WireU64,
7115                >,
7116
7117                server_end: impl ::fidl_next::Encode<
7118                    <___T as ::fidl_next::Transport>::SendBuffer,
7119                    Encoded = ::fidl_next::fuchsia::WireChannel,
7120                >,
7121            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
7122            where
7123                <___T as ::fidl_next::Transport>::SendBuffer:
7124                    ::fidl_next::encoder::InternalHandleEncoder,
7125                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7126            {
7127                self.dictionary_legacy_export_with(DictionaryLegacyExport { id, server_end })
7128            }
7129
7130            #[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"]
7131            pub fn dictionary_legacy_export_with<___R>(
7132                &self,
7133                request: ___R,
7134            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryLegacyExport, ___T>
7135            where
7136                ___R: ::fidl_next::Encode<
7137                        <___T as ::fidl_next::Transport>::SendBuffer,
7138                        Encoded = crate::WireCapabilityStoreDictionaryLegacyExportRequest,
7139                    >,
7140            {
7141                ::fidl_next::TwoWayFuture::from_untyped(
7142                    self.sender.send_two_way(4647175832683306445, request),
7143                )
7144            }
7145
7146            #[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"]
7147            pub fn dictionary_insert(
7148                &self,
7149
7150                id: impl ::fidl_next::Encode<
7151                    <___T as ::fidl_next::Transport>::SendBuffer,
7152                    Encoded = ::fidl_next::WireU64,
7153                >,
7154
7155                item: impl ::fidl_next::Encode<
7156                    <___T as ::fidl_next::Transport>::SendBuffer,
7157                    Encoded = crate::WireDictionaryItem<'static>,
7158                >,
7159            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
7160            where
7161                <___T as ::fidl_next::Transport>::SendBuffer:
7162                    ::fidl_next::encoder::InternalHandleEncoder,
7163                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7164            {
7165                self.dictionary_insert_with(DictionaryInsert { id, item })
7166            }
7167
7168            #[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"]
7169            pub fn dictionary_insert_with<___R>(
7170                &self,
7171                request: ___R,
7172            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryInsert, ___T>
7173            where
7174                ___R: ::fidl_next::Encode<
7175                        <___T as ::fidl_next::Transport>::SendBuffer,
7176                        Encoded = crate::WireCapabilityStoreDictionaryInsertRequest<'static>,
7177                    >,
7178            {
7179                ::fidl_next::TwoWayFuture::from_untyped(
7180                    self.sender.send_two_way(8575443262986538023, request),
7181                )
7182            }
7183
7184            #[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"]
7185            pub fn dictionary_get(
7186                &self,
7187
7188                id: impl ::fidl_next::Encode<
7189                    <___T as ::fidl_next::Transport>::SendBuffer,
7190                    Encoded = ::fidl_next::WireU64,
7191                >,
7192
7193                key: impl ::fidl_next::Encode<
7194                    <___T as ::fidl_next::Transport>::SendBuffer,
7195                    Encoded = ::fidl_next::WireString<'static>,
7196                >,
7197
7198                dest_id: impl ::fidl_next::Encode<
7199                    <___T as ::fidl_next::Transport>::SendBuffer,
7200                    Encoded = ::fidl_next::WireU64,
7201                >,
7202            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
7203            where
7204                <___T as ::fidl_next::Transport>::SendBuffer:
7205                    ::fidl_next::encoder::InternalHandleEncoder,
7206                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7207            {
7208                self.dictionary_get_with(DictionaryGet { id, key, dest_id })
7209            }
7210
7211            #[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"]
7212            pub fn dictionary_get_with<___R>(
7213                &self,
7214                request: ___R,
7215            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryGet, ___T>
7216            where
7217                ___R: ::fidl_next::Encode<
7218                        <___T as ::fidl_next::Transport>::SendBuffer,
7219                        Encoded = crate::WireCapabilityStoreDictionaryGetRequest<'static>,
7220                    >,
7221            {
7222                ::fidl_next::TwoWayFuture::from_untyped(
7223                    self.sender.send_two_way(5592951026866236882, request),
7224                )
7225            }
7226
7227            #[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"]
7228            pub fn dictionary_remove(
7229                &self,
7230
7231                id: impl ::fidl_next::Encode<
7232                    <___T as ::fidl_next::Transport>::SendBuffer,
7233                    Encoded = ::fidl_next::WireU64,
7234                >,
7235
7236                key: impl ::fidl_next::Encode<
7237                    <___T as ::fidl_next::Transport>::SendBuffer,
7238                    Encoded = ::fidl_next::WireString<'static>,
7239                >,
7240
7241                dest_id: impl ::fidl_next::Encode<
7242                    <___T as ::fidl_next::Transport>::SendBuffer,
7243                    Encoded = ::fidl_next::WireBox<'static, crate::WireWrappedCapabilityId>,
7244                >,
7245            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
7246            where
7247                <___T as ::fidl_next::Transport>::SendBuffer:
7248                    ::fidl_next::encoder::InternalHandleEncoder,
7249                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::Encoder,
7250            {
7251                self.dictionary_remove_with(DictionaryRemove { id, key, dest_id })
7252            }
7253
7254            #[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"]
7255            pub fn dictionary_remove_with<___R>(
7256                &self,
7257                request: ___R,
7258            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryRemove, ___T>
7259            where
7260                ___R: ::fidl_next::Encode<
7261                        <___T as ::fidl_next::Transport>::SendBuffer,
7262                        Encoded = crate::WireCapabilityStoreDictionaryRemoveRequest<'static>,
7263                    >,
7264            {
7265                ::fidl_next::TwoWayFuture::from_untyped(
7266                    self.sender.send_two_way(343892214579320051, request),
7267                )
7268            }
7269
7270            #[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"]
7271            pub fn dictionary_copy(
7272                &self,
7273
7274                id: impl ::fidl_next::Encode<
7275                    <___T as ::fidl_next::Transport>::SendBuffer,
7276                    Encoded = ::fidl_next::WireU64,
7277                >,
7278
7279                dest_id: impl ::fidl_next::Encode<
7280                    <___T as ::fidl_next::Transport>::SendBuffer,
7281                    Encoded = ::fidl_next::WireU64,
7282                >,
7283            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
7284            where
7285                <___T as ::fidl_next::Transport>::SendBuffer:
7286                    ::fidl_next::encoder::InternalHandleEncoder,
7287            {
7288                self.dictionary_copy_with(DictionaryCopy { id, dest_id })
7289            }
7290
7291            #[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"]
7292            pub fn dictionary_copy_with<___R>(
7293                &self,
7294                request: ___R,
7295            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryCopy, ___T>
7296            where
7297                ___R: ::fidl_next::Encode<
7298                        <___T as ::fidl_next::Transport>::SendBuffer,
7299                        Encoded = crate::WireCapabilityStoreDictionaryCopyRequest,
7300                    >,
7301            {
7302                ::fidl_next::TwoWayFuture::from_untyped(
7303                    self.sender.send_two_way(3977783339739362383, request),
7304                )
7305            }
7306
7307            #[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"]
7308            pub fn dictionary_keys(
7309                &self,
7310
7311                id: impl ::fidl_next::Encode<
7312                    <___T as ::fidl_next::Transport>::SendBuffer,
7313                    Encoded = ::fidl_next::WireU64,
7314                >,
7315
7316                iterator: impl ::fidl_next::Encode<
7317                    <___T as ::fidl_next::Transport>::SendBuffer,
7318                    Encoded = ::fidl_next::ServerEnd<
7319                        crate::DictionaryKeysIterator,
7320                        ::fidl_next::fuchsia::WireChannel,
7321                    >,
7322                >,
7323            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
7324            where
7325                <___T as ::fidl_next::Transport>::SendBuffer:
7326                    ::fidl_next::encoder::InternalHandleEncoder,
7327                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7328            {
7329                self.dictionary_keys_with(DictionaryKeys { id, iterator })
7330            }
7331
7332            #[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"]
7333            pub fn dictionary_keys_with<___R>(
7334                &self,
7335                request: ___R,
7336            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryKeys, ___T>
7337            where
7338                ___R: ::fidl_next::Encode<
7339                        <___T as ::fidl_next::Transport>::SendBuffer,
7340                        Encoded = crate::WireCapabilityStoreDictionaryKeysRequest,
7341                    >,
7342            {
7343                ::fidl_next::TwoWayFuture::from_untyped(
7344                    self.sender.send_two_way(597577248872787102, request),
7345                )
7346            }
7347
7348            #[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"]
7349            pub fn dictionary_enumerate(
7350                &self,
7351
7352                id: impl ::fidl_next::Encode<
7353                    <___T as ::fidl_next::Transport>::SendBuffer,
7354                    Encoded = ::fidl_next::WireU64,
7355                >,
7356
7357                iterator: impl ::fidl_next::Encode<
7358                    <___T as ::fidl_next::Transport>::SendBuffer,
7359                    Encoded = ::fidl_next::ServerEnd<
7360                        crate::DictionaryEnumerateIterator,
7361                        ::fidl_next::fuchsia::WireChannel,
7362                    >,
7363                >,
7364            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
7365            where
7366                <___T as ::fidl_next::Transport>::SendBuffer:
7367                    ::fidl_next::encoder::InternalHandleEncoder,
7368                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7369            {
7370                self.dictionary_enumerate_with(DictionaryEnumerate { id, iterator })
7371            }
7372
7373            #[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"]
7374            pub fn dictionary_enumerate_with<___R>(
7375                &self,
7376                request: ___R,
7377            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryEnumerate, ___T>
7378            where
7379                ___R: ::fidl_next::Encode<
7380                        <___T as ::fidl_next::Transport>::SendBuffer,
7381                        Encoded = crate::WireCapabilityStoreDictionaryEnumerateRequest,
7382                    >,
7383            {
7384                ::fidl_next::TwoWayFuture::from_untyped(
7385                    self.sender.send_two_way(964467096271472193, request),
7386                )
7387            }
7388
7389            #[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"]
7390            pub fn dictionary_drain(
7391                &self,
7392
7393                id: impl ::fidl_next::Encode<
7394                    <___T as ::fidl_next::Transport>::SendBuffer,
7395                    Encoded = ::fidl_next::WireU64,
7396                >,
7397
7398                iterator: impl ::fidl_next::Encode<
7399                    <___T as ::fidl_next::Transport>::SendBuffer,
7400                    Encoded = ::fidl_next::ServerEnd<
7401                        crate::DictionaryDrainIterator,
7402                        ::fidl_next::fuchsia::WireOptionalChannel,
7403                    >,
7404                >,
7405            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
7406            where
7407                <___T as ::fidl_next::Transport>::SendBuffer:
7408                    ::fidl_next::encoder::InternalHandleEncoder,
7409                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
7410            {
7411                self.dictionary_drain_with(DictionaryDrain { id, iterator })
7412            }
7413
7414            #[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"]
7415            pub fn dictionary_drain_with<___R>(
7416                &self,
7417                request: ___R,
7418            ) -> ::fidl_next::TwoWayFuture<'_, super::DictionaryDrain, ___T>
7419            where
7420                ___R: ::fidl_next::Encode<
7421                        <___T as ::fidl_next::Transport>::SendBuffer,
7422                        Encoded = crate::WireCapabilityStoreDictionaryDrainRequest,
7423                    >,
7424            {
7425                ::fidl_next::TwoWayFuture::from_untyped(
7426                    self.sender.send_two_way(2928364469569621208, request),
7427                )
7428            }
7429        }
7430
7431        /// The server sender for the `CapabilityStore` protocol.
7432        #[repr(transparent)]
7433        pub struct CapabilityStoreServerSender<___T: ::fidl_next::Transport> {
7434            sender: ::fidl_next::protocol::ServerSender<___T>,
7435        }
7436
7437        impl<___T> CapabilityStoreServerSender<___T> where ___T: ::fidl_next::Transport {}
7438    }
7439}
7440
7441/// A client handler for the CapabilityStore protocol.
7442///
7443/// See [`CapabilityStore`] for more details.
7444pub trait CapabilityStoreClientHandler<
7445    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7446    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7447>
7448{
7449    fn on_unknown_interaction(
7450        &mut self,
7451        sender: &::fidl_next::ClientSender<CapabilityStore, ___T>,
7452        ordinal: u64,
7453    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7454        sender.close();
7455        ::core::future::ready(())
7456    }
7457}
7458
7459impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for CapabilityStore
7460where
7461    ___H: CapabilityStoreClientHandler<___T> + ::core::marker::Send,
7462    ___T: ::fidl_next::Transport,
7463    <capability_store::Duplicate as ::fidl_next::Method>::Response:
7464        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7465    <capability_store::Drop as ::fidl_next::Method>::Response:
7466        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7467    <capability_store::Export as ::fidl_next::Method>::Response:
7468        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7469    <capability_store::Import as ::fidl_next::Method>::Response:
7470        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7471    <capability_store::ConnectorCreate as ::fidl_next::Method>::Response:
7472        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7473    <capability_store::ConnectorOpen as ::fidl_next::Method>::Response:
7474        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7475    <capability_store::DirConnectorCreate as ::fidl_next::Method>::Response:
7476        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7477    <capability_store::DirConnectorOpen as ::fidl_next::Method>::Response:
7478        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7479    <capability_store::DictionaryCreate as ::fidl_next::Method>::Response:
7480        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7481    <capability_store::DictionaryLegacyImport as ::fidl_next::Method>::Response:
7482        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7483    <capability_store::DictionaryLegacyExport as ::fidl_next::Method>::Response:
7484        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7485    <capability_store::DictionaryInsert as ::fidl_next::Method>::Response:
7486        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7487    <capability_store::DictionaryGet as ::fidl_next::Method>::Response:
7488        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7489    <capability_store::DictionaryRemove as ::fidl_next::Method>::Response:
7490        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7491    <capability_store::DictionaryCopy as ::fidl_next::Method>::Response:
7492        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7493    <capability_store::DictionaryKeys as ::fidl_next::Method>::Response:
7494        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7495    <capability_store::DictionaryEnumerate as ::fidl_next::Method>::Response:
7496        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7497    <capability_store::DictionaryDrain as ::fidl_next::Method>::Response:
7498        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7499{
7500    async fn on_event(
7501        handler: &mut ___H,
7502        sender: &::fidl_next::ClientSender<Self, ___T>,
7503        ordinal: u64,
7504        buffer: ___T::RecvBuffer,
7505    ) {
7506        match ordinal {
7507            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7508        }
7509    }
7510}
7511
7512/// A server handler for the CapabilityStore protocol.
7513///
7514/// See [`CapabilityStore`] for more details.
7515pub trait CapabilityStoreServerHandler<
7516    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
7517    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
7518>
7519{
7520    #[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"]
7521    fn duplicate(
7522        &mut self,
7523        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7524
7525        request: ::fidl_next::Request<capability_store::Duplicate, ___T>,
7526
7527        responder: ::fidl_next::Responder<capability_store::Duplicate>,
7528    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7529
7530    #[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"]
7531    fn drop(
7532        &mut self,
7533        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7534
7535        request: ::fidl_next::Request<capability_store::Drop, ___T>,
7536
7537        responder: ::fidl_next::Responder<capability_store::Drop>,
7538    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7539
7540    #[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"]
7541    fn export(
7542        &mut self,
7543        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7544
7545        request: ::fidl_next::Request<capability_store::Export, ___T>,
7546
7547        responder: ::fidl_next::Responder<capability_store::Export>,
7548    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7549
7550    #[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"]
7551    fn import(
7552        &mut self,
7553        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7554
7555        request: ::fidl_next::Request<capability_store::Import, ___T>,
7556
7557        responder: ::fidl_next::Responder<capability_store::Import>,
7558    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7559
7560    #[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"]
7561    fn connector_create(
7562        &mut self,
7563        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7564
7565        request: ::fidl_next::Request<capability_store::ConnectorCreate, ___T>,
7566
7567        responder: ::fidl_next::Responder<capability_store::ConnectorCreate>,
7568    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7569
7570    #[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"]
7571    fn connector_open(
7572        &mut self,
7573        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7574
7575        request: ::fidl_next::Request<capability_store::ConnectorOpen, ___T>,
7576
7577        responder: ::fidl_next::Responder<capability_store::ConnectorOpen>,
7578    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7579
7580    #[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"]
7581    fn dir_connector_create(
7582        &mut self,
7583        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7584
7585        request: ::fidl_next::Request<capability_store::DirConnectorCreate, ___T>,
7586
7587        responder: ::fidl_next::Responder<capability_store::DirConnectorCreate>,
7588    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7589
7590    #[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"]
7591    fn dir_connector_open(
7592        &mut self,
7593        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7594
7595        request: ::fidl_next::Request<capability_store::DirConnectorOpen, ___T>,
7596
7597        responder: ::fidl_next::Responder<capability_store::DirConnectorOpen>,
7598    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7599
7600    #[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"]
7601    fn dictionary_create(
7602        &mut self,
7603        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7604
7605        request: ::fidl_next::Request<capability_store::DictionaryCreate, ___T>,
7606
7607        responder: ::fidl_next::Responder<capability_store::DictionaryCreate>,
7608    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7609
7610    #[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"]
7611    fn dictionary_legacy_import(
7612        &mut self,
7613        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7614
7615        request: ::fidl_next::Request<capability_store::DictionaryLegacyImport, ___T>,
7616
7617        responder: ::fidl_next::Responder<capability_store::DictionaryLegacyImport>,
7618    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7619
7620    #[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"]
7621    fn dictionary_legacy_export(
7622        &mut self,
7623        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7624
7625        request: ::fidl_next::Request<capability_store::DictionaryLegacyExport, ___T>,
7626
7627        responder: ::fidl_next::Responder<capability_store::DictionaryLegacyExport>,
7628    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7629
7630    #[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"]
7631    fn dictionary_insert(
7632        &mut self,
7633        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7634
7635        request: ::fidl_next::Request<capability_store::DictionaryInsert, ___T>,
7636
7637        responder: ::fidl_next::Responder<capability_store::DictionaryInsert>,
7638    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7639
7640    #[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"]
7641    fn dictionary_get(
7642        &mut self,
7643        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7644
7645        request: ::fidl_next::Request<capability_store::DictionaryGet, ___T>,
7646
7647        responder: ::fidl_next::Responder<capability_store::DictionaryGet>,
7648    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7649
7650    #[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"]
7651    fn dictionary_remove(
7652        &mut self,
7653        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7654
7655        request: ::fidl_next::Request<capability_store::DictionaryRemove, ___T>,
7656
7657        responder: ::fidl_next::Responder<capability_store::DictionaryRemove>,
7658    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7659
7660    #[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"]
7661    fn dictionary_copy(
7662        &mut self,
7663        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7664
7665        request: ::fidl_next::Request<capability_store::DictionaryCopy, ___T>,
7666
7667        responder: ::fidl_next::Responder<capability_store::DictionaryCopy>,
7668    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7669
7670    #[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"]
7671    fn dictionary_keys(
7672        &mut self,
7673        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7674
7675        request: ::fidl_next::Request<capability_store::DictionaryKeys, ___T>,
7676
7677        responder: ::fidl_next::Responder<capability_store::DictionaryKeys>,
7678    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7679
7680    #[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"]
7681    fn dictionary_enumerate(
7682        &mut self,
7683        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7684
7685        request: ::fidl_next::Request<capability_store::DictionaryEnumerate, ___T>,
7686
7687        responder: ::fidl_next::Responder<capability_store::DictionaryEnumerate>,
7688    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7689
7690    #[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"]
7691    fn dictionary_drain(
7692        &mut self,
7693        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7694
7695        request: ::fidl_next::Request<capability_store::DictionaryDrain, ___T>,
7696
7697        responder: ::fidl_next::Responder<capability_store::DictionaryDrain>,
7698    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
7699
7700    fn on_unknown_interaction(
7701        &mut self,
7702        sender: &::fidl_next::ServerSender<CapabilityStore, ___T>,
7703        ordinal: u64,
7704    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
7705        sender.close();
7706        ::core::future::ready(())
7707    }
7708}
7709
7710impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for CapabilityStore
7711where
7712    ___H: CapabilityStoreServerHandler<___T> + ::core::marker::Send,
7713    ___T: ::fidl_next::Transport,
7714    <capability_store::Duplicate as ::fidl_next::Method>::Request:
7715        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7716    <capability_store::Drop as ::fidl_next::Method>::Request:
7717        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7718    <capability_store::Export as ::fidl_next::Method>::Request:
7719        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7720    <capability_store::Import as ::fidl_next::Method>::Request:
7721        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7722    <capability_store::ConnectorCreate as ::fidl_next::Method>::Request:
7723        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7724    <capability_store::ConnectorOpen as ::fidl_next::Method>::Request:
7725        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7726    <capability_store::DirConnectorCreate as ::fidl_next::Method>::Request:
7727        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7728    <capability_store::DirConnectorOpen as ::fidl_next::Method>::Request:
7729        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7730    <capability_store::DictionaryCreate as ::fidl_next::Method>::Request:
7731        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7732    <capability_store::DictionaryLegacyImport as ::fidl_next::Method>::Request:
7733        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7734    <capability_store::DictionaryLegacyExport as ::fidl_next::Method>::Request:
7735        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7736    <capability_store::DictionaryInsert as ::fidl_next::Method>::Request:
7737        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7738    <capability_store::DictionaryGet as ::fidl_next::Method>::Request:
7739        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7740    <capability_store::DictionaryRemove as ::fidl_next::Method>::Request:
7741        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7742    <capability_store::DictionaryCopy as ::fidl_next::Method>::Request:
7743        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7744    <capability_store::DictionaryKeys as ::fidl_next::Method>::Request:
7745        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7746    <capability_store::DictionaryEnumerate as ::fidl_next::Method>::Request:
7747        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7748    <capability_store::DictionaryDrain as ::fidl_next::Method>::Request:
7749        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
7750{
7751    async fn on_one_way(
7752        handler: &mut ___H,
7753        sender: &::fidl_next::ServerSender<Self, ___T>,
7754        ordinal: u64,
7755        buffer: ___T::RecvBuffer,
7756    ) {
7757        match ordinal {
7758            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7759        }
7760    }
7761
7762    async fn on_two_way(
7763        handler: &mut ___H,
7764        sender: &::fidl_next::ServerSender<Self, ___T>,
7765        ordinal: u64,
7766        buffer: ___T::RecvBuffer,
7767        responder: ::fidl_next::protocol::Responder,
7768    ) {
7769        match ordinal {
7770            6727592627741008260 => {
7771                let responder = ::fidl_next::Responder::from_untyped(responder);
7772
7773                match ::fidl_next::DecoderExt::decode(buffer) {
7774                    Ok(decoded) => handler.duplicate(sender, decoded, responder).await,
7775                    Err(e) => sender.close(),
7776                }
7777            }
7778
7779            753328233834620249 => {
7780                let responder = ::fidl_next::Responder::from_untyped(responder);
7781
7782                match ::fidl_next::DecoderExt::decode(buffer) {
7783                    Ok(decoded) => handler.drop(sender, decoded, responder).await,
7784                    Err(e) => sender.close(),
7785                }
7786            }
7787
7788            226159162093533951 => {
7789                let responder = ::fidl_next::Responder::from_untyped(responder);
7790
7791                match ::fidl_next::DecoderExt::decode(buffer) {
7792                    Ok(decoded) => handler.export(sender, decoded, responder).await,
7793                    Err(e) => sender.close(),
7794                }
7795            }
7796
7797            2276030276116435867 => {
7798                let responder = ::fidl_next::Responder::from_untyped(responder);
7799
7800                match ::fidl_next::DecoderExt::decode(buffer) {
7801                    Ok(decoded) => handler.import(sender, decoded, responder).await,
7802                    Err(e) => sender.close(),
7803                }
7804            }
7805
7806            2979461408102095909 => {
7807                let responder = ::fidl_next::Responder::from_untyped(responder);
7808
7809                match ::fidl_next::DecoderExt::decode(buffer) {
7810                    Ok(decoded) => handler.connector_create(sender, decoded, responder).await,
7811                    Err(e) => sender.close(),
7812                }
7813            }
7814
7815            6016362336453278623 => {
7816                let responder = ::fidl_next::Responder::from_untyped(responder);
7817
7818                match ::fidl_next::DecoderExt::decode(buffer) {
7819                    Ok(decoded) => handler.connector_open(sender, decoded, responder).await,
7820                    Err(e) => sender.close(),
7821                }
7822            }
7823
7824            1756747594275428795 => {
7825                let responder = ::fidl_next::Responder::from_untyped(responder);
7826
7827                match ::fidl_next::DecoderExt::decode(buffer) {
7828                    Ok(decoded) => handler.dir_connector_create(sender, decoded, responder).await,
7829                    Err(e) => sender.close(),
7830                }
7831            }
7832
7833            6219704004220369153 => {
7834                let responder = ::fidl_next::Responder::from_untyped(responder);
7835
7836                match ::fidl_next::DecoderExt::decode(buffer) {
7837                    Ok(decoded) => handler.dir_connector_open(sender, decoded, responder).await,
7838                    Err(e) => sender.close(),
7839                }
7840            }
7841
7842            7608770958894948499 => {
7843                let responder = ::fidl_next::Responder::from_untyped(responder);
7844
7845                match ::fidl_next::DecoderExt::decode(buffer) {
7846                    Ok(decoded) => handler.dictionary_create(sender, decoded, responder).await,
7847                    Err(e) => sender.close(),
7848                }
7849            }
7850
7851            8285893703432012383 => {
7852                let responder = ::fidl_next::Responder::from_untyped(responder);
7853
7854                match ::fidl_next::DecoderExt::decode(buffer) {
7855                    Ok(decoded) => {
7856                        handler.dictionary_legacy_import(sender, decoded, responder).await
7857                    }
7858                    Err(e) => sender.close(),
7859                }
7860            }
7861
7862            4647175832683306445 => {
7863                let responder = ::fidl_next::Responder::from_untyped(responder);
7864
7865                match ::fidl_next::DecoderExt::decode(buffer) {
7866                    Ok(decoded) => {
7867                        handler.dictionary_legacy_export(sender, decoded, responder).await
7868                    }
7869                    Err(e) => sender.close(),
7870                }
7871            }
7872
7873            8575443262986538023 => {
7874                let responder = ::fidl_next::Responder::from_untyped(responder);
7875
7876                match ::fidl_next::DecoderExt::decode(buffer) {
7877                    Ok(decoded) => handler.dictionary_insert(sender, decoded, responder).await,
7878                    Err(e) => sender.close(),
7879                }
7880            }
7881
7882            5592951026866236882 => {
7883                let responder = ::fidl_next::Responder::from_untyped(responder);
7884
7885                match ::fidl_next::DecoderExt::decode(buffer) {
7886                    Ok(decoded) => handler.dictionary_get(sender, decoded, responder).await,
7887                    Err(e) => sender.close(),
7888                }
7889            }
7890
7891            343892214579320051 => {
7892                let responder = ::fidl_next::Responder::from_untyped(responder);
7893
7894                match ::fidl_next::DecoderExt::decode(buffer) {
7895                    Ok(decoded) => handler.dictionary_remove(sender, decoded, responder).await,
7896                    Err(e) => sender.close(),
7897                }
7898            }
7899
7900            3977783339739362383 => {
7901                let responder = ::fidl_next::Responder::from_untyped(responder);
7902
7903                match ::fidl_next::DecoderExt::decode(buffer) {
7904                    Ok(decoded) => handler.dictionary_copy(sender, decoded, responder).await,
7905                    Err(e) => sender.close(),
7906                }
7907            }
7908
7909            597577248872787102 => {
7910                let responder = ::fidl_next::Responder::from_untyped(responder);
7911
7912                match ::fidl_next::DecoderExt::decode(buffer) {
7913                    Ok(decoded) => handler.dictionary_keys(sender, decoded, responder).await,
7914                    Err(e) => sender.close(),
7915                }
7916            }
7917
7918            964467096271472193 => {
7919                let responder = ::fidl_next::Responder::from_untyped(responder);
7920
7921                match ::fidl_next::DecoderExt::decode(buffer) {
7922                    Ok(decoded) => handler.dictionary_enumerate(sender, decoded, responder).await,
7923                    Err(e) => sender.close(),
7924                }
7925            }
7926
7927            2928364469569621208 => {
7928                let responder = ::fidl_next::Responder::from_untyped(responder);
7929
7930                match ::fidl_next::DecoderExt::decode(buffer) {
7931                    Ok(decoded) => handler.dictionary_drain(sender, decoded, responder).await,
7932                    Err(e) => sender.close(),
7933                }
7934            }
7935
7936            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
7937        }
7938    }
7939}
7940
7941#[doc = " Represents an instance in the component tree, either a component\n instance or component manager\'s instance.\n"]
7942#[derive(Debug)]
7943#[repr(C)]
7944pub struct InstanceToken {
7945    pub token: ::fidl_next::fuchsia::zx::EventPair,
7946}
7947
7948impl ::fidl_next::Encodable for InstanceToken {
7949    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireInstanceToken> = unsafe {
7950        ::fidl_next::CopyOptimization::enable_if(
7951            true
7952
7953                && <
7954                    ::fidl_next::fuchsia::zx::EventPair as ::fidl_next::Encodable
7955                >::COPY_OPTIMIZATION.is_enabled()
7956
7957        )
7958    };
7959
7960    type Encoded = WireInstanceToken;
7961}
7962
7963unsafe impl<___E> ::fidl_next::Encode<___E> for InstanceToken
7964where
7965    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
7966    ___E: ::fidl_next::fuchsia::HandleEncoder,
7967{
7968    #[inline]
7969    fn encode(
7970        self,
7971        encoder: &mut ___E,
7972        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
7973    ) -> Result<(), ::fidl_next::EncodeError> {
7974        ::fidl_next::munge! {
7975            let Self::Encoded {
7976                token,
7977
7978            } = out;
7979        }
7980
7981        ::fidl_next::Encode::encode(self.token, encoder, token)?;
7982
7983        Ok(())
7984    }
7985}
7986
7987impl ::fidl_next::EncodableOption for InstanceToken {
7988    type EncodedOption = ::fidl_next::WireBox<'static, WireInstanceToken>;
7989}
7990
7991unsafe impl<___E> ::fidl_next::EncodeOption<___E> for InstanceToken
7992where
7993    ___E: ::fidl_next::Encoder + ?Sized,
7994    InstanceToken: ::fidl_next::Encode<___E>,
7995{
7996    #[inline]
7997    fn encode_option(
7998        this: Option<Self>,
7999        encoder: &mut ___E,
8000        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8001    ) -> Result<(), ::fidl_next::EncodeError> {
8002        if let Some(inner) = this {
8003            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
8004            ::fidl_next::WireBox::encode_present(out);
8005        } else {
8006            ::fidl_next::WireBox::encode_absent(out);
8007        }
8008
8009        Ok(())
8010    }
8011}
8012
8013impl ::fidl_next::FromWire<WireInstanceToken> for InstanceToken {
8014    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireInstanceToken, Self> = unsafe {
8015        ::fidl_next::CopyOptimization::enable_if(
8016            true && <::fidl_next::fuchsia::zx::EventPair as ::fidl_next::FromWire<
8017                ::fidl_next::fuchsia::WireEventPair,
8018            >>::COPY_OPTIMIZATION
8019                .is_enabled(),
8020        )
8021    };
8022
8023    #[inline]
8024    fn from_wire(wire: WireInstanceToken) -> Self {
8025        Self { token: ::fidl_next::FromWire::from_wire(wire.token) }
8026    }
8027}
8028
8029/// The wire type corresponding to [`InstanceToken`].
8030#[derive(Debug)]
8031#[repr(C)]
8032pub struct WireInstanceToken {
8033    pub token: ::fidl_next::fuchsia::WireEventPair,
8034}
8035
8036unsafe impl ::fidl_next::Wire for WireInstanceToken {
8037    type Decoded<'de> = WireInstanceToken;
8038
8039    #[inline]
8040    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
8041}
8042
8043unsafe impl<___D> ::fidl_next::Decode<___D> for WireInstanceToken
8044where
8045    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8046    ___D: ::fidl_next::fuchsia::HandleDecoder,
8047{
8048    fn decode(
8049        slot: ::fidl_next::Slot<'_, Self>,
8050        decoder: &mut ___D,
8051    ) -> Result<(), ::fidl_next::DecodeError> {
8052        ::fidl_next::munge! {
8053            let Self {
8054                mut token,
8055
8056            } = slot;
8057        }
8058
8059        ::fidl_next::Decode::decode(token.as_mut(), decoder)?;
8060
8061        Ok(())
8062    }
8063}
8064
8065#[doc = " A request for a route.\n"]
8066#[derive(Debug, Default)]
8067pub struct RouteRequest {
8068    pub requesting: Option<crate::InstanceToken>,
8069
8070    pub metadata: Option<crate::DictionaryRef>,
8071}
8072
8073impl RouteRequest {
8074    fn __max_ordinal(&self) -> usize {
8075        if self.metadata.is_some() {
8076            return 2;
8077        }
8078
8079        if self.requesting.is_some() {
8080            return 1;
8081        }
8082
8083        0
8084    }
8085}
8086
8087impl ::fidl_next::Encodable for RouteRequest {
8088    type Encoded = WireRouteRequest<'static>;
8089}
8090
8091unsafe impl<___E> ::fidl_next::Encode<___E> for RouteRequest
8092where
8093    ___E: ::fidl_next::Encoder + ?Sized,
8094    ___E: ::fidl_next::fuchsia::HandleEncoder,
8095{
8096    #[inline]
8097    fn encode(
8098        mut self,
8099        encoder: &mut ___E,
8100        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8101    ) -> Result<(), ::fidl_next::EncodeError> {
8102        ::fidl_next::munge!(let WireRouteRequest { table } = out);
8103
8104        let max_ord = self.__max_ordinal();
8105
8106        let mut out = ::core::mem::MaybeUninit::<::fidl_next::WireEnvelope>::uninit();
8107        ::fidl_next::Wire::zero_padding(&mut out);
8108
8109        let mut preallocated =
8110            ::fidl_next::EncoderExt::preallocate::<::fidl_next::WireEnvelope>(encoder, max_ord);
8111
8112        for i in 1..=max_ord {
8113            match i {
8114                2 => {
8115                    if let Some(metadata) = self.metadata.take() {
8116                        ::fidl_next::WireEnvelope::encode_value(
8117                            metadata,
8118                            preallocated.encoder,
8119                            &mut out,
8120                        )?;
8121                    } else {
8122                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8123                    }
8124                }
8125
8126                1 => {
8127                    if let Some(requesting) = self.requesting.take() {
8128                        ::fidl_next::WireEnvelope::encode_value(
8129                            requesting,
8130                            preallocated.encoder,
8131                            &mut out,
8132                        )?;
8133                    } else {
8134                        ::fidl_next::WireEnvelope::encode_zero(&mut out)
8135                    }
8136                }
8137
8138                _ => ::fidl_next::WireEnvelope::encode_zero(&mut out),
8139            }
8140            unsafe {
8141                preallocated.write_next(out.assume_init_ref());
8142            }
8143        }
8144
8145        ::fidl_next::WireTable::encode_len(table, max_ord);
8146
8147        Ok(())
8148    }
8149}
8150
8151impl<'de> ::fidl_next::FromWire<WireRouteRequest<'de>> for RouteRequest {
8152    #[inline]
8153    fn from_wire(wire: WireRouteRequest<'de>) -> Self {
8154        let wire = ::core::mem::ManuallyDrop::new(wire);
8155
8156        let requesting = wire.table.get(1);
8157
8158        let metadata = wire.table.get(2);
8159
8160        Self {
8161            requesting: requesting.map(|envelope| {
8162                ::fidl_next::FromWire::from_wire(unsafe {
8163                    envelope.read_unchecked::<crate::WireInstanceToken>()
8164                })
8165            }),
8166
8167            metadata: metadata.map(|envelope| {
8168                ::fidl_next::FromWire::from_wire(unsafe {
8169                    envelope.read_unchecked::<crate::WireDictionaryRef>()
8170                })
8171            }),
8172        }
8173    }
8174}
8175
8176/// The wire type corresponding to [`RouteRequest`].
8177#[repr(C)]
8178pub struct WireRouteRequest<'de> {
8179    table: ::fidl_next::WireTable<'de>,
8180}
8181
8182impl<'de> Drop for WireRouteRequest<'de> {
8183    fn drop(&mut self) {
8184        let _ = self
8185            .table
8186            .get(1)
8187            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireInstanceToken>() });
8188
8189        let _ = self
8190            .table
8191            .get(2)
8192            .map(|envelope| unsafe { envelope.read_unchecked::<crate::WireDictionaryRef>() });
8193    }
8194}
8195
8196unsafe impl ::fidl_next::Wire for WireRouteRequest<'static> {
8197    type Decoded<'de> = WireRouteRequest<'de>;
8198
8199    #[inline]
8200    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8201        ::fidl_next::munge!(let Self { table } = out);
8202        ::fidl_next::WireTable::zero_padding(table);
8203    }
8204}
8205
8206unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouteRequest<'static>
8207where
8208    ___D: ::fidl_next::Decoder + ?Sized,
8209    ___D: ::fidl_next::fuchsia::HandleDecoder,
8210{
8211    fn decode(
8212        slot: ::fidl_next::Slot<'_, Self>,
8213        decoder: &mut ___D,
8214    ) -> Result<(), ::fidl_next::DecodeError> {
8215        ::fidl_next::munge!(let Self { table } = slot);
8216
8217        ::fidl_next::WireTable::decode_with(table, decoder, |ordinal, mut slot, decoder| {
8218            match ordinal {
8219                0 => unsafe { ::core::hint::unreachable_unchecked() },
8220
8221                1 => {
8222                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireInstanceToken>(
8223                        slot.as_mut(),
8224                        decoder,
8225                    )?;
8226
8227                    Ok(())
8228                }
8229
8230                2 => {
8231                    ::fidl_next::WireEnvelope::decode_as::<___D, crate::WireDictionaryRef>(
8232                        slot.as_mut(),
8233                        decoder,
8234                    )?;
8235
8236                    Ok(())
8237                }
8238
8239                _ => ::fidl_next::WireEnvelope::decode_unknown(slot, decoder),
8240            }
8241        })
8242    }
8243}
8244
8245impl<'de> WireRouteRequest<'de> {
8246    pub fn requesting(&self) -> Option<&crate::WireInstanceToken> {
8247        unsafe { Some(self.table.get(1)?.deref_unchecked()) }
8248    }
8249
8250    pub fn metadata(&self) -> Option<&crate::WireDictionaryRef> {
8251        unsafe { Some(self.table.get(2)?.deref_unchecked()) }
8252    }
8253}
8254
8255impl<'de> ::core::fmt::Debug for WireRouteRequest<'de> {
8256    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> Result<(), ::core::fmt::Error> {
8257        f.debug_struct("RouteRequest")
8258            .field("requesting", &self.requesting())
8259            .field("metadata", &self.metadata())
8260            .finish()
8261    }
8262}
8263
8264#[derive(Debug)]
8265pub enum ConnectorRouterRouteResponse {
8266    Connector(crate::Connector),
8267
8268    Unavailable(crate::Unit),
8269}
8270
8271impl ::fidl_next::Encodable for ConnectorRouterRouteResponse {
8272    type Encoded = WireConnectorRouterRouteResponse;
8273}
8274
8275unsafe impl<___E> ::fidl_next::Encode<___E> for ConnectorRouterRouteResponse
8276where
8277    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8278    ___E: ::fidl_next::fuchsia::HandleEncoder,
8279{
8280    #[inline]
8281    fn encode(
8282        self,
8283        encoder: &mut ___E,
8284        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8285    ) -> Result<(), ::fidl_next::EncodeError> {
8286        ::fidl_next::munge!(let WireConnectorRouterRouteResponse { raw, _phantom: _ } = out);
8287
8288        match self {
8289            Self::Connector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8290                ___E,
8291                crate::Connector,
8292            >(value, 1, encoder, raw)?,
8293
8294            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
8295                ___E,
8296                crate::Unit,
8297            >(value, 2, encoder, raw)?,
8298        }
8299
8300        Ok(())
8301    }
8302}
8303
8304impl ::fidl_next::EncodableOption for ConnectorRouterRouteResponse {
8305    type EncodedOption = WireOptionalConnectorRouterRouteResponse;
8306}
8307
8308unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ConnectorRouterRouteResponse
8309where
8310    ___E: ?Sized,
8311    ConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
8312{
8313    #[inline]
8314    fn encode_option(
8315        this: Option<Self>,
8316        encoder: &mut ___E,
8317        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8318    ) -> Result<(), ::fidl_next::EncodeError> {
8319        ::fidl_next::munge!(let WireOptionalConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
8320
8321        if let Some(inner) = this {
8322            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8323            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
8324        } else {
8325            ::fidl_next::RawWireUnion::encode_absent(raw);
8326        }
8327
8328        Ok(())
8329    }
8330}
8331
8332impl ::fidl_next::FromWire<WireConnectorRouterRouteResponse> for ConnectorRouterRouteResponse {
8333    #[inline]
8334    fn from_wire(wire: WireConnectorRouterRouteResponse) -> Self {
8335        let wire = ::core::mem::ManuallyDrop::new(wire);
8336        match wire.raw.ordinal() {
8337            1 => Self::Connector(::fidl_next::FromWire::from_wire(unsafe {
8338                wire.raw.get().read_unchecked::<crate::WireConnector>()
8339            })),
8340
8341            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
8342                wire.raw.get().read_unchecked::<crate::WireUnit>()
8343            })),
8344
8345            _ => unsafe { ::core::hint::unreachable_unchecked() },
8346        }
8347    }
8348}
8349
8350impl ::fidl_next::FromWireOption<WireOptionalConnectorRouterRouteResponse>
8351    for Box<ConnectorRouterRouteResponse>
8352{
8353    #[inline]
8354    fn from_wire_option(wire: WireOptionalConnectorRouterRouteResponse) -> Option<Self> {
8355        if let Some(inner) = wire.into_option() {
8356            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
8357        } else {
8358            None
8359        }
8360    }
8361}
8362
8363/// The wire type corresponding to [`ConnectorRouterRouteResponse`].
8364#[repr(transparent)]
8365pub struct WireConnectorRouterRouteResponse {
8366    raw: ::fidl_next::RawWireUnion,
8367    _phantom: ::core::marker::PhantomData<()>,
8368}
8369
8370impl Drop for WireConnectorRouterRouteResponse {
8371    fn drop(&mut self) {
8372        match self.raw.ordinal() {
8373            1 => {
8374                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireConnector>() };
8375            }
8376
8377            2 => {
8378                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
8379            }
8380
8381            _ => unsafe { ::core::hint::unreachable_unchecked() },
8382        }
8383    }
8384}
8385
8386unsafe impl ::fidl_next::Wire for WireConnectorRouterRouteResponse {
8387    type Decoded<'de> = WireConnectorRouterRouteResponse;
8388
8389    #[inline]
8390    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8391        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8392        ::fidl_next::RawWireUnion::zero_padding(raw);
8393    }
8394}
8395
8396pub mod connector_router_route_response {
8397    pub enum Ref<'de> {
8398        Connector(&'de crate::WireConnector),
8399
8400        Unavailable(&'de crate::WireUnit),
8401    }
8402}
8403
8404impl WireConnectorRouterRouteResponse {
8405    pub fn as_ref(&self) -> crate::connector_router_route_response::Ref<'_> {
8406        match self.raw.ordinal() {
8407            1 => crate::connector_router_route_response::Ref::Connector(unsafe {
8408                self.raw.get().deref_unchecked::<crate::WireConnector>()
8409            }),
8410
8411            2 => crate::connector_router_route_response::Ref::Unavailable(unsafe {
8412                self.raw.get().deref_unchecked::<crate::WireUnit>()
8413            }),
8414
8415            _ => unsafe { ::core::hint::unreachable_unchecked() },
8416        }
8417    }
8418}
8419
8420unsafe impl<___D> ::fidl_next::Decode<___D> for WireConnectorRouterRouteResponse
8421where
8422    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8423    ___D: ::fidl_next::fuchsia::HandleDecoder,
8424{
8425    fn decode(
8426        mut slot: ::fidl_next::Slot<'_, Self>,
8427        decoder: &mut ___D,
8428    ) -> Result<(), ::fidl_next::DecodeError> {
8429        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8430        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
8431            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
8432                raw, decoder,
8433            )?,
8434
8435            2 => {
8436                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
8437            }
8438
8439            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
8440        }
8441
8442        Ok(())
8443    }
8444}
8445
8446impl ::core::fmt::Debug for WireConnectorRouterRouteResponse {
8447    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8448        match self.raw.ordinal() {
8449            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireConnector>().fmt(f) },
8450            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
8451            _ => unsafe { ::core::hint::unreachable_unchecked() },
8452        }
8453    }
8454}
8455
8456#[repr(transparent)]
8457pub struct WireOptionalConnectorRouterRouteResponse {
8458    raw: ::fidl_next::RawWireUnion,
8459    _phantom: ::core::marker::PhantomData<()>,
8460}
8461
8462unsafe impl ::fidl_next::Wire for WireOptionalConnectorRouterRouteResponse {
8463    type Decoded<'de> = WireOptionalConnectorRouterRouteResponse;
8464
8465    #[inline]
8466    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8467        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8468        ::fidl_next::RawWireUnion::zero_padding(raw);
8469    }
8470}
8471
8472impl WireOptionalConnectorRouterRouteResponse {
8473    pub fn is_some(&self) -> bool {
8474        self.raw.is_some()
8475    }
8476
8477    pub fn is_none(&self) -> bool {
8478        self.raw.is_none()
8479    }
8480
8481    pub fn as_ref(&self) -> Option<&WireConnectorRouterRouteResponse> {
8482        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
8483    }
8484
8485    pub fn into_option(self) -> Option<WireConnectorRouterRouteResponse> {
8486        if self.is_some() {
8487            Some(WireConnectorRouterRouteResponse {
8488                raw: self.raw,
8489                _phantom: ::core::marker::PhantomData,
8490            })
8491        } else {
8492            None
8493        }
8494    }
8495}
8496
8497unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalConnectorRouterRouteResponse
8498where
8499    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
8500    ___D: ::fidl_next::fuchsia::HandleDecoder,
8501{
8502    fn decode(
8503        mut slot: ::fidl_next::Slot<'_, Self>,
8504        decoder: &mut ___D,
8505    ) -> Result<(), ::fidl_next::DecodeError> {
8506        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
8507        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
8508            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireConnector>(
8509                raw, decoder,
8510            )?,
8511
8512            2 => {
8513                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
8514            }
8515
8516            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
8517            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
8518        }
8519
8520        Ok(())
8521    }
8522}
8523
8524impl ::core::fmt::Debug for WireOptionalConnectorRouterRouteResponse {
8525    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
8526        self.as_ref().fmt(f)
8527    }
8528}
8529
8530#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8531#[repr(u32)]
8532pub enum RouterError {
8533    NotFound = 1,
8534    InvalidArgs = 2,
8535    NotSupported = 3,
8536    Internal = 4,
8537    UnknownOrdinal_(u32),
8538}
8539
8540impl ::fidl_next::Encodable for RouterError {
8541    type Encoded = WireRouterError;
8542}
8543impl ::std::convert::From<u32> for RouterError {
8544    fn from(value: u32) -> Self {
8545        match value {
8546            1 => Self::NotFound,
8547            2 => Self::InvalidArgs,
8548            3 => Self::NotSupported,
8549            4 => Self::Internal,
8550
8551            _ => Self::UnknownOrdinal_(value),
8552        }
8553    }
8554}
8555
8556unsafe impl<___E> ::fidl_next::Encode<___E> for RouterError
8557where
8558    ___E: ?Sized,
8559{
8560    #[inline]
8561    fn encode(
8562        self,
8563        encoder: &mut ___E,
8564        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8565    ) -> Result<(), ::fidl_next::EncodeError> {
8566        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
8567    }
8568}
8569
8570unsafe impl<___E> ::fidl_next::EncodeRef<___E> for RouterError
8571where
8572    ___E: ?Sized,
8573{
8574    #[inline]
8575    fn encode_ref(
8576        &self,
8577        encoder: &mut ___E,
8578        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8579    ) -> Result<(), ::fidl_next::EncodeError> {
8580        ::fidl_next::munge!(let WireRouterError { value } = out);
8581        let _ = value.write(::fidl_next::WireU32::from(match *self {
8582            Self::NotFound => 1,
8583
8584            Self::InvalidArgs => 2,
8585
8586            Self::NotSupported => 3,
8587
8588            Self::Internal => 4,
8589
8590            Self::UnknownOrdinal_(value) => value,
8591        }));
8592
8593        Ok(())
8594    }
8595}
8596
8597impl ::core::convert::From<WireRouterError> for RouterError {
8598    fn from(wire: WireRouterError) -> Self {
8599        match u32::from(wire.value) {
8600            1 => Self::NotFound,
8601
8602            2 => Self::InvalidArgs,
8603
8604            3 => Self::NotSupported,
8605
8606            4 => Self::Internal,
8607
8608            value => Self::UnknownOrdinal_(value),
8609        }
8610    }
8611}
8612
8613impl ::fidl_next::FromWire<WireRouterError> for RouterError {
8614    #[inline]
8615    fn from_wire(wire: WireRouterError) -> Self {
8616        Self::from(wire)
8617    }
8618}
8619
8620impl ::fidl_next::FromWireRef<WireRouterError> for RouterError {
8621    #[inline]
8622    fn from_wire_ref(wire: &WireRouterError) -> Self {
8623        Self::from(*wire)
8624    }
8625}
8626
8627/// The wire type corresponding to [`RouterError`].
8628#[derive(Clone, Copy, Debug, PartialEq, Eq)]
8629#[repr(transparent)]
8630pub struct WireRouterError {
8631    value: ::fidl_next::WireU32,
8632}
8633
8634unsafe impl ::fidl_next::Wire for WireRouterError {
8635    type Decoded<'de> = Self;
8636
8637    #[inline]
8638    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
8639        // Wire enums have no padding
8640    }
8641}
8642
8643impl WireRouterError {
8644    pub const NOT_FOUND: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(1) };
8645
8646    pub const INVALID_ARGS: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(2) };
8647
8648    pub const NOT_SUPPORTED: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(3) };
8649
8650    pub const INTERNAL: WireRouterError = WireRouterError { value: ::fidl_next::WireU32(4) };
8651}
8652
8653unsafe impl<___D> ::fidl_next::Decode<___D> for WireRouterError
8654where
8655    ___D: ?Sized,
8656{
8657    fn decode(
8658        slot: ::fidl_next::Slot<'_, Self>,
8659        _: &mut ___D,
8660    ) -> Result<(), ::fidl_next::DecodeError> {
8661        Ok(())
8662    }
8663}
8664
8665impl ::core::convert::From<RouterError> for WireRouterError {
8666    fn from(natural: RouterError) -> Self {
8667        match natural {
8668            RouterError::NotFound => WireRouterError::NOT_FOUND,
8669
8670            RouterError::InvalidArgs => WireRouterError::INVALID_ARGS,
8671
8672            RouterError::NotSupported => WireRouterError::NOT_SUPPORTED,
8673
8674            RouterError::Internal => WireRouterError::INTERNAL,
8675
8676            RouterError::UnknownOrdinal_(value) => {
8677                WireRouterError { value: ::fidl_next::WireU32::from(value) }
8678            }
8679        }
8680    }
8681}
8682
8683/// The type corresponding to the ConnectorRouter protocol.
8684#[derive(Debug)]
8685pub struct ConnectorRouter;
8686
8687impl ::fidl_next::Discoverable for ConnectorRouter {
8688    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.ConnectorRouter";
8689}
8690
8691pub mod connector_router {
8692    pub mod prelude {
8693        pub use crate::{
8694            ConnectorRouter, ConnectorRouterClientHandler, ConnectorRouterServerHandler,
8695            connector_router,
8696        };
8697
8698        pub use crate::ConnectorRouterRouteResponse;
8699
8700        pub use crate::RouteRequest;
8701
8702        pub use crate::RouterError;
8703    }
8704
8705    pub struct Route;
8706
8707    impl ::fidl_next::Method for Route {
8708        const ORDINAL: u64 = 8420527046218942310;
8709
8710        type Protocol = crate::ConnectorRouter;
8711
8712        type Request = crate::WireRouteRequest<'static>;
8713
8714        type Response = ::fidl_next::WireFlexibleResult<
8715            'static,
8716            crate::WireConnectorRouterRouteResponse,
8717            crate::WireRouterError,
8718        >;
8719    }
8720
8721    mod ___detail {
8722
8723        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::ConnectorRouter
8724        where
8725            ___T: ::fidl_next::Transport,
8726        {
8727            type ClientSender = ConnectorRouterClientSender<___T>;
8728            type ServerSender = ConnectorRouterServerSender<___T>;
8729        }
8730
8731        /// The client sender for the `ConnectorRouter` protocol.
8732        #[repr(transparent)]
8733        pub struct ConnectorRouterClientSender<___T: ::fidl_next::Transport> {
8734            #[allow(dead_code)]
8735            sender: ::fidl_next::protocol::ClientSender<___T>,
8736        }
8737
8738        impl<___T> ConnectorRouterClientSender<___T>
8739        where
8740            ___T: ::fidl_next::Transport,
8741        {
8742            pub fn route_with<___R>(
8743                &self,
8744                request: ___R,
8745            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
8746            where
8747                ___R: ::fidl_next::Encode<
8748                        <___T as ::fidl_next::Transport>::SendBuffer,
8749                        Encoded = crate::WireRouteRequest<'static>,
8750                    >,
8751            {
8752                ::fidl_next::TwoWayFuture::from_untyped(
8753                    self.sender.send_two_way(8420527046218942310, request),
8754                )
8755            }
8756        }
8757
8758        /// The server sender for the `ConnectorRouter` protocol.
8759        #[repr(transparent)]
8760        pub struct ConnectorRouterServerSender<___T: ::fidl_next::Transport> {
8761            sender: ::fidl_next::protocol::ServerSender<___T>,
8762        }
8763
8764        impl<___T> ConnectorRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
8765    }
8766}
8767
8768/// A client handler for the ConnectorRouter protocol.
8769///
8770/// See [`ConnectorRouter`] for more details.
8771pub trait ConnectorRouterClientHandler<
8772    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
8773    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8774>
8775{
8776    fn on_unknown_interaction(
8777        &mut self,
8778        sender: &::fidl_next::ClientSender<ConnectorRouter, ___T>,
8779        ordinal: u64,
8780    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8781        sender.close();
8782        ::core::future::ready(())
8783    }
8784}
8785
8786impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for ConnectorRouter
8787where
8788    ___H: ConnectorRouterClientHandler<___T> + ::core::marker::Send,
8789    ___T: ::fidl_next::Transport,
8790    <connector_router::Route as ::fidl_next::Method>::Response:
8791        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8792{
8793    async fn on_event(
8794        handler: &mut ___H,
8795        sender: &::fidl_next::ClientSender<Self, ___T>,
8796        ordinal: u64,
8797        buffer: ___T::RecvBuffer,
8798    ) {
8799        match ordinal {
8800            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
8801        }
8802    }
8803}
8804
8805/// A server handler for the ConnectorRouter protocol.
8806///
8807/// See [`ConnectorRouter`] for more details.
8808pub trait ConnectorRouterServerHandler<
8809    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
8810    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
8811>
8812{
8813    fn route(
8814        &mut self,
8815        sender: &::fidl_next::ServerSender<ConnectorRouter, ___T>,
8816
8817        request: ::fidl_next::Request<connector_router::Route, ___T>,
8818
8819        responder: ::fidl_next::Responder<connector_router::Route>,
8820    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
8821
8822    fn on_unknown_interaction(
8823        &mut self,
8824        sender: &::fidl_next::ServerSender<ConnectorRouter, ___T>,
8825        ordinal: u64,
8826    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
8827        sender.close();
8828        ::core::future::ready(())
8829    }
8830}
8831
8832impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for ConnectorRouter
8833where
8834    ___H: ConnectorRouterServerHandler<___T> + ::core::marker::Send,
8835    ___T: ::fidl_next::Transport,
8836    <connector_router::Route as ::fidl_next::Method>::Request:
8837        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
8838{
8839    async fn on_one_way(
8840        handler: &mut ___H,
8841        sender: &::fidl_next::ServerSender<Self, ___T>,
8842        ordinal: u64,
8843        buffer: ___T::RecvBuffer,
8844    ) {
8845        match ordinal {
8846            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
8847        }
8848    }
8849
8850    async fn on_two_way(
8851        handler: &mut ___H,
8852        sender: &::fidl_next::ServerSender<Self, ___T>,
8853        ordinal: u64,
8854        buffer: ___T::RecvBuffer,
8855        responder: ::fidl_next::protocol::Responder,
8856    ) {
8857        match ordinal {
8858            8420527046218942310 => {
8859                let responder = ::fidl_next::Responder::from_untyped(responder);
8860
8861                match ::fidl_next::DecoderExt::decode(buffer) {
8862                    Ok(decoded) => handler.route(sender, decoded, responder).await,
8863                    Err(e) => sender.close(),
8864                }
8865            }
8866
8867            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
8868        }
8869    }
8870}
8871
8872#[derive(Debug)]
8873pub enum DataRouterRouteResponse {
8874    Data(crate::Data),
8875
8876    Unavailable(crate::Unit),
8877}
8878
8879impl ::fidl_next::Encodable for DataRouterRouteResponse {
8880    type Encoded = WireDataRouterRouteResponse<'static>;
8881}
8882
8883unsafe impl<___E> ::fidl_next::Encode<___E> for DataRouterRouteResponse
8884where
8885    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
8886    ___E: ::fidl_next::Encoder,
8887    ___E: ::fidl_next::fuchsia::HandleEncoder,
8888{
8889    #[inline]
8890    fn encode(
8891        self,
8892        encoder: &mut ___E,
8893        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
8894    ) -> Result<(), ::fidl_next::EncodeError> {
8895        ::fidl_next::munge!(let WireDataRouterRouteResponse { raw, _phantom: _ } = out);
8896
8897        match self {
8898            Self::Data(value) => {
8899                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Data>(value, 1, encoder, raw)?
8900            }
8901
8902            Self::Unavailable(value) => {
8903                ::fidl_next::RawWireUnion::encode_as::<___E, crate::Unit>(value, 2, encoder, raw)?
8904            }
8905        }
8906
8907        Ok(())
8908    }
8909}
8910
8911impl ::fidl_next::EncodableOption for DataRouterRouteResponse {
8912    type EncodedOption = WireOptionalDataRouterRouteResponse<'static>;
8913}
8914
8915unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DataRouterRouteResponse
8916where
8917    ___E: ?Sized,
8918    DataRouterRouteResponse: ::fidl_next::Encode<___E>,
8919{
8920    #[inline]
8921    fn encode_option(
8922        this: Option<Self>,
8923        encoder: &mut ___E,
8924        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
8925    ) -> Result<(), ::fidl_next::EncodeError> {
8926        ::fidl_next::munge!(let WireOptionalDataRouterRouteResponse { raw, _phantom: _ } = &mut *out);
8927
8928        if let Some(inner) = this {
8929            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
8930            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
8931        } else {
8932            ::fidl_next::RawWireUnion::encode_absent(raw);
8933        }
8934
8935        Ok(())
8936    }
8937}
8938
8939impl<'de> ::fidl_next::FromWire<WireDataRouterRouteResponse<'de>> for DataRouterRouteResponse {
8940    #[inline]
8941    fn from_wire(wire: WireDataRouterRouteResponse<'de>) -> Self {
8942        let wire = ::core::mem::ManuallyDrop::new(wire);
8943        match wire.raw.ordinal() {
8944            1 => Self::Data(::fidl_next::FromWire::from_wire(unsafe {
8945                wire.raw.get().read_unchecked::<crate::WireData<'de>>()
8946            })),
8947
8948            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
8949                wire.raw.get().read_unchecked::<crate::WireUnit>()
8950            })),
8951
8952            _ => unsafe { ::core::hint::unreachable_unchecked() },
8953        }
8954    }
8955}
8956
8957impl<'de> ::fidl_next::FromWireOption<WireOptionalDataRouterRouteResponse<'de>>
8958    for Box<DataRouterRouteResponse>
8959{
8960    #[inline]
8961    fn from_wire_option(wire: WireOptionalDataRouterRouteResponse<'de>) -> Option<Self> {
8962        if let Some(inner) = wire.into_option() {
8963            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
8964        } else {
8965            None
8966        }
8967    }
8968}
8969
8970/// The wire type corresponding to [`DataRouterRouteResponse`].
8971#[repr(transparent)]
8972pub struct WireDataRouterRouteResponse<'de> {
8973    raw: ::fidl_next::RawWireUnion,
8974    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
8975}
8976
8977impl<'de> Drop for WireDataRouterRouteResponse<'de> {
8978    fn drop(&mut self) {
8979        match self.raw.ordinal() {
8980            1 => {
8981                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireData<'de>>() };
8982            }
8983
8984            2 => {
8985                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
8986            }
8987
8988            _ => unsafe { ::core::hint::unreachable_unchecked() },
8989        }
8990    }
8991}
8992
8993unsafe impl ::fidl_next::Wire for WireDataRouterRouteResponse<'static> {
8994    type Decoded<'de> = WireDataRouterRouteResponse<'de>;
8995
8996    #[inline]
8997    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
8998        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
8999        ::fidl_next::RawWireUnion::zero_padding(raw);
9000    }
9001}
9002
9003pub mod data_router_route_response {
9004    pub enum Ref<'de> {
9005        Data(&'de crate::WireData<'de>),
9006
9007        Unavailable(&'de crate::WireUnit),
9008    }
9009}
9010
9011impl<'de> WireDataRouterRouteResponse<'de> {
9012    pub fn as_ref(&self) -> crate::data_router_route_response::Ref<'_> {
9013        match self.raw.ordinal() {
9014            1 => crate::data_router_route_response::Ref::Data(unsafe {
9015                self.raw.get().deref_unchecked::<crate::WireData<'_>>()
9016            }),
9017
9018            2 => crate::data_router_route_response::Ref::Unavailable(unsafe {
9019                self.raw.get().deref_unchecked::<crate::WireUnit>()
9020            }),
9021
9022            _ => unsafe { ::core::hint::unreachable_unchecked() },
9023        }
9024    }
9025}
9026
9027unsafe impl<___D> ::fidl_next::Decode<___D> for WireDataRouterRouteResponse<'static>
9028where
9029    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9030    ___D: ::fidl_next::Decoder,
9031    ___D: ::fidl_next::fuchsia::HandleDecoder,
9032{
9033    fn decode(
9034        mut slot: ::fidl_next::Slot<'_, Self>,
9035        decoder: &mut ___D,
9036    ) -> Result<(), ::fidl_next::DecodeError> {
9037        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9038        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9039            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData<'static>>(
9040                raw, decoder,
9041            )?,
9042
9043            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
9044
9045            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
9046        }
9047
9048        Ok(())
9049    }
9050}
9051
9052impl<'de> ::core::fmt::Debug for WireDataRouterRouteResponse<'de> {
9053    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9054        match self.raw.ordinal() {
9055            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireData<'_>>().fmt(f) },
9056            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
9057            _ => unsafe { ::core::hint::unreachable_unchecked() },
9058        }
9059    }
9060}
9061
9062#[repr(transparent)]
9063pub struct WireOptionalDataRouterRouteResponse<'de> {
9064    raw: ::fidl_next::RawWireUnion,
9065    _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
9066}
9067
9068unsafe impl ::fidl_next::Wire for WireOptionalDataRouterRouteResponse<'static> {
9069    type Decoded<'de> = WireOptionalDataRouterRouteResponse<'de>;
9070
9071    #[inline]
9072    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9073        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
9074        ::fidl_next::RawWireUnion::zero_padding(raw);
9075    }
9076}
9077
9078impl<'de> WireOptionalDataRouterRouteResponse<'de> {
9079    pub fn is_some(&self) -> bool {
9080        self.raw.is_some()
9081    }
9082
9083    pub fn is_none(&self) -> bool {
9084        self.raw.is_none()
9085    }
9086
9087    pub fn as_ref(&self) -> Option<&WireDataRouterRouteResponse<'de>> {
9088        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
9089    }
9090
9091    pub fn into_option(self) -> Option<WireDataRouterRouteResponse<'de>> {
9092        if self.is_some() {
9093            Some(WireDataRouterRouteResponse {
9094                raw: self.raw,
9095                _phantom: ::core::marker::PhantomData,
9096            })
9097        } else {
9098            None
9099        }
9100    }
9101}
9102
9103unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDataRouterRouteResponse<'static>
9104where
9105    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9106    ___D: ::fidl_next::Decoder,
9107    ___D: ::fidl_next::fuchsia::HandleDecoder,
9108{
9109    fn decode(
9110        mut slot: ::fidl_next::Slot<'_, Self>,
9111        decoder: &mut ___D,
9112    ) -> Result<(), ::fidl_next::DecodeError> {
9113        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
9114        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
9115            1 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireData<'static>>(
9116                raw, decoder,
9117            )?,
9118
9119            2 => ::fidl_next::RawWireUnion::decode_as::<___D, crate::WireUnit>(raw, decoder)?,
9120
9121            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
9122            _ => ::fidl_next::RawWireUnion::decode_unknown(raw, decoder)?,
9123        }
9124
9125        Ok(())
9126    }
9127}
9128
9129impl<'de> ::core::fmt::Debug for WireOptionalDataRouterRouteResponse<'de> {
9130    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
9131        self.as_ref().fmt(f)
9132    }
9133}
9134
9135/// The type corresponding to the DataRouter protocol.
9136#[derive(Debug)]
9137pub struct DataRouter;
9138
9139impl ::fidl_next::Discoverable for DataRouter {
9140    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DataRouter";
9141}
9142
9143pub mod data_router {
9144    pub mod prelude {
9145        pub use crate::{
9146            DataRouter, DataRouterClientHandler, DataRouterServerHandler, data_router,
9147        };
9148
9149        pub use crate::DataRouterRouteResponse;
9150
9151        pub use crate::RouteRequest;
9152
9153        pub use crate::RouterError;
9154    }
9155
9156    pub struct Route;
9157
9158    impl ::fidl_next::Method for Route {
9159        const ORDINAL: u64 = 3352890635970754564;
9160
9161        type Protocol = crate::DataRouter;
9162
9163        type Request = crate::WireRouteRequest<'static>;
9164
9165        type Response = ::fidl_next::WireFlexibleResult<
9166            'static,
9167            crate::WireDataRouterRouteResponse<'static>,
9168            crate::WireRouterError,
9169        >;
9170    }
9171
9172    mod ___detail {
9173
9174        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DataRouter
9175        where
9176            ___T: ::fidl_next::Transport,
9177        {
9178            type ClientSender = DataRouterClientSender<___T>;
9179            type ServerSender = DataRouterServerSender<___T>;
9180        }
9181
9182        /// The client sender for the `DataRouter` protocol.
9183        #[repr(transparent)]
9184        pub struct DataRouterClientSender<___T: ::fidl_next::Transport> {
9185            #[allow(dead_code)]
9186            sender: ::fidl_next::protocol::ClientSender<___T>,
9187        }
9188
9189        impl<___T> DataRouterClientSender<___T>
9190        where
9191            ___T: ::fidl_next::Transport,
9192        {
9193            pub fn route_with<___R>(
9194                &self,
9195                request: ___R,
9196            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
9197            where
9198                ___R: ::fidl_next::Encode<
9199                        <___T as ::fidl_next::Transport>::SendBuffer,
9200                        Encoded = crate::WireRouteRequest<'static>,
9201                    >,
9202            {
9203                ::fidl_next::TwoWayFuture::from_untyped(
9204                    self.sender.send_two_way(3352890635970754564, request),
9205                )
9206            }
9207        }
9208
9209        /// The server sender for the `DataRouter` protocol.
9210        #[repr(transparent)]
9211        pub struct DataRouterServerSender<___T: ::fidl_next::Transport> {
9212            sender: ::fidl_next::protocol::ServerSender<___T>,
9213        }
9214
9215        impl<___T> DataRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
9216    }
9217}
9218
9219/// A client handler for the DataRouter protocol.
9220///
9221/// See [`DataRouter`] for more details.
9222pub trait DataRouterClientHandler<
9223    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9224    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9225>
9226{
9227    fn on_unknown_interaction(
9228        &mut self,
9229        sender: &::fidl_next::ClientSender<DataRouter, ___T>,
9230        ordinal: u64,
9231    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9232        sender.close();
9233        ::core::future::ready(())
9234    }
9235}
9236
9237impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DataRouter
9238where
9239    ___H: DataRouterClientHandler<___T> + ::core::marker::Send,
9240    ___T: ::fidl_next::Transport,
9241    <data_router::Route as ::fidl_next::Method>::Response:
9242        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9243{
9244    async fn on_event(
9245        handler: &mut ___H,
9246        sender: &::fidl_next::ClientSender<Self, ___T>,
9247        ordinal: u64,
9248        buffer: ___T::RecvBuffer,
9249    ) {
9250        match ordinal {
9251            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9252        }
9253    }
9254}
9255
9256/// A server handler for the DataRouter protocol.
9257///
9258/// See [`DataRouter`] for more details.
9259pub trait DataRouterServerHandler<
9260    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9261    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9262>
9263{
9264    fn route(
9265        &mut self,
9266        sender: &::fidl_next::ServerSender<DataRouter, ___T>,
9267
9268        request: ::fidl_next::Request<data_router::Route, ___T>,
9269
9270        responder: ::fidl_next::Responder<data_router::Route>,
9271    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9272
9273    fn on_unknown_interaction(
9274        &mut self,
9275        sender: &::fidl_next::ServerSender<DataRouter, ___T>,
9276        ordinal: u64,
9277    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9278        sender.close();
9279        ::core::future::ready(())
9280    }
9281}
9282
9283impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DataRouter
9284where
9285    ___H: DataRouterServerHandler<___T> + ::core::marker::Send,
9286    ___T: ::fidl_next::Transport,
9287    <data_router::Route as ::fidl_next::Method>::Request:
9288        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9289{
9290    async fn on_one_way(
9291        handler: &mut ___H,
9292        sender: &::fidl_next::ServerSender<Self, ___T>,
9293        ordinal: u64,
9294        buffer: ___T::RecvBuffer,
9295    ) {
9296        match ordinal {
9297            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9298        }
9299    }
9300
9301    async fn on_two_way(
9302        handler: &mut ___H,
9303        sender: &::fidl_next::ServerSender<Self, ___T>,
9304        ordinal: u64,
9305        buffer: ___T::RecvBuffer,
9306        responder: ::fidl_next::protocol::Responder,
9307    ) {
9308        match ordinal {
9309            3352890635970754564 => {
9310                let responder = ::fidl_next::Responder::from_untyped(responder);
9311
9312                match ::fidl_next::DecoderExt::decode(buffer) {
9313                    Ok(decoded) => handler.route(sender, decoded, responder).await,
9314                    Err(e) => sender.close(),
9315                }
9316            }
9317
9318            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9319        }
9320    }
9321}
9322
9323/// The type corresponding to the Dictionary protocol.
9324#[derive(Debug)]
9325pub struct Dictionary;
9326
9327impl ::fidl_next::Discoverable for Dictionary {
9328    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
9329}
9330
9331pub mod dictionary {
9332    pub mod prelude {
9333        pub use crate::{Dictionary, DictionaryClientHandler, DictionaryServerHandler, dictionary};
9334    }
9335
9336    mod ___detail {
9337
9338        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Dictionary
9339        where
9340            ___T: ::fidl_next::Transport,
9341        {
9342            type ClientSender = DictionaryClientSender<___T>;
9343            type ServerSender = DictionaryServerSender<___T>;
9344        }
9345
9346        /// The client sender for the `Dictionary` protocol.
9347        #[repr(transparent)]
9348        pub struct DictionaryClientSender<___T: ::fidl_next::Transport> {
9349            #[allow(dead_code)]
9350            sender: ::fidl_next::protocol::ClientSender<___T>,
9351        }
9352
9353        impl<___T> DictionaryClientSender<___T> where ___T: ::fidl_next::Transport {}
9354
9355        /// The server sender for the `Dictionary` protocol.
9356        #[repr(transparent)]
9357        pub struct DictionaryServerSender<___T: ::fidl_next::Transport> {
9358            sender: ::fidl_next::protocol::ServerSender<___T>,
9359        }
9360
9361        impl<___T> DictionaryServerSender<___T> where ___T: ::fidl_next::Transport {}
9362    }
9363}
9364
9365/// A client handler for the Dictionary protocol.
9366///
9367/// See [`Dictionary`] for more details.
9368pub trait DictionaryClientHandler<
9369    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9370    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9371>
9372{
9373    fn on_unknown_interaction(
9374        &mut self,
9375        sender: &::fidl_next::ClientSender<Dictionary, ___T>,
9376        ordinal: u64,
9377    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9378        sender.close();
9379        ::core::future::ready(())
9380    }
9381}
9382
9383impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Dictionary
9384where
9385    ___H: DictionaryClientHandler<___T> + ::core::marker::Send,
9386    ___T: ::fidl_next::Transport,
9387{
9388    async fn on_event(
9389        handler: &mut ___H,
9390        sender: &::fidl_next::ClientSender<Self, ___T>,
9391        ordinal: u64,
9392        buffer: ___T::RecvBuffer,
9393    ) {
9394        match ordinal {
9395            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9396        }
9397    }
9398}
9399
9400/// A server handler for the Dictionary protocol.
9401///
9402/// See [`Dictionary`] for more details.
9403pub trait DictionaryServerHandler<
9404    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9405    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9406>
9407{
9408    fn on_unknown_interaction(
9409        &mut self,
9410        sender: &::fidl_next::ServerSender<Dictionary, ___T>,
9411        ordinal: u64,
9412    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9413        sender.close();
9414        ::core::future::ready(())
9415    }
9416}
9417
9418impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Dictionary
9419where
9420    ___H: DictionaryServerHandler<___T> + ::core::marker::Send,
9421    ___T: ::fidl_next::Transport,
9422{
9423    async fn on_one_way(
9424        handler: &mut ___H,
9425        sender: &::fidl_next::ServerSender<Self, ___T>,
9426        ordinal: u64,
9427        buffer: ___T::RecvBuffer,
9428    ) {
9429        match ordinal {
9430            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9431        }
9432    }
9433
9434    async fn on_two_way(
9435        handler: &mut ___H,
9436        sender: &::fidl_next::ServerSender<Self, ___T>,
9437        ordinal: u64,
9438        buffer: ___T::RecvBuffer,
9439        responder: ::fidl_next::protocol::Responder,
9440    ) {
9441        match ordinal {
9442            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9443        }
9444    }
9445}
9446
9447#[derive(Clone, Debug)]
9448pub struct DictionaryDrainIteratorGetNextRequest {
9449    pub start_id: u64,
9450
9451    pub limit: u32,
9452}
9453
9454impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextRequest {
9455    type Encoded = WireDictionaryDrainIteratorGetNextRequest;
9456}
9457
9458unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextRequest
9459where
9460    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9461{
9462    #[inline]
9463    fn encode(
9464        self,
9465        encoder: &mut ___E,
9466        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9467    ) -> Result<(), ::fidl_next::EncodeError> {
9468        ::fidl_next::munge! {
9469            let Self::Encoded {
9470                start_id,
9471                limit,
9472
9473            } = out;
9474        }
9475
9476        ::fidl_next::Encode::encode(self.start_id, encoder, start_id)?;
9477
9478        ::fidl_next::Encode::encode(self.limit, encoder, limit)?;
9479
9480        Ok(())
9481    }
9482}
9483
9484unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DictionaryDrainIteratorGetNextRequest
9485where
9486    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9487{
9488    #[inline]
9489    fn encode_ref(
9490        &self,
9491        encoder: &mut ___E,
9492        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9493    ) -> Result<(), ::fidl_next::EncodeError> {
9494        ::fidl_next::munge! {
9495            let Self::Encoded {
9496                start_id,
9497                limit,
9498
9499            } = out;
9500        }
9501
9502        ::fidl_next::EncodeRef::encode_ref(&self.start_id, encoder, start_id)?;
9503
9504        ::fidl_next::EncodeRef::encode_ref(&self.limit, encoder, limit)?;
9505
9506        Ok(())
9507    }
9508}
9509
9510impl ::fidl_next::EncodableOption for DictionaryDrainIteratorGetNextRequest {
9511    type EncodedOption = ::fidl_next::WireBox<'static, WireDictionaryDrainIteratorGetNextRequest>;
9512}
9513
9514unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryDrainIteratorGetNextRequest
9515where
9516    ___E: ::fidl_next::Encoder + ?Sized,
9517    DictionaryDrainIteratorGetNextRequest: ::fidl_next::Encode<___E>,
9518{
9519    #[inline]
9520    fn encode_option(
9521        this: Option<Self>,
9522        encoder: &mut ___E,
9523        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9524    ) -> Result<(), ::fidl_next::EncodeError> {
9525        if let Some(inner) = this {
9526            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9527            ::fidl_next::WireBox::encode_present(out);
9528        } else {
9529            ::fidl_next::WireBox::encode_absent(out);
9530        }
9531
9532        Ok(())
9533    }
9534}
9535
9536unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DictionaryDrainIteratorGetNextRequest
9537where
9538    ___E: ::fidl_next::Encoder + ?Sized,
9539    DictionaryDrainIteratorGetNextRequest: ::fidl_next::EncodeRef<___E>,
9540{
9541    #[inline]
9542    fn encode_option_ref(
9543        this: Option<&Self>,
9544        encoder: &mut ___E,
9545        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9546    ) -> Result<(), ::fidl_next::EncodeError> {
9547        if let Some(inner) = this {
9548            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9549            ::fidl_next::WireBox::encode_present(out);
9550        } else {
9551            ::fidl_next::WireBox::encode_absent(out);
9552        }
9553
9554        Ok(())
9555    }
9556}
9557
9558impl ::fidl_next::FromWire<WireDictionaryDrainIteratorGetNextRequest>
9559    for DictionaryDrainIteratorGetNextRequest
9560{
9561    #[inline]
9562    fn from_wire(wire: WireDictionaryDrainIteratorGetNextRequest) -> Self {
9563        Self {
9564            start_id: ::fidl_next::FromWire::from_wire(wire.start_id),
9565
9566            limit: ::fidl_next::FromWire::from_wire(wire.limit),
9567        }
9568    }
9569}
9570
9571impl ::fidl_next::FromWireRef<WireDictionaryDrainIteratorGetNextRequest>
9572    for DictionaryDrainIteratorGetNextRequest
9573{
9574    #[inline]
9575    fn from_wire_ref(wire: &WireDictionaryDrainIteratorGetNextRequest) -> Self {
9576        Self {
9577            start_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.start_id),
9578
9579            limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.limit),
9580        }
9581    }
9582}
9583
9584/// The wire type corresponding to [`DictionaryDrainIteratorGetNextRequest`].
9585#[derive(Clone, Debug)]
9586#[repr(C)]
9587pub struct WireDictionaryDrainIteratorGetNextRequest {
9588    pub start_id: ::fidl_next::WireU64,
9589
9590    pub limit: ::fidl_next::WireU32,
9591}
9592
9593unsafe impl ::fidl_next::Wire for WireDictionaryDrainIteratorGetNextRequest {
9594    type Decoded<'de> = WireDictionaryDrainIteratorGetNextRequest;
9595
9596    #[inline]
9597    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
9598        unsafe {
9599            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
9600        }
9601    }
9602}
9603
9604unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextRequest
9605where
9606    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9607{
9608    fn decode(
9609        slot: ::fidl_next::Slot<'_, Self>,
9610        decoder: &mut ___D,
9611    ) -> Result<(), ::fidl_next::DecodeError> {
9612        ::fidl_next::munge! {
9613            let Self {
9614                mut start_id,
9615                mut limit,
9616
9617            } = slot;
9618        }
9619
9620        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
9621
9622        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
9623
9624        Ok(())
9625    }
9626}
9627
9628#[doc = " Maximum number of items returned by dictionary iterator.\n"]
9629pub const MAX_DICTIONARY_ITERATOR_CHUNK: u32 = 128;
9630
9631#[derive(Debug)]
9632pub struct DictionaryDrainIteratorGetNextResponse {
9633    pub items: Vec<crate::DictionaryItem>,
9634
9635    pub end_id: u64,
9636}
9637
9638impl ::fidl_next::Encodable for DictionaryDrainIteratorGetNextResponse {
9639    type Encoded = WireDictionaryDrainIteratorGetNextResponse<'static>;
9640}
9641
9642unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryDrainIteratorGetNextResponse
9643where
9644    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9645    ___E: ::fidl_next::Encoder,
9646    ___E: ::fidl_next::fuchsia::HandleEncoder,
9647{
9648    #[inline]
9649    fn encode(
9650        self,
9651        encoder: &mut ___E,
9652        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9653    ) -> Result<(), ::fidl_next::EncodeError> {
9654        ::fidl_next::munge! {
9655            let Self::Encoded {
9656                items,
9657                end_id,
9658
9659            } = out;
9660        }
9661
9662        ::fidl_next::Encode::encode(self.items, encoder, items)?;
9663
9664        ::fidl_next::Encode::encode(self.end_id, encoder, end_id)?;
9665
9666        Ok(())
9667    }
9668}
9669
9670impl ::fidl_next::EncodableOption for DictionaryDrainIteratorGetNextResponse {
9671    type EncodedOption =
9672        ::fidl_next::WireBox<'static, WireDictionaryDrainIteratorGetNextResponse<'static>>;
9673}
9674
9675unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryDrainIteratorGetNextResponse
9676where
9677    ___E: ::fidl_next::Encoder + ?Sized,
9678    DictionaryDrainIteratorGetNextResponse: ::fidl_next::Encode<___E>,
9679{
9680    #[inline]
9681    fn encode_option(
9682        this: Option<Self>,
9683        encoder: &mut ___E,
9684        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
9685    ) -> Result<(), ::fidl_next::EncodeError> {
9686        if let Some(inner) = this {
9687            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
9688            ::fidl_next::WireBox::encode_present(out);
9689        } else {
9690            ::fidl_next::WireBox::encode_absent(out);
9691        }
9692
9693        Ok(())
9694    }
9695}
9696
9697impl<'de> ::fidl_next::FromWire<WireDictionaryDrainIteratorGetNextResponse<'de>>
9698    for DictionaryDrainIteratorGetNextResponse
9699{
9700    #[inline]
9701    fn from_wire(wire: WireDictionaryDrainIteratorGetNextResponse<'de>) -> Self {
9702        Self {
9703            items: ::fidl_next::FromWire::from_wire(wire.items),
9704
9705            end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
9706        }
9707    }
9708}
9709
9710/// The wire type corresponding to [`DictionaryDrainIteratorGetNextResponse`].
9711#[derive(Debug)]
9712#[repr(C)]
9713pub struct WireDictionaryDrainIteratorGetNextResponse<'de> {
9714    pub items: ::fidl_next::WireVector<'de, crate::WireDictionaryItem<'de>>,
9715
9716    pub end_id: ::fidl_next::WireU64,
9717}
9718
9719unsafe impl ::fidl_next::Wire for WireDictionaryDrainIteratorGetNextResponse<'static> {
9720    type Decoded<'de> = WireDictionaryDrainIteratorGetNextResponse<'de>;
9721
9722    #[inline]
9723    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
9724}
9725
9726unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryDrainIteratorGetNextResponse<'static>
9727where
9728    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
9729    ___D: ::fidl_next::Decoder,
9730    ___D: ::fidl_next::fuchsia::HandleDecoder,
9731{
9732    fn decode(
9733        slot: ::fidl_next::Slot<'_, Self>,
9734        decoder: &mut ___D,
9735    ) -> Result<(), ::fidl_next::DecodeError> {
9736        ::fidl_next::munge! {
9737            let Self {
9738                mut items,
9739                mut end_id,
9740
9741            } = slot;
9742        }
9743
9744        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
9745
9746        let items = unsafe { items.deref_unchecked() };
9747
9748        if items.len() > 128 {
9749            return Err(::fidl_next::DecodeError::VectorTooLong {
9750                size: items.len() as u64,
9751                limit: 128,
9752            });
9753        }
9754
9755        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
9756
9757        Ok(())
9758    }
9759}
9760
9761/// The type corresponding to the DictionaryDrainIterator protocol.
9762#[derive(Debug)]
9763pub struct DictionaryDrainIterator;
9764
9765pub mod dictionary_drain_iterator {
9766    pub mod prelude {
9767        pub use crate::{
9768            DictionaryDrainIterator, DictionaryDrainIteratorClientHandler,
9769            DictionaryDrainIteratorServerHandler, dictionary_drain_iterator,
9770        };
9771
9772        pub use crate::CapabilityStoreError;
9773
9774        pub use crate::DictionaryDrainIteratorGetNextRequest;
9775
9776        pub use crate::DictionaryDrainIteratorGetNextResponse;
9777    }
9778
9779    pub struct GetNext;
9780
9781    impl ::fidl_next::Method for GetNext {
9782        const ORDINAL: u64 = 5728722530628427873;
9783
9784        type Protocol = crate::DictionaryDrainIterator;
9785
9786        type Request = crate::WireDictionaryDrainIteratorGetNextRequest;
9787
9788        type Response = ::fidl_next::WireFlexibleResult<
9789            'static,
9790            crate::WireDictionaryDrainIteratorGetNextResponse<'static>,
9791            crate::WireCapabilityStoreError,
9792        >;
9793    }
9794
9795    mod ___detail {
9796
9797        pub struct GetNext<T0, T1> {
9798            start_id: T0,
9799
9800            limit: T1,
9801        }
9802
9803        impl<T0, T1> ::fidl_next::Encodable for GetNext<T0, T1>
9804        where
9805            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
9806            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>,
9807        {
9808            type Encoded = crate::WireDictionaryDrainIteratorGetNextRequest;
9809        }
9810
9811        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for GetNext<T0, T1>
9812        where
9813            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
9814            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
9815            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>,
9816        {
9817            #[inline]
9818            fn encode(
9819                self,
9820                encoder: &mut ___E,
9821                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
9822            ) -> Result<(), ::fidl_next::EncodeError> {
9823                ::fidl_next::munge! {
9824                    let Self::Encoded {
9825                        start_id,
9826                        limit,
9827
9828                    } = out;
9829                }
9830
9831                ::fidl_next::Encode::encode(self.start_id, encoder, start_id)?;
9832
9833                ::fidl_next::Encode::encode(self.limit, encoder, limit)?;
9834
9835                Ok(())
9836            }
9837        }
9838
9839        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DictionaryDrainIterator
9840        where
9841            ___T: ::fidl_next::Transport,
9842        {
9843            type ClientSender = DictionaryDrainIteratorClientSender<___T>;
9844            type ServerSender = DictionaryDrainIteratorServerSender<___T>;
9845        }
9846
9847        /// The client sender for the `DictionaryDrainIterator` protocol.
9848        #[repr(transparent)]
9849        pub struct DictionaryDrainIteratorClientSender<___T: ::fidl_next::Transport> {
9850            #[allow(dead_code)]
9851            sender: ::fidl_next::protocol::ClientSender<___T>,
9852        }
9853
9854        impl<___T> DictionaryDrainIteratorClientSender<___T>
9855        where
9856            ___T: ::fidl_next::Transport,
9857        {
9858            #[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"]
9859            pub fn get_next(
9860                &self,
9861
9862                start_id: impl ::fidl_next::Encode<
9863                    <___T as ::fidl_next::Transport>::SendBuffer,
9864                    Encoded = ::fidl_next::WireU64,
9865                >,
9866
9867                limit: impl ::fidl_next::Encode<
9868                    <___T as ::fidl_next::Transport>::SendBuffer,
9869                    Encoded = ::fidl_next::WireU32,
9870                >,
9871            ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
9872            where
9873                <___T as ::fidl_next::Transport>::SendBuffer:
9874                    ::fidl_next::encoder::InternalHandleEncoder,
9875            {
9876                self.get_next_with(GetNext { start_id, limit })
9877            }
9878
9879            #[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"]
9880            pub fn get_next_with<___R>(
9881                &self,
9882                request: ___R,
9883            ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
9884            where
9885                ___R: ::fidl_next::Encode<
9886                        <___T as ::fidl_next::Transport>::SendBuffer,
9887                        Encoded = crate::WireDictionaryDrainIteratorGetNextRequest,
9888                    >,
9889            {
9890                ::fidl_next::TwoWayFuture::from_untyped(
9891                    self.sender.send_two_way(5728722530628427873, request),
9892                )
9893            }
9894        }
9895
9896        /// The server sender for the `DictionaryDrainIterator` protocol.
9897        #[repr(transparent)]
9898        pub struct DictionaryDrainIteratorServerSender<___T: ::fidl_next::Transport> {
9899            sender: ::fidl_next::protocol::ServerSender<___T>,
9900        }
9901
9902        impl<___T> DictionaryDrainIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
9903    }
9904}
9905
9906/// A client handler for the DictionaryDrainIterator protocol.
9907///
9908/// See [`DictionaryDrainIterator`] for more details.
9909pub trait DictionaryDrainIteratorClientHandler<
9910    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9911    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9912>
9913{
9914    fn on_unknown_interaction(
9915        &mut self,
9916        sender: &::fidl_next::ClientSender<DictionaryDrainIterator, ___T>,
9917        ordinal: u64,
9918    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9919        sender.close();
9920        ::core::future::ready(())
9921    }
9922}
9923
9924impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryDrainIterator
9925where
9926    ___H: DictionaryDrainIteratorClientHandler<___T> + ::core::marker::Send,
9927    ___T: ::fidl_next::Transport,
9928    <dictionary_drain_iterator::GetNext as ::fidl_next::Method>::Response:
9929        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9930{
9931    async fn on_event(
9932        handler: &mut ___H,
9933        sender: &::fidl_next::ClientSender<Self, ___T>,
9934        ordinal: u64,
9935        buffer: ___T::RecvBuffer,
9936    ) {
9937        match ordinal {
9938            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9939        }
9940    }
9941}
9942
9943/// A server handler for the DictionaryDrainIterator protocol.
9944///
9945/// See [`DictionaryDrainIterator`] for more details.
9946pub trait DictionaryDrainIteratorServerHandler<
9947    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
9948    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
9949>
9950{
9951    #[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"]
9952    fn get_next(
9953        &mut self,
9954        sender: &::fidl_next::ServerSender<DictionaryDrainIterator, ___T>,
9955
9956        request: ::fidl_next::Request<dictionary_drain_iterator::GetNext, ___T>,
9957
9958        responder: ::fidl_next::Responder<dictionary_drain_iterator::GetNext>,
9959    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
9960
9961    fn on_unknown_interaction(
9962        &mut self,
9963        sender: &::fidl_next::ServerSender<DictionaryDrainIterator, ___T>,
9964        ordinal: u64,
9965    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
9966        sender.close();
9967        ::core::future::ready(())
9968    }
9969}
9970
9971impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryDrainIterator
9972where
9973    ___H: DictionaryDrainIteratorServerHandler<___T> + ::core::marker::Send,
9974    ___T: ::fidl_next::Transport,
9975    <dictionary_drain_iterator::GetNext as ::fidl_next::Method>::Request:
9976        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
9977{
9978    async fn on_one_way(
9979        handler: &mut ___H,
9980        sender: &::fidl_next::ServerSender<Self, ___T>,
9981        ordinal: u64,
9982        buffer: ___T::RecvBuffer,
9983    ) {
9984        match ordinal {
9985            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
9986        }
9987    }
9988
9989    async fn on_two_way(
9990        handler: &mut ___H,
9991        sender: &::fidl_next::ServerSender<Self, ___T>,
9992        ordinal: u64,
9993        buffer: ___T::RecvBuffer,
9994        responder: ::fidl_next::protocol::Responder,
9995    ) {
9996        match ordinal {
9997            5728722530628427873 => {
9998                let responder = ::fidl_next::Responder::from_untyped(responder);
9999
10000                match ::fidl_next::DecoderExt::decode(buffer) {
10001                    Ok(decoded) => handler.get_next(sender, decoded, responder).await,
10002                    Err(e) => sender.close(),
10003                }
10004            }
10005
10006            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
10007        }
10008    }
10009}
10010
10011#[derive(Clone, Debug)]
10012pub struct DictionaryEnumerateIteratorGetNextRequest {
10013    pub start_id: u64,
10014
10015    pub limit: u32,
10016}
10017
10018impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextRequest {
10019    type Encoded = WireDictionaryEnumerateIteratorGetNextRequest;
10020}
10021
10022unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextRequest
10023where
10024    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10025{
10026    #[inline]
10027    fn encode(
10028        self,
10029        encoder: &mut ___E,
10030        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10031    ) -> Result<(), ::fidl_next::EncodeError> {
10032        ::fidl_next::munge! {
10033            let Self::Encoded {
10034                start_id,
10035                limit,
10036
10037            } = out;
10038        }
10039
10040        ::fidl_next::Encode::encode(self.start_id, encoder, start_id)?;
10041
10042        ::fidl_next::Encode::encode(self.limit, encoder, limit)?;
10043
10044        Ok(())
10045    }
10046}
10047
10048unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DictionaryEnumerateIteratorGetNextRequest
10049where
10050    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10051{
10052    #[inline]
10053    fn encode_ref(
10054        &self,
10055        encoder: &mut ___E,
10056        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10057    ) -> Result<(), ::fidl_next::EncodeError> {
10058        ::fidl_next::munge! {
10059            let Self::Encoded {
10060                start_id,
10061                limit,
10062
10063            } = out;
10064        }
10065
10066        ::fidl_next::EncodeRef::encode_ref(&self.start_id, encoder, start_id)?;
10067
10068        ::fidl_next::EncodeRef::encode_ref(&self.limit, encoder, limit)?;
10069
10070        Ok(())
10071    }
10072}
10073
10074impl ::fidl_next::EncodableOption for DictionaryEnumerateIteratorGetNextRequest {
10075    type EncodedOption =
10076        ::fidl_next::WireBox<'static, WireDictionaryEnumerateIteratorGetNextRequest>;
10077}
10078
10079unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryEnumerateIteratorGetNextRequest
10080where
10081    ___E: ::fidl_next::Encoder + ?Sized,
10082    DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::Encode<___E>,
10083{
10084    #[inline]
10085    fn encode_option(
10086        this: Option<Self>,
10087        encoder: &mut ___E,
10088        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10089    ) -> Result<(), ::fidl_next::EncodeError> {
10090        if let Some(inner) = this {
10091            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10092            ::fidl_next::WireBox::encode_present(out);
10093        } else {
10094            ::fidl_next::WireBox::encode_absent(out);
10095        }
10096
10097        Ok(())
10098    }
10099}
10100
10101unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for DictionaryEnumerateIteratorGetNextRequest
10102where
10103    ___E: ::fidl_next::Encoder + ?Sized,
10104    DictionaryEnumerateIteratorGetNextRequest: ::fidl_next::EncodeRef<___E>,
10105{
10106    #[inline]
10107    fn encode_option_ref(
10108        this: Option<&Self>,
10109        encoder: &mut ___E,
10110        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10111    ) -> Result<(), ::fidl_next::EncodeError> {
10112        if let Some(inner) = this {
10113            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10114            ::fidl_next::WireBox::encode_present(out);
10115        } else {
10116            ::fidl_next::WireBox::encode_absent(out);
10117        }
10118
10119        Ok(())
10120    }
10121}
10122
10123impl ::fidl_next::FromWire<WireDictionaryEnumerateIteratorGetNextRequest>
10124    for DictionaryEnumerateIteratorGetNextRequest
10125{
10126    #[inline]
10127    fn from_wire(wire: WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
10128        Self {
10129            start_id: ::fidl_next::FromWire::from_wire(wire.start_id),
10130
10131            limit: ::fidl_next::FromWire::from_wire(wire.limit),
10132        }
10133    }
10134}
10135
10136impl ::fidl_next::FromWireRef<WireDictionaryEnumerateIteratorGetNextRequest>
10137    for DictionaryEnumerateIteratorGetNextRequest
10138{
10139    #[inline]
10140    fn from_wire_ref(wire: &WireDictionaryEnumerateIteratorGetNextRequest) -> Self {
10141        Self {
10142            start_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.start_id),
10143
10144            limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.limit),
10145        }
10146    }
10147}
10148
10149/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextRequest`].
10150#[derive(Clone, Debug)]
10151#[repr(C)]
10152pub struct WireDictionaryEnumerateIteratorGetNextRequest {
10153    pub start_id: ::fidl_next::WireU64,
10154
10155    pub limit: ::fidl_next::WireU32,
10156}
10157
10158unsafe impl ::fidl_next::Wire for WireDictionaryEnumerateIteratorGetNextRequest {
10159    type Decoded<'de> = WireDictionaryEnumerateIteratorGetNextRequest;
10160
10161    #[inline]
10162    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
10163        unsafe {
10164            out.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
10165        }
10166    }
10167}
10168
10169unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryEnumerateIteratorGetNextRequest
10170where
10171    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10172{
10173    fn decode(
10174        slot: ::fidl_next::Slot<'_, Self>,
10175        decoder: &mut ___D,
10176    ) -> Result<(), ::fidl_next::DecodeError> {
10177        ::fidl_next::munge! {
10178            let Self {
10179                mut start_id,
10180                mut limit,
10181
10182            } = slot;
10183        }
10184
10185        ::fidl_next::Decode::decode(start_id.as_mut(), decoder)?;
10186
10187        ::fidl_next::Decode::decode(limit.as_mut(), decoder)?;
10188
10189        Ok(())
10190    }
10191}
10192
10193#[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"]
10194#[derive(Debug)]
10195pub struct DictionaryOptionalItem {
10196    pub key: String,
10197
10198    pub value: Option<Box<crate::WrappedCapabilityId>>,
10199}
10200
10201impl ::fidl_next::Encodable for DictionaryOptionalItem {
10202    type Encoded = WireDictionaryOptionalItem<'static>;
10203}
10204
10205unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryOptionalItem
10206where
10207    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10208    ___E: ::fidl_next::Encoder,
10209    ___E: ::fidl_next::fuchsia::HandleEncoder,
10210{
10211    #[inline]
10212    fn encode(
10213        self,
10214        encoder: &mut ___E,
10215        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10216    ) -> Result<(), ::fidl_next::EncodeError> {
10217        ::fidl_next::munge! {
10218            let Self::Encoded {
10219                key,
10220                value,
10221
10222            } = out;
10223        }
10224
10225        ::fidl_next::Encode::encode(self.key, encoder, key)?;
10226
10227        ::fidl_next::Encode::encode(self.value, encoder, value)?;
10228
10229        Ok(())
10230    }
10231}
10232
10233impl ::fidl_next::EncodableOption for DictionaryOptionalItem {
10234    type EncodedOption = ::fidl_next::WireBox<'static, WireDictionaryOptionalItem<'static>>;
10235}
10236
10237unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryOptionalItem
10238where
10239    ___E: ::fidl_next::Encoder + ?Sized,
10240    DictionaryOptionalItem: ::fidl_next::Encode<___E>,
10241{
10242    #[inline]
10243    fn encode_option(
10244        this: Option<Self>,
10245        encoder: &mut ___E,
10246        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10247    ) -> Result<(), ::fidl_next::EncodeError> {
10248        if let Some(inner) = this {
10249            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10250            ::fidl_next::WireBox::encode_present(out);
10251        } else {
10252            ::fidl_next::WireBox::encode_absent(out);
10253        }
10254
10255        Ok(())
10256    }
10257}
10258
10259impl<'de> ::fidl_next::FromWire<WireDictionaryOptionalItem<'de>> for DictionaryOptionalItem {
10260    #[inline]
10261    fn from_wire(wire: WireDictionaryOptionalItem<'de>) -> Self {
10262        Self {
10263            key: ::fidl_next::FromWire::from_wire(wire.key),
10264
10265            value: ::fidl_next::FromWire::from_wire(wire.value),
10266        }
10267    }
10268}
10269
10270/// The wire type corresponding to [`DictionaryOptionalItem`].
10271#[derive(Debug)]
10272#[repr(C)]
10273pub struct WireDictionaryOptionalItem<'de> {
10274    pub key: ::fidl_next::WireString<'de>,
10275
10276    pub value: ::fidl_next::WireBox<'de, crate::WireWrappedCapabilityId>,
10277}
10278
10279unsafe impl ::fidl_next::Wire for WireDictionaryOptionalItem<'static> {
10280    type Decoded<'de> = WireDictionaryOptionalItem<'de>;
10281
10282    #[inline]
10283    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10284}
10285
10286unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryOptionalItem<'static>
10287where
10288    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10289    ___D: ::fidl_next::Decoder,
10290    ___D: ::fidl_next::fuchsia::HandleDecoder,
10291{
10292    fn decode(
10293        slot: ::fidl_next::Slot<'_, Self>,
10294        decoder: &mut ___D,
10295    ) -> Result<(), ::fidl_next::DecodeError> {
10296        ::fidl_next::munge! {
10297            let Self {
10298                mut key,
10299                mut value,
10300
10301            } = slot;
10302        }
10303
10304        ::fidl_next::Decode::decode(key.as_mut(), decoder)?;
10305
10306        let key = unsafe { key.deref_unchecked() };
10307
10308        if key.len() > 255 {
10309            return Err(::fidl_next::DecodeError::VectorTooLong {
10310                size: key.len() as u64,
10311                limit: 255,
10312            });
10313        }
10314
10315        ::fidl_next::Decode::decode(value.as_mut(), decoder)?;
10316
10317        Ok(())
10318    }
10319}
10320
10321#[derive(Debug)]
10322pub struct DictionaryEnumerateIteratorGetNextResponse {
10323    pub items: Vec<crate::DictionaryOptionalItem>,
10324
10325    pub end_id: u64,
10326}
10327
10328impl ::fidl_next::Encodable for DictionaryEnumerateIteratorGetNextResponse {
10329    type Encoded = WireDictionaryEnumerateIteratorGetNextResponse<'static>;
10330}
10331
10332unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryEnumerateIteratorGetNextResponse
10333where
10334    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10335    ___E: ::fidl_next::Encoder,
10336    ___E: ::fidl_next::fuchsia::HandleEncoder,
10337{
10338    #[inline]
10339    fn encode(
10340        self,
10341        encoder: &mut ___E,
10342        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10343    ) -> Result<(), ::fidl_next::EncodeError> {
10344        ::fidl_next::munge! {
10345            let Self::Encoded {
10346                items,
10347                end_id,
10348
10349            } = out;
10350        }
10351
10352        ::fidl_next::Encode::encode(self.items, encoder, items)?;
10353
10354        ::fidl_next::Encode::encode(self.end_id, encoder, end_id)?;
10355
10356        Ok(())
10357    }
10358}
10359
10360impl ::fidl_next::EncodableOption for DictionaryEnumerateIteratorGetNextResponse {
10361    type EncodedOption =
10362        ::fidl_next::WireBox<'static, WireDictionaryEnumerateIteratorGetNextResponse<'static>>;
10363}
10364
10365unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryEnumerateIteratorGetNextResponse
10366where
10367    ___E: ::fidl_next::Encoder + ?Sized,
10368    DictionaryEnumerateIteratorGetNextResponse: ::fidl_next::Encode<___E>,
10369{
10370    #[inline]
10371    fn encode_option(
10372        this: Option<Self>,
10373        encoder: &mut ___E,
10374        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10375    ) -> Result<(), ::fidl_next::EncodeError> {
10376        if let Some(inner) = this {
10377            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10378            ::fidl_next::WireBox::encode_present(out);
10379        } else {
10380            ::fidl_next::WireBox::encode_absent(out);
10381        }
10382
10383        Ok(())
10384    }
10385}
10386
10387impl<'de> ::fidl_next::FromWire<WireDictionaryEnumerateIteratorGetNextResponse<'de>>
10388    for DictionaryEnumerateIteratorGetNextResponse
10389{
10390    #[inline]
10391    fn from_wire(wire: WireDictionaryEnumerateIteratorGetNextResponse<'de>) -> Self {
10392        Self {
10393            items: ::fidl_next::FromWire::from_wire(wire.items),
10394
10395            end_id: ::fidl_next::FromWire::from_wire(wire.end_id),
10396        }
10397    }
10398}
10399
10400/// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextResponse`].
10401#[derive(Debug)]
10402#[repr(C)]
10403pub struct WireDictionaryEnumerateIteratorGetNextResponse<'de> {
10404    pub items: ::fidl_next::WireVector<'de, crate::WireDictionaryOptionalItem<'de>>,
10405
10406    pub end_id: ::fidl_next::WireU64,
10407}
10408
10409unsafe impl ::fidl_next::Wire for WireDictionaryEnumerateIteratorGetNextResponse<'static> {
10410    type Decoded<'de> = WireDictionaryEnumerateIteratorGetNextResponse<'de>;
10411
10412    #[inline]
10413    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10414}
10415
10416unsafe impl<___D> ::fidl_next::Decode<___D>
10417    for WireDictionaryEnumerateIteratorGetNextResponse<'static>
10418where
10419    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10420    ___D: ::fidl_next::Decoder,
10421    ___D: ::fidl_next::fuchsia::HandleDecoder,
10422{
10423    fn decode(
10424        slot: ::fidl_next::Slot<'_, Self>,
10425        decoder: &mut ___D,
10426    ) -> Result<(), ::fidl_next::DecodeError> {
10427        ::fidl_next::munge! {
10428            let Self {
10429                mut items,
10430                mut end_id,
10431
10432            } = slot;
10433        }
10434
10435        ::fidl_next::Decode::decode(items.as_mut(), decoder)?;
10436
10437        let items = unsafe { items.deref_unchecked() };
10438
10439        if items.len() > 128 {
10440            return Err(::fidl_next::DecodeError::VectorTooLong {
10441                size: items.len() as u64,
10442                limit: 128,
10443            });
10444        }
10445
10446        ::fidl_next::Decode::decode(end_id.as_mut(), decoder)?;
10447
10448        Ok(())
10449    }
10450}
10451
10452/// The type corresponding to the DictionaryEnumerateIterator protocol.
10453#[derive(Debug)]
10454pub struct DictionaryEnumerateIterator;
10455
10456pub mod dictionary_enumerate_iterator {
10457    pub mod prelude {
10458        pub use crate::{
10459            DictionaryEnumerateIterator, DictionaryEnumerateIteratorClientHandler,
10460            DictionaryEnumerateIteratorServerHandler, dictionary_enumerate_iterator,
10461        };
10462
10463        pub use crate::CapabilityStoreError;
10464
10465        pub use crate::DictionaryEnumerateIteratorGetNextRequest;
10466
10467        pub use crate::DictionaryEnumerateIteratorGetNextResponse;
10468    }
10469
10470    pub struct GetNext;
10471
10472    impl ::fidl_next::Method for GetNext {
10473        const ORDINAL: u64 = 1511164556663256527;
10474
10475        type Protocol = crate::DictionaryEnumerateIterator;
10476
10477        type Request = crate::WireDictionaryEnumerateIteratorGetNextRequest;
10478
10479        type Response = ::fidl_next::WireFlexibleResult<
10480            'static,
10481            crate::WireDictionaryEnumerateIteratorGetNextResponse<'static>,
10482            crate::WireCapabilityStoreError,
10483        >;
10484    }
10485
10486    mod ___detail {
10487
10488        pub struct GetNext<T0, T1> {
10489            start_id: T0,
10490
10491            limit: T1,
10492        }
10493
10494        impl<T0, T1> ::fidl_next::Encodable for GetNext<T0, T1>
10495        where
10496            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU64>,
10497            T1: ::fidl_next::Encodable<Encoded = ::fidl_next::WireU32>,
10498        {
10499            type Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest;
10500        }
10501
10502        unsafe impl<___E, T0, T1> ::fidl_next::Encode<___E> for GetNext<T0, T1>
10503        where
10504            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10505            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU64>,
10506            T1: ::fidl_next::Encode<___E, Encoded = ::fidl_next::WireU32>,
10507        {
10508            #[inline]
10509            fn encode(
10510                self,
10511                encoder: &mut ___E,
10512                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10513            ) -> Result<(), ::fidl_next::EncodeError> {
10514                ::fidl_next::munge! {
10515                    let Self::Encoded {
10516                        start_id,
10517                        limit,
10518
10519                    } = out;
10520                }
10521
10522                ::fidl_next::Encode::encode(self.start_id, encoder, start_id)?;
10523
10524                ::fidl_next::Encode::encode(self.limit, encoder, limit)?;
10525
10526                Ok(())
10527            }
10528        }
10529
10530        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DictionaryEnumerateIterator
10531        where
10532            ___T: ::fidl_next::Transport,
10533        {
10534            type ClientSender = DictionaryEnumerateIteratorClientSender<___T>;
10535            type ServerSender = DictionaryEnumerateIteratorServerSender<___T>;
10536        }
10537
10538        /// The client sender for the `DictionaryEnumerateIterator` protocol.
10539        #[repr(transparent)]
10540        pub struct DictionaryEnumerateIteratorClientSender<___T: ::fidl_next::Transport> {
10541            #[allow(dead_code)]
10542            sender: ::fidl_next::protocol::ClientSender<___T>,
10543        }
10544
10545        impl<___T> DictionaryEnumerateIteratorClientSender<___T>
10546        where
10547            ___T: ::fidl_next::Transport,
10548        {
10549            #[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"]
10550            pub fn get_next(
10551                &self,
10552
10553                start_id: impl ::fidl_next::Encode<
10554                    <___T as ::fidl_next::Transport>::SendBuffer,
10555                    Encoded = ::fidl_next::WireU64,
10556                >,
10557
10558                limit: impl ::fidl_next::Encode<
10559                    <___T as ::fidl_next::Transport>::SendBuffer,
10560                    Encoded = ::fidl_next::WireU32,
10561                >,
10562            ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
10563            where
10564                <___T as ::fidl_next::Transport>::SendBuffer:
10565                    ::fidl_next::encoder::InternalHandleEncoder,
10566            {
10567                self.get_next_with(GetNext { start_id, limit })
10568            }
10569
10570            #[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"]
10571            pub fn get_next_with<___R>(
10572                &self,
10573                request: ___R,
10574            ) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T>
10575            where
10576                ___R: ::fidl_next::Encode<
10577                        <___T as ::fidl_next::Transport>::SendBuffer,
10578                        Encoded = crate::WireDictionaryEnumerateIteratorGetNextRequest,
10579                    >,
10580            {
10581                ::fidl_next::TwoWayFuture::from_untyped(
10582                    self.sender.send_two_way(1511164556663256527, request),
10583                )
10584            }
10585        }
10586
10587        /// The server sender for the `DictionaryEnumerateIterator` protocol.
10588        #[repr(transparent)]
10589        pub struct DictionaryEnumerateIteratorServerSender<___T: ::fidl_next::Transport> {
10590            sender: ::fidl_next::protocol::ServerSender<___T>,
10591        }
10592
10593        impl<___T> DictionaryEnumerateIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
10594    }
10595}
10596
10597/// A client handler for the DictionaryEnumerateIterator protocol.
10598///
10599/// See [`DictionaryEnumerateIterator`] for more details.
10600pub trait DictionaryEnumerateIteratorClientHandler<
10601    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10602    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10603>
10604{
10605    fn on_unknown_interaction(
10606        &mut self,
10607        sender: &::fidl_next::ClientSender<DictionaryEnumerateIterator, ___T>,
10608        ordinal: u64,
10609    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10610        sender.close();
10611        ::core::future::ready(())
10612    }
10613}
10614
10615impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryEnumerateIterator
10616where
10617    ___H: DictionaryEnumerateIteratorClientHandler<___T> + ::core::marker::Send,
10618    ___T: ::fidl_next::Transport,
10619    <dictionary_enumerate_iterator::GetNext as ::fidl_next::Method>::Response:
10620        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10621{
10622    async fn on_event(
10623        handler: &mut ___H,
10624        sender: &::fidl_next::ClientSender<Self, ___T>,
10625        ordinal: u64,
10626        buffer: ___T::RecvBuffer,
10627    ) {
10628        match ordinal {
10629            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
10630        }
10631    }
10632}
10633
10634/// A server handler for the DictionaryEnumerateIterator protocol.
10635///
10636/// See [`DictionaryEnumerateIterator`] for more details.
10637pub trait DictionaryEnumerateIteratorServerHandler<
10638    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
10639    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
10640>
10641{
10642    #[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"]
10643    fn get_next(
10644        &mut self,
10645        sender: &::fidl_next::ServerSender<DictionaryEnumerateIterator, ___T>,
10646
10647        request: ::fidl_next::Request<dictionary_enumerate_iterator::GetNext, ___T>,
10648
10649        responder: ::fidl_next::Responder<dictionary_enumerate_iterator::GetNext>,
10650    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
10651
10652    fn on_unknown_interaction(
10653        &mut self,
10654        sender: &::fidl_next::ServerSender<DictionaryEnumerateIterator, ___T>,
10655        ordinal: u64,
10656    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
10657        sender.close();
10658        ::core::future::ready(())
10659    }
10660}
10661
10662impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryEnumerateIterator
10663where
10664    ___H: DictionaryEnumerateIteratorServerHandler<___T> + ::core::marker::Send,
10665    ___T: ::fidl_next::Transport,
10666    <dictionary_enumerate_iterator::GetNext as ::fidl_next::Method>::Request:
10667        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
10668{
10669    async fn on_one_way(
10670        handler: &mut ___H,
10671        sender: &::fidl_next::ServerSender<Self, ___T>,
10672        ordinal: u64,
10673        buffer: ___T::RecvBuffer,
10674    ) {
10675        match ordinal {
10676            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
10677        }
10678    }
10679
10680    async fn on_two_way(
10681        handler: &mut ___H,
10682        sender: &::fidl_next::ServerSender<Self, ___T>,
10683        ordinal: u64,
10684        buffer: ___T::RecvBuffer,
10685        responder: ::fidl_next::protocol::Responder,
10686    ) {
10687        match ordinal {
10688            1511164556663256527 => {
10689                let responder = ::fidl_next::Responder::from_untyped(responder);
10690
10691                match ::fidl_next::DecoderExt::decode(buffer) {
10692                    Ok(decoded) => handler.get_next(sender, decoded, responder).await,
10693                    Err(e) => sender.close(),
10694                }
10695            }
10696
10697            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
10698        }
10699    }
10700}
10701
10702#[doc = " Error returned from [CapabilityStore/Dictionary*] methods.\n"]
10703#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10704#[repr(u32)]
10705pub enum DictionaryError {
10706    NotFound = 1,
10707    AlreadyExists = 2,
10708    BadCapability = 3,
10709    InvalidKey = 4,
10710    NotCloneable = 5,
10711    UnknownOrdinal_(u32),
10712}
10713
10714impl ::fidl_next::Encodable for DictionaryError {
10715    type Encoded = WireDictionaryError;
10716}
10717impl ::std::convert::From<u32> for DictionaryError {
10718    fn from(value: u32) -> Self {
10719        match value {
10720            1 => Self::NotFound,
10721            2 => Self::AlreadyExists,
10722            3 => Self::BadCapability,
10723            4 => Self::InvalidKey,
10724            5 => Self::NotCloneable,
10725
10726            _ => Self::UnknownOrdinal_(value),
10727        }
10728    }
10729}
10730
10731unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryError
10732where
10733    ___E: ?Sized,
10734{
10735    #[inline]
10736    fn encode(
10737        self,
10738        encoder: &mut ___E,
10739        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10740    ) -> Result<(), ::fidl_next::EncodeError> {
10741        ::fidl_next::EncodeRef::encode_ref(&self, encoder, out)
10742    }
10743}
10744
10745unsafe impl<___E> ::fidl_next::EncodeRef<___E> for DictionaryError
10746where
10747    ___E: ?Sized,
10748{
10749    #[inline]
10750    fn encode_ref(
10751        &self,
10752        encoder: &mut ___E,
10753        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10754    ) -> Result<(), ::fidl_next::EncodeError> {
10755        ::fidl_next::munge!(let WireDictionaryError { value } = out);
10756        let _ = value.write(::fidl_next::WireU32::from(match *self {
10757            Self::NotFound => 1,
10758
10759            Self::AlreadyExists => 2,
10760
10761            Self::BadCapability => 3,
10762
10763            Self::InvalidKey => 4,
10764
10765            Self::NotCloneable => 5,
10766
10767            Self::UnknownOrdinal_(value) => value,
10768        }));
10769
10770        Ok(())
10771    }
10772}
10773
10774impl ::core::convert::From<WireDictionaryError> for DictionaryError {
10775    fn from(wire: WireDictionaryError) -> Self {
10776        match u32::from(wire.value) {
10777            1 => Self::NotFound,
10778
10779            2 => Self::AlreadyExists,
10780
10781            3 => Self::BadCapability,
10782
10783            4 => Self::InvalidKey,
10784
10785            5 => Self::NotCloneable,
10786
10787            value => Self::UnknownOrdinal_(value),
10788        }
10789    }
10790}
10791
10792impl ::fidl_next::FromWire<WireDictionaryError> for DictionaryError {
10793    #[inline]
10794    fn from_wire(wire: WireDictionaryError) -> Self {
10795        Self::from(wire)
10796    }
10797}
10798
10799impl ::fidl_next::FromWireRef<WireDictionaryError> for DictionaryError {
10800    #[inline]
10801    fn from_wire_ref(wire: &WireDictionaryError) -> Self {
10802        Self::from(*wire)
10803    }
10804}
10805
10806/// The wire type corresponding to [`DictionaryError`].
10807#[derive(Clone, Copy, Debug, PartialEq, Eq)]
10808#[repr(transparent)]
10809pub struct WireDictionaryError {
10810    value: ::fidl_next::WireU32,
10811}
10812
10813unsafe impl ::fidl_next::Wire for WireDictionaryError {
10814    type Decoded<'de> = Self;
10815
10816    #[inline]
10817    fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
10818        // Wire enums have no padding
10819    }
10820}
10821
10822impl WireDictionaryError {
10823    pub const NOT_FOUND: WireDictionaryError =
10824        WireDictionaryError { value: ::fidl_next::WireU32(1) };
10825
10826    pub const ALREADY_EXISTS: WireDictionaryError =
10827        WireDictionaryError { value: ::fidl_next::WireU32(2) };
10828
10829    pub const BAD_CAPABILITY: WireDictionaryError =
10830        WireDictionaryError { value: ::fidl_next::WireU32(3) };
10831
10832    pub const INVALID_KEY: WireDictionaryError =
10833        WireDictionaryError { value: ::fidl_next::WireU32(4) };
10834
10835    pub const NOT_CLONEABLE: WireDictionaryError =
10836        WireDictionaryError { value: ::fidl_next::WireU32(5) };
10837}
10838
10839unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryError
10840where
10841    ___D: ?Sized,
10842{
10843    fn decode(
10844        slot: ::fidl_next::Slot<'_, Self>,
10845        _: &mut ___D,
10846    ) -> Result<(), ::fidl_next::DecodeError> {
10847        Ok(())
10848    }
10849}
10850
10851impl ::core::convert::From<DictionaryError> for WireDictionaryError {
10852    fn from(natural: DictionaryError) -> Self {
10853        match natural {
10854            DictionaryError::NotFound => WireDictionaryError::NOT_FOUND,
10855
10856            DictionaryError::AlreadyExists => WireDictionaryError::ALREADY_EXISTS,
10857
10858            DictionaryError::BadCapability => WireDictionaryError::BAD_CAPABILITY,
10859
10860            DictionaryError::InvalidKey => WireDictionaryError::INVALID_KEY,
10861
10862            DictionaryError::NotCloneable => WireDictionaryError::NOT_CLONEABLE,
10863
10864            DictionaryError::UnknownOrdinal_(value) => {
10865                WireDictionaryError { value: ::fidl_next::WireU32::from(value) }
10866            }
10867        }
10868    }
10869}
10870
10871#[derive(Debug)]
10872pub struct DictionaryKeysIteratorGetNextResponse {
10873    pub keys: Vec<String>,
10874}
10875
10876impl ::fidl_next::Encodable for DictionaryKeysIteratorGetNextResponse {
10877    type Encoded = WireDictionaryKeysIteratorGetNextResponse<'static>;
10878}
10879
10880unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryKeysIteratorGetNextResponse
10881where
10882    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
10883    ___E: ::fidl_next::Encoder,
10884    ___E: ::fidl_next::fuchsia::HandleEncoder,
10885{
10886    #[inline]
10887    fn encode(
10888        self,
10889        encoder: &mut ___E,
10890        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
10891    ) -> Result<(), ::fidl_next::EncodeError> {
10892        ::fidl_next::munge! {
10893            let Self::Encoded {
10894                keys,
10895
10896            } = out;
10897        }
10898
10899        ::fidl_next::Encode::encode(self.keys, encoder, keys)?;
10900
10901        Ok(())
10902    }
10903}
10904
10905impl ::fidl_next::EncodableOption for DictionaryKeysIteratorGetNextResponse {
10906    type EncodedOption =
10907        ::fidl_next::WireBox<'static, WireDictionaryKeysIteratorGetNextResponse<'static>>;
10908}
10909
10910unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryKeysIteratorGetNextResponse
10911where
10912    ___E: ::fidl_next::Encoder + ?Sized,
10913    DictionaryKeysIteratorGetNextResponse: ::fidl_next::Encode<___E>,
10914{
10915    #[inline]
10916    fn encode_option(
10917        this: Option<Self>,
10918        encoder: &mut ___E,
10919        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
10920    ) -> Result<(), ::fidl_next::EncodeError> {
10921        if let Some(inner) = this {
10922            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
10923            ::fidl_next::WireBox::encode_present(out);
10924        } else {
10925            ::fidl_next::WireBox::encode_absent(out);
10926        }
10927
10928        Ok(())
10929    }
10930}
10931
10932impl<'de> ::fidl_next::FromWire<WireDictionaryKeysIteratorGetNextResponse<'de>>
10933    for DictionaryKeysIteratorGetNextResponse
10934{
10935    #[inline]
10936    fn from_wire(wire: WireDictionaryKeysIteratorGetNextResponse<'de>) -> Self {
10937        Self { keys: ::fidl_next::FromWire::from_wire(wire.keys) }
10938    }
10939}
10940
10941/// The wire type corresponding to [`DictionaryKeysIteratorGetNextResponse`].
10942#[derive(Debug)]
10943#[repr(C)]
10944pub struct WireDictionaryKeysIteratorGetNextResponse<'de> {
10945    pub keys: ::fidl_next::WireVector<'de, ::fidl_next::WireString<'de>>,
10946}
10947
10948unsafe impl ::fidl_next::Wire for WireDictionaryKeysIteratorGetNextResponse<'static> {
10949    type Decoded<'de> = WireDictionaryKeysIteratorGetNextResponse<'de>;
10950
10951    #[inline]
10952    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
10953}
10954
10955unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryKeysIteratorGetNextResponse<'static>
10956where
10957    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
10958    ___D: ::fidl_next::Decoder,
10959    ___D: ::fidl_next::fuchsia::HandleDecoder,
10960{
10961    fn decode(
10962        slot: ::fidl_next::Slot<'_, Self>,
10963        decoder: &mut ___D,
10964    ) -> Result<(), ::fidl_next::DecodeError> {
10965        ::fidl_next::munge! {
10966            let Self {
10967                mut keys,
10968
10969            } = slot;
10970        }
10971
10972        ::fidl_next::Decode::decode(keys.as_mut(), decoder)?;
10973
10974        let keys = unsafe { keys.deref_unchecked() };
10975
10976        if keys.len() > 128 {
10977            return Err(::fidl_next::DecodeError::VectorTooLong {
10978                size: keys.len() as u64,
10979                limit: 128,
10980            });
10981        }
10982
10983        Ok(())
10984    }
10985}
10986
10987/// The type corresponding to the DictionaryKeysIterator protocol.
10988#[derive(Debug)]
10989pub struct DictionaryKeysIterator;
10990
10991pub mod dictionary_keys_iterator {
10992    pub mod prelude {
10993        pub use crate::{
10994            DictionaryKeysIterator, DictionaryKeysIteratorClientHandler,
10995            DictionaryKeysIteratorServerHandler, dictionary_keys_iterator,
10996        };
10997
10998        pub use crate::DictionaryKeysIteratorGetNextResponse;
10999    }
11000
11001    pub struct GetNext;
11002
11003    impl ::fidl_next::Method for GetNext {
11004        const ORDINAL: u64 = 4987781442555247955;
11005
11006        type Protocol = crate::DictionaryKeysIterator;
11007
11008        type Request = ();
11009
11010        type Response = ::fidl_next::WireFlexible<
11011            'static,
11012            crate::WireDictionaryKeysIteratorGetNextResponse<'static>,
11013        >;
11014    }
11015
11016    mod ___detail {
11017
11018        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DictionaryKeysIterator
11019        where
11020            ___T: ::fidl_next::Transport,
11021        {
11022            type ClientSender = DictionaryKeysIteratorClientSender<___T>;
11023            type ServerSender = DictionaryKeysIteratorServerSender<___T>;
11024        }
11025
11026        /// The client sender for the `DictionaryKeysIterator` protocol.
11027        #[repr(transparent)]
11028        pub struct DictionaryKeysIteratorClientSender<___T: ::fidl_next::Transport> {
11029            #[allow(dead_code)]
11030            sender: ::fidl_next::protocol::ClientSender<___T>,
11031        }
11032
11033        impl<___T> DictionaryKeysIteratorClientSender<___T>
11034        where
11035            ___T: ::fidl_next::Transport,
11036        {
11037            pub fn get_next(&self) -> ::fidl_next::TwoWayFuture<'_, super::GetNext, ___T> {
11038                ::fidl_next::TwoWayFuture::from_untyped(
11039                    self.sender.send_two_way(4987781442555247955, ()),
11040                )
11041            }
11042        }
11043
11044        /// The server sender for the `DictionaryKeysIterator` protocol.
11045        #[repr(transparent)]
11046        pub struct DictionaryKeysIteratorServerSender<___T: ::fidl_next::Transport> {
11047            sender: ::fidl_next::protocol::ServerSender<___T>,
11048        }
11049
11050        impl<___T> DictionaryKeysIteratorServerSender<___T> where ___T: ::fidl_next::Transport {}
11051    }
11052}
11053
11054/// A client handler for the DictionaryKeysIterator protocol.
11055///
11056/// See [`DictionaryKeysIterator`] for more details.
11057pub trait DictionaryKeysIteratorClientHandler<
11058    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11059    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11060>
11061{
11062    fn on_unknown_interaction(
11063        &mut self,
11064        sender: &::fidl_next::ClientSender<DictionaryKeysIterator, ___T>,
11065        ordinal: u64,
11066    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11067        sender.close();
11068        ::core::future::ready(())
11069    }
11070}
11071
11072impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryKeysIterator
11073where
11074    ___H: DictionaryKeysIteratorClientHandler<___T> + ::core::marker::Send,
11075    ___T: ::fidl_next::Transport,
11076    <dictionary_keys_iterator::GetNext as ::fidl_next::Method>::Response:
11077        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11078{
11079    async fn on_event(
11080        handler: &mut ___H,
11081        sender: &::fidl_next::ClientSender<Self, ___T>,
11082        ordinal: u64,
11083        buffer: ___T::RecvBuffer,
11084    ) {
11085        match ordinal {
11086            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11087        }
11088    }
11089}
11090
11091/// A server handler for the DictionaryKeysIterator protocol.
11092///
11093/// See [`DictionaryKeysIterator`] for more details.
11094pub trait DictionaryKeysIteratorServerHandler<
11095    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11096    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11097>
11098{
11099    fn get_next(
11100        &mut self,
11101        sender: &::fidl_next::ServerSender<DictionaryKeysIterator, ___T>,
11102
11103        responder: ::fidl_next::Responder<dictionary_keys_iterator::GetNext>,
11104    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11105
11106    fn on_unknown_interaction(
11107        &mut self,
11108        sender: &::fidl_next::ServerSender<DictionaryKeysIterator, ___T>,
11109        ordinal: u64,
11110    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11111        sender.close();
11112        ::core::future::ready(())
11113    }
11114}
11115
11116impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryKeysIterator
11117where
11118    ___H: DictionaryKeysIteratorServerHandler<___T> + ::core::marker::Send,
11119    ___T: ::fidl_next::Transport,
11120{
11121    async fn on_one_way(
11122        handler: &mut ___H,
11123        sender: &::fidl_next::ServerSender<Self, ___T>,
11124        ordinal: u64,
11125        buffer: ___T::RecvBuffer,
11126    ) {
11127        match ordinal {
11128            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11129        }
11130    }
11131
11132    async fn on_two_way(
11133        handler: &mut ___H,
11134        sender: &::fidl_next::ServerSender<Self, ___T>,
11135        ordinal: u64,
11136        buffer: ___T::RecvBuffer,
11137        responder: ::fidl_next::protocol::Responder,
11138    ) {
11139        match ordinal {
11140            4987781442555247955 => {
11141                let responder = ::fidl_next::Responder::from_untyped(responder);
11142
11143                handler.get_next(sender, responder).await;
11144            }
11145
11146            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11147        }
11148    }
11149}
11150
11151#[derive(Debug)]
11152pub enum DictionaryRouterRouteResponse {
11153    Dictionary(crate::DictionaryRef),
11154
11155    Unavailable(crate::Unit),
11156}
11157
11158impl ::fidl_next::Encodable for DictionaryRouterRouteResponse {
11159    type Encoded = WireDictionaryRouterRouteResponse;
11160}
11161
11162unsafe impl<___E> ::fidl_next::Encode<___E> for DictionaryRouterRouteResponse
11163where
11164    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11165    ___E: ::fidl_next::fuchsia::HandleEncoder,
11166{
11167    #[inline]
11168    fn encode(
11169        self,
11170        encoder: &mut ___E,
11171        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11172    ) -> Result<(), ::fidl_next::EncodeError> {
11173        ::fidl_next::munge!(let WireDictionaryRouterRouteResponse { raw, _phantom: _ } = out);
11174
11175        match self {
11176            Self::Dictionary(value) => ::fidl_next::RawWireUnion::encode_as_static::<
11177                ___E,
11178                crate::DictionaryRef,
11179            >(value, 1, encoder, raw)?,
11180
11181            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
11182                ___E,
11183                crate::Unit,
11184            >(value, 2, encoder, raw)?,
11185        }
11186
11187        Ok(())
11188    }
11189}
11190
11191impl ::fidl_next::EncodableOption for DictionaryRouterRouteResponse {
11192    type EncodedOption = WireOptionalDictionaryRouterRouteResponse;
11193}
11194
11195unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DictionaryRouterRouteResponse
11196where
11197    ___E: ?Sized,
11198    DictionaryRouterRouteResponse: ::fidl_next::Encode<___E>,
11199{
11200    #[inline]
11201    fn encode_option(
11202        this: Option<Self>,
11203        encoder: &mut ___E,
11204        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11205    ) -> Result<(), ::fidl_next::EncodeError> {
11206        ::fidl_next::munge!(let WireOptionalDictionaryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
11207
11208        if let Some(inner) = this {
11209            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
11210            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
11211        } else {
11212            ::fidl_next::RawWireUnion::encode_absent(raw);
11213        }
11214
11215        Ok(())
11216    }
11217}
11218
11219impl ::fidl_next::FromWire<WireDictionaryRouterRouteResponse> for DictionaryRouterRouteResponse {
11220    #[inline]
11221    fn from_wire(wire: WireDictionaryRouterRouteResponse) -> Self {
11222        let wire = ::core::mem::ManuallyDrop::new(wire);
11223        match wire.raw.ordinal() {
11224            1 => Self::Dictionary(::fidl_next::FromWire::from_wire(unsafe {
11225                wire.raw.get().read_unchecked::<crate::WireDictionaryRef>()
11226            })),
11227
11228            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
11229                wire.raw.get().read_unchecked::<crate::WireUnit>()
11230            })),
11231
11232            _ => unsafe { ::core::hint::unreachable_unchecked() },
11233        }
11234    }
11235}
11236
11237impl ::fidl_next::FromWireOption<WireOptionalDictionaryRouterRouteResponse>
11238    for Box<DictionaryRouterRouteResponse>
11239{
11240    #[inline]
11241    fn from_wire_option(wire: WireOptionalDictionaryRouterRouteResponse) -> Option<Self> {
11242        if let Some(inner) = wire.into_option() {
11243            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
11244        } else {
11245            None
11246        }
11247    }
11248}
11249
11250/// The wire type corresponding to [`DictionaryRouterRouteResponse`].
11251#[repr(transparent)]
11252pub struct WireDictionaryRouterRouteResponse {
11253    raw: ::fidl_next::RawWireUnion,
11254    _phantom: ::core::marker::PhantomData<()>,
11255}
11256
11257impl Drop for WireDictionaryRouterRouteResponse {
11258    fn drop(&mut self) {
11259        match self.raw.ordinal() {
11260            1 => {
11261                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDictionaryRef>() };
11262            }
11263
11264            2 => {
11265                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
11266            }
11267
11268            _ => unsafe { ::core::hint::unreachable_unchecked() },
11269        }
11270    }
11271}
11272
11273unsafe impl ::fidl_next::Wire for WireDictionaryRouterRouteResponse {
11274    type Decoded<'de> = WireDictionaryRouterRouteResponse;
11275
11276    #[inline]
11277    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11278        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11279        ::fidl_next::RawWireUnion::zero_padding(raw);
11280    }
11281}
11282
11283pub mod dictionary_router_route_response {
11284    pub enum Ref<'de> {
11285        Dictionary(&'de crate::WireDictionaryRef),
11286
11287        Unavailable(&'de crate::WireUnit),
11288    }
11289}
11290
11291impl WireDictionaryRouterRouteResponse {
11292    pub fn as_ref(&self) -> crate::dictionary_router_route_response::Ref<'_> {
11293        match self.raw.ordinal() {
11294            1 => crate::dictionary_router_route_response::Ref::Dictionary(unsafe {
11295                self.raw.get().deref_unchecked::<crate::WireDictionaryRef>()
11296            }),
11297
11298            2 => crate::dictionary_router_route_response::Ref::Unavailable(unsafe {
11299                self.raw.get().deref_unchecked::<crate::WireUnit>()
11300            }),
11301
11302            _ => unsafe { ::core::hint::unreachable_unchecked() },
11303        }
11304    }
11305}
11306
11307unsafe impl<___D> ::fidl_next::Decode<___D> for WireDictionaryRouterRouteResponse
11308where
11309    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11310    ___D: ::fidl_next::fuchsia::HandleDecoder,
11311{
11312    fn decode(
11313        mut slot: ::fidl_next::Slot<'_, Self>,
11314        decoder: &mut ___D,
11315    ) -> Result<(), ::fidl_next::DecodeError> {
11316        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11317        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11318            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
11319                raw, decoder,
11320            )?,
11321
11322            2 => {
11323                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
11324            }
11325
11326            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
11327        }
11328
11329        Ok(())
11330    }
11331}
11332
11333impl ::core::fmt::Debug for WireDictionaryRouterRouteResponse {
11334    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11335        match self.raw.ordinal() {
11336            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDictionaryRef>().fmt(f) },
11337            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
11338            _ => unsafe { ::core::hint::unreachable_unchecked() },
11339        }
11340    }
11341}
11342
11343#[repr(transparent)]
11344pub struct WireOptionalDictionaryRouterRouteResponse {
11345    raw: ::fidl_next::RawWireUnion,
11346    _phantom: ::core::marker::PhantomData<()>,
11347}
11348
11349unsafe impl ::fidl_next::Wire for WireOptionalDictionaryRouterRouteResponse {
11350    type Decoded<'de> = WireOptionalDictionaryRouterRouteResponse;
11351
11352    #[inline]
11353    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11354        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11355        ::fidl_next::RawWireUnion::zero_padding(raw);
11356    }
11357}
11358
11359impl WireOptionalDictionaryRouterRouteResponse {
11360    pub fn is_some(&self) -> bool {
11361        self.raw.is_some()
11362    }
11363
11364    pub fn is_none(&self) -> bool {
11365        self.raw.is_none()
11366    }
11367
11368    pub fn as_ref(&self) -> Option<&WireDictionaryRouterRouteResponse> {
11369        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
11370    }
11371
11372    pub fn into_option(self) -> Option<WireDictionaryRouterRouteResponse> {
11373        if self.is_some() {
11374            Some(WireDictionaryRouterRouteResponse {
11375                raw: self.raw,
11376                _phantom: ::core::marker::PhantomData,
11377            })
11378        } else {
11379            None
11380        }
11381    }
11382}
11383
11384unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDictionaryRouterRouteResponse
11385where
11386    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11387    ___D: ::fidl_next::fuchsia::HandleDecoder,
11388{
11389    fn decode(
11390        mut slot: ::fidl_next::Slot<'_, Self>,
11391        decoder: &mut ___D,
11392    ) -> Result<(), ::fidl_next::DecodeError> {
11393        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11394        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11395            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDictionaryRef>(
11396                raw, decoder,
11397            )?,
11398
11399            2 => {
11400                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
11401            }
11402
11403            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
11404            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
11405        }
11406
11407        Ok(())
11408    }
11409}
11410
11411impl ::core::fmt::Debug for WireOptionalDictionaryRouterRouteResponse {
11412    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11413        self.as_ref().fmt(f)
11414    }
11415}
11416
11417/// The type corresponding to the DictionaryRouter protocol.
11418#[derive(Debug)]
11419pub struct DictionaryRouter;
11420
11421impl ::fidl_next::Discoverable for DictionaryRouter {
11422    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DictionaryRouter";
11423}
11424
11425pub mod dictionary_router {
11426    pub mod prelude {
11427        pub use crate::{
11428            DictionaryRouter, DictionaryRouterClientHandler, DictionaryRouterServerHandler,
11429            dictionary_router,
11430        };
11431
11432        pub use crate::DictionaryRouterRouteResponse;
11433
11434        pub use crate::RouteRequest;
11435
11436        pub use crate::RouterError;
11437    }
11438
11439    pub struct Route;
11440
11441    impl ::fidl_next::Method for Route {
11442        const ORDINAL: u64 = 8164012099375978399;
11443
11444        type Protocol = crate::DictionaryRouter;
11445
11446        type Request = crate::WireRouteRequest<'static>;
11447
11448        type Response = ::fidl_next::WireFlexibleResult<
11449            'static,
11450            crate::WireDictionaryRouterRouteResponse,
11451            crate::WireRouterError,
11452        >;
11453    }
11454
11455    mod ___detail {
11456
11457        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DictionaryRouter
11458        where
11459            ___T: ::fidl_next::Transport,
11460        {
11461            type ClientSender = DictionaryRouterClientSender<___T>;
11462            type ServerSender = DictionaryRouterServerSender<___T>;
11463        }
11464
11465        /// The client sender for the `DictionaryRouter` protocol.
11466        #[repr(transparent)]
11467        pub struct DictionaryRouterClientSender<___T: ::fidl_next::Transport> {
11468            #[allow(dead_code)]
11469            sender: ::fidl_next::protocol::ClientSender<___T>,
11470        }
11471
11472        impl<___T> DictionaryRouterClientSender<___T>
11473        where
11474            ___T: ::fidl_next::Transport,
11475        {
11476            pub fn route_with<___R>(
11477                &self,
11478                request: ___R,
11479            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
11480            where
11481                ___R: ::fidl_next::Encode<
11482                        <___T as ::fidl_next::Transport>::SendBuffer,
11483                        Encoded = crate::WireRouteRequest<'static>,
11484                    >,
11485            {
11486                ::fidl_next::TwoWayFuture::from_untyped(
11487                    self.sender.send_two_way(8164012099375978399, request),
11488                )
11489            }
11490        }
11491
11492        /// The server sender for the `DictionaryRouter` protocol.
11493        #[repr(transparent)]
11494        pub struct DictionaryRouterServerSender<___T: ::fidl_next::Transport> {
11495            sender: ::fidl_next::protocol::ServerSender<___T>,
11496        }
11497
11498        impl<___T> DictionaryRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
11499    }
11500}
11501
11502/// A client handler for the DictionaryRouter protocol.
11503///
11504/// See [`DictionaryRouter`] for more details.
11505pub trait DictionaryRouterClientHandler<
11506    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11507    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11508>
11509{
11510    fn on_unknown_interaction(
11511        &mut self,
11512        sender: &::fidl_next::ClientSender<DictionaryRouter, ___T>,
11513        ordinal: u64,
11514    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11515        sender.close();
11516        ::core::future::ready(())
11517    }
11518}
11519
11520impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DictionaryRouter
11521where
11522    ___H: DictionaryRouterClientHandler<___T> + ::core::marker::Send,
11523    ___T: ::fidl_next::Transport,
11524    <dictionary_router::Route as ::fidl_next::Method>::Response:
11525        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11526{
11527    async fn on_event(
11528        handler: &mut ___H,
11529        sender: &::fidl_next::ClientSender<Self, ___T>,
11530        ordinal: u64,
11531        buffer: ___T::RecvBuffer,
11532    ) {
11533        match ordinal {
11534            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11535        }
11536    }
11537}
11538
11539/// A server handler for the DictionaryRouter protocol.
11540///
11541/// See [`DictionaryRouter`] for more details.
11542pub trait DictionaryRouterServerHandler<
11543    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11544    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11545>
11546{
11547    fn route(
11548        &mut self,
11549        sender: &::fidl_next::ServerSender<DictionaryRouter, ___T>,
11550
11551        request: ::fidl_next::Request<dictionary_router::Route, ___T>,
11552
11553        responder: ::fidl_next::Responder<dictionary_router::Route>,
11554    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
11555
11556    fn on_unknown_interaction(
11557        &mut self,
11558        sender: &::fidl_next::ServerSender<DictionaryRouter, ___T>,
11559        ordinal: u64,
11560    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11561        sender.close();
11562        ::core::future::ready(())
11563    }
11564}
11565
11566impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DictionaryRouter
11567where
11568    ___H: DictionaryRouterServerHandler<___T> + ::core::marker::Send,
11569    ___T: ::fidl_next::Transport,
11570    <dictionary_router::Route as ::fidl_next::Method>::Request:
11571        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11572{
11573    async fn on_one_way(
11574        handler: &mut ___H,
11575        sender: &::fidl_next::ServerSender<Self, ___T>,
11576        ordinal: u64,
11577        buffer: ___T::RecvBuffer,
11578    ) {
11579        match ordinal {
11580            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11581        }
11582    }
11583
11584    async fn on_two_way(
11585        handler: &mut ___H,
11586        sender: &::fidl_next::ServerSender<Self, ___T>,
11587        ordinal: u64,
11588        buffer: ___T::RecvBuffer,
11589        responder: ::fidl_next::protocol::Responder,
11590    ) {
11591        match ordinal {
11592            8164012099375978399 => {
11593                let responder = ::fidl_next::Responder::from_untyped(responder);
11594
11595                match ::fidl_next::DecoderExt::decode(buffer) {
11596                    Ok(decoded) => handler.route(sender, decoded, responder).await,
11597                    Err(e) => sender.close(),
11598                }
11599            }
11600
11601            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11602        }
11603    }
11604}
11605
11606#[derive(Debug)]
11607pub enum DirConnectorRouterRouteResponse {
11608    DirConnector(crate::DirConnector),
11609
11610    Unavailable(crate::Unit),
11611}
11612
11613impl ::fidl_next::Encodable for DirConnectorRouterRouteResponse {
11614    type Encoded = WireDirConnectorRouterRouteResponse;
11615}
11616
11617unsafe impl<___E> ::fidl_next::Encode<___E> for DirConnectorRouterRouteResponse
11618where
11619    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
11620    ___E: ::fidl_next::fuchsia::HandleEncoder,
11621{
11622    #[inline]
11623    fn encode(
11624        self,
11625        encoder: &mut ___E,
11626        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
11627    ) -> Result<(), ::fidl_next::EncodeError> {
11628        ::fidl_next::munge!(let WireDirConnectorRouterRouteResponse { raw, _phantom: _ } = out);
11629
11630        match self {
11631            Self::DirConnector(value) => ::fidl_next::RawWireUnion::encode_as_static::<
11632                ___E,
11633                crate::DirConnector,
11634            >(value, 1, encoder, raw)?,
11635
11636            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
11637                ___E,
11638                crate::Unit,
11639            >(value, 2, encoder, raw)?,
11640        }
11641
11642        Ok(())
11643    }
11644}
11645
11646impl ::fidl_next::EncodableOption for DirConnectorRouterRouteResponse {
11647    type EncodedOption = WireOptionalDirConnectorRouterRouteResponse;
11648}
11649
11650unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirConnectorRouterRouteResponse
11651where
11652    ___E: ?Sized,
11653    DirConnectorRouterRouteResponse: ::fidl_next::Encode<___E>,
11654{
11655    #[inline]
11656    fn encode_option(
11657        this: Option<Self>,
11658        encoder: &mut ___E,
11659        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
11660    ) -> Result<(), ::fidl_next::EncodeError> {
11661        ::fidl_next::munge!(let WireOptionalDirConnectorRouterRouteResponse { raw, _phantom: _ } = &mut *out);
11662
11663        if let Some(inner) = this {
11664            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
11665            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
11666        } else {
11667            ::fidl_next::RawWireUnion::encode_absent(raw);
11668        }
11669
11670        Ok(())
11671    }
11672}
11673
11674impl ::fidl_next::FromWire<WireDirConnectorRouterRouteResponse>
11675    for DirConnectorRouterRouteResponse
11676{
11677    #[inline]
11678    fn from_wire(wire: WireDirConnectorRouterRouteResponse) -> Self {
11679        let wire = ::core::mem::ManuallyDrop::new(wire);
11680        match wire.raw.ordinal() {
11681            1 => Self::DirConnector(::fidl_next::FromWire::from_wire(unsafe {
11682                wire.raw.get().read_unchecked::<crate::WireDirConnector>()
11683            })),
11684
11685            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
11686                wire.raw.get().read_unchecked::<crate::WireUnit>()
11687            })),
11688
11689            _ => unsafe { ::core::hint::unreachable_unchecked() },
11690        }
11691    }
11692}
11693
11694impl ::fidl_next::FromWireOption<WireOptionalDirConnectorRouterRouteResponse>
11695    for Box<DirConnectorRouterRouteResponse>
11696{
11697    #[inline]
11698    fn from_wire_option(wire: WireOptionalDirConnectorRouterRouteResponse) -> Option<Self> {
11699        if let Some(inner) = wire.into_option() {
11700            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
11701        } else {
11702            None
11703        }
11704    }
11705}
11706
11707/// The wire type corresponding to [`DirConnectorRouterRouteResponse`].
11708#[repr(transparent)]
11709pub struct WireDirConnectorRouterRouteResponse {
11710    raw: ::fidl_next::RawWireUnion,
11711    _phantom: ::core::marker::PhantomData<()>,
11712}
11713
11714impl Drop for WireDirConnectorRouterRouteResponse {
11715    fn drop(&mut self) {
11716        match self.raw.ordinal() {
11717            1 => {
11718                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirConnector>() };
11719            }
11720
11721            2 => {
11722                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
11723            }
11724
11725            _ => unsafe { ::core::hint::unreachable_unchecked() },
11726        }
11727    }
11728}
11729
11730unsafe impl ::fidl_next::Wire for WireDirConnectorRouterRouteResponse {
11731    type Decoded<'de> = WireDirConnectorRouterRouteResponse;
11732
11733    #[inline]
11734    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11735        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11736        ::fidl_next::RawWireUnion::zero_padding(raw);
11737    }
11738}
11739
11740pub mod dir_connector_router_route_response {
11741    pub enum Ref<'de> {
11742        DirConnector(&'de crate::WireDirConnector),
11743
11744        Unavailable(&'de crate::WireUnit),
11745    }
11746}
11747
11748impl WireDirConnectorRouterRouteResponse {
11749    pub fn as_ref(&self) -> crate::dir_connector_router_route_response::Ref<'_> {
11750        match self.raw.ordinal() {
11751            1 => crate::dir_connector_router_route_response::Ref::DirConnector(unsafe {
11752                self.raw.get().deref_unchecked::<crate::WireDirConnector>()
11753            }),
11754
11755            2 => crate::dir_connector_router_route_response::Ref::Unavailable(unsafe {
11756                self.raw.get().deref_unchecked::<crate::WireUnit>()
11757            }),
11758
11759            _ => unsafe { ::core::hint::unreachable_unchecked() },
11760        }
11761    }
11762}
11763
11764unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirConnectorRouterRouteResponse
11765where
11766    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11767    ___D: ::fidl_next::fuchsia::HandleDecoder,
11768{
11769    fn decode(
11770        mut slot: ::fidl_next::Slot<'_, Self>,
11771        decoder: &mut ___D,
11772    ) -> Result<(), ::fidl_next::DecodeError> {
11773        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11774        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11775            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
11776                raw, decoder,
11777            )?,
11778
11779            2 => {
11780                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
11781            }
11782
11783            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
11784        }
11785
11786        Ok(())
11787    }
11788}
11789
11790impl ::core::fmt::Debug for WireDirConnectorRouterRouteResponse {
11791    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11792        match self.raw.ordinal() {
11793            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirConnector>().fmt(f) },
11794            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
11795            _ => unsafe { ::core::hint::unreachable_unchecked() },
11796        }
11797    }
11798}
11799
11800#[repr(transparent)]
11801pub struct WireOptionalDirConnectorRouterRouteResponse {
11802    raw: ::fidl_next::RawWireUnion,
11803    _phantom: ::core::marker::PhantomData<()>,
11804}
11805
11806unsafe impl ::fidl_next::Wire for WireOptionalDirConnectorRouterRouteResponse {
11807    type Decoded<'de> = WireOptionalDirConnectorRouterRouteResponse;
11808
11809    #[inline]
11810    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
11811        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
11812        ::fidl_next::RawWireUnion::zero_padding(raw);
11813    }
11814}
11815
11816impl WireOptionalDirConnectorRouterRouteResponse {
11817    pub fn is_some(&self) -> bool {
11818        self.raw.is_some()
11819    }
11820
11821    pub fn is_none(&self) -> bool {
11822        self.raw.is_none()
11823    }
11824
11825    pub fn as_ref(&self) -> Option<&WireDirConnectorRouterRouteResponse> {
11826        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
11827    }
11828
11829    pub fn into_option(self) -> Option<WireDirConnectorRouterRouteResponse> {
11830        if self.is_some() {
11831            Some(WireDirConnectorRouterRouteResponse {
11832                raw: self.raw,
11833                _phantom: ::core::marker::PhantomData,
11834            })
11835        } else {
11836            None
11837        }
11838    }
11839}
11840
11841unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirConnectorRouterRouteResponse
11842where
11843    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
11844    ___D: ::fidl_next::fuchsia::HandleDecoder,
11845{
11846    fn decode(
11847        mut slot: ::fidl_next::Slot<'_, Self>,
11848        decoder: &mut ___D,
11849    ) -> Result<(), ::fidl_next::DecodeError> {
11850        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
11851        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
11852            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirConnector>(
11853                raw, decoder,
11854            )?,
11855
11856            2 => {
11857                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
11858            }
11859
11860            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
11861            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
11862        }
11863
11864        Ok(())
11865    }
11866}
11867
11868impl ::core::fmt::Debug for WireOptionalDirConnectorRouterRouteResponse {
11869    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
11870        self.as_ref().fmt(f)
11871    }
11872}
11873
11874/// The type corresponding to the DirConnectorRouter protocol.
11875#[derive(Debug)]
11876pub struct DirConnectorRouter;
11877
11878impl ::fidl_next::Discoverable for DirConnectorRouter {
11879    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirConnectorRouter";
11880}
11881
11882pub mod dir_connector_router {
11883    pub mod prelude {
11884        pub use crate::{
11885            DirConnectorRouter, DirConnectorRouterClientHandler, DirConnectorRouterServerHandler,
11886            dir_connector_router,
11887        };
11888
11889        pub use crate::DirConnectorRouterRouteResponse;
11890
11891        pub use crate::RouteRequest;
11892
11893        pub use crate::RouterError;
11894    }
11895
11896    pub struct Route;
11897
11898    impl ::fidl_next::Method for Route {
11899        const ORDINAL: u64 = 972231070188342848;
11900
11901        type Protocol = crate::DirConnectorRouter;
11902
11903        type Request = crate::WireRouteRequest<'static>;
11904
11905        type Response = ::fidl_next::WireFlexibleResult<
11906            'static,
11907            crate::WireDirConnectorRouterRouteResponse,
11908            crate::WireRouterError,
11909        >;
11910    }
11911
11912    mod ___detail {
11913
11914        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DirConnectorRouter
11915        where
11916            ___T: ::fidl_next::Transport,
11917        {
11918            type ClientSender = DirConnectorRouterClientSender<___T>;
11919            type ServerSender = DirConnectorRouterServerSender<___T>;
11920        }
11921
11922        /// The client sender for the `DirConnectorRouter` protocol.
11923        #[repr(transparent)]
11924        pub struct DirConnectorRouterClientSender<___T: ::fidl_next::Transport> {
11925            #[allow(dead_code)]
11926            sender: ::fidl_next::protocol::ClientSender<___T>,
11927        }
11928
11929        impl<___T> DirConnectorRouterClientSender<___T>
11930        where
11931            ___T: ::fidl_next::Transport,
11932        {
11933            pub fn route_with<___R>(
11934                &self,
11935                request: ___R,
11936            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
11937            where
11938                ___R: ::fidl_next::Encode<
11939                        <___T as ::fidl_next::Transport>::SendBuffer,
11940                        Encoded = crate::WireRouteRequest<'static>,
11941                    >,
11942            {
11943                ::fidl_next::TwoWayFuture::from_untyped(
11944                    self.sender.send_two_way(972231070188342848, request),
11945                )
11946            }
11947        }
11948
11949        /// The server sender for the `DirConnectorRouter` protocol.
11950        #[repr(transparent)]
11951        pub struct DirConnectorRouterServerSender<___T: ::fidl_next::Transport> {
11952            sender: ::fidl_next::protocol::ServerSender<___T>,
11953        }
11954
11955        impl<___T> DirConnectorRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
11956    }
11957}
11958
11959/// A client handler for the DirConnectorRouter protocol.
11960///
11961/// See [`DirConnectorRouter`] for more details.
11962pub trait DirConnectorRouterClientHandler<
11963    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
11964    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
11965>
11966{
11967    fn on_unknown_interaction(
11968        &mut self,
11969        sender: &::fidl_next::ClientSender<DirConnectorRouter, ___T>,
11970        ordinal: u64,
11971    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
11972        sender.close();
11973        ::core::future::ready(())
11974    }
11975}
11976
11977impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirConnectorRouter
11978where
11979    ___H: DirConnectorRouterClientHandler<___T> + ::core::marker::Send,
11980    ___T: ::fidl_next::Transport,
11981    <dir_connector_router::Route as ::fidl_next::Method>::Response:
11982        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
11983{
11984    async fn on_event(
11985        handler: &mut ___H,
11986        sender: &::fidl_next::ClientSender<Self, ___T>,
11987        ordinal: u64,
11988        buffer: ___T::RecvBuffer,
11989    ) {
11990        match ordinal {
11991            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
11992        }
11993    }
11994}
11995
11996/// A server handler for the DirConnectorRouter protocol.
11997///
11998/// See [`DirConnectorRouter`] for more details.
11999pub trait DirConnectorRouterServerHandler<
12000    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12001    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12002>
12003{
12004    fn route(
12005        &mut self,
12006        sender: &::fidl_next::ServerSender<DirConnectorRouter, ___T>,
12007
12008        request: ::fidl_next::Request<dir_connector_router::Route, ___T>,
12009
12010        responder: ::fidl_next::Responder<dir_connector_router::Route>,
12011    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12012
12013    fn on_unknown_interaction(
12014        &mut self,
12015        sender: &::fidl_next::ServerSender<DirConnectorRouter, ___T>,
12016        ordinal: u64,
12017    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12018        sender.close();
12019        ::core::future::ready(())
12020    }
12021}
12022
12023impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirConnectorRouter
12024where
12025    ___H: DirConnectorRouterServerHandler<___T> + ::core::marker::Send,
12026    ___T: ::fidl_next::Transport,
12027    <dir_connector_router::Route as ::fidl_next::Method>::Request:
12028        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12029{
12030    async fn on_one_way(
12031        handler: &mut ___H,
12032        sender: &::fidl_next::ServerSender<Self, ___T>,
12033        ordinal: u64,
12034        buffer: ___T::RecvBuffer,
12035    ) {
12036        match ordinal {
12037            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12038        }
12039    }
12040
12041    async fn on_two_way(
12042        handler: &mut ___H,
12043        sender: &::fidl_next::ServerSender<Self, ___T>,
12044        ordinal: u64,
12045        buffer: ___T::RecvBuffer,
12046        responder: ::fidl_next::protocol::Responder,
12047    ) {
12048        match ordinal {
12049            972231070188342848 => {
12050                let responder = ::fidl_next::Responder::from_untyped(responder);
12051
12052                match ::fidl_next::DecoderExt::decode(buffer) {
12053                    Ok(decoded) => handler.route(sender, decoded, responder).await,
12054                    Err(e) => sender.close(),
12055                }
12056            }
12057
12058            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12059        }
12060    }
12061}
12062
12063#[derive(Debug)]
12064pub enum DirEntryRouterRouteResponse {
12065    DirEntry(crate::DirEntry),
12066
12067    Unavailable(crate::Unit),
12068}
12069
12070impl ::fidl_next::Encodable for DirEntryRouterRouteResponse {
12071    type Encoded = WireDirEntryRouterRouteResponse;
12072}
12073
12074unsafe impl<___E> ::fidl_next::Encode<___E> for DirEntryRouterRouteResponse
12075where
12076    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12077    ___E: ::fidl_next::fuchsia::HandleEncoder,
12078{
12079    #[inline]
12080    fn encode(
12081        self,
12082        encoder: &mut ___E,
12083        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12084    ) -> Result<(), ::fidl_next::EncodeError> {
12085        ::fidl_next::munge!(let WireDirEntryRouterRouteResponse { raw, _phantom: _ } = out);
12086
12087        match self {
12088            Self::DirEntry(value) => ::fidl_next::RawWireUnion::encode_as_static::<
12089                ___E,
12090                crate::DirEntry,
12091            >(value, 1, encoder, raw)?,
12092
12093            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
12094                ___E,
12095                crate::Unit,
12096            >(value, 2, encoder, raw)?,
12097        }
12098
12099        Ok(())
12100    }
12101}
12102
12103impl ::fidl_next::EncodableOption for DirEntryRouterRouteResponse {
12104    type EncodedOption = WireOptionalDirEntryRouterRouteResponse;
12105}
12106
12107unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirEntryRouterRouteResponse
12108where
12109    ___E: ?Sized,
12110    DirEntryRouterRouteResponse: ::fidl_next::Encode<___E>,
12111{
12112    #[inline]
12113    fn encode_option(
12114        this: Option<Self>,
12115        encoder: &mut ___E,
12116        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
12117    ) -> Result<(), ::fidl_next::EncodeError> {
12118        ::fidl_next::munge!(let WireOptionalDirEntryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
12119
12120        if let Some(inner) = this {
12121            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
12122            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
12123        } else {
12124            ::fidl_next::RawWireUnion::encode_absent(raw);
12125        }
12126
12127        Ok(())
12128    }
12129}
12130
12131impl ::fidl_next::FromWire<WireDirEntryRouterRouteResponse> for DirEntryRouterRouteResponse {
12132    #[inline]
12133    fn from_wire(wire: WireDirEntryRouterRouteResponse) -> Self {
12134        let wire = ::core::mem::ManuallyDrop::new(wire);
12135        match wire.raw.ordinal() {
12136            1 => Self::DirEntry(::fidl_next::FromWire::from_wire(unsafe {
12137                wire.raw.get().read_unchecked::<crate::WireDirEntry>()
12138            })),
12139
12140            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
12141                wire.raw.get().read_unchecked::<crate::WireUnit>()
12142            })),
12143
12144            _ => unsafe { ::core::hint::unreachable_unchecked() },
12145        }
12146    }
12147}
12148
12149impl ::fidl_next::FromWireOption<WireOptionalDirEntryRouterRouteResponse>
12150    for Box<DirEntryRouterRouteResponse>
12151{
12152    #[inline]
12153    fn from_wire_option(wire: WireOptionalDirEntryRouterRouteResponse) -> Option<Self> {
12154        if let Some(inner) = wire.into_option() {
12155            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
12156        } else {
12157            None
12158        }
12159    }
12160}
12161
12162/// The wire type corresponding to [`DirEntryRouterRouteResponse`].
12163#[repr(transparent)]
12164pub struct WireDirEntryRouterRouteResponse {
12165    raw: ::fidl_next::RawWireUnion,
12166    _phantom: ::core::marker::PhantomData<()>,
12167}
12168
12169impl Drop for WireDirEntryRouterRouteResponse {
12170    fn drop(&mut self) {
12171        match self.raw.ordinal() {
12172            1 => {
12173                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireDirEntry>() };
12174            }
12175
12176            2 => {
12177                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
12178            }
12179
12180            _ => unsafe { ::core::hint::unreachable_unchecked() },
12181        }
12182    }
12183}
12184
12185unsafe impl ::fidl_next::Wire for WireDirEntryRouterRouteResponse {
12186    type Decoded<'de> = WireDirEntryRouterRouteResponse;
12187
12188    #[inline]
12189    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12190        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12191        ::fidl_next::RawWireUnion::zero_padding(raw);
12192    }
12193}
12194
12195pub mod dir_entry_router_route_response {
12196    pub enum Ref<'de> {
12197        DirEntry(&'de crate::WireDirEntry),
12198
12199        Unavailable(&'de crate::WireUnit),
12200    }
12201}
12202
12203impl WireDirEntryRouterRouteResponse {
12204    pub fn as_ref(&self) -> crate::dir_entry_router_route_response::Ref<'_> {
12205        match self.raw.ordinal() {
12206            1 => crate::dir_entry_router_route_response::Ref::DirEntry(unsafe {
12207                self.raw.get().deref_unchecked::<crate::WireDirEntry>()
12208            }),
12209
12210            2 => crate::dir_entry_router_route_response::Ref::Unavailable(unsafe {
12211                self.raw.get().deref_unchecked::<crate::WireUnit>()
12212            }),
12213
12214            _ => unsafe { ::core::hint::unreachable_unchecked() },
12215        }
12216    }
12217}
12218
12219unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirEntryRouterRouteResponse
12220where
12221    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12222    ___D: ::fidl_next::fuchsia::HandleDecoder,
12223{
12224    fn decode(
12225        mut slot: ::fidl_next::Slot<'_, Self>,
12226        decoder: &mut ___D,
12227    ) -> Result<(), ::fidl_next::DecodeError> {
12228        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12229        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
12230            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
12231                raw, decoder,
12232            )?,
12233
12234            2 => {
12235                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
12236            }
12237
12238            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
12239        }
12240
12241        Ok(())
12242    }
12243}
12244
12245impl ::core::fmt::Debug for WireDirEntryRouterRouteResponse {
12246    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12247        match self.raw.ordinal() {
12248            1 => unsafe { self.raw.get().deref_unchecked::<crate::WireDirEntry>().fmt(f) },
12249            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
12250            _ => unsafe { ::core::hint::unreachable_unchecked() },
12251        }
12252    }
12253}
12254
12255#[repr(transparent)]
12256pub struct WireOptionalDirEntryRouterRouteResponse {
12257    raw: ::fidl_next::RawWireUnion,
12258    _phantom: ::core::marker::PhantomData<()>,
12259}
12260
12261unsafe impl ::fidl_next::Wire for WireOptionalDirEntryRouterRouteResponse {
12262    type Decoded<'de> = WireOptionalDirEntryRouterRouteResponse;
12263
12264    #[inline]
12265    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
12266        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
12267        ::fidl_next::RawWireUnion::zero_padding(raw);
12268    }
12269}
12270
12271impl WireOptionalDirEntryRouterRouteResponse {
12272    pub fn is_some(&self) -> bool {
12273        self.raw.is_some()
12274    }
12275
12276    pub fn is_none(&self) -> bool {
12277        self.raw.is_none()
12278    }
12279
12280    pub fn as_ref(&self) -> Option<&WireDirEntryRouterRouteResponse> {
12281        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
12282    }
12283
12284    pub fn into_option(self) -> Option<WireDirEntryRouterRouteResponse> {
12285        if self.is_some() {
12286            Some(WireDirEntryRouterRouteResponse {
12287                raw: self.raw,
12288                _phantom: ::core::marker::PhantomData,
12289            })
12290        } else {
12291            None
12292        }
12293    }
12294}
12295
12296unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirEntryRouterRouteResponse
12297where
12298    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12299    ___D: ::fidl_next::fuchsia::HandleDecoder,
12300{
12301    fn decode(
12302        mut slot: ::fidl_next::Slot<'_, Self>,
12303        decoder: &mut ___D,
12304    ) -> Result<(), ::fidl_next::DecodeError> {
12305        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
12306        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
12307            1 => ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireDirEntry>(
12308                raw, decoder,
12309            )?,
12310
12311            2 => {
12312                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
12313            }
12314
12315            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
12316            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
12317        }
12318
12319        Ok(())
12320    }
12321}
12322
12323impl ::core::fmt::Debug for WireOptionalDirEntryRouterRouteResponse {
12324    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
12325        self.as_ref().fmt(f)
12326    }
12327}
12328
12329/// The type corresponding to the DirEntryRouter protocol.
12330#[derive(Debug)]
12331pub struct DirEntryRouter;
12332
12333impl ::fidl_next::Discoverable for DirEntryRouter {
12334    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirEntryRouter";
12335}
12336
12337pub mod dir_entry_router {
12338    pub mod prelude {
12339        pub use crate::{
12340            DirEntryRouter, DirEntryRouterClientHandler, DirEntryRouterServerHandler,
12341            dir_entry_router,
12342        };
12343
12344        pub use crate::DirEntryRouterRouteResponse;
12345
12346        pub use crate::RouteRequest;
12347
12348        pub use crate::RouterError;
12349    }
12350
12351    pub struct Route;
12352
12353    impl ::fidl_next::Method for Route {
12354        const ORDINAL: u64 = 1929392218567642066;
12355
12356        type Protocol = crate::DirEntryRouter;
12357
12358        type Request = crate::WireRouteRequest<'static>;
12359
12360        type Response = ::fidl_next::WireFlexibleResult<
12361            'static,
12362            crate::WireDirEntryRouterRouteResponse,
12363            crate::WireRouterError,
12364        >;
12365    }
12366
12367    mod ___detail {
12368
12369        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DirEntryRouter
12370        where
12371            ___T: ::fidl_next::Transport,
12372        {
12373            type ClientSender = DirEntryRouterClientSender<___T>;
12374            type ServerSender = DirEntryRouterServerSender<___T>;
12375        }
12376
12377        /// The client sender for the `DirEntryRouter` protocol.
12378        #[repr(transparent)]
12379        pub struct DirEntryRouterClientSender<___T: ::fidl_next::Transport> {
12380            #[allow(dead_code)]
12381            sender: ::fidl_next::protocol::ClientSender<___T>,
12382        }
12383
12384        impl<___T> DirEntryRouterClientSender<___T>
12385        where
12386            ___T: ::fidl_next::Transport,
12387        {
12388            pub fn route_with<___R>(
12389                &self,
12390                request: ___R,
12391            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
12392            where
12393                ___R: ::fidl_next::Encode<
12394                        <___T as ::fidl_next::Transport>::SendBuffer,
12395                        Encoded = crate::WireRouteRequest<'static>,
12396                    >,
12397            {
12398                ::fidl_next::TwoWayFuture::from_untyped(
12399                    self.sender.send_two_way(1929392218567642066, request),
12400                )
12401            }
12402        }
12403
12404        /// The server sender for the `DirEntryRouter` protocol.
12405        #[repr(transparent)]
12406        pub struct DirEntryRouterServerSender<___T: ::fidl_next::Transport> {
12407            sender: ::fidl_next::protocol::ServerSender<___T>,
12408        }
12409
12410        impl<___T> DirEntryRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
12411    }
12412}
12413
12414/// A client handler for the DirEntryRouter protocol.
12415///
12416/// See [`DirEntryRouter`] for more details.
12417pub trait DirEntryRouterClientHandler<
12418    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12419    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12420>
12421{
12422    fn on_unknown_interaction(
12423        &mut self,
12424        sender: &::fidl_next::ClientSender<DirEntryRouter, ___T>,
12425        ordinal: u64,
12426    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12427        sender.close();
12428        ::core::future::ready(())
12429    }
12430}
12431
12432impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirEntryRouter
12433where
12434    ___H: DirEntryRouterClientHandler<___T> + ::core::marker::Send,
12435    ___T: ::fidl_next::Transport,
12436    <dir_entry_router::Route as ::fidl_next::Method>::Response:
12437        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12438{
12439    async fn on_event(
12440        handler: &mut ___H,
12441        sender: &::fidl_next::ClientSender<Self, ___T>,
12442        ordinal: u64,
12443        buffer: ___T::RecvBuffer,
12444    ) {
12445        match ordinal {
12446            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12447        }
12448    }
12449}
12450
12451/// A server handler for the DirEntryRouter protocol.
12452///
12453/// See [`DirEntryRouter`] for more details.
12454pub trait DirEntryRouterServerHandler<
12455    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12456    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12457>
12458{
12459    fn route(
12460        &mut self,
12461        sender: &::fidl_next::ServerSender<DirEntryRouter, ___T>,
12462
12463        request: ::fidl_next::Request<dir_entry_router::Route, ___T>,
12464
12465        responder: ::fidl_next::Responder<dir_entry_router::Route>,
12466    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12467
12468    fn on_unknown_interaction(
12469        &mut self,
12470        sender: &::fidl_next::ServerSender<DirEntryRouter, ___T>,
12471        ordinal: u64,
12472    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12473        sender.close();
12474        ::core::future::ready(())
12475    }
12476}
12477
12478impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirEntryRouter
12479where
12480    ___H: DirEntryRouterServerHandler<___T> + ::core::marker::Send,
12481    ___T: ::fidl_next::Transport,
12482    <dir_entry_router::Route as ::fidl_next::Method>::Request:
12483        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12484{
12485    async fn on_one_way(
12486        handler: &mut ___H,
12487        sender: &::fidl_next::ServerSender<Self, ___T>,
12488        ordinal: u64,
12489        buffer: ___T::RecvBuffer,
12490    ) {
12491        match ordinal {
12492            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12493        }
12494    }
12495
12496    async fn on_two_way(
12497        handler: &mut ___H,
12498        sender: &::fidl_next::ServerSender<Self, ___T>,
12499        ordinal: u64,
12500        buffer: ___T::RecvBuffer,
12501        responder: ::fidl_next::protocol::Responder,
12502    ) {
12503        match ordinal {
12504            1929392218567642066 => {
12505                let responder = ::fidl_next::Responder::from_untyped(responder);
12506
12507                match ::fidl_next::DecoderExt::decode(buffer) {
12508                    Ok(decoded) => handler.route(sender, decoded, responder).await,
12509                    Err(e) => sender.close(),
12510                }
12511            }
12512
12513            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12514        }
12515    }
12516}
12517
12518#[derive(Debug)]
12519#[repr(C)]
12520pub struct DirReceiverReceiveRequest {
12521    pub channel: ::fidl_next::ServerEnd<
12522        ::fidl_next_fuchsia_io::Directory,
12523        ::fidl_next::fuchsia::zx::Channel,
12524    >,
12525}
12526
12527impl ::fidl_next::Encodable for DirReceiverReceiveRequest {
12528    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireDirReceiverReceiveRequest> = unsafe {
12529        ::fidl_next::CopyOptimization::enable_if(
12530            true && <::fidl_next::ServerEnd<
12531                ::fidl_next_fuchsia_io::Directory,
12532                ::fidl_next::fuchsia::zx::Channel,
12533            > as ::fidl_next::Encodable>::COPY_OPTIMIZATION
12534                .is_enabled(),
12535        )
12536    };
12537
12538    type Encoded = WireDirReceiverReceiveRequest;
12539}
12540
12541unsafe impl<___E> ::fidl_next::Encode<___E> for DirReceiverReceiveRequest
12542where
12543    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12544    ___E: ::fidl_next::fuchsia::HandleEncoder,
12545{
12546    #[inline]
12547    fn encode(
12548        self,
12549        encoder: &mut ___E,
12550        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12551    ) -> Result<(), ::fidl_next::EncodeError> {
12552        ::fidl_next::munge! {
12553            let Self::Encoded {
12554                channel,
12555
12556            } = out;
12557        }
12558
12559        ::fidl_next::Encode::encode(self.channel, encoder, channel)?;
12560
12561        Ok(())
12562    }
12563}
12564
12565impl ::fidl_next::EncodableOption for DirReceiverReceiveRequest {
12566    type EncodedOption = ::fidl_next::WireBox<'static, WireDirReceiverReceiveRequest>;
12567}
12568
12569unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirReceiverReceiveRequest
12570where
12571    ___E: ::fidl_next::Encoder + ?Sized,
12572    DirReceiverReceiveRequest: ::fidl_next::Encode<___E>,
12573{
12574    #[inline]
12575    fn encode_option(
12576        this: Option<Self>,
12577        encoder: &mut ___E,
12578        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
12579    ) -> Result<(), ::fidl_next::EncodeError> {
12580        if let Some(inner) = this {
12581            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
12582            ::fidl_next::WireBox::encode_present(out);
12583        } else {
12584            ::fidl_next::WireBox::encode_absent(out);
12585        }
12586
12587        Ok(())
12588    }
12589}
12590
12591impl ::fidl_next::FromWire<WireDirReceiverReceiveRequest> for DirReceiverReceiveRequest {
12592    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireDirReceiverReceiveRequest, Self> = unsafe {
12593        ::fidl_next::CopyOptimization::enable_if(
12594            true && <::fidl_next::ServerEnd<
12595                ::fidl_next_fuchsia_io::Directory,
12596                ::fidl_next::fuchsia::zx::Channel,
12597            > as ::fidl_next::FromWire<
12598                ::fidl_next::ServerEnd<
12599                    ::fidl_next_fuchsia_io::Directory,
12600                    ::fidl_next::fuchsia::WireChannel,
12601                >,
12602            >>::COPY_OPTIMIZATION
12603                .is_enabled(),
12604        )
12605    };
12606
12607    #[inline]
12608    fn from_wire(wire: WireDirReceiverReceiveRequest) -> Self {
12609        Self { channel: ::fidl_next::FromWire::from_wire(wire.channel) }
12610    }
12611}
12612
12613/// The wire type corresponding to [`DirReceiverReceiveRequest`].
12614#[derive(Debug)]
12615#[repr(C)]
12616pub struct WireDirReceiverReceiveRequest {
12617    pub channel: ::fidl_next::ServerEnd<
12618        ::fidl_next_fuchsia_io::Directory,
12619        ::fidl_next::fuchsia::WireChannel,
12620    >,
12621}
12622
12623unsafe impl ::fidl_next::Wire for WireDirReceiverReceiveRequest {
12624    type Decoded<'de> = WireDirReceiverReceiveRequest;
12625
12626    #[inline]
12627    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
12628}
12629
12630unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirReceiverReceiveRequest
12631where
12632    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
12633    ___D: ::fidl_next::fuchsia::HandleDecoder,
12634{
12635    fn decode(
12636        slot: ::fidl_next::Slot<'_, Self>,
12637        decoder: &mut ___D,
12638    ) -> Result<(), ::fidl_next::DecodeError> {
12639        ::fidl_next::munge! {
12640            let Self {
12641                mut channel,
12642
12643            } = slot;
12644        }
12645
12646        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
12647
12648        Ok(())
12649    }
12650}
12651
12652/// The type corresponding to the DirReceiver protocol.
12653#[doc = " A receiver is served by components and allows them to receive directory channels\n framework.\n"]
12654#[derive(Debug)]
12655pub struct DirReceiver;
12656
12657impl ::fidl_next::Discoverable for DirReceiver {
12658    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirReceiver";
12659}
12660
12661pub mod dir_receiver {
12662    pub mod prelude {
12663        pub use crate::{
12664            DirReceiver, DirReceiverClientHandler, DirReceiverServerHandler, dir_receiver,
12665        };
12666
12667        pub use crate::DirReceiverReceiveRequest;
12668    }
12669
12670    pub struct Receive;
12671
12672    impl ::fidl_next::Method for Receive {
12673        const ORDINAL: u64 = 926684461087488948;
12674
12675        type Protocol = crate::DirReceiver;
12676
12677        type Request = crate::WireDirReceiverReceiveRequest;
12678
12679        type Response = ::fidl_next::Never;
12680    }
12681
12682    mod ___detail {
12683
12684        pub struct Receive<T0> {
12685            channel: T0,
12686        }
12687
12688        impl<T0> ::fidl_next::Encodable for Receive<T0>
12689        where
12690            T0: ::fidl_next::Encodable<
12691                    Encoded = ::fidl_next::ServerEnd<
12692                        ::fidl_next_fuchsia_io::Directory,
12693                        ::fidl_next::fuchsia::WireChannel,
12694                    >,
12695                >,
12696        {
12697            type Encoded = crate::WireDirReceiverReceiveRequest;
12698        }
12699
12700        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Receive<T0>
12701        where
12702            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12703            ___E: ::fidl_next::fuchsia::HandleEncoder,
12704            T0: ::fidl_next::Encode<
12705                    ___E,
12706                    Encoded = ::fidl_next::ServerEnd<
12707                        ::fidl_next_fuchsia_io::Directory,
12708                        ::fidl_next::fuchsia::WireChannel,
12709                    >,
12710                >,
12711        {
12712            #[inline]
12713            fn encode(
12714                self,
12715                encoder: &mut ___E,
12716                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12717            ) -> Result<(), ::fidl_next::EncodeError> {
12718                ::fidl_next::munge! {
12719                    let Self::Encoded {
12720                        channel,
12721
12722                    } = out;
12723                }
12724
12725                ::fidl_next::Encode::encode(self.channel, encoder, channel)?;
12726
12727                Ok(())
12728            }
12729        }
12730
12731        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DirReceiver
12732        where
12733            ___T: ::fidl_next::Transport,
12734        {
12735            type ClientSender = DirReceiverClientSender<___T>;
12736            type ServerSender = DirReceiverServerSender<___T>;
12737        }
12738
12739        /// The client sender for the `DirReceiver` protocol.
12740        #[repr(transparent)]
12741        pub struct DirReceiverClientSender<___T: ::fidl_next::Transport> {
12742            #[allow(dead_code)]
12743            sender: ::fidl_next::protocol::ClientSender<___T>,
12744        }
12745
12746        impl<___T> DirReceiverClientSender<___T>
12747        where
12748            ___T: ::fidl_next::Transport,
12749        {
12750            #[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"]
12751            pub fn receive(
12752                &self,
12753
12754                channel: impl ::fidl_next::Encode<
12755                    <___T as ::fidl_next::Transport>::SendBuffer,
12756                    Encoded = ::fidl_next::ServerEnd<
12757                        ::fidl_next_fuchsia_io::Directory,
12758                        ::fidl_next::fuchsia::WireChannel,
12759                    >,
12760                >,
12761            ) -> ::fidl_next::SendFuture<'_, ___T>
12762            where
12763                <___T as ::fidl_next::Transport>::SendBuffer:
12764                    ::fidl_next::encoder::InternalHandleEncoder,
12765                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
12766            {
12767                self.receive_with(Receive { channel })
12768            }
12769
12770            #[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"]
12771            pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
12772            where
12773                ___R: ::fidl_next::Encode<
12774                        <___T as ::fidl_next::Transport>::SendBuffer,
12775                        Encoded = crate::WireDirReceiverReceiveRequest,
12776                    >,
12777            {
12778                ::fidl_next::SendFuture::from_untyped(
12779                    self.sender.send_one_way(926684461087488948, request),
12780                )
12781            }
12782        }
12783
12784        /// The server sender for the `DirReceiver` protocol.
12785        #[repr(transparent)]
12786        pub struct DirReceiverServerSender<___T: ::fidl_next::Transport> {
12787            sender: ::fidl_next::protocol::ServerSender<___T>,
12788        }
12789
12790        impl<___T> DirReceiverServerSender<___T> where ___T: ::fidl_next::Transport {}
12791    }
12792}
12793
12794/// A client handler for the DirReceiver protocol.
12795///
12796/// See [`DirReceiver`] for more details.
12797pub trait DirReceiverClientHandler<
12798    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12799    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12800>
12801{
12802    fn on_unknown_interaction(
12803        &mut self,
12804        sender: &::fidl_next::ClientSender<DirReceiver, ___T>,
12805        ordinal: u64,
12806    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12807        sender.close();
12808        ::core::future::ready(())
12809    }
12810}
12811
12812impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirReceiver
12813where
12814    ___H: DirReceiverClientHandler<___T> + ::core::marker::Send,
12815    ___T: ::fidl_next::Transport,
12816{
12817    async fn on_event(
12818        handler: &mut ___H,
12819        sender: &::fidl_next::ClientSender<Self, ___T>,
12820        ordinal: u64,
12821        buffer: ___T::RecvBuffer,
12822    ) {
12823        match ordinal {
12824            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12825        }
12826    }
12827}
12828
12829/// A server handler for the DirReceiver protocol.
12830///
12831/// See [`DirReceiver`] for more details.
12832pub trait DirReceiverServerHandler<
12833    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
12834    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
12835>
12836{
12837    #[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"]
12838    fn receive(
12839        &mut self,
12840        sender: &::fidl_next::ServerSender<DirReceiver, ___T>,
12841
12842        request: ::fidl_next::Request<dir_receiver::Receive, ___T>,
12843    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
12844
12845    fn on_unknown_interaction(
12846        &mut self,
12847        sender: &::fidl_next::ServerSender<DirReceiver, ___T>,
12848        ordinal: u64,
12849    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
12850        sender.close();
12851        ::core::future::ready(())
12852    }
12853}
12854
12855impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirReceiver
12856where
12857    ___H: DirReceiverServerHandler<___T> + ::core::marker::Send,
12858    ___T: ::fidl_next::Transport,
12859    <dir_receiver::Receive as ::fidl_next::Method>::Request:
12860        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
12861{
12862    async fn on_one_way(
12863        handler: &mut ___H,
12864        sender: &::fidl_next::ServerSender<Self, ___T>,
12865        ordinal: u64,
12866        buffer: ___T::RecvBuffer,
12867    ) {
12868        match ordinal {
12869            926684461087488948 => match ::fidl_next::DecoderExt::decode(buffer) {
12870                Ok(decoded) => handler.receive(sender, decoded).await,
12871                Err(e) => sender.close(),
12872            },
12873
12874            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12875        }
12876    }
12877
12878    async fn on_two_way(
12879        handler: &mut ___H,
12880        sender: &::fidl_next::ServerSender<Self, ___T>,
12881        ordinal: u64,
12882        buffer: ___T::RecvBuffer,
12883        responder: ::fidl_next::protocol::Responder,
12884    ) {
12885        match ordinal {
12886            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
12887        }
12888    }
12889}
12890
12891#[derive(Debug)]
12892pub enum DirectoryRouterRouteResponse {
12893    Directory(
12894        ::fidl_next::ClientEnd<
12895            ::fidl_next_fuchsia_io::Directory,
12896            ::fidl_next::fuchsia::zx::Channel,
12897        >,
12898    ),
12899
12900    Unavailable(crate::Unit),
12901}
12902
12903impl ::fidl_next::Encodable for DirectoryRouterRouteResponse {
12904    type Encoded = WireDirectoryRouterRouteResponse;
12905}
12906
12907unsafe impl<___E> ::fidl_next::Encode<___E> for DirectoryRouterRouteResponse
12908where
12909    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
12910    ___E: ::fidl_next::fuchsia::HandleEncoder,
12911{
12912    #[inline]
12913    fn encode(
12914        self,
12915        encoder: &mut ___E,
12916        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
12917    ) -> Result<(), ::fidl_next::EncodeError> {
12918        ::fidl_next::munge!(let WireDirectoryRouterRouteResponse { raw, _phantom: _ } = out);
12919
12920        match self {
12921            Self::Directory(value) => ::fidl_next::RawWireUnion::encode_as_static::<
12922                ___E,
12923                ::fidl_next::ClientEnd<
12924                    ::fidl_next_fuchsia_io::Directory,
12925                    ::fidl_next::fuchsia::zx::Channel,
12926                >,
12927            >(value, 1, encoder, raw)?,
12928
12929            Self::Unavailable(value) => ::fidl_next::RawWireUnion::encode_as_static::<
12930                ___E,
12931                crate::Unit,
12932            >(value, 2, encoder, raw)?,
12933        }
12934
12935        Ok(())
12936    }
12937}
12938
12939impl ::fidl_next::EncodableOption for DirectoryRouterRouteResponse {
12940    type EncodedOption = WireOptionalDirectoryRouterRouteResponse;
12941}
12942
12943unsafe impl<___E> ::fidl_next::EncodeOption<___E> for DirectoryRouterRouteResponse
12944where
12945    ___E: ?Sized,
12946    DirectoryRouterRouteResponse: ::fidl_next::Encode<___E>,
12947{
12948    #[inline]
12949    fn encode_option(
12950        this: Option<Self>,
12951        encoder: &mut ___E,
12952        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
12953    ) -> Result<(), ::fidl_next::EncodeError> {
12954        ::fidl_next::munge!(let WireOptionalDirectoryRouterRouteResponse { raw, _phantom: _ } = &mut *out);
12955
12956        if let Some(inner) = this {
12957            let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
12958            ::fidl_next::Encode::encode(inner, encoder, value_out)?;
12959        } else {
12960            ::fidl_next::RawWireUnion::encode_absent(raw);
12961        }
12962
12963        Ok(())
12964    }
12965}
12966
12967impl ::fidl_next::FromWire<WireDirectoryRouterRouteResponse> for DirectoryRouterRouteResponse {
12968    #[inline]
12969    fn from_wire(wire: WireDirectoryRouterRouteResponse) -> Self {
12970        let wire = ::core::mem::ManuallyDrop::new(wire);
12971        match wire.raw.ordinal() {
12972            1 => Self::Directory(::fidl_next::FromWire::from_wire(unsafe {
12973                wire.raw.get().read_unchecked::<::fidl_next::ClientEnd<
12974                    ::fidl_next_fuchsia_io::Directory,
12975                    ::fidl_next::fuchsia::WireChannel,
12976                >>()
12977            })),
12978
12979            2 => Self::Unavailable(::fidl_next::FromWire::from_wire(unsafe {
12980                wire.raw.get().read_unchecked::<crate::WireUnit>()
12981            })),
12982
12983            _ => unsafe { ::core::hint::unreachable_unchecked() },
12984        }
12985    }
12986}
12987
12988impl ::fidl_next::FromWireOption<WireOptionalDirectoryRouterRouteResponse>
12989    for Box<DirectoryRouterRouteResponse>
12990{
12991    #[inline]
12992    fn from_wire_option(wire: WireOptionalDirectoryRouterRouteResponse) -> Option<Self> {
12993        if let Some(inner) = wire.into_option() {
12994            Some(Box::new(::fidl_next::FromWire::from_wire(inner)))
12995        } else {
12996            None
12997        }
12998    }
12999}
13000
13001/// The wire type corresponding to [`DirectoryRouterRouteResponse`].
13002#[repr(transparent)]
13003pub struct WireDirectoryRouterRouteResponse {
13004    raw: ::fidl_next::RawWireUnion,
13005    _phantom: ::core::marker::PhantomData<()>,
13006}
13007
13008impl Drop for WireDirectoryRouterRouteResponse {
13009    fn drop(&mut self) {
13010        match self.raw.ordinal() {
13011            1 => {
13012                let _ = unsafe {
13013                    self.raw.get().read_unchecked::<::fidl_next::ClientEnd<
13014                        ::fidl_next_fuchsia_io::Directory,
13015                        ::fidl_next::fuchsia::WireChannel,
13016                    >>()
13017                };
13018            }
13019
13020            2 => {
13021                let _ = unsafe { self.raw.get().read_unchecked::<crate::WireUnit>() };
13022            }
13023
13024            _ => unsafe { ::core::hint::unreachable_unchecked() },
13025        }
13026    }
13027}
13028
13029unsafe impl ::fidl_next::Wire for WireDirectoryRouterRouteResponse {
13030    type Decoded<'de> = WireDirectoryRouterRouteResponse;
13031
13032    #[inline]
13033    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13034        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
13035        ::fidl_next::RawWireUnion::zero_padding(raw);
13036    }
13037}
13038
13039pub mod directory_router_route_response {
13040    pub enum Ref<'de> {
13041        Directory(
13042            &'de ::fidl_next::ClientEnd<
13043                ::fidl_next_fuchsia_io::Directory,
13044                ::fidl_next::fuchsia::WireChannel,
13045            >,
13046        ),
13047
13048        Unavailable(&'de crate::WireUnit),
13049    }
13050}
13051
13052impl WireDirectoryRouterRouteResponse {
13053    pub fn as_ref(&self) -> crate::directory_router_route_response::Ref<'_> {
13054        match self.raw.ordinal() {
13055            1 => crate::directory_router_route_response::Ref::Directory(unsafe {
13056                self.raw.get().deref_unchecked::<::fidl_next::ClientEnd<
13057                    ::fidl_next_fuchsia_io::Directory,
13058                    ::fidl_next::fuchsia::WireChannel,
13059                >>()
13060            }),
13061
13062            2 => crate::directory_router_route_response::Ref::Unavailable(unsafe {
13063                self.raw.get().deref_unchecked::<crate::WireUnit>()
13064            }),
13065
13066            _ => unsafe { ::core::hint::unreachable_unchecked() },
13067        }
13068    }
13069}
13070
13071unsafe impl<___D> ::fidl_next::Decode<___D> for WireDirectoryRouterRouteResponse
13072where
13073    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13074    ___D: ::fidl_next::fuchsia::HandleDecoder,
13075{
13076    fn decode(
13077        mut slot: ::fidl_next::Slot<'_, Self>,
13078        decoder: &mut ___D,
13079    ) -> Result<(), ::fidl_next::DecodeError> {
13080        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13081        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
13082            1 => ::fidl_next::RawWireUnion::decode_as_static::<
13083                ___D,
13084                ::fidl_next::ClientEnd<
13085                    ::fidl_next_fuchsia_io::Directory,
13086                    ::fidl_next::fuchsia::WireChannel,
13087                >,
13088            >(raw, decoder)?,
13089
13090            2 => {
13091                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
13092            }
13093
13094            ord => return Err(::fidl_next::DecodeError::InvalidUnionOrdinal(ord as usize)),
13095        }
13096
13097        Ok(())
13098    }
13099}
13100
13101impl ::core::fmt::Debug for WireDirectoryRouterRouteResponse {
13102    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13103        match self.raw.ordinal() {
13104            1 => unsafe {
13105                self.raw
13106                    .get()
13107                    .deref_unchecked::<::fidl_next::ClientEnd<
13108                        ::fidl_next_fuchsia_io::Directory,
13109                        ::fidl_next::fuchsia::WireChannel,
13110                    >>()
13111                    .fmt(f)
13112            },
13113            2 => unsafe { self.raw.get().deref_unchecked::<crate::WireUnit>().fmt(f) },
13114            _ => unsafe { ::core::hint::unreachable_unchecked() },
13115        }
13116    }
13117}
13118
13119#[repr(transparent)]
13120pub struct WireOptionalDirectoryRouterRouteResponse {
13121    raw: ::fidl_next::RawWireUnion,
13122    _phantom: ::core::marker::PhantomData<()>,
13123}
13124
13125unsafe impl ::fidl_next::Wire for WireOptionalDirectoryRouterRouteResponse {
13126    type Decoded<'de> = WireOptionalDirectoryRouterRouteResponse;
13127
13128    #[inline]
13129    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
13130        ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
13131        ::fidl_next::RawWireUnion::zero_padding(raw);
13132    }
13133}
13134
13135impl WireOptionalDirectoryRouterRouteResponse {
13136    pub fn is_some(&self) -> bool {
13137        self.raw.is_some()
13138    }
13139
13140    pub fn is_none(&self) -> bool {
13141        self.raw.is_none()
13142    }
13143
13144    pub fn as_ref(&self) -> Option<&WireDirectoryRouterRouteResponse> {
13145        if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
13146    }
13147
13148    pub fn into_option(self) -> Option<WireDirectoryRouterRouteResponse> {
13149        if self.is_some() {
13150            Some(WireDirectoryRouterRouteResponse {
13151                raw: self.raw,
13152                _phantom: ::core::marker::PhantomData,
13153            })
13154        } else {
13155            None
13156        }
13157    }
13158}
13159
13160unsafe impl<___D> ::fidl_next::Decode<___D> for WireOptionalDirectoryRouterRouteResponse
13161where
13162    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13163    ___D: ::fidl_next::fuchsia::HandleDecoder,
13164{
13165    fn decode(
13166        mut slot: ::fidl_next::Slot<'_, Self>,
13167        decoder: &mut ___D,
13168    ) -> Result<(), ::fidl_next::DecodeError> {
13169        ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
13170        match ::fidl_next::RawWireUnion::encoded_ordinal(raw.as_mut()) {
13171            1 => ::fidl_next::RawWireUnion::decode_as_static::<
13172                ___D,
13173                ::fidl_next::ClientEnd<
13174                    ::fidl_next_fuchsia_io::Directory,
13175                    ::fidl_next::fuchsia::WireChannel,
13176                >,
13177            >(raw, decoder)?,
13178
13179            2 => {
13180                ::fidl_next::RawWireUnion::decode_as_static::<___D, crate::WireUnit>(raw, decoder)?
13181            }
13182
13183            0 => ::fidl_next::RawWireUnion::decode_absent(raw)?,
13184            _ => ::fidl_next::RawWireUnion::decode_unknown_static(raw, decoder)?,
13185        }
13186
13187        Ok(())
13188    }
13189}
13190
13191impl ::core::fmt::Debug for WireOptionalDirectoryRouterRouteResponse {
13192    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
13193        self.as_ref().fmt(f)
13194    }
13195}
13196
13197/// The type corresponding to the DirectoryRouter protocol.
13198#[derive(Debug)]
13199pub struct DirectoryRouter;
13200
13201impl ::fidl_next::Discoverable for DirectoryRouter {
13202    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.DirectoryRouter";
13203}
13204
13205pub mod directory_router {
13206    pub mod prelude {
13207        pub use crate::{
13208            DirectoryRouter, DirectoryRouterClientHandler, DirectoryRouterServerHandler,
13209            directory_router,
13210        };
13211
13212        pub use crate::DirectoryRouterRouteResponse;
13213
13214        pub use crate::RouteRequest;
13215
13216        pub use crate::RouterError;
13217    }
13218
13219    pub struct Route;
13220
13221    impl ::fidl_next::Method for Route {
13222        const ORDINAL: u64 = 7510716014181158689;
13223
13224        type Protocol = crate::DirectoryRouter;
13225
13226        type Request = crate::WireRouteRequest<'static>;
13227
13228        type Response = ::fidl_next::WireFlexibleResult<
13229            'static,
13230            crate::WireDirectoryRouterRouteResponse,
13231            crate::WireRouterError,
13232        >;
13233    }
13234
13235    mod ___detail {
13236
13237        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::DirectoryRouter
13238        where
13239            ___T: ::fidl_next::Transport,
13240        {
13241            type ClientSender = DirectoryRouterClientSender<___T>;
13242            type ServerSender = DirectoryRouterServerSender<___T>;
13243        }
13244
13245        /// The client sender for the `DirectoryRouter` protocol.
13246        #[repr(transparent)]
13247        pub struct DirectoryRouterClientSender<___T: ::fidl_next::Transport> {
13248            #[allow(dead_code)]
13249            sender: ::fidl_next::protocol::ClientSender<___T>,
13250        }
13251
13252        impl<___T> DirectoryRouterClientSender<___T>
13253        where
13254            ___T: ::fidl_next::Transport,
13255        {
13256            pub fn route_with<___R>(
13257                &self,
13258                request: ___R,
13259            ) -> ::fidl_next::TwoWayFuture<'_, super::Route, ___T>
13260            where
13261                ___R: ::fidl_next::Encode<
13262                        <___T as ::fidl_next::Transport>::SendBuffer,
13263                        Encoded = crate::WireRouteRequest<'static>,
13264                    >,
13265            {
13266                ::fidl_next::TwoWayFuture::from_untyped(
13267                    self.sender.send_two_way(7510716014181158689, request),
13268                )
13269            }
13270        }
13271
13272        /// The server sender for the `DirectoryRouter` protocol.
13273        #[repr(transparent)]
13274        pub struct DirectoryRouterServerSender<___T: ::fidl_next::Transport> {
13275            sender: ::fidl_next::protocol::ServerSender<___T>,
13276        }
13277
13278        impl<___T> DirectoryRouterServerSender<___T> where ___T: ::fidl_next::Transport {}
13279    }
13280}
13281
13282/// A client handler for the DirectoryRouter protocol.
13283///
13284/// See [`DirectoryRouter`] for more details.
13285pub trait DirectoryRouterClientHandler<
13286    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
13287    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13288>
13289{
13290    fn on_unknown_interaction(
13291        &mut self,
13292        sender: &::fidl_next::ClientSender<DirectoryRouter, ___T>,
13293        ordinal: u64,
13294    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13295        sender.close();
13296        ::core::future::ready(())
13297    }
13298}
13299
13300impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for DirectoryRouter
13301where
13302    ___H: DirectoryRouterClientHandler<___T> + ::core::marker::Send,
13303    ___T: ::fidl_next::Transport,
13304    <directory_router::Route as ::fidl_next::Method>::Response:
13305        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13306{
13307    async fn on_event(
13308        handler: &mut ___H,
13309        sender: &::fidl_next::ClientSender<Self, ___T>,
13310        ordinal: u64,
13311        buffer: ___T::RecvBuffer,
13312    ) {
13313        match ordinal {
13314            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13315        }
13316    }
13317}
13318
13319/// A server handler for the DirectoryRouter protocol.
13320///
13321/// See [`DirectoryRouter`] for more details.
13322pub trait DirectoryRouterServerHandler<
13323    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
13324    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13325>
13326{
13327    fn route(
13328        &mut self,
13329        sender: &::fidl_next::ServerSender<DirectoryRouter, ___T>,
13330
13331        request: ::fidl_next::Request<directory_router::Route, ___T>,
13332
13333        responder: ::fidl_next::Responder<directory_router::Route>,
13334    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13335
13336    fn on_unknown_interaction(
13337        &mut self,
13338        sender: &::fidl_next::ServerSender<DirectoryRouter, ___T>,
13339        ordinal: u64,
13340    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13341        sender.close();
13342        ::core::future::ready(())
13343    }
13344}
13345
13346impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for DirectoryRouter
13347where
13348    ___H: DirectoryRouterServerHandler<___T> + ::core::marker::Send,
13349    ___T: ::fidl_next::Transport,
13350    <directory_router::Route as ::fidl_next::Method>::Request:
13351        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13352{
13353    async fn on_one_way(
13354        handler: &mut ___H,
13355        sender: &::fidl_next::ServerSender<Self, ___T>,
13356        ordinal: u64,
13357        buffer: ___T::RecvBuffer,
13358    ) {
13359        match ordinal {
13360            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13361        }
13362    }
13363
13364    async fn on_two_way(
13365        handler: &mut ___H,
13366        sender: &::fidl_next::ServerSender<Self, ___T>,
13367        ordinal: u64,
13368        buffer: ___T::RecvBuffer,
13369        responder: ::fidl_next::protocol::Responder,
13370    ) {
13371        match ordinal {
13372            7510716014181158689 => {
13373                let responder = ::fidl_next::Responder::from_untyped(responder);
13374
13375                match ::fidl_next::DecoderExt::decode(buffer) {
13376                    Ok(decoded) => handler.route(sender, decoded, responder).await,
13377                    Err(e) => sender.close(),
13378                }
13379            }
13380
13381            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13382        }
13383    }
13384}
13385
13386#[doc = " Contains a protocol open request.\n"]
13387#[derive(Debug)]
13388#[repr(C)]
13389pub struct ProtocolPayload {
13390    pub channel: ::fidl_next::fuchsia::zx::Channel,
13391}
13392
13393impl ::fidl_next::Encodable for ProtocolPayload {
13394    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireProtocolPayload> = unsafe {
13395        ::fidl_next::CopyOptimization::enable_if(
13396            true
13397                && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::Encodable>::COPY_OPTIMIZATION
13398                    .is_enabled(),
13399        )
13400    };
13401
13402    type Encoded = WireProtocolPayload;
13403}
13404
13405unsafe impl<___E> ::fidl_next::Encode<___E> for ProtocolPayload
13406where
13407    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13408    ___E: ::fidl_next::fuchsia::HandleEncoder,
13409{
13410    #[inline]
13411    fn encode(
13412        self,
13413        encoder: &mut ___E,
13414        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13415    ) -> Result<(), ::fidl_next::EncodeError> {
13416        ::fidl_next::munge! {
13417            let Self::Encoded {
13418                channel,
13419
13420            } = out;
13421        }
13422
13423        ::fidl_next::Encode::encode(self.channel, encoder, channel)?;
13424
13425        Ok(())
13426    }
13427}
13428
13429impl ::fidl_next::EncodableOption for ProtocolPayload {
13430    type EncodedOption = ::fidl_next::WireBox<'static, WireProtocolPayload>;
13431}
13432
13433unsafe impl<___E> ::fidl_next::EncodeOption<___E> for ProtocolPayload
13434where
13435    ___E: ::fidl_next::Encoder + ?Sized,
13436    ProtocolPayload: ::fidl_next::Encode<___E>,
13437{
13438    #[inline]
13439    fn encode_option(
13440        this: Option<Self>,
13441        encoder: &mut ___E,
13442        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13443    ) -> Result<(), ::fidl_next::EncodeError> {
13444        if let Some(inner) = this {
13445            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13446            ::fidl_next::WireBox::encode_present(out);
13447        } else {
13448            ::fidl_next::WireBox::encode_absent(out);
13449        }
13450
13451        Ok(())
13452    }
13453}
13454
13455impl ::fidl_next::FromWire<WireProtocolPayload> for ProtocolPayload {
13456    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireProtocolPayload, Self> = unsafe {
13457        ::fidl_next::CopyOptimization::enable_if(
13458            true && <::fidl_next::fuchsia::zx::Channel as ::fidl_next::FromWire<
13459                ::fidl_next::fuchsia::WireChannel,
13460            >>::COPY_OPTIMIZATION
13461                .is_enabled(),
13462        )
13463    };
13464
13465    #[inline]
13466    fn from_wire(wire: WireProtocolPayload) -> Self {
13467        Self { channel: ::fidl_next::FromWire::from_wire(wire.channel) }
13468    }
13469}
13470
13471/// The wire type corresponding to [`ProtocolPayload`].
13472#[derive(Debug)]
13473#[repr(C)]
13474pub struct WireProtocolPayload {
13475    pub channel: ::fidl_next::fuchsia::WireChannel,
13476}
13477
13478unsafe impl ::fidl_next::Wire for WireProtocolPayload {
13479    type Decoded<'de> = WireProtocolPayload;
13480
13481    #[inline]
13482    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
13483}
13484
13485unsafe impl<___D> ::fidl_next::Decode<___D> for WireProtocolPayload
13486where
13487    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13488    ___D: ::fidl_next::fuchsia::HandleDecoder,
13489{
13490    fn decode(
13491        slot: ::fidl_next::Slot<'_, Self>,
13492        decoder: &mut ___D,
13493    ) -> Result<(), ::fidl_next::DecodeError> {
13494        ::fidl_next::munge! {
13495            let Self {
13496                mut channel,
13497
13498            } = slot;
13499        }
13500
13501        ::fidl_next::Decode::decode(channel.as_mut(), decoder)?;
13502
13503        Ok(())
13504    }
13505}
13506
13507/// The type corresponding to the Receiver protocol.
13508#[doc = " A receiver is served by components and allows them to receive channels\n from the framework.\n"]
13509#[derive(Debug)]
13510pub struct Receiver;
13511
13512impl ::fidl_next::Discoverable for Receiver {
13513    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Receiver";
13514}
13515
13516pub mod receiver {
13517    pub mod prelude {
13518        pub use crate::{Receiver, ReceiverClientHandler, ReceiverServerHandler, receiver};
13519
13520        pub use crate::ProtocolPayload;
13521    }
13522
13523    pub struct Receive;
13524
13525    impl ::fidl_next::Method for Receive {
13526        const ORDINAL: u64 = 340832707723008660;
13527
13528        type Protocol = crate::Receiver;
13529
13530        type Request = crate::WireProtocolPayload;
13531
13532        type Response = ::fidl_next::Never;
13533    }
13534
13535    mod ___detail {
13536
13537        pub struct Receive<T0> {
13538            channel: T0,
13539        }
13540
13541        impl<T0> ::fidl_next::Encodable for Receive<T0>
13542        where
13543            T0: ::fidl_next::Encodable<Encoded = ::fidl_next::fuchsia::WireChannel>,
13544        {
13545            type Encoded = crate::WireProtocolPayload;
13546        }
13547
13548        unsafe impl<___E, T0> ::fidl_next::Encode<___E> for Receive<T0>
13549        where
13550            ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13551            ___E: ::fidl_next::fuchsia::HandleEncoder,
13552            T0: ::fidl_next::Encode<___E, Encoded = ::fidl_next::fuchsia::WireChannel>,
13553        {
13554            #[inline]
13555            fn encode(
13556                self,
13557                encoder: &mut ___E,
13558                out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13559            ) -> Result<(), ::fidl_next::EncodeError> {
13560                ::fidl_next::munge! {
13561                    let Self::Encoded {
13562                        channel,
13563
13564                    } = out;
13565                }
13566
13567                ::fidl_next::Encode::encode(self.channel, encoder, channel)?;
13568
13569                Ok(())
13570            }
13571        }
13572
13573        unsafe impl<___T> ::fidl_next::Protocol<___T> for crate::Receiver
13574        where
13575            ___T: ::fidl_next::Transport,
13576        {
13577            type ClientSender = ReceiverClientSender<___T>;
13578            type ServerSender = ReceiverServerSender<___T>;
13579        }
13580
13581        /// The client sender for the `Receiver` protocol.
13582        #[repr(transparent)]
13583        pub struct ReceiverClientSender<___T: ::fidl_next::Transport> {
13584            #[allow(dead_code)]
13585            sender: ::fidl_next::protocol::ClientSender<___T>,
13586        }
13587
13588        impl<___T> ReceiverClientSender<___T>
13589        where
13590            ___T: ::fidl_next::Transport,
13591        {
13592            #[doc = " Sends a channel to this receiver.\n"]
13593            pub fn receive(
13594                &self,
13595
13596                channel: impl ::fidl_next::Encode<
13597                    <___T as ::fidl_next::Transport>::SendBuffer,
13598                    Encoded = ::fidl_next::fuchsia::WireChannel,
13599                >,
13600            ) -> ::fidl_next::SendFuture<'_, ___T>
13601            where
13602                <___T as ::fidl_next::Transport>::SendBuffer:
13603                    ::fidl_next::encoder::InternalHandleEncoder,
13604                <___T as ::fidl_next::Transport>::SendBuffer: ::fidl_next::fuchsia::HandleEncoder,
13605            {
13606                self.receive_with(Receive { channel })
13607            }
13608
13609            #[doc = " Sends a channel to this receiver.\n"]
13610            pub fn receive_with<___R>(&self, request: ___R) -> ::fidl_next::SendFuture<'_, ___T>
13611            where
13612                ___R: ::fidl_next::Encode<
13613                        <___T as ::fidl_next::Transport>::SendBuffer,
13614                        Encoded = crate::WireProtocolPayload,
13615                    >,
13616            {
13617                ::fidl_next::SendFuture::from_untyped(
13618                    self.sender.send_one_way(340832707723008660, request),
13619                )
13620            }
13621        }
13622
13623        /// The server sender for the `Receiver` protocol.
13624        #[repr(transparent)]
13625        pub struct ReceiverServerSender<___T: ::fidl_next::Transport> {
13626            sender: ::fidl_next::protocol::ServerSender<___T>,
13627        }
13628
13629        impl<___T> ReceiverServerSender<___T> where ___T: ::fidl_next::Transport {}
13630    }
13631}
13632
13633/// A client handler for the Receiver protocol.
13634///
13635/// See [`Receiver`] for more details.
13636pub trait ReceiverClientHandler<
13637    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
13638    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13639>
13640{
13641    fn on_unknown_interaction(
13642        &mut self,
13643        sender: &::fidl_next::ClientSender<Receiver, ___T>,
13644        ordinal: u64,
13645    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13646        sender.close();
13647        ::core::future::ready(())
13648    }
13649}
13650
13651impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Receiver
13652where
13653    ___H: ReceiverClientHandler<___T> + ::core::marker::Send,
13654    ___T: ::fidl_next::Transport,
13655{
13656    async fn on_event(
13657        handler: &mut ___H,
13658        sender: &::fidl_next::ClientSender<Self, ___T>,
13659        ordinal: u64,
13660        buffer: ___T::RecvBuffer,
13661    ) {
13662        match ordinal {
13663            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13664        }
13665    }
13666}
13667
13668/// A server handler for the Receiver protocol.
13669///
13670/// See [`Receiver`] for more details.
13671pub trait ReceiverServerHandler<
13672    #[cfg(not(feature = "fuchsia"))] ___T: ::fidl_next::Transport,
13673    #[cfg(feature = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
13674>
13675{
13676    #[doc = " Sends a channel to this receiver.\n"]
13677    fn receive(
13678        &mut self,
13679        sender: &::fidl_next::ServerSender<Receiver, ___T>,
13680
13681        request: ::fidl_next::Request<receiver::Receive, ___T>,
13682    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send;
13683
13684    fn on_unknown_interaction(
13685        &mut self,
13686        sender: &::fidl_next::ServerSender<Receiver, ___T>,
13687        ordinal: u64,
13688    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
13689        sender.close();
13690        ::core::future::ready(())
13691    }
13692}
13693
13694impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Receiver
13695where
13696    ___H: ReceiverServerHandler<___T> + ::core::marker::Send,
13697    ___T: ::fidl_next::Transport,
13698    <receiver::Receive as ::fidl_next::Method>::Request:
13699        ::fidl_next::Decode<<___T as ::fidl_next::Transport>::RecvBuffer>,
13700{
13701    async fn on_one_way(
13702        handler: &mut ___H,
13703        sender: &::fidl_next::ServerSender<Self, ___T>,
13704        ordinal: u64,
13705        buffer: ___T::RecvBuffer,
13706    ) {
13707        match ordinal {
13708            340832707723008660 => match ::fidl_next::DecoderExt::decode(buffer) {
13709                Ok(decoded) => handler.receive(sender, decoded).await,
13710                Err(e) => sender.close(),
13711            },
13712
13713            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13714        }
13715    }
13716
13717    async fn on_two_way(
13718        handler: &mut ___H,
13719        sender: &::fidl_next::ServerSender<Self, ___T>,
13720        ordinal: u64,
13721        buffer: ___T::RecvBuffer,
13722        responder: ::fidl_next::protocol::Responder,
13723    ) {
13724        match ordinal {
13725            ordinal => handler.on_unknown_interaction(sender, ordinal).await,
13726        }
13727    }
13728}
13729
13730#[derive(Clone, Debug)]
13731#[repr(C)]
13732pub struct Unavailable {}
13733
13734impl ::fidl_next::Encodable for Unavailable {
13735    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<Self, WireUnavailable> =
13736        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
13737
13738    type Encoded = WireUnavailable;
13739}
13740
13741unsafe impl<___E> ::fidl_next::Encode<___E> for Unavailable
13742where
13743    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13744{
13745    #[inline]
13746    fn encode(
13747        self,
13748        encoder: &mut ___E,
13749        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13750    ) -> Result<(), ::fidl_next::EncodeError> {
13751        ::fidl_next::munge! {
13752            let Self::Encoded {
13753
13754            } = out;
13755        }
13756
13757        Ok(())
13758    }
13759}
13760
13761unsafe impl<___E> ::fidl_next::EncodeRef<___E> for Unavailable
13762where
13763    ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
13764{
13765    #[inline]
13766    fn encode_ref(
13767        &self,
13768        encoder: &mut ___E,
13769        out: &mut ::core::mem::MaybeUninit<Self::Encoded>,
13770    ) -> Result<(), ::fidl_next::EncodeError> {
13771        ::fidl_next::munge! {
13772            let Self::Encoded {
13773
13774            } = out;
13775        }
13776
13777        Ok(())
13778    }
13779}
13780
13781impl ::fidl_next::EncodableOption for Unavailable {
13782    type EncodedOption = ::fidl_next::WireBox<'static, WireUnavailable>;
13783}
13784
13785unsafe impl<___E> ::fidl_next::EncodeOption<___E> for Unavailable
13786where
13787    ___E: ::fidl_next::Encoder + ?Sized,
13788    Unavailable: ::fidl_next::Encode<___E>,
13789{
13790    #[inline]
13791    fn encode_option(
13792        this: Option<Self>,
13793        encoder: &mut ___E,
13794        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13795    ) -> Result<(), ::fidl_next::EncodeError> {
13796        if let Some(inner) = this {
13797            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13798            ::fidl_next::WireBox::encode_present(out);
13799        } else {
13800            ::fidl_next::WireBox::encode_absent(out);
13801        }
13802
13803        Ok(())
13804    }
13805}
13806
13807unsafe impl<___E> ::fidl_next::EncodeOptionRef<___E> for Unavailable
13808where
13809    ___E: ::fidl_next::Encoder + ?Sized,
13810    Unavailable: ::fidl_next::EncodeRef<___E>,
13811{
13812    #[inline]
13813    fn encode_option_ref(
13814        this: Option<&Self>,
13815        encoder: &mut ___E,
13816        out: &mut ::core::mem::MaybeUninit<Self::EncodedOption>,
13817    ) -> Result<(), ::fidl_next::EncodeError> {
13818        if let Some(inner) = this {
13819            ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
13820            ::fidl_next::WireBox::encode_present(out);
13821        } else {
13822            ::fidl_next::WireBox::encode_absent(out);
13823        }
13824
13825        Ok(())
13826    }
13827}
13828
13829impl ::fidl_next::FromWire<WireUnavailable> for Unavailable {
13830    const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<WireUnavailable, Self> =
13831        unsafe { ::fidl_next::CopyOptimization::enable_if(true) };
13832
13833    #[inline]
13834    fn from_wire(wire: WireUnavailable) -> Self {
13835        Self {}
13836    }
13837}
13838
13839impl ::fidl_next::FromWireRef<WireUnavailable> for Unavailable {
13840    #[inline]
13841    fn from_wire_ref(wire: &WireUnavailable) -> Self {
13842        Self {}
13843    }
13844}
13845
13846/// The wire type corresponding to [`Unavailable`].
13847#[derive(Clone, Debug)]
13848#[repr(C)]
13849pub struct WireUnavailable {}
13850
13851unsafe impl ::fidl_next::Wire for WireUnavailable {
13852    type Decoded<'de> = WireUnavailable;
13853
13854    #[inline]
13855    fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {}
13856}
13857
13858unsafe impl<___D> ::fidl_next::Decode<___D> for WireUnavailable
13859where
13860    ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
13861{
13862    fn decode(
13863        slot: ::fidl_next::Slot<'_, Self>,
13864        decoder: &mut ___D,
13865    ) -> Result<(), ::fidl_next::DecodeError> {
13866        ::fidl_next::munge! {
13867            let Self {
13868
13869            } = slot;
13870        }
13871
13872        Ok(())
13873    }
13874}
13875
13876/// Compatibility shims which mimic some API surfaces of the current Rust bindings.
13877pub mod compat {
13878
13879    impl ::fidl_next::CompatFrom<crate::Availability>
13880        for ::fidl_fuchsia_component_sandbox::Availability
13881    {
13882        fn compat_from(value: crate::Availability) -> Self {
13883            match value {
13884                crate::Availability::Required => Self::Required,
13885
13886                crate::Availability::Optional => Self::Optional,
13887
13888                crate::Availability::SameAsTarget => Self::SameAsTarget,
13889
13890                crate::Availability::Transitional => Self::Transitional,
13891            }
13892        }
13893    }
13894
13895    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Availability>
13896        for crate::Availability
13897    {
13898        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Availability) -> Self {
13899            match value {
13900                ::fidl_fuchsia_component_sandbox::Availability::Required => Self::Required,
13901
13902                ::fidl_fuchsia_component_sandbox::Availability::Optional => Self::Optional,
13903
13904                ::fidl_fuchsia_component_sandbox::Availability::SameAsTarget => Self::SameAsTarget,
13905
13906                ::fidl_fuchsia_component_sandbox::Availability::Transitional => Self::Transitional,
13907            }
13908        }
13909    }
13910
13911    impl ::fidl_next::CompatFrom<crate::Unit> for ::fidl_fuchsia_component_sandbox::Unit {
13912        #[inline]
13913        fn compat_from(value: crate::Unit) -> Self {
13914            Self {}
13915        }
13916    }
13917
13918    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Unit> for crate::Unit {
13919        #[inline]
13920        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Unit) -> Self {
13921            Self {}
13922        }
13923    }
13924
13925    impl ::fidl_next::CompatFrom<crate::Data> for ::fidl_fuchsia_component_sandbox::Data {
13926        fn compat_from(value: crate::Data) -> Self {
13927            match value {
13928                crate::Data::Bytes(value) => {
13929                    Self::Bytes(::fidl_next::CompatFrom::compat_from(value))
13930                }
13931
13932                crate::Data::String(value) => {
13933                    Self::String(::fidl_next::CompatFrom::compat_from(value))
13934                }
13935
13936                crate::Data::Int64(value) => {
13937                    Self::Int64(::fidl_next::CompatFrom::compat_from(value))
13938                }
13939
13940                crate::Data::Uint64(value) => {
13941                    Self::Uint64(::fidl_next::CompatFrom::compat_from(value))
13942                }
13943
13944                crate::Data::UnknownOrdinal_(unknown_ordinal) => {
13945                    Self::__SourceBreaking { unknown_ordinal }
13946                }
13947            }
13948        }
13949    }
13950
13951    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Data> for crate::Data {
13952        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Data) -> Self {
13953            match value {
13954                ::fidl_fuchsia_component_sandbox::Data::Bytes(value) => {
13955                    Self::Bytes(::fidl_next::CompatFrom::compat_from(value))
13956                }
13957
13958                ::fidl_fuchsia_component_sandbox::Data::String(value) => {
13959                    Self::String(::fidl_next::CompatFrom::compat_from(value))
13960                }
13961
13962                ::fidl_fuchsia_component_sandbox::Data::Int64(value) => {
13963                    Self::Int64(::fidl_next::CompatFrom::compat_from(value))
13964                }
13965
13966                ::fidl_fuchsia_component_sandbox::Data::Uint64(value) => {
13967                    Self::Uint64(::fidl_next::CompatFrom::compat_from(value))
13968                }
13969
13970                ::fidl_fuchsia_component_sandbox::Data::__SourceBreaking { unknown_ordinal } => {
13971                    Self::UnknownOrdinal_(unknown_ordinal)
13972                }
13973            }
13974        }
13975    }
13976
13977    impl ::fidl_next::CompatFrom<crate::DictionaryRef>
13978        for ::fidl_fuchsia_component_sandbox::DictionaryRef
13979    {
13980        #[inline]
13981        fn compat_from(value: crate::DictionaryRef) -> Self {
13982            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
13983        }
13984    }
13985
13986    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryRef>
13987        for crate::DictionaryRef
13988    {
13989        #[inline]
13990        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DictionaryRef) -> Self {
13991            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
13992        }
13993    }
13994
13995    impl ::fidl_next::CompatFrom<crate::Connector> for ::fidl_fuchsia_component_sandbox::Connector {
13996        #[inline]
13997        fn compat_from(value: crate::Connector) -> Self {
13998            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
13999        }
14000    }
14001
14002    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Connector> for crate::Connector {
14003        #[inline]
14004        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Connector) -> Self {
14005            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14006        }
14007    }
14008
14009    impl ::fidl_next::CompatFrom<crate::DirConnector>
14010        for ::fidl_fuchsia_component_sandbox::DirConnector
14011    {
14012        #[inline]
14013        fn compat_from(value: crate::DirConnector) -> Self {
14014            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14015        }
14016    }
14017
14018    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirConnector>
14019        for crate::DirConnector
14020    {
14021        #[inline]
14022        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DirConnector) -> Self {
14023            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14024        }
14025    }
14026
14027    impl ::fidl_next::CompatFrom<crate::DirEntry> for ::fidl_fuchsia_component_sandbox::DirEntry {
14028        #[inline]
14029        fn compat_from(value: crate::DirEntry) -> Self {
14030            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14031        }
14032    }
14033
14034    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirEntry> for crate::DirEntry {
14035        #[inline]
14036        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DirEntry) -> Self {
14037            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14038        }
14039    }
14040
14041    impl ::fidl_next::CompatFrom<crate::Capability> for ::fidl_fuchsia_component_sandbox::Capability {
14042        fn compat_from(value: crate::Capability) -> Self {
14043            match value {
14044                crate::Capability::Unit(value) => {
14045                    Self::Unit(::fidl_next::CompatFrom::compat_from(value))
14046                }
14047
14048                crate::Capability::Handle(value) => {
14049                    Self::Handle(::fidl_next::CompatFrom::compat_from(value))
14050                }
14051
14052                crate::Capability::Data(value) => {
14053                    Self::Data(::fidl_next::CompatFrom::compat_from(value))
14054                }
14055
14056                crate::Capability::Dictionary(value) => {
14057                    Self::Dictionary(::fidl_next::CompatFrom::compat_from(value))
14058                }
14059
14060                crate::Capability::Connector(value) => {
14061                    Self::Connector(::fidl_next::CompatFrom::compat_from(value))
14062                }
14063
14064                crate::Capability::DirConnector(value) => {
14065                    Self::DirConnector(::fidl_next::CompatFrom::compat_from(value))
14066                }
14067
14068                crate::Capability::Directory(value) => {
14069                    Self::Directory(::fidl_next::CompatFrom::compat_from(value))
14070                }
14071
14072                crate::Capability::DirEntry(value) => {
14073                    Self::DirEntry(::fidl_next::CompatFrom::compat_from(value))
14074                }
14075
14076                crate::Capability::ConnectorRouter(value) => {
14077                    Self::ConnectorRouter(::fidl_next::CompatFrom::compat_from(value))
14078                }
14079
14080                crate::Capability::DictionaryRouter(value) => {
14081                    Self::DictionaryRouter(::fidl_next::CompatFrom::compat_from(value))
14082                }
14083
14084                crate::Capability::DirEntryRouter(value) => {
14085                    Self::DirEntryRouter(::fidl_next::CompatFrom::compat_from(value))
14086                }
14087
14088                crate::Capability::DataRouter(value) => {
14089                    Self::DataRouter(::fidl_next::CompatFrom::compat_from(value))
14090                }
14091
14092                crate::Capability::DirConnectorRouter(value) => {
14093                    Self::DirConnectorRouter(::fidl_next::CompatFrom::compat_from(value))
14094                }
14095
14096                crate::Capability::UnknownOrdinal_(unknown_ordinal) => {
14097                    Self::__SourceBreaking { unknown_ordinal }
14098                }
14099            }
14100        }
14101    }
14102
14103    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Capability> for crate::Capability {
14104        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Capability) -> Self {
14105            match value {
14106                ::fidl_fuchsia_component_sandbox::Capability::Unit(value) => {
14107                    Self::Unit(::fidl_next::CompatFrom::compat_from(value))
14108                }
14109
14110                ::fidl_fuchsia_component_sandbox::Capability::Handle(value) => {
14111                    Self::Handle(::fidl_next::CompatFrom::compat_from(value))
14112                }
14113
14114                ::fidl_fuchsia_component_sandbox::Capability::Data(value) => {
14115                    Self::Data(::fidl_next::CompatFrom::compat_from(value))
14116                }
14117
14118                ::fidl_fuchsia_component_sandbox::Capability::Dictionary(value) => {
14119                    Self::Dictionary(::fidl_next::CompatFrom::compat_from(value))
14120                }
14121
14122                ::fidl_fuchsia_component_sandbox::Capability::Connector(value) => {
14123                    Self::Connector(::fidl_next::CompatFrom::compat_from(value))
14124                }
14125
14126                ::fidl_fuchsia_component_sandbox::Capability::DirConnector(value) => {
14127                    Self::DirConnector(::fidl_next::CompatFrom::compat_from(value))
14128                }
14129
14130                ::fidl_fuchsia_component_sandbox::Capability::Directory(value) => {
14131                    Self::Directory(::fidl_next::CompatFrom::compat_from(value))
14132                }
14133
14134                ::fidl_fuchsia_component_sandbox::Capability::DirEntry(value) => {
14135                    Self::DirEntry(::fidl_next::CompatFrom::compat_from(value))
14136                }
14137
14138                ::fidl_fuchsia_component_sandbox::Capability::ConnectorRouter(value) => {
14139                    Self::ConnectorRouter(::fidl_next::CompatFrom::compat_from(value))
14140                }
14141
14142                ::fidl_fuchsia_component_sandbox::Capability::DictionaryRouter(value) => {
14143                    Self::DictionaryRouter(::fidl_next::CompatFrom::compat_from(value))
14144                }
14145
14146                ::fidl_fuchsia_component_sandbox::Capability::DirEntryRouter(value) => {
14147                    Self::DirEntryRouter(::fidl_next::CompatFrom::compat_from(value))
14148                }
14149
14150                ::fidl_fuchsia_component_sandbox::Capability::DataRouter(value) => {
14151                    Self::DataRouter(::fidl_next::CompatFrom::compat_from(value))
14152                }
14153
14154                ::fidl_fuchsia_component_sandbox::Capability::DirConnectorRouter(value) => {
14155                    Self::DirConnectorRouter(::fidl_next::CompatFrom::compat_from(value))
14156                }
14157
14158                ::fidl_fuchsia_component_sandbox::Capability::__SourceBreaking {
14159                    unknown_ordinal,
14160                } => Self::UnknownOrdinal_(unknown_ordinal),
14161            }
14162        }
14163    }
14164
14165    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDuplicateRequest>
14166        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDuplicateRequest
14167    {
14168        #[inline]
14169        fn compat_from(value: crate::CapabilityStoreDuplicateRequest) -> Self {
14170            Self {
14171                id: ::fidl_next::CompatFrom::compat_from(value.id),
14172
14173                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14174            }
14175        }
14176    }
14177
14178    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreDuplicateRequest>
14179        for crate::CapabilityStoreDuplicateRequest
14180    {
14181        #[inline]
14182        fn compat_from(
14183            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDuplicateRequest,
14184        ) -> Self {
14185            Self {
14186                id: ::fidl_next::CompatFrom::compat_from(value.id),
14187
14188                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14189            }
14190        }
14191    }
14192
14193    impl ::fidl_next::CompatFrom<crate::CapabilityStoreError>
14194        for ::fidl_fuchsia_component_sandbox::CapabilityStoreError
14195    {
14196        fn compat_from(value: crate::CapabilityStoreError) -> Self {
14197            match value {
14198                crate::CapabilityStoreError::IdNotFound => Self::IdNotFound,
14199
14200                crate::CapabilityStoreError::IdAlreadyExists => Self::IdAlreadyExists,
14201
14202                crate::CapabilityStoreError::BadCapability => Self::BadCapability,
14203
14204                crate::CapabilityStoreError::WrongType => Self::WrongType,
14205
14206                crate::CapabilityStoreError::NotDuplicatable => Self::NotDuplicatable,
14207
14208                crate::CapabilityStoreError::ItemNotFound => Self::ItemNotFound,
14209
14210                crate::CapabilityStoreError::ItemAlreadyExists => Self::ItemAlreadyExists,
14211
14212                crate::CapabilityStoreError::InvalidKey => Self::InvalidKey,
14213
14214                crate::CapabilityStoreError::InvalidArgs => Self::InvalidArgs,
14215
14216                crate::CapabilityStoreError::UnknownOrdinal_(unknown_ordinal) => {
14217                    Self::__SourceBreaking { unknown_ordinal }
14218                }
14219            }
14220        }
14221    }
14222
14223    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreError>
14224        for crate::CapabilityStoreError
14225    {
14226        fn compat_from(value: ::fidl_fuchsia_component_sandbox::CapabilityStoreError) -> Self {
14227            match value {
14228                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::IdNotFound => {
14229                    Self::IdNotFound
14230                }
14231
14232                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::IdAlreadyExists => {
14233                    Self::IdAlreadyExists
14234                }
14235
14236                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::BadCapability => {
14237                    Self::BadCapability
14238                }
14239
14240                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::WrongType => {
14241                    Self::WrongType
14242                }
14243
14244                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::NotDuplicatable => {
14245                    Self::NotDuplicatable
14246                }
14247
14248                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::ItemNotFound => {
14249                    Self::ItemNotFound
14250                }
14251
14252                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::ItemAlreadyExists => {
14253                    Self::ItemAlreadyExists
14254                }
14255
14256                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::InvalidKey => {
14257                    Self::InvalidKey
14258                }
14259
14260                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::InvalidArgs => {
14261                    Self::InvalidArgs
14262                }
14263
14264                ::fidl_fuchsia_component_sandbox::CapabilityStoreError::__SourceBreaking {
14265                    unknown_ordinal: value,
14266                } => Self::UnknownOrdinal_(value),
14267            }
14268        }
14269    }
14270
14271    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDropRequest>
14272        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDropRequest
14273    {
14274        #[inline]
14275        fn compat_from(value: crate::CapabilityStoreDropRequest) -> Self {
14276            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14277        }
14278    }
14279
14280    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreDropRequest>
14281        for crate::CapabilityStoreDropRequest
14282    {
14283        #[inline]
14284        fn compat_from(
14285            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDropRequest,
14286        ) -> Self {
14287            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14288        }
14289    }
14290
14291    impl ::fidl_next::CompatFrom<crate::CapabilityStoreExportRequest>
14292        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportRequest
14293    {
14294        #[inline]
14295        fn compat_from(value: crate::CapabilityStoreExportRequest) -> Self {
14296            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14297        }
14298    }
14299
14300    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreExportRequest>
14301        for crate::CapabilityStoreExportRequest
14302    {
14303        #[inline]
14304        fn compat_from(
14305            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreExportRequest,
14306        ) -> Self {
14307            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14308        }
14309    }
14310
14311    impl ::fidl_next::CompatFrom<crate::CapabilityStoreConnectorCreateRequest>
14312        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorCreateRequest
14313    {
14314        #[inline]
14315        fn compat_from(value: crate::CapabilityStoreConnectorCreateRequest) -> Self {
14316            Self {
14317                id: ::fidl_next::CompatFrom::compat_from(value.id),
14318
14319                receiver: ::fidl_next::CompatFrom::compat_from(value.receiver),
14320            }
14321        }
14322    }
14323
14324    impl
14325        ::fidl_next::CompatFrom<
14326            ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorCreateRequest,
14327        > for crate::CapabilityStoreConnectorCreateRequest
14328    {
14329        #[inline]
14330        fn compat_from(
14331            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorCreateRequest,
14332        ) -> Self {
14333            Self {
14334                id: ::fidl_next::CompatFrom::compat_from(value.id),
14335
14336                receiver: ::fidl_next::CompatFrom::compat_from(value.receiver),
14337            }
14338        }
14339    }
14340
14341    impl ::fidl_next::CompatFrom<crate::CapabilityStoreConnectorOpenRequest>
14342        for ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorOpenRequest
14343    {
14344        #[inline]
14345        fn compat_from(value: crate::CapabilityStoreConnectorOpenRequest) -> Self {
14346            Self {
14347                id: ::fidl_next::CompatFrom::compat_from(value.id),
14348
14349                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14350            }
14351        }
14352    }
14353
14354    impl
14355        ::fidl_next::CompatFrom<
14356            ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorOpenRequest,
14357        > for crate::CapabilityStoreConnectorOpenRequest
14358    {
14359        #[inline]
14360        fn compat_from(
14361            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreConnectorOpenRequest,
14362        ) -> Self {
14363            Self {
14364                id: ::fidl_next::CompatFrom::compat_from(value.id),
14365
14366                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14367            }
14368        }
14369    }
14370
14371    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryCreateRequest>
14372        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCreateRequest
14373    {
14374        #[inline]
14375        fn compat_from(value: crate::CapabilityStoreDictionaryCreateRequest) -> Self {
14376            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14377        }
14378    }
14379
14380    impl
14381        ::fidl_next::CompatFrom<
14382            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCreateRequest,
14383        > for crate::CapabilityStoreDictionaryCreateRequest
14384    {
14385        #[inline]
14386        fn compat_from(
14387            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCreateRequest,
14388        ) -> Self {
14389            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14390        }
14391    }
14392
14393    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryLegacyImportRequest>
14394        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyImportRequest
14395    {
14396        #[inline]
14397        fn compat_from(value: crate::CapabilityStoreDictionaryLegacyImportRequest) -> Self {
14398            Self {
14399                id: ::fidl_next::CompatFrom::compat_from(value.id),
14400
14401                client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
14402            }
14403        }
14404    }
14405
14406    impl
14407        ::fidl_next::CompatFrom<
14408            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyImportRequest,
14409        > for crate::CapabilityStoreDictionaryLegacyImportRequest
14410    {
14411        #[inline]
14412        fn compat_from(
14413            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyImportRequest,
14414        ) -> Self {
14415            Self {
14416                id: ::fidl_next::CompatFrom::compat_from(value.id),
14417
14418                client_end: ::fidl_next::CompatFrom::compat_from(value.client_end),
14419            }
14420        }
14421    }
14422
14423    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryLegacyExportRequest>
14424        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyExportRequest
14425    {
14426        #[inline]
14427        fn compat_from(value: crate::CapabilityStoreDictionaryLegacyExportRequest) -> Self {
14428            Self {
14429                id: ::fidl_next::CompatFrom::compat_from(value.id),
14430
14431                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14432            }
14433        }
14434    }
14435
14436    impl
14437        ::fidl_next::CompatFrom<
14438            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyExportRequest,
14439        > for crate::CapabilityStoreDictionaryLegacyExportRequest
14440    {
14441        #[inline]
14442        fn compat_from(
14443            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryLegacyExportRequest,
14444        ) -> Self {
14445            Self {
14446                id: ::fidl_next::CompatFrom::compat_from(value.id),
14447
14448                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14449            }
14450        }
14451    }
14452
14453    impl ::fidl_next::CompatFrom<crate::DictionaryItem>
14454        for ::fidl_fuchsia_component_sandbox::DictionaryItem
14455    {
14456        #[inline]
14457        fn compat_from(value: crate::DictionaryItem) -> Self {
14458            Self {
14459                key: ::fidl_next::CompatFrom::compat_from(value.key),
14460
14461                value: ::fidl_next::CompatFrom::compat_from(value.value),
14462            }
14463        }
14464    }
14465
14466    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryItem>
14467        for crate::DictionaryItem
14468    {
14469        #[inline]
14470        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DictionaryItem) -> Self {
14471            Self {
14472                key: ::fidl_next::CompatFrom::compat_from(value.key),
14473
14474                value: ::fidl_next::CompatFrom::compat_from(value.value),
14475            }
14476        }
14477    }
14478
14479    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryInsertRequest>
14480        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryInsertRequest
14481    {
14482        #[inline]
14483        fn compat_from(value: crate::CapabilityStoreDictionaryInsertRequest) -> Self {
14484            Self {
14485                id: ::fidl_next::CompatFrom::compat_from(value.id),
14486
14487                item: ::fidl_next::CompatFrom::compat_from(value.item),
14488            }
14489        }
14490    }
14491
14492    impl
14493        ::fidl_next::CompatFrom<
14494            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryInsertRequest,
14495        > for crate::CapabilityStoreDictionaryInsertRequest
14496    {
14497        #[inline]
14498        fn compat_from(
14499            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryInsertRequest,
14500        ) -> Self {
14501            Self {
14502                id: ::fidl_next::CompatFrom::compat_from(value.id),
14503
14504                item: ::fidl_next::CompatFrom::compat_from(value.item),
14505            }
14506        }
14507    }
14508
14509    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryGetRequest>
14510        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryGetRequest
14511    {
14512        #[inline]
14513        fn compat_from(value: crate::CapabilityStoreDictionaryGetRequest) -> Self {
14514            Self {
14515                id: ::fidl_next::CompatFrom::compat_from(value.id),
14516
14517                key: ::fidl_next::CompatFrom::compat_from(value.key),
14518
14519                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14520            }
14521        }
14522    }
14523
14524    impl
14525        ::fidl_next::CompatFrom<
14526            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryGetRequest,
14527        > for crate::CapabilityStoreDictionaryGetRequest
14528    {
14529        #[inline]
14530        fn compat_from(
14531            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryGetRequest,
14532        ) -> Self {
14533            Self {
14534                id: ::fidl_next::CompatFrom::compat_from(value.id),
14535
14536                key: ::fidl_next::CompatFrom::compat_from(value.key),
14537
14538                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14539            }
14540        }
14541    }
14542
14543    impl ::fidl_next::CompatFrom<crate::WrappedCapabilityId>
14544        for ::fidl_fuchsia_component_sandbox::WrappedCapabilityId
14545    {
14546        #[inline]
14547        fn compat_from(value: crate::WrappedCapabilityId) -> Self {
14548            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14549        }
14550    }
14551
14552    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::WrappedCapabilityId>
14553        for crate::WrappedCapabilityId
14554    {
14555        #[inline]
14556        fn compat_from(value: ::fidl_fuchsia_component_sandbox::WrappedCapabilityId) -> Self {
14557            Self { id: ::fidl_next::CompatFrom::compat_from(value.id) }
14558        }
14559    }
14560
14561    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryRemoveRequest>
14562        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryRemoveRequest
14563    {
14564        #[inline]
14565        fn compat_from(value: crate::CapabilityStoreDictionaryRemoveRequest) -> Self {
14566            Self {
14567                id: ::fidl_next::CompatFrom::compat_from(value.id),
14568
14569                key: ::fidl_next::CompatFrom::compat_from(value.key),
14570
14571                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14572            }
14573        }
14574    }
14575
14576    impl
14577        ::fidl_next::CompatFrom<
14578            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryRemoveRequest,
14579        > for crate::CapabilityStoreDictionaryRemoveRequest
14580    {
14581        #[inline]
14582        fn compat_from(
14583            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryRemoveRequest,
14584        ) -> Self {
14585            Self {
14586                id: ::fidl_next::CompatFrom::compat_from(value.id),
14587
14588                key: ::fidl_next::CompatFrom::compat_from(value.key),
14589
14590                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14591            }
14592        }
14593    }
14594
14595    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryCopyRequest>
14596        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCopyRequest
14597    {
14598        #[inline]
14599        fn compat_from(value: crate::CapabilityStoreDictionaryCopyRequest) -> Self {
14600            Self {
14601                id: ::fidl_next::CompatFrom::compat_from(value.id),
14602
14603                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14604            }
14605        }
14606    }
14607
14608    impl
14609        ::fidl_next::CompatFrom<
14610            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCopyRequest,
14611        > for crate::CapabilityStoreDictionaryCopyRequest
14612    {
14613        #[inline]
14614        fn compat_from(
14615            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryCopyRequest,
14616        ) -> Self {
14617            Self {
14618                id: ::fidl_next::CompatFrom::compat_from(value.id),
14619
14620                dest_id: ::fidl_next::CompatFrom::compat_from(value.dest_id),
14621            }
14622        }
14623    }
14624
14625    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryKeysRequest>
14626        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryKeysRequest
14627    {
14628        #[inline]
14629        fn compat_from(value: crate::CapabilityStoreDictionaryKeysRequest) -> Self {
14630            Self {
14631                id: ::fidl_next::CompatFrom::compat_from(value.id),
14632
14633                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14634            }
14635        }
14636    }
14637
14638    impl
14639        ::fidl_next::CompatFrom<
14640            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryKeysRequest,
14641        > for crate::CapabilityStoreDictionaryKeysRequest
14642    {
14643        #[inline]
14644        fn compat_from(
14645            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryKeysRequest,
14646        ) -> Self {
14647            Self {
14648                id: ::fidl_next::CompatFrom::compat_from(value.id),
14649
14650                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14651            }
14652        }
14653    }
14654
14655    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryEnumerateRequest>
14656        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryEnumerateRequest
14657    {
14658        #[inline]
14659        fn compat_from(value: crate::CapabilityStoreDictionaryEnumerateRequest) -> Self {
14660            Self {
14661                id: ::fidl_next::CompatFrom::compat_from(value.id),
14662
14663                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14664            }
14665        }
14666    }
14667
14668    impl
14669        ::fidl_next::CompatFrom<
14670            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryEnumerateRequest,
14671        > for crate::CapabilityStoreDictionaryEnumerateRequest
14672    {
14673        #[inline]
14674        fn compat_from(
14675            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryEnumerateRequest,
14676        ) -> Self {
14677            Self {
14678                id: ::fidl_next::CompatFrom::compat_from(value.id),
14679
14680                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14681            }
14682        }
14683    }
14684
14685    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDictionaryDrainRequest>
14686        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryDrainRequest
14687    {
14688        #[inline]
14689        fn compat_from(value: crate::CapabilityStoreDictionaryDrainRequest) -> Self {
14690            Self {
14691                id: ::fidl_next::CompatFrom::compat_from(value.id),
14692
14693                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14694            }
14695        }
14696    }
14697
14698    impl
14699        ::fidl_next::CompatFrom<
14700            ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryDrainRequest,
14701        > for crate::CapabilityStoreDictionaryDrainRequest
14702    {
14703        #[inline]
14704        fn compat_from(
14705            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDictionaryDrainRequest,
14706        ) -> Self {
14707            Self {
14708                id: ::fidl_next::CompatFrom::compat_from(value.id),
14709
14710                iterator: ::fidl_next::CompatFrom::compat_from(value.iterator),
14711            }
14712        }
14713    }
14714
14715    impl ::fidl_next::CompatFrom<crate::CapabilityStoreExportResponse>
14716        for ::fidl_fuchsia_component_sandbox::CapabilityStoreExportResponse
14717    {
14718        #[inline]
14719        fn compat_from(value: crate::CapabilityStoreExportResponse) -> Self {
14720            Self { capability: ::fidl_next::CompatFrom::compat_from(value.capability) }
14721        }
14722    }
14723
14724    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreExportResponse>
14725        for crate::CapabilityStoreExportResponse
14726    {
14727        #[inline]
14728        fn compat_from(
14729            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreExportResponse,
14730        ) -> Self {
14731            Self { capability: ::fidl_next::CompatFrom::compat_from(value.capability) }
14732        }
14733    }
14734
14735    impl ::fidl_next::CompatFrom<crate::CapabilityStoreImportRequest>
14736        for ::fidl_fuchsia_component_sandbox::CapabilityStoreImportRequest
14737    {
14738        #[inline]
14739        fn compat_from(value: crate::CapabilityStoreImportRequest) -> Self {
14740            Self {
14741                id: ::fidl_next::CompatFrom::compat_from(value.id),
14742
14743                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
14744            }
14745        }
14746    }
14747
14748    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreImportRequest>
14749        for crate::CapabilityStoreImportRequest
14750    {
14751        #[inline]
14752        fn compat_from(
14753            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreImportRequest,
14754        ) -> Self {
14755            Self {
14756                id: ::fidl_next::CompatFrom::compat_from(value.id),
14757
14758                capability: ::fidl_next::CompatFrom::compat_from(value.capability),
14759            }
14760        }
14761    }
14762
14763    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDirConnectorCreateRequest>
14764        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorCreateRequest
14765    {
14766        #[inline]
14767        fn compat_from(value: crate::CapabilityStoreDirConnectorCreateRequest) -> Self {
14768            Self {
14769                id: ::fidl_next::CompatFrom::compat_from(value.id),
14770
14771                receiver: ::fidl_next::CompatFrom::compat_from(value.receiver),
14772            }
14773        }
14774    }
14775
14776    impl
14777        ::fidl_next::CompatFrom<
14778            ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorCreateRequest,
14779        > for crate::CapabilityStoreDirConnectorCreateRequest
14780    {
14781        #[inline]
14782        fn compat_from(
14783            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorCreateRequest,
14784        ) -> Self {
14785            Self {
14786                id: ::fidl_next::CompatFrom::compat_from(value.id),
14787
14788                receiver: ::fidl_next::CompatFrom::compat_from(value.receiver),
14789            }
14790        }
14791    }
14792
14793    impl ::fidl_next::CompatFrom<crate::CapabilityStoreDirConnectorOpenRequest>
14794        for ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorOpenRequest
14795    {
14796        #[inline]
14797        fn compat_from(value: crate::CapabilityStoreDirConnectorOpenRequest) -> Self {
14798            Self {
14799                id: ::fidl_next::CompatFrom::compat_from(value.id),
14800
14801                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14802            }
14803        }
14804    }
14805
14806    impl
14807        ::fidl_next::CompatFrom<
14808            ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorOpenRequest,
14809        > for crate::CapabilityStoreDirConnectorOpenRequest
14810    {
14811        #[inline]
14812        fn compat_from(
14813            value: ::fidl_fuchsia_component_sandbox::CapabilityStoreDirConnectorOpenRequest,
14814        ) -> Self {
14815            Self {
14816                id: ::fidl_next::CompatFrom::compat_from(value.id),
14817
14818                server_end: ::fidl_next::CompatFrom::compat_from(value.server_end),
14819            }
14820        }
14821    }
14822
14823    #[cfg(target_os = "fuchsia")]
14824    /// An alias for a client sender over `zx::Channel` for the `CapabilityStore`
14825    /// protocol.
14826    pub type CapabilityStoreProxy = ::fidl_next::ClientSender<crate::CapabilityStore>;
14827
14828    impl ::fidl_next::CompatFrom<crate::CapabilityStore>
14829        for ::fidl_fuchsia_component_sandbox::CapabilityStoreMarker
14830    {
14831        fn compat_from(_: crate::CapabilityStore) -> Self {
14832            Self
14833        }
14834    }
14835
14836    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreMarker>
14837        for crate::CapabilityStore
14838    {
14839        fn compat_from(_: ::fidl_fuchsia_component_sandbox::CapabilityStoreMarker) -> Self {
14840            Self
14841        }
14842    }
14843
14844    #[cfg(target_os = "fuchsia")]
14845
14846    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::CapabilityStoreProxy>
14847        for crate::CapabilityStore
14848    {
14849        fn client_compat_from(
14850            proxy: ::fidl_fuchsia_component_sandbox::CapabilityStoreProxy,
14851        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
14852            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
14853            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
14854            ::fidl_next::Client::new(client_end)
14855        }
14856    }
14857
14858    impl ::fidl_next::CompatFrom<crate::InstanceToken>
14859        for ::fidl_fuchsia_component_sandbox::InstanceToken
14860    {
14861        #[inline]
14862        fn compat_from(value: crate::InstanceToken) -> Self {
14863            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14864        }
14865    }
14866
14867    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::InstanceToken>
14868        for crate::InstanceToken
14869    {
14870        #[inline]
14871        fn compat_from(value: ::fidl_fuchsia_component_sandbox::InstanceToken) -> Self {
14872            Self { token: ::fidl_next::CompatFrom::compat_from(value.token) }
14873        }
14874    }
14875
14876    impl ::fidl_next::CompatFrom<crate::RouteRequest>
14877        for ::fidl_fuchsia_component_sandbox::RouteRequest
14878    {
14879        fn compat_from(value: crate::RouteRequest) -> Self {
14880            Self {
14881                requesting: ::fidl_next::CompatFrom::compat_from(value.requesting),
14882
14883                metadata: ::fidl_next::CompatFrom::compat_from(value.metadata),
14884
14885                __source_breaking: ::fidl::marker::SourceBreaking,
14886            }
14887        }
14888    }
14889
14890    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::RouteRequest>
14891        for crate::RouteRequest
14892    {
14893        fn compat_from(value: ::fidl_fuchsia_component_sandbox::RouteRequest) -> Self {
14894            Self {
14895                requesting: ::fidl_next::CompatFrom::compat_from(value.requesting),
14896
14897                metadata: ::fidl_next::CompatFrom::compat_from(value.metadata),
14898            }
14899        }
14900    }
14901
14902    impl ::fidl_next::CompatFrom<crate::ConnectorRouterRouteResponse>
14903        for ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse
14904    {
14905        fn compat_from(value: crate::ConnectorRouterRouteResponse) -> Self {
14906            match value {
14907                crate::ConnectorRouterRouteResponse::Connector(value) => {
14908                    Self::Connector(::fidl_next::CompatFrom::compat_from(value))
14909                }
14910
14911                crate::ConnectorRouterRouteResponse::Unavailable(value) => {
14912                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
14913                }
14914            }
14915        }
14916    }
14917
14918    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse>
14919        for crate::ConnectorRouterRouteResponse
14920    {
14921        fn compat_from(
14922            value: ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse,
14923        ) -> Self {
14924            match value {
14925                ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse::Connector(
14926                    value,
14927                ) => Self::Connector(::fidl_next::CompatFrom::compat_from(value)),
14928
14929                ::fidl_fuchsia_component_sandbox::ConnectorRouterRouteResponse::Unavailable(
14930                    value,
14931                ) => Self::Unavailable(::fidl_next::CompatFrom::compat_from(value)),
14932            }
14933        }
14934    }
14935
14936    impl ::fidl_next::CompatFrom<crate::RouterError> for ::fidl_fuchsia_component_sandbox::RouterError {
14937        fn compat_from(value: crate::RouterError) -> Self {
14938            match value {
14939                crate::RouterError::NotFound => Self::NotFound,
14940
14941                crate::RouterError::InvalidArgs => Self::InvalidArgs,
14942
14943                crate::RouterError::NotSupported => Self::NotSupported,
14944
14945                crate::RouterError::Internal => Self::Internal,
14946
14947                crate::RouterError::UnknownOrdinal_(unknown_ordinal) => {
14948                    Self::__SourceBreaking { unknown_ordinal }
14949                }
14950            }
14951        }
14952    }
14953
14954    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::RouterError> for crate::RouterError {
14955        fn compat_from(value: ::fidl_fuchsia_component_sandbox::RouterError) -> Self {
14956            match value {
14957                ::fidl_fuchsia_component_sandbox::RouterError::NotFound => Self::NotFound,
14958
14959                ::fidl_fuchsia_component_sandbox::RouterError::InvalidArgs => Self::InvalidArgs,
14960
14961                ::fidl_fuchsia_component_sandbox::RouterError::NotSupported => Self::NotSupported,
14962
14963                ::fidl_fuchsia_component_sandbox::RouterError::Internal => Self::Internal,
14964
14965                ::fidl_fuchsia_component_sandbox::RouterError::__SourceBreaking {
14966                    unknown_ordinal: value,
14967                } => Self::UnknownOrdinal_(value),
14968            }
14969        }
14970    }
14971
14972    #[cfg(target_os = "fuchsia")]
14973    /// An alias for a client sender over `zx::Channel` for the `ConnectorRouter`
14974    /// protocol.
14975    pub type ConnectorRouterProxy = ::fidl_next::ClientSender<crate::ConnectorRouter>;
14976
14977    impl ::fidl_next::CompatFrom<crate::ConnectorRouter>
14978        for ::fidl_fuchsia_component_sandbox::ConnectorRouterMarker
14979    {
14980        fn compat_from(_: crate::ConnectorRouter) -> Self {
14981            Self
14982        }
14983    }
14984
14985    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::ConnectorRouterMarker>
14986        for crate::ConnectorRouter
14987    {
14988        fn compat_from(_: ::fidl_fuchsia_component_sandbox::ConnectorRouterMarker) -> Self {
14989            Self
14990        }
14991    }
14992
14993    #[cfg(target_os = "fuchsia")]
14994
14995    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::ConnectorRouterProxy>
14996        for crate::ConnectorRouter
14997    {
14998        fn client_compat_from(
14999            proxy: ::fidl_fuchsia_component_sandbox::ConnectorRouterProxy,
15000        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15001            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15002            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15003            ::fidl_next::Client::new(client_end)
15004        }
15005    }
15006
15007    impl ::fidl_next::CompatFrom<crate::DataRouterRouteResponse>
15008        for ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse
15009    {
15010        fn compat_from(value: crate::DataRouterRouteResponse) -> Self {
15011            match value {
15012                crate::DataRouterRouteResponse::Data(value) => {
15013                    Self::Data(::fidl_next::CompatFrom::compat_from(value))
15014                }
15015
15016                crate::DataRouterRouteResponse::Unavailable(value) => {
15017                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15018                }
15019            }
15020        }
15021    }
15022
15023    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DataRouterRouteResponse>
15024        for crate::DataRouterRouteResponse
15025    {
15026        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse) -> Self {
15027            match value {
15028                ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse::Data(value) => {
15029                    Self::Data(::fidl_next::CompatFrom::compat_from(value))
15030                }
15031
15032                ::fidl_fuchsia_component_sandbox::DataRouterRouteResponse::Unavailable(value) => {
15033                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15034                }
15035            }
15036        }
15037    }
15038
15039    #[cfg(target_os = "fuchsia")]
15040    /// An alias for a client sender over `zx::Channel` for the `DataRouter`
15041    /// protocol.
15042    pub type DataRouterProxy = ::fidl_next::ClientSender<crate::DataRouter>;
15043
15044    impl ::fidl_next::CompatFrom<crate::DataRouter>
15045        for ::fidl_fuchsia_component_sandbox::DataRouterMarker
15046    {
15047        fn compat_from(_: crate::DataRouter) -> Self {
15048            Self
15049        }
15050    }
15051
15052    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DataRouterMarker>
15053        for crate::DataRouter
15054    {
15055        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DataRouterMarker) -> Self {
15056            Self
15057        }
15058    }
15059
15060    #[cfg(target_os = "fuchsia")]
15061
15062    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DataRouterProxy>
15063        for crate::DataRouter
15064    {
15065        fn client_compat_from(
15066            proxy: ::fidl_fuchsia_component_sandbox::DataRouterProxy,
15067        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15068            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15069            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15070            ::fidl_next::Client::new(client_end)
15071        }
15072    }
15073
15074    #[cfg(target_os = "fuchsia")]
15075    /// An alias for a client sender over `zx::Channel` for the `Dictionary`
15076    /// protocol.
15077    pub type DictionaryProxy = ::fidl_next::ClientSender<crate::Dictionary>;
15078
15079    impl ::fidl_next::CompatFrom<crate::Dictionary>
15080        for ::fidl_fuchsia_component_sandbox::DictionaryMarker
15081    {
15082        fn compat_from(_: crate::Dictionary) -> Self {
15083            Self
15084        }
15085    }
15086
15087    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryMarker>
15088        for crate::Dictionary
15089    {
15090        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DictionaryMarker) -> Self {
15091            Self
15092        }
15093    }
15094
15095    #[cfg(target_os = "fuchsia")]
15096
15097    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DictionaryProxy>
15098        for crate::Dictionary
15099    {
15100        fn client_compat_from(
15101            proxy: ::fidl_fuchsia_component_sandbox::DictionaryProxy,
15102        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15103            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15104            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15105            ::fidl_next::Client::new(client_end)
15106        }
15107    }
15108
15109    impl ::fidl_next::CompatFrom<crate::DictionaryDrainIteratorGetNextRequest>
15110        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextRequest
15111    {
15112        #[inline]
15113        fn compat_from(value: crate::DictionaryDrainIteratorGetNextRequest) -> Self {
15114            Self {
15115                start_id: ::fidl_next::CompatFrom::compat_from(value.start_id),
15116
15117                limit: ::fidl_next::CompatFrom::compat_from(value.limit),
15118            }
15119        }
15120    }
15121
15122    impl
15123        ::fidl_next::CompatFrom<
15124            ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextRequest,
15125        > for crate::DictionaryDrainIteratorGetNextRequest
15126    {
15127        #[inline]
15128        fn compat_from(
15129            value: ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextRequest,
15130        ) -> Self {
15131            Self {
15132                start_id: ::fidl_next::CompatFrom::compat_from(value.start_id),
15133
15134                limit: ::fidl_next::CompatFrom::compat_from(value.limit),
15135            }
15136        }
15137    }
15138
15139    impl ::fidl_next::CompatFrom<crate::DictionaryDrainIteratorGetNextResponse>
15140        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextResponse
15141    {
15142        #[inline]
15143        fn compat_from(value: crate::DictionaryDrainIteratorGetNextResponse) -> Self {
15144            Self {
15145                items: ::fidl_next::CompatFrom::compat_from(value.items),
15146
15147                end_id: ::fidl_next::CompatFrom::compat_from(value.end_id),
15148            }
15149        }
15150    }
15151
15152    impl
15153        ::fidl_next::CompatFrom<
15154            ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextResponse,
15155        > for crate::DictionaryDrainIteratorGetNextResponse
15156    {
15157        #[inline]
15158        fn compat_from(
15159            value: ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorGetNextResponse,
15160        ) -> Self {
15161            Self {
15162                items: ::fidl_next::CompatFrom::compat_from(value.items),
15163
15164                end_id: ::fidl_next::CompatFrom::compat_from(value.end_id),
15165            }
15166        }
15167    }
15168
15169    #[cfg(target_os = "fuchsia")]
15170    /// An alias for a client sender over `zx::Channel` for the `DictionaryDrainIterator`
15171    /// protocol.
15172    pub type DictionaryDrainIteratorProxy =
15173        ::fidl_next::ClientSender<crate::DictionaryDrainIterator>;
15174
15175    impl ::fidl_next::CompatFrom<crate::DictionaryDrainIterator>
15176        for ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorMarker
15177    {
15178        fn compat_from(_: crate::DictionaryDrainIterator) -> Self {
15179            Self
15180        }
15181    }
15182
15183    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorMarker>
15184        for crate::DictionaryDrainIterator
15185    {
15186        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorMarker) -> Self {
15187            Self
15188        }
15189    }
15190
15191    #[cfg(target_os = "fuchsia")]
15192
15193    impl
15194        ::fidl_next::ClientCompatFrom<
15195            ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorProxy,
15196        > for crate::DictionaryDrainIterator
15197    {
15198        fn client_compat_from(
15199            proxy: ::fidl_fuchsia_component_sandbox::DictionaryDrainIteratorProxy,
15200        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15201            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15202            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15203            ::fidl_next::Client::new(client_end)
15204        }
15205    }
15206
15207    impl ::fidl_next::CompatFrom<crate::DictionaryEnumerateIteratorGetNextRequest>
15208        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextRequest
15209    {
15210        #[inline]
15211        fn compat_from(value: crate::DictionaryEnumerateIteratorGetNextRequest) -> Self {
15212            Self {
15213                start_id: ::fidl_next::CompatFrom::compat_from(value.start_id),
15214
15215                limit: ::fidl_next::CompatFrom::compat_from(value.limit),
15216            }
15217        }
15218    }
15219
15220    impl
15221        ::fidl_next::CompatFrom<
15222            ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextRequest,
15223        > for crate::DictionaryEnumerateIteratorGetNextRequest
15224    {
15225        #[inline]
15226        fn compat_from(
15227            value: ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextRequest,
15228        ) -> Self {
15229            Self {
15230                start_id: ::fidl_next::CompatFrom::compat_from(value.start_id),
15231
15232                limit: ::fidl_next::CompatFrom::compat_from(value.limit),
15233            }
15234        }
15235    }
15236
15237    impl ::fidl_next::CompatFrom<crate::DictionaryOptionalItem>
15238        for ::fidl_fuchsia_component_sandbox::DictionaryOptionalItem
15239    {
15240        #[inline]
15241        fn compat_from(value: crate::DictionaryOptionalItem) -> Self {
15242            Self {
15243                key: ::fidl_next::CompatFrom::compat_from(value.key),
15244
15245                value: ::fidl_next::CompatFrom::compat_from(value.value),
15246            }
15247        }
15248    }
15249
15250    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryOptionalItem>
15251        for crate::DictionaryOptionalItem
15252    {
15253        #[inline]
15254        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DictionaryOptionalItem) -> Self {
15255            Self {
15256                key: ::fidl_next::CompatFrom::compat_from(value.key),
15257
15258                value: ::fidl_next::CompatFrom::compat_from(value.value),
15259            }
15260        }
15261    }
15262
15263    impl ::fidl_next::CompatFrom<crate::DictionaryEnumerateIteratorGetNextResponse>
15264        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextResponse
15265    {
15266        #[inline]
15267        fn compat_from(value: crate::DictionaryEnumerateIteratorGetNextResponse) -> Self {
15268            Self {
15269                items: ::fidl_next::CompatFrom::compat_from(value.items),
15270
15271                end_id: ::fidl_next::CompatFrom::compat_from(value.end_id),
15272            }
15273        }
15274    }
15275
15276    impl
15277        ::fidl_next::CompatFrom<
15278            ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextResponse,
15279        > for crate::DictionaryEnumerateIteratorGetNextResponse
15280    {
15281        #[inline]
15282        fn compat_from(
15283            value: ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorGetNextResponse,
15284        ) -> Self {
15285            Self {
15286                items: ::fidl_next::CompatFrom::compat_from(value.items),
15287
15288                end_id: ::fidl_next::CompatFrom::compat_from(value.end_id),
15289            }
15290        }
15291    }
15292
15293    #[cfg(target_os = "fuchsia")]
15294    /// An alias for a client sender over `zx::Channel` for the `DictionaryEnumerateIterator`
15295    /// protocol.
15296    pub type DictionaryEnumerateIteratorProxy =
15297        ::fidl_next::ClientSender<crate::DictionaryEnumerateIterator>;
15298
15299    impl ::fidl_next::CompatFrom<crate::DictionaryEnumerateIterator>
15300        for ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorMarker
15301    {
15302        fn compat_from(_: crate::DictionaryEnumerateIterator) -> Self {
15303            Self
15304        }
15305    }
15306
15307    impl
15308        ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorMarker>
15309        for crate::DictionaryEnumerateIterator
15310    {
15311        fn compat_from(
15312            _: ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorMarker,
15313        ) -> Self {
15314            Self
15315        }
15316    }
15317
15318    #[cfg(target_os = "fuchsia")]
15319
15320    impl
15321        ::fidl_next::ClientCompatFrom<
15322            ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorProxy,
15323        > for crate::DictionaryEnumerateIterator
15324    {
15325        fn client_compat_from(
15326            proxy: ::fidl_fuchsia_component_sandbox::DictionaryEnumerateIteratorProxy,
15327        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15328            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15329            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15330            ::fidl_next::Client::new(client_end)
15331        }
15332    }
15333
15334    impl ::fidl_next::CompatFrom<crate::DictionaryError>
15335        for ::fidl_fuchsia_component_sandbox::DictionaryError
15336    {
15337        fn compat_from(value: crate::DictionaryError) -> Self {
15338            match value {
15339                crate::DictionaryError::NotFound => Self::NotFound,
15340
15341                crate::DictionaryError::AlreadyExists => Self::AlreadyExists,
15342
15343                crate::DictionaryError::BadCapability => Self::BadCapability,
15344
15345                crate::DictionaryError::InvalidKey => Self::InvalidKey,
15346
15347                crate::DictionaryError::NotCloneable => Self::NotCloneable,
15348
15349                crate::DictionaryError::UnknownOrdinal_(unknown_ordinal) => {
15350                    Self::__SourceBreaking { unknown_ordinal }
15351                }
15352            }
15353        }
15354    }
15355
15356    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryError>
15357        for crate::DictionaryError
15358    {
15359        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DictionaryError) -> Self {
15360            match value {
15361                ::fidl_fuchsia_component_sandbox::DictionaryError::NotFound => Self::NotFound,
15362
15363                ::fidl_fuchsia_component_sandbox::DictionaryError::AlreadyExists => {
15364                    Self::AlreadyExists
15365                }
15366
15367                ::fidl_fuchsia_component_sandbox::DictionaryError::BadCapability => {
15368                    Self::BadCapability
15369                }
15370
15371                ::fidl_fuchsia_component_sandbox::DictionaryError::InvalidKey => Self::InvalidKey,
15372
15373                ::fidl_fuchsia_component_sandbox::DictionaryError::NotCloneable => {
15374                    Self::NotCloneable
15375                }
15376
15377                ::fidl_fuchsia_component_sandbox::DictionaryError::__SourceBreaking {
15378                    unknown_ordinal: value,
15379                } => Self::UnknownOrdinal_(value),
15380            }
15381        }
15382    }
15383
15384    impl ::fidl_next::CompatFrom<crate::DictionaryKeysIteratorGetNextResponse>
15385        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorGetNextResponse
15386    {
15387        #[inline]
15388        fn compat_from(value: crate::DictionaryKeysIteratorGetNextResponse) -> Self {
15389            Self { keys: ::fidl_next::CompatFrom::compat_from(value.keys) }
15390        }
15391    }
15392
15393    impl
15394        ::fidl_next::CompatFrom<
15395            ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorGetNextResponse,
15396        > for crate::DictionaryKeysIteratorGetNextResponse
15397    {
15398        #[inline]
15399        fn compat_from(
15400            value: ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorGetNextResponse,
15401        ) -> Self {
15402            Self { keys: ::fidl_next::CompatFrom::compat_from(value.keys) }
15403        }
15404    }
15405
15406    #[cfg(target_os = "fuchsia")]
15407    /// An alias for a client sender over `zx::Channel` for the `DictionaryKeysIterator`
15408    /// protocol.
15409    pub type DictionaryKeysIteratorProxy = ::fidl_next::ClientSender<crate::DictionaryKeysIterator>;
15410
15411    impl ::fidl_next::CompatFrom<crate::DictionaryKeysIterator>
15412        for ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorMarker
15413    {
15414        fn compat_from(_: crate::DictionaryKeysIterator) -> Self {
15415            Self
15416        }
15417    }
15418
15419    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorMarker>
15420        for crate::DictionaryKeysIterator
15421    {
15422        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorMarker) -> Self {
15423            Self
15424        }
15425    }
15426
15427    #[cfg(target_os = "fuchsia")]
15428
15429    impl
15430        ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorProxy>
15431        for crate::DictionaryKeysIterator
15432    {
15433        fn client_compat_from(
15434            proxy: ::fidl_fuchsia_component_sandbox::DictionaryKeysIteratorProxy,
15435        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15436            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15437            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15438            ::fidl_next::Client::new(client_end)
15439        }
15440    }
15441
15442    impl ::fidl_next::CompatFrom<crate::DictionaryRouterRouteResponse>
15443        for ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse
15444    {
15445        fn compat_from(value: crate::DictionaryRouterRouteResponse) -> Self {
15446            match value {
15447                crate::DictionaryRouterRouteResponse::Dictionary(value) => {
15448                    Self::Dictionary(::fidl_next::CompatFrom::compat_from(value))
15449                }
15450
15451                crate::DictionaryRouterRouteResponse::Unavailable(value) => {
15452                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15453                }
15454            }
15455        }
15456    }
15457
15458    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse>
15459        for crate::DictionaryRouterRouteResponse
15460    {
15461        fn compat_from(
15462            value: ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse,
15463        ) -> Self {
15464            match value {
15465                ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse::Dictionary(
15466                    value,
15467                ) => Self::Dictionary(::fidl_next::CompatFrom::compat_from(value)),
15468
15469                ::fidl_fuchsia_component_sandbox::DictionaryRouterRouteResponse::Unavailable(
15470                    value,
15471                ) => Self::Unavailable(::fidl_next::CompatFrom::compat_from(value)),
15472            }
15473        }
15474    }
15475
15476    #[cfg(target_os = "fuchsia")]
15477    /// An alias for a client sender over `zx::Channel` for the `DictionaryRouter`
15478    /// protocol.
15479    pub type DictionaryRouterProxy = ::fidl_next::ClientSender<crate::DictionaryRouter>;
15480
15481    impl ::fidl_next::CompatFrom<crate::DictionaryRouter>
15482        for ::fidl_fuchsia_component_sandbox::DictionaryRouterMarker
15483    {
15484        fn compat_from(_: crate::DictionaryRouter) -> Self {
15485            Self
15486        }
15487    }
15488
15489    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DictionaryRouterMarker>
15490        for crate::DictionaryRouter
15491    {
15492        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DictionaryRouterMarker) -> Self {
15493            Self
15494        }
15495    }
15496
15497    #[cfg(target_os = "fuchsia")]
15498
15499    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DictionaryRouterProxy>
15500        for crate::DictionaryRouter
15501    {
15502        fn client_compat_from(
15503            proxy: ::fidl_fuchsia_component_sandbox::DictionaryRouterProxy,
15504        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15505            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15506            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15507            ::fidl_next::Client::new(client_end)
15508        }
15509    }
15510
15511    impl ::fidl_next::CompatFrom<crate::DirConnectorRouterRouteResponse>
15512        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse
15513    {
15514        fn compat_from(value: crate::DirConnectorRouterRouteResponse) -> Self {
15515            match value {
15516                crate::DirConnectorRouterRouteResponse::DirConnector(value) => {
15517                    Self::DirConnector(::fidl_next::CompatFrom::compat_from(value))
15518                }
15519
15520                crate::DirConnectorRouterRouteResponse::Unavailable(value) => {
15521                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15522                }
15523            }
15524        }
15525    }
15526
15527    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse>
15528        for crate::DirConnectorRouterRouteResponse
15529    {
15530        fn compat_from(
15531            value: ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse,
15532        ) -> Self {
15533            match value {
15534                ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse::DirConnector(
15535                    value,
15536                ) => Self::DirConnector(::fidl_next::CompatFrom::compat_from(value)),
15537
15538                ::fidl_fuchsia_component_sandbox::DirConnectorRouterRouteResponse::Unavailable(
15539                    value,
15540                ) => Self::Unavailable(::fidl_next::CompatFrom::compat_from(value)),
15541            }
15542        }
15543    }
15544
15545    #[cfg(target_os = "fuchsia")]
15546    /// An alias for a client sender over `zx::Channel` for the `DirConnectorRouter`
15547    /// protocol.
15548    pub type DirConnectorRouterProxy = ::fidl_next::ClientSender<crate::DirConnectorRouter>;
15549
15550    impl ::fidl_next::CompatFrom<crate::DirConnectorRouter>
15551        for ::fidl_fuchsia_component_sandbox::DirConnectorRouterMarker
15552    {
15553        fn compat_from(_: crate::DirConnectorRouter) -> Self {
15554            Self
15555        }
15556    }
15557
15558    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirConnectorRouterMarker>
15559        for crate::DirConnectorRouter
15560    {
15561        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DirConnectorRouterMarker) -> Self {
15562            Self
15563        }
15564    }
15565
15566    #[cfg(target_os = "fuchsia")]
15567
15568    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DirConnectorRouterProxy>
15569        for crate::DirConnectorRouter
15570    {
15571        fn client_compat_from(
15572            proxy: ::fidl_fuchsia_component_sandbox::DirConnectorRouterProxy,
15573        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15574            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15575            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15576            ::fidl_next::Client::new(client_end)
15577        }
15578    }
15579
15580    impl ::fidl_next::CompatFrom<crate::DirEntryRouterRouteResponse>
15581        for ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse
15582    {
15583        fn compat_from(value: crate::DirEntryRouterRouteResponse) -> Self {
15584            match value {
15585                crate::DirEntryRouterRouteResponse::DirEntry(value) => {
15586                    Self::DirEntry(::fidl_next::CompatFrom::compat_from(value))
15587                }
15588
15589                crate::DirEntryRouterRouteResponse::Unavailable(value) => {
15590                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15591                }
15592            }
15593        }
15594    }
15595
15596    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse>
15597        for crate::DirEntryRouterRouteResponse
15598    {
15599        fn compat_from(
15600            value: ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse,
15601        ) -> Self {
15602            match value {
15603                ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse::DirEntry(value) => {
15604                    Self::DirEntry(::fidl_next::CompatFrom::compat_from(value))
15605                }
15606
15607                ::fidl_fuchsia_component_sandbox::DirEntryRouterRouteResponse::Unavailable(
15608                    value,
15609                ) => Self::Unavailable(::fidl_next::CompatFrom::compat_from(value)),
15610            }
15611        }
15612    }
15613
15614    #[cfg(target_os = "fuchsia")]
15615    /// An alias for a client sender over `zx::Channel` for the `DirEntryRouter`
15616    /// protocol.
15617    pub type DirEntryRouterProxy = ::fidl_next::ClientSender<crate::DirEntryRouter>;
15618
15619    impl ::fidl_next::CompatFrom<crate::DirEntryRouter>
15620        for ::fidl_fuchsia_component_sandbox::DirEntryRouterMarker
15621    {
15622        fn compat_from(_: crate::DirEntryRouter) -> Self {
15623            Self
15624        }
15625    }
15626
15627    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirEntryRouterMarker>
15628        for crate::DirEntryRouter
15629    {
15630        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DirEntryRouterMarker) -> Self {
15631            Self
15632        }
15633    }
15634
15635    #[cfg(target_os = "fuchsia")]
15636
15637    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DirEntryRouterProxy>
15638        for crate::DirEntryRouter
15639    {
15640        fn client_compat_from(
15641            proxy: ::fidl_fuchsia_component_sandbox::DirEntryRouterProxy,
15642        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15643            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15644            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15645            ::fidl_next::Client::new(client_end)
15646        }
15647    }
15648
15649    impl ::fidl_next::CompatFrom<crate::DirReceiverReceiveRequest>
15650        for ::fidl_fuchsia_component_sandbox::DirReceiverReceiveRequest
15651    {
15652        #[inline]
15653        fn compat_from(value: crate::DirReceiverReceiveRequest) -> Self {
15654            Self { channel: ::fidl_next::CompatFrom::compat_from(value.channel) }
15655        }
15656    }
15657
15658    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirReceiverReceiveRequest>
15659        for crate::DirReceiverReceiveRequest
15660    {
15661        #[inline]
15662        fn compat_from(value: ::fidl_fuchsia_component_sandbox::DirReceiverReceiveRequest) -> Self {
15663            Self { channel: ::fidl_next::CompatFrom::compat_from(value.channel) }
15664        }
15665    }
15666
15667    #[cfg(target_os = "fuchsia")]
15668    /// An alias for a client sender over `zx::Channel` for the `DirReceiver`
15669    /// protocol.
15670    pub type DirReceiverProxy = ::fidl_next::ClientSender<crate::DirReceiver>;
15671
15672    impl ::fidl_next::CompatFrom<crate::DirReceiver>
15673        for ::fidl_fuchsia_component_sandbox::DirReceiverMarker
15674    {
15675        fn compat_from(_: crate::DirReceiver) -> Self {
15676            Self
15677        }
15678    }
15679
15680    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirReceiverMarker>
15681        for crate::DirReceiver
15682    {
15683        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DirReceiverMarker) -> Self {
15684            Self
15685        }
15686    }
15687
15688    #[cfg(target_os = "fuchsia")]
15689
15690    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DirReceiverProxy>
15691        for crate::DirReceiver
15692    {
15693        fn client_compat_from(
15694            proxy: ::fidl_fuchsia_component_sandbox::DirReceiverProxy,
15695        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15696            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15697            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15698            ::fidl_next::Client::new(client_end)
15699        }
15700    }
15701
15702    impl ::fidl_next::CompatFrom<crate::DirectoryRouterRouteResponse>
15703        for ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse
15704    {
15705        fn compat_from(value: crate::DirectoryRouterRouteResponse) -> Self {
15706            match value {
15707                crate::DirectoryRouterRouteResponse::Directory(value) => {
15708                    Self::Directory(::fidl_next::CompatFrom::compat_from(value))
15709                }
15710
15711                crate::DirectoryRouterRouteResponse::Unavailable(value) => {
15712                    Self::Unavailable(::fidl_next::CompatFrom::compat_from(value))
15713                }
15714            }
15715        }
15716    }
15717
15718    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse>
15719        for crate::DirectoryRouterRouteResponse
15720    {
15721        fn compat_from(
15722            value: ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse,
15723        ) -> Self {
15724            match value {
15725                ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse::Directory(
15726                    value,
15727                ) => Self::Directory(::fidl_next::CompatFrom::compat_from(value)),
15728
15729                ::fidl_fuchsia_component_sandbox::DirectoryRouterRouteResponse::Unavailable(
15730                    value,
15731                ) => Self::Unavailable(::fidl_next::CompatFrom::compat_from(value)),
15732            }
15733        }
15734    }
15735
15736    #[cfg(target_os = "fuchsia")]
15737    /// An alias for a client sender over `zx::Channel` for the `DirectoryRouter`
15738    /// protocol.
15739    pub type DirectoryRouterProxy = ::fidl_next::ClientSender<crate::DirectoryRouter>;
15740
15741    impl ::fidl_next::CompatFrom<crate::DirectoryRouter>
15742        for ::fidl_fuchsia_component_sandbox::DirectoryRouterMarker
15743    {
15744        fn compat_from(_: crate::DirectoryRouter) -> Self {
15745            Self
15746        }
15747    }
15748
15749    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::DirectoryRouterMarker>
15750        for crate::DirectoryRouter
15751    {
15752        fn compat_from(_: ::fidl_fuchsia_component_sandbox::DirectoryRouterMarker) -> Self {
15753            Self
15754        }
15755    }
15756
15757    #[cfg(target_os = "fuchsia")]
15758
15759    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::DirectoryRouterProxy>
15760        for crate::DirectoryRouter
15761    {
15762        fn client_compat_from(
15763            proxy: ::fidl_fuchsia_component_sandbox::DirectoryRouterProxy,
15764        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15765            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15766            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15767            ::fidl_next::Client::new(client_end)
15768        }
15769    }
15770
15771    impl ::fidl_next::CompatFrom<crate::ProtocolPayload>
15772        for ::fidl_fuchsia_component_sandbox::ProtocolPayload
15773    {
15774        #[inline]
15775        fn compat_from(value: crate::ProtocolPayload) -> Self {
15776            Self { channel: ::fidl_next::CompatFrom::compat_from(value.channel) }
15777        }
15778    }
15779
15780    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::ProtocolPayload>
15781        for crate::ProtocolPayload
15782    {
15783        #[inline]
15784        fn compat_from(value: ::fidl_fuchsia_component_sandbox::ProtocolPayload) -> Self {
15785            Self { channel: ::fidl_next::CompatFrom::compat_from(value.channel) }
15786        }
15787    }
15788
15789    #[cfg(target_os = "fuchsia")]
15790    /// An alias for a client sender over `zx::Channel` for the `Receiver`
15791    /// protocol.
15792    pub type ReceiverProxy = ::fidl_next::ClientSender<crate::Receiver>;
15793
15794    impl ::fidl_next::CompatFrom<crate::Receiver> for ::fidl_fuchsia_component_sandbox::ReceiverMarker {
15795        fn compat_from(_: crate::Receiver) -> Self {
15796            Self
15797        }
15798    }
15799
15800    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::ReceiverMarker> for crate::Receiver {
15801        fn compat_from(_: ::fidl_fuchsia_component_sandbox::ReceiverMarker) -> Self {
15802            Self
15803        }
15804    }
15805
15806    #[cfg(target_os = "fuchsia")]
15807
15808    impl ::fidl_next::ClientCompatFrom<::fidl_fuchsia_component_sandbox::ReceiverProxy>
15809        for crate::Receiver
15810    {
15811        fn client_compat_from(
15812            proxy: ::fidl_fuchsia_component_sandbox::ReceiverProxy,
15813        ) -> ::fidl_next::Client<Self, ::fidl_next::fuchsia::zx::Channel> {
15814            let channel = ::fidl::endpoints::Proxy::into_channel(proxy).unwrap().into_zx_channel();
15815            let client_end = ::fidl_next::ClientEnd::from_untyped(channel);
15816            ::fidl_next::Client::new(client_end)
15817        }
15818    }
15819
15820    impl ::fidl_next::CompatFrom<crate::Unavailable> for ::fidl_fuchsia_component_sandbox::Unavailable {
15821        #[inline]
15822        fn compat_from(value: crate::Unavailable) -> Self {
15823            Self {}
15824        }
15825    }
15826
15827    impl ::fidl_next::CompatFrom<::fidl_fuchsia_component_sandbox::Unavailable> for crate::Unavailable {
15828        #[inline]
15829        fn compat_from(value: ::fidl_fuchsia_component_sandbox::Unavailable) -> Self {
15830            Self {}
15831        }
15832    }
15833}