Skip to main content

fidl_next_common_fuchsia_component_sandbox/
fidl_next_common_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
5pub mod natural {
6
7    #[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"]
8    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
9    #[repr(u32)]
10    pub enum Availability {
11        Required = 1,
12        Optional = 2,
13        SameAsTarget = 3,
14        Transitional = 4,
15    }
16    impl ::core::convert::TryFrom<u32> for Availability {
17        type Error = ::fidl_next::UnknownStrictEnumMemberError;
18        fn try_from(
19            value: u32,
20        ) -> ::core::result::Result<Self, ::fidl_next::UnknownStrictEnumMemberError> {
21            match value {
22                1 => Ok(Self::Required),
23                2 => Ok(Self::Optional),
24                3 => Ok(Self::SameAsTarget),
25                4 => Ok(Self::Transitional),
26
27                _ => Err(::fidl_next::UnknownStrictEnumMemberError::new(value.into())),
28            }
29        }
30    }
31
32    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Availability, ___E> for Availability
33    where
34        ___E: ?Sized,
35    {
36        #[inline]
37        fn encode(
38            self,
39            encoder: &mut ___E,
40            out: &mut ::core::mem::MaybeUninit<crate::wire::Availability>,
41            _: (),
42        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
43            ::fidl_next::Encode::encode(&self, encoder, out, ())
44        }
45    }
46
47    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Availability, ___E> for &'a Availability
48    where
49        ___E: ?Sized,
50    {
51        #[inline]
52        fn encode(
53            self,
54            encoder: &mut ___E,
55            out: &mut ::core::mem::MaybeUninit<crate::wire::Availability>,
56            _: (),
57        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
58            ::fidl_next::munge!(let crate::wire::Availability { value } = out);
59            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
60                Availability::Required => 1,
61
62                Availability::Optional => 2,
63
64                Availability::SameAsTarget => 3,
65
66                Availability::Transitional => 4,
67            }));
68
69            Ok(())
70        }
71    }
72
73    impl ::core::convert::From<crate::wire::Availability> for Availability {
74        fn from(wire: crate::wire::Availability) -> Self {
75            match u32::from(wire.value) {
76                1 => Self::Required,
77
78                2 => Self::Optional,
79
80                3 => Self::SameAsTarget,
81
82                4 => Self::Transitional,
83
84                _ => unsafe { ::core::hint::unreachable_unchecked() },
85            }
86        }
87    }
88
89    impl ::fidl_next::FromWire<crate::wire::Availability> for Availability {
90        #[inline]
91        fn from_wire(wire: crate::wire::Availability) -> Self {
92            Self::from(wire)
93        }
94    }
95
96    impl ::fidl_next::FromWireRef<crate::wire::Availability> for Availability {
97        #[inline]
98        fn from_wire_ref(wire: &crate::wire::Availability) -> Self {
99            Self::from(*wire)
100        }
101    }
102
103    pub type Unit = ();
104
105    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
106    pub enum Data {
107        Bytes(::std::vec::Vec<u8>),
108
109        String(::std::string::String),
110
111        Int64(i64),
112
113        Uint64(u64),
114
115        UnknownOrdinal_(u64),
116    }
117
118    impl Data {
119        pub fn is_unknown(&self) -> bool {
120            #[allow(unreachable_patterns)]
121            match self {
122                Self::UnknownOrdinal_(_) => true,
123                _ => false,
124            }
125        }
126    }
127
128    unsafe impl<___E> ::fidl_next::Encode<crate::wire::Data<'static>, ___E> for Data
129    where
130        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
131        ___E: ::fidl_next::Encoder,
132    {
133        #[inline]
134        fn encode(
135            self,
136            encoder: &mut ___E,
137            out: &mut ::core::mem::MaybeUninit<crate::wire::Data<'static>>,
138            _: (),
139        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
140            ::fidl_next::munge!(let crate::wire::Data { raw, _phantom: _ } = out);
141
142            match self {
143                Self::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
144                    ___E,
145                    ::fidl_next::wire::Vector<'static, u8>,
146                >(value, 1, encoder, raw, (8192, ()))?,
147
148                Self::String(value) => ::fidl_next::wire::Union::encode_as::<
149                    ___E,
150                    ::fidl_next::wire::String<'static>,
151                >(value, 2, encoder, raw, 8192)?,
152
153                Self::Int64(value) => ::fidl_next::wire::Union::encode_as::<
154                    ___E,
155                    ::fidl_next::wire::Int64,
156                >(value, 3, encoder, raw, ())?,
157
158                Self::Uint64(value) => ::fidl_next::wire::Union::encode_as::<
159                    ___E,
160                    ::fidl_next::wire::Uint64,
161                >(value, 4, encoder, raw, ())?,
162
163                Self::UnknownOrdinal_(ordinal) => {
164                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(ordinal as usize));
165                }
166            }
167
168            Ok(())
169        }
170    }
171
172    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::Data<'static>, ___E> for &'a Data
173    where
174        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
175        ___E: ::fidl_next::Encoder,
176    {
177        #[inline]
178        fn encode(
179            self,
180            encoder: &mut ___E,
181            out: &mut ::core::mem::MaybeUninit<crate::wire::Data<'static>>,
182            _: (),
183        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
184            ::fidl_next::munge!(let crate::wire::Data { raw, _phantom: _ } = out);
185
186            match self {
187                Data::Bytes(value) => ::fidl_next::wire::Union::encode_as::<
188                    ___E,
189                    ::fidl_next::wire::Vector<'static, u8>,
190                >(value, 1, encoder, raw, (8192, ()))?,
191
192                Data::String(value) => ::fidl_next::wire::Union::encode_as::<
193                    ___E,
194                    ::fidl_next::wire::String<'static>,
195                >(value, 2, encoder, raw, 8192)?,
196
197                Data::Int64(value) => ::fidl_next::wire::Union::encode_as::<
198                    ___E,
199                    ::fidl_next::wire::Int64,
200                >(value, 3, encoder, raw, ())?,
201
202                Data::Uint64(value) => ::fidl_next::wire::Union::encode_as::<
203                    ___E,
204                    ::fidl_next::wire::Uint64,
205                >(value, 4, encoder, raw, ())?,
206
207                Data::UnknownOrdinal_(ordinal) => {
208                    return Err(::fidl_next::EncodeError::UnknownUnionOrdinal(*ordinal as usize));
209                }
210            }
211
212            Ok(())
213        }
214    }
215
216    unsafe impl<___E> ::fidl_next::EncodeOption<crate::wire_optional::Data<'static>, ___E> for Data
217    where
218        ___E: ?Sized,
219        Data: ::fidl_next::Encode<crate::wire::Data<'static>, ___E>,
220    {
221        #[inline]
222        fn encode_option(
223            this: ::core::option::Option<Self>,
224            encoder: &mut ___E,
225            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Data<'static>>,
226            _: (),
227        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
228            ::fidl_next::munge!(let crate::wire_optional::Data { raw, _phantom: _ } = &mut *out);
229
230            if let Some(inner) = this {
231                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
232                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
233            } else {
234                ::fidl_next::wire::Union::encode_absent(raw);
235            }
236
237            Ok(())
238        }
239    }
240
241    unsafe impl<'a, ___E> ::fidl_next::EncodeOption<crate::wire_optional::Data<'static>, ___E>
242        for &'a Data
243    where
244        ___E: ?Sized,
245        &'a Data: ::fidl_next::Encode<crate::wire::Data<'static>, ___E>,
246    {
247        #[inline]
248        fn encode_option(
249            this: ::core::option::Option<Self>,
250            encoder: &mut ___E,
251            out: &mut ::core::mem::MaybeUninit<crate::wire_optional::Data<'static>>,
252            _: (),
253        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
254            ::fidl_next::munge!(let crate::wire_optional::Data { raw, _phantom: _ } = &mut *out);
255
256            if let Some(inner) = this {
257                let value_out = unsafe { &mut *out.as_mut_ptr().cast() };
258                ::fidl_next::Encode::encode(inner, encoder, value_out, ())?;
259            } else {
260                ::fidl_next::wire::Union::encode_absent(raw);
261            }
262
263            Ok(())
264        }
265    }
266
267    impl<'de> ::fidl_next::FromWire<crate::wire::Data<'de>> for Data {
268        #[inline]
269        fn from_wire(wire: crate::wire::Data<'de>) -> Self {
270            let wire = ::core::mem::ManuallyDrop::new(wire);
271            match wire.raw.ordinal() {
272                1 => Self::Bytes(::fidl_next::FromWire::from_wire(unsafe {
273                    wire.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
274                })),
275
276                2 => Self::String(::fidl_next::FromWire::from_wire(unsafe {
277                    wire.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
278                })),
279
280                3 => Self::Int64(::fidl_next::FromWire::from_wire(unsafe {
281                    wire.raw.get().read_unchecked::<::fidl_next::wire::Int64>()
282                })),
283
284                4 => Self::Uint64(::fidl_next::FromWire::from_wire(unsafe {
285                    wire.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
286                })),
287
288                ord => return Self::UnknownOrdinal_(ord as u64),
289            }
290        }
291    }
292
293    impl<'de> ::fidl_next::FromWireRef<crate::wire::Data<'de>> for Data {
294        #[inline]
295        fn from_wire_ref(wire: &crate::wire::Data<'de>) -> Self {
296            match wire.raw.ordinal() {
297                1 => Self::Bytes(::fidl_next::FromWireRef::from_wire_ref(unsafe {
298                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
299                })),
300
301                2 => Self::String(::fidl_next::FromWireRef::from_wire_ref(unsafe {
302                    wire.raw.get().deref_unchecked::<::fidl_next::wire::String<'de>>()
303                })),
304
305                3 => Self::Int64(::fidl_next::FromWireRef::from_wire_ref(unsafe {
306                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Int64>()
307                })),
308
309                4 => Self::Uint64(::fidl_next::FromWireRef::from_wire_ref(unsafe {
310                    wire.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
311                })),
312
313                ord => return Self::UnknownOrdinal_(ord as u64),
314            }
315        }
316    }
317
318    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Data<'de>> for Data {
319        #[inline]
320        fn from_wire_option(wire: crate::wire_optional::Data<'de>) -> ::core::option::Option<Self> {
321            if let Some(inner) = wire.into_option() {
322                Some(::fidl_next::FromWire::from_wire(inner))
323            } else {
324                None
325            }
326        }
327    }
328
329    impl<'de> ::fidl_next::FromWireOption<crate::wire_optional::Data<'de>> for Box<Data> {
330        #[inline]
331        fn from_wire_option(wire: crate::wire_optional::Data<'de>) -> ::core::option::Option<Self> {
332            <
333            Data as ::fidl_next::FromWireOption<crate::wire_optional::Data<'de>>
334        >::from_wire_option(wire).map(Box::new)
335        }
336    }
337
338    impl<'de> ::fidl_next::FromWireOptionRef<crate::wire_optional::Data<'de>> for Box<Data> {
339        #[inline]
340        fn from_wire_option_ref(
341            wire: &crate::wire_optional::Data<'de>,
342        ) -> ::core::option::Option<Self> {
343            if let Some(inner) = wire.as_ref() {
344                Some(Box::new(::fidl_next::FromWireRef::from_wire_ref(inner)))
345            } else {
346                None
347            }
348        }
349    }
350
351    #[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"]
352    pub type CapabilityId = u64;
353
354    #[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"]
355    pub type NewCapabilityId = u64;
356
357    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
358    #[repr(C)]
359    pub struct CapabilityStoreDuplicateRequest {
360        pub id: u64,
361
362        pub dest_id: u64,
363    }
364
365    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDuplicateRequest, ___E>
366        for CapabilityStoreDuplicateRequest
367    where
368        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
369    {
370        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
371            Self,
372            crate::wire::CapabilityStoreDuplicateRequest,
373        > = unsafe {
374            ::fidl_next::CopyOptimization::enable_if(
375            true
376
377                && <
378                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
379                >::COPY_OPTIMIZATION.is_enabled()
380
381                && <
382                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
383                >::COPY_OPTIMIZATION.is_enabled()
384
385        )
386        };
387
388        #[inline]
389        fn encode(
390            self,
391            encoder_: &mut ___E,
392            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDuplicateRequest>,
393            _: (),
394        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
395            ::fidl_next::munge! {
396                let crate::wire::CapabilityStoreDuplicateRequest {
397                    id,
398                    dest_id,
399
400                } = out_;
401            }
402
403            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
404
405            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
406
407            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
408
409            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
410
411            Ok(())
412        }
413    }
414
415    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDuplicateRequest, ___E>
416        for &'a CapabilityStoreDuplicateRequest
417    where
418        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
419    {
420        #[inline]
421        fn encode(
422            self,
423            encoder_: &mut ___E,
424            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDuplicateRequest>,
425            _: (),
426        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
427            ::fidl_next::munge! {
428                let crate::wire::CapabilityStoreDuplicateRequest {
429                    id,
430                    dest_id,
431
432                } = out_;
433            }
434
435            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
436
437            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
438
439            ::fidl_next::Encode::encode(&self.dest_id, encoder_, dest_id, ())?;
440
441            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
442
443            Ok(())
444        }
445    }
446
447    unsafe impl<___E>
448        ::fidl_next::EncodeOption<
449            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDuplicateRequest>,
450            ___E,
451        > for CapabilityStoreDuplicateRequest
452    where
453        ___E: ::fidl_next::Encoder + ?Sized,
454        CapabilityStoreDuplicateRequest:
455            ::fidl_next::Encode<crate::wire::CapabilityStoreDuplicateRequest, ___E>,
456    {
457        #[inline]
458        fn encode_option(
459            this: ::core::option::Option<Self>,
460            encoder: &mut ___E,
461            out: &mut ::core::mem::MaybeUninit<
462                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDuplicateRequest>,
463            >,
464            _: (),
465        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
466            if let Some(inner) = this {
467                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
468                ::fidl_next::wire::Box::encode_present(out);
469            } else {
470                ::fidl_next::wire::Box::encode_absent(out);
471            }
472
473            Ok(())
474        }
475    }
476
477    unsafe impl<'a, ___E>
478        ::fidl_next::EncodeOption<
479            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDuplicateRequest>,
480            ___E,
481        > for &'a CapabilityStoreDuplicateRequest
482    where
483        ___E: ::fidl_next::Encoder + ?Sized,
484        &'a CapabilityStoreDuplicateRequest:
485            ::fidl_next::Encode<crate::wire::CapabilityStoreDuplicateRequest, ___E>,
486    {
487        #[inline]
488        fn encode_option(
489            this: ::core::option::Option<Self>,
490            encoder: &mut ___E,
491            out: &mut ::core::mem::MaybeUninit<
492                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDuplicateRequest>,
493            >,
494            _: (),
495        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
496            if let Some(inner) = this {
497                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
498                ::fidl_next::wire::Box::encode_present(out);
499            } else {
500                ::fidl_next::wire::Box::encode_absent(out);
501            }
502
503            Ok(())
504        }
505    }
506
507    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDuplicateRequest>
508        for CapabilityStoreDuplicateRequest
509    {
510        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
511            crate::wire::CapabilityStoreDuplicateRequest,
512            Self,
513        > = unsafe {
514            ::fidl_next::CopyOptimization::enable_if(
515                true
516                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
517                        .is_enabled()
518                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
519                        .is_enabled(),
520            )
521        };
522
523        #[inline]
524        fn from_wire(wire: crate::wire::CapabilityStoreDuplicateRequest) -> Self {
525            Self {
526                id: ::fidl_next::FromWire::from_wire(wire.id),
527
528                dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
529            }
530        }
531    }
532
533    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDuplicateRequest>
534        for CapabilityStoreDuplicateRequest
535    {
536        #[inline]
537        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDuplicateRequest) -> Self {
538            Self {
539                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
540
541                dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
542            }
543        }
544    }
545
546    pub type CapabilityStoreDuplicateResponse = ();
547
548    #[doc = " Error returned from methods in [CapabilityStore].\n"]
549    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
550    #[repr(u32)]
551    pub enum CapabilityStoreError {
552        IdNotFound = 1,
553        IdAlreadyExists = 2,
554        BadCapability = 3,
555        WrongType = 4,
556        NotDuplicatable = 5,
557        ItemNotFound = 6,
558        ItemAlreadyExists = 7,
559        InvalidKey = 8,
560        InvalidArgs = 9,
561        UnknownOrdinal_(u32) = 10,
562    }
563    impl ::std::convert::From<u32> for CapabilityStoreError {
564        fn from(value: u32) -> Self {
565            match value {
566                1 => Self::IdNotFound,
567                2 => Self::IdAlreadyExists,
568                3 => Self::BadCapability,
569                4 => Self::WrongType,
570                5 => Self::NotDuplicatable,
571                6 => Self::ItemNotFound,
572                7 => Self::ItemAlreadyExists,
573                8 => Self::InvalidKey,
574                9 => Self::InvalidArgs,
575
576                _ => Self::UnknownOrdinal_(value),
577            }
578        }
579    }
580
581    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreError, ___E>
582        for CapabilityStoreError
583    where
584        ___E: ?Sized,
585    {
586        #[inline]
587        fn encode(
588            self,
589            encoder: &mut ___E,
590            out: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreError>,
591            _: (),
592        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
593            ::fidl_next::Encode::encode(&self, encoder, out, ())
594        }
595    }
596
597    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CapabilityStoreError, ___E>
598        for &'a CapabilityStoreError
599    where
600        ___E: ?Sized,
601    {
602        #[inline]
603        fn encode(
604            self,
605            encoder: &mut ___E,
606            out: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreError>,
607            _: (),
608        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
609            ::fidl_next::munge!(let crate::wire::CapabilityStoreError { value } = out);
610            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
611                CapabilityStoreError::IdNotFound => 1,
612
613                CapabilityStoreError::IdAlreadyExists => 2,
614
615                CapabilityStoreError::BadCapability => 3,
616
617                CapabilityStoreError::WrongType => 4,
618
619                CapabilityStoreError::NotDuplicatable => 5,
620
621                CapabilityStoreError::ItemNotFound => 6,
622
623                CapabilityStoreError::ItemAlreadyExists => 7,
624
625                CapabilityStoreError::InvalidKey => 8,
626
627                CapabilityStoreError::InvalidArgs => 9,
628
629                CapabilityStoreError::UnknownOrdinal_(value) => value,
630            }));
631
632            Ok(())
633        }
634    }
635
636    impl ::core::convert::From<crate::wire::CapabilityStoreError> for CapabilityStoreError {
637        fn from(wire: crate::wire::CapabilityStoreError) -> Self {
638            match u32::from(wire.value) {
639                1 => Self::IdNotFound,
640
641                2 => Self::IdAlreadyExists,
642
643                3 => Self::BadCapability,
644
645                4 => Self::WrongType,
646
647                5 => Self::NotDuplicatable,
648
649                6 => Self::ItemNotFound,
650
651                7 => Self::ItemAlreadyExists,
652
653                8 => Self::InvalidKey,
654
655                9 => Self::InvalidArgs,
656
657                value => Self::UnknownOrdinal_(value),
658            }
659        }
660    }
661
662    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreError> for CapabilityStoreError {
663        #[inline]
664        fn from_wire(wire: crate::wire::CapabilityStoreError) -> Self {
665            Self::from(wire)
666        }
667    }
668
669    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreError> for CapabilityStoreError {
670        #[inline]
671        fn from_wire_ref(wire: &crate::wire::CapabilityStoreError) -> Self {
672            Self::from(*wire)
673        }
674    }
675
676    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
677    #[repr(C)]
678    pub struct CapabilityStoreDropRequest {
679        pub id: u64,
680    }
681
682    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDropRequest, ___E>
683        for CapabilityStoreDropRequest
684    where
685        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
686    {
687        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
688            Self,
689            crate::wire::CapabilityStoreDropRequest,
690        > = unsafe {
691            ::fidl_next::CopyOptimization::enable_if(
692            true
693
694                && <
695                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
696                >::COPY_OPTIMIZATION.is_enabled()
697
698        )
699        };
700
701        #[inline]
702        fn encode(
703            self,
704            encoder_: &mut ___E,
705            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDropRequest>,
706            _: (),
707        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
708            ::fidl_next::munge! {
709                let crate::wire::CapabilityStoreDropRequest {
710                    id,
711
712                } = out_;
713            }
714
715            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
716
717            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
718
719            Ok(())
720        }
721    }
722
723    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDropRequest, ___E>
724        for &'a CapabilityStoreDropRequest
725    where
726        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
727    {
728        #[inline]
729        fn encode(
730            self,
731            encoder_: &mut ___E,
732            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDropRequest>,
733            _: (),
734        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
735            ::fidl_next::munge! {
736                let crate::wire::CapabilityStoreDropRequest {
737                    id,
738
739                } = out_;
740            }
741
742            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
743
744            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
745
746            Ok(())
747        }
748    }
749
750    unsafe impl<___E>
751        ::fidl_next::EncodeOption<
752            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDropRequest>,
753            ___E,
754        > for CapabilityStoreDropRequest
755    where
756        ___E: ::fidl_next::Encoder + ?Sized,
757        CapabilityStoreDropRequest:
758            ::fidl_next::Encode<crate::wire::CapabilityStoreDropRequest, ___E>,
759    {
760        #[inline]
761        fn encode_option(
762            this: ::core::option::Option<Self>,
763            encoder: &mut ___E,
764            out: &mut ::core::mem::MaybeUninit<
765                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDropRequest>,
766            >,
767            _: (),
768        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
769            if let Some(inner) = this {
770                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
771                ::fidl_next::wire::Box::encode_present(out);
772            } else {
773                ::fidl_next::wire::Box::encode_absent(out);
774            }
775
776            Ok(())
777        }
778    }
779
780    unsafe impl<'a, ___E>
781        ::fidl_next::EncodeOption<
782            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDropRequest>,
783            ___E,
784        > for &'a CapabilityStoreDropRequest
785    where
786        ___E: ::fidl_next::Encoder + ?Sized,
787        &'a CapabilityStoreDropRequest:
788            ::fidl_next::Encode<crate::wire::CapabilityStoreDropRequest, ___E>,
789    {
790        #[inline]
791        fn encode_option(
792            this: ::core::option::Option<Self>,
793            encoder: &mut ___E,
794            out: &mut ::core::mem::MaybeUninit<
795                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDropRequest>,
796            >,
797            _: (),
798        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
799            if let Some(inner) = this {
800                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
801                ::fidl_next::wire::Box::encode_present(out);
802            } else {
803                ::fidl_next::wire::Box::encode_absent(out);
804            }
805
806            Ok(())
807        }
808    }
809
810    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDropRequest> for CapabilityStoreDropRequest {
811        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
812            crate::wire::CapabilityStoreDropRequest,
813            Self,
814        > = unsafe {
815            ::fidl_next::CopyOptimization::enable_if(
816                true
817                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
818                        .is_enabled(),
819            )
820        };
821
822        #[inline]
823        fn from_wire(wire: crate::wire::CapabilityStoreDropRequest) -> Self {
824            Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
825        }
826    }
827
828    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDropRequest>
829        for CapabilityStoreDropRequest
830    {
831        #[inline]
832        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDropRequest) -> Self {
833            Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
834        }
835    }
836
837    pub type CapabilityStoreDropResponse = ();
838
839    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
840    #[repr(C)]
841    pub struct CapabilityStoreExportRequest {
842        pub id: u64,
843    }
844
845    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreExportRequest, ___E>
846        for CapabilityStoreExportRequest
847    where
848        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
849    {
850        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
851            Self,
852            crate::wire::CapabilityStoreExportRequest,
853        > = unsafe {
854            ::fidl_next::CopyOptimization::enable_if(
855            true
856
857                && <
858                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
859                >::COPY_OPTIMIZATION.is_enabled()
860
861        )
862        };
863
864        #[inline]
865        fn encode(
866            self,
867            encoder_: &mut ___E,
868            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreExportRequest>,
869            _: (),
870        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
871            ::fidl_next::munge! {
872                let crate::wire::CapabilityStoreExportRequest {
873                    id,
874
875                } = out_;
876            }
877
878            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
879
880            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
881
882            Ok(())
883        }
884    }
885
886    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::CapabilityStoreExportRequest, ___E>
887        for &'a CapabilityStoreExportRequest
888    where
889        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
890    {
891        #[inline]
892        fn encode(
893            self,
894            encoder_: &mut ___E,
895            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreExportRequest>,
896            _: (),
897        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
898            ::fidl_next::munge! {
899                let crate::wire::CapabilityStoreExportRequest {
900                    id,
901
902                } = out_;
903            }
904
905            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
906
907            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
908
909            Ok(())
910        }
911    }
912
913    unsafe impl<___E>
914        ::fidl_next::EncodeOption<
915            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportRequest>,
916            ___E,
917        > for CapabilityStoreExportRequest
918    where
919        ___E: ::fidl_next::Encoder + ?Sized,
920        CapabilityStoreExportRequest:
921            ::fidl_next::Encode<crate::wire::CapabilityStoreExportRequest, ___E>,
922    {
923        #[inline]
924        fn encode_option(
925            this: ::core::option::Option<Self>,
926            encoder: &mut ___E,
927            out: &mut ::core::mem::MaybeUninit<
928                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportRequest>,
929            >,
930            _: (),
931        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
932            if let Some(inner) = this {
933                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
934                ::fidl_next::wire::Box::encode_present(out);
935            } else {
936                ::fidl_next::wire::Box::encode_absent(out);
937            }
938
939            Ok(())
940        }
941    }
942
943    unsafe impl<'a, ___E>
944        ::fidl_next::EncodeOption<
945            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportRequest>,
946            ___E,
947        > for &'a CapabilityStoreExportRequest
948    where
949        ___E: ::fidl_next::Encoder + ?Sized,
950        &'a CapabilityStoreExportRequest:
951            ::fidl_next::Encode<crate::wire::CapabilityStoreExportRequest, ___E>,
952    {
953        #[inline]
954        fn encode_option(
955            this: ::core::option::Option<Self>,
956            encoder: &mut ___E,
957            out: &mut ::core::mem::MaybeUninit<
958                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreExportRequest>,
959            >,
960            _: (),
961        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
962            if let Some(inner) = this {
963                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
964                ::fidl_next::wire::Box::encode_present(out);
965            } else {
966                ::fidl_next::wire::Box::encode_absent(out);
967            }
968
969            Ok(())
970        }
971    }
972
973    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreExportRequest>
974        for CapabilityStoreExportRequest
975    {
976        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
977            crate::wire::CapabilityStoreExportRequest,
978            Self,
979        > = unsafe {
980            ::fidl_next::CopyOptimization::enable_if(
981                true
982                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
983                        .is_enabled(),
984            )
985        };
986
987        #[inline]
988        fn from_wire(wire: crate::wire::CapabilityStoreExportRequest) -> Self {
989            Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
990        }
991    }
992
993    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreExportRequest>
994        for CapabilityStoreExportRequest
995    {
996        #[inline]
997        fn from_wire_ref(wire: &crate::wire::CapabilityStoreExportRequest) -> Self {
998            Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
999        }
1000    }
1001
1002    pub type CapabilityStoreImportResponse = ();
1003
1004    pub type CapabilityStoreConnectorCreateResponse = ();
1005
1006    pub type CapabilityStoreConnectorOpenResponse = ();
1007
1008    pub type CapabilityStoreDirConnectorCreateResponse = ();
1009
1010    pub type CapabilityStoreDirConnectorOpenResponse = ();
1011
1012    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1013    #[repr(C)]
1014    pub struct CapabilityStoreDictionaryCreateRequest {
1015        pub id: u64,
1016    }
1017
1018    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCreateRequest, ___E>
1019        for CapabilityStoreDictionaryCreateRequest
1020    where
1021        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1022    {
1023        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1024            Self,
1025            crate::wire::CapabilityStoreDictionaryCreateRequest,
1026        > = unsafe {
1027            ::fidl_next::CopyOptimization::enable_if(
1028            true
1029
1030                && <
1031                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1032                >::COPY_OPTIMIZATION.is_enabled()
1033
1034        )
1035        };
1036
1037        #[inline]
1038        fn encode(
1039            self,
1040            encoder_: &mut ___E,
1041            out_: &mut ::core::mem::MaybeUninit<
1042                crate::wire::CapabilityStoreDictionaryCreateRequest,
1043            >,
1044            _: (),
1045        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1046            ::fidl_next::munge! {
1047                let crate::wire::CapabilityStoreDictionaryCreateRequest {
1048                    id,
1049
1050                } = out_;
1051            }
1052
1053            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1054
1055            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1056
1057            Ok(())
1058        }
1059    }
1060
1061    unsafe impl<'a, ___E>
1062        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCreateRequest, ___E>
1063        for &'a CapabilityStoreDictionaryCreateRequest
1064    where
1065        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1066    {
1067        #[inline]
1068        fn encode(
1069            self,
1070            encoder_: &mut ___E,
1071            out_: &mut ::core::mem::MaybeUninit<
1072                crate::wire::CapabilityStoreDictionaryCreateRequest,
1073            >,
1074            _: (),
1075        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1076            ::fidl_next::munge! {
1077                let crate::wire::CapabilityStoreDictionaryCreateRequest {
1078                    id,
1079
1080                } = out_;
1081            }
1082
1083            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1084
1085            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1086
1087            Ok(())
1088        }
1089    }
1090
1091    unsafe impl<___E>
1092        ::fidl_next::EncodeOption<
1093            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCreateRequest>,
1094            ___E,
1095        > for CapabilityStoreDictionaryCreateRequest
1096    where
1097        ___E: ::fidl_next::Encoder + ?Sized,
1098        CapabilityStoreDictionaryCreateRequest:
1099            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCreateRequest, ___E>,
1100    {
1101        #[inline]
1102        fn encode_option(
1103            this: ::core::option::Option<Self>,
1104            encoder: &mut ___E,
1105            out: &mut ::core::mem::MaybeUninit<
1106                ::fidl_next::wire::Box<
1107                    'static,
1108                    crate::wire::CapabilityStoreDictionaryCreateRequest,
1109                >,
1110            >,
1111            _: (),
1112        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1113            if let Some(inner) = this {
1114                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1115                ::fidl_next::wire::Box::encode_present(out);
1116            } else {
1117                ::fidl_next::wire::Box::encode_absent(out);
1118            }
1119
1120            Ok(())
1121        }
1122    }
1123
1124    unsafe impl<'a, ___E>
1125        ::fidl_next::EncodeOption<
1126            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCreateRequest>,
1127            ___E,
1128        > for &'a CapabilityStoreDictionaryCreateRequest
1129    where
1130        ___E: ::fidl_next::Encoder + ?Sized,
1131        &'a CapabilityStoreDictionaryCreateRequest:
1132            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCreateRequest, ___E>,
1133    {
1134        #[inline]
1135        fn encode_option(
1136            this: ::core::option::Option<Self>,
1137            encoder: &mut ___E,
1138            out: &mut ::core::mem::MaybeUninit<
1139                ::fidl_next::wire::Box<
1140                    'static,
1141                    crate::wire::CapabilityStoreDictionaryCreateRequest,
1142                >,
1143            >,
1144            _: (),
1145        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1146            if let Some(inner) = this {
1147                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1148                ::fidl_next::wire::Box::encode_present(out);
1149            } else {
1150                ::fidl_next::wire::Box::encode_absent(out);
1151            }
1152
1153            Ok(())
1154        }
1155    }
1156
1157    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryCreateRequest>
1158        for CapabilityStoreDictionaryCreateRequest
1159    {
1160        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1161            crate::wire::CapabilityStoreDictionaryCreateRequest,
1162            Self,
1163        > = unsafe {
1164            ::fidl_next::CopyOptimization::enable_if(
1165                true
1166                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
1167                        .is_enabled(),
1168            )
1169        };
1170
1171        #[inline]
1172        fn from_wire(wire: crate::wire::CapabilityStoreDictionaryCreateRequest) -> Self {
1173            Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
1174        }
1175    }
1176
1177    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDictionaryCreateRequest>
1178        for CapabilityStoreDictionaryCreateRequest
1179    {
1180        #[inline]
1181        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDictionaryCreateRequest) -> Self {
1182            Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
1183        }
1184    }
1185
1186    pub type CapabilityStoreDictionaryCreateResponse = ();
1187
1188    pub type CapabilityStoreDictionaryLegacyImportResponse = ();
1189
1190    pub type CapabilityStoreDictionaryLegacyExportResponse = ();
1191
1192    #[doc = " The key of a [`DictionaryItem`]. The constraints for valid keys are documented at\n https://fuchsia.dev/reference/cml#names.\n"]
1193    pub type DictionaryKey = ::std::string::String;
1194
1195    #[doc = " A key-value pair in a [`DictionaryRef`].\n"]
1196    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1197    pub struct DictionaryItem {
1198        pub key: ::std::string::String,
1199
1200        pub value: u64,
1201    }
1202
1203    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E> for DictionaryItem
1204    where
1205        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1206        ___E: ::fidl_next::Encoder,
1207    {
1208        #[inline]
1209        fn encode(
1210            self,
1211            encoder_: &mut ___E,
1212            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryItem<'static>>,
1213            _: (),
1214        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1215            ::fidl_next::munge! {
1216                let crate::wire::DictionaryItem {
1217                    key,
1218                    value,
1219
1220                } = out_;
1221            }
1222
1223            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
1224
1225            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1226            ::fidl_next::Constrained::validate(_field, 255)?;
1227
1228            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
1229
1230            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
1231
1232            Ok(())
1233        }
1234    }
1235
1236    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E>
1237        for &'a DictionaryItem
1238    where
1239        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1240        ___E: ::fidl_next::Encoder,
1241    {
1242        #[inline]
1243        fn encode(
1244            self,
1245            encoder_: &mut ___E,
1246            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryItem<'static>>,
1247            _: (),
1248        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1249            ::fidl_next::munge! {
1250                let crate::wire::DictionaryItem {
1251                    key,
1252                    value,
1253
1254                } = out_;
1255            }
1256
1257            ::fidl_next::Encode::encode(&self.key, encoder_, key, 255)?;
1258
1259            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1260            ::fidl_next::Constrained::validate(_field, 255)?;
1261
1262            ::fidl_next::Encode::encode(&self.value, encoder_, value, ())?;
1263
1264            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(value.as_mut_ptr()) };
1265
1266            Ok(())
1267        }
1268    }
1269
1270    unsafe impl<___E>
1271        ::fidl_next::EncodeOption<
1272            ::fidl_next::wire::Box<'static, crate::wire::DictionaryItem<'static>>,
1273            ___E,
1274        > for DictionaryItem
1275    where
1276        ___E: ::fidl_next::Encoder + ?Sized,
1277        DictionaryItem: ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E>,
1278    {
1279        #[inline]
1280        fn encode_option(
1281            this: ::core::option::Option<Self>,
1282            encoder: &mut ___E,
1283            out: &mut ::core::mem::MaybeUninit<
1284                ::fidl_next::wire::Box<'static, crate::wire::DictionaryItem<'static>>,
1285            >,
1286            _: (),
1287        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1288            if let Some(inner) = this {
1289                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1290                ::fidl_next::wire::Box::encode_present(out);
1291            } else {
1292                ::fidl_next::wire::Box::encode_absent(out);
1293            }
1294
1295            Ok(())
1296        }
1297    }
1298
1299    unsafe impl<'a, ___E>
1300        ::fidl_next::EncodeOption<
1301            ::fidl_next::wire::Box<'static, crate::wire::DictionaryItem<'static>>,
1302            ___E,
1303        > for &'a DictionaryItem
1304    where
1305        ___E: ::fidl_next::Encoder + ?Sized,
1306        &'a DictionaryItem: ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E>,
1307    {
1308        #[inline]
1309        fn encode_option(
1310            this: ::core::option::Option<Self>,
1311            encoder: &mut ___E,
1312            out: &mut ::core::mem::MaybeUninit<
1313                ::fidl_next::wire::Box<'static, crate::wire::DictionaryItem<'static>>,
1314            >,
1315            _: (),
1316        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1317            if let Some(inner) = this {
1318                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1319                ::fidl_next::wire::Box::encode_present(out);
1320            } else {
1321                ::fidl_next::wire::Box::encode_absent(out);
1322            }
1323
1324            Ok(())
1325        }
1326    }
1327
1328    impl<'de> ::fidl_next::FromWire<crate::wire::DictionaryItem<'de>> for DictionaryItem {
1329        #[inline]
1330        fn from_wire(wire: crate::wire::DictionaryItem<'de>) -> Self {
1331            Self {
1332                key: ::fidl_next::FromWire::from_wire(wire.key),
1333
1334                value: ::fidl_next::FromWire::from_wire(wire.value),
1335            }
1336        }
1337    }
1338
1339    impl<'de> ::fidl_next::FromWireRef<crate::wire::DictionaryItem<'de>> for DictionaryItem {
1340        #[inline]
1341        fn from_wire_ref(wire: &crate::wire::DictionaryItem<'de>) -> Self {
1342            Self {
1343                key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
1344
1345                value: ::fidl_next::FromWireRef::from_wire_ref(&wire.value),
1346            }
1347        }
1348    }
1349
1350    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1351    pub struct CapabilityStoreDictionaryInsertRequest {
1352        pub id: u64,
1353
1354        pub item: crate::natural::DictionaryItem,
1355    }
1356
1357    unsafe impl<___E>
1358        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryInsertRequest<'static>, ___E>
1359        for CapabilityStoreDictionaryInsertRequest
1360    where
1361        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1362        ___E: ::fidl_next::Encoder,
1363    {
1364        #[inline]
1365        fn encode(
1366            self,
1367            encoder_: &mut ___E,
1368            out_: &mut ::core::mem::MaybeUninit<
1369                crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1370            >,
1371            _: (),
1372        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1373            ::fidl_next::munge! {
1374                let crate::wire::CapabilityStoreDictionaryInsertRequest {
1375                    id,
1376                    item,
1377
1378                } = out_;
1379            }
1380
1381            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1382
1383            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1384
1385            ::fidl_next::Encode::encode(self.item, encoder_, item, ())?;
1386
1387            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(item.as_mut_ptr()) };
1388
1389            Ok(())
1390        }
1391    }
1392
1393    unsafe impl<'a, ___E>
1394        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryInsertRequest<'static>, ___E>
1395        for &'a CapabilityStoreDictionaryInsertRequest
1396    where
1397        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1398        ___E: ::fidl_next::Encoder,
1399    {
1400        #[inline]
1401        fn encode(
1402            self,
1403            encoder_: &mut ___E,
1404            out_: &mut ::core::mem::MaybeUninit<
1405                crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1406            >,
1407            _: (),
1408        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1409            ::fidl_next::munge! {
1410                let crate::wire::CapabilityStoreDictionaryInsertRequest {
1411                    id,
1412                    item,
1413
1414                } = out_;
1415            }
1416
1417            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1418
1419            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1420
1421            ::fidl_next::Encode::encode(&self.item, encoder_, item, ())?;
1422
1423            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(item.as_mut_ptr()) };
1424
1425            Ok(())
1426        }
1427    }
1428
1429    unsafe impl<___E>
1430        ::fidl_next::EncodeOption<
1431            ::fidl_next::wire::Box<
1432                'static,
1433                crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1434            >,
1435            ___E,
1436        > for CapabilityStoreDictionaryInsertRequest
1437    where
1438        ___E: ::fidl_next::Encoder + ?Sized,
1439        CapabilityStoreDictionaryInsertRequest:
1440            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryInsertRequest<'static>, ___E>,
1441    {
1442        #[inline]
1443        fn encode_option(
1444            this: ::core::option::Option<Self>,
1445            encoder: &mut ___E,
1446            out: &mut ::core::mem::MaybeUninit<
1447                ::fidl_next::wire::Box<
1448                    'static,
1449                    crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1450                >,
1451            >,
1452            _: (),
1453        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1454            if let Some(inner) = this {
1455                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1456                ::fidl_next::wire::Box::encode_present(out);
1457            } else {
1458                ::fidl_next::wire::Box::encode_absent(out);
1459            }
1460
1461            Ok(())
1462        }
1463    }
1464
1465    unsafe impl<'a, ___E>
1466        ::fidl_next::EncodeOption<
1467            ::fidl_next::wire::Box<
1468                'static,
1469                crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1470            >,
1471            ___E,
1472        > for &'a CapabilityStoreDictionaryInsertRequest
1473    where
1474        ___E: ::fidl_next::Encoder + ?Sized,
1475        &'a CapabilityStoreDictionaryInsertRequest:
1476            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryInsertRequest<'static>, ___E>,
1477    {
1478        #[inline]
1479        fn encode_option(
1480            this: ::core::option::Option<Self>,
1481            encoder: &mut ___E,
1482            out: &mut ::core::mem::MaybeUninit<
1483                ::fidl_next::wire::Box<
1484                    'static,
1485                    crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
1486                >,
1487            >,
1488            _: (),
1489        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1490            if let Some(inner) = this {
1491                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1492                ::fidl_next::wire::Box::encode_present(out);
1493            } else {
1494                ::fidl_next::wire::Box::encode_absent(out);
1495            }
1496
1497            Ok(())
1498        }
1499    }
1500
1501    impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryInsertRequest<'de>>
1502        for CapabilityStoreDictionaryInsertRequest
1503    {
1504        #[inline]
1505        fn from_wire(wire: crate::wire::CapabilityStoreDictionaryInsertRequest<'de>) -> Self {
1506            Self {
1507                id: ::fidl_next::FromWire::from_wire(wire.id),
1508
1509                item: ::fidl_next::FromWire::from_wire(wire.item),
1510            }
1511        }
1512    }
1513
1514    impl<'de> ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDictionaryInsertRequest<'de>>
1515        for CapabilityStoreDictionaryInsertRequest
1516    {
1517        #[inline]
1518        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDictionaryInsertRequest<'de>) -> Self {
1519            Self {
1520                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1521
1522                item: ::fidl_next::FromWireRef::from_wire_ref(&wire.item),
1523            }
1524        }
1525    }
1526
1527    pub type CapabilityStoreDictionaryInsertResponse = ();
1528
1529    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1530    pub struct CapabilityStoreDictionaryGetRequest {
1531        pub id: u64,
1532
1533        pub key: ::std::string::String,
1534
1535        pub dest_id: u64,
1536    }
1537
1538    unsafe impl<___E>
1539        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryGetRequest<'static>, ___E>
1540        for CapabilityStoreDictionaryGetRequest
1541    where
1542        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1543        ___E: ::fidl_next::Encoder,
1544    {
1545        #[inline]
1546        fn encode(
1547            self,
1548            encoder_: &mut ___E,
1549            out_: &mut ::core::mem::MaybeUninit<
1550                crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1551            >,
1552            _: (),
1553        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1554            ::fidl_next::munge! {
1555                let crate::wire::CapabilityStoreDictionaryGetRequest {
1556                    id,
1557                    key,
1558                    dest_id,
1559
1560                } = out_;
1561            }
1562
1563            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1564
1565            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1566
1567            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
1568
1569            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1570            ::fidl_next::Constrained::validate(_field, 255)?;
1571
1572            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
1573
1574            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
1575
1576            Ok(())
1577        }
1578    }
1579
1580    unsafe impl<'a, ___E>
1581        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryGetRequest<'static>, ___E>
1582        for &'a CapabilityStoreDictionaryGetRequest
1583    where
1584        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1585        ___E: ::fidl_next::Encoder,
1586    {
1587        #[inline]
1588        fn encode(
1589            self,
1590            encoder_: &mut ___E,
1591            out_: &mut ::core::mem::MaybeUninit<
1592                crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1593            >,
1594            _: (),
1595        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1596            ::fidl_next::munge! {
1597                let crate::wire::CapabilityStoreDictionaryGetRequest {
1598                    id,
1599                    key,
1600                    dest_id,
1601
1602                } = out_;
1603            }
1604
1605            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1606
1607            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1608
1609            ::fidl_next::Encode::encode(&self.key, encoder_, key, 255)?;
1610
1611            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1612            ::fidl_next::Constrained::validate(_field, 255)?;
1613
1614            ::fidl_next::Encode::encode(&self.dest_id, encoder_, dest_id, ())?;
1615
1616            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
1617
1618            Ok(())
1619        }
1620    }
1621
1622    unsafe impl<___E>
1623        ::fidl_next::EncodeOption<
1624            ::fidl_next::wire::Box<
1625                'static,
1626                crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1627            >,
1628            ___E,
1629        > for CapabilityStoreDictionaryGetRequest
1630    where
1631        ___E: ::fidl_next::Encoder + ?Sized,
1632        CapabilityStoreDictionaryGetRequest:
1633            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryGetRequest<'static>, ___E>,
1634    {
1635        #[inline]
1636        fn encode_option(
1637            this: ::core::option::Option<Self>,
1638            encoder: &mut ___E,
1639            out: &mut ::core::mem::MaybeUninit<
1640                ::fidl_next::wire::Box<
1641                    'static,
1642                    crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1643                >,
1644            >,
1645            _: (),
1646        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1647            if let Some(inner) = this {
1648                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1649                ::fidl_next::wire::Box::encode_present(out);
1650            } else {
1651                ::fidl_next::wire::Box::encode_absent(out);
1652            }
1653
1654            Ok(())
1655        }
1656    }
1657
1658    unsafe impl<'a, ___E>
1659        ::fidl_next::EncodeOption<
1660            ::fidl_next::wire::Box<
1661                'static,
1662                crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1663            >,
1664            ___E,
1665        > for &'a CapabilityStoreDictionaryGetRequest
1666    where
1667        ___E: ::fidl_next::Encoder + ?Sized,
1668        &'a CapabilityStoreDictionaryGetRequest:
1669            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryGetRequest<'static>, ___E>,
1670    {
1671        #[inline]
1672        fn encode_option(
1673            this: ::core::option::Option<Self>,
1674            encoder: &mut ___E,
1675            out: &mut ::core::mem::MaybeUninit<
1676                ::fidl_next::wire::Box<
1677                    'static,
1678                    crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
1679                >,
1680            >,
1681            _: (),
1682        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1683            if let Some(inner) = this {
1684                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1685                ::fidl_next::wire::Box::encode_present(out);
1686            } else {
1687                ::fidl_next::wire::Box::encode_absent(out);
1688            }
1689
1690            Ok(())
1691        }
1692    }
1693
1694    impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryGetRequest<'de>>
1695        for CapabilityStoreDictionaryGetRequest
1696    {
1697        #[inline]
1698        fn from_wire(wire: crate::wire::CapabilityStoreDictionaryGetRequest<'de>) -> Self {
1699            Self {
1700                id: ::fidl_next::FromWire::from_wire(wire.id),
1701
1702                key: ::fidl_next::FromWire::from_wire(wire.key),
1703
1704                dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
1705            }
1706        }
1707    }
1708
1709    impl<'de> ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDictionaryGetRequest<'de>>
1710        for CapabilityStoreDictionaryGetRequest
1711    {
1712        #[inline]
1713        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDictionaryGetRequest<'de>) -> Self {
1714            Self {
1715                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
1716
1717                key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
1718
1719                dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
1720            }
1721        }
1722    }
1723
1724    pub type CapabilityStoreDictionaryGetResponse = ();
1725
1726    #[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"]
1727    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1728    #[repr(C)]
1729    pub struct WrappedCapabilityId {
1730        pub id: u64,
1731    }
1732
1733    unsafe impl<___E> ::fidl_next::Encode<crate::wire::WrappedCapabilityId, ___E>
1734        for WrappedCapabilityId
1735    where
1736        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1737    {
1738        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1739            Self,
1740            crate::wire::WrappedCapabilityId,
1741        > = unsafe {
1742            ::fidl_next::CopyOptimization::enable_if(
1743            true
1744
1745                && <
1746                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
1747                >::COPY_OPTIMIZATION.is_enabled()
1748
1749        )
1750        };
1751
1752        #[inline]
1753        fn encode(
1754            self,
1755            encoder_: &mut ___E,
1756            out_: &mut ::core::mem::MaybeUninit<crate::wire::WrappedCapabilityId>,
1757            _: (),
1758        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1759            ::fidl_next::munge! {
1760                let crate::wire::WrappedCapabilityId {
1761                    id,
1762
1763                } = out_;
1764            }
1765
1766            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1767
1768            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1769
1770            Ok(())
1771        }
1772    }
1773
1774    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::WrappedCapabilityId, ___E>
1775        for &'a WrappedCapabilityId
1776    where
1777        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1778    {
1779        #[inline]
1780        fn encode(
1781            self,
1782            encoder_: &mut ___E,
1783            out_: &mut ::core::mem::MaybeUninit<crate::wire::WrappedCapabilityId>,
1784            _: (),
1785        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1786            ::fidl_next::munge! {
1787                let crate::wire::WrappedCapabilityId {
1788                    id,
1789
1790                } = out_;
1791            }
1792
1793            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1794
1795            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1796
1797            Ok(())
1798        }
1799    }
1800
1801    unsafe impl<___E>
1802        ::fidl_next::EncodeOption<
1803            ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
1804            ___E,
1805        > for WrappedCapabilityId
1806    where
1807        ___E: ::fidl_next::Encoder + ?Sized,
1808        WrappedCapabilityId: ::fidl_next::Encode<crate::wire::WrappedCapabilityId, ___E>,
1809    {
1810        #[inline]
1811        fn encode_option(
1812            this: ::core::option::Option<Self>,
1813            encoder: &mut ___E,
1814            out: &mut ::core::mem::MaybeUninit<
1815                ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
1816            >,
1817            _: (),
1818        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1819            if let Some(inner) = this {
1820                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1821                ::fidl_next::wire::Box::encode_present(out);
1822            } else {
1823                ::fidl_next::wire::Box::encode_absent(out);
1824            }
1825
1826            Ok(())
1827        }
1828    }
1829
1830    unsafe impl<'a, ___E>
1831        ::fidl_next::EncodeOption<
1832            ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
1833            ___E,
1834        > for &'a WrappedCapabilityId
1835    where
1836        ___E: ::fidl_next::Encoder + ?Sized,
1837        &'a WrappedCapabilityId: ::fidl_next::Encode<crate::wire::WrappedCapabilityId, ___E>,
1838    {
1839        #[inline]
1840        fn encode_option(
1841            this: ::core::option::Option<Self>,
1842            encoder: &mut ___E,
1843            out: &mut ::core::mem::MaybeUninit<
1844                ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
1845            >,
1846            _: (),
1847        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1848            if let Some(inner) = this {
1849                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
1850                ::fidl_next::wire::Box::encode_present(out);
1851            } else {
1852                ::fidl_next::wire::Box::encode_absent(out);
1853            }
1854
1855            Ok(())
1856        }
1857    }
1858
1859    impl ::fidl_next::FromWire<crate::wire::WrappedCapabilityId> for WrappedCapabilityId {
1860        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
1861            crate::wire::WrappedCapabilityId,
1862            Self,
1863        > = unsafe {
1864            ::fidl_next::CopyOptimization::enable_if(
1865                true
1866                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
1867                        .is_enabled(),
1868            )
1869        };
1870
1871        #[inline]
1872        fn from_wire(wire: crate::wire::WrappedCapabilityId) -> Self {
1873            Self { id: ::fidl_next::FromWire::from_wire(wire.id) }
1874        }
1875    }
1876
1877    impl ::fidl_next::FromWireRef<crate::wire::WrappedCapabilityId> for WrappedCapabilityId {
1878        #[inline]
1879        fn from_wire_ref(wire: &crate::wire::WrappedCapabilityId) -> Self {
1880            Self { id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id) }
1881        }
1882    }
1883
1884    pub type WrappedNewCapabilityId = crate::natural::WrappedCapabilityId;
1885
1886    #[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
1887    pub struct CapabilityStoreDictionaryRemoveRequest {
1888        pub id: u64,
1889
1890        pub key: ::std::string::String,
1891
1892        pub dest_id: ::core::option::Option<::std::boxed::Box<crate::natural::WrappedCapabilityId>>,
1893    }
1894
1895    unsafe impl<___E>
1896        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>, ___E>
1897        for CapabilityStoreDictionaryRemoveRequest
1898    where
1899        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1900        ___E: ::fidl_next::Encoder,
1901    {
1902        #[inline]
1903        fn encode(
1904            self,
1905            encoder_: &mut ___E,
1906            out_: &mut ::core::mem::MaybeUninit<
1907                crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
1908            >,
1909            _: (),
1910        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1911            ::fidl_next::munge! {
1912                let crate::wire::CapabilityStoreDictionaryRemoveRequest {
1913                    id,
1914                    key,
1915                    dest_id,
1916
1917                } = out_;
1918            }
1919
1920            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
1921
1922            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1923
1924            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
1925
1926            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1927            ::fidl_next::Constrained::validate(_field, 255)?;
1928
1929            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
1930
1931            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
1932
1933            Ok(())
1934        }
1935    }
1936
1937    unsafe impl<'a, ___E>
1938        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>, ___E>
1939        for &'a CapabilityStoreDictionaryRemoveRequest
1940    where
1941        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
1942        ___E: ::fidl_next::Encoder,
1943    {
1944        #[inline]
1945        fn encode(
1946            self,
1947            encoder_: &mut ___E,
1948            out_: &mut ::core::mem::MaybeUninit<
1949                crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
1950            >,
1951            _: (),
1952        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
1953            ::fidl_next::munge! {
1954                let crate::wire::CapabilityStoreDictionaryRemoveRequest {
1955                    id,
1956                    key,
1957                    dest_id,
1958
1959                } = out_;
1960            }
1961
1962            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
1963
1964            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
1965
1966            ::fidl_next::Encode::encode(&self.key, encoder_, key, 255)?;
1967
1968            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(key.as_mut_ptr()) };
1969            ::fidl_next::Constrained::validate(_field, 255)?;
1970
1971            ::fidl_next::Encode::encode(&self.dest_id, encoder_, dest_id, ())?;
1972
1973            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
1974
1975            Ok(())
1976        }
1977    }
1978
1979    unsafe impl<___E>
1980        ::fidl_next::EncodeOption<
1981            ::fidl_next::wire::Box<
1982                'static,
1983                crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
1984            >,
1985            ___E,
1986        > for CapabilityStoreDictionaryRemoveRequest
1987    where
1988        ___E: ::fidl_next::Encoder + ?Sized,
1989        CapabilityStoreDictionaryRemoveRequest:
1990            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>, ___E>,
1991    {
1992        #[inline]
1993        fn encode_option(
1994            this: ::core::option::Option<Self>,
1995            encoder: &mut ___E,
1996            out: &mut ::core::mem::MaybeUninit<
1997                ::fidl_next::wire::Box<
1998                    'static,
1999                    crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
2000                >,
2001            >,
2002            _: (),
2003        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2004            if let Some(inner) = this {
2005                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2006                ::fidl_next::wire::Box::encode_present(out);
2007            } else {
2008                ::fidl_next::wire::Box::encode_absent(out);
2009            }
2010
2011            Ok(())
2012        }
2013    }
2014
2015    unsafe impl<'a, ___E>
2016        ::fidl_next::EncodeOption<
2017            ::fidl_next::wire::Box<
2018                'static,
2019                crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
2020            >,
2021            ___E,
2022        > for &'a CapabilityStoreDictionaryRemoveRequest
2023    where
2024        ___E: ::fidl_next::Encoder + ?Sized,
2025        &'a CapabilityStoreDictionaryRemoveRequest:
2026            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>, ___E>,
2027    {
2028        #[inline]
2029        fn encode_option(
2030            this: ::core::option::Option<Self>,
2031            encoder: &mut ___E,
2032            out: &mut ::core::mem::MaybeUninit<
2033                ::fidl_next::wire::Box<
2034                    'static,
2035                    crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
2036                >,
2037            >,
2038            _: (),
2039        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2040            if let Some(inner) = this {
2041                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2042                ::fidl_next::wire::Box::encode_present(out);
2043            } else {
2044                ::fidl_next::wire::Box::encode_absent(out);
2045            }
2046
2047            Ok(())
2048        }
2049    }
2050
2051    impl<'de> ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>>
2052        for CapabilityStoreDictionaryRemoveRequest
2053    {
2054        #[inline]
2055        fn from_wire(wire: crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>) -> Self {
2056            Self {
2057                id: ::fidl_next::FromWire::from_wire(wire.id),
2058
2059                key: ::fidl_next::FromWire::from_wire(wire.key),
2060
2061                dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
2062            }
2063        }
2064    }
2065
2066    impl<'de> ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>>
2067        for CapabilityStoreDictionaryRemoveRequest
2068    {
2069        #[inline]
2070        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDictionaryRemoveRequest<'de>) -> Self {
2071            Self {
2072                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
2073
2074                key: ::fidl_next::FromWireRef::from_wire_ref(&wire.key),
2075
2076                dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
2077            }
2078        }
2079    }
2080
2081    pub type CapabilityStoreDictionaryRemoveResponse = ();
2082
2083    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2084    #[repr(C)]
2085    pub struct CapabilityStoreDictionaryCopyRequest {
2086        pub id: u64,
2087
2088        pub dest_id: u64,
2089    }
2090
2091    unsafe impl<___E> ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCopyRequest, ___E>
2092        for CapabilityStoreDictionaryCopyRequest
2093    where
2094        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2095    {
2096        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2097            Self,
2098            crate::wire::CapabilityStoreDictionaryCopyRequest,
2099        > = unsafe {
2100            ::fidl_next::CopyOptimization::enable_if(
2101            true
2102
2103                && <
2104                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
2105                >::COPY_OPTIMIZATION.is_enabled()
2106
2107                && <
2108                    u64 as ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>
2109                >::COPY_OPTIMIZATION.is_enabled()
2110
2111        )
2112        };
2113
2114        #[inline]
2115        fn encode(
2116            self,
2117            encoder_: &mut ___E,
2118            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryCopyRequest>,
2119            _: (),
2120        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2121            ::fidl_next::munge! {
2122                let crate::wire::CapabilityStoreDictionaryCopyRequest {
2123                    id,
2124                    dest_id,
2125
2126                } = out_;
2127            }
2128
2129            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
2130
2131            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
2132
2133            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
2134
2135            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
2136
2137            Ok(())
2138        }
2139    }
2140
2141    unsafe impl<'a, ___E>
2142        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCopyRequest, ___E>
2143        for &'a CapabilityStoreDictionaryCopyRequest
2144    where
2145        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2146    {
2147        #[inline]
2148        fn encode(
2149            self,
2150            encoder_: &mut ___E,
2151            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryCopyRequest>,
2152            _: (),
2153        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2154            ::fidl_next::munge! {
2155                let crate::wire::CapabilityStoreDictionaryCopyRequest {
2156                    id,
2157                    dest_id,
2158
2159                } = out_;
2160            }
2161
2162            ::fidl_next::Encode::encode(&self.id, encoder_, id, ())?;
2163
2164            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(id.as_mut_ptr()) };
2165
2166            ::fidl_next::Encode::encode(&self.dest_id, encoder_, dest_id, ())?;
2167
2168            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(dest_id.as_mut_ptr()) };
2169
2170            Ok(())
2171        }
2172    }
2173
2174    unsafe impl<___E>
2175        ::fidl_next::EncodeOption<
2176            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCopyRequest>,
2177            ___E,
2178        > for CapabilityStoreDictionaryCopyRequest
2179    where
2180        ___E: ::fidl_next::Encoder + ?Sized,
2181        CapabilityStoreDictionaryCopyRequest:
2182            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCopyRequest, ___E>,
2183    {
2184        #[inline]
2185        fn encode_option(
2186            this: ::core::option::Option<Self>,
2187            encoder: &mut ___E,
2188            out: &mut ::core::mem::MaybeUninit<
2189                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCopyRequest>,
2190            >,
2191            _: (),
2192        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2193            if let Some(inner) = this {
2194                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2195                ::fidl_next::wire::Box::encode_present(out);
2196            } else {
2197                ::fidl_next::wire::Box::encode_absent(out);
2198            }
2199
2200            Ok(())
2201        }
2202    }
2203
2204    unsafe impl<'a, ___E>
2205        ::fidl_next::EncodeOption<
2206            ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCopyRequest>,
2207            ___E,
2208        > for &'a CapabilityStoreDictionaryCopyRequest
2209    where
2210        ___E: ::fidl_next::Encoder + ?Sized,
2211        &'a CapabilityStoreDictionaryCopyRequest:
2212            ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCopyRequest, ___E>,
2213    {
2214        #[inline]
2215        fn encode_option(
2216            this: ::core::option::Option<Self>,
2217            encoder: &mut ___E,
2218            out: &mut ::core::mem::MaybeUninit<
2219                ::fidl_next::wire::Box<'static, crate::wire::CapabilityStoreDictionaryCopyRequest>,
2220            >,
2221            _: (),
2222        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2223            if let Some(inner) = this {
2224                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2225                ::fidl_next::wire::Box::encode_present(out);
2226            } else {
2227                ::fidl_next::wire::Box::encode_absent(out);
2228            }
2229
2230            Ok(())
2231        }
2232    }
2233
2234    impl ::fidl_next::FromWire<crate::wire::CapabilityStoreDictionaryCopyRequest>
2235        for CapabilityStoreDictionaryCopyRequest
2236    {
2237        const COPY_OPTIMIZATION: ::fidl_next::CopyOptimization<
2238            crate::wire::CapabilityStoreDictionaryCopyRequest,
2239            Self,
2240        > = unsafe {
2241            ::fidl_next::CopyOptimization::enable_if(
2242                true
2243                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
2244                        .is_enabled()
2245                    && <u64 as ::fidl_next::FromWire<::fidl_next::wire::Uint64>>::COPY_OPTIMIZATION
2246                        .is_enabled(),
2247            )
2248        };
2249
2250        #[inline]
2251        fn from_wire(wire: crate::wire::CapabilityStoreDictionaryCopyRequest) -> Self {
2252            Self {
2253                id: ::fidl_next::FromWire::from_wire(wire.id),
2254
2255                dest_id: ::fidl_next::FromWire::from_wire(wire.dest_id),
2256            }
2257        }
2258    }
2259
2260    impl ::fidl_next::FromWireRef<crate::wire::CapabilityStoreDictionaryCopyRequest>
2261        for CapabilityStoreDictionaryCopyRequest
2262    {
2263        #[inline]
2264        fn from_wire_ref(wire: &crate::wire::CapabilityStoreDictionaryCopyRequest) -> Self {
2265            Self {
2266                id: ::fidl_next::FromWireRef::from_wire_ref(&wire.id),
2267
2268                dest_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.dest_id),
2269            }
2270        }
2271    }
2272
2273    pub type CapabilityStoreDictionaryCopyResponse = ();
2274
2275    pub type CapabilityStoreDictionaryKeysResponse = ();
2276
2277    pub type CapabilityStoreDictionaryEnumerateResponse = ();
2278
2279    pub type CapabilityStoreDictionaryDrainResponse = ();
2280
2281    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2282    #[repr(u32)]
2283    pub enum RouterError {
2284        NotFound = 1,
2285        InvalidArgs = 2,
2286        NotSupported = 3,
2287        Internal = 4,
2288        UnknownOrdinal_(u32) = 5,
2289    }
2290    impl ::std::convert::From<u32> for RouterError {
2291        fn from(value: u32) -> Self {
2292            match value {
2293                1 => Self::NotFound,
2294                2 => Self::InvalidArgs,
2295                3 => Self::NotSupported,
2296                4 => Self::Internal,
2297
2298                _ => Self::UnknownOrdinal_(value),
2299            }
2300        }
2301    }
2302
2303    unsafe impl<___E> ::fidl_next::Encode<crate::wire::RouterError, ___E> for RouterError
2304    where
2305        ___E: ?Sized,
2306    {
2307        #[inline]
2308        fn encode(
2309            self,
2310            encoder: &mut ___E,
2311            out: &mut ::core::mem::MaybeUninit<crate::wire::RouterError>,
2312            _: (),
2313        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2314            ::fidl_next::Encode::encode(&self, encoder, out, ())
2315        }
2316    }
2317
2318    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::RouterError, ___E> for &'a RouterError
2319    where
2320        ___E: ?Sized,
2321    {
2322        #[inline]
2323        fn encode(
2324            self,
2325            encoder: &mut ___E,
2326            out: &mut ::core::mem::MaybeUninit<crate::wire::RouterError>,
2327            _: (),
2328        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2329            ::fidl_next::munge!(let crate::wire::RouterError { value } = out);
2330            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2331                RouterError::NotFound => 1,
2332
2333                RouterError::InvalidArgs => 2,
2334
2335                RouterError::NotSupported => 3,
2336
2337                RouterError::Internal => 4,
2338
2339                RouterError::UnknownOrdinal_(value) => value,
2340            }));
2341
2342            Ok(())
2343        }
2344    }
2345
2346    impl ::core::convert::From<crate::wire::RouterError> for RouterError {
2347        fn from(wire: crate::wire::RouterError) -> Self {
2348            match u32::from(wire.value) {
2349                1 => Self::NotFound,
2350
2351                2 => Self::InvalidArgs,
2352
2353                3 => Self::NotSupported,
2354
2355                4 => Self::Internal,
2356
2357                value => Self::UnknownOrdinal_(value),
2358            }
2359        }
2360    }
2361
2362    impl ::fidl_next::FromWire<crate::wire::RouterError> for RouterError {
2363        #[inline]
2364        fn from_wire(wire: crate::wire::RouterError) -> Self {
2365            Self::from(wire)
2366        }
2367    }
2368
2369    impl ::fidl_next::FromWireRef<crate::wire::RouterError> for RouterError {
2370        #[inline]
2371        fn from_wire_ref(wire: &crate::wire::RouterError) -> Self {
2372            Self::from(*wire)
2373        }
2374    }
2375
2376    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2377    pub struct DictionaryDrainIteratorGetNextRequest {
2378        pub start_id: u64,
2379
2380        pub limit: u32,
2381    }
2382
2383    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextRequest, ___E>
2384        for DictionaryDrainIteratorGetNextRequest
2385    where
2386        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2387    {
2388        #[inline]
2389        fn encode(
2390            self,
2391            encoder_: &mut ___E,
2392            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryDrainIteratorGetNextRequest>,
2393            _: (),
2394        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2395            ::fidl_next::munge! {
2396                let crate::wire::DictionaryDrainIteratorGetNextRequest {
2397                    start_id,
2398                    limit,
2399
2400                } = out_;
2401            }
2402
2403            ::fidl_next::Encode::encode(self.start_id, encoder_, start_id, ())?;
2404
2405            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_id.as_mut_ptr()) };
2406
2407            ::fidl_next::Encode::encode(self.limit, encoder_, limit, ())?;
2408
2409            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(limit.as_mut_ptr()) };
2410
2411            Ok(())
2412        }
2413    }
2414
2415    unsafe impl<'a, ___E>
2416        ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextRequest, ___E>
2417        for &'a DictionaryDrainIteratorGetNextRequest
2418    where
2419        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2420    {
2421        #[inline]
2422        fn encode(
2423            self,
2424            encoder_: &mut ___E,
2425            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryDrainIteratorGetNextRequest>,
2426            _: (),
2427        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2428            ::fidl_next::munge! {
2429                let crate::wire::DictionaryDrainIteratorGetNextRequest {
2430                    start_id,
2431                    limit,
2432
2433                } = out_;
2434            }
2435
2436            ::fidl_next::Encode::encode(&self.start_id, encoder_, start_id, ())?;
2437
2438            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_id.as_mut_ptr()) };
2439
2440            ::fidl_next::Encode::encode(&self.limit, encoder_, limit, ())?;
2441
2442            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(limit.as_mut_ptr()) };
2443
2444            Ok(())
2445        }
2446    }
2447
2448    unsafe impl<___E>
2449        ::fidl_next::EncodeOption<
2450            ::fidl_next::wire::Box<'static, crate::wire::DictionaryDrainIteratorGetNextRequest>,
2451            ___E,
2452        > for DictionaryDrainIteratorGetNextRequest
2453    where
2454        ___E: ::fidl_next::Encoder + ?Sized,
2455        DictionaryDrainIteratorGetNextRequest:
2456            ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextRequest, ___E>,
2457    {
2458        #[inline]
2459        fn encode_option(
2460            this: ::core::option::Option<Self>,
2461            encoder: &mut ___E,
2462            out: &mut ::core::mem::MaybeUninit<
2463                ::fidl_next::wire::Box<'static, crate::wire::DictionaryDrainIteratorGetNextRequest>,
2464            >,
2465            _: (),
2466        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2467            if let Some(inner) = this {
2468                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2469                ::fidl_next::wire::Box::encode_present(out);
2470            } else {
2471                ::fidl_next::wire::Box::encode_absent(out);
2472            }
2473
2474            Ok(())
2475        }
2476    }
2477
2478    unsafe impl<'a, ___E>
2479        ::fidl_next::EncodeOption<
2480            ::fidl_next::wire::Box<'static, crate::wire::DictionaryDrainIteratorGetNextRequest>,
2481            ___E,
2482        > for &'a DictionaryDrainIteratorGetNextRequest
2483    where
2484        ___E: ::fidl_next::Encoder + ?Sized,
2485        &'a DictionaryDrainIteratorGetNextRequest:
2486            ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextRequest, ___E>,
2487    {
2488        #[inline]
2489        fn encode_option(
2490            this: ::core::option::Option<Self>,
2491            encoder: &mut ___E,
2492            out: &mut ::core::mem::MaybeUninit<
2493                ::fidl_next::wire::Box<'static, crate::wire::DictionaryDrainIteratorGetNextRequest>,
2494            >,
2495            _: (),
2496        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2497            if let Some(inner) = this {
2498                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2499                ::fidl_next::wire::Box::encode_present(out);
2500            } else {
2501                ::fidl_next::wire::Box::encode_absent(out);
2502            }
2503
2504            Ok(())
2505        }
2506    }
2507
2508    impl ::fidl_next::FromWire<crate::wire::DictionaryDrainIteratorGetNextRequest>
2509        for DictionaryDrainIteratorGetNextRequest
2510    {
2511        #[inline]
2512        fn from_wire(wire: crate::wire::DictionaryDrainIteratorGetNextRequest) -> Self {
2513            Self {
2514                start_id: ::fidl_next::FromWire::from_wire(wire.start_id),
2515
2516                limit: ::fidl_next::FromWire::from_wire(wire.limit),
2517            }
2518        }
2519    }
2520
2521    impl ::fidl_next::FromWireRef<crate::wire::DictionaryDrainIteratorGetNextRequest>
2522        for DictionaryDrainIteratorGetNextRequest
2523    {
2524        #[inline]
2525        fn from_wire_ref(wire: &crate::wire::DictionaryDrainIteratorGetNextRequest) -> Self {
2526            Self {
2527                start_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.start_id),
2528
2529                limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.limit),
2530            }
2531        }
2532    }
2533
2534    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2535    pub struct DictionaryEnumerateIteratorGetNextRequest {
2536        pub start_id: u64,
2537
2538        pub limit: u32,
2539    }
2540
2541    unsafe impl<___E>
2542        ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextRequest, ___E>
2543        for DictionaryEnumerateIteratorGetNextRequest
2544    where
2545        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2546    {
2547        #[inline]
2548        fn encode(
2549            self,
2550            encoder_: &mut ___E,
2551            out_: &mut ::core::mem::MaybeUninit<
2552                crate::wire::DictionaryEnumerateIteratorGetNextRequest,
2553            >,
2554            _: (),
2555        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2556            ::fidl_next::munge! {
2557                let crate::wire::DictionaryEnumerateIteratorGetNextRequest {
2558                    start_id,
2559                    limit,
2560
2561                } = out_;
2562            }
2563
2564            ::fidl_next::Encode::encode(self.start_id, encoder_, start_id, ())?;
2565
2566            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_id.as_mut_ptr()) };
2567
2568            ::fidl_next::Encode::encode(self.limit, encoder_, limit, ())?;
2569
2570            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(limit.as_mut_ptr()) };
2571
2572            Ok(())
2573        }
2574    }
2575
2576    unsafe impl<'a, ___E>
2577        ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextRequest, ___E>
2578        for &'a DictionaryEnumerateIteratorGetNextRequest
2579    where
2580        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
2581    {
2582        #[inline]
2583        fn encode(
2584            self,
2585            encoder_: &mut ___E,
2586            out_: &mut ::core::mem::MaybeUninit<
2587                crate::wire::DictionaryEnumerateIteratorGetNextRequest,
2588            >,
2589            _: (),
2590        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2591            ::fidl_next::munge! {
2592                let crate::wire::DictionaryEnumerateIteratorGetNextRequest {
2593                    start_id,
2594                    limit,
2595
2596                } = out_;
2597            }
2598
2599            ::fidl_next::Encode::encode(&self.start_id, encoder_, start_id, ())?;
2600
2601            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(start_id.as_mut_ptr()) };
2602
2603            ::fidl_next::Encode::encode(&self.limit, encoder_, limit, ())?;
2604
2605            let mut _field = unsafe { ::fidl_next::Slot::new_unchecked(limit.as_mut_ptr()) };
2606
2607            Ok(())
2608        }
2609    }
2610
2611    unsafe impl<___E>
2612        ::fidl_next::EncodeOption<
2613            ::fidl_next::wire::Box<'static, crate::wire::DictionaryEnumerateIteratorGetNextRequest>,
2614            ___E,
2615        > for DictionaryEnumerateIteratorGetNextRequest
2616    where
2617        ___E: ::fidl_next::Encoder + ?Sized,
2618        DictionaryEnumerateIteratorGetNextRequest:
2619            ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextRequest, ___E>,
2620    {
2621        #[inline]
2622        fn encode_option(
2623            this: ::core::option::Option<Self>,
2624            encoder: &mut ___E,
2625            out: &mut ::core::mem::MaybeUninit<
2626                ::fidl_next::wire::Box<
2627                    'static,
2628                    crate::wire::DictionaryEnumerateIteratorGetNextRequest,
2629                >,
2630            >,
2631            _: (),
2632        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2633            if let Some(inner) = this {
2634                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2635                ::fidl_next::wire::Box::encode_present(out);
2636            } else {
2637                ::fidl_next::wire::Box::encode_absent(out);
2638            }
2639
2640            Ok(())
2641        }
2642    }
2643
2644    unsafe impl<'a, ___E>
2645        ::fidl_next::EncodeOption<
2646            ::fidl_next::wire::Box<'static, crate::wire::DictionaryEnumerateIteratorGetNextRequest>,
2647            ___E,
2648        > for &'a DictionaryEnumerateIteratorGetNextRequest
2649    where
2650        ___E: ::fidl_next::Encoder + ?Sized,
2651        &'a DictionaryEnumerateIteratorGetNextRequest:
2652            ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextRequest, ___E>,
2653    {
2654        #[inline]
2655        fn encode_option(
2656            this: ::core::option::Option<Self>,
2657            encoder: &mut ___E,
2658            out: &mut ::core::mem::MaybeUninit<
2659                ::fidl_next::wire::Box<
2660                    'static,
2661                    crate::wire::DictionaryEnumerateIteratorGetNextRequest,
2662                >,
2663            >,
2664            _: (),
2665        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2666            if let Some(inner) = this {
2667                ::fidl_next::EncoderExt::encode_next(encoder, inner)?;
2668                ::fidl_next::wire::Box::encode_present(out);
2669            } else {
2670                ::fidl_next::wire::Box::encode_absent(out);
2671            }
2672
2673            Ok(())
2674        }
2675    }
2676
2677    impl ::fidl_next::FromWire<crate::wire::DictionaryEnumerateIteratorGetNextRequest>
2678        for DictionaryEnumerateIteratorGetNextRequest
2679    {
2680        #[inline]
2681        fn from_wire(wire: crate::wire::DictionaryEnumerateIteratorGetNextRequest) -> Self {
2682            Self {
2683                start_id: ::fidl_next::FromWire::from_wire(wire.start_id),
2684
2685                limit: ::fidl_next::FromWire::from_wire(wire.limit),
2686            }
2687        }
2688    }
2689
2690    impl ::fidl_next::FromWireRef<crate::wire::DictionaryEnumerateIteratorGetNextRequest>
2691        for DictionaryEnumerateIteratorGetNextRequest
2692    {
2693        #[inline]
2694        fn from_wire_ref(wire: &crate::wire::DictionaryEnumerateIteratorGetNextRequest) -> Self {
2695            Self {
2696                start_id: ::fidl_next::FromWireRef::from_wire_ref(&wire.start_id),
2697
2698                limit: ::fidl_next::FromWireRef::from_wire_ref(&wire.limit),
2699            }
2700        }
2701    }
2702
2703    #[doc = " Error returned from [CapabilityStore/Dictionary*] methods.\n"]
2704    #[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
2705    #[repr(u32)]
2706    pub enum DictionaryError {
2707        NotFound = 1,
2708        AlreadyExists = 2,
2709        BadCapability = 3,
2710        InvalidKey = 4,
2711        NotCloneable = 5,
2712        UnknownOrdinal_(u32) = 6,
2713    }
2714    impl ::std::convert::From<u32> for DictionaryError {
2715        fn from(value: u32) -> Self {
2716            match value {
2717                1 => Self::NotFound,
2718                2 => Self::AlreadyExists,
2719                3 => Self::BadCapability,
2720                4 => Self::InvalidKey,
2721                5 => Self::NotCloneable,
2722
2723                _ => Self::UnknownOrdinal_(value),
2724            }
2725        }
2726    }
2727
2728    unsafe impl<___E> ::fidl_next::Encode<crate::wire::DictionaryError, ___E> for DictionaryError
2729    where
2730        ___E: ?Sized,
2731    {
2732        #[inline]
2733        fn encode(
2734            self,
2735            encoder: &mut ___E,
2736            out: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryError>,
2737            _: (),
2738        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2739            ::fidl_next::Encode::encode(&self, encoder, out, ())
2740        }
2741    }
2742
2743    unsafe impl<'a, ___E> ::fidl_next::Encode<crate::wire::DictionaryError, ___E>
2744        for &'a DictionaryError
2745    where
2746        ___E: ?Sized,
2747    {
2748        #[inline]
2749        fn encode(
2750            self,
2751            encoder: &mut ___E,
2752            out: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryError>,
2753            _: (),
2754        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
2755            ::fidl_next::munge!(let crate::wire::DictionaryError { value } = out);
2756            let _ = value.write(::fidl_next::wire::Uint32::from(match *self {
2757                DictionaryError::NotFound => 1,
2758
2759                DictionaryError::AlreadyExists => 2,
2760
2761                DictionaryError::BadCapability => 3,
2762
2763                DictionaryError::InvalidKey => 4,
2764
2765                DictionaryError::NotCloneable => 5,
2766
2767                DictionaryError::UnknownOrdinal_(value) => value,
2768            }));
2769
2770            Ok(())
2771        }
2772    }
2773
2774    impl ::core::convert::From<crate::wire::DictionaryError> for DictionaryError {
2775        fn from(wire: crate::wire::DictionaryError) -> Self {
2776            match u32::from(wire.value) {
2777                1 => Self::NotFound,
2778
2779                2 => Self::AlreadyExists,
2780
2781                3 => Self::BadCapability,
2782
2783                4 => Self::InvalidKey,
2784
2785                5 => Self::NotCloneable,
2786
2787                value => Self::UnknownOrdinal_(value),
2788            }
2789        }
2790    }
2791
2792    impl ::fidl_next::FromWire<crate::wire::DictionaryError> for DictionaryError {
2793        #[inline]
2794        fn from_wire(wire: crate::wire::DictionaryError) -> Self {
2795            Self::from(wire)
2796        }
2797    }
2798
2799    impl ::fidl_next::FromWireRef<crate::wire::DictionaryError> for DictionaryError {
2800        #[inline]
2801        fn from_wire_ref(wire: &crate::wire::DictionaryError) -> Self {
2802            Self::from(*wire)
2803        }
2804    }
2805
2806    pub type Unavailable = ();
2807}
2808
2809pub mod wire {
2810
2811    /// The wire type corresponding to [`Availability`].
2812    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
2813    #[repr(transparent)]
2814    pub struct Availability {
2815        pub(crate) value: ::fidl_next::wire::Uint32,
2816    }
2817
2818    impl ::fidl_next::Constrained for Availability {
2819        type Constraint = ();
2820
2821        fn validate(
2822            _: ::fidl_next::Slot<'_, Self>,
2823            _: Self::Constraint,
2824        ) -> Result<(), ::fidl_next::ValidationError> {
2825            Ok(())
2826        }
2827    }
2828
2829    unsafe impl ::fidl_next::Wire for Availability {
2830        type Narrowed<'de> = Self;
2831
2832        #[inline]
2833        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
2834            // Wire enums have no padding
2835        }
2836    }
2837
2838    impl Availability {
2839        pub const REQUIRED: Availability = Availability { value: ::fidl_next::wire::Uint32(1) };
2840
2841        pub const OPTIONAL: Availability = Availability { value: ::fidl_next::wire::Uint32(2) };
2842
2843        pub const SAME_AS_TARGET: Availability =
2844            Availability { value: ::fidl_next::wire::Uint32(3) };
2845
2846        pub const TRANSITIONAL: Availability = Availability { value: ::fidl_next::wire::Uint32(4) };
2847    }
2848
2849    unsafe impl<___D> ::fidl_next::Decode<___D> for Availability
2850    where
2851        ___D: ?Sized,
2852    {
2853        fn decode(
2854            slot: ::fidl_next::Slot<'_, Self>,
2855            _: &mut ___D,
2856            _: (),
2857        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
2858            ::fidl_next::munge!(let Self { value } = slot);
2859
2860            match u32::from(*value) {
2861                1 | 2 | 3 | 4 => (),
2862                unknown => {
2863                    return Err(::fidl_next::DecodeError::InvalidEnumOrdinal(unknown as i128));
2864                }
2865            }
2866
2867            Ok(())
2868        }
2869    }
2870
2871    impl ::core::convert::From<crate::natural::Availability> for Availability {
2872        fn from(natural: crate::natural::Availability) -> Self {
2873            match natural {
2874                crate::natural::Availability::Required => Availability::REQUIRED,
2875
2876                crate::natural::Availability::Optional => Availability::OPTIONAL,
2877
2878                crate::natural::Availability::SameAsTarget => Availability::SAME_AS_TARGET,
2879
2880                crate::natural::Availability::Transitional => Availability::TRANSITIONAL,
2881            }
2882        }
2883    }
2884
2885    impl ::fidl_next::IntoNatural for Availability {
2886        type Natural = crate::natural::Availability;
2887    }
2888
2889    /// The wire type corresponding to [`Unit`].
2890    pub type Unit = ::fidl_next::wire::Unit;
2891
2892    /// The wire type corresponding to [`Data`].
2893    #[repr(transparent)]
2894    pub struct Data<'de> {
2895        pub(crate) raw: ::fidl_next::wire::Union,
2896        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
2897    }
2898
2899    impl<'de> Drop for Data<'de> {
2900        fn drop(&mut self) {
2901            match self.raw.ordinal() {
2902                1 => {
2903                    let _ = unsafe {
2904                        self.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
2905                    };
2906                }
2907
2908                2 => {
2909                    let _ = unsafe {
2910                        self.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
2911                    };
2912                }
2913
2914                3 => {
2915                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Int64>() };
2916                }
2917
2918                4 => {
2919                    let _ = unsafe { self.raw.get().read_unchecked::<::fidl_next::wire::Uint64>() };
2920                }
2921
2922                _ => (),
2923            }
2924        }
2925    }
2926
2927    impl ::fidl_next::Constrained for Data<'_> {
2928        type Constraint = ();
2929
2930        fn validate(
2931            _: ::fidl_next::Slot<'_, Self>,
2932            _: Self::Constraint,
2933        ) -> Result<(), ::fidl_next::ValidationError> {
2934            Ok(())
2935        }
2936    }
2937
2938    unsafe impl ::fidl_next::Wire for Data<'static> {
2939        type Narrowed<'de> = Data<'de>;
2940
2941        #[inline]
2942        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
2943            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
2944            ::fidl_next::wire::Union::zero_padding(raw);
2945        }
2946    }
2947
2948    pub mod data {
2949        pub enum Ref<'de> {
2950            Bytes(&'de ::fidl_next::wire::Vector<'de, u8>),
2951
2952            String(&'de ::fidl_next::wire::String<'de>),
2953
2954            Int64(&'de ::fidl_next::wire::Int64),
2955
2956            Uint64(&'de ::fidl_next::wire::Uint64),
2957
2958            UnknownOrdinal_(u64),
2959        }
2960
2961        pub enum Value<'de> {
2962            Bytes(::fidl_next::wire::Vector<'de, u8>),
2963
2964            String(::fidl_next::wire::String<'de>),
2965
2966            Int64(::fidl_next::wire::Int64),
2967
2968            Uint64(::fidl_next::wire::Uint64),
2969
2970            UnknownOrdinal_(u64),
2971        }
2972    }
2973
2974    impl<'de> Data<'de> {
2975        pub fn as_ref(&self) -> crate::wire::data::Ref<'_> {
2976            match self.raw.ordinal() {
2977                1 => crate::wire::data::Ref::Bytes(unsafe {
2978                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>()
2979                }),
2980
2981                2 => crate::wire::data::Ref::String(unsafe {
2982                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>()
2983                }),
2984
2985                3 => crate::wire::data::Ref::Int64(unsafe {
2986                    self.raw.get().deref_unchecked::<::fidl_next::wire::Int64>()
2987                }),
2988
2989                4 => crate::wire::data::Ref::Uint64(unsafe {
2990                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>()
2991                }),
2992
2993                unknown => crate::wire::data::Ref::UnknownOrdinal_(unknown),
2994            }
2995        }
2996
2997        pub fn into_inner(self) -> crate::wire::data::Value<'de> {
2998            let this = ::core::mem::ManuallyDrop::new(self);
2999
3000            match this.raw.ordinal() {
3001                1 => crate::wire::data::Value::Bytes(unsafe {
3002                    this.raw.get().read_unchecked::<::fidl_next::wire::Vector<'de, u8>>()
3003                }),
3004
3005                2 => crate::wire::data::Value::String(unsafe {
3006                    this.raw.get().read_unchecked::<::fidl_next::wire::String<'de>>()
3007                }),
3008
3009                3 => crate::wire::data::Value::Int64(unsafe {
3010                    this.raw.get().read_unchecked::<::fidl_next::wire::Int64>()
3011                }),
3012
3013                4 => crate::wire::data::Value::Uint64(unsafe {
3014                    this.raw.get().read_unchecked::<::fidl_next::wire::Uint64>()
3015                }),
3016
3017                unknown => crate::wire::data::Value::UnknownOrdinal_(unknown),
3018            }
3019        }
3020    }
3021
3022    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Data<'de>
3023    where
3024        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3025        ___D: ::fidl_next::Decoder<'de>,
3026    {
3027        fn decode(
3028            mut slot: ::fidl_next::Slot<'_, Self>,
3029            decoder: &mut ___D,
3030            _: (),
3031        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3032            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
3033            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
3034                1 => {
3035                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
3036                        raw,
3037                        decoder,
3038                        (8192, ()),
3039                    )?
3040                }
3041
3042                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
3043                    raw, decoder, 8192,
3044                )?,
3045
3046                3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int64>(
3047                    raw,
3048                    decoder,
3049                    (),
3050                )?,
3051
3052                4 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
3053                    raw,
3054                    decoder,
3055                    (),
3056                )?,
3057
3058                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
3059            }
3060
3061            Ok(())
3062        }
3063    }
3064
3065    impl<'de> ::core::fmt::Debug for Data<'de> {
3066        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
3067            match self.raw.ordinal() {
3068                1 => unsafe {
3069                    self.raw.get().deref_unchecked::<::fidl_next::wire::Vector<'_, u8>>().fmt(f)
3070                },
3071                2 => unsafe {
3072                    self.raw.get().deref_unchecked::<::fidl_next::wire::String<'_>>().fmt(f)
3073                },
3074                3 => unsafe { self.raw.get().deref_unchecked::<::fidl_next::wire::Int64>().fmt(f) },
3075                4 => unsafe {
3076                    self.raw.get().deref_unchecked::<::fidl_next::wire::Uint64>().fmt(f)
3077                },
3078                _ => unsafe { ::core::hint::unreachable_unchecked() },
3079            }
3080        }
3081    }
3082
3083    impl<'de> ::fidl_next::IntoNatural for Data<'de> {
3084        type Natural = crate::natural::Data;
3085    }
3086
3087    /// The wire type corresponding to [`CapabilityId`](crate::natural::CapabilityId).
3088    pub type CapabilityId = ::fidl_next::wire::Uint64;
3089
3090    /// The wire type corresponding to [`NewCapabilityId`](crate::natural::NewCapabilityId).
3091    pub type NewCapabilityId = ::fidl_next::wire::Uint64;
3092
3093    /// The wire type corresponding to [`CapabilityStoreDuplicateRequest`].
3094    #[derive(Clone, Debug)]
3095    #[repr(C)]
3096    pub struct CapabilityStoreDuplicateRequest {
3097        pub id: ::fidl_next::wire::Uint64,
3098
3099        pub dest_id: ::fidl_next::wire::Uint64,
3100    }
3101
3102    static_assertions::const_assert_eq!(std::mem::size_of::<CapabilityStoreDuplicateRequest>(), 16);
3103    static_assertions::const_assert_eq!(std::mem::align_of::<CapabilityStoreDuplicateRequest>(), 8);
3104
3105    static_assertions::const_assert_eq!(
3106        std::mem::offset_of!(CapabilityStoreDuplicateRequest, id),
3107        0
3108    );
3109
3110    static_assertions::const_assert_eq!(
3111        std::mem::offset_of!(CapabilityStoreDuplicateRequest, dest_id),
3112        8
3113    );
3114
3115    impl ::fidl_next::Constrained for CapabilityStoreDuplicateRequest {
3116        type Constraint = ();
3117
3118        fn validate(
3119            _: ::fidl_next::Slot<'_, Self>,
3120            _: Self::Constraint,
3121        ) -> Result<(), ::fidl_next::ValidationError> {
3122            Ok(())
3123        }
3124    }
3125
3126    unsafe impl ::fidl_next::Wire for CapabilityStoreDuplicateRequest {
3127        type Narrowed<'de> = CapabilityStoreDuplicateRequest;
3128
3129        #[inline]
3130        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3131            ::fidl_next::munge! {
3132                let Self {
3133                    id,
3134                    dest_id,
3135
3136                } = &mut *out_;
3137            }
3138
3139            ::fidl_next::Wire::zero_padding(id);
3140
3141            ::fidl_next::Wire::zero_padding(dest_id);
3142        }
3143    }
3144
3145    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDuplicateRequest
3146    where
3147        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3148    {
3149        fn decode(
3150            slot_: ::fidl_next::Slot<'_, Self>,
3151            decoder_: &mut ___D,
3152            _: (),
3153        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3154            ::fidl_next::munge! {
3155                let Self {
3156                    mut id,
3157                    mut dest_id,
3158
3159                } = slot_;
3160            }
3161
3162            let _field = id.as_mut();
3163
3164            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3165
3166            let _field = dest_id.as_mut();
3167
3168            ::fidl_next::Decode::decode(dest_id.as_mut(), decoder_, ())?;
3169
3170            Ok(())
3171        }
3172    }
3173
3174    impl ::fidl_next::IntoNatural for CapabilityStoreDuplicateRequest {
3175        type Natural = crate::natural::CapabilityStoreDuplicateRequest;
3176    }
3177
3178    /// The wire type corresponding to [`CapabilityStoreDuplicateResponse`].
3179    pub type CapabilityStoreDuplicateResponse = ::fidl_next::wire::Unit;
3180
3181    /// The wire type corresponding to [`CapabilityStoreError`].
3182    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
3183    #[repr(transparent)]
3184    pub struct CapabilityStoreError {
3185        pub(crate) value: ::fidl_next::wire::Uint32,
3186    }
3187
3188    impl ::fidl_next::Constrained for CapabilityStoreError {
3189        type Constraint = ();
3190
3191        fn validate(
3192            _: ::fidl_next::Slot<'_, Self>,
3193            _: Self::Constraint,
3194        ) -> Result<(), ::fidl_next::ValidationError> {
3195            Ok(())
3196        }
3197    }
3198
3199    unsafe impl ::fidl_next::Wire for CapabilityStoreError {
3200        type Narrowed<'de> = Self;
3201
3202        #[inline]
3203        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
3204            // Wire enums have no padding
3205        }
3206    }
3207
3208    impl CapabilityStoreError {
3209        pub const ID_NOT_FOUND: CapabilityStoreError =
3210            CapabilityStoreError { value: ::fidl_next::wire::Uint32(1) };
3211
3212        pub const ID_ALREADY_EXISTS: CapabilityStoreError =
3213            CapabilityStoreError { value: ::fidl_next::wire::Uint32(2) };
3214
3215        pub const BAD_CAPABILITY: CapabilityStoreError =
3216            CapabilityStoreError { value: ::fidl_next::wire::Uint32(3) };
3217
3218        pub const WRONG_TYPE: CapabilityStoreError =
3219            CapabilityStoreError { value: ::fidl_next::wire::Uint32(4) };
3220
3221        pub const NOT_DUPLICATABLE: CapabilityStoreError =
3222            CapabilityStoreError { value: ::fidl_next::wire::Uint32(5) };
3223
3224        pub const ITEM_NOT_FOUND: CapabilityStoreError =
3225            CapabilityStoreError { value: ::fidl_next::wire::Uint32(6) };
3226
3227        pub const ITEM_ALREADY_EXISTS: CapabilityStoreError =
3228            CapabilityStoreError { value: ::fidl_next::wire::Uint32(7) };
3229
3230        pub const INVALID_KEY: CapabilityStoreError =
3231            CapabilityStoreError { value: ::fidl_next::wire::Uint32(8) };
3232
3233        pub const INVALID_ARGS: CapabilityStoreError =
3234            CapabilityStoreError { value: ::fidl_next::wire::Uint32(9) };
3235    }
3236
3237    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreError
3238    where
3239        ___D: ?Sized,
3240    {
3241        fn decode(
3242            slot: ::fidl_next::Slot<'_, Self>,
3243            _: &mut ___D,
3244            _: (),
3245        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3246            Ok(())
3247        }
3248    }
3249
3250    impl ::core::convert::From<crate::natural::CapabilityStoreError> for CapabilityStoreError {
3251        fn from(natural: crate::natural::CapabilityStoreError) -> Self {
3252            match natural {
3253                crate::natural::CapabilityStoreError::IdNotFound => {
3254                    CapabilityStoreError::ID_NOT_FOUND
3255                }
3256
3257                crate::natural::CapabilityStoreError::IdAlreadyExists => {
3258                    CapabilityStoreError::ID_ALREADY_EXISTS
3259                }
3260
3261                crate::natural::CapabilityStoreError::BadCapability => {
3262                    CapabilityStoreError::BAD_CAPABILITY
3263                }
3264
3265                crate::natural::CapabilityStoreError::WrongType => CapabilityStoreError::WRONG_TYPE,
3266
3267                crate::natural::CapabilityStoreError::NotDuplicatable => {
3268                    CapabilityStoreError::NOT_DUPLICATABLE
3269                }
3270
3271                crate::natural::CapabilityStoreError::ItemNotFound => {
3272                    CapabilityStoreError::ITEM_NOT_FOUND
3273                }
3274
3275                crate::natural::CapabilityStoreError::ItemAlreadyExists => {
3276                    CapabilityStoreError::ITEM_ALREADY_EXISTS
3277                }
3278
3279                crate::natural::CapabilityStoreError::InvalidKey => {
3280                    CapabilityStoreError::INVALID_KEY
3281                }
3282
3283                crate::natural::CapabilityStoreError::InvalidArgs => {
3284                    CapabilityStoreError::INVALID_ARGS
3285                }
3286
3287                crate::natural::CapabilityStoreError::UnknownOrdinal_(value) => {
3288                    CapabilityStoreError { value: ::fidl_next::wire::Uint32::from(value) }
3289                }
3290            }
3291        }
3292    }
3293
3294    impl ::fidl_next::IntoNatural for CapabilityStoreError {
3295        type Natural = crate::natural::CapabilityStoreError;
3296    }
3297
3298    /// The wire type corresponding to [`CapabilityStoreDropRequest`].
3299    #[derive(Clone, Debug)]
3300    #[repr(C)]
3301    pub struct CapabilityStoreDropRequest {
3302        pub id: ::fidl_next::wire::Uint64,
3303    }
3304
3305    static_assertions::const_assert_eq!(std::mem::size_of::<CapabilityStoreDropRequest>(), 8);
3306    static_assertions::const_assert_eq!(std::mem::align_of::<CapabilityStoreDropRequest>(), 8);
3307
3308    static_assertions::const_assert_eq!(std::mem::offset_of!(CapabilityStoreDropRequest, id), 0);
3309
3310    impl ::fidl_next::Constrained for CapabilityStoreDropRequest {
3311        type Constraint = ();
3312
3313        fn validate(
3314            _: ::fidl_next::Slot<'_, Self>,
3315            _: Self::Constraint,
3316        ) -> Result<(), ::fidl_next::ValidationError> {
3317            Ok(())
3318        }
3319    }
3320
3321    unsafe impl ::fidl_next::Wire for CapabilityStoreDropRequest {
3322        type Narrowed<'de> = CapabilityStoreDropRequest;
3323
3324        #[inline]
3325        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3326            ::fidl_next::munge! {
3327                let Self {
3328                    id,
3329
3330                } = &mut *out_;
3331            }
3332
3333            ::fidl_next::Wire::zero_padding(id);
3334        }
3335    }
3336
3337    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDropRequest
3338    where
3339        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3340    {
3341        fn decode(
3342            slot_: ::fidl_next::Slot<'_, Self>,
3343            decoder_: &mut ___D,
3344            _: (),
3345        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3346            ::fidl_next::munge! {
3347                let Self {
3348                    mut id,
3349
3350                } = slot_;
3351            }
3352
3353            let _field = id.as_mut();
3354
3355            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3356
3357            Ok(())
3358        }
3359    }
3360
3361    impl ::fidl_next::IntoNatural for CapabilityStoreDropRequest {
3362        type Natural = crate::natural::CapabilityStoreDropRequest;
3363    }
3364
3365    /// The wire type corresponding to [`CapabilityStoreDropResponse`].
3366    pub type CapabilityStoreDropResponse = ::fidl_next::wire::Unit;
3367
3368    /// The wire type corresponding to [`CapabilityStoreExportRequest`].
3369    #[derive(Clone, Debug)]
3370    #[repr(C)]
3371    pub struct CapabilityStoreExportRequest {
3372        pub id: ::fidl_next::wire::Uint64,
3373    }
3374
3375    static_assertions::const_assert_eq!(std::mem::size_of::<CapabilityStoreExportRequest>(), 8);
3376    static_assertions::const_assert_eq!(std::mem::align_of::<CapabilityStoreExportRequest>(), 8);
3377
3378    static_assertions::const_assert_eq!(std::mem::offset_of!(CapabilityStoreExportRequest, id), 0);
3379
3380    impl ::fidl_next::Constrained for CapabilityStoreExportRequest {
3381        type Constraint = ();
3382
3383        fn validate(
3384            _: ::fidl_next::Slot<'_, Self>,
3385            _: Self::Constraint,
3386        ) -> Result<(), ::fidl_next::ValidationError> {
3387            Ok(())
3388        }
3389    }
3390
3391    unsafe impl ::fidl_next::Wire for CapabilityStoreExportRequest {
3392        type Narrowed<'de> = CapabilityStoreExportRequest;
3393
3394        #[inline]
3395        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3396            ::fidl_next::munge! {
3397                let Self {
3398                    id,
3399
3400                } = &mut *out_;
3401            }
3402
3403            ::fidl_next::Wire::zero_padding(id);
3404        }
3405    }
3406
3407    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreExportRequest
3408    where
3409        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3410    {
3411        fn decode(
3412            slot_: ::fidl_next::Slot<'_, Self>,
3413            decoder_: &mut ___D,
3414            _: (),
3415        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3416            ::fidl_next::munge! {
3417                let Self {
3418                    mut id,
3419
3420                } = slot_;
3421            }
3422
3423            let _field = id.as_mut();
3424
3425            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3426
3427            Ok(())
3428        }
3429    }
3430
3431    impl ::fidl_next::IntoNatural for CapabilityStoreExportRequest {
3432        type Natural = crate::natural::CapabilityStoreExportRequest;
3433    }
3434
3435    /// The wire type corresponding to [`CapabilityStoreImportResponse`].
3436    pub type CapabilityStoreImportResponse = ::fidl_next::wire::Unit;
3437
3438    /// The wire type corresponding to [`CapabilityStoreConnectorCreateResponse`].
3439    pub type CapabilityStoreConnectorCreateResponse = ::fidl_next::wire::Unit;
3440
3441    /// The wire type corresponding to [`CapabilityStoreConnectorOpenResponse`].
3442    pub type CapabilityStoreConnectorOpenResponse = ::fidl_next::wire::Unit;
3443
3444    /// The wire type corresponding to [`CapabilityStoreDirConnectorCreateResponse`].
3445    pub type CapabilityStoreDirConnectorCreateResponse = ::fidl_next::wire::Unit;
3446
3447    /// The wire type corresponding to [`CapabilityStoreDirConnectorOpenResponse`].
3448    pub type CapabilityStoreDirConnectorOpenResponse = ::fidl_next::wire::Unit;
3449
3450    /// The wire type corresponding to [`CapabilityStoreDictionaryCreateRequest`].
3451    #[derive(Clone, Debug)]
3452    #[repr(C)]
3453    pub struct CapabilityStoreDictionaryCreateRequest {
3454        pub id: ::fidl_next::wire::Uint64,
3455    }
3456
3457    static_assertions::const_assert_eq!(
3458        std::mem::size_of::<CapabilityStoreDictionaryCreateRequest>(),
3459        8
3460    );
3461    static_assertions::const_assert_eq!(
3462        std::mem::align_of::<CapabilityStoreDictionaryCreateRequest>(),
3463        8
3464    );
3465
3466    static_assertions::const_assert_eq!(
3467        std::mem::offset_of!(CapabilityStoreDictionaryCreateRequest, id),
3468        0
3469    );
3470
3471    impl ::fidl_next::Constrained for CapabilityStoreDictionaryCreateRequest {
3472        type Constraint = ();
3473
3474        fn validate(
3475            _: ::fidl_next::Slot<'_, Self>,
3476            _: Self::Constraint,
3477        ) -> Result<(), ::fidl_next::ValidationError> {
3478            Ok(())
3479        }
3480    }
3481
3482    unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryCreateRequest {
3483        type Narrowed<'de> = CapabilityStoreDictionaryCreateRequest;
3484
3485        #[inline]
3486        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3487            ::fidl_next::munge! {
3488                let Self {
3489                    id,
3490
3491                } = &mut *out_;
3492            }
3493
3494            ::fidl_next::Wire::zero_padding(id);
3495        }
3496    }
3497
3498    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryCreateRequest
3499    where
3500        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3501    {
3502        fn decode(
3503            slot_: ::fidl_next::Slot<'_, Self>,
3504            decoder_: &mut ___D,
3505            _: (),
3506        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3507            ::fidl_next::munge! {
3508                let Self {
3509                    mut id,
3510
3511                } = slot_;
3512            }
3513
3514            let _field = id.as_mut();
3515
3516            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3517
3518            Ok(())
3519        }
3520    }
3521
3522    impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryCreateRequest {
3523        type Natural = crate::natural::CapabilityStoreDictionaryCreateRequest;
3524    }
3525
3526    /// The wire type corresponding to [`CapabilityStoreDictionaryCreateResponse`].
3527    pub type CapabilityStoreDictionaryCreateResponse = ::fidl_next::wire::Unit;
3528
3529    /// The wire type corresponding to [`CapabilityStoreDictionaryLegacyImportResponse`].
3530    pub type CapabilityStoreDictionaryLegacyImportResponse = ::fidl_next::wire::Unit;
3531
3532    /// The wire type corresponding to [`CapabilityStoreDictionaryLegacyExportResponse`].
3533    pub type CapabilityStoreDictionaryLegacyExportResponse = ::fidl_next::wire::Unit;
3534
3535    /// The wire type corresponding to [`DictionaryKey`](crate::natural::DictionaryKey).
3536    pub type DictionaryKey<'de> = ::fidl_next::wire::String<'de>;
3537
3538    /// The wire type corresponding to [`DictionaryItem`].
3539    #[derive(Debug)]
3540    #[repr(C)]
3541    pub struct DictionaryItem<'de> {
3542        pub key: ::fidl_next::wire::String<'de>,
3543
3544        pub value: ::fidl_next::wire::Uint64,
3545    }
3546
3547    static_assertions::const_assert_eq!(std::mem::size_of::<DictionaryItem<'_>>(), 24);
3548    static_assertions::const_assert_eq!(std::mem::align_of::<DictionaryItem<'_>>(), 8);
3549
3550    static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryItem<'_>, key), 0);
3551
3552    static_assertions::const_assert_eq!(std::mem::offset_of!(DictionaryItem<'_>, value), 16);
3553
3554    impl ::fidl_next::Constrained for DictionaryItem<'_> {
3555        type Constraint = ();
3556
3557        fn validate(
3558            _: ::fidl_next::Slot<'_, Self>,
3559            _: Self::Constraint,
3560        ) -> Result<(), ::fidl_next::ValidationError> {
3561            Ok(())
3562        }
3563    }
3564
3565    unsafe impl ::fidl_next::Wire for DictionaryItem<'static> {
3566        type Narrowed<'de> = DictionaryItem<'de>;
3567
3568        #[inline]
3569        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3570            ::fidl_next::munge! {
3571                let Self {
3572                    key,
3573                    value,
3574
3575                } = &mut *out_;
3576            }
3577
3578            ::fidl_next::Wire::zero_padding(key);
3579
3580            ::fidl_next::Wire::zero_padding(value);
3581        }
3582    }
3583
3584    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for DictionaryItem<'de>
3585    where
3586        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3587        ___D: ::fidl_next::Decoder<'de>,
3588    {
3589        fn decode(
3590            slot_: ::fidl_next::Slot<'_, Self>,
3591            decoder_: &mut ___D,
3592            _: (),
3593        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3594            ::fidl_next::munge! {
3595                let Self {
3596                    mut key,
3597                    mut value,
3598
3599                } = slot_;
3600            }
3601
3602            let _field = key.as_mut();
3603            ::fidl_next::Constrained::validate(_field, 255)?;
3604            ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
3605
3606            let key = unsafe { key.deref_unchecked() };
3607
3608            if key.len() > 255 {
3609                return Err(::fidl_next::DecodeError::VectorTooLong {
3610                    size: key.len() as u64,
3611                    limit: 255,
3612                });
3613            }
3614
3615            let _field = value.as_mut();
3616
3617            ::fidl_next::Decode::decode(value.as_mut(), decoder_, ())?;
3618
3619            Ok(())
3620        }
3621    }
3622
3623    impl<'de> ::fidl_next::IntoNatural for DictionaryItem<'de> {
3624        type Natural = crate::natural::DictionaryItem;
3625    }
3626
3627    /// The wire type corresponding to [`CapabilityStoreDictionaryInsertRequest`].
3628    #[derive(Debug)]
3629    #[repr(C)]
3630    pub struct CapabilityStoreDictionaryInsertRequest<'de> {
3631        pub id: ::fidl_next::wire::Uint64,
3632
3633        pub item: crate::wire::DictionaryItem<'de>,
3634    }
3635
3636    static_assertions::const_assert_eq!(
3637        std::mem::size_of::<CapabilityStoreDictionaryInsertRequest<'_>>(),
3638        32
3639    );
3640    static_assertions::const_assert_eq!(
3641        std::mem::align_of::<CapabilityStoreDictionaryInsertRequest<'_>>(),
3642        8
3643    );
3644
3645    static_assertions::const_assert_eq!(
3646        std::mem::offset_of!(CapabilityStoreDictionaryInsertRequest<'_>, id),
3647        0
3648    );
3649
3650    static_assertions::const_assert_eq!(
3651        std::mem::offset_of!(CapabilityStoreDictionaryInsertRequest<'_>, item),
3652        8
3653    );
3654
3655    impl ::fidl_next::Constrained for CapabilityStoreDictionaryInsertRequest<'_> {
3656        type Constraint = ();
3657
3658        fn validate(
3659            _: ::fidl_next::Slot<'_, Self>,
3660            _: Self::Constraint,
3661        ) -> Result<(), ::fidl_next::ValidationError> {
3662            Ok(())
3663        }
3664    }
3665
3666    unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryInsertRequest<'static> {
3667        type Narrowed<'de> = CapabilityStoreDictionaryInsertRequest<'de>;
3668
3669        #[inline]
3670        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3671            ::fidl_next::munge! {
3672                let Self {
3673                    id,
3674                    item,
3675
3676                } = &mut *out_;
3677            }
3678
3679            ::fidl_next::Wire::zero_padding(id);
3680
3681            ::fidl_next::Wire::zero_padding(item);
3682        }
3683    }
3684
3685    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryInsertRequest<'de>
3686    where
3687        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3688        ___D: ::fidl_next::Decoder<'de>,
3689    {
3690        fn decode(
3691            slot_: ::fidl_next::Slot<'_, Self>,
3692            decoder_: &mut ___D,
3693            _: (),
3694        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3695            ::fidl_next::munge! {
3696                let Self {
3697                    mut id,
3698                    mut item,
3699
3700                } = slot_;
3701            }
3702
3703            let _field = id.as_mut();
3704
3705            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3706
3707            let _field = item.as_mut();
3708
3709            ::fidl_next::Decode::decode(item.as_mut(), decoder_, ())?;
3710
3711            Ok(())
3712        }
3713    }
3714
3715    impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDictionaryInsertRequest<'de> {
3716        type Natural = crate::natural::CapabilityStoreDictionaryInsertRequest;
3717    }
3718
3719    /// The wire type corresponding to [`CapabilityStoreDictionaryInsertResponse`].
3720    pub type CapabilityStoreDictionaryInsertResponse = ::fidl_next::wire::Unit;
3721
3722    /// The wire type corresponding to [`CapabilityStoreDictionaryGetRequest`].
3723    #[derive(Debug)]
3724    #[repr(C)]
3725    pub struct CapabilityStoreDictionaryGetRequest<'de> {
3726        pub id: ::fidl_next::wire::Uint64,
3727
3728        pub key: ::fidl_next::wire::String<'de>,
3729
3730        pub dest_id: ::fidl_next::wire::Uint64,
3731    }
3732
3733    static_assertions::const_assert_eq!(
3734        std::mem::size_of::<CapabilityStoreDictionaryGetRequest<'_>>(),
3735        32
3736    );
3737    static_assertions::const_assert_eq!(
3738        std::mem::align_of::<CapabilityStoreDictionaryGetRequest<'_>>(),
3739        8
3740    );
3741
3742    static_assertions::const_assert_eq!(
3743        std::mem::offset_of!(CapabilityStoreDictionaryGetRequest<'_>, id),
3744        0
3745    );
3746
3747    static_assertions::const_assert_eq!(
3748        std::mem::offset_of!(CapabilityStoreDictionaryGetRequest<'_>, key),
3749        8
3750    );
3751
3752    static_assertions::const_assert_eq!(
3753        std::mem::offset_of!(CapabilityStoreDictionaryGetRequest<'_>, dest_id),
3754        24
3755    );
3756
3757    impl ::fidl_next::Constrained for CapabilityStoreDictionaryGetRequest<'_> {
3758        type Constraint = ();
3759
3760        fn validate(
3761            _: ::fidl_next::Slot<'_, Self>,
3762            _: Self::Constraint,
3763        ) -> Result<(), ::fidl_next::ValidationError> {
3764            Ok(())
3765        }
3766    }
3767
3768    unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryGetRequest<'static> {
3769        type Narrowed<'de> = CapabilityStoreDictionaryGetRequest<'de>;
3770
3771        #[inline]
3772        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3773            ::fidl_next::munge! {
3774                let Self {
3775                    id,
3776                    key,
3777                    dest_id,
3778
3779                } = &mut *out_;
3780            }
3781
3782            ::fidl_next::Wire::zero_padding(id);
3783
3784            ::fidl_next::Wire::zero_padding(key);
3785
3786            ::fidl_next::Wire::zero_padding(dest_id);
3787        }
3788    }
3789
3790    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryGetRequest<'de>
3791    where
3792        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3793        ___D: ::fidl_next::Decoder<'de>,
3794    {
3795        fn decode(
3796            slot_: ::fidl_next::Slot<'_, Self>,
3797            decoder_: &mut ___D,
3798            _: (),
3799        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3800            ::fidl_next::munge! {
3801                let Self {
3802                    mut id,
3803                    mut key,
3804                    mut dest_id,
3805
3806                } = slot_;
3807            }
3808
3809            let _field = id.as_mut();
3810
3811            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3812
3813            let _field = key.as_mut();
3814            ::fidl_next::Constrained::validate(_field, 255)?;
3815            ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
3816
3817            let key = unsafe { key.deref_unchecked() };
3818
3819            if key.len() > 255 {
3820                return Err(::fidl_next::DecodeError::VectorTooLong {
3821                    size: key.len() as u64,
3822                    limit: 255,
3823                });
3824            }
3825
3826            let _field = dest_id.as_mut();
3827
3828            ::fidl_next::Decode::decode(dest_id.as_mut(), decoder_, ())?;
3829
3830            Ok(())
3831        }
3832    }
3833
3834    impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDictionaryGetRequest<'de> {
3835        type Natural = crate::natural::CapabilityStoreDictionaryGetRequest;
3836    }
3837
3838    /// The wire type corresponding to [`CapabilityStoreDictionaryGetResponse`].
3839    pub type CapabilityStoreDictionaryGetResponse = ::fidl_next::wire::Unit;
3840
3841    /// The wire type corresponding to [`WrappedCapabilityId`].
3842    #[derive(Clone, Debug)]
3843    #[repr(C)]
3844    pub struct WrappedCapabilityId {
3845        pub id: ::fidl_next::wire::Uint64,
3846    }
3847
3848    static_assertions::const_assert_eq!(std::mem::size_of::<WrappedCapabilityId>(), 8);
3849    static_assertions::const_assert_eq!(std::mem::align_of::<WrappedCapabilityId>(), 8);
3850
3851    static_assertions::const_assert_eq!(std::mem::offset_of!(WrappedCapabilityId, id), 0);
3852
3853    impl ::fidl_next::Constrained for WrappedCapabilityId {
3854        type Constraint = ();
3855
3856        fn validate(
3857            _: ::fidl_next::Slot<'_, Self>,
3858            _: Self::Constraint,
3859        ) -> Result<(), ::fidl_next::ValidationError> {
3860            Ok(())
3861        }
3862    }
3863
3864    unsafe impl ::fidl_next::Wire for WrappedCapabilityId {
3865        type Narrowed<'de> = WrappedCapabilityId;
3866
3867        #[inline]
3868        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3869            ::fidl_next::munge! {
3870                let Self {
3871                    id,
3872
3873                } = &mut *out_;
3874            }
3875
3876            ::fidl_next::Wire::zero_padding(id);
3877        }
3878    }
3879
3880    unsafe impl<___D> ::fidl_next::Decode<___D> for WrappedCapabilityId
3881    where
3882        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3883    {
3884        fn decode(
3885            slot_: ::fidl_next::Slot<'_, Self>,
3886            decoder_: &mut ___D,
3887            _: (),
3888        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3889            ::fidl_next::munge! {
3890                let Self {
3891                    mut id,
3892
3893                } = slot_;
3894            }
3895
3896            let _field = id.as_mut();
3897
3898            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
3899
3900            Ok(())
3901        }
3902    }
3903
3904    impl ::fidl_next::IntoNatural for WrappedCapabilityId {
3905        type Natural = crate::natural::WrappedCapabilityId;
3906    }
3907
3908    /// The wire type corresponding to [`WrappedNewCapabilityId`](crate::natural::WrappedNewCapabilityId).
3909    pub type WrappedNewCapabilityId = crate::wire::WrappedCapabilityId;
3910
3911    /// The wire type corresponding to [`CapabilityStoreDictionaryRemoveRequest`].
3912    #[derive(Debug)]
3913    #[repr(C)]
3914    pub struct CapabilityStoreDictionaryRemoveRequest<'de> {
3915        pub id: ::fidl_next::wire::Uint64,
3916
3917        pub key: ::fidl_next::wire::String<'de>,
3918
3919        pub dest_id: ::fidl_next::wire::Box<'de, crate::wire::WrappedCapabilityId>,
3920    }
3921
3922    static_assertions::const_assert_eq!(
3923        std::mem::size_of::<CapabilityStoreDictionaryRemoveRequest<'_>>(),
3924        32
3925    );
3926    static_assertions::const_assert_eq!(
3927        std::mem::align_of::<CapabilityStoreDictionaryRemoveRequest<'_>>(),
3928        8
3929    );
3930
3931    static_assertions::const_assert_eq!(
3932        std::mem::offset_of!(CapabilityStoreDictionaryRemoveRequest<'_>, id),
3933        0
3934    );
3935
3936    static_assertions::const_assert_eq!(
3937        std::mem::offset_of!(CapabilityStoreDictionaryRemoveRequest<'_>, key),
3938        8
3939    );
3940
3941    static_assertions::const_assert_eq!(
3942        std::mem::offset_of!(CapabilityStoreDictionaryRemoveRequest<'_>, dest_id),
3943        24
3944    );
3945
3946    impl ::fidl_next::Constrained for CapabilityStoreDictionaryRemoveRequest<'_> {
3947        type Constraint = ();
3948
3949        fn validate(
3950            _: ::fidl_next::Slot<'_, Self>,
3951            _: Self::Constraint,
3952        ) -> Result<(), ::fidl_next::ValidationError> {
3953            Ok(())
3954        }
3955    }
3956
3957    unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryRemoveRequest<'static> {
3958        type Narrowed<'de> = CapabilityStoreDictionaryRemoveRequest<'de>;
3959
3960        #[inline]
3961        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
3962            ::fidl_next::munge! {
3963                let Self {
3964                    id,
3965                    key,
3966                    dest_id,
3967
3968                } = &mut *out_;
3969            }
3970
3971            ::fidl_next::Wire::zero_padding(id);
3972
3973            ::fidl_next::Wire::zero_padding(key);
3974
3975            ::fidl_next::Wire::zero_padding(dest_id);
3976        }
3977    }
3978
3979    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryRemoveRequest<'de>
3980    where
3981        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
3982        ___D: ::fidl_next::Decoder<'de>,
3983    {
3984        fn decode(
3985            slot_: ::fidl_next::Slot<'_, Self>,
3986            decoder_: &mut ___D,
3987            _: (),
3988        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
3989            ::fidl_next::munge! {
3990                let Self {
3991                    mut id,
3992                    mut key,
3993                    mut dest_id,
3994
3995                } = slot_;
3996            }
3997
3998            let _field = id.as_mut();
3999
4000            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4001
4002            let _field = key.as_mut();
4003            ::fidl_next::Constrained::validate(_field, 255)?;
4004            ::fidl_next::Decode::decode(key.as_mut(), decoder_, 255)?;
4005
4006            let key = unsafe { key.deref_unchecked() };
4007
4008            if key.len() > 255 {
4009                return Err(::fidl_next::DecodeError::VectorTooLong {
4010                    size: key.len() as u64,
4011                    limit: 255,
4012                });
4013            }
4014
4015            let _field = dest_id.as_mut();
4016
4017            ::fidl_next::Decode::decode(dest_id.as_mut(), decoder_, ())?;
4018
4019            Ok(())
4020        }
4021    }
4022
4023    impl<'de> ::fidl_next::IntoNatural for CapabilityStoreDictionaryRemoveRequest<'de> {
4024        type Natural = crate::natural::CapabilityStoreDictionaryRemoveRequest;
4025    }
4026
4027    /// The wire type corresponding to [`CapabilityStoreDictionaryRemoveResponse`].
4028    pub type CapabilityStoreDictionaryRemoveResponse = ::fidl_next::wire::Unit;
4029
4030    /// The wire type corresponding to [`CapabilityStoreDictionaryCopyRequest`].
4031    #[derive(Clone, Debug)]
4032    #[repr(C)]
4033    pub struct CapabilityStoreDictionaryCopyRequest {
4034        pub id: ::fidl_next::wire::Uint64,
4035
4036        pub dest_id: ::fidl_next::wire::Uint64,
4037    }
4038
4039    static_assertions::const_assert_eq!(
4040        std::mem::size_of::<CapabilityStoreDictionaryCopyRequest>(),
4041        16
4042    );
4043    static_assertions::const_assert_eq!(
4044        std::mem::align_of::<CapabilityStoreDictionaryCopyRequest>(),
4045        8
4046    );
4047
4048    static_assertions::const_assert_eq!(
4049        std::mem::offset_of!(CapabilityStoreDictionaryCopyRequest, id),
4050        0
4051    );
4052
4053    static_assertions::const_assert_eq!(
4054        std::mem::offset_of!(CapabilityStoreDictionaryCopyRequest, dest_id),
4055        8
4056    );
4057
4058    impl ::fidl_next::Constrained for CapabilityStoreDictionaryCopyRequest {
4059        type Constraint = ();
4060
4061        fn validate(
4062            _: ::fidl_next::Slot<'_, Self>,
4063            _: Self::Constraint,
4064        ) -> Result<(), ::fidl_next::ValidationError> {
4065            Ok(())
4066        }
4067    }
4068
4069    unsafe impl ::fidl_next::Wire for CapabilityStoreDictionaryCopyRequest {
4070        type Narrowed<'de> = CapabilityStoreDictionaryCopyRequest;
4071
4072        #[inline]
4073        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4074            ::fidl_next::munge! {
4075                let Self {
4076                    id,
4077                    dest_id,
4078
4079                } = &mut *out_;
4080            }
4081
4082            ::fidl_next::Wire::zero_padding(id);
4083
4084            ::fidl_next::Wire::zero_padding(dest_id);
4085        }
4086    }
4087
4088    unsafe impl<___D> ::fidl_next::Decode<___D> for CapabilityStoreDictionaryCopyRequest
4089    where
4090        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4091    {
4092        fn decode(
4093            slot_: ::fidl_next::Slot<'_, Self>,
4094            decoder_: &mut ___D,
4095            _: (),
4096        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4097            ::fidl_next::munge! {
4098                let Self {
4099                    mut id,
4100                    mut dest_id,
4101
4102                } = slot_;
4103            }
4104
4105            let _field = id.as_mut();
4106
4107            ::fidl_next::Decode::decode(id.as_mut(), decoder_, ())?;
4108
4109            let _field = dest_id.as_mut();
4110
4111            ::fidl_next::Decode::decode(dest_id.as_mut(), decoder_, ())?;
4112
4113            Ok(())
4114        }
4115    }
4116
4117    impl ::fidl_next::IntoNatural for CapabilityStoreDictionaryCopyRequest {
4118        type Natural = crate::natural::CapabilityStoreDictionaryCopyRequest;
4119    }
4120
4121    /// The wire type corresponding to [`CapabilityStoreDictionaryCopyResponse`].
4122    pub type CapabilityStoreDictionaryCopyResponse = ::fidl_next::wire::Unit;
4123
4124    /// The wire type corresponding to [`CapabilityStoreDictionaryKeysResponse`].
4125    pub type CapabilityStoreDictionaryKeysResponse = ::fidl_next::wire::Unit;
4126
4127    /// The wire type corresponding to [`CapabilityStoreDictionaryEnumerateResponse`].
4128    pub type CapabilityStoreDictionaryEnumerateResponse = ::fidl_next::wire::Unit;
4129
4130    /// The wire type corresponding to [`CapabilityStoreDictionaryDrainResponse`].
4131    pub type CapabilityStoreDictionaryDrainResponse = ::fidl_next::wire::Unit;
4132
4133    /// The wire type corresponding to [`RouterError`].
4134    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4135    #[repr(transparent)]
4136    pub struct RouterError {
4137        pub(crate) value: ::fidl_next::wire::Uint32,
4138    }
4139
4140    impl ::fidl_next::Constrained for RouterError {
4141        type Constraint = ();
4142
4143        fn validate(
4144            _: ::fidl_next::Slot<'_, Self>,
4145            _: Self::Constraint,
4146        ) -> Result<(), ::fidl_next::ValidationError> {
4147            Ok(())
4148        }
4149    }
4150
4151    unsafe impl ::fidl_next::Wire for RouterError {
4152        type Narrowed<'de> = Self;
4153
4154        #[inline]
4155        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4156            // Wire enums have no padding
4157        }
4158    }
4159
4160    impl RouterError {
4161        pub const NOT_FOUND: RouterError = RouterError { value: ::fidl_next::wire::Uint32(1) };
4162
4163        pub const INVALID_ARGS: RouterError = RouterError { value: ::fidl_next::wire::Uint32(2) };
4164
4165        pub const NOT_SUPPORTED: RouterError = RouterError { value: ::fidl_next::wire::Uint32(3) };
4166
4167        pub const INTERNAL: RouterError = RouterError { value: ::fidl_next::wire::Uint32(4) };
4168    }
4169
4170    unsafe impl<___D> ::fidl_next::Decode<___D> for RouterError
4171    where
4172        ___D: ?Sized,
4173    {
4174        fn decode(
4175            slot: ::fidl_next::Slot<'_, Self>,
4176            _: &mut ___D,
4177            _: (),
4178        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4179            Ok(())
4180        }
4181    }
4182
4183    impl ::core::convert::From<crate::natural::RouterError> for RouterError {
4184        fn from(natural: crate::natural::RouterError) -> Self {
4185            match natural {
4186                crate::natural::RouterError::NotFound => RouterError::NOT_FOUND,
4187
4188                crate::natural::RouterError::InvalidArgs => RouterError::INVALID_ARGS,
4189
4190                crate::natural::RouterError::NotSupported => RouterError::NOT_SUPPORTED,
4191
4192                crate::natural::RouterError::Internal => RouterError::INTERNAL,
4193
4194                crate::natural::RouterError::UnknownOrdinal_(value) => {
4195                    RouterError { value: ::fidl_next::wire::Uint32::from(value) }
4196                }
4197            }
4198        }
4199    }
4200
4201    impl ::fidl_next::IntoNatural for RouterError {
4202        type Natural = crate::natural::RouterError;
4203    }
4204
4205    /// The wire type corresponding to [`DictionaryDrainIteratorGetNextRequest`].
4206    #[derive(Clone, Debug)]
4207    #[repr(C)]
4208    pub struct DictionaryDrainIteratorGetNextRequest {
4209        pub start_id: ::fidl_next::wire::Uint64,
4210
4211        pub limit: ::fidl_next::wire::Uint32,
4212    }
4213
4214    static_assertions::const_assert_eq!(
4215        std::mem::size_of::<DictionaryDrainIteratorGetNextRequest>(),
4216        16
4217    );
4218    static_assertions::const_assert_eq!(
4219        std::mem::align_of::<DictionaryDrainIteratorGetNextRequest>(),
4220        8
4221    );
4222
4223    static_assertions::const_assert_eq!(
4224        std::mem::offset_of!(DictionaryDrainIteratorGetNextRequest, start_id),
4225        0
4226    );
4227
4228    static_assertions::const_assert_eq!(
4229        std::mem::offset_of!(DictionaryDrainIteratorGetNextRequest, limit),
4230        8
4231    );
4232
4233    impl ::fidl_next::Constrained for DictionaryDrainIteratorGetNextRequest {
4234        type Constraint = ();
4235
4236        fn validate(
4237            _: ::fidl_next::Slot<'_, Self>,
4238            _: Self::Constraint,
4239        ) -> Result<(), ::fidl_next::ValidationError> {
4240            Ok(())
4241        }
4242    }
4243
4244    unsafe impl ::fidl_next::Wire for DictionaryDrainIteratorGetNextRequest {
4245        type Narrowed<'de> = DictionaryDrainIteratorGetNextRequest;
4246
4247        #[inline]
4248        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4249            ::fidl_next::munge! {
4250                let Self {
4251                    start_id,
4252                    limit,
4253
4254                } = &mut *out_;
4255            }
4256
4257            ::fidl_next::Wire::zero_padding(start_id);
4258
4259            ::fidl_next::Wire::zero_padding(limit);
4260
4261            unsafe {
4262                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4263            }
4264        }
4265    }
4266
4267    unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryDrainIteratorGetNextRequest
4268    where
4269        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4270    {
4271        fn decode(
4272            slot_: ::fidl_next::Slot<'_, Self>,
4273            decoder_: &mut ___D,
4274            _: (),
4275        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4276            if slot_.as_bytes()[12..16] != [0u8; 4] {
4277                return Err(::fidl_next::DecodeError::InvalidPadding);
4278            }
4279
4280            ::fidl_next::munge! {
4281                let Self {
4282                    mut start_id,
4283                    mut limit,
4284
4285                } = slot_;
4286            }
4287
4288            let _field = start_id.as_mut();
4289
4290            ::fidl_next::Decode::decode(start_id.as_mut(), decoder_, ())?;
4291
4292            let _field = limit.as_mut();
4293
4294            ::fidl_next::Decode::decode(limit.as_mut(), decoder_, ())?;
4295
4296            Ok(())
4297        }
4298    }
4299
4300    impl ::fidl_next::IntoNatural for DictionaryDrainIteratorGetNextRequest {
4301        type Natural = crate::natural::DictionaryDrainIteratorGetNextRequest;
4302    }
4303
4304    /// The wire type corresponding to [`DictionaryEnumerateIteratorGetNextRequest`].
4305    #[derive(Clone, Debug)]
4306    #[repr(C)]
4307    pub struct DictionaryEnumerateIteratorGetNextRequest {
4308        pub start_id: ::fidl_next::wire::Uint64,
4309
4310        pub limit: ::fidl_next::wire::Uint32,
4311    }
4312
4313    static_assertions::const_assert_eq!(
4314        std::mem::size_of::<DictionaryEnumerateIteratorGetNextRequest>(),
4315        16
4316    );
4317    static_assertions::const_assert_eq!(
4318        std::mem::align_of::<DictionaryEnumerateIteratorGetNextRequest>(),
4319        8
4320    );
4321
4322    static_assertions::const_assert_eq!(
4323        std::mem::offset_of!(DictionaryEnumerateIteratorGetNextRequest, start_id),
4324        0
4325    );
4326
4327    static_assertions::const_assert_eq!(
4328        std::mem::offset_of!(DictionaryEnumerateIteratorGetNextRequest, limit),
4329        8
4330    );
4331
4332    impl ::fidl_next::Constrained for DictionaryEnumerateIteratorGetNextRequest {
4333        type Constraint = ();
4334
4335        fn validate(
4336            _: ::fidl_next::Slot<'_, Self>,
4337            _: Self::Constraint,
4338        ) -> Result<(), ::fidl_next::ValidationError> {
4339            Ok(())
4340        }
4341    }
4342
4343    unsafe impl ::fidl_next::Wire for DictionaryEnumerateIteratorGetNextRequest {
4344        type Narrowed<'de> = DictionaryEnumerateIteratorGetNextRequest;
4345
4346        #[inline]
4347        fn zero_padding(out_: &mut ::core::mem::MaybeUninit<Self>) {
4348            ::fidl_next::munge! {
4349                let Self {
4350                    start_id,
4351                    limit,
4352
4353                } = &mut *out_;
4354            }
4355
4356            ::fidl_next::Wire::zero_padding(start_id);
4357
4358            ::fidl_next::Wire::zero_padding(limit);
4359
4360            unsafe {
4361                out_.as_mut_ptr().cast::<u8>().add(12).write_bytes(0, 4);
4362            }
4363        }
4364    }
4365
4366    unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryEnumerateIteratorGetNextRequest
4367    where
4368        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4369    {
4370        fn decode(
4371            slot_: ::fidl_next::Slot<'_, Self>,
4372            decoder_: &mut ___D,
4373            _: (),
4374        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4375            if slot_.as_bytes()[12..16] != [0u8; 4] {
4376                return Err(::fidl_next::DecodeError::InvalidPadding);
4377            }
4378
4379            ::fidl_next::munge! {
4380                let Self {
4381                    mut start_id,
4382                    mut limit,
4383
4384                } = slot_;
4385            }
4386
4387            let _field = start_id.as_mut();
4388
4389            ::fidl_next::Decode::decode(start_id.as_mut(), decoder_, ())?;
4390
4391            let _field = limit.as_mut();
4392
4393            ::fidl_next::Decode::decode(limit.as_mut(), decoder_, ())?;
4394
4395            Ok(())
4396        }
4397    }
4398
4399    impl ::fidl_next::IntoNatural for DictionaryEnumerateIteratorGetNextRequest {
4400        type Natural = crate::natural::DictionaryEnumerateIteratorGetNextRequest;
4401    }
4402
4403    /// The wire type corresponding to [`DictionaryError`].
4404    #[derive(Clone, Copy, Debug, PartialEq, Eq)]
4405    #[repr(transparent)]
4406    pub struct DictionaryError {
4407        pub(crate) value: ::fidl_next::wire::Uint32,
4408    }
4409
4410    impl ::fidl_next::Constrained for DictionaryError {
4411        type Constraint = ();
4412
4413        fn validate(
4414            _: ::fidl_next::Slot<'_, Self>,
4415            _: Self::Constraint,
4416        ) -> Result<(), ::fidl_next::ValidationError> {
4417            Ok(())
4418        }
4419    }
4420
4421    unsafe impl ::fidl_next::Wire for DictionaryError {
4422        type Narrowed<'de> = Self;
4423
4424        #[inline]
4425        fn zero_padding(_: &mut ::core::mem::MaybeUninit<Self>) {
4426            // Wire enums have no padding
4427        }
4428    }
4429
4430    impl DictionaryError {
4431        pub const NOT_FOUND: DictionaryError =
4432            DictionaryError { value: ::fidl_next::wire::Uint32(1) };
4433
4434        pub const ALREADY_EXISTS: DictionaryError =
4435            DictionaryError { value: ::fidl_next::wire::Uint32(2) };
4436
4437        pub const BAD_CAPABILITY: DictionaryError =
4438            DictionaryError { value: ::fidl_next::wire::Uint32(3) };
4439
4440        pub const INVALID_KEY: DictionaryError =
4441            DictionaryError { value: ::fidl_next::wire::Uint32(4) };
4442
4443        pub const NOT_CLONEABLE: DictionaryError =
4444            DictionaryError { value: ::fidl_next::wire::Uint32(5) };
4445    }
4446
4447    unsafe impl<___D> ::fidl_next::Decode<___D> for DictionaryError
4448    where
4449        ___D: ?Sized,
4450    {
4451        fn decode(
4452            slot: ::fidl_next::Slot<'_, Self>,
4453            _: &mut ___D,
4454            _: (),
4455        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4456            Ok(())
4457        }
4458    }
4459
4460    impl ::core::convert::From<crate::natural::DictionaryError> for DictionaryError {
4461        fn from(natural: crate::natural::DictionaryError) -> Self {
4462            match natural {
4463                crate::natural::DictionaryError::NotFound => DictionaryError::NOT_FOUND,
4464
4465                crate::natural::DictionaryError::AlreadyExists => DictionaryError::ALREADY_EXISTS,
4466
4467                crate::natural::DictionaryError::BadCapability => DictionaryError::BAD_CAPABILITY,
4468
4469                crate::natural::DictionaryError::InvalidKey => DictionaryError::INVALID_KEY,
4470
4471                crate::natural::DictionaryError::NotCloneable => DictionaryError::NOT_CLONEABLE,
4472
4473                crate::natural::DictionaryError::UnknownOrdinal_(value) => {
4474                    DictionaryError { value: ::fidl_next::wire::Uint32::from(value) }
4475                }
4476            }
4477        }
4478    }
4479
4480    impl ::fidl_next::IntoNatural for DictionaryError {
4481        type Natural = crate::natural::DictionaryError;
4482    }
4483
4484    /// The wire type corresponding to [`Unavailable`].
4485    pub type Unavailable = ::fidl_next::wire::Unit;
4486}
4487
4488pub mod wire_optional {
4489
4490    #[repr(transparent)]
4491    pub struct Data<'de> {
4492        pub(crate) raw: ::fidl_next::wire::Union,
4493        pub(crate) _phantom: ::core::marker::PhantomData<&'de mut [::fidl_next::Chunk]>,
4494    }
4495
4496    impl ::fidl_next::Constrained for Data<'_> {
4497        type Constraint = ();
4498
4499        fn validate(
4500            _: ::fidl_next::Slot<'_, Self>,
4501            _: Self::Constraint,
4502        ) -> Result<(), ::fidl_next::ValidationError> {
4503            Ok(())
4504        }
4505    }
4506
4507    unsafe impl ::fidl_next::Wire for Data<'static> {
4508        type Narrowed<'de> = Data<'de>;
4509
4510        #[inline]
4511        fn zero_padding(out: &mut ::core::mem::MaybeUninit<Self>) {
4512            ::fidl_next::munge!(let Self { raw, _phantom: _ } = out);
4513            ::fidl_next::wire::Union::zero_padding(raw);
4514        }
4515    }
4516
4517    impl<'de> Data<'de> {
4518        pub fn is_some(&self) -> bool {
4519            self.raw.is_some()
4520        }
4521
4522        pub fn is_none(&self) -> bool {
4523            self.raw.is_none()
4524        }
4525
4526        pub fn as_ref(&self) -> ::core::option::Option<&crate::wire::Data<'de>> {
4527            if self.is_some() { Some(unsafe { &*(self as *const Self).cast() }) } else { None }
4528        }
4529
4530        pub fn into_option(self) -> ::core::option::Option<crate::wire::Data<'de>> {
4531            if self.is_some() {
4532                Some(crate::wire::Data { raw: self.raw, _phantom: ::core::marker::PhantomData })
4533            } else {
4534                None
4535            }
4536        }
4537    }
4538
4539    unsafe impl<'de, ___D> ::fidl_next::Decode<___D> for Data<'de>
4540    where
4541        ___D: ::fidl_next::decoder::InternalHandleDecoder + ?Sized,
4542        ___D: ::fidl_next::Decoder<'de>,
4543    {
4544        fn decode(
4545            mut slot: ::fidl_next::Slot<'_, Self>,
4546            decoder: &mut ___D,
4547            _: (),
4548        ) -> ::core::result::Result<(), ::fidl_next::DecodeError> {
4549            ::fidl_next::munge!(let Self { mut raw, _phantom: _ } = slot.as_mut());
4550            match ::fidl_next::wire::Union::encoded_ordinal(raw.as_mut()) {
4551                1 => {
4552                    ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Vector<'de, u8>>(
4553                        raw,
4554                        decoder,
4555                        (8192, ()),
4556                    )?
4557                }
4558
4559                2 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::String<'de>>(
4560                    raw, decoder, 8192,
4561                )?,
4562
4563                3 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Int64>(
4564                    raw,
4565                    decoder,
4566                    (),
4567                )?,
4568
4569                4 => ::fidl_next::wire::Union::decode_as::<___D, ::fidl_next::wire::Uint64>(
4570                    raw,
4571                    decoder,
4572                    (),
4573                )?,
4574
4575                0 => ::fidl_next::wire::Union::decode_absent(raw)?,
4576                _ => ::fidl_next::wire::Union::decode_unknown(raw, decoder)?,
4577            }
4578
4579            Ok(())
4580        }
4581    }
4582
4583    impl<'de> ::core::fmt::Debug for Data<'de> {
4584        fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
4585            self.as_ref().fmt(f)
4586        }
4587    }
4588
4589    impl<'de> ::fidl_next::IntoNatural for Data<'de> {
4590        type Natural = ::core::option::Option<crate::natural::Data>;
4591    }
4592}
4593
4594pub mod generic {
4595
4596    /// The generic type corresponding to [`Unit`].
4597    pub type Unit = ();
4598
4599    /// The generic type corresponding to [`CapabilityStoreDuplicateRequest`].
4600    pub struct CapabilityStoreDuplicateRequest<T0, T1> {
4601        pub id: T0,
4602
4603        pub dest_id: T1,
4604    }
4605
4606    unsafe impl<___E, T0, T1>
4607        ::fidl_next::Encode<crate::wire::CapabilityStoreDuplicateRequest, ___E>
4608        for CapabilityStoreDuplicateRequest<T0, T1>
4609    where
4610        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4611        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4612        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4613    {
4614        #[inline]
4615        fn encode(
4616            self,
4617            encoder_: &mut ___E,
4618            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDuplicateRequest>,
4619            _: (),
4620        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4621            ::fidl_next::munge! {
4622                let crate::wire::CapabilityStoreDuplicateRequest {
4623                    id,
4624                    dest_id,
4625
4626                } = out_;
4627            }
4628
4629            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4630
4631            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
4632
4633            Ok(())
4634        }
4635    }
4636
4637    /// The generic type corresponding to [`CapabilityStoreDuplicateResponse`].
4638    pub type CapabilityStoreDuplicateResponse = ();
4639
4640    /// The generic type corresponding to [`CapabilityStoreDropRequest`].
4641    pub struct CapabilityStoreDropRequest<T0> {
4642        pub id: T0,
4643    }
4644
4645    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::CapabilityStoreDropRequest, ___E>
4646        for CapabilityStoreDropRequest<T0>
4647    where
4648        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4649        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4650    {
4651        #[inline]
4652        fn encode(
4653            self,
4654            encoder_: &mut ___E,
4655            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDropRequest>,
4656            _: (),
4657        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4658            ::fidl_next::munge! {
4659                let crate::wire::CapabilityStoreDropRequest {
4660                    id,
4661
4662                } = out_;
4663            }
4664
4665            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4666
4667            Ok(())
4668        }
4669    }
4670
4671    /// The generic type corresponding to [`CapabilityStoreDropResponse`].
4672    pub type CapabilityStoreDropResponse = ();
4673
4674    /// The generic type corresponding to [`CapabilityStoreExportRequest`].
4675    pub struct CapabilityStoreExportRequest<T0> {
4676        pub id: T0,
4677    }
4678
4679    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::CapabilityStoreExportRequest, ___E>
4680        for CapabilityStoreExportRequest<T0>
4681    where
4682        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4683        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4684    {
4685        #[inline]
4686        fn encode(
4687            self,
4688            encoder_: &mut ___E,
4689            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreExportRequest>,
4690            _: (),
4691        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4692            ::fidl_next::munge! {
4693                let crate::wire::CapabilityStoreExportRequest {
4694                    id,
4695
4696                } = out_;
4697            }
4698
4699            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4700
4701            Ok(())
4702        }
4703    }
4704
4705    /// The generic type corresponding to [`CapabilityStoreImportResponse`].
4706    pub type CapabilityStoreImportResponse = ();
4707
4708    /// The generic type corresponding to [`CapabilityStoreConnectorCreateResponse`].
4709    pub type CapabilityStoreConnectorCreateResponse = ();
4710
4711    /// The generic type corresponding to [`CapabilityStoreConnectorOpenResponse`].
4712    pub type CapabilityStoreConnectorOpenResponse = ();
4713
4714    /// The generic type corresponding to [`CapabilityStoreDirConnectorCreateResponse`].
4715    pub type CapabilityStoreDirConnectorCreateResponse = ();
4716
4717    /// The generic type corresponding to [`CapabilityStoreDirConnectorOpenResponse`].
4718    pub type CapabilityStoreDirConnectorOpenResponse = ();
4719
4720    /// The generic type corresponding to [`CapabilityStoreDictionaryCreateRequest`].
4721    pub struct CapabilityStoreDictionaryCreateRequest<T0> {
4722        pub id: T0,
4723    }
4724
4725    unsafe impl<___E, T0>
4726        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCreateRequest, ___E>
4727        for CapabilityStoreDictionaryCreateRequest<T0>
4728    where
4729        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4730        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4731    {
4732        #[inline]
4733        fn encode(
4734            self,
4735            encoder_: &mut ___E,
4736            out_: &mut ::core::mem::MaybeUninit<
4737                crate::wire::CapabilityStoreDictionaryCreateRequest,
4738            >,
4739            _: (),
4740        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4741            ::fidl_next::munge! {
4742                let crate::wire::CapabilityStoreDictionaryCreateRequest {
4743                    id,
4744
4745                } = out_;
4746            }
4747
4748            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4749
4750            Ok(())
4751        }
4752    }
4753
4754    /// The generic type corresponding to [`CapabilityStoreDictionaryCreateResponse`].
4755    pub type CapabilityStoreDictionaryCreateResponse = ();
4756
4757    /// The generic type corresponding to [`CapabilityStoreDictionaryLegacyImportResponse`].
4758    pub type CapabilityStoreDictionaryLegacyImportResponse = ();
4759
4760    /// The generic type corresponding to [`CapabilityStoreDictionaryLegacyExportResponse`].
4761    pub type CapabilityStoreDictionaryLegacyExportResponse = ();
4762
4763    /// The generic type corresponding to [`DictionaryItem`].
4764    pub struct DictionaryItem<T0, T1> {
4765        pub key: T0,
4766
4767        pub value: T1,
4768    }
4769
4770    unsafe impl<___E, T0, T1> ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E>
4771        for DictionaryItem<T0, T1>
4772    where
4773        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4774        ___E: ::fidl_next::Encoder,
4775        T0: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4776        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4777    {
4778        #[inline]
4779        fn encode(
4780            self,
4781            encoder_: &mut ___E,
4782            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryItem<'static>>,
4783            _: (),
4784        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4785            ::fidl_next::munge! {
4786                let crate::wire::DictionaryItem {
4787                    key,
4788                    value,
4789
4790                } = out_;
4791            }
4792
4793            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
4794
4795            ::fidl_next::Encode::encode(self.value, encoder_, value, ())?;
4796
4797            Ok(())
4798        }
4799    }
4800
4801    /// The generic type corresponding to [`CapabilityStoreDictionaryInsertRequest`].
4802    pub struct CapabilityStoreDictionaryInsertRequest<T0, T1> {
4803        pub id: T0,
4804
4805        pub item: T1,
4806    }
4807
4808    unsafe impl<___E, T0, T1>
4809        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryInsertRequest<'static>, ___E>
4810        for CapabilityStoreDictionaryInsertRequest<T0, T1>
4811    where
4812        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4813        ___E: ::fidl_next::Encoder,
4814        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4815        T1: ::fidl_next::Encode<crate::wire::DictionaryItem<'static>, ___E>,
4816    {
4817        #[inline]
4818        fn encode(
4819            self,
4820            encoder_: &mut ___E,
4821            out_: &mut ::core::mem::MaybeUninit<
4822                crate::wire::CapabilityStoreDictionaryInsertRequest<'static>,
4823            >,
4824            _: (),
4825        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4826            ::fidl_next::munge! {
4827                let crate::wire::CapabilityStoreDictionaryInsertRequest {
4828                    id,
4829                    item,
4830
4831                } = out_;
4832            }
4833
4834            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4835
4836            ::fidl_next::Encode::encode(self.item, encoder_, item, ())?;
4837
4838            Ok(())
4839        }
4840    }
4841
4842    /// The generic type corresponding to [`CapabilityStoreDictionaryInsertResponse`].
4843    pub type CapabilityStoreDictionaryInsertResponse = ();
4844
4845    /// The generic type corresponding to [`CapabilityStoreDictionaryGetRequest`].
4846    pub struct CapabilityStoreDictionaryGetRequest<T0, T1, T2> {
4847        pub id: T0,
4848
4849        pub key: T1,
4850
4851        pub dest_id: T2,
4852    }
4853
4854    unsafe impl<___E, T0, T1, T2>
4855        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryGetRequest<'static>, ___E>
4856        for CapabilityStoreDictionaryGetRequest<T0, T1, T2>
4857    where
4858        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4859        ___E: ::fidl_next::Encoder,
4860        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4861        T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4862        T2: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4863    {
4864        #[inline]
4865        fn encode(
4866            self,
4867            encoder_: &mut ___E,
4868            out_: &mut ::core::mem::MaybeUninit<
4869                crate::wire::CapabilityStoreDictionaryGetRequest<'static>,
4870            >,
4871            _: (),
4872        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4873            ::fidl_next::munge! {
4874                let crate::wire::CapabilityStoreDictionaryGetRequest {
4875                    id,
4876                    key,
4877                    dest_id,
4878
4879                } = out_;
4880            }
4881
4882            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4883
4884            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
4885
4886            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
4887
4888            Ok(())
4889        }
4890    }
4891
4892    /// The generic type corresponding to [`CapabilityStoreDictionaryGetResponse`].
4893    pub type CapabilityStoreDictionaryGetResponse = ();
4894
4895    /// The generic type corresponding to [`WrappedCapabilityId`].
4896    pub struct WrappedCapabilityId<T0> {
4897        pub id: T0,
4898    }
4899
4900    unsafe impl<___E, T0> ::fidl_next::Encode<crate::wire::WrappedCapabilityId, ___E>
4901        for WrappedCapabilityId<T0>
4902    where
4903        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4904        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4905    {
4906        #[inline]
4907        fn encode(
4908            self,
4909            encoder_: &mut ___E,
4910            out_: &mut ::core::mem::MaybeUninit<crate::wire::WrappedCapabilityId>,
4911            _: (),
4912        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4913            ::fidl_next::munge! {
4914                let crate::wire::WrappedCapabilityId {
4915                    id,
4916
4917                } = out_;
4918            }
4919
4920            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4921
4922            Ok(())
4923        }
4924    }
4925
4926    /// The generic type corresponding to [`CapabilityStoreDictionaryRemoveRequest`].
4927    pub struct CapabilityStoreDictionaryRemoveRequest<T0, T1, T2> {
4928        pub id: T0,
4929
4930        pub key: T1,
4931
4932        pub dest_id: T2,
4933    }
4934
4935    unsafe impl<___E, T0, T1, T2>
4936        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>, ___E>
4937        for CapabilityStoreDictionaryRemoveRequest<T0, T1, T2>
4938    where
4939        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4940        ___E: ::fidl_next::Encoder,
4941        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4942        T1: ::fidl_next::Encode<::fidl_next::wire::String<'static>, ___E>,
4943        T2: ::fidl_next::Encode<
4944                ::fidl_next::wire::Box<'static, crate::wire::WrappedCapabilityId>,
4945                ___E,
4946            >,
4947    {
4948        #[inline]
4949        fn encode(
4950            self,
4951            encoder_: &mut ___E,
4952            out_: &mut ::core::mem::MaybeUninit<
4953                crate::wire::CapabilityStoreDictionaryRemoveRequest<'static>,
4954            >,
4955            _: (),
4956        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
4957            ::fidl_next::munge! {
4958                let crate::wire::CapabilityStoreDictionaryRemoveRequest {
4959                    id,
4960                    key,
4961                    dest_id,
4962
4963                } = out_;
4964            }
4965
4966            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
4967
4968            ::fidl_next::Encode::encode(self.key, encoder_, key, 255)?;
4969
4970            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
4971
4972            Ok(())
4973        }
4974    }
4975
4976    /// The generic type corresponding to [`CapabilityStoreDictionaryRemoveResponse`].
4977    pub type CapabilityStoreDictionaryRemoveResponse = ();
4978
4979    /// The generic type corresponding to [`CapabilityStoreDictionaryCopyRequest`].
4980    pub struct CapabilityStoreDictionaryCopyRequest<T0, T1> {
4981        pub id: T0,
4982
4983        pub dest_id: T1,
4984    }
4985
4986    unsafe impl<___E, T0, T1>
4987        ::fidl_next::Encode<crate::wire::CapabilityStoreDictionaryCopyRequest, ___E>
4988        for CapabilityStoreDictionaryCopyRequest<T0, T1>
4989    where
4990        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
4991        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4992        T1: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
4993    {
4994        #[inline]
4995        fn encode(
4996            self,
4997            encoder_: &mut ___E,
4998            out_: &mut ::core::mem::MaybeUninit<crate::wire::CapabilityStoreDictionaryCopyRequest>,
4999            _: (),
5000        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5001            ::fidl_next::munge! {
5002                let crate::wire::CapabilityStoreDictionaryCopyRequest {
5003                    id,
5004                    dest_id,
5005
5006                } = out_;
5007            }
5008
5009            ::fidl_next::Encode::encode(self.id, encoder_, id, ())?;
5010
5011            ::fidl_next::Encode::encode(self.dest_id, encoder_, dest_id, ())?;
5012
5013            Ok(())
5014        }
5015    }
5016
5017    /// The generic type corresponding to [`CapabilityStoreDictionaryCopyResponse`].
5018    pub type CapabilityStoreDictionaryCopyResponse = ();
5019
5020    /// The generic type corresponding to [`CapabilityStoreDictionaryKeysResponse`].
5021    pub type CapabilityStoreDictionaryKeysResponse = ();
5022
5023    /// The generic type corresponding to [`CapabilityStoreDictionaryEnumerateResponse`].
5024    pub type CapabilityStoreDictionaryEnumerateResponse = ();
5025
5026    /// The generic type corresponding to [`CapabilityStoreDictionaryDrainResponse`].
5027    pub type CapabilityStoreDictionaryDrainResponse = ();
5028
5029    /// The generic type corresponding to [`DictionaryDrainIteratorGetNextRequest`].
5030    pub struct DictionaryDrainIteratorGetNextRequest<T0, T1> {
5031        pub start_id: T0,
5032
5033        pub limit: T1,
5034    }
5035
5036    unsafe impl<___E, T0, T1>
5037        ::fidl_next::Encode<crate::wire::DictionaryDrainIteratorGetNextRequest, ___E>
5038        for DictionaryDrainIteratorGetNextRequest<T0, T1>
5039    where
5040        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5041        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5042        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5043    {
5044        #[inline]
5045        fn encode(
5046            self,
5047            encoder_: &mut ___E,
5048            out_: &mut ::core::mem::MaybeUninit<crate::wire::DictionaryDrainIteratorGetNextRequest>,
5049            _: (),
5050        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5051            ::fidl_next::munge! {
5052                let crate::wire::DictionaryDrainIteratorGetNextRequest {
5053                    start_id,
5054                    limit,
5055
5056                } = out_;
5057            }
5058
5059            ::fidl_next::Encode::encode(self.start_id, encoder_, start_id, ())?;
5060
5061            ::fidl_next::Encode::encode(self.limit, encoder_, limit, ())?;
5062
5063            Ok(())
5064        }
5065    }
5066
5067    /// The generic type corresponding to [`DictionaryEnumerateIteratorGetNextRequest`].
5068    pub struct DictionaryEnumerateIteratorGetNextRequest<T0, T1> {
5069        pub start_id: T0,
5070
5071        pub limit: T1,
5072    }
5073
5074    unsafe impl<___E, T0, T1>
5075        ::fidl_next::Encode<crate::wire::DictionaryEnumerateIteratorGetNextRequest, ___E>
5076        for DictionaryEnumerateIteratorGetNextRequest<T0, T1>
5077    where
5078        ___E: ::fidl_next::encoder::InternalHandleEncoder + ?Sized,
5079        T0: ::fidl_next::Encode<::fidl_next::wire::Uint64, ___E>,
5080        T1: ::fidl_next::Encode<::fidl_next::wire::Uint32, ___E>,
5081    {
5082        #[inline]
5083        fn encode(
5084            self,
5085            encoder_: &mut ___E,
5086            out_: &mut ::core::mem::MaybeUninit<
5087                crate::wire::DictionaryEnumerateIteratorGetNextRequest,
5088            >,
5089            _: (),
5090        ) -> ::core::result::Result<(), ::fidl_next::EncodeError> {
5091            ::fidl_next::munge! {
5092                let crate::wire::DictionaryEnumerateIteratorGetNextRequest {
5093                    start_id,
5094                    limit,
5095
5096                } = out_;
5097            }
5098
5099            ::fidl_next::Encode::encode(self.start_id, encoder_, start_id, ())?;
5100
5101            ::fidl_next::Encode::encode(self.limit, encoder_, limit, ())?;
5102
5103            Ok(())
5104        }
5105    }
5106
5107    /// The generic type corresponding to [`Unavailable`].
5108    pub type Unavailable = ();
5109}
5110
5111pub use self::natural::*;
5112
5113#[doc = " The maximum length of a dictionary key. This should coincide with\n fuchsia.component.MAX_NAME_LENGTH.\n"]
5114pub const MAX_NAME_LENGTH: u64 = 255 as u64;
5115
5116#[doc = " Maximum number of bytes in a [Data].\n"]
5117pub const MAX_DATA_LENGTH: u32 = 8192 as u32;
5118
5119/// The type corresponding to the Dictionary protocol.
5120#[derive(PartialEq, Debug)]
5121pub struct Dictionary;
5122
5123impl ::fidl_next::Discoverable for Dictionary {
5124    const PROTOCOL_NAME: &'static str = "fuchsia.component.sandbox.Dictionary";
5125}
5126
5127#[cfg(target_os = "fuchsia")]
5128impl ::fidl_next::HasTransport for Dictionary {
5129    type Transport = ::fidl_next::fuchsia::zx::Channel;
5130}
5131
5132pub mod dictionary {
5133    pub mod prelude {
5134        pub use crate::{
5135            Dictionary, DictionaryClientHandler, DictionaryLocalClientHandler,
5136            DictionaryLocalServerHandler, DictionaryServerHandler, dictionary,
5137        };
5138    }
5139
5140    mod ___detail {
5141        unsafe impl<___T> ::fidl_next::HasConnectionHandles<___T> for crate::Dictionary
5142        where
5143            ___T: ::fidl_next::Transport,
5144        {
5145            type Client = DictionaryClient<___T>;
5146            type Server = DictionaryServer<___T>;
5147        }
5148
5149        /// The client for the `Dictionary` protocol.
5150        #[repr(transparent)]
5151        pub struct DictionaryClient<___T: ::fidl_next::Transport> {
5152            #[allow(dead_code)]
5153            client: ::fidl_next::protocol::Client<___T>,
5154        }
5155
5156        impl<___T> DictionaryClient<___T> where ___T: ::fidl_next::Transport {}
5157
5158        /// The server for the `Dictionary` protocol.
5159        #[repr(transparent)]
5160        pub struct DictionaryServer<___T: ::fidl_next::Transport> {
5161            server: ::fidl_next::protocol::Server<___T>,
5162        }
5163
5164        impl<___T> DictionaryServer<___T> where ___T: ::fidl_next::Transport {}
5165    }
5166}
5167
5168#[diagnostic::on_unimplemented(
5169    note = "If {Self} implements the non-local DictionaryClientHandler trait, use `spawn_as_local` or the `Local` adapter type"
5170)]
5171
5172/// A client handler for the Dictionary protocol.
5173///
5174/// See [`Dictionary`] for more details.
5175pub trait DictionaryLocalClientHandler<
5176    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5177    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5178>
5179{
5180    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5181        ::core::future::ready(())
5182    }
5183}
5184
5185impl<___H, ___T> ::fidl_next::DispatchLocalClientMessage<___H, ___T> for Dictionary
5186where
5187    ___H: DictionaryLocalClientHandler<___T>,
5188    ___T: ::fidl_next::Transport,
5189{
5190    async fn on_event(
5191        handler: &mut ___H,
5192        mut message: ::fidl_next::Message<___T>,
5193    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5194        match *message.header().ordinal {
5195            ordinal => {
5196                handler.on_unknown_interaction(ordinal).await;
5197                if ::core::matches!(
5198                    message.header().flexibility(),
5199                    ::fidl_next::protocol::Flexibility::Strict
5200                ) {
5201                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5202                } else {
5203                    Ok(())
5204                }
5205            }
5206        }
5207    }
5208}
5209
5210#[diagnostic::on_unimplemented(
5211    note = "If {Self} implements the non-local DictionaryServerHandler trait, use `spawn_as_local` or the `Local` adapter type"
5212)]
5213
5214/// A server handler for the Dictionary protocol.
5215///
5216/// See [`Dictionary`] for more details.
5217pub trait DictionaryLocalServerHandler<
5218    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5219    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5220>
5221{
5222    fn on_unknown_interaction(&mut self, ordinal: u64) -> impl ::core::future::Future<Output = ()> {
5223        ::core::future::ready(())
5224    }
5225}
5226
5227impl<___H, ___T> ::fidl_next::DispatchLocalServerMessage<___H, ___T> for Dictionary
5228where
5229    ___H: DictionaryLocalServerHandler<___T>,
5230    ___T: ::fidl_next::Transport,
5231{
5232    async fn on_one_way(
5233        handler: &mut ___H,
5234        mut message: ::fidl_next::Message<___T>,
5235    ) -> ::core::result::Result<
5236        (),
5237        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5238    > {
5239        match *message.header().ordinal {
5240            ordinal => {
5241                handler.on_unknown_interaction(ordinal).await;
5242                if ::core::matches!(
5243                    message.header().flexibility(),
5244                    ::fidl_next::protocol::Flexibility::Strict
5245                ) {
5246                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5247                } else {
5248                    Ok(())
5249                }
5250            }
5251        }
5252    }
5253
5254    async fn on_two_way(
5255        handler: &mut ___H,
5256        mut message: ::fidl_next::Message<___T>,
5257        responder: ::fidl_next::protocol::Responder<___T>,
5258    ) -> ::core::result::Result<
5259        (),
5260        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5261    > {
5262        match *message.header().ordinal {
5263            ordinal => {
5264                handler.on_unknown_interaction(ordinal).await;
5265                if ::core::matches!(
5266                    message.header().flexibility(),
5267                    ::fidl_next::protocol::Flexibility::Strict
5268                ) {
5269                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5270                } else {
5271                    responder
5272                        .respond_framework_error(
5273                            ordinal,
5274                            ::fidl_next::FrameworkError::UnknownMethod,
5275                        )
5276                        .expect("encoding a framework error should never fail")
5277                        .await?;
5278                    Ok(())
5279                }
5280            }
5281        }
5282    }
5283}
5284
5285/// A client handler for the Dictionary protocol.
5286///
5287/// See [`Dictionary`] for more details.
5288pub trait DictionaryClientHandler<
5289    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5290    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5291>
5292{
5293    fn on_unknown_interaction(
5294        &mut self,
5295        ordinal: u64,
5296    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5297        ::core::future::ready(())
5298    }
5299}
5300
5301impl<___H, ___T> ::fidl_next::DispatchClientMessage<___H, ___T> for Dictionary
5302where
5303    ___H: DictionaryClientHandler<___T> + ::core::marker::Send,
5304    ___T: ::fidl_next::Transport,
5305{
5306    async fn on_event(
5307        handler: &mut ___H,
5308        mut message: ::fidl_next::Message<___T>,
5309    ) -> ::core::result::Result<(), ::fidl_next::ProtocolError<___T::Error>> {
5310        match *message.header().ordinal {
5311            ordinal => {
5312                handler.on_unknown_interaction(ordinal).await;
5313                if ::core::matches!(
5314                    message.header().flexibility(),
5315                    ::fidl_next::protocol::Flexibility::Strict
5316                ) {
5317                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5318                } else {
5319                    Ok(())
5320                }
5321            }
5322        }
5323    }
5324}
5325
5326/// A server handler for the Dictionary protocol.
5327///
5328/// See [`Dictionary`] for more details.
5329pub trait DictionaryServerHandler<
5330    #[cfg(target_os = "fuchsia")] ___T: ::fidl_next::Transport = ::fidl_next::fuchsia::zx::Channel,
5331    #[cfg(not(target_os = "fuchsia"))] ___T: ::fidl_next::Transport,
5332>
5333{
5334    fn on_unknown_interaction(
5335        &mut self,
5336        ordinal: u64,
5337    ) -> impl ::core::future::Future<Output = ()> + ::core::marker::Send {
5338        ::core::future::ready(())
5339    }
5340}
5341
5342impl<___H, ___T> ::fidl_next::DispatchServerMessage<___H, ___T> for Dictionary
5343where
5344    ___H: DictionaryServerHandler<___T> + ::core::marker::Send,
5345    ___T: ::fidl_next::Transport,
5346{
5347    async fn on_one_way(
5348        handler: &mut ___H,
5349        mut message: ::fidl_next::Message<___T>,
5350    ) -> ::core::result::Result<
5351        (),
5352        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5353    > {
5354        match *message.header().ordinal {
5355            ordinal => {
5356                handler.on_unknown_interaction(ordinal).await;
5357                if ::core::matches!(
5358                    message.header().flexibility(),
5359                    ::fidl_next::protocol::Flexibility::Strict
5360                ) {
5361                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5362                } else {
5363                    Ok(())
5364                }
5365            }
5366        }
5367    }
5368
5369    async fn on_two_way(
5370        handler: &mut ___H,
5371        mut message: ::fidl_next::Message<___T>,
5372        responder: ::fidl_next::protocol::Responder<___T>,
5373    ) -> ::core::result::Result<
5374        (),
5375        ::fidl_next::ProtocolError<<___T as ::fidl_next::Transport>::Error>,
5376    > {
5377        match *message.header().ordinal {
5378            ordinal => {
5379                handler.on_unknown_interaction(ordinal).await;
5380                if ::core::matches!(
5381                    message.header().flexibility(),
5382                    ::fidl_next::protocol::Flexibility::Strict
5383                ) {
5384                    Err(::fidl_next::ProtocolError::UnknownOrdinal(ordinal))
5385                } else {
5386                    responder
5387                        .respond_framework_error(
5388                            ordinal,
5389                            ::fidl_next::FrameworkError::UnknownMethod,
5390                        )
5391                        .expect("encoding a framework error should never fail")
5392                        .await?;
5393                    Ok(())
5394                }
5395            }
5396        }
5397    }
5398}
5399
5400impl<___T> DictionaryClientHandler<___T> for ::fidl_next::IgnoreEvents
5401where
5402    ___T: ::fidl_next::Transport,
5403{
5404    async fn on_unknown_interaction(&mut self, _: u64) {}
5405}
5406
5407impl<___H, ___T> DictionaryLocalClientHandler<___T> for ::fidl_next::Local<___H>
5408where
5409    ___H: DictionaryClientHandler<___T>,
5410    ___T: ::fidl_next::Transport,
5411{
5412    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5413        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5414    }
5415}
5416
5417impl<___H, ___T> DictionaryLocalServerHandler<___T> for ::fidl_next::Local<___H>
5418where
5419    ___H: DictionaryServerHandler<___T>,
5420    ___T: ::fidl_next::Transport,
5421{
5422    async fn on_unknown_interaction(&mut self, ordinal: u64) {
5423        ___H::on_unknown_interaction(&mut self.0, ordinal).await
5424    }
5425}
5426
5427#[doc = " Maximum number of items returned by dictionary iterator.\n"]
5428pub const MAX_DICTIONARY_ITERATOR_CHUNK: u32 = 128 as u32;