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