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