fidl_fuchsia_sys2__common/
fidl_fuchsia_sys2__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11/// The maximum length of an instance ID.
12/// An instance ID is a 256-bit identifier, which when encoded
13/// in hex notation is 64 characters long.
14pub const MAX_INSTANCE_ID_LENGTH: u32 = 64;
15
16/// The maximum length of the human-readable start reason.
17/// This accounts for StartReason::AccessCapability which can have a length of
18/// MAX_MONIKER_LENGTH + MAX_NAME_LENGTH + 26 (4222 characters).
19pub const MAX_START_REASON: u32 = 5000;
20
21/// The maximum length of a storage instance ID.
22/// A storage instance ID is a 256-bit UUID, which when encoded
23/// in hex notation is 64 characters long.
24pub const MAX_STORAGE_ID_LENGTH: u32 = 64;
25
26/// Errors that can be returned by the ConfigOverride protocol.
27#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
28pub enum ConfigOverrideError {
29    /// Could not find an instance matching the given moniker.
30    InstanceNotFound,
31    /// The given moniker could not be parsed.
32    BadMoniker,
33    /// The given moniker matches an instance, but the instance is not resolved.
34    InstanceNotResolved,
35    /// There is no structured configuration associated with this instance.
36    NoConfig,
37    /// Could not find a structured configuration field with the given key.
38    KeyNotFound,
39    #[doc(hidden)]
40    __SourceBreaking { unknown_ordinal: u32 },
41}
42
43/// Pattern that matches an unknown `ConfigOverrideError` member.
44#[macro_export]
45macro_rules! ConfigOverrideErrorUnknown {
46    () => {
47        _
48    };
49}
50
51impl ConfigOverrideError {
52    #[inline]
53    pub fn from_primitive(prim: u32) -> Option<Self> {
54        match prim {
55            1 => Some(Self::InstanceNotFound),
56            2 => Some(Self::BadMoniker),
57            3 => Some(Self::InstanceNotResolved),
58            4 => Some(Self::NoConfig),
59            5 => Some(Self::KeyNotFound),
60            _ => None,
61        }
62    }
63
64    #[inline]
65    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
66        match prim {
67            1 => Self::InstanceNotFound,
68            2 => Self::BadMoniker,
69            3 => Self::InstanceNotResolved,
70            4 => Self::NoConfig,
71            5 => Self::KeyNotFound,
72            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
73        }
74    }
75
76    #[inline]
77    pub fn unknown() -> Self {
78        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
79    }
80
81    #[inline]
82    pub const fn into_primitive(self) -> u32 {
83        match self {
84            Self::InstanceNotFound => 1,
85            Self::BadMoniker => 2,
86            Self::InstanceNotResolved => 3,
87            Self::NoConfig => 4,
88            Self::KeyNotFound => 5,
89            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
90        }
91    }
92
93    #[inline]
94    pub fn is_unknown(&self) -> bool {
95        match self {
96            Self::__SourceBreaking { unknown_ordinal: _ } => true,
97            _ => false,
98        }
99    }
100}
101
102/// Errors that can be returned by the ConnectToStorageAdmin call.
103#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
104pub enum ConnectToStorageAdminError {
105    /// Could not find an instance matching the given moniker.
106    InstanceNotFound,
107    /// The given moniker could not be parsed.
108    BadMoniker,
109    /// The instance does not define a storage capability with the given name.
110    StorageNotFound,
111    /// This operation requires the instance to be resolved.
112    InstanceNotResolved,
113    /// The given storage capability could not be parsed.
114    BadCapability,
115    #[doc(hidden)]
116    __SourceBreaking { unknown_ordinal: u32 },
117}
118
119/// Pattern that matches an unknown `ConnectToStorageAdminError` member.
120#[macro_export]
121macro_rules! ConnectToStorageAdminErrorUnknown {
122    () => {
123        _
124    };
125}
126
127impl ConnectToStorageAdminError {
128    #[inline]
129    pub fn from_primitive(prim: u32) -> Option<Self> {
130        match prim {
131            1 => Some(Self::InstanceNotFound),
132            2 => Some(Self::BadMoniker),
133            3 => Some(Self::StorageNotFound),
134            4 => Some(Self::InstanceNotResolved),
135            5 => Some(Self::BadCapability),
136            _ => None,
137        }
138    }
139
140    #[inline]
141    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
142        match prim {
143            1 => Self::InstanceNotFound,
144            2 => Self::BadMoniker,
145            3 => Self::StorageNotFound,
146            4 => Self::InstanceNotResolved,
147            5 => Self::BadCapability,
148            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
149        }
150    }
151
152    #[inline]
153    pub fn unknown() -> Self {
154        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
155    }
156
157    #[inline]
158    pub const fn into_primitive(self) -> u32 {
159        match self {
160            Self::InstanceNotFound => 1,
161            Self::BadMoniker => 2,
162            Self::StorageNotFound => 3,
163            Self::InstanceNotResolved => 4,
164            Self::BadCapability => 5,
165            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
166        }
167    }
168
169    #[inline]
170    pub fn is_unknown(&self) -> bool {
171        match self {
172            Self::__SourceBreaking { unknown_ordinal: _ } => true,
173            _ => false,
174        }
175    }
176}
177
178/// Errors that can be returned by the ConstructNamespace call.
179#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
180pub enum ConstructNamespaceError {
181    /// Could not find an instance matching the given moniker.
182    InstanceNotFound,
183    /// The given moniker could not be parsed.
184    BadMoniker,
185    /// Namespace construction requires the instance to be resolved.
186    InstanceNotResolved,
187    #[doc(hidden)]
188    __SourceBreaking { unknown_ordinal: u32 },
189}
190
191/// Pattern that matches an unknown `ConstructNamespaceError` member.
192#[macro_export]
193macro_rules! ConstructNamespaceErrorUnknown {
194    () => {
195        _
196    };
197}
198
199impl ConstructNamespaceError {
200    #[inline]
201    pub fn from_primitive(prim: u32) -> Option<Self> {
202        match prim {
203            1 => Some(Self::InstanceNotFound),
204            2 => Some(Self::BadMoniker),
205            3 => Some(Self::InstanceNotResolved),
206            _ => None,
207        }
208    }
209
210    #[inline]
211    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
212        match prim {
213            1 => Self::InstanceNotFound,
214            2 => Self::BadMoniker,
215            3 => Self::InstanceNotResolved,
216            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
217        }
218    }
219
220    #[inline]
221    pub fn unknown() -> Self {
222        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
223    }
224
225    #[inline]
226    pub const fn into_primitive(self) -> u32 {
227        match self {
228            Self::InstanceNotFound => 1,
229            Self::BadMoniker => 2,
230            Self::InstanceNotResolved => 3,
231            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
232        }
233    }
234
235    #[inline]
236    pub fn is_unknown(&self) -> bool {
237        match self {
238            Self::__SourceBreaking { unknown_ordinal: _ } => true,
239            _ => false,
240        }
241    }
242}
243
244#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
245pub enum CreateError {
246    Internal,
247    InstanceNotFound,
248    InstanceAlreadyExists,
249    BadMoniker,
250    BadChildDecl,
251    CollectionNotFound,
252    BadDynamicOffer,
253    DynamicOffersForbidden,
254    NumberedHandlesForbidden,
255    DictionaryAndAdditionalInputsSet,
256    #[doc(hidden)]
257    __SourceBreaking {
258        unknown_ordinal: u32,
259    },
260}
261
262/// Pattern that matches an unknown `CreateError` member.
263#[macro_export]
264macro_rules! CreateErrorUnknown {
265    () => {
266        _
267    };
268}
269
270impl CreateError {
271    #[inline]
272    pub fn from_primitive(prim: u32) -> Option<Self> {
273        match prim {
274            1 => Some(Self::Internal),
275            2 => Some(Self::InstanceNotFound),
276            3 => Some(Self::InstanceAlreadyExists),
277            4 => Some(Self::BadMoniker),
278            5 => Some(Self::BadChildDecl),
279            6 => Some(Self::CollectionNotFound),
280            7 => Some(Self::BadDynamicOffer),
281            8 => Some(Self::DynamicOffersForbidden),
282            10 => Some(Self::NumberedHandlesForbidden),
283            11 => Some(Self::DictionaryAndAdditionalInputsSet),
284            _ => None,
285        }
286    }
287
288    #[inline]
289    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
290        match prim {
291            1 => Self::Internal,
292            2 => Self::InstanceNotFound,
293            3 => Self::InstanceAlreadyExists,
294            4 => Self::BadMoniker,
295            5 => Self::BadChildDecl,
296            6 => Self::CollectionNotFound,
297            7 => Self::BadDynamicOffer,
298            8 => Self::DynamicOffersForbidden,
299            10 => Self::NumberedHandlesForbidden,
300            11 => Self::DictionaryAndAdditionalInputsSet,
301            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
302        }
303    }
304
305    #[inline]
306    pub fn unknown() -> Self {
307        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
308    }
309
310    #[inline]
311    pub const fn into_primitive(self) -> u32 {
312        match self {
313            Self::Internal => 1,
314            Self::InstanceNotFound => 2,
315            Self::InstanceAlreadyExists => 3,
316            Self::BadMoniker => 4,
317            Self::BadChildDecl => 5,
318            Self::CollectionNotFound => 6,
319            Self::BadDynamicOffer => 7,
320            Self::DynamicOffersForbidden => 8,
321            Self::NumberedHandlesForbidden => 10,
322            Self::DictionaryAndAdditionalInputsSet => 11,
323            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
324        }
325    }
326
327    #[inline]
328    pub fn is_unknown(&self) -> bool {
329        match self {
330            Self::__SourceBreaking { unknown_ordinal: _ } => true,
331            _ => false,
332        }
333    }
334}
335
336#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
337pub enum DeclType {
338    /// The capability comes from a `use` declaration in the component's manifest.
339    /// It will be available in the namespace of the component instance.
340    Use,
341    /// The capability comes from an `expose` declaration in the component's manifest.
342    Expose,
343    /// A capability that could be either a `use` or `expose` declaration. Used
344    /// in inputs only, for fuzzy matching.
345    Any,
346    #[doc(hidden)]
347    __SourceBreaking { unknown_ordinal: u32 },
348}
349
350/// Pattern that matches an unknown `DeclType` member.
351#[macro_export]
352macro_rules! DeclTypeUnknown {
353    () => {
354        _
355    };
356}
357
358impl DeclType {
359    #[inline]
360    pub fn from_primitive(prim: u32) -> Option<Self> {
361        match prim {
362            1 => Some(Self::Use),
363            2 => Some(Self::Expose),
364            3 => Some(Self::Any),
365            _ => None,
366        }
367    }
368
369    #[inline]
370    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
371        match prim {
372            1 => Self::Use,
373            2 => Self::Expose,
374            3 => Self::Any,
375            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
376        }
377    }
378
379    #[inline]
380    pub fn unknown() -> Self {
381        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
382    }
383
384    #[inline]
385    pub const fn into_primitive(self) -> u32 {
386        match self {
387            Self::Use => 1,
388            Self::Expose => 2,
389            Self::Any => 3,
390            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
391        }
392    }
393
394    #[inline]
395    pub fn is_unknown(&self) -> bool {
396        match self {
397            Self::__SourceBreaking { unknown_ordinal: _ } => true,
398            _ => false,
399        }
400    }
401}
402
403#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
404#[repr(u32)]
405pub enum DeletionError {
406    /// There was an error sending a request to the storage provider.
407    Connection = 1,
408    /// The storage provider returned an error in response to a protocol
409    /// request.
410    Protocol = 2,
411    /// There was no storage available for deletion.
412    NoneAvailable = 3,
413    /// This call is not supported.
414    Unsupported = 4,
415}
416
417impl DeletionError {
418    #[inline]
419    pub fn from_primitive(prim: u32) -> Option<Self> {
420        match prim {
421            1 => Some(Self::Connection),
422            2 => Some(Self::Protocol),
423            3 => Some(Self::NoneAvailable),
424            4 => Some(Self::Unsupported),
425            _ => None,
426        }
427    }
428
429    #[inline]
430    pub const fn into_primitive(self) -> u32 {
431        self as u32
432    }
433}
434
435#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
436pub enum DestroyError {
437    Internal,
438    InstanceNotFound,
439    BadMoniker,
440    BadChildRef,
441    InstanceNotResolved,
442    #[doc(hidden)]
443    __SourceBreaking {
444        unknown_ordinal: u32,
445    },
446}
447
448/// Pattern that matches an unknown `DestroyError` member.
449#[macro_export]
450macro_rules! DestroyErrorUnknown {
451    () => {
452        _
453    };
454}
455
456impl DestroyError {
457    #[inline]
458    pub fn from_primitive(prim: u32) -> Option<Self> {
459        match prim {
460            1 => Some(Self::Internal),
461            2 => Some(Self::InstanceNotFound),
462            3 => Some(Self::BadMoniker),
463            4 => Some(Self::BadChildRef),
464            5 => Some(Self::InstanceNotResolved),
465            _ => None,
466        }
467    }
468
469    #[inline]
470    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
471        match prim {
472            1 => Self::Internal,
473            2 => Self::InstanceNotFound,
474            3 => Self::BadMoniker,
475            4 => Self::BadChildRef,
476            5 => Self::InstanceNotResolved,
477            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
478        }
479    }
480
481    #[inline]
482    pub fn unknown() -> Self {
483        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
484    }
485
486    #[inline]
487    pub const fn into_primitive(self) -> u32 {
488        match self {
489            Self::Internal => 1,
490            Self::InstanceNotFound => 2,
491            Self::BadMoniker => 3,
492            Self::BadChildRef => 4,
493            Self::InstanceNotResolved => 5,
494            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
495        }
496    }
497
498    #[inline]
499    pub fn is_unknown(&self) -> bool {
500        match self {
501            Self::__SourceBreaking { unknown_ordinal: _ } => true,
502            _ => false,
503        }
504    }
505}
506
507/// Errors that can be returned by the GetAllInstances call.
508#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
509pub enum GetAllInstancesError {
510    /// Could not find the scope root instance.
511    InstanceNotFound,
512    #[doc(hidden)]
513    __SourceBreaking { unknown_ordinal: u32 },
514}
515
516/// Pattern that matches an unknown `GetAllInstancesError` member.
517#[macro_export]
518macro_rules! GetAllInstancesErrorUnknown {
519    () => {
520        _
521    };
522}
523
524impl GetAllInstancesError {
525    #[inline]
526    pub fn from_primitive(prim: u32) -> Option<Self> {
527        match prim {
528            1 => Some(Self::InstanceNotFound),
529            _ => None,
530        }
531    }
532
533    #[inline]
534    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
535        match prim {
536            1 => Self::InstanceNotFound,
537            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
538        }
539    }
540
541    #[inline]
542    pub fn unknown() -> Self {
543        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
544    }
545
546    #[inline]
547    pub const fn into_primitive(self) -> u32 {
548        match self {
549            Self::InstanceNotFound => 1,
550            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
551        }
552    }
553
554    #[inline]
555    pub fn is_unknown(&self) -> bool {
556        match self {
557            Self::__SourceBreaking { unknown_ordinal: _ } => true,
558            _ => false,
559        }
560    }
561}
562
563/// Errors that can be returned by the GetManifest call.
564#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
565pub enum GetDeclarationError {
566    /// Could not find an instance matching the given moniker.
567    InstanceNotFound,
568    /// The given moniker could not be parsed.
569    BadMoniker,
570    /// The component manifest is only available when the instance is resolved.
571    InstanceNotResolved,
572    /// The component manifest could not be encoded into its persistable format.
573    EncodeFailed,
574    /// The specified collection was not found in the specified component.
575    BadChildLocation,
576    /// The specified URL could not be parsed.
577    BadUrl,
578    #[doc(hidden)]
579    __SourceBreaking { unknown_ordinal: u32 },
580}
581
582/// Pattern that matches an unknown `GetDeclarationError` member.
583#[macro_export]
584macro_rules! GetDeclarationErrorUnknown {
585    () => {
586        _
587    };
588}
589
590impl GetDeclarationError {
591    #[inline]
592    pub fn from_primitive(prim: u32) -> Option<Self> {
593        match prim {
594            1 => Some(Self::InstanceNotFound),
595            2 => Some(Self::BadMoniker),
596            3 => Some(Self::InstanceNotResolved),
597            4 => Some(Self::EncodeFailed),
598            5 => Some(Self::BadChildLocation),
599            6 => Some(Self::BadUrl),
600            _ => None,
601        }
602    }
603
604    #[inline]
605    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
606        match prim {
607            1 => Self::InstanceNotFound,
608            2 => Self::BadMoniker,
609            3 => Self::InstanceNotResolved,
610            4 => Self::EncodeFailed,
611            5 => Self::BadChildLocation,
612            6 => Self::BadUrl,
613            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
614        }
615    }
616
617    #[inline]
618    pub fn unknown() -> Self {
619        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
620    }
621
622    #[inline]
623    pub const fn into_primitive(self) -> u32 {
624        match self {
625            Self::InstanceNotFound => 1,
626            Self::BadMoniker => 2,
627            Self::InstanceNotResolved => 3,
628            Self::EncodeFailed => 4,
629            Self::BadChildLocation => 5,
630            Self::BadUrl => 6,
631            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
632        }
633    }
634
635    #[inline]
636    pub fn is_unknown(&self) -> bool {
637        match self {
638            Self::__SourceBreaking { unknown_ordinal: _ } => true,
639            _ => false,
640        }
641    }
642}
643
644/// Errors that can be returned by the GetInstance call.
645#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
646pub enum GetInstanceError {
647    /// Could not find an instance matching the given moniker.
648    InstanceNotFound,
649    /// The given moniker could not be parsed.
650    BadMoniker,
651    #[doc(hidden)]
652    __SourceBreaking { unknown_ordinal: u32 },
653}
654
655/// Pattern that matches an unknown `GetInstanceError` member.
656#[macro_export]
657macro_rules! GetInstanceErrorUnknown {
658    () => {
659        _
660    };
661}
662
663impl GetInstanceError {
664    #[inline]
665    pub fn from_primitive(prim: u32) -> Option<Self> {
666        match prim {
667            1 => Some(Self::InstanceNotFound),
668            2 => Some(Self::BadMoniker),
669            _ => None,
670        }
671    }
672
673    #[inline]
674    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
675        match prim {
676            1 => Self::InstanceNotFound,
677            2 => Self::BadMoniker,
678            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
679        }
680    }
681
682    #[inline]
683    pub fn unknown() -> Self {
684        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
685    }
686
687    #[inline]
688    pub const fn into_primitive(self) -> u32 {
689        match self {
690            Self::InstanceNotFound => 1,
691            Self::BadMoniker => 2,
692            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
693        }
694    }
695
696    #[inline]
697    pub fn is_unknown(&self) -> bool {
698        match self {
699            Self::__SourceBreaking { unknown_ordinal: _ } => true,
700            _ => false,
701        }
702    }
703}
704
705/// Errors that can be returned by the GetStructuredConfig call.
706#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
707pub enum GetStructuredConfigError {
708    /// Could not find an instance matching the given moniker.
709    InstanceNotFound,
710    /// The given moniker could not be parsed.
711    BadMoniker,
712    /// The component manifest is only available when the instance is resolved.
713    InstanceNotResolved,
714    /// There is no structured configuration associated with this instance.
715    NoConfig,
716    #[doc(hidden)]
717    __SourceBreaking { unknown_ordinal: u32 },
718}
719
720/// Pattern that matches an unknown `GetStructuredConfigError` member.
721#[macro_export]
722macro_rules! GetStructuredConfigErrorUnknown {
723    () => {
724        _
725    };
726}
727
728impl GetStructuredConfigError {
729    #[inline]
730    pub fn from_primitive(prim: u32) -> Option<Self> {
731        match prim {
732            1 => Some(Self::InstanceNotFound),
733            2 => Some(Self::BadMoniker),
734            3 => Some(Self::InstanceNotResolved),
735            4 => Some(Self::NoConfig),
736            _ => None,
737        }
738    }
739
740    #[inline]
741    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
742        match prim {
743            1 => Self::InstanceNotFound,
744            2 => Self::BadMoniker,
745            3 => Self::InstanceNotResolved,
746            4 => Self::NoConfig,
747            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
748        }
749    }
750
751    #[inline]
752    pub fn unknown() -> Self {
753        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
754    }
755
756    #[inline]
757    pub const fn into_primitive(self) -> u32 {
758        match self {
759            Self::InstanceNotFound => 1,
760            Self::BadMoniker => 2,
761            Self::InstanceNotResolved => 3,
762            Self::NoConfig => 4,
763            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
764        }
765    }
766
767    #[inline]
768    pub fn is_unknown(&self) -> bool {
769        match self {
770            Self::__SourceBreaking { unknown_ordinal: _ } => true,
771            _ => false,
772        }
773    }
774}
775
776/// The directories of an instance that can be opened by component manager.
777#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
778pub enum OpenDirType {
779    /// Served by the component's program. Rights unknown.
780    OutgoingDir,
781    /// Served by the component's runner. Rights unknown.
782    RuntimeDir,
783    /// Served by the component's resolver. Rights unknown.
784    PackageDir,
785    /// Served by component manager. Directory has RW rights.
786    ExposedDir,
787    /// Served by component manager. Directory has RW rights.
788    NamespaceDir,
789    #[doc(hidden)]
790    __SourceBreaking { unknown_ordinal: u32 },
791}
792
793/// Pattern that matches an unknown `OpenDirType` member.
794#[macro_export]
795macro_rules! OpenDirTypeUnknown {
796    () => {
797        _
798    };
799}
800
801impl OpenDirType {
802    #[inline]
803    pub fn from_primitive(prim: u32) -> Option<Self> {
804        match prim {
805            1 => Some(Self::OutgoingDir),
806            2 => Some(Self::RuntimeDir),
807            3 => Some(Self::PackageDir),
808            4 => Some(Self::ExposedDir),
809            5 => Some(Self::NamespaceDir),
810            _ => None,
811        }
812    }
813
814    #[inline]
815    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
816        match prim {
817            1 => Self::OutgoingDir,
818            2 => Self::RuntimeDir,
819            3 => Self::PackageDir,
820            4 => Self::ExposedDir,
821            5 => Self::NamespaceDir,
822            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
823        }
824    }
825
826    #[inline]
827    pub fn unknown() -> Self {
828        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
829    }
830
831    #[inline]
832    pub const fn into_primitive(self) -> u32 {
833        match self {
834            Self::OutgoingDir => 1,
835            Self::RuntimeDir => 2,
836            Self::PackageDir => 3,
837            Self::ExposedDir => 4,
838            Self::NamespaceDir => 5,
839            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
840        }
841    }
842
843    #[inline]
844    pub fn is_unknown(&self) -> bool {
845        match self {
846            Self::__SourceBreaking { unknown_ordinal: _ } => true,
847            _ => false,
848        }
849    }
850}
851
852/// Errors that can be returned by the OpenDirectory call.
853#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
854pub enum OpenError {
855    /// Could not find an instance matching the given moniker.
856    InstanceNotFound,
857    /// The given moniker could not be parsed.
858    BadMoniker,
859    /// The requested directory is available when the instance is resolved.
860    InstanceNotResolved,
861    /// The requested directory is available when the instance is running.
862    ///
863    /// Deprecation: the platform will stop emitting this error from version 19.
864    /// The component will always be started if not already.
865    InstanceNotRunning,
866    /// Component manager's open request on the directory returned a FIDL error.
867    FidlError,
868    /// The instance does not have a directory of this type.
869    NoSuchDir,
870    /// The given directory type could not be parsed.
871    BadDirType,
872    /// Instance matching moniker was destroyed.
873    InstanceDestroyed,
874    #[doc(hidden)]
875    __SourceBreaking { unknown_ordinal: u32 },
876}
877
878/// Pattern that matches an unknown `OpenError` member.
879#[macro_export]
880macro_rules! OpenErrorUnknown {
881    () => {
882        _
883    };
884}
885
886impl OpenError {
887    #[inline]
888    pub fn from_primitive(prim: u32) -> Option<Self> {
889        match prim {
890            1 => Some(Self::InstanceNotFound),
891            2 => Some(Self::BadMoniker),
892            3 => Some(Self::InstanceNotResolved),
893            4 => Some(Self::InstanceNotRunning),
894            5 => Some(Self::FidlError),
895            6 => Some(Self::NoSuchDir),
896            7 => Some(Self::BadDirType),
897            10 => Some(Self::InstanceDestroyed),
898            _ => None,
899        }
900    }
901
902    #[inline]
903    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
904        match prim {
905            1 => Self::InstanceNotFound,
906            2 => Self::BadMoniker,
907            3 => Self::InstanceNotResolved,
908            4 => Self::InstanceNotRunning,
909            5 => Self::FidlError,
910            6 => Self::NoSuchDir,
911            7 => Self::BadDirType,
912            10 => Self::InstanceDestroyed,
913            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
914        }
915    }
916
917    #[inline]
918    pub fn unknown() -> Self {
919        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
920    }
921
922    #[inline]
923    pub const fn into_primitive(self) -> u32 {
924        match self {
925            Self::InstanceNotFound => 1,
926            Self::BadMoniker => 2,
927            Self::InstanceNotResolved => 3,
928            Self::InstanceNotRunning => 4,
929            Self::FidlError => 5,
930            Self::NoSuchDir => 6,
931            Self::BadDirType => 7,
932            Self::InstanceDestroyed => 10,
933            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
934        }
935    }
936
937    #[inline]
938    pub fn is_unknown(&self) -> bool {
939        match self {
940            Self::__SourceBreaking { unknown_ordinal: _ } => true,
941            _ => false,
942        }
943    }
944}
945
946/// Errors that can be returned by the RealmQuery API.
947#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
948pub enum RealmQueryError {
949    /// Could not find an instance matching the given moniker.
950    InstanceNotFound,
951    /// The given moniker could not be parsed.
952    BadMoniker,
953    #[doc(hidden)]
954    __SourceBreaking { unknown_ordinal: u32 },
955}
956
957/// Pattern that matches an unknown `RealmQueryError` member.
958#[macro_export]
959macro_rules! RealmQueryErrorUnknown {
960    () => {
961        _
962    };
963}
964
965impl RealmQueryError {
966    #[inline]
967    pub fn from_primitive(prim: u32) -> Option<Self> {
968        match prim {
969            1 => Some(Self::InstanceNotFound),
970            2 => Some(Self::BadMoniker),
971            _ => None,
972        }
973    }
974
975    #[inline]
976    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
977        match prim {
978            1 => Self::InstanceNotFound,
979            2 => Self::BadMoniker,
980            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
981        }
982    }
983
984    #[inline]
985    pub fn unknown() -> Self {
986        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
987    }
988
989    #[inline]
990    pub const fn into_primitive(self) -> u32 {
991        match self {
992            Self::InstanceNotFound => 1,
993            Self::BadMoniker => 2,
994            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
995        }
996    }
997
998    #[inline]
999    pub fn is_unknown(&self) -> bool {
1000        match self {
1001            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1002            _ => false,
1003        }
1004    }
1005}
1006
1007#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1008pub enum ResolveError {
1009    Internal,
1010    InstanceNotFound,
1011    BadMoniker,
1012    PackageNotFound,
1013    ManifestNotFound,
1014    PolicyError,
1015    #[doc(hidden)]
1016    __SourceBreaking {
1017        unknown_ordinal: u32,
1018    },
1019}
1020
1021/// Pattern that matches an unknown `ResolveError` member.
1022#[macro_export]
1023macro_rules! ResolveErrorUnknown {
1024    () => {
1025        _
1026    };
1027}
1028
1029impl ResolveError {
1030    #[inline]
1031    pub fn from_primitive(prim: u32) -> Option<Self> {
1032        match prim {
1033            1 => Some(Self::Internal),
1034            2 => Some(Self::InstanceNotFound),
1035            3 => Some(Self::BadMoniker),
1036            4 => Some(Self::PackageNotFound),
1037            5 => Some(Self::ManifestNotFound),
1038            6 => Some(Self::PolicyError),
1039            _ => None,
1040        }
1041    }
1042
1043    #[inline]
1044    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1045        match prim {
1046            1 => Self::Internal,
1047            2 => Self::InstanceNotFound,
1048            3 => Self::BadMoniker,
1049            4 => Self::PackageNotFound,
1050            5 => Self::ManifestNotFound,
1051            6 => Self::PolicyError,
1052            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1053        }
1054    }
1055
1056    #[inline]
1057    pub fn unknown() -> Self {
1058        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1059    }
1060
1061    #[inline]
1062    pub const fn into_primitive(self) -> u32 {
1063        match self {
1064            Self::Internal => 1,
1065            Self::InstanceNotFound => 2,
1066            Self::BadMoniker => 3,
1067            Self::PackageNotFound => 4,
1068            Self::ManifestNotFound => 5,
1069            Self::PolicyError => 6,
1070            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1071        }
1072    }
1073
1074    #[inline]
1075    pub fn is_unknown(&self) -> bool {
1076        match self {
1077            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1078            _ => false,
1079        }
1080    }
1081}
1082
1083#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1084pub enum RouteOutcome {
1085    /// Routing succeeded and returned a capability.
1086    Success,
1087    /// Routing terminated in a `void` source. This is a form of success but it's exposed as
1088    /// its own state so tooling can report it.
1089    Void,
1090    /// Routing failed. This will be the state iff `RouteReport.error` is set.
1091    Failed,
1092    #[doc(hidden)]
1093    __SourceBreaking { unknown_ordinal: u32 },
1094}
1095
1096/// Pattern that matches an unknown `RouteOutcome` member.
1097#[macro_export]
1098macro_rules! RouteOutcomeUnknown {
1099    () => {
1100        _
1101    };
1102}
1103
1104impl RouteOutcome {
1105    #[inline]
1106    pub fn from_primitive(prim: u32) -> Option<Self> {
1107        match prim {
1108            1 => Some(Self::Success),
1109            2 => Some(Self::Void),
1110            3 => Some(Self::Failed),
1111            _ => None,
1112        }
1113    }
1114
1115    #[inline]
1116    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1117        match prim {
1118            1 => Self::Success,
1119            2 => Self::Void,
1120            3 => Self::Failed,
1121            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1122        }
1123    }
1124
1125    #[inline]
1126    pub fn unknown() -> Self {
1127        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1128    }
1129
1130    #[inline]
1131    pub const fn into_primitive(self) -> u32 {
1132        match self {
1133            Self::Success => 1,
1134            Self::Void => 2,
1135            Self::Failed => 3,
1136            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1137        }
1138    }
1139
1140    #[inline]
1141    pub fn is_unknown(&self) -> bool {
1142        match self {
1143            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1144            _ => false,
1145        }
1146    }
1147}
1148
1149/// Errors for RouteValidator
1150#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1151pub enum RouteValidatorError {
1152    /// An unexpected error occurred.
1153    Internal,
1154    /// At least one argument had an invalid format.
1155    InvalidArguments,
1156    /// The component instance was not found.
1157    InstanceNotFound,
1158    /// The component instance was not resolved.
1159    InstanceNotResolved,
1160    #[doc(hidden)]
1161    __SourceBreaking { unknown_ordinal: u32 },
1162}
1163
1164/// Pattern that matches an unknown `RouteValidatorError` member.
1165#[macro_export]
1166macro_rules! RouteValidatorErrorUnknown {
1167    () => {
1168        _
1169    };
1170}
1171
1172impl RouteValidatorError {
1173    #[inline]
1174    pub fn from_primitive(prim: u32) -> Option<Self> {
1175        match prim {
1176            1 => Some(Self::Internal),
1177            2 => Some(Self::InvalidArguments),
1178            3 => Some(Self::InstanceNotFound),
1179            4 => Some(Self::InstanceNotResolved),
1180            _ => None,
1181        }
1182    }
1183
1184    #[inline]
1185    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1186        match prim {
1187            1 => Self::Internal,
1188            2 => Self::InvalidArguments,
1189            3 => Self::InstanceNotFound,
1190            4 => Self::InstanceNotResolved,
1191            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1192        }
1193    }
1194
1195    #[inline]
1196    pub fn unknown() -> Self {
1197        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1198    }
1199
1200    #[inline]
1201    pub const fn into_primitive(self) -> u32 {
1202        match self {
1203            Self::Internal => 1,
1204            Self::InvalidArguments => 2,
1205            Self::InstanceNotFound => 3,
1206            Self::InstanceNotResolved => 4,
1207            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1208        }
1209    }
1210
1211    #[inline]
1212    pub fn is_unknown(&self) -> bool {
1213        match self {
1214            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1215            _ => false,
1216        }
1217    }
1218}
1219
1220#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1221pub enum StartError {
1222    Internal,
1223    InstanceNotFound,
1224    BadMoniker,
1225    PackageNotFound,
1226    ManifestNotFound,
1227    PolicyError,
1228    InvalidArguments,
1229    #[doc(hidden)]
1230    __SourceBreaking {
1231        unknown_ordinal: u32,
1232    },
1233}
1234
1235/// Pattern that matches an unknown `StartError` member.
1236#[macro_export]
1237macro_rules! StartErrorUnknown {
1238    () => {
1239        _
1240    };
1241}
1242
1243impl StartError {
1244    #[inline]
1245    pub fn from_primitive(prim: u32) -> Option<Self> {
1246        match prim {
1247            1 => Some(Self::Internal),
1248            2 => Some(Self::InstanceNotFound),
1249            3 => Some(Self::BadMoniker),
1250            4 => Some(Self::PackageNotFound),
1251            5 => Some(Self::ManifestNotFound),
1252            6 => Some(Self::PolicyError),
1253            7 => Some(Self::InvalidArguments),
1254            _ => None,
1255        }
1256    }
1257
1258    #[inline]
1259    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1260        match prim {
1261            1 => Self::Internal,
1262            2 => Self::InstanceNotFound,
1263            3 => Self::BadMoniker,
1264            4 => Self::PackageNotFound,
1265            5 => Self::ManifestNotFound,
1266            6 => Self::PolicyError,
1267            7 => Self::InvalidArguments,
1268            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1269        }
1270    }
1271
1272    #[inline]
1273    pub fn unknown() -> Self {
1274        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1275    }
1276
1277    #[inline]
1278    pub const fn into_primitive(self) -> u32 {
1279        match self {
1280            Self::Internal => 1,
1281            Self::InstanceNotFound => 2,
1282            Self::BadMoniker => 3,
1283            Self::PackageNotFound => 4,
1284            Self::ManifestNotFound => 5,
1285            Self::PolicyError => 6,
1286            Self::InvalidArguments => 7,
1287            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1288        }
1289    }
1290
1291    #[inline]
1292    pub fn is_unknown(&self) -> bool {
1293        match self {
1294            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1295            _ => false,
1296        }
1297    }
1298}
1299
1300#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1301#[repr(u32)]
1302pub enum StatusError {
1303    /// The storage provider returned an error to a request or the connection
1304    /// to the provider unexpectedly closed.
1305    Provider = 1,
1306    /// Information returned by the storage provider appears to be invalid.
1307    ResponseInvalid = 2,
1308    /// A call to the storage provider succeeded, but it returned unexpectedly
1309    /// empty data.
1310    StatusUnknown = 3,
1311    /// This call is not supported.
1312    Unsupported = 4,
1313}
1314
1315impl StatusError {
1316    #[inline]
1317    pub fn from_primitive(prim: u32) -> Option<Self> {
1318        match prim {
1319            1 => Some(Self::Provider),
1320            2 => Some(Self::ResponseInvalid),
1321            3 => Some(Self::StatusUnknown),
1322            4 => Some(Self::Unsupported),
1323            _ => None,
1324        }
1325    }
1326
1327    #[inline]
1328    pub const fn into_primitive(self) -> u32 {
1329        self as u32
1330    }
1331}
1332
1333#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1334pub enum StopError {
1335    Internal,
1336    InstanceNotFound,
1337    BadMoniker,
1338    #[doc(hidden)]
1339    __SourceBreaking {
1340        unknown_ordinal: u32,
1341    },
1342}
1343
1344/// Pattern that matches an unknown `StopError` member.
1345#[macro_export]
1346macro_rules! StopErrorUnknown {
1347    () => {
1348        _
1349    };
1350}
1351
1352impl StopError {
1353    #[inline]
1354    pub fn from_primitive(prim: u32) -> Option<Self> {
1355        match prim {
1356            1 => Some(Self::Internal),
1357            2 => Some(Self::InstanceNotFound),
1358            3 => Some(Self::BadMoniker),
1359            _ => None,
1360        }
1361    }
1362
1363    #[inline]
1364    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1365        match prim {
1366            1 => Self::Internal,
1367            2 => Self::InstanceNotFound,
1368            3 => Self::BadMoniker,
1369            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1370        }
1371    }
1372
1373    #[inline]
1374    pub fn unknown() -> Self {
1375        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1376    }
1377
1378    #[inline]
1379    pub const fn into_primitive(self) -> u32 {
1380        match self {
1381            Self::Internal => 1,
1382            Self::InstanceNotFound => 2,
1383            Self::BadMoniker => 3,
1384            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1385        }
1386    }
1387
1388    #[inline]
1389    pub fn is_unknown(&self) -> bool {
1390        match self {
1391            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1392            _ => false,
1393        }
1394    }
1395}
1396
1397#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1398pub enum UnresolveError {
1399    Internal,
1400    InstanceNotFound,
1401    BadMoniker,
1402    #[doc(hidden)]
1403    __SourceBreaking {
1404        unknown_ordinal: u32,
1405    },
1406}
1407
1408/// Pattern that matches an unknown `UnresolveError` member.
1409#[macro_export]
1410macro_rules! UnresolveErrorUnknown {
1411    () => {
1412        _
1413    };
1414}
1415
1416impl UnresolveError {
1417    #[inline]
1418    pub fn from_primitive(prim: u32) -> Option<Self> {
1419        match prim {
1420            1 => Some(Self::Internal),
1421            2 => Some(Self::InstanceNotFound),
1422            3 => Some(Self::BadMoniker),
1423            _ => None,
1424        }
1425    }
1426
1427    #[inline]
1428    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1429        match prim {
1430            1 => Self::Internal,
1431            2 => Self::InstanceNotFound,
1432            3 => Self::BadMoniker,
1433            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1434        }
1435    }
1436
1437    #[inline]
1438    pub fn unknown() -> Self {
1439        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1440    }
1441
1442    #[inline]
1443    pub const fn into_primitive(self) -> u32 {
1444        match self {
1445            Self::Internal => 1,
1446            Self::InstanceNotFound => 2,
1447            Self::BadMoniker => 3,
1448            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1449        }
1450    }
1451
1452    #[inline]
1453    pub fn is_unknown(&self) -> bool {
1454        match self {
1455            Self::__SourceBreaking { unknown_ordinal: _ } => true,
1456            _ => false,
1457        }
1458    }
1459}
1460
1461#[derive(Clone, Debug, PartialEq)]
1462pub struct ConfigOverrideSetStructuredConfigRequest {
1463    /// The moniker of the component that should use the structured config
1464    /// override.  This moniker is relative to the realm that uses this
1465    /// protocol.
1466    pub moniker: String,
1467    pub fields: Vec<fidl_fuchsia_component_decl__common::ConfigOverride>,
1468}
1469
1470impl fidl::Persistable for ConfigOverrideSetStructuredConfigRequest {}
1471
1472#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1473pub struct ConfigOverrideUnsetStructuredConfigRequest {
1474    /// The moniker of the component that should use the structured config
1475    /// override.  This moniker is relative to the realm that uses this
1476    /// protocol.
1477    pub moniker: String,
1478}
1479
1480impl fidl::Persistable for ConfigOverrideUnsetStructuredConfigRequest {}
1481
1482#[derive(Clone, Debug, PartialEq)]
1483pub struct CrashIntrospectFindComponentByThreadKoidResponse {
1484    pub info: ComponentCrashInfo,
1485}
1486
1487impl fidl::Persistable for CrashIntrospectFindComponentByThreadKoidResponse {}
1488
1489#[derive(Clone, Debug, PartialEq)]
1490pub struct InstanceIteratorNextResponse {
1491    pub infos: Vec<Instance>,
1492}
1493
1494impl fidl::Persistable for InstanceIteratorNextResponse {}
1495
1496#[derive(Clone, Debug, PartialEq)]
1497pub struct LifecycleControllerDestroyInstanceRequest {
1498    pub parent_moniker: String,
1499    pub child: fidl_fuchsia_component_decl__common::ChildRef,
1500}
1501
1502impl fidl::Persistable for LifecycleControllerDestroyInstanceRequest {}
1503
1504#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1505pub struct LifecycleControllerResolveInstanceRequest {
1506    pub moniker: String,
1507}
1508
1509impl fidl::Persistable for LifecycleControllerResolveInstanceRequest {}
1510
1511#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1512pub struct LifecycleControllerStopInstanceRequest {
1513    pub moniker: String,
1514}
1515
1516impl fidl::Persistable for LifecycleControllerStopInstanceRequest {}
1517
1518#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1519pub struct LifecycleControllerUnresolveInstanceRequest {
1520    pub moniker: String,
1521}
1522
1523impl fidl::Persistable for LifecycleControllerUnresolveInstanceRequest {}
1524
1525#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1526pub struct ManifestBytesIteratorNextResponse {
1527    pub infos: Vec<u8>,
1528}
1529
1530impl fidl::Persistable for ManifestBytesIteratorNextResponse {}
1531
1532#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1533pub struct RealmQueryConstructNamespaceRequest {
1534    pub moniker: String,
1535}
1536
1537impl fidl::Persistable for RealmQueryConstructNamespaceRequest {}
1538
1539#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1540pub struct RealmQueryGetInstanceRequest {
1541    pub moniker: String,
1542}
1543
1544impl fidl::Persistable for RealmQueryGetInstanceRequest {}
1545
1546#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1547pub struct RealmQueryGetResolvedDeclarationRequest {
1548    pub moniker: String,
1549}
1550
1551impl fidl::Persistable for RealmQueryGetResolvedDeclarationRequest {}
1552
1553#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1554pub struct RealmQueryGetStructuredConfigRequest {
1555    pub moniker: String,
1556}
1557
1558impl fidl::Persistable for RealmQueryGetStructuredConfigRequest {}
1559
1560#[derive(Clone, Debug, PartialEq)]
1561pub struct RealmQueryResolveDeclarationRequest {
1562    pub parent: String,
1563    pub child_location: ChildLocation,
1564    pub url: String,
1565}
1566
1567impl fidl::Persistable for RealmQueryResolveDeclarationRequest {}
1568
1569#[derive(Clone, Debug, PartialEq)]
1570pub struct RealmQueryGetInstanceResponse {
1571    pub instance: Instance,
1572}
1573
1574impl fidl::Persistable for RealmQueryGetInstanceResponse {}
1575
1576#[derive(Clone, Debug, PartialEq)]
1577pub struct RealmQueryGetStructuredConfigResponse {
1578    pub config: fidl_fuchsia_component_decl__common::ResolvedConfig,
1579}
1580
1581impl fidl::Persistable for RealmQueryGetStructuredConfigResponse {}
1582
1583/// A capability in a target component to route to the source.
1584#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1585pub struct RouteTarget {
1586    /// The capability name to match (this is not the path). Supports fuzzy
1587    /// matching by substring.
1588    pub name: String,
1589    /// Whether the capability is a `use`d by the component or `expose`d
1590    /// from it.
1591    pub decl_type: DeclType,
1592}
1593
1594impl fidl::Persistable for RouteTarget {}
1595
1596#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1597pub struct RouteValidatorRouteRequest {
1598    /// The target component with the capability to route.
1599    pub moniker: String,
1600    /// The target capabilites to route (i.e., uses or exposes)
1601    pub targets: Vec<RouteTarget>,
1602}
1603
1604impl fidl::Persistable for RouteValidatorRouteRequest {}
1605
1606#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1607pub struct RouteValidatorValidateRequest {
1608    pub moniker: String,
1609}
1610
1611impl fidl::Persistable for RouteValidatorValidateRequest {}
1612
1613#[derive(Clone, Debug, PartialEq)]
1614pub struct RouteValidatorRouteResponse {
1615    pub reports: Vec<RouteReport>,
1616}
1617
1618impl fidl::Persistable for RouteValidatorRouteResponse {}
1619
1620#[derive(Clone, Debug, PartialEq)]
1621pub struct RouteValidatorValidateResponse {
1622    pub reports: Vec<RouteReport>,
1623}
1624
1625impl fidl::Persistable for RouteValidatorValidateResponse {}
1626
1627#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1628pub struct StorageAdminDeleteComponentStorageRequest {
1629    pub relative_moniker: String,
1630}
1631
1632impl fidl::Persistable for StorageAdminDeleteComponentStorageRequest {}
1633
1634#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1635pub struct StorageIteratorNextResponse {
1636    pub relative_monikers: Vec<String>,
1637}
1638
1639impl fidl::Persistable for StorageIteratorNextResponse {}
1640
1641/// Information stored when a thread crashes.
1642#[derive(Clone, Debug, Default, PartialEq)]
1643pub struct ComponentCrashInfo {
1644    pub url: Option<String>,
1645    pub moniker: Option<String>,
1646    #[doc(hidden)]
1647    pub __source_breaking: fidl::marker::SourceBreaking,
1648}
1649
1650impl fidl::Persistable for ComponentCrashInfo {}
1651
1652/// Metadata about a dictionary entry.
1653#[derive(Clone, Debug, Default, PartialEq)]
1654pub struct DictionaryEntry {
1655    /// The name (key) of the capability in this dictionary.
1656    pub name: Option<String>,
1657    #[doc(hidden)]
1658    pub __source_breaking: fidl::marker::SourceBreaking,
1659}
1660
1661impl fidl::Persistable for DictionaryEntry {}
1662
1663/// Information about the execution state of a component instance.
1664#[derive(Clone, Debug, Default, PartialEq)]
1665pub struct ExecutionInfo {
1666    /// The human-readable explanation for why this instance was started.
1667    pub start_reason: Option<String>,
1668    #[doc(hidden)]
1669    pub __source_breaking: fidl::marker::SourceBreaking,
1670}
1671
1672impl fidl::Persistable for ExecutionInfo {}
1673
1674/// Describes a component instance under a realm.
1675///
1676/// Note: This structure is expected to fit in a single Zircon channel message.
1677///       Do not add fields that have the potential to violate that constraint.
1678///       Prefer to create dedicated methods and iterators instead.
1679#[derive(Clone, Debug, Default, PartialEq)]
1680pub struct Instance {
1681    /// The path to this instance relative to the scope root.
1682    pub moniker: Option<String>,
1683    /// The URL of the component manifest for this instance.
1684    pub url: Option<String>,
1685    /// The stable identifier for this instance, if one exists.
1686    pub instance_id: Option<String>,
1687    /// Information about the resolved state of a component instance.
1688    /// If the component is not resolved, this field is not set.
1689    pub resolved_info: Option<ResolvedInfo>,
1690    /// The component's environment name as defined by its parent.
1691    pub environment: Option<String>,
1692    #[doc(hidden)]
1693    pub __source_breaking: fidl::marker::SourceBreaking,
1694}
1695
1696impl fidl::Persistable for Instance {}
1697
1698/// Information about the resolved state of a component instance.
1699#[derive(Clone, Debug, Default, PartialEq)]
1700pub struct ResolvedInfo {
1701    /// The resolved URL of this instance.
1702    pub resolved_url: Option<String>,
1703    /// Information about the execution state of a component instance.
1704    /// If the component is not running, this field is not set.
1705    pub execution_info: Option<ExecutionInfo>,
1706    #[doc(hidden)]
1707    pub __source_breaking: fidl::marker::SourceBreaking,
1708}
1709
1710impl fidl::Persistable for ResolvedInfo {}
1711
1712/// Routing error for a particular capability.
1713#[derive(Clone, Debug, Default, PartialEq)]
1714pub struct RouteError {
1715    /// A human-readable explanation of the routing error.
1716    pub summary: Option<String>,
1717    #[doc(hidden)]
1718    pub __source_breaking: fidl::marker::SourceBreaking,
1719}
1720
1721impl fidl::Persistable for RouteError {}
1722
1723/// Routing result for a particular capability.
1724#[derive(Clone, Debug, Default, PartialEq)]
1725pub struct RouteReport {
1726    /// The capability whose routing was attempted.
1727    pub capability: Option<String>,
1728    /// Type of capability declaration
1729    pub decl_type: Option<DeclType>,
1730    /// Describes the error that occurred from routing this capability.
1731    /// This field is not present if routing succeeded.
1732    pub error: Option<RouteError>,
1733    /// The moniker of the source component.
1734    pub source_moniker: Option<String>,
1735    /// Metadata about the instances in a service. Populated only for aggregated services.
1736    pub service_instances: Option<Vec<ServiceInstance>>,
1737    /// The requested level of availability of the capability.
1738    pub availability: Option<fidl_fuchsia_component_decl__common::Availability>,
1739    /// The overall outcome of routing.
1740    pub outcome: Option<RouteOutcome>,
1741    /// Metadata about the entries in a dictionary. Populated only for dictionaries.
1742    pub dictionary_entries: Option<Vec<DictionaryEntry>>,
1743    #[doc(hidden)]
1744    pub __source_breaking: fidl::marker::SourceBreaking,
1745}
1746
1747impl fidl::Persistable for RouteReport {}
1748
1749/// Metadata about a service instance.
1750#[derive(Clone, Debug, Default, PartialEq)]
1751pub struct ServiceInstance {
1752    /// The name of the service instance in this service directory.
1753    pub instance_name: Option<String>,
1754    /// The name of the component that serves the service instance,
1755    /// including the collection name if the component is a child.
1756    pub child_name: Option<String>,
1757    /// The name of the service instance as exposed by the child.
1758    pub child_instance_name: Option<String>,
1759    #[doc(hidden)]
1760    pub __source_breaking: fidl::marker::SourceBreaking,
1761}
1762
1763impl fidl::Persistable for ServiceInstance {}
1764
1765/// Metadata about status of the storage
1766#[derive(Clone, Debug, Default, PartialEq)]
1767pub struct StorageStatus {
1768    pub total_size: Option<u64>,
1769    pub used_size: Option<u64>,
1770    #[doc(hidden)]
1771    pub __source_breaking: fidl::marker::SourceBreaking,
1772}
1773
1774impl fidl::Persistable for StorageStatus {}
1775
1776/// Locations from which a child could be resolved under a given parent.
1777#[derive(Clone, Debug)]
1778pub enum ChildLocation {
1779    Collection(String),
1780    #[doc(hidden)]
1781    __SourceBreaking {
1782        unknown_ordinal: u64,
1783    },
1784}
1785
1786/// Pattern that matches an unknown `ChildLocation` member.
1787#[macro_export]
1788macro_rules! ChildLocationUnknown {
1789    () => {
1790        _
1791    };
1792}
1793
1794// Custom PartialEq so that unknown variants are not equal to themselves.
1795impl PartialEq for ChildLocation {
1796    fn eq(&self, other: &Self) -> bool {
1797        match (self, other) {
1798            (Self::Collection(x), Self::Collection(y)) => *x == *y,
1799            _ => false,
1800        }
1801    }
1802}
1803
1804impl ChildLocation {
1805    #[inline]
1806    pub fn ordinal(&self) -> u64 {
1807        match *self {
1808            Self::Collection(_) => 1,
1809            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1810        }
1811    }
1812
1813    #[inline]
1814    pub fn unknown_variant_for_testing() -> Self {
1815        Self::__SourceBreaking { unknown_ordinal: 0 }
1816    }
1817
1818    #[inline]
1819    pub fn is_unknown(&self) -> bool {
1820        match self {
1821            Self::__SourceBreaking { .. } => true,
1822            _ => false,
1823        }
1824    }
1825}
1826
1827impl fidl::Persistable for ChildLocation {}
1828
1829pub mod boot_controller_ordinals {
1830    pub const NOTIFY: u64 = 0x55173ddd1d9ed8de;
1831}
1832
1833pub mod config_override_ordinals {
1834    pub const SET_STRUCTURED_CONFIG: u64 = 0x2c6a138832d2e0ee;
1835    pub const UNSET_STRUCTURED_CONFIG: u64 = 0x342ec7d2bef05552;
1836}
1837
1838pub mod crash_introspect_ordinals {
1839    pub const FIND_COMPONENT_BY_THREAD_KOID: u64 = 0x75d3ff081eca468d;
1840}
1841
1842pub mod instance_iterator_ordinals {
1843    pub const NEXT: u64 = 0x3a4e3d52432a52ee;
1844}
1845
1846pub mod lifecycle_controller_ordinals {
1847    pub const START_INSTANCE: u64 = 0x13fcb422876384bf;
1848    pub const START_INSTANCE_WITH_ARGS: u64 = 0xd3b467436223e9;
1849    pub const STOP_INSTANCE: u64 = 0x1362ba9d0e3caf36;
1850    pub const RESOLVE_INSTANCE: u64 = 0x426ab8dd53d8e737;
1851    pub const UNRESOLVE_INSTANCE: u64 = 0x18166a2aa798cb99;
1852    pub const CREATE_INSTANCE: u64 = 0x48d17ae777e4f9;
1853    pub const DESTROY_INSTANCE: u64 = 0x27640ae5889d7443;
1854}
1855
1856pub mod manifest_bytes_iterator_ordinals {
1857    pub const NEXT: u64 = 0x4be4659549b15500;
1858}
1859
1860pub mod realm_explorer_ordinals {}
1861
1862pub mod realm_query_ordinals {
1863    pub const GET_INSTANCE: u64 = 0x3496ca1e5a0c13a8;
1864    pub const GET_RESOLVED_DECLARATION: u64 = 0x31a493d284a0bc1f;
1865    pub const RESOLVE_DECLARATION: u64 = 0x1ab1adf2a87d962d;
1866    pub const GET_STRUCTURED_CONFIG: u64 = 0x16f88f6735bd204;
1867    pub const GET_ALL_INSTANCES: u64 = 0x7b5a8775d30cad47;
1868    pub const CONSTRUCT_NAMESPACE: u64 = 0x5ecb29c02c488eeb;
1869    pub const OPEN_DIRECTORY: u64 = 0x333d68f1deecec85;
1870    pub const CONNECT_TO_STORAGE_ADMIN: u64 = 0x7807e6b4f623ace;
1871    pub const OPEN_STORAGE_ADMIN: u64 = 0x54d6af83942b4069;
1872}
1873
1874pub mod route_validator_ordinals {
1875    pub const VALIDATE: u64 = 0x3360b96d5f86cdf4;
1876    pub const ROUTE: u64 = 0x51c9b268216d8239;
1877}
1878
1879pub mod storage_admin_ordinals {
1880    pub const OPEN_STORAGE: u64 = 0x6ceaa5904cfe4377;
1881    pub const LIST_STORAGE_IN_REALM: u64 = 0x764f6d1f083e8bfb;
1882    pub const OPEN_COMPONENT_STORAGE_BY_ID: u64 = 0x4802102cc55d5df1;
1883    pub const DELETE_COMPONENT_STORAGE: u64 = 0x1677c1cdfcdbf45a;
1884    pub const GET_STATUS: u64 = 0x7729e325a6c526c8;
1885    pub const DELETE_ALL_STORAGE_CONTENTS: u64 = 0x2ee980b4b2d24adb;
1886}
1887
1888pub mod storage_iterator_ordinals {
1889    pub const NEXT: u64 = 0x7a6b21f15fd01b72;
1890}
1891
1892pub mod system_controller_ordinals {
1893    pub const SHUTDOWN: u64 = 0x25f56c938344e549;
1894}
1895
1896mod internal {
1897    use super::*;
1898    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideError {
1899        type Owned = Self;
1900
1901        #[inline(always)]
1902        fn inline_align(_context: fidl::encoding::Context) -> usize {
1903            std::mem::align_of::<u32>()
1904        }
1905
1906        #[inline(always)]
1907        fn inline_size(_context: fidl::encoding::Context) -> usize {
1908            std::mem::size_of::<u32>()
1909        }
1910
1911        #[inline(always)]
1912        fn encode_is_copy() -> bool {
1913            false
1914        }
1915
1916        #[inline(always)]
1917        fn decode_is_copy() -> bool {
1918            false
1919        }
1920    }
1921
1922    impl fidl::encoding::ValueTypeMarker for ConfigOverrideError {
1923        type Borrowed<'a> = Self;
1924        #[inline(always)]
1925        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1926            *value
1927        }
1928    }
1929
1930    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1931        for ConfigOverrideError
1932    {
1933        #[inline]
1934        unsafe fn encode(
1935            self,
1936            encoder: &mut fidl::encoding::Encoder<'_, D>,
1937            offset: usize,
1938            _depth: fidl::encoding::Depth,
1939        ) -> fidl::Result<()> {
1940            encoder.debug_check_bounds::<Self>(offset);
1941            encoder.write_num(self.into_primitive(), offset);
1942            Ok(())
1943        }
1944    }
1945
1946    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigOverrideError {
1947        #[inline(always)]
1948        fn new_empty() -> Self {
1949            Self::unknown()
1950        }
1951
1952        #[inline]
1953        unsafe fn decode(
1954            &mut self,
1955            decoder: &mut fidl::encoding::Decoder<'_, D>,
1956            offset: usize,
1957            _depth: fidl::encoding::Depth,
1958        ) -> fidl::Result<()> {
1959            decoder.debug_check_bounds::<Self>(offset);
1960            let prim = decoder.read_num::<u32>(offset);
1961
1962            *self = Self::from_primitive_allow_unknown(prim);
1963            Ok(())
1964        }
1965    }
1966    unsafe impl fidl::encoding::TypeMarker for ConnectToStorageAdminError {
1967        type Owned = Self;
1968
1969        #[inline(always)]
1970        fn inline_align(_context: fidl::encoding::Context) -> usize {
1971            std::mem::align_of::<u32>()
1972        }
1973
1974        #[inline(always)]
1975        fn inline_size(_context: fidl::encoding::Context) -> usize {
1976            std::mem::size_of::<u32>()
1977        }
1978
1979        #[inline(always)]
1980        fn encode_is_copy() -> bool {
1981            false
1982        }
1983
1984        #[inline(always)]
1985        fn decode_is_copy() -> bool {
1986            false
1987        }
1988    }
1989
1990    impl fidl::encoding::ValueTypeMarker for ConnectToStorageAdminError {
1991        type Borrowed<'a> = Self;
1992        #[inline(always)]
1993        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1994            *value
1995        }
1996    }
1997
1998    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1999        for ConnectToStorageAdminError
2000    {
2001        #[inline]
2002        unsafe fn encode(
2003            self,
2004            encoder: &mut fidl::encoding::Encoder<'_, D>,
2005            offset: usize,
2006            _depth: fidl::encoding::Depth,
2007        ) -> fidl::Result<()> {
2008            encoder.debug_check_bounds::<Self>(offset);
2009            encoder.write_num(self.into_primitive(), offset);
2010            Ok(())
2011        }
2012    }
2013
2014    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2015        for ConnectToStorageAdminError
2016    {
2017        #[inline(always)]
2018        fn new_empty() -> Self {
2019            Self::unknown()
2020        }
2021
2022        #[inline]
2023        unsafe fn decode(
2024            &mut self,
2025            decoder: &mut fidl::encoding::Decoder<'_, D>,
2026            offset: usize,
2027            _depth: fidl::encoding::Depth,
2028        ) -> fidl::Result<()> {
2029            decoder.debug_check_bounds::<Self>(offset);
2030            let prim = decoder.read_num::<u32>(offset);
2031
2032            *self = Self::from_primitive_allow_unknown(prim);
2033            Ok(())
2034        }
2035    }
2036    unsafe impl fidl::encoding::TypeMarker for ConstructNamespaceError {
2037        type Owned = Self;
2038
2039        #[inline(always)]
2040        fn inline_align(_context: fidl::encoding::Context) -> usize {
2041            std::mem::align_of::<u32>()
2042        }
2043
2044        #[inline(always)]
2045        fn inline_size(_context: fidl::encoding::Context) -> usize {
2046            std::mem::size_of::<u32>()
2047        }
2048
2049        #[inline(always)]
2050        fn encode_is_copy() -> bool {
2051            false
2052        }
2053
2054        #[inline(always)]
2055        fn decode_is_copy() -> bool {
2056            false
2057        }
2058    }
2059
2060    impl fidl::encoding::ValueTypeMarker for ConstructNamespaceError {
2061        type Borrowed<'a> = Self;
2062        #[inline(always)]
2063        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2064            *value
2065        }
2066    }
2067
2068    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2069        for ConstructNamespaceError
2070    {
2071        #[inline]
2072        unsafe fn encode(
2073            self,
2074            encoder: &mut fidl::encoding::Encoder<'_, D>,
2075            offset: usize,
2076            _depth: fidl::encoding::Depth,
2077        ) -> fidl::Result<()> {
2078            encoder.debug_check_bounds::<Self>(offset);
2079            encoder.write_num(self.into_primitive(), offset);
2080            Ok(())
2081        }
2082    }
2083
2084    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2085        for ConstructNamespaceError
2086    {
2087        #[inline(always)]
2088        fn new_empty() -> Self {
2089            Self::unknown()
2090        }
2091
2092        #[inline]
2093        unsafe fn decode(
2094            &mut self,
2095            decoder: &mut fidl::encoding::Decoder<'_, D>,
2096            offset: usize,
2097            _depth: fidl::encoding::Depth,
2098        ) -> fidl::Result<()> {
2099            decoder.debug_check_bounds::<Self>(offset);
2100            let prim = decoder.read_num::<u32>(offset);
2101
2102            *self = Self::from_primitive_allow_unknown(prim);
2103            Ok(())
2104        }
2105    }
2106    unsafe impl fidl::encoding::TypeMarker for CreateError {
2107        type Owned = Self;
2108
2109        #[inline(always)]
2110        fn inline_align(_context: fidl::encoding::Context) -> usize {
2111            std::mem::align_of::<u32>()
2112        }
2113
2114        #[inline(always)]
2115        fn inline_size(_context: fidl::encoding::Context) -> usize {
2116            std::mem::size_of::<u32>()
2117        }
2118
2119        #[inline(always)]
2120        fn encode_is_copy() -> bool {
2121            false
2122        }
2123
2124        #[inline(always)]
2125        fn decode_is_copy() -> bool {
2126            false
2127        }
2128    }
2129
2130    impl fidl::encoding::ValueTypeMarker for CreateError {
2131        type Borrowed<'a> = Self;
2132        #[inline(always)]
2133        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2134            *value
2135        }
2136    }
2137
2138    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
2139        #[inline]
2140        unsafe fn encode(
2141            self,
2142            encoder: &mut fidl::encoding::Encoder<'_, D>,
2143            offset: usize,
2144            _depth: fidl::encoding::Depth,
2145        ) -> fidl::Result<()> {
2146            encoder.debug_check_bounds::<Self>(offset);
2147            encoder.write_num(self.into_primitive(), offset);
2148            Ok(())
2149        }
2150    }
2151
2152    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
2153        #[inline(always)]
2154        fn new_empty() -> Self {
2155            Self::unknown()
2156        }
2157
2158        #[inline]
2159        unsafe fn decode(
2160            &mut self,
2161            decoder: &mut fidl::encoding::Decoder<'_, D>,
2162            offset: usize,
2163            _depth: fidl::encoding::Depth,
2164        ) -> fidl::Result<()> {
2165            decoder.debug_check_bounds::<Self>(offset);
2166            let prim = decoder.read_num::<u32>(offset);
2167
2168            *self = Self::from_primitive_allow_unknown(prim);
2169            Ok(())
2170        }
2171    }
2172    unsafe impl fidl::encoding::TypeMarker for DeclType {
2173        type Owned = Self;
2174
2175        #[inline(always)]
2176        fn inline_align(_context: fidl::encoding::Context) -> usize {
2177            std::mem::align_of::<u32>()
2178        }
2179
2180        #[inline(always)]
2181        fn inline_size(_context: fidl::encoding::Context) -> usize {
2182            std::mem::size_of::<u32>()
2183        }
2184
2185        #[inline(always)]
2186        fn encode_is_copy() -> bool {
2187            false
2188        }
2189
2190        #[inline(always)]
2191        fn decode_is_copy() -> bool {
2192            false
2193        }
2194    }
2195
2196    impl fidl::encoding::ValueTypeMarker for DeclType {
2197        type Borrowed<'a> = Self;
2198        #[inline(always)]
2199        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2200            *value
2201        }
2202    }
2203
2204    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeclType {
2205        #[inline]
2206        unsafe fn encode(
2207            self,
2208            encoder: &mut fidl::encoding::Encoder<'_, D>,
2209            offset: usize,
2210            _depth: fidl::encoding::Depth,
2211        ) -> fidl::Result<()> {
2212            encoder.debug_check_bounds::<Self>(offset);
2213            encoder.write_num(self.into_primitive(), offset);
2214            Ok(())
2215        }
2216    }
2217
2218    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeclType {
2219        #[inline(always)]
2220        fn new_empty() -> Self {
2221            Self::unknown()
2222        }
2223
2224        #[inline]
2225        unsafe fn decode(
2226            &mut self,
2227            decoder: &mut fidl::encoding::Decoder<'_, D>,
2228            offset: usize,
2229            _depth: fidl::encoding::Depth,
2230        ) -> fidl::Result<()> {
2231            decoder.debug_check_bounds::<Self>(offset);
2232            let prim = decoder.read_num::<u32>(offset);
2233
2234            *self = Self::from_primitive_allow_unknown(prim);
2235            Ok(())
2236        }
2237    }
2238    unsafe impl fidl::encoding::TypeMarker for DeletionError {
2239        type Owned = Self;
2240
2241        #[inline(always)]
2242        fn inline_align(_context: fidl::encoding::Context) -> usize {
2243            std::mem::align_of::<u32>()
2244        }
2245
2246        #[inline(always)]
2247        fn inline_size(_context: fidl::encoding::Context) -> usize {
2248            std::mem::size_of::<u32>()
2249        }
2250
2251        #[inline(always)]
2252        fn encode_is_copy() -> bool {
2253            true
2254        }
2255
2256        #[inline(always)]
2257        fn decode_is_copy() -> bool {
2258            false
2259        }
2260    }
2261
2262    impl fidl::encoding::ValueTypeMarker for DeletionError {
2263        type Borrowed<'a> = Self;
2264        #[inline(always)]
2265        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2266            *value
2267        }
2268    }
2269
2270    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeletionError {
2271        #[inline]
2272        unsafe fn encode(
2273            self,
2274            encoder: &mut fidl::encoding::Encoder<'_, D>,
2275            offset: usize,
2276            _depth: fidl::encoding::Depth,
2277        ) -> fidl::Result<()> {
2278            encoder.debug_check_bounds::<Self>(offset);
2279            encoder.write_num(self.into_primitive(), offset);
2280            Ok(())
2281        }
2282    }
2283
2284    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeletionError {
2285        #[inline(always)]
2286        fn new_empty() -> Self {
2287            Self::Connection
2288        }
2289
2290        #[inline]
2291        unsafe fn decode(
2292            &mut self,
2293            decoder: &mut fidl::encoding::Decoder<'_, D>,
2294            offset: usize,
2295            _depth: fidl::encoding::Depth,
2296        ) -> fidl::Result<()> {
2297            decoder.debug_check_bounds::<Self>(offset);
2298            let prim = decoder.read_num::<u32>(offset);
2299
2300            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2301            Ok(())
2302        }
2303    }
2304    unsafe impl fidl::encoding::TypeMarker for DestroyError {
2305        type Owned = Self;
2306
2307        #[inline(always)]
2308        fn inline_align(_context: fidl::encoding::Context) -> usize {
2309            std::mem::align_of::<u32>()
2310        }
2311
2312        #[inline(always)]
2313        fn inline_size(_context: fidl::encoding::Context) -> usize {
2314            std::mem::size_of::<u32>()
2315        }
2316
2317        #[inline(always)]
2318        fn encode_is_copy() -> bool {
2319            false
2320        }
2321
2322        #[inline(always)]
2323        fn decode_is_copy() -> bool {
2324            false
2325        }
2326    }
2327
2328    impl fidl::encoding::ValueTypeMarker for DestroyError {
2329        type Borrowed<'a> = Self;
2330        #[inline(always)]
2331        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2332            *value
2333        }
2334    }
2335
2336    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DestroyError {
2337        #[inline]
2338        unsafe fn encode(
2339            self,
2340            encoder: &mut fidl::encoding::Encoder<'_, D>,
2341            offset: usize,
2342            _depth: fidl::encoding::Depth,
2343        ) -> fidl::Result<()> {
2344            encoder.debug_check_bounds::<Self>(offset);
2345            encoder.write_num(self.into_primitive(), offset);
2346            Ok(())
2347        }
2348    }
2349
2350    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyError {
2351        #[inline(always)]
2352        fn new_empty() -> Self {
2353            Self::unknown()
2354        }
2355
2356        #[inline]
2357        unsafe fn decode(
2358            &mut self,
2359            decoder: &mut fidl::encoding::Decoder<'_, D>,
2360            offset: usize,
2361            _depth: fidl::encoding::Depth,
2362        ) -> fidl::Result<()> {
2363            decoder.debug_check_bounds::<Self>(offset);
2364            let prim = decoder.read_num::<u32>(offset);
2365
2366            *self = Self::from_primitive_allow_unknown(prim);
2367            Ok(())
2368        }
2369    }
2370    unsafe impl fidl::encoding::TypeMarker for GetAllInstancesError {
2371        type Owned = Self;
2372
2373        #[inline(always)]
2374        fn inline_align(_context: fidl::encoding::Context) -> usize {
2375            std::mem::align_of::<u32>()
2376        }
2377
2378        #[inline(always)]
2379        fn inline_size(_context: fidl::encoding::Context) -> usize {
2380            std::mem::size_of::<u32>()
2381        }
2382
2383        #[inline(always)]
2384        fn encode_is_copy() -> bool {
2385            false
2386        }
2387
2388        #[inline(always)]
2389        fn decode_is_copy() -> bool {
2390            false
2391        }
2392    }
2393
2394    impl fidl::encoding::ValueTypeMarker for GetAllInstancesError {
2395        type Borrowed<'a> = Self;
2396        #[inline(always)]
2397        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2398            *value
2399        }
2400    }
2401
2402    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2403        for GetAllInstancesError
2404    {
2405        #[inline]
2406        unsafe fn encode(
2407            self,
2408            encoder: &mut fidl::encoding::Encoder<'_, D>,
2409            offset: usize,
2410            _depth: fidl::encoding::Depth,
2411        ) -> fidl::Result<()> {
2412            encoder.debug_check_bounds::<Self>(offset);
2413            encoder.write_num(self.into_primitive(), offset);
2414            Ok(())
2415        }
2416    }
2417
2418    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetAllInstancesError {
2419        #[inline(always)]
2420        fn new_empty() -> Self {
2421            Self::unknown()
2422        }
2423
2424        #[inline]
2425        unsafe fn decode(
2426            &mut self,
2427            decoder: &mut fidl::encoding::Decoder<'_, D>,
2428            offset: usize,
2429            _depth: fidl::encoding::Depth,
2430        ) -> fidl::Result<()> {
2431            decoder.debug_check_bounds::<Self>(offset);
2432            let prim = decoder.read_num::<u32>(offset);
2433
2434            *self = Self::from_primitive_allow_unknown(prim);
2435            Ok(())
2436        }
2437    }
2438    unsafe impl fidl::encoding::TypeMarker for GetDeclarationError {
2439        type Owned = Self;
2440
2441        #[inline(always)]
2442        fn inline_align(_context: fidl::encoding::Context) -> usize {
2443            std::mem::align_of::<u32>()
2444        }
2445
2446        #[inline(always)]
2447        fn inline_size(_context: fidl::encoding::Context) -> usize {
2448            std::mem::size_of::<u32>()
2449        }
2450
2451        #[inline(always)]
2452        fn encode_is_copy() -> bool {
2453            false
2454        }
2455
2456        #[inline(always)]
2457        fn decode_is_copy() -> bool {
2458            false
2459        }
2460    }
2461
2462    impl fidl::encoding::ValueTypeMarker for GetDeclarationError {
2463        type Borrowed<'a> = Self;
2464        #[inline(always)]
2465        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2466            *value
2467        }
2468    }
2469
2470    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2471        for GetDeclarationError
2472    {
2473        #[inline]
2474        unsafe fn encode(
2475            self,
2476            encoder: &mut fidl::encoding::Encoder<'_, D>,
2477            offset: usize,
2478            _depth: fidl::encoding::Depth,
2479        ) -> fidl::Result<()> {
2480            encoder.debug_check_bounds::<Self>(offset);
2481            encoder.write_num(self.into_primitive(), offset);
2482            Ok(())
2483        }
2484    }
2485
2486    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetDeclarationError {
2487        #[inline(always)]
2488        fn new_empty() -> Self {
2489            Self::unknown()
2490        }
2491
2492        #[inline]
2493        unsafe fn decode(
2494            &mut self,
2495            decoder: &mut fidl::encoding::Decoder<'_, D>,
2496            offset: usize,
2497            _depth: fidl::encoding::Depth,
2498        ) -> fidl::Result<()> {
2499            decoder.debug_check_bounds::<Self>(offset);
2500            let prim = decoder.read_num::<u32>(offset);
2501
2502            *self = Self::from_primitive_allow_unknown(prim);
2503            Ok(())
2504        }
2505    }
2506    unsafe impl fidl::encoding::TypeMarker for GetInstanceError {
2507        type Owned = Self;
2508
2509        #[inline(always)]
2510        fn inline_align(_context: fidl::encoding::Context) -> usize {
2511            std::mem::align_of::<u32>()
2512        }
2513
2514        #[inline(always)]
2515        fn inline_size(_context: fidl::encoding::Context) -> usize {
2516            std::mem::size_of::<u32>()
2517        }
2518
2519        #[inline(always)]
2520        fn encode_is_copy() -> bool {
2521            false
2522        }
2523
2524        #[inline(always)]
2525        fn decode_is_copy() -> bool {
2526            false
2527        }
2528    }
2529
2530    impl fidl::encoding::ValueTypeMarker for GetInstanceError {
2531        type Borrowed<'a> = Self;
2532        #[inline(always)]
2533        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2534            *value
2535        }
2536    }
2537
2538    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2539        for GetInstanceError
2540    {
2541        #[inline]
2542        unsafe fn encode(
2543            self,
2544            encoder: &mut fidl::encoding::Encoder<'_, D>,
2545            offset: usize,
2546            _depth: fidl::encoding::Depth,
2547        ) -> fidl::Result<()> {
2548            encoder.debug_check_bounds::<Self>(offset);
2549            encoder.write_num(self.into_primitive(), offset);
2550            Ok(())
2551        }
2552    }
2553
2554    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetInstanceError {
2555        #[inline(always)]
2556        fn new_empty() -> Self {
2557            Self::unknown()
2558        }
2559
2560        #[inline]
2561        unsafe fn decode(
2562            &mut self,
2563            decoder: &mut fidl::encoding::Decoder<'_, D>,
2564            offset: usize,
2565            _depth: fidl::encoding::Depth,
2566        ) -> fidl::Result<()> {
2567            decoder.debug_check_bounds::<Self>(offset);
2568            let prim = decoder.read_num::<u32>(offset);
2569
2570            *self = Self::from_primitive_allow_unknown(prim);
2571            Ok(())
2572        }
2573    }
2574    unsafe impl fidl::encoding::TypeMarker for GetStructuredConfigError {
2575        type Owned = Self;
2576
2577        #[inline(always)]
2578        fn inline_align(_context: fidl::encoding::Context) -> usize {
2579            std::mem::align_of::<u32>()
2580        }
2581
2582        #[inline(always)]
2583        fn inline_size(_context: fidl::encoding::Context) -> usize {
2584            std::mem::size_of::<u32>()
2585        }
2586
2587        #[inline(always)]
2588        fn encode_is_copy() -> bool {
2589            false
2590        }
2591
2592        #[inline(always)]
2593        fn decode_is_copy() -> bool {
2594            false
2595        }
2596    }
2597
2598    impl fidl::encoding::ValueTypeMarker for GetStructuredConfigError {
2599        type Borrowed<'a> = Self;
2600        #[inline(always)]
2601        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2602            *value
2603        }
2604    }
2605
2606    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2607        for GetStructuredConfigError
2608    {
2609        #[inline]
2610        unsafe fn encode(
2611            self,
2612            encoder: &mut fidl::encoding::Encoder<'_, D>,
2613            offset: usize,
2614            _depth: fidl::encoding::Depth,
2615        ) -> fidl::Result<()> {
2616            encoder.debug_check_bounds::<Self>(offset);
2617            encoder.write_num(self.into_primitive(), offset);
2618            Ok(())
2619        }
2620    }
2621
2622    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2623        for GetStructuredConfigError
2624    {
2625        #[inline(always)]
2626        fn new_empty() -> Self {
2627            Self::unknown()
2628        }
2629
2630        #[inline]
2631        unsafe fn decode(
2632            &mut self,
2633            decoder: &mut fidl::encoding::Decoder<'_, D>,
2634            offset: usize,
2635            _depth: fidl::encoding::Depth,
2636        ) -> fidl::Result<()> {
2637            decoder.debug_check_bounds::<Self>(offset);
2638            let prim = decoder.read_num::<u32>(offset);
2639
2640            *self = Self::from_primitive_allow_unknown(prim);
2641            Ok(())
2642        }
2643    }
2644    unsafe impl fidl::encoding::TypeMarker for OpenDirType {
2645        type Owned = Self;
2646
2647        #[inline(always)]
2648        fn inline_align(_context: fidl::encoding::Context) -> usize {
2649            std::mem::align_of::<u32>()
2650        }
2651
2652        #[inline(always)]
2653        fn inline_size(_context: fidl::encoding::Context) -> usize {
2654            std::mem::size_of::<u32>()
2655        }
2656
2657        #[inline(always)]
2658        fn encode_is_copy() -> bool {
2659            false
2660        }
2661
2662        #[inline(always)]
2663        fn decode_is_copy() -> bool {
2664            false
2665        }
2666    }
2667
2668    impl fidl::encoding::ValueTypeMarker for OpenDirType {
2669        type Borrowed<'a> = Self;
2670        #[inline(always)]
2671        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2672            *value
2673        }
2674    }
2675
2676    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenDirType {
2677        #[inline]
2678        unsafe fn encode(
2679            self,
2680            encoder: &mut fidl::encoding::Encoder<'_, D>,
2681            offset: usize,
2682            _depth: fidl::encoding::Depth,
2683        ) -> fidl::Result<()> {
2684            encoder.debug_check_bounds::<Self>(offset);
2685            encoder.write_num(self.into_primitive(), offset);
2686            Ok(())
2687        }
2688    }
2689
2690    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenDirType {
2691        #[inline(always)]
2692        fn new_empty() -> Self {
2693            Self::unknown()
2694        }
2695
2696        #[inline]
2697        unsafe fn decode(
2698            &mut self,
2699            decoder: &mut fidl::encoding::Decoder<'_, D>,
2700            offset: usize,
2701            _depth: fidl::encoding::Depth,
2702        ) -> fidl::Result<()> {
2703            decoder.debug_check_bounds::<Self>(offset);
2704            let prim = decoder.read_num::<u32>(offset);
2705
2706            *self = Self::from_primitive_allow_unknown(prim);
2707            Ok(())
2708        }
2709    }
2710    unsafe impl fidl::encoding::TypeMarker for OpenError {
2711        type Owned = Self;
2712
2713        #[inline(always)]
2714        fn inline_align(_context: fidl::encoding::Context) -> usize {
2715            std::mem::align_of::<u32>()
2716        }
2717
2718        #[inline(always)]
2719        fn inline_size(_context: fidl::encoding::Context) -> usize {
2720            std::mem::size_of::<u32>()
2721        }
2722
2723        #[inline(always)]
2724        fn encode_is_copy() -> bool {
2725            false
2726        }
2727
2728        #[inline(always)]
2729        fn decode_is_copy() -> bool {
2730            false
2731        }
2732    }
2733
2734    impl fidl::encoding::ValueTypeMarker for OpenError {
2735        type Borrowed<'a> = Self;
2736        #[inline(always)]
2737        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2738            *value
2739        }
2740    }
2741
2742    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenError {
2743        #[inline]
2744        unsafe fn encode(
2745            self,
2746            encoder: &mut fidl::encoding::Encoder<'_, D>,
2747            offset: usize,
2748            _depth: fidl::encoding::Depth,
2749        ) -> fidl::Result<()> {
2750            encoder.debug_check_bounds::<Self>(offset);
2751            encoder.write_num(self.into_primitive(), offset);
2752            Ok(())
2753        }
2754    }
2755
2756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenError {
2757        #[inline(always)]
2758        fn new_empty() -> Self {
2759            Self::unknown()
2760        }
2761
2762        #[inline]
2763        unsafe fn decode(
2764            &mut self,
2765            decoder: &mut fidl::encoding::Decoder<'_, D>,
2766            offset: usize,
2767            _depth: fidl::encoding::Depth,
2768        ) -> fidl::Result<()> {
2769            decoder.debug_check_bounds::<Self>(offset);
2770            let prim = decoder.read_num::<u32>(offset);
2771
2772            *self = Self::from_primitive_allow_unknown(prim);
2773            Ok(())
2774        }
2775    }
2776    unsafe impl fidl::encoding::TypeMarker for RealmQueryError {
2777        type Owned = Self;
2778
2779        #[inline(always)]
2780        fn inline_align(_context: fidl::encoding::Context) -> usize {
2781            std::mem::align_of::<u32>()
2782        }
2783
2784        #[inline(always)]
2785        fn inline_size(_context: fidl::encoding::Context) -> usize {
2786            std::mem::size_of::<u32>()
2787        }
2788
2789        #[inline(always)]
2790        fn encode_is_copy() -> bool {
2791            false
2792        }
2793
2794        #[inline(always)]
2795        fn decode_is_copy() -> bool {
2796            false
2797        }
2798    }
2799
2800    impl fidl::encoding::ValueTypeMarker for RealmQueryError {
2801        type Borrowed<'a> = Self;
2802        #[inline(always)]
2803        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2804            *value
2805        }
2806    }
2807
2808    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2809        for RealmQueryError
2810    {
2811        #[inline]
2812        unsafe fn encode(
2813            self,
2814            encoder: &mut fidl::encoding::Encoder<'_, D>,
2815            offset: usize,
2816            _depth: fidl::encoding::Depth,
2817        ) -> fidl::Result<()> {
2818            encoder.debug_check_bounds::<Self>(offset);
2819            encoder.write_num(self.into_primitive(), offset);
2820            Ok(())
2821        }
2822    }
2823
2824    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RealmQueryError {
2825        #[inline(always)]
2826        fn new_empty() -> Self {
2827            Self::unknown()
2828        }
2829
2830        #[inline]
2831        unsafe fn decode(
2832            &mut self,
2833            decoder: &mut fidl::encoding::Decoder<'_, D>,
2834            offset: usize,
2835            _depth: fidl::encoding::Depth,
2836        ) -> fidl::Result<()> {
2837            decoder.debug_check_bounds::<Self>(offset);
2838            let prim = decoder.read_num::<u32>(offset);
2839
2840            *self = Self::from_primitive_allow_unknown(prim);
2841            Ok(())
2842        }
2843    }
2844    unsafe impl fidl::encoding::TypeMarker for ResolveError {
2845        type Owned = Self;
2846
2847        #[inline(always)]
2848        fn inline_align(_context: fidl::encoding::Context) -> usize {
2849            std::mem::align_of::<u32>()
2850        }
2851
2852        #[inline(always)]
2853        fn inline_size(_context: fidl::encoding::Context) -> usize {
2854            std::mem::size_of::<u32>()
2855        }
2856
2857        #[inline(always)]
2858        fn encode_is_copy() -> bool {
2859            false
2860        }
2861
2862        #[inline(always)]
2863        fn decode_is_copy() -> bool {
2864            false
2865        }
2866    }
2867
2868    impl fidl::encoding::ValueTypeMarker for ResolveError {
2869        type Borrowed<'a> = Self;
2870        #[inline(always)]
2871        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2872            *value
2873        }
2874    }
2875
2876    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ResolveError {
2877        #[inline]
2878        unsafe fn encode(
2879            self,
2880            encoder: &mut fidl::encoding::Encoder<'_, D>,
2881            offset: usize,
2882            _depth: fidl::encoding::Depth,
2883        ) -> fidl::Result<()> {
2884            encoder.debug_check_bounds::<Self>(offset);
2885            encoder.write_num(self.into_primitive(), offset);
2886            Ok(())
2887        }
2888    }
2889
2890    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolveError {
2891        #[inline(always)]
2892        fn new_empty() -> Self {
2893            Self::unknown()
2894        }
2895
2896        #[inline]
2897        unsafe fn decode(
2898            &mut self,
2899            decoder: &mut fidl::encoding::Decoder<'_, D>,
2900            offset: usize,
2901            _depth: fidl::encoding::Depth,
2902        ) -> fidl::Result<()> {
2903            decoder.debug_check_bounds::<Self>(offset);
2904            let prim = decoder.read_num::<u32>(offset);
2905
2906            *self = Self::from_primitive_allow_unknown(prim);
2907            Ok(())
2908        }
2909    }
2910    unsafe impl fidl::encoding::TypeMarker for RouteOutcome {
2911        type Owned = Self;
2912
2913        #[inline(always)]
2914        fn inline_align(_context: fidl::encoding::Context) -> usize {
2915            std::mem::align_of::<u32>()
2916        }
2917
2918        #[inline(always)]
2919        fn inline_size(_context: fidl::encoding::Context) -> usize {
2920            std::mem::size_of::<u32>()
2921        }
2922
2923        #[inline(always)]
2924        fn encode_is_copy() -> bool {
2925            false
2926        }
2927
2928        #[inline(always)]
2929        fn decode_is_copy() -> bool {
2930            false
2931        }
2932    }
2933
2934    impl fidl::encoding::ValueTypeMarker for RouteOutcome {
2935        type Borrowed<'a> = Self;
2936        #[inline(always)]
2937        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2938            *value
2939        }
2940    }
2941
2942    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RouteOutcome {
2943        #[inline]
2944        unsafe fn encode(
2945            self,
2946            encoder: &mut fidl::encoding::Encoder<'_, D>,
2947            offset: usize,
2948            _depth: fidl::encoding::Depth,
2949        ) -> fidl::Result<()> {
2950            encoder.debug_check_bounds::<Self>(offset);
2951            encoder.write_num(self.into_primitive(), offset);
2952            Ok(())
2953        }
2954    }
2955
2956    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteOutcome {
2957        #[inline(always)]
2958        fn new_empty() -> Self {
2959            Self::unknown()
2960        }
2961
2962        #[inline]
2963        unsafe fn decode(
2964            &mut self,
2965            decoder: &mut fidl::encoding::Decoder<'_, D>,
2966            offset: usize,
2967            _depth: fidl::encoding::Depth,
2968        ) -> fidl::Result<()> {
2969            decoder.debug_check_bounds::<Self>(offset);
2970            let prim = decoder.read_num::<u32>(offset);
2971
2972            *self = Self::from_primitive_allow_unknown(prim);
2973            Ok(())
2974        }
2975    }
2976    unsafe impl fidl::encoding::TypeMarker for RouteValidatorError {
2977        type Owned = Self;
2978
2979        #[inline(always)]
2980        fn inline_align(_context: fidl::encoding::Context) -> usize {
2981            std::mem::align_of::<u32>()
2982        }
2983
2984        #[inline(always)]
2985        fn inline_size(_context: fidl::encoding::Context) -> usize {
2986            std::mem::size_of::<u32>()
2987        }
2988
2989        #[inline(always)]
2990        fn encode_is_copy() -> bool {
2991            false
2992        }
2993
2994        #[inline(always)]
2995        fn decode_is_copy() -> bool {
2996            false
2997        }
2998    }
2999
3000    impl fidl::encoding::ValueTypeMarker for RouteValidatorError {
3001        type Borrowed<'a> = Self;
3002        #[inline(always)]
3003        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3004            *value
3005        }
3006    }
3007
3008    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3009        for RouteValidatorError
3010    {
3011        #[inline]
3012        unsafe fn encode(
3013            self,
3014            encoder: &mut fidl::encoding::Encoder<'_, D>,
3015            offset: usize,
3016            _depth: fidl::encoding::Depth,
3017        ) -> fidl::Result<()> {
3018            encoder.debug_check_bounds::<Self>(offset);
3019            encoder.write_num(self.into_primitive(), offset);
3020            Ok(())
3021        }
3022    }
3023
3024    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteValidatorError {
3025        #[inline(always)]
3026        fn new_empty() -> Self {
3027            Self::unknown()
3028        }
3029
3030        #[inline]
3031        unsafe fn decode(
3032            &mut self,
3033            decoder: &mut fidl::encoding::Decoder<'_, D>,
3034            offset: usize,
3035            _depth: fidl::encoding::Depth,
3036        ) -> fidl::Result<()> {
3037            decoder.debug_check_bounds::<Self>(offset);
3038            let prim = decoder.read_num::<u32>(offset);
3039
3040            *self = Self::from_primitive_allow_unknown(prim);
3041            Ok(())
3042        }
3043    }
3044    unsafe impl fidl::encoding::TypeMarker for StartError {
3045        type Owned = Self;
3046
3047        #[inline(always)]
3048        fn inline_align(_context: fidl::encoding::Context) -> usize {
3049            std::mem::align_of::<u32>()
3050        }
3051
3052        #[inline(always)]
3053        fn inline_size(_context: fidl::encoding::Context) -> usize {
3054            std::mem::size_of::<u32>()
3055        }
3056
3057        #[inline(always)]
3058        fn encode_is_copy() -> bool {
3059            false
3060        }
3061
3062        #[inline(always)]
3063        fn decode_is_copy() -> bool {
3064            false
3065        }
3066    }
3067
3068    impl fidl::encoding::ValueTypeMarker for StartError {
3069        type Borrowed<'a> = Self;
3070        #[inline(always)]
3071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3072            *value
3073        }
3074    }
3075
3076    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
3077        #[inline]
3078        unsafe fn encode(
3079            self,
3080            encoder: &mut fidl::encoding::Encoder<'_, D>,
3081            offset: usize,
3082            _depth: fidl::encoding::Depth,
3083        ) -> fidl::Result<()> {
3084            encoder.debug_check_bounds::<Self>(offset);
3085            encoder.write_num(self.into_primitive(), offset);
3086            Ok(())
3087        }
3088    }
3089
3090    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
3091        #[inline(always)]
3092        fn new_empty() -> Self {
3093            Self::unknown()
3094        }
3095
3096        #[inline]
3097        unsafe fn decode(
3098            &mut self,
3099            decoder: &mut fidl::encoding::Decoder<'_, D>,
3100            offset: usize,
3101            _depth: fidl::encoding::Depth,
3102        ) -> fidl::Result<()> {
3103            decoder.debug_check_bounds::<Self>(offset);
3104            let prim = decoder.read_num::<u32>(offset);
3105
3106            *self = Self::from_primitive_allow_unknown(prim);
3107            Ok(())
3108        }
3109    }
3110    unsafe impl fidl::encoding::TypeMarker for StatusError {
3111        type Owned = Self;
3112
3113        #[inline(always)]
3114        fn inline_align(_context: fidl::encoding::Context) -> usize {
3115            std::mem::align_of::<u32>()
3116        }
3117
3118        #[inline(always)]
3119        fn inline_size(_context: fidl::encoding::Context) -> usize {
3120            std::mem::size_of::<u32>()
3121        }
3122
3123        #[inline(always)]
3124        fn encode_is_copy() -> bool {
3125            true
3126        }
3127
3128        #[inline(always)]
3129        fn decode_is_copy() -> bool {
3130            false
3131        }
3132    }
3133
3134    impl fidl::encoding::ValueTypeMarker for StatusError {
3135        type Borrowed<'a> = Self;
3136        #[inline(always)]
3137        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3138            *value
3139        }
3140    }
3141
3142    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StatusError {
3143        #[inline]
3144        unsafe fn encode(
3145            self,
3146            encoder: &mut fidl::encoding::Encoder<'_, D>,
3147            offset: usize,
3148            _depth: fidl::encoding::Depth,
3149        ) -> fidl::Result<()> {
3150            encoder.debug_check_bounds::<Self>(offset);
3151            encoder.write_num(self.into_primitive(), offset);
3152            Ok(())
3153        }
3154    }
3155
3156    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StatusError {
3157        #[inline(always)]
3158        fn new_empty() -> Self {
3159            Self::Provider
3160        }
3161
3162        #[inline]
3163        unsafe fn decode(
3164            &mut self,
3165            decoder: &mut fidl::encoding::Decoder<'_, D>,
3166            offset: usize,
3167            _depth: fidl::encoding::Depth,
3168        ) -> fidl::Result<()> {
3169            decoder.debug_check_bounds::<Self>(offset);
3170            let prim = decoder.read_num::<u32>(offset);
3171
3172            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3173            Ok(())
3174        }
3175    }
3176    unsafe impl fidl::encoding::TypeMarker for StopError {
3177        type Owned = Self;
3178
3179        #[inline(always)]
3180        fn inline_align(_context: fidl::encoding::Context) -> usize {
3181            std::mem::align_of::<u32>()
3182        }
3183
3184        #[inline(always)]
3185        fn inline_size(_context: fidl::encoding::Context) -> usize {
3186            std::mem::size_of::<u32>()
3187        }
3188
3189        #[inline(always)]
3190        fn encode_is_copy() -> bool {
3191            false
3192        }
3193
3194        #[inline(always)]
3195        fn decode_is_copy() -> bool {
3196            false
3197        }
3198    }
3199
3200    impl fidl::encoding::ValueTypeMarker for StopError {
3201        type Borrowed<'a> = Self;
3202        #[inline(always)]
3203        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3204            *value
3205        }
3206    }
3207
3208    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopError {
3209        #[inline]
3210        unsafe fn encode(
3211            self,
3212            encoder: &mut fidl::encoding::Encoder<'_, D>,
3213            offset: usize,
3214            _depth: fidl::encoding::Depth,
3215        ) -> fidl::Result<()> {
3216            encoder.debug_check_bounds::<Self>(offset);
3217            encoder.write_num(self.into_primitive(), offset);
3218            Ok(())
3219        }
3220    }
3221
3222    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopError {
3223        #[inline(always)]
3224        fn new_empty() -> Self {
3225            Self::unknown()
3226        }
3227
3228        #[inline]
3229        unsafe fn decode(
3230            &mut self,
3231            decoder: &mut fidl::encoding::Decoder<'_, D>,
3232            offset: usize,
3233            _depth: fidl::encoding::Depth,
3234        ) -> fidl::Result<()> {
3235            decoder.debug_check_bounds::<Self>(offset);
3236            let prim = decoder.read_num::<u32>(offset);
3237
3238            *self = Self::from_primitive_allow_unknown(prim);
3239            Ok(())
3240        }
3241    }
3242    unsafe impl fidl::encoding::TypeMarker for UnresolveError {
3243        type Owned = Self;
3244
3245        #[inline(always)]
3246        fn inline_align(_context: fidl::encoding::Context) -> usize {
3247            std::mem::align_of::<u32>()
3248        }
3249
3250        #[inline(always)]
3251        fn inline_size(_context: fidl::encoding::Context) -> usize {
3252            std::mem::size_of::<u32>()
3253        }
3254
3255        #[inline(always)]
3256        fn encode_is_copy() -> bool {
3257            false
3258        }
3259
3260        #[inline(always)]
3261        fn decode_is_copy() -> bool {
3262            false
3263        }
3264    }
3265
3266    impl fidl::encoding::ValueTypeMarker for UnresolveError {
3267        type Borrowed<'a> = Self;
3268        #[inline(always)]
3269        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3270            *value
3271        }
3272    }
3273
3274    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnresolveError {
3275        #[inline]
3276        unsafe fn encode(
3277            self,
3278            encoder: &mut fidl::encoding::Encoder<'_, D>,
3279            offset: usize,
3280            _depth: fidl::encoding::Depth,
3281        ) -> fidl::Result<()> {
3282            encoder.debug_check_bounds::<Self>(offset);
3283            encoder.write_num(self.into_primitive(), offset);
3284            Ok(())
3285        }
3286    }
3287
3288    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnresolveError {
3289        #[inline(always)]
3290        fn new_empty() -> Self {
3291            Self::unknown()
3292        }
3293
3294        #[inline]
3295        unsafe fn decode(
3296            &mut self,
3297            decoder: &mut fidl::encoding::Decoder<'_, D>,
3298            offset: usize,
3299            _depth: fidl::encoding::Depth,
3300        ) -> fidl::Result<()> {
3301            decoder.debug_check_bounds::<Self>(offset);
3302            let prim = decoder.read_num::<u32>(offset);
3303
3304            *self = Self::from_primitive_allow_unknown(prim);
3305            Ok(())
3306        }
3307    }
3308
3309    impl fidl::encoding::ValueTypeMarker for ConfigOverrideSetStructuredConfigRequest {
3310        type Borrowed<'a> = &'a Self;
3311        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3312            value
3313        }
3314    }
3315
3316    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideSetStructuredConfigRequest {
3317        type Owned = Self;
3318
3319        #[inline(always)]
3320        fn inline_align(_context: fidl::encoding::Context) -> usize {
3321            8
3322        }
3323
3324        #[inline(always)]
3325        fn inline_size(_context: fidl::encoding::Context) -> usize {
3326            32
3327        }
3328    }
3329
3330    unsafe impl<D: fidl::encoding::ResourceDialect>
3331        fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D>
3332        for &ConfigOverrideSetStructuredConfigRequest
3333    {
3334        #[inline]
3335        unsafe fn encode(
3336            self,
3337            encoder: &mut fidl::encoding::Encoder<'_, D>,
3338            offset: usize,
3339            _depth: fidl::encoding::Depth,
3340        ) -> fidl::Result<()> {
3341            encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3342            // Delegate to tuple encoding.
3343            fidl::encoding::Encode::<ConfigOverrideSetStructuredConfigRequest, D>::encode(
3344                (
3345                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
3346                    <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl__common::ConfigOverride> as fidl::encoding::ValueTypeMarker>::borrow(&self.fields),
3347                ),
3348                encoder, offset, _depth
3349            )
3350        }
3351    }
3352    unsafe impl<
3353        D: fidl::encoding::ResourceDialect,
3354        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3355        T1: fidl::encoding::Encode<
3356                fidl::encoding::UnboundedVector<
3357                    fidl_fuchsia_component_decl__common::ConfigOverride,
3358                >,
3359                D,
3360            >,
3361    > fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D> for (T0, T1)
3362    {
3363        #[inline]
3364        unsafe fn encode(
3365            self,
3366            encoder: &mut fidl::encoding::Encoder<'_, D>,
3367            offset: usize,
3368            depth: fidl::encoding::Depth,
3369        ) -> fidl::Result<()> {
3370            encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3371            // Zero out padding regions. There's no need to apply masks
3372            // because the unmasked parts will be overwritten by fields.
3373            // Write the fields.
3374            self.0.encode(encoder, offset + 0, depth)?;
3375            self.1.encode(encoder, offset + 16, depth)?;
3376            Ok(())
3377        }
3378    }
3379
3380    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3381        for ConfigOverrideSetStructuredConfigRequest
3382    {
3383        #[inline(always)]
3384        fn new_empty() -> Self {
3385            Self {
3386                moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3387                fields: fidl::new_empty!(
3388                    fidl::encoding::UnboundedVector<
3389                        fidl_fuchsia_component_decl__common::ConfigOverride,
3390                    >,
3391                    D
3392                ),
3393            }
3394        }
3395
3396        #[inline]
3397        unsafe fn decode(
3398            &mut self,
3399            decoder: &mut fidl::encoding::Decoder<'_, D>,
3400            offset: usize,
3401            _depth: fidl::encoding::Depth,
3402        ) -> fidl::Result<()> {
3403            decoder.debug_check_bounds::<Self>(offset);
3404            // Verify that padding bytes are zero.
3405            fidl::decode!(
3406                fidl::encoding::BoundedString<4096>,
3407                D,
3408                &mut self.moniker,
3409                decoder,
3410                offset + 0,
3411                _depth
3412            )?;
3413            fidl::decode!(
3414                fidl::encoding::UnboundedVector<
3415                    fidl_fuchsia_component_decl__common::ConfigOverride,
3416                >,
3417                D,
3418                &mut self.fields,
3419                decoder,
3420                offset + 16,
3421                _depth
3422            )?;
3423            Ok(())
3424        }
3425    }
3426
3427    impl fidl::encoding::ValueTypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3428        type Borrowed<'a> = &'a Self;
3429        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3430            value
3431        }
3432    }
3433
3434    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3435        type Owned = Self;
3436
3437        #[inline(always)]
3438        fn inline_align(_context: fidl::encoding::Context) -> usize {
3439            8
3440        }
3441
3442        #[inline(always)]
3443        fn inline_size(_context: fidl::encoding::Context) -> usize {
3444            16
3445        }
3446    }
3447
3448    unsafe impl<D: fidl::encoding::ResourceDialect>
3449        fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D>
3450        for &ConfigOverrideUnsetStructuredConfigRequest
3451    {
3452        #[inline]
3453        unsafe fn encode(
3454            self,
3455            encoder: &mut fidl::encoding::Encoder<'_, D>,
3456            offset: usize,
3457            _depth: fidl::encoding::Depth,
3458        ) -> fidl::Result<()> {
3459            encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3460            // Delegate to tuple encoding.
3461            fidl::encoding::Encode::<ConfigOverrideUnsetStructuredConfigRequest, D>::encode(
3462                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3463                    &self.moniker,
3464                ),),
3465                encoder,
3466                offset,
3467                _depth,
3468            )
3469        }
3470    }
3471    unsafe impl<
3472        D: fidl::encoding::ResourceDialect,
3473        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3474    > fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D> for (T0,)
3475    {
3476        #[inline]
3477        unsafe fn encode(
3478            self,
3479            encoder: &mut fidl::encoding::Encoder<'_, D>,
3480            offset: usize,
3481            depth: fidl::encoding::Depth,
3482        ) -> fidl::Result<()> {
3483            encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3484            // Zero out padding regions. There's no need to apply masks
3485            // because the unmasked parts will be overwritten by fields.
3486            // Write the fields.
3487            self.0.encode(encoder, offset + 0, depth)?;
3488            Ok(())
3489        }
3490    }
3491
3492    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3493        for ConfigOverrideUnsetStructuredConfigRequest
3494    {
3495        #[inline(always)]
3496        fn new_empty() -> Self {
3497            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3498        }
3499
3500        #[inline]
3501        unsafe fn decode(
3502            &mut self,
3503            decoder: &mut fidl::encoding::Decoder<'_, D>,
3504            offset: usize,
3505            _depth: fidl::encoding::Depth,
3506        ) -> fidl::Result<()> {
3507            decoder.debug_check_bounds::<Self>(offset);
3508            // Verify that padding bytes are zero.
3509            fidl::decode!(
3510                fidl::encoding::BoundedString<4096>,
3511                D,
3512                &mut self.moniker,
3513                decoder,
3514                offset + 0,
3515                _depth
3516            )?;
3517            Ok(())
3518        }
3519    }
3520
3521    impl fidl::encoding::ValueTypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3522        type Borrowed<'a> = &'a Self;
3523        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3524            value
3525        }
3526    }
3527
3528    unsafe impl fidl::encoding::TypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3529        type Owned = Self;
3530
3531        #[inline(always)]
3532        fn inline_align(_context: fidl::encoding::Context) -> usize {
3533            8
3534        }
3535
3536        #[inline(always)]
3537        fn inline_size(_context: fidl::encoding::Context) -> usize {
3538            16
3539        }
3540    }
3541
3542    unsafe impl<D: fidl::encoding::ResourceDialect>
3543        fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D>
3544        for &CrashIntrospectFindComponentByThreadKoidResponse
3545    {
3546        #[inline]
3547        unsafe fn encode(
3548            self,
3549            encoder: &mut fidl::encoding::Encoder<'_, D>,
3550            offset: usize,
3551            _depth: fidl::encoding::Depth,
3552        ) -> fidl::Result<()> {
3553            encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3554            // Delegate to tuple encoding.
3555            fidl::encoding::Encode::<CrashIntrospectFindComponentByThreadKoidResponse, D>::encode(
3556                (<ComponentCrashInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3557                encoder,
3558                offset,
3559                _depth,
3560            )
3561        }
3562    }
3563    unsafe impl<
3564        D: fidl::encoding::ResourceDialect,
3565        T0: fidl::encoding::Encode<ComponentCrashInfo, D>,
3566    > fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D> for (T0,)
3567    {
3568        #[inline]
3569        unsafe fn encode(
3570            self,
3571            encoder: &mut fidl::encoding::Encoder<'_, D>,
3572            offset: usize,
3573            depth: fidl::encoding::Depth,
3574        ) -> fidl::Result<()> {
3575            encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3576            // Zero out padding regions. There's no need to apply masks
3577            // because the unmasked parts will be overwritten by fields.
3578            // Write the fields.
3579            self.0.encode(encoder, offset + 0, depth)?;
3580            Ok(())
3581        }
3582    }
3583
3584    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3585        for CrashIntrospectFindComponentByThreadKoidResponse
3586    {
3587        #[inline(always)]
3588        fn new_empty() -> Self {
3589            Self { info: fidl::new_empty!(ComponentCrashInfo, D) }
3590        }
3591
3592        #[inline]
3593        unsafe fn decode(
3594            &mut self,
3595            decoder: &mut fidl::encoding::Decoder<'_, D>,
3596            offset: usize,
3597            _depth: fidl::encoding::Depth,
3598        ) -> fidl::Result<()> {
3599            decoder.debug_check_bounds::<Self>(offset);
3600            // Verify that padding bytes are zero.
3601            fidl::decode!(ComponentCrashInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3602            Ok(())
3603        }
3604    }
3605
3606    impl fidl::encoding::ValueTypeMarker for InstanceIteratorNextResponse {
3607        type Borrowed<'a> = &'a Self;
3608        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3609            value
3610        }
3611    }
3612
3613    unsafe impl fidl::encoding::TypeMarker for InstanceIteratorNextResponse {
3614        type Owned = Self;
3615
3616        #[inline(always)]
3617        fn inline_align(_context: fidl::encoding::Context) -> usize {
3618            8
3619        }
3620
3621        #[inline(always)]
3622        fn inline_size(_context: fidl::encoding::Context) -> usize {
3623            16
3624        }
3625    }
3626
3627    unsafe impl<D: fidl::encoding::ResourceDialect>
3628        fidl::encoding::Encode<InstanceIteratorNextResponse, D> for &InstanceIteratorNextResponse
3629    {
3630        #[inline]
3631        unsafe fn encode(
3632            self,
3633            encoder: &mut fidl::encoding::Encoder<'_, D>,
3634            offset: usize,
3635            _depth: fidl::encoding::Depth,
3636        ) -> fidl::Result<()> {
3637            encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3638            // Delegate to tuple encoding.
3639            fidl::encoding::Encode::<InstanceIteratorNextResponse, D>::encode(
3640                (
3641                    <fidl::encoding::UnboundedVector<Instance> as fidl::encoding::ValueTypeMarker>::borrow(&self.infos),
3642                ),
3643                encoder, offset, _depth
3644            )
3645        }
3646    }
3647    unsafe impl<
3648        D: fidl::encoding::ResourceDialect,
3649        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Instance>, D>,
3650    > fidl::encoding::Encode<InstanceIteratorNextResponse, D> for (T0,)
3651    {
3652        #[inline]
3653        unsafe fn encode(
3654            self,
3655            encoder: &mut fidl::encoding::Encoder<'_, D>,
3656            offset: usize,
3657            depth: fidl::encoding::Depth,
3658        ) -> fidl::Result<()> {
3659            encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3660            // Zero out padding regions. There's no need to apply masks
3661            // because the unmasked parts will be overwritten by fields.
3662            // Write the fields.
3663            self.0.encode(encoder, offset + 0, depth)?;
3664            Ok(())
3665        }
3666    }
3667
3668    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3669        for InstanceIteratorNextResponse
3670    {
3671        #[inline(always)]
3672        fn new_empty() -> Self {
3673            Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<Instance>, D) }
3674        }
3675
3676        #[inline]
3677        unsafe fn decode(
3678            &mut self,
3679            decoder: &mut fidl::encoding::Decoder<'_, D>,
3680            offset: usize,
3681            _depth: fidl::encoding::Depth,
3682        ) -> fidl::Result<()> {
3683            decoder.debug_check_bounds::<Self>(offset);
3684            // Verify that padding bytes are zero.
3685            fidl::decode!(
3686                fidl::encoding::UnboundedVector<Instance>,
3687                D,
3688                &mut self.infos,
3689                decoder,
3690                offset + 0,
3691                _depth
3692            )?;
3693            Ok(())
3694        }
3695    }
3696
3697    impl fidl::encoding::ValueTypeMarker for LifecycleControllerDestroyInstanceRequest {
3698        type Borrowed<'a> = &'a Self;
3699        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3700            value
3701        }
3702    }
3703
3704    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerDestroyInstanceRequest {
3705        type Owned = Self;
3706
3707        #[inline(always)]
3708        fn inline_align(_context: fidl::encoding::Context) -> usize {
3709            8
3710        }
3711
3712        #[inline(always)]
3713        fn inline_size(_context: fidl::encoding::Context) -> usize {
3714            48
3715        }
3716    }
3717
3718    unsafe impl<D: fidl::encoding::ResourceDialect>
3719        fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D>
3720        for &LifecycleControllerDestroyInstanceRequest
3721    {
3722        #[inline]
3723        unsafe fn encode(
3724            self,
3725            encoder: &mut fidl::encoding::Encoder<'_, D>,
3726            offset: usize,
3727            _depth: fidl::encoding::Depth,
3728        ) -> fidl::Result<()> {
3729            encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3730            // Delegate to tuple encoding.
3731            fidl::encoding::Encode::<LifecycleControllerDestroyInstanceRequest, D>::encode(
3732                (
3733                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_moniker),
3734                    <fidl_fuchsia_component_decl__common::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
3735                ),
3736                encoder, offset, _depth
3737            )
3738        }
3739    }
3740    unsafe impl<
3741        D: fidl::encoding::ResourceDialect,
3742        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3743        T1: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ChildRef, D>,
3744    > fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D> for (T0, T1)
3745    {
3746        #[inline]
3747        unsafe fn encode(
3748            self,
3749            encoder: &mut fidl::encoding::Encoder<'_, D>,
3750            offset: usize,
3751            depth: fidl::encoding::Depth,
3752        ) -> fidl::Result<()> {
3753            encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3754            // Zero out padding regions. There's no need to apply masks
3755            // because the unmasked parts will be overwritten by fields.
3756            // Write the fields.
3757            self.0.encode(encoder, offset + 0, depth)?;
3758            self.1.encode(encoder, offset + 16, depth)?;
3759            Ok(())
3760        }
3761    }
3762
3763    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3764        for LifecycleControllerDestroyInstanceRequest
3765    {
3766        #[inline(always)]
3767        fn new_empty() -> Self {
3768            Self {
3769                parent_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3770                child: fidl::new_empty!(fidl_fuchsia_component_decl__common::ChildRef, D),
3771            }
3772        }
3773
3774        #[inline]
3775        unsafe fn decode(
3776            &mut self,
3777            decoder: &mut fidl::encoding::Decoder<'_, D>,
3778            offset: usize,
3779            _depth: fidl::encoding::Depth,
3780        ) -> fidl::Result<()> {
3781            decoder.debug_check_bounds::<Self>(offset);
3782            // Verify that padding bytes are zero.
3783            fidl::decode!(
3784                fidl::encoding::BoundedString<4096>,
3785                D,
3786                &mut self.parent_moniker,
3787                decoder,
3788                offset + 0,
3789                _depth
3790            )?;
3791            fidl::decode!(
3792                fidl_fuchsia_component_decl__common::ChildRef,
3793                D,
3794                &mut self.child,
3795                decoder,
3796                offset + 16,
3797                _depth
3798            )?;
3799            Ok(())
3800        }
3801    }
3802
3803    impl fidl::encoding::ValueTypeMarker for LifecycleControllerResolveInstanceRequest {
3804        type Borrowed<'a> = &'a Self;
3805        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3806            value
3807        }
3808    }
3809
3810    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerResolveInstanceRequest {
3811        type Owned = Self;
3812
3813        #[inline(always)]
3814        fn inline_align(_context: fidl::encoding::Context) -> usize {
3815            8
3816        }
3817
3818        #[inline(always)]
3819        fn inline_size(_context: fidl::encoding::Context) -> usize {
3820            16
3821        }
3822    }
3823
3824    unsafe impl<D: fidl::encoding::ResourceDialect>
3825        fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D>
3826        for &LifecycleControllerResolveInstanceRequest
3827    {
3828        #[inline]
3829        unsafe fn encode(
3830            self,
3831            encoder: &mut fidl::encoding::Encoder<'_, D>,
3832            offset: usize,
3833            _depth: fidl::encoding::Depth,
3834        ) -> fidl::Result<()> {
3835            encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3836            // Delegate to tuple encoding.
3837            fidl::encoding::Encode::<LifecycleControllerResolveInstanceRequest, D>::encode(
3838                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3839                    &self.moniker,
3840                ),),
3841                encoder,
3842                offset,
3843                _depth,
3844            )
3845        }
3846    }
3847    unsafe impl<
3848        D: fidl::encoding::ResourceDialect,
3849        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3850    > fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D> for (T0,)
3851    {
3852        #[inline]
3853        unsafe fn encode(
3854            self,
3855            encoder: &mut fidl::encoding::Encoder<'_, D>,
3856            offset: usize,
3857            depth: fidl::encoding::Depth,
3858        ) -> fidl::Result<()> {
3859            encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3860            // Zero out padding regions. There's no need to apply masks
3861            // because the unmasked parts will be overwritten by fields.
3862            // Write the fields.
3863            self.0.encode(encoder, offset + 0, depth)?;
3864            Ok(())
3865        }
3866    }
3867
3868    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3869        for LifecycleControllerResolveInstanceRequest
3870    {
3871        #[inline(always)]
3872        fn new_empty() -> Self {
3873            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3874        }
3875
3876        #[inline]
3877        unsafe fn decode(
3878            &mut self,
3879            decoder: &mut fidl::encoding::Decoder<'_, D>,
3880            offset: usize,
3881            _depth: fidl::encoding::Depth,
3882        ) -> fidl::Result<()> {
3883            decoder.debug_check_bounds::<Self>(offset);
3884            // Verify that padding bytes are zero.
3885            fidl::decode!(
3886                fidl::encoding::BoundedString<4096>,
3887                D,
3888                &mut self.moniker,
3889                decoder,
3890                offset + 0,
3891                _depth
3892            )?;
3893            Ok(())
3894        }
3895    }
3896
3897    impl fidl::encoding::ValueTypeMarker for LifecycleControllerStopInstanceRequest {
3898        type Borrowed<'a> = &'a Self;
3899        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3900            value
3901        }
3902    }
3903
3904    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStopInstanceRequest {
3905        type Owned = Self;
3906
3907        #[inline(always)]
3908        fn inline_align(_context: fidl::encoding::Context) -> usize {
3909            8
3910        }
3911
3912        #[inline(always)]
3913        fn inline_size(_context: fidl::encoding::Context) -> usize {
3914            16
3915        }
3916    }
3917
3918    unsafe impl<D: fidl::encoding::ResourceDialect>
3919        fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D>
3920        for &LifecycleControllerStopInstanceRequest
3921    {
3922        #[inline]
3923        unsafe fn encode(
3924            self,
3925            encoder: &mut fidl::encoding::Encoder<'_, D>,
3926            offset: usize,
3927            _depth: fidl::encoding::Depth,
3928        ) -> fidl::Result<()> {
3929            encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3930            // Delegate to tuple encoding.
3931            fidl::encoding::Encode::<LifecycleControllerStopInstanceRequest, D>::encode(
3932                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3933                    &self.moniker,
3934                ),),
3935                encoder,
3936                offset,
3937                _depth,
3938            )
3939        }
3940    }
3941    unsafe impl<
3942        D: fidl::encoding::ResourceDialect,
3943        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3944    > fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D> for (T0,)
3945    {
3946        #[inline]
3947        unsafe fn encode(
3948            self,
3949            encoder: &mut fidl::encoding::Encoder<'_, D>,
3950            offset: usize,
3951            depth: fidl::encoding::Depth,
3952        ) -> fidl::Result<()> {
3953            encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3954            // Zero out padding regions. There's no need to apply masks
3955            // because the unmasked parts will be overwritten by fields.
3956            // Write the fields.
3957            self.0.encode(encoder, offset + 0, depth)?;
3958            Ok(())
3959        }
3960    }
3961
3962    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3963        for LifecycleControllerStopInstanceRequest
3964    {
3965        #[inline(always)]
3966        fn new_empty() -> Self {
3967            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3968        }
3969
3970        #[inline]
3971        unsafe fn decode(
3972            &mut self,
3973            decoder: &mut fidl::encoding::Decoder<'_, D>,
3974            offset: usize,
3975            _depth: fidl::encoding::Depth,
3976        ) -> fidl::Result<()> {
3977            decoder.debug_check_bounds::<Self>(offset);
3978            // Verify that padding bytes are zero.
3979            fidl::decode!(
3980                fidl::encoding::BoundedString<4096>,
3981                D,
3982                &mut self.moniker,
3983                decoder,
3984                offset + 0,
3985                _depth
3986            )?;
3987            Ok(())
3988        }
3989    }
3990
3991    impl fidl::encoding::ValueTypeMarker for LifecycleControllerUnresolveInstanceRequest {
3992        type Borrowed<'a> = &'a Self;
3993        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3994            value
3995        }
3996    }
3997
3998    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerUnresolveInstanceRequest {
3999        type Owned = Self;
4000
4001        #[inline(always)]
4002        fn inline_align(_context: fidl::encoding::Context) -> usize {
4003            8
4004        }
4005
4006        #[inline(always)]
4007        fn inline_size(_context: fidl::encoding::Context) -> usize {
4008            16
4009        }
4010    }
4011
4012    unsafe impl<D: fidl::encoding::ResourceDialect>
4013        fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D>
4014        for &LifecycleControllerUnresolveInstanceRequest
4015    {
4016        #[inline]
4017        unsafe fn encode(
4018            self,
4019            encoder: &mut fidl::encoding::Encoder<'_, D>,
4020            offset: usize,
4021            _depth: fidl::encoding::Depth,
4022        ) -> fidl::Result<()> {
4023            encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4024            // Delegate to tuple encoding.
4025            fidl::encoding::Encode::<LifecycleControllerUnresolveInstanceRequest, D>::encode(
4026                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4027                    &self.moniker,
4028                ),),
4029                encoder,
4030                offset,
4031                _depth,
4032            )
4033        }
4034    }
4035    unsafe impl<
4036        D: fidl::encoding::ResourceDialect,
4037        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4038    > fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D> for (T0,)
4039    {
4040        #[inline]
4041        unsafe fn encode(
4042            self,
4043            encoder: &mut fidl::encoding::Encoder<'_, D>,
4044            offset: usize,
4045            depth: fidl::encoding::Depth,
4046        ) -> fidl::Result<()> {
4047            encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4048            // Zero out padding regions. There's no need to apply masks
4049            // because the unmasked parts will be overwritten by fields.
4050            // Write the fields.
4051            self.0.encode(encoder, offset + 0, depth)?;
4052            Ok(())
4053        }
4054    }
4055
4056    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4057        for LifecycleControllerUnresolveInstanceRequest
4058    {
4059        #[inline(always)]
4060        fn new_empty() -> Self {
4061            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4062        }
4063
4064        #[inline]
4065        unsafe fn decode(
4066            &mut self,
4067            decoder: &mut fidl::encoding::Decoder<'_, D>,
4068            offset: usize,
4069            _depth: fidl::encoding::Depth,
4070        ) -> fidl::Result<()> {
4071            decoder.debug_check_bounds::<Self>(offset);
4072            // Verify that padding bytes are zero.
4073            fidl::decode!(
4074                fidl::encoding::BoundedString<4096>,
4075                D,
4076                &mut self.moniker,
4077                decoder,
4078                offset + 0,
4079                _depth
4080            )?;
4081            Ok(())
4082        }
4083    }
4084
4085    impl fidl::encoding::ValueTypeMarker for ManifestBytesIteratorNextResponse {
4086        type Borrowed<'a> = &'a Self;
4087        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4088            value
4089        }
4090    }
4091
4092    unsafe impl fidl::encoding::TypeMarker for ManifestBytesIteratorNextResponse {
4093        type Owned = Self;
4094
4095        #[inline(always)]
4096        fn inline_align(_context: fidl::encoding::Context) -> usize {
4097            8
4098        }
4099
4100        #[inline(always)]
4101        fn inline_size(_context: fidl::encoding::Context) -> usize {
4102            16
4103        }
4104    }
4105
4106    unsafe impl<D: fidl::encoding::ResourceDialect>
4107        fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D>
4108        for &ManifestBytesIteratorNextResponse
4109    {
4110        #[inline]
4111        unsafe fn encode(
4112            self,
4113            encoder: &mut fidl::encoding::Encoder<'_, D>,
4114            offset: usize,
4115            _depth: fidl::encoding::Depth,
4116        ) -> fidl::Result<()> {
4117            encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4118            // Delegate to tuple encoding.
4119            fidl::encoding::Encode::<ManifestBytesIteratorNextResponse, D>::encode(
4120                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
4121                    &self.infos,
4122                ),),
4123                encoder,
4124                offset,
4125                _depth,
4126            )
4127        }
4128    }
4129    unsafe impl<
4130        D: fidl::encoding::ResourceDialect,
4131        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4132    > fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D> for (T0,)
4133    {
4134        #[inline]
4135        unsafe fn encode(
4136            self,
4137            encoder: &mut fidl::encoding::Encoder<'_, D>,
4138            offset: usize,
4139            depth: fidl::encoding::Depth,
4140        ) -> fidl::Result<()> {
4141            encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4142            // Zero out padding regions. There's no need to apply masks
4143            // because the unmasked parts will be overwritten by fields.
4144            // Write the fields.
4145            self.0.encode(encoder, offset + 0, depth)?;
4146            Ok(())
4147        }
4148    }
4149
4150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4151        for ManifestBytesIteratorNextResponse
4152    {
4153        #[inline(always)]
4154        fn new_empty() -> Self {
4155            Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
4156        }
4157
4158        #[inline]
4159        unsafe fn decode(
4160            &mut self,
4161            decoder: &mut fidl::encoding::Decoder<'_, D>,
4162            offset: usize,
4163            _depth: fidl::encoding::Depth,
4164        ) -> fidl::Result<()> {
4165            decoder.debug_check_bounds::<Self>(offset);
4166            // Verify that padding bytes are zero.
4167            fidl::decode!(
4168                fidl::encoding::UnboundedVector<u8>,
4169                D,
4170                &mut self.infos,
4171                decoder,
4172                offset + 0,
4173                _depth
4174            )?;
4175            Ok(())
4176        }
4177    }
4178
4179    impl fidl::encoding::ValueTypeMarker for RealmQueryConstructNamespaceRequest {
4180        type Borrowed<'a> = &'a Self;
4181        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4182            value
4183        }
4184    }
4185
4186    unsafe impl fidl::encoding::TypeMarker for RealmQueryConstructNamespaceRequest {
4187        type Owned = Self;
4188
4189        #[inline(always)]
4190        fn inline_align(_context: fidl::encoding::Context) -> usize {
4191            8
4192        }
4193
4194        #[inline(always)]
4195        fn inline_size(_context: fidl::encoding::Context) -> usize {
4196            16
4197        }
4198    }
4199
4200    unsafe impl<D: fidl::encoding::ResourceDialect>
4201        fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D>
4202        for &RealmQueryConstructNamespaceRequest
4203    {
4204        #[inline]
4205        unsafe fn encode(
4206            self,
4207            encoder: &mut fidl::encoding::Encoder<'_, D>,
4208            offset: usize,
4209            _depth: fidl::encoding::Depth,
4210        ) -> fidl::Result<()> {
4211            encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4212            // Delegate to tuple encoding.
4213            fidl::encoding::Encode::<RealmQueryConstructNamespaceRequest, D>::encode(
4214                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4215                    &self.moniker,
4216                ),),
4217                encoder,
4218                offset,
4219                _depth,
4220            )
4221        }
4222    }
4223    unsafe impl<
4224        D: fidl::encoding::ResourceDialect,
4225        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4226    > fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D> for (T0,)
4227    {
4228        #[inline]
4229        unsafe fn encode(
4230            self,
4231            encoder: &mut fidl::encoding::Encoder<'_, D>,
4232            offset: usize,
4233            depth: fidl::encoding::Depth,
4234        ) -> fidl::Result<()> {
4235            encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4236            // Zero out padding regions. There's no need to apply masks
4237            // because the unmasked parts will be overwritten by fields.
4238            // Write the fields.
4239            self.0.encode(encoder, offset + 0, depth)?;
4240            Ok(())
4241        }
4242    }
4243
4244    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4245        for RealmQueryConstructNamespaceRequest
4246    {
4247        #[inline(always)]
4248        fn new_empty() -> Self {
4249            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4250        }
4251
4252        #[inline]
4253        unsafe fn decode(
4254            &mut self,
4255            decoder: &mut fidl::encoding::Decoder<'_, D>,
4256            offset: usize,
4257            _depth: fidl::encoding::Depth,
4258        ) -> fidl::Result<()> {
4259            decoder.debug_check_bounds::<Self>(offset);
4260            // Verify that padding bytes are zero.
4261            fidl::decode!(
4262                fidl::encoding::BoundedString<4096>,
4263                D,
4264                &mut self.moniker,
4265                decoder,
4266                offset + 0,
4267                _depth
4268            )?;
4269            Ok(())
4270        }
4271    }
4272
4273    impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceRequest {
4274        type Borrowed<'a> = &'a Self;
4275        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4276            value
4277        }
4278    }
4279
4280    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceRequest {
4281        type Owned = Self;
4282
4283        #[inline(always)]
4284        fn inline_align(_context: fidl::encoding::Context) -> usize {
4285            8
4286        }
4287
4288        #[inline(always)]
4289        fn inline_size(_context: fidl::encoding::Context) -> usize {
4290            16
4291        }
4292    }
4293
4294    unsafe impl<D: fidl::encoding::ResourceDialect>
4295        fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for &RealmQueryGetInstanceRequest
4296    {
4297        #[inline]
4298        unsafe fn encode(
4299            self,
4300            encoder: &mut fidl::encoding::Encoder<'_, D>,
4301            offset: usize,
4302            _depth: fidl::encoding::Depth,
4303        ) -> fidl::Result<()> {
4304            encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4305            // Delegate to tuple encoding.
4306            fidl::encoding::Encode::<RealmQueryGetInstanceRequest, D>::encode(
4307                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4308                    &self.moniker,
4309                ),),
4310                encoder,
4311                offset,
4312                _depth,
4313            )
4314        }
4315    }
4316    unsafe impl<
4317        D: fidl::encoding::ResourceDialect,
4318        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4319    > fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for (T0,)
4320    {
4321        #[inline]
4322        unsafe fn encode(
4323            self,
4324            encoder: &mut fidl::encoding::Encoder<'_, D>,
4325            offset: usize,
4326            depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4329            // Zero out padding regions. There's no need to apply masks
4330            // because the unmasked parts will be overwritten by fields.
4331            // Write the fields.
4332            self.0.encode(encoder, offset + 0, depth)?;
4333            Ok(())
4334        }
4335    }
4336
4337    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4338        for RealmQueryGetInstanceRequest
4339    {
4340        #[inline(always)]
4341        fn new_empty() -> Self {
4342            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4343        }
4344
4345        #[inline]
4346        unsafe fn decode(
4347            &mut self,
4348            decoder: &mut fidl::encoding::Decoder<'_, D>,
4349            offset: usize,
4350            _depth: fidl::encoding::Depth,
4351        ) -> fidl::Result<()> {
4352            decoder.debug_check_bounds::<Self>(offset);
4353            // Verify that padding bytes are zero.
4354            fidl::decode!(
4355                fidl::encoding::BoundedString<4096>,
4356                D,
4357                &mut self.moniker,
4358                decoder,
4359                offset + 0,
4360                _depth
4361            )?;
4362            Ok(())
4363        }
4364    }
4365
4366    impl fidl::encoding::ValueTypeMarker for RealmQueryGetResolvedDeclarationRequest {
4367        type Borrowed<'a> = &'a Self;
4368        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4369            value
4370        }
4371    }
4372
4373    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetResolvedDeclarationRequest {
4374        type Owned = Self;
4375
4376        #[inline(always)]
4377        fn inline_align(_context: fidl::encoding::Context) -> usize {
4378            8
4379        }
4380
4381        #[inline(always)]
4382        fn inline_size(_context: fidl::encoding::Context) -> usize {
4383            16
4384        }
4385    }
4386
4387    unsafe impl<D: fidl::encoding::ResourceDialect>
4388        fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D>
4389        for &RealmQueryGetResolvedDeclarationRequest
4390    {
4391        #[inline]
4392        unsafe fn encode(
4393            self,
4394            encoder: &mut fidl::encoding::Encoder<'_, D>,
4395            offset: usize,
4396            _depth: fidl::encoding::Depth,
4397        ) -> fidl::Result<()> {
4398            encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4399            // Delegate to tuple encoding.
4400            fidl::encoding::Encode::<RealmQueryGetResolvedDeclarationRequest, D>::encode(
4401                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4402                    &self.moniker,
4403                ),),
4404                encoder,
4405                offset,
4406                _depth,
4407            )
4408        }
4409    }
4410    unsafe impl<
4411        D: fidl::encoding::ResourceDialect,
4412        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4413    > fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D> for (T0,)
4414    {
4415        #[inline]
4416        unsafe fn encode(
4417            self,
4418            encoder: &mut fidl::encoding::Encoder<'_, D>,
4419            offset: usize,
4420            depth: fidl::encoding::Depth,
4421        ) -> fidl::Result<()> {
4422            encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4423            // Zero out padding regions. There's no need to apply masks
4424            // because the unmasked parts will be overwritten by fields.
4425            // Write the fields.
4426            self.0.encode(encoder, offset + 0, depth)?;
4427            Ok(())
4428        }
4429    }
4430
4431    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4432        for RealmQueryGetResolvedDeclarationRequest
4433    {
4434        #[inline(always)]
4435        fn new_empty() -> Self {
4436            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4437        }
4438
4439        #[inline]
4440        unsafe fn decode(
4441            &mut self,
4442            decoder: &mut fidl::encoding::Decoder<'_, D>,
4443            offset: usize,
4444            _depth: fidl::encoding::Depth,
4445        ) -> fidl::Result<()> {
4446            decoder.debug_check_bounds::<Self>(offset);
4447            // Verify that padding bytes are zero.
4448            fidl::decode!(
4449                fidl::encoding::BoundedString<4096>,
4450                D,
4451                &mut self.moniker,
4452                decoder,
4453                offset + 0,
4454                _depth
4455            )?;
4456            Ok(())
4457        }
4458    }
4459
4460    impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigRequest {
4461        type Borrowed<'a> = &'a Self;
4462        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4463            value
4464        }
4465    }
4466
4467    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigRequest {
4468        type Owned = Self;
4469
4470        #[inline(always)]
4471        fn inline_align(_context: fidl::encoding::Context) -> usize {
4472            8
4473        }
4474
4475        #[inline(always)]
4476        fn inline_size(_context: fidl::encoding::Context) -> usize {
4477            16
4478        }
4479    }
4480
4481    unsafe impl<D: fidl::encoding::ResourceDialect>
4482        fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D>
4483        for &RealmQueryGetStructuredConfigRequest
4484    {
4485        #[inline]
4486        unsafe fn encode(
4487            self,
4488            encoder: &mut fidl::encoding::Encoder<'_, D>,
4489            offset: usize,
4490            _depth: fidl::encoding::Depth,
4491        ) -> fidl::Result<()> {
4492            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4493            // Delegate to tuple encoding.
4494            fidl::encoding::Encode::<RealmQueryGetStructuredConfigRequest, D>::encode(
4495                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4496                    &self.moniker,
4497                ),),
4498                encoder,
4499                offset,
4500                _depth,
4501            )
4502        }
4503    }
4504    unsafe impl<
4505        D: fidl::encoding::ResourceDialect,
4506        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4507    > fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D> for (T0,)
4508    {
4509        #[inline]
4510        unsafe fn encode(
4511            self,
4512            encoder: &mut fidl::encoding::Encoder<'_, D>,
4513            offset: usize,
4514            depth: fidl::encoding::Depth,
4515        ) -> fidl::Result<()> {
4516            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4517            // Zero out padding regions. There's no need to apply masks
4518            // because the unmasked parts will be overwritten by fields.
4519            // Write the fields.
4520            self.0.encode(encoder, offset + 0, depth)?;
4521            Ok(())
4522        }
4523    }
4524
4525    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4526        for RealmQueryGetStructuredConfigRequest
4527    {
4528        #[inline(always)]
4529        fn new_empty() -> Self {
4530            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4531        }
4532
4533        #[inline]
4534        unsafe fn decode(
4535            &mut self,
4536            decoder: &mut fidl::encoding::Decoder<'_, D>,
4537            offset: usize,
4538            _depth: fidl::encoding::Depth,
4539        ) -> fidl::Result<()> {
4540            decoder.debug_check_bounds::<Self>(offset);
4541            // Verify that padding bytes are zero.
4542            fidl::decode!(
4543                fidl::encoding::BoundedString<4096>,
4544                D,
4545                &mut self.moniker,
4546                decoder,
4547                offset + 0,
4548                _depth
4549            )?;
4550            Ok(())
4551        }
4552    }
4553
4554    impl fidl::encoding::ValueTypeMarker for RealmQueryResolveDeclarationRequest {
4555        type Borrowed<'a> = &'a Self;
4556        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4557            value
4558        }
4559    }
4560
4561    unsafe impl fidl::encoding::TypeMarker for RealmQueryResolveDeclarationRequest {
4562        type Owned = Self;
4563
4564        #[inline(always)]
4565        fn inline_align(_context: fidl::encoding::Context) -> usize {
4566            8
4567        }
4568
4569        #[inline(always)]
4570        fn inline_size(_context: fidl::encoding::Context) -> usize {
4571            48
4572        }
4573    }
4574
4575    unsafe impl<D: fidl::encoding::ResourceDialect>
4576        fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D>
4577        for &RealmQueryResolveDeclarationRequest
4578    {
4579        #[inline]
4580        unsafe fn encode(
4581            self,
4582            encoder: &mut fidl::encoding::Encoder<'_, D>,
4583            offset: usize,
4584            _depth: fidl::encoding::Depth,
4585        ) -> fidl::Result<()> {
4586            encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4587            // Delegate to tuple encoding.
4588            fidl::encoding::Encode::<RealmQueryResolveDeclarationRequest, D>::encode(
4589                (
4590                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
4591                    <ChildLocation as fidl::encoding::ValueTypeMarker>::borrow(&self.child_location),
4592                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
4593                ),
4594                encoder, offset, _depth
4595            )
4596        }
4597    }
4598    unsafe impl<
4599        D: fidl::encoding::ResourceDialect,
4600        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4601        T1: fidl::encoding::Encode<ChildLocation, D>,
4602        T2: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4603    > fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D> for (T0, T1, T2)
4604    {
4605        #[inline]
4606        unsafe fn encode(
4607            self,
4608            encoder: &mut fidl::encoding::Encoder<'_, D>,
4609            offset: usize,
4610            depth: fidl::encoding::Depth,
4611        ) -> fidl::Result<()> {
4612            encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4613            // Zero out padding regions. There's no need to apply masks
4614            // because the unmasked parts will be overwritten by fields.
4615            // Write the fields.
4616            self.0.encode(encoder, offset + 0, depth)?;
4617            self.1.encode(encoder, offset + 16, depth)?;
4618            self.2.encode(encoder, offset + 32, depth)?;
4619            Ok(())
4620        }
4621    }
4622
4623    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4624        for RealmQueryResolveDeclarationRequest
4625    {
4626        #[inline(always)]
4627        fn new_empty() -> Self {
4628            Self {
4629                parent: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4630                child_location: fidl::new_empty!(ChildLocation, D),
4631                url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4632            }
4633        }
4634
4635        #[inline]
4636        unsafe fn decode(
4637            &mut self,
4638            decoder: &mut fidl::encoding::Decoder<'_, D>,
4639            offset: usize,
4640            _depth: fidl::encoding::Depth,
4641        ) -> fidl::Result<()> {
4642            decoder.debug_check_bounds::<Self>(offset);
4643            // Verify that padding bytes are zero.
4644            fidl::decode!(
4645                fidl::encoding::BoundedString<4096>,
4646                D,
4647                &mut self.parent,
4648                decoder,
4649                offset + 0,
4650                _depth
4651            )?;
4652            fidl::decode!(
4653                ChildLocation,
4654                D,
4655                &mut self.child_location,
4656                decoder,
4657                offset + 16,
4658                _depth
4659            )?;
4660            fidl::decode!(
4661                fidl::encoding::BoundedString<4096>,
4662                D,
4663                &mut self.url,
4664                decoder,
4665                offset + 32,
4666                _depth
4667            )?;
4668            Ok(())
4669        }
4670    }
4671
4672    impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceResponse {
4673        type Borrowed<'a> = &'a Self;
4674        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4675            value
4676        }
4677    }
4678
4679    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceResponse {
4680        type Owned = Self;
4681
4682        #[inline(always)]
4683        fn inline_align(_context: fidl::encoding::Context) -> usize {
4684            8
4685        }
4686
4687        #[inline(always)]
4688        fn inline_size(_context: fidl::encoding::Context) -> usize {
4689            16
4690        }
4691    }
4692
4693    unsafe impl<D: fidl::encoding::ResourceDialect>
4694        fidl::encoding::Encode<RealmQueryGetInstanceResponse, D>
4695        for &RealmQueryGetInstanceResponse
4696    {
4697        #[inline]
4698        unsafe fn encode(
4699            self,
4700            encoder: &mut fidl::encoding::Encoder<'_, D>,
4701            offset: usize,
4702            _depth: fidl::encoding::Depth,
4703        ) -> fidl::Result<()> {
4704            encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4705            // Delegate to tuple encoding.
4706            fidl::encoding::Encode::<RealmQueryGetInstanceResponse, D>::encode(
4707                (<Instance as fidl::encoding::ValueTypeMarker>::borrow(&self.instance),),
4708                encoder,
4709                offset,
4710                _depth,
4711            )
4712        }
4713    }
4714    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Instance, D>>
4715        fidl::encoding::Encode<RealmQueryGetInstanceResponse, D> for (T0,)
4716    {
4717        #[inline]
4718        unsafe fn encode(
4719            self,
4720            encoder: &mut fidl::encoding::Encoder<'_, D>,
4721            offset: usize,
4722            depth: fidl::encoding::Depth,
4723        ) -> fidl::Result<()> {
4724            encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4725            // Zero out padding regions. There's no need to apply masks
4726            // because the unmasked parts will be overwritten by fields.
4727            // Write the fields.
4728            self.0.encode(encoder, offset + 0, depth)?;
4729            Ok(())
4730        }
4731    }
4732
4733    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4734        for RealmQueryGetInstanceResponse
4735    {
4736        #[inline(always)]
4737        fn new_empty() -> Self {
4738            Self { instance: fidl::new_empty!(Instance, D) }
4739        }
4740
4741        #[inline]
4742        unsafe fn decode(
4743            &mut self,
4744            decoder: &mut fidl::encoding::Decoder<'_, D>,
4745            offset: usize,
4746            _depth: fidl::encoding::Depth,
4747        ) -> fidl::Result<()> {
4748            decoder.debug_check_bounds::<Self>(offset);
4749            // Verify that padding bytes are zero.
4750            fidl::decode!(Instance, D, &mut self.instance, decoder, offset + 0, _depth)?;
4751            Ok(())
4752        }
4753    }
4754
4755    impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigResponse {
4756        type Borrowed<'a> = &'a Self;
4757        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4758            value
4759        }
4760    }
4761
4762    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigResponse {
4763        type Owned = Self;
4764
4765        #[inline(always)]
4766        fn inline_align(_context: fidl::encoding::Context) -> usize {
4767            8
4768        }
4769
4770        #[inline(always)]
4771        fn inline_size(_context: fidl::encoding::Context) -> usize {
4772            32
4773        }
4774    }
4775
4776    unsafe impl<D: fidl::encoding::ResourceDialect>
4777        fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D>
4778        for &RealmQueryGetStructuredConfigResponse
4779    {
4780        #[inline]
4781        unsafe fn encode(
4782            self,
4783            encoder: &mut fidl::encoding::Encoder<'_, D>,
4784            offset: usize,
4785            _depth: fidl::encoding::Depth,
4786        ) -> fidl::Result<()> {
4787            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4788            // Delegate to tuple encoding.
4789            fidl::encoding::Encode::<RealmQueryGetStructuredConfigResponse, D>::encode(
4790                (
4791                    <fidl_fuchsia_component_decl__common::ResolvedConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
4792                ),
4793                encoder, offset, _depth
4794            )
4795        }
4796    }
4797    unsafe impl<
4798        D: fidl::encoding::ResourceDialect,
4799        T0: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ResolvedConfig, D>,
4800    > fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D> for (T0,)
4801    {
4802        #[inline]
4803        unsafe fn encode(
4804            self,
4805            encoder: &mut fidl::encoding::Encoder<'_, D>,
4806            offset: usize,
4807            depth: fidl::encoding::Depth,
4808        ) -> fidl::Result<()> {
4809            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4810            // Zero out padding regions. There's no need to apply masks
4811            // because the unmasked parts will be overwritten by fields.
4812            // Write the fields.
4813            self.0.encode(encoder, offset + 0, depth)?;
4814            Ok(())
4815        }
4816    }
4817
4818    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4819        for RealmQueryGetStructuredConfigResponse
4820    {
4821        #[inline(always)]
4822        fn new_empty() -> Self {
4823            Self {
4824                config: fidl::new_empty!(fidl_fuchsia_component_decl__common::ResolvedConfig, D),
4825            }
4826        }
4827
4828        #[inline]
4829        unsafe fn decode(
4830            &mut self,
4831            decoder: &mut fidl::encoding::Decoder<'_, D>,
4832            offset: usize,
4833            _depth: fidl::encoding::Depth,
4834        ) -> fidl::Result<()> {
4835            decoder.debug_check_bounds::<Self>(offset);
4836            // Verify that padding bytes are zero.
4837            fidl::decode!(
4838                fidl_fuchsia_component_decl__common::ResolvedConfig,
4839                D,
4840                &mut self.config,
4841                decoder,
4842                offset + 0,
4843                _depth
4844            )?;
4845            Ok(())
4846        }
4847    }
4848
4849    impl fidl::encoding::ValueTypeMarker for RouteTarget {
4850        type Borrowed<'a> = &'a Self;
4851        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4852            value
4853        }
4854    }
4855
4856    unsafe impl fidl::encoding::TypeMarker for RouteTarget {
4857        type Owned = Self;
4858
4859        #[inline(always)]
4860        fn inline_align(_context: fidl::encoding::Context) -> usize {
4861            8
4862        }
4863
4864        #[inline(always)]
4865        fn inline_size(_context: fidl::encoding::Context) -> usize {
4866            24
4867        }
4868    }
4869
4870    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteTarget, D>
4871        for &RouteTarget
4872    {
4873        #[inline]
4874        unsafe fn encode(
4875            self,
4876            encoder: &mut fidl::encoding::Encoder<'_, D>,
4877            offset: usize,
4878            _depth: fidl::encoding::Depth,
4879        ) -> fidl::Result<()> {
4880            encoder.debug_check_bounds::<RouteTarget>(offset);
4881            // Delegate to tuple encoding.
4882            fidl::encoding::Encode::<RouteTarget, D>::encode(
4883                (
4884                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4885                        &self.name,
4886                    ),
4887                    <DeclType as fidl::encoding::ValueTypeMarker>::borrow(&self.decl_type),
4888                ),
4889                encoder,
4890                offset,
4891                _depth,
4892            )
4893        }
4894    }
4895    unsafe impl<
4896        D: fidl::encoding::ResourceDialect,
4897        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4898        T1: fidl::encoding::Encode<DeclType, D>,
4899    > fidl::encoding::Encode<RouteTarget, D> for (T0, T1)
4900    {
4901        #[inline]
4902        unsafe fn encode(
4903            self,
4904            encoder: &mut fidl::encoding::Encoder<'_, D>,
4905            offset: usize,
4906            depth: fidl::encoding::Depth,
4907        ) -> fidl::Result<()> {
4908            encoder.debug_check_bounds::<RouteTarget>(offset);
4909            // Zero out padding regions. There's no need to apply masks
4910            // because the unmasked parts will be overwritten by fields.
4911            unsafe {
4912                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4913                (ptr as *mut u64).write_unaligned(0);
4914            }
4915            // Write the fields.
4916            self.0.encode(encoder, offset + 0, depth)?;
4917            self.1.encode(encoder, offset + 16, depth)?;
4918            Ok(())
4919        }
4920    }
4921
4922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteTarget {
4923        #[inline(always)]
4924        fn new_empty() -> Self {
4925            Self {
4926                name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4927                decl_type: fidl::new_empty!(DeclType, D),
4928            }
4929        }
4930
4931        #[inline]
4932        unsafe fn decode(
4933            &mut self,
4934            decoder: &mut fidl::encoding::Decoder<'_, D>,
4935            offset: usize,
4936            _depth: fidl::encoding::Depth,
4937        ) -> fidl::Result<()> {
4938            decoder.debug_check_bounds::<Self>(offset);
4939            // Verify that padding bytes are zero.
4940            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4941            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4942            let mask = 0xffffffff00000000u64;
4943            let maskedval = padval & mask;
4944            if maskedval != 0 {
4945                return Err(fidl::Error::NonZeroPadding {
4946                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4947                });
4948            }
4949            fidl::decode!(
4950                fidl::encoding::BoundedString<255>,
4951                D,
4952                &mut self.name,
4953                decoder,
4954                offset + 0,
4955                _depth
4956            )?;
4957            fidl::decode!(DeclType, D, &mut self.decl_type, decoder, offset + 16, _depth)?;
4958            Ok(())
4959        }
4960    }
4961
4962    impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteRequest {
4963        type Borrowed<'a> = &'a Self;
4964        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4965            value
4966        }
4967    }
4968
4969    unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteRequest {
4970        type Owned = Self;
4971
4972        #[inline(always)]
4973        fn inline_align(_context: fidl::encoding::Context) -> usize {
4974            8
4975        }
4976
4977        #[inline(always)]
4978        fn inline_size(_context: fidl::encoding::Context) -> usize {
4979            32
4980        }
4981    }
4982
4983    unsafe impl<D: fidl::encoding::ResourceDialect>
4984        fidl::encoding::Encode<RouteValidatorRouteRequest, D> for &RouteValidatorRouteRequest
4985    {
4986        #[inline]
4987        unsafe fn encode(
4988            self,
4989            encoder: &mut fidl::encoding::Encoder<'_, D>,
4990            offset: usize,
4991            _depth: fidl::encoding::Depth,
4992        ) -> fidl::Result<()> {
4993            encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
4994            // Delegate to tuple encoding.
4995            fidl::encoding::Encode::<RouteValidatorRouteRequest, D>::encode(
4996                (
4997                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
4998                    <fidl::encoding::UnboundedVector<RouteTarget> as fidl::encoding::ValueTypeMarker>::borrow(&self.targets),
4999                ),
5000                encoder, offset, _depth
5001            )
5002        }
5003    }
5004    unsafe impl<
5005        D: fidl::encoding::ResourceDialect,
5006        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5007        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteTarget>, D>,
5008    > fidl::encoding::Encode<RouteValidatorRouteRequest, D> for (T0, T1)
5009    {
5010        #[inline]
5011        unsafe fn encode(
5012            self,
5013            encoder: &mut fidl::encoding::Encoder<'_, D>,
5014            offset: usize,
5015            depth: fidl::encoding::Depth,
5016        ) -> fidl::Result<()> {
5017            encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
5018            // Zero out padding regions. There's no need to apply masks
5019            // because the unmasked parts will be overwritten by fields.
5020            // Write the fields.
5021            self.0.encode(encoder, offset + 0, depth)?;
5022            self.1.encode(encoder, offset + 16, depth)?;
5023            Ok(())
5024        }
5025    }
5026
5027    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5028        for RouteValidatorRouteRequest
5029    {
5030        #[inline(always)]
5031        fn new_empty() -> Self {
5032            Self {
5033                moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
5034                targets: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteTarget>, D),
5035            }
5036        }
5037
5038        #[inline]
5039        unsafe fn decode(
5040            &mut self,
5041            decoder: &mut fidl::encoding::Decoder<'_, D>,
5042            offset: usize,
5043            _depth: fidl::encoding::Depth,
5044        ) -> fidl::Result<()> {
5045            decoder.debug_check_bounds::<Self>(offset);
5046            // Verify that padding bytes are zero.
5047            fidl::decode!(
5048                fidl::encoding::BoundedString<4096>,
5049                D,
5050                &mut self.moniker,
5051                decoder,
5052                offset + 0,
5053                _depth
5054            )?;
5055            fidl::decode!(
5056                fidl::encoding::UnboundedVector<RouteTarget>,
5057                D,
5058                &mut self.targets,
5059                decoder,
5060                offset + 16,
5061                _depth
5062            )?;
5063            Ok(())
5064        }
5065    }
5066
5067    impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateRequest {
5068        type Borrowed<'a> = &'a Self;
5069        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5070            value
5071        }
5072    }
5073
5074    unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateRequest {
5075        type Owned = Self;
5076
5077        #[inline(always)]
5078        fn inline_align(_context: fidl::encoding::Context) -> usize {
5079            8
5080        }
5081
5082        #[inline(always)]
5083        fn inline_size(_context: fidl::encoding::Context) -> usize {
5084            16
5085        }
5086    }
5087
5088    unsafe impl<D: fidl::encoding::ResourceDialect>
5089        fidl::encoding::Encode<RouteValidatorValidateRequest, D>
5090        for &RouteValidatorValidateRequest
5091    {
5092        #[inline]
5093        unsafe fn encode(
5094            self,
5095            encoder: &mut fidl::encoding::Encoder<'_, D>,
5096            offset: usize,
5097            _depth: fidl::encoding::Depth,
5098        ) -> fidl::Result<()> {
5099            encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5100            // Delegate to tuple encoding.
5101            fidl::encoding::Encode::<RouteValidatorValidateRequest, D>::encode(
5102                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5103                    &self.moniker,
5104                ),),
5105                encoder,
5106                offset,
5107                _depth,
5108            )
5109        }
5110    }
5111    unsafe impl<
5112        D: fidl::encoding::ResourceDialect,
5113        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5114    > fidl::encoding::Encode<RouteValidatorValidateRequest, D> for (T0,)
5115    {
5116        #[inline]
5117        unsafe fn encode(
5118            self,
5119            encoder: &mut fidl::encoding::Encoder<'_, D>,
5120            offset: usize,
5121            depth: fidl::encoding::Depth,
5122        ) -> fidl::Result<()> {
5123            encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5124            // Zero out padding regions. There's no need to apply masks
5125            // because the unmasked parts will be overwritten by fields.
5126            // Write the fields.
5127            self.0.encode(encoder, offset + 0, depth)?;
5128            Ok(())
5129        }
5130    }
5131
5132    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5133        for RouteValidatorValidateRequest
5134    {
5135        #[inline(always)]
5136        fn new_empty() -> Self {
5137            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5138        }
5139
5140        #[inline]
5141        unsafe fn decode(
5142            &mut self,
5143            decoder: &mut fidl::encoding::Decoder<'_, D>,
5144            offset: usize,
5145            _depth: fidl::encoding::Depth,
5146        ) -> fidl::Result<()> {
5147            decoder.debug_check_bounds::<Self>(offset);
5148            // Verify that padding bytes are zero.
5149            fidl::decode!(
5150                fidl::encoding::BoundedString<4096>,
5151                D,
5152                &mut self.moniker,
5153                decoder,
5154                offset + 0,
5155                _depth
5156            )?;
5157            Ok(())
5158        }
5159    }
5160
5161    impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteResponse {
5162        type Borrowed<'a> = &'a Self;
5163        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5164            value
5165        }
5166    }
5167
5168    unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteResponse {
5169        type Owned = Self;
5170
5171        #[inline(always)]
5172        fn inline_align(_context: fidl::encoding::Context) -> usize {
5173            8
5174        }
5175
5176        #[inline(always)]
5177        fn inline_size(_context: fidl::encoding::Context) -> usize {
5178            16
5179        }
5180    }
5181
5182    unsafe impl<D: fidl::encoding::ResourceDialect>
5183        fidl::encoding::Encode<RouteValidatorRouteResponse, D> for &RouteValidatorRouteResponse
5184    {
5185        #[inline]
5186        unsafe fn encode(
5187            self,
5188            encoder: &mut fidl::encoding::Encoder<'_, D>,
5189            offset: usize,
5190            _depth: fidl::encoding::Depth,
5191        ) -> fidl::Result<()> {
5192            encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5193            // Delegate to tuple encoding.
5194            fidl::encoding::Encode::<RouteValidatorRouteResponse, D>::encode(
5195                (
5196                    <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5197                ),
5198                encoder, offset, _depth
5199            )
5200        }
5201    }
5202    unsafe impl<
5203        D: fidl::encoding::ResourceDialect,
5204        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5205    > fidl::encoding::Encode<RouteValidatorRouteResponse, D> for (T0,)
5206    {
5207        #[inline]
5208        unsafe fn encode(
5209            self,
5210            encoder: &mut fidl::encoding::Encoder<'_, D>,
5211            offset: usize,
5212            depth: fidl::encoding::Depth,
5213        ) -> fidl::Result<()> {
5214            encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5215            // Zero out padding regions. There's no need to apply masks
5216            // because the unmasked parts will be overwritten by fields.
5217            // Write the fields.
5218            self.0.encode(encoder, offset + 0, depth)?;
5219            Ok(())
5220        }
5221    }
5222
5223    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5224        for RouteValidatorRouteResponse
5225    {
5226        #[inline(always)]
5227        fn new_empty() -> Self {
5228            Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5229        }
5230
5231        #[inline]
5232        unsafe fn decode(
5233            &mut self,
5234            decoder: &mut fidl::encoding::Decoder<'_, D>,
5235            offset: usize,
5236            _depth: fidl::encoding::Depth,
5237        ) -> fidl::Result<()> {
5238            decoder.debug_check_bounds::<Self>(offset);
5239            // Verify that padding bytes are zero.
5240            fidl::decode!(
5241                fidl::encoding::UnboundedVector<RouteReport>,
5242                D,
5243                &mut self.reports,
5244                decoder,
5245                offset + 0,
5246                _depth
5247            )?;
5248            Ok(())
5249        }
5250    }
5251
5252    impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateResponse {
5253        type Borrowed<'a> = &'a Self;
5254        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5255            value
5256        }
5257    }
5258
5259    unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateResponse {
5260        type Owned = Self;
5261
5262        #[inline(always)]
5263        fn inline_align(_context: fidl::encoding::Context) -> usize {
5264            8
5265        }
5266
5267        #[inline(always)]
5268        fn inline_size(_context: fidl::encoding::Context) -> usize {
5269            16
5270        }
5271    }
5272
5273    unsafe impl<D: fidl::encoding::ResourceDialect>
5274        fidl::encoding::Encode<RouteValidatorValidateResponse, D>
5275        for &RouteValidatorValidateResponse
5276    {
5277        #[inline]
5278        unsafe fn encode(
5279            self,
5280            encoder: &mut fidl::encoding::Encoder<'_, D>,
5281            offset: usize,
5282            _depth: fidl::encoding::Depth,
5283        ) -> fidl::Result<()> {
5284            encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5285            // Delegate to tuple encoding.
5286            fidl::encoding::Encode::<RouteValidatorValidateResponse, D>::encode(
5287                (
5288                    <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5289                ),
5290                encoder, offset, _depth
5291            )
5292        }
5293    }
5294    unsafe impl<
5295        D: fidl::encoding::ResourceDialect,
5296        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5297    > fidl::encoding::Encode<RouteValidatorValidateResponse, D> for (T0,)
5298    {
5299        #[inline]
5300        unsafe fn encode(
5301            self,
5302            encoder: &mut fidl::encoding::Encoder<'_, D>,
5303            offset: usize,
5304            depth: fidl::encoding::Depth,
5305        ) -> fidl::Result<()> {
5306            encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5307            // Zero out padding regions. There's no need to apply masks
5308            // because the unmasked parts will be overwritten by fields.
5309            // Write the fields.
5310            self.0.encode(encoder, offset + 0, depth)?;
5311            Ok(())
5312        }
5313    }
5314
5315    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5316        for RouteValidatorValidateResponse
5317    {
5318        #[inline(always)]
5319        fn new_empty() -> Self {
5320            Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5321        }
5322
5323        #[inline]
5324        unsafe fn decode(
5325            &mut self,
5326            decoder: &mut fidl::encoding::Decoder<'_, D>,
5327            offset: usize,
5328            _depth: fidl::encoding::Depth,
5329        ) -> fidl::Result<()> {
5330            decoder.debug_check_bounds::<Self>(offset);
5331            // Verify that padding bytes are zero.
5332            fidl::decode!(
5333                fidl::encoding::UnboundedVector<RouteReport>,
5334                D,
5335                &mut self.reports,
5336                decoder,
5337                offset + 0,
5338                _depth
5339            )?;
5340            Ok(())
5341        }
5342    }
5343
5344    impl fidl::encoding::ValueTypeMarker for StorageAdminDeleteComponentStorageRequest {
5345        type Borrowed<'a> = &'a Self;
5346        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5347            value
5348        }
5349    }
5350
5351    unsafe impl fidl::encoding::TypeMarker for StorageAdminDeleteComponentStorageRequest {
5352        type Owned = Self;
5353
5354        #[inline(always)]
5355        fn inline_align(_context: fidl::encoding::Context) -> usize {
5356            8
5357        }
5358
5359        #[inline(always)]
5360        fn inline_size(_context: fidl::encoding::Context) -> usize {
5361            16
5362        }
5363    }
5364
5365    unsafe impl<D: fidl::encoding::ResourceDialect>
5366        fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D>
5367        for &StorageAdminDeleteComponentStorageRequest
5368    {
5369        #[inline]
5370        unsafe fn encode(
5371            self,
5372            encoder: &mut fidl::encoding::Encoder<'_, D>,
5373            offset: usize,
5374            _depth: fidl::encoding::Depth,
5375        ) -> fidl::Result<()> {
5376            encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5377            // Delegate to tuple encoding.
5378            fidl::encoding::Encode::<StorageAdminDeleteComponentStorageRequest, D>::encode(
5379                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5380                    &self.relative_moniker,
5381                ),),
5382                encoder,
5383                offset,
5384                _depth,
5385            )
5386        }
5387    }
5388    unsafe impl<
5389        D: fidl::encoding::ResourceDialect,
5390        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5391    > fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D> for (T0,)
5392    {
5393        #[inline]
5394        unsafe fn encode(
5395            self,
5396            encoder: &mut fidl::encoding::Encoder<'_, D>,
5397            offset: usize,
5398            depth: fidl::encoding::Depth,
5399        ) -> fidl::Result<()> {
5400            encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5401            // Zero out padding regions. There's no need to apply masks
5402            // because the unmasked parts will be overwritten by fields.
5403            // Write the fields.
5404            self.0.encode(encoder, offset + 0, depth)?;
5405            Ok(())
5406        }
5407    }
5408
5409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5410        for StorageAdminDeleteComponentStorageRequest
5411    {
5412        #[inline(always)]
5413        fn new_empty() -> Self {
5414            Self { relative_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5415        }
5416
5417        #[inline]
5418        unsafe fn decode(
5419            &mut self,
5420            decoder: &mut fidl::encoding::Decoder<'_, D>,
5421            offset: usize,
5422            _depth: fidl::encoding::Depth,
5423        ) -> fidl::Result<()> {
5424            decoder.debug_check_bounds::<Self>(offset);
5425            // Verify that padding bytes are zero.
5426            fidl::decode!(
5427                fidl::encoding::BoundedString<4096>,
5428                D,
5429                &mut self.relative_moniker,
5430                decoder,
5431                offset + 0,
5432                _depth
5433            )?;
5434            Ok(())
5435        }
5436    }
5437
5438    impl fidl::encoding::ValueTypeMarker for StorageIteratorNextResponse {
5439        type Borrowed<'a> = &'a Self;
5440        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5441            value
5442        }
5443    }
5444
5445    unsafe impl fidl::encoding::TypeMarker for StorageIteratorNextResponse {
5446        type Owned = Self;
5447
5448        #[inline(always)]
5449        fn inline_align(_context: fidl::encoding::Context) -> usize {
5450            8
5451        }
5452
5453        #[inline(always)]
5454        fn inline_size(_context: fidl::encoding::Context) -> usize {
5455            16
5456        }
5457    }
5458
5459    unsafe impl<D: fidl::encoding::ResourceDialect>
5460        fidl::encoding::Encode<StorageIteratorNextResponse, D> for &StorageIteratorNextResponse
5461    {
5462        #[inline]
5463        unsafe fn encode(
5464            self,
5465            encoder: &mut fidl::encoding::Encoder<'_, D>,
5466            offset: usize,
5467            _depth: fidl::encoding::Depth,
5468        ) -> fidl::Result<()> {
5469            encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5470            // Delegate to tuple encoding.
5471            fidl::encoding::Encode::<StorageIteratorNextResponse, D>::encode(
5472                (
5473                    <fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_monikers),
5474                ),
5475                encoder, offset, _depth
5476            )
5477        }
5478    }
5479    unsafe impl<
5480        D: fidl::encoding::ResourceDialect,
5481        T0: fidl::encoding::Encode<
5482                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5483                D,
5484            >,
5485    > fidl::encoding::Encode<StorageIteratorNextResponse, D> for (T0,)
5486    {
5487        #[inline]
5488        unsafe fn encode(
5489            self,
5490            encoder: &mut fidl::encoding::Encoder<'_, D>,
5491            offset: usize,
5492            depth: fidl::encoding::Depth,
5493        ) -> fidl::Result<()> {
5494            encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5495            // Zero out padding regions. There's no need to apply masks
5496            // because the unmasked parts will be overwritten by fields.
5497            // Write the fields.
5498            self.0.encode(encoder, offset + 0, depth)?;
5499            Ok(())
5500        }
5501    }
5502
5503    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5504        for StorageIteratorNextResponse
5505    {
5506        #[inline(always)]
5507        fn new_empty() -> Self {
5508            Self {
5509                relative_monikers: fidl::new_empty!(
5510                    fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5511                    D
5512                ),
5513            }
5514        }
5515
5516        #[inline]
5517        unsafe fn decode(
5518            &mut self,
5519            decoder: &mut fidl::encoding::Decoder<'_, D>,
5520            offset: usize,
5521            _depth: fidl::encoding::Depth,
5522        ) -> fidl::Result<()> {
5523            decoder.debug_check_bounds::<Self>(offset);
5524            // Verify that padding bytes are zero.
5525            fidl::decode!(
5526                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5527                D,
5528                &mut self.relative_monikers,
5529                decoder,
5530                offset + 0,
5531                _depth
5532            )?;
5533            Ok(())
5534        }
5535    }
5536
5537    impl ComponentCrashInfo {
5538        #[inline(always)]
5539        fn max_ordinal_present(&self) -> u64 {
5540            if let Some(_) = self.moniker {
5541                return 2;
5542            }
5543            if let Some(_) = self.url {
5544                return 1;
5545            }
5546            0
5547        }
5548    }
5549
5550    impl fidl::encoding::ValueTypeMarker for ComponentCrashInfo {
5551        type Borrowed<'a> = &'a Self;
5552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5553            value
5554        }
5555    }
5556
5557    unsafe impl fidl::encoding::TypeMarker for ComponentCrashInfo {
5558        type Owned = Self;
5559
5560        #[inline(always)]
5561        fn inline_align(_context: fidl::encoding::Context) -> usize {
5562            8
5563        }
5564
5565        #[inline(always)]
5566        fn inline_size(_context: fidl::encoding::Context) -> usize {
5567            16
5568        }
5569    }
5570
5571    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ComponentCrashInfo, D>
5572        for &ComponentCrashInfo
5573    {
5574        unsafe fn encode(
5575            self,
5576            encoder: &mut fidl::encoding::Encoder<'_, D>,
5577            offset: usize,
5578            mut depth: fidl::encoding::Depth,
5579        ) -> fidl::Result<()> {
5580            encoder.debug_check_bounds::<ComponentCrashInfo>(offset);
5581            // Vector header
5582            let max_ordinal: u64 = self.max_ordinal_present();
5583            encoder.write_num(max_ordinal, offset);
5584            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5585            // Calling encoder.out_of_line_offset(0) is not allowed.
5586            if max_ordinal == 0 {
5587                return Ok(());
5588            }
5589            depth.increment()?;
5590            let envelope_size = 8;
5591            let bytes_len = max_ordinal as usize * envelope_size;
5592            #[allow(unused_variables)]
5593            let offset = encoder.out_of_line_offset(bytes_len);
5594            let mut _prev_end_offset: usize = 0;
5595            if 1 > max_ordinal {
5596                return Ok(());
5597            }
5598
5599            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5600            // are envelope_size bytes.
5601            let cur_offset: usize = (1 - 1) * envelope_size;
5602
5603            // Zero reserved fields.
5604            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5605
5606            // Safety:
5607            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5608            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5609            //   envelope_size bytes, there is always sufficient room.
5610            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5611            self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5612            encoder, offset + cur_offset, depth
5613        )?;
5614
5615            _prev_end_offset = cur_offset + envelope_size;
5616            if 2 > max_ordinal {
5617                return Ok(());
5618            }
5619
5620            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5621            // are envelope_size bytes.
5622            let cur_offset: usize = (2 - 1) * envelope_size;
5623
5624            // Zero reserved fields.
5625            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5626
5627            // Safety:
5628            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5629            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5630            //   envelope_size bytes, there is always sufficient room.
5631            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5632            self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5633            encoder, offset + cur_offset, depth
5634        )?;
5635
5636            _prev_end_offset = cur_offset + envelope_size;
5637
5638            Ok(())
5639        }
5640    }
5641
5642    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ComponentCrashInfo {
5643        #[inline(always)]
5644        fn new_empty() -> Self {
5645            Self::default()
5646        }
5647
5648        unsafe fn decode(
5649            &mut self,
5650            decoder: &mut fidl::encoding::Decoder<'_, D>,
5651            offset: usize,
5652            mut depth: fidl::encoding::Depth,
5653        ) -> fidl::Result<()> {
5654            decoder.debug_check_bounds::<Self>(offset);
5655            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5656                None => return Err(fidl::Error::NotNullable),
5657                Some(len) => len,
5658            };
5659            // Calling decoder.out_of_line_offset(0) is not allowed.
5660            if len == 0 {
5661                return Ok(());
5662            };
5663            depth.increment()?;
5664            let envelope_size = 8;
5665            let bytes_len = len * envelope_size;
5666            let offset = decoder.out_of_line_offset(bytes_len)?;
5667            // Decode the envelope for each type.
5668            let mut _next_ordinal_to_read = 0;
5669            let mut next_offset = offset;
5670            let end_offset = offset + bytes_len;
5671            _next_ordinal_to_read += 1;
5672            if next_offset >= end_offset {
5673                return Ok(());
5674            }
5675
5676            // Decode unknown envelopes for gaps in ordinals.
5677            while _next_ordinal_to_read < 1 {
5678                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5679                _next_ordinal_to_read += 1;
5680                next_offset += envelope_size;
5681            }
5682
5683            let next_out_of_line = decoder.next_out_of_line();
5684            let handles_before = decoder.remaining_handles();
5685            if let Some((inlined, num_bytes, num_handles)) =
5686                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5687            {
5688                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5689                if inlined != (member_inline_size <= 4) {
5690                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5691                }
5692                let inner_offset;
5693                let mut inner_depth = depth.clone();
5694                if inlined {
5695                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5696                    inner_offset = next_offset;
5697                } else {
5698                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5699                    inner_depth.increment()?;
5700                }
5701                let val_ref = self.url.get_or_insert_with(|| {
5702                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5703                });
5704                fidl::decode!(
5705                    fidl::encoding::BoundedString<4096>,
5706                    D,
5707                    val_ref,
5708                    decoder,
5709                    inner_offset,
5710                    inner_depth
5711                )?;
5712                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5713                {
5714                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5715                }
5716                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5717                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5718                }
5719            }
5720
5721            next_offset += envelope_size;
5722            _next_ordinal_to_read += 1;
5723            if next_offset >= end_offset {
5724                return Ok(());
5725            }
5726
5727            // Decode unknown envelopes for gaps in ordinals.
5728            while _next_ordinal_to_read < 2 {
5729                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5730                _next_ordinal_to_read += 1;
5731                next_offset += envelope_size;
5732            }
5733
5734            let next_out_of_line = decoder.next_out_of_line();
5735            let handles_before = decoder.remaining_handles();
5736            if let Some((inlined, num_bytes, num_handles)) =
5737                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5738            {
5739                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5740                if inlined != (member_inline_size <= 4) {
5741                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5742                }
5743                let inner_offset;
5744                let mut inner_depth = depth.clone();
5745                if inlined {
5746                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5747                    inner_offset = next_offset;
5748                } else {
5749                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5750                    inner_depth.increment()?;
5751                }
5752                let val_ref = self.moniker.get_or_insert_with(|| {
5753                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5754                });
5755                fidl::decode!(
5756                    fidl::encoding::BoundedString<4096>,
5757                    D,
5758                    val_ref,
5759                    decoder,
5760                    inner_offset,
5761                    inner_depth
5762                )?;
5763                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5764                {
5765                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5766                }
5767                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5768                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5769                }
5770            }
5771
5772            next_offset += envelope_size;
5773
5774            // Decode the remaining unknown envelopes.
5775            while next_offset < end_offset {
5776                _next_ordinal_to_read += 1;
5777                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5778                next_offset += envelope_size;
5779            }
5780
5781            Ok(())
5782        }
5783    }
5784
5785    impl DictionaryEntry {
5786        #[inline(always)]
5787        fn max_ordinal_present(&self) -> u64 {
5788            if let Some(_) = self.name {
5789                return 1;
5790            }
5791            0
5792        }
5793    }
5794
5795    impl fidl::encoding::ValueTypeMarker for DictionaryEntry {
5796        type Borrowed<'a> = &'a Self;
5797        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5798            value
5799        }
5800    }
5801
5802    unsafe impl fidl::encoding::TypeMarker for DictionaryEntry {
5803        type Owned = Self;
5804
5805        #[inline(always)]
5806        fn inline_align(_context: fidl::encoding::Context) -> usize {
5807            8
5808        }
5809
5810        #[inline(always)]
5811        fn inline_size(_context: fidl::encoding::Context) -> usize {
5812            16
5813        }
5814    }
5815
5816    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DictionaryEntry, D>
5817        for &DictionaryEntry
5818    {
5819        unsafe fn encode(
5820            self,
5821            encoder: &mut fidl::encoding::Encoder<'_, D>,
5822            offset: usize,
5823            mut depth: fidl::encoding::Depth,
5824        ) -> fidl::Result<()> {
5825            encoder.debug_check_bounds::<DictionaryEntry>(offset);
5826            // Vector header
5827            let max_ordinal: u64 = self.max_ordinal_present();
5828            encoder.write_num(max_ordinal, offset);
5829            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5830            // Calling encoder.out_of_line_offset(0) is not allowed.
5831            if max_ordinal == 0 {
5832                return Ok(());
5833            }
5834            depth.increment()?;
5835            let envelope_size = 8;
5836            let bytes_len = max_ordinal as usize * envelope_size;
5837            #[allow(unused_variables)]
5838            let offset = encoder.out_of_line_offset(bytes_len);
5839            let mut _prev_end_offset: usize = 0;
5840            if 1 > max_ordinal {
5841                return Ok(());
5842            }
5843
5844            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5845            // are envelope_size bytes.
5846            let cur_offset: usize = (1 - 1) * envelope_size;
5847
5848            // Zero reserved fields.
5849            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5850
5851            // Safety:
5852            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5853            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5854            //   envelope_size bytes, there is always sufficient room.
5855            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
5856                self.name.as_ref().map(
5857                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
5858                ),
5859                encoder,
5860                offset + cur_offset,
5861                depth,
5862            )?;
5863
5864            _prev_end_offset = cur_offset + envelope_size;
5865
5866            Ok(())
5867        }
5868    }
5869
5870    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DictionaryEntry {
5871        #[inline(always)]
5872        fn new_empty() -> Self {
5873            Self::default()
5874        }
5875
5876        unsafe fn decode(
5877            &mut self,
5878            decoder: &mut fidl::encoding::Decoder<'_, D>,
5879            offset: usize,
5880            mut depth: fidl::encoding::Depth,
5881        ) -> fidl::Result<()> {
5882            decoder.debug_check_bounds::<Self>(offset);
5883            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5884                None => return Err(fidl::Error::NotNullable),
5885                Some(len) => len,
5886            };
5887            // Calling decoder.out_of_line_offset(0) is not allowed.
5888            if len == 0 {
5889                return Ok(());
5890            };
5891            depth.increment()?;
5892            let envelope_size = 8;
5893            let bytes_len = len * envelope_size;
5894            let offset = decoder.out_of_line_offset(bytes_len)?;
5895            // Decode the envelope for each type.
5896            let mut _next_ordinal_to_read = 0;
5897            let mut next_offset = offset;
5898            let end_offset = offset + bytes_len;
5899            _next_ordinal_to_read += 1;
5900            if next_offset >= end_offset {
5901                return Ok(());
5902            }
5903
5904            // Decode unknown envelopes for gaps in ordinals.
5905            while _next_ordinal_to_read < 1 {
5906                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5907                _next_ordinal_to_read += 1;
5908                next_offset += envelope_size;
5909            }
5910
5911            let next_out_of_line = decoder.next_out_of_line();
5912            let handles_before = decoder.remaining_handles();
5913            if let Some((inlined, num_bytes, num_handles)) =
5914                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5915            {
5916                let member_inline_size =
5917                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5918                        decoder.context,
5919                    );
5920                if inlined != (member_inline_size <= 4) {
5921                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5922                }
5923                let inner_offset;
5924                let mut inner_depth = depth.clone();
5925                if inlined {
5926                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5927                    inner_offset = next_offset;
5928                } else {
5929                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5930                    inner_depth.increment()?;
5931                }
5932                let val_ref = self
5933                    .name
5934                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
5935                fidl::decode!(
5936                    fidl::encoding::UnboundedString,
5937                    D,
5938                    val_ref,
5939                    decoder,
5940                    inner_offset,
5941                    inner_depth
5942                )?;
5943                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5944                {
5945                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5946                }
5947                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5948                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5949                }
5950            }
5951
5952            next_offset += envelope_size;
5953
5954            // Decode the remaining unknown envelopes.
5955            while next_offset < end_offset {
5956                _next_ordinal_to_read += 1;
5957                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5958                next_offset += envelope_size;
5959            }
5960
5961            Ok(())
5962        }
5963    }
5964
5965    impl ExecutionInfo {
5966        #[inline(always)]
5967        fn max_ordinal_present(&self) -> u64 {
5968            if let Some(_) = self.start_reason {
5969                return 1;
5970            }
5971            0
5972        }
5973    }
5974
5975    impl fidl::encoding::ValueTypeMarker for ExecutionInfo {
5976        type Borrowed<'a> = &'a Self;
5977        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5978            value
5979        }
5980    }
5981
5982    unsafe impl fidl::encoding::TypeMarker for ExecutionInfo {
5983        type Owned = Self;
5984
5985        #[inline(always)]
5986        fn inline_align(_context: fidl::encoding::Context) -> usize {
5987            8
5988        }
5989
5990        #[inline(always)]
5991        fn inline_size(_context: fidl::encoding::Context) -> usize {
5992            16
5993        }
5994    }
5995
5996    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ExecutionInfo, D>
5997        for &ExecutionInfo
5998    {
5999        unsafe fn encode(
6000            self,
6001            encoder: &mut fidl::encoding::Encoder<'_, D>,
6002            offset: usize,
6003            mut depth: fidl::encoding::Depth,
6004        ) -> fidl::Result<()> {
6005            encoder.debug_check_bounds::<ExecutionInfo>(offset);
6006            // Vector header
6007            let max_ordinal: u64 = self.max_ordinal_present();
6008            encoder.write_num(max_ordinal, offset);
6009            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6010            // Calling encoder.out_of_line_offset(0) is not allowed.
6011            if max_ordinal == 0 {
6012                return Ok(());
6013            }
6014            depth.increment()?;
6015            let envelope_size = 8;
6016            let bytes_len = max_ordinal as usize * envelope_size;
6017            #[allow(unused_variables)]
6018            let offset = encoder.out_of_line_offset(bytes_len);
6019            let mut _prev_end_offset: usize = 0;
6020            if 1 > max_ordinal {
6021                return Ok(());
6022            }
6023
6024            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6025            // are envelope_size bytes.
6026            let cur_offset: usize = (1 - 1) * envelope_size;
6027
6028            // Zero reserved fields.
6029            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6030
6031            // Safety:
6032            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6033            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6034            //   envelope_size bytes, there is always sufficient room.
6035            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<5000>, D>(
6036            self.start_reason.as_ref().map(<fidl::encoding::BoundedString<5000> as fidl::encoding::ValueTypeMarker>::borrow),
6037            encoder, offset + cur_offset, depth
6038        )?;
6039
6040            _prev_end_offset = cur_offset + envelope_size;
6041
6042            Ok(())
6043        }
6044    }
6045
6046    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExecutionInfo {
6047        #[inline(always)]
6048        fn new_empty() -> Self {
6049            Self::default()
6050        }
6051
6052        unsafe fn decode(
6053            &mut self,
6054            decoder: &mut fidl::encoding::Decoder<'_, D>,
6055            offset: usize,
6056            mut depth: fidl::encoding::Depth,
6057        ) -> fidl::Result<()> {
6058            decoder.debug_check_bounds::<Self>(offset);
6059            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6060                None => return Err(fidl::Error::NotNullable),
6061                Some(len) => len,
6062            };
6063            // Calling decoder.out_of_line_offset(0) is not allowed.
6064            if len == 0 {
6065                return Ok(());
6066            };
6067            depth.increment()?;
6068            let envelope_size = 8;
6069            let bytes_len = len * envelope_size;
6070            let offset = decoder.out_of_line_offset(bytes_len)?;
6071            // Decode the envelope for each type.
6072            let mut _next_ordinal_to_read = 0;
6073            let mut next_offset = offset;
6074            let end_offset = offset + bytes_len;
6075            _next_ordinal_to_read += 1;
6076            if next_offset >= end_offset {
6077                return Ok(());
6078            }
6079
6080            // Decode unknown envelopes for gaps in ordinals.
6081            while _next_ordinal_to_read < 1 {
6082                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6083                _next_ordinal_to_read += 1;
6084                next_offset += envelope_size;
6085            }
6086
6087            let next_out_of_line = decoder.next_out_of_line();
6088            let handles_before = decoder.remaining_handles();
6089            if let Some((inlined, num_bytes, num_handles)) =
6090                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6091            {
6092                let member_inline_size = <fidl::encoding::BoundedString<5000> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6093                if inlined != (member_inline_size <= 4) {
6094                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6095                }
6096                let inner_offset;
6097                let mut inner_depth = depth.clone();
6098                if inlined {
6099                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6100                    inner_offset = next_offset;
6101                } else {
6102                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6103                    inner_depth.increment()?;
6104                }
6105                let val_ref = self.start_reason.get_or_insert_with(|| {
6106                    fidl::new_empty!(fidl::encoding::BoundedString<5000>, D)
6107                });
6108                fidl::decode!(
6109                    fidl::encoding::BoundedString<5000>,
6110                    D,
6111                    val_ref,
6112                    decoder,
6113                    inner_offset,
6114                    inner_depth
6115                )?;
6116                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6117                {
6118                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6119                }
6120                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6121                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6122                }
6123            }
6124
6125            next_offset += envelope_size;
6126
6127            // Decode the remaining unknown envelopes.
6128            while next_offset < end_offset {
6129                _next_ordinal_to_read += 1;
6130                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6131                next_offset += envelope_size;
6132            }
6133
6134            Ok(())
6135        }
6136    }
6137
6138    impl Instance {
6139        #[inline(always)]
6140        fn max_ordinal_present(&self) -> u64 {
6141            if let Some(_) = self.environment {
6142                return 5;
6143            }
6144            if let Some(_) = self.resolved_info {
6145                return 4;
6146            }
6147            if let Some(_) = self.instance_id {
6148                return 3;
6149            }
6150            if let Some(_) = self.url {
6151                return 2;
6152            }
6153            if let Some(_) = self.moniker {
6154                return 1;
6155            }
6156            0
6157        }
6158    }
6159
6160    impl fidl::encoding::ValueTypeMarker for Instance {
6161        type Borrowed<'a> = &'a Self;
6162        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6163            value
6164        }
6165    }
6166
6167    unsafe impl fidl::encoding::TypeMarker for Instance {
6168        type Owned = Self;
6169
6170        #[inline(always)]
6171        fn inline_align(_context: fidl::encoding::Context) -> usize {
6172            8
6173        }
6174
6175        #[inline(always)]
6176        fn inline_size(_context: fidl::encoding::Context) -> usize {
6177            16
6178        }
6179    }
6180
6181    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Instance, D> for &Instance {
6182        unsafe fn encode(
6183            self,
6184            encoder: &mut fidl::encoding::Encoder<'_, D>,
6185            offset: usize,
6186            mut depth: fidl::encoding::Depth,
6187        ) -> fidl::Result<()> {
6188            encoder.debug_check_bounds::<Instance>(offset);
6189            // Vector header
6190            let max_ordinal: u64 = self.max_ordinal_present();
6191            encoder.write_num(max_ordinal, offset);
6192            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6193            // Calling encoder.out_of_line_offset(0) is not allowed.
6194            if max_ordinal == 0 {
6195                return Ok(());
6196            }
6197            depth.increment()?;
6198            let envelope_size = 8;
6199            let bytes_len = max_ordinal as usize * envelope_size;
6200            #[allow(unused_variables)]
6201            let offset = encoder.out_of_line_offset(bytes_len);
6202            let mut _prev_end_offset: usize = 0;
6203            if 1 > max_ordinal {
6204                return Ok(());
6205            }
6206
6207            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6208            // are envelope_size bytes.
6209            let cur_offset: usize = (1 - 1) * envelope_size;
6210
6211            // Zero reserved fields.
6212            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6213
6214            // Safety:
6215            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6216            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6217            //   envelope_size bytes, there is always sufficient room.
6218            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6219            self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6220            encoder, offset + cur_offset, depth
6221        )?;
6222
6223            _prev_end_offset = cur_offset + envelope_size;
6224            if 2 > max_ordinal {
6225                return Ok(());
6226            }
6227
6228            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6229            // are envelope_size bytes.
6230            let cur_offset: usize = (2 - 1) * envelope_size;
6231
6232            // Zero reserved fields.
6233            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6234
6235            // Safety:
6236            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6237            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6238            //   envelope_size bytes, there is always sufficient room.
6239            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6240            self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6241            encoder, offset + cur_offset, depth
6242        )?;
6243
6244            _prev_end_offset = cur_offset + envelope_size;
6245            if 3 > max_ordinal {
6246                return Ok(());
6247            }
6248
6249            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6250            // are envelope_size bytes.
6251            let cur_offset: usize = (3 - 1) * envelope_size;
6252
6253            // Zero reserved fields.
6254            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6255
6256            // Safety:
6257            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6258            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6259            //   envelope_size bytes, there is always sufficient room.
6260            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<64>, D>(
6261                self.instance_id.as_ref().map(
6262                    <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow,
6263                ),
6264                encoder,
6265                offset + cur_offset,
6266                depth,
6267            )?;
6268
6269            _prev_end_offset = cur_offset + envelope_size;
6270            if 4 > max_ordinal {
6271                return Ok(());
6272            }
6273
6274            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6275            // are envelope_size bytes.
6276            let cur_offset: usize = (4 - 1) * envelope_size;
6277
6278            // Zero reserved fields.
6279            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6280
6281            // Safety:
6282            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6283            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6284            //   envelope_size bytes, there is always sufficient room.
6285            fidl::encoding::encode_in_envelope_optional::<ResolvedInfo, D>(
6286                self.resolved_info
6287                    .as_ref()
6288                    .map(<ResolvedInfo as fidl::encoding::ValueTypeMarker>::borrow),
6289                encoder,
6290                offset + cur_offset,
6291                depth,
6292            )?;
6293
6294            _prev_end_offset = cur_offset + envelope_size;
6295            if 5 > max_ordinal {
6296                return Ok(());
6297            }
6298
6299            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6300            // are envelope_size bytes.
6301            let cur_offset: usize = (5 - 1) * envelope_size;
6302
6303            // Zero reserved fields.
6304            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6305
6306            // Safety:
6307            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6308            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6309            //   envelope_size bytes, there is always sufficient room.
6310            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6311            self.environment.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6312            encoder, offset + cur_offset, depth
6313        )?;
6314
6315            _prev_end_offset = cur_offset + envelope_size;
6316
6317            Ok(())
6318        }
6319    }
6320
6321    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Instance {
6322        #[inline(always)]
6323        fn new_empty() -> Self {
6324            Self::default()
6325        }
6326
6327        unsafe fn decode(
6328            &mut self,
6329            decoder: &mut fidl::encoding::Decoder<'_, D>,
6330            offset: usize,
6331            mut depth: fidl::encoding::Depth,
6332        ) -> fidl::Result<()> {
6333            decoder.debug_check_bounds::<Self>(offset);
6334            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6335                None => return Err(fidl::Error::NotNullable),
6336                Some(len) => len,
6337            };
6338            // Calling decoder.out_of_line_offset(0) is not allowed.
6339            if len == 0 {
6340                return Ok(());
6341            };
6342            depth.increment()?;
6343            let envelope_size = 8;
6344            let bytes_len = len * envelope_size;
6345            let offset = decoder.out_of_line_offset(bytes_len)?;
6346            // Decode the envelope for each type.
6347            let mut _next_ordinal_to_read = 0;
6348            let mut next_offset = offset;
6349            let end_offset = offset + bytes_len;
6350            _next_ordinal_to_read += 1;
6351            if next_offset >= end_offset {
6352                return Ok(());
6353            }
6354
6355            // Decode unknown envelopes for gaps in ordinals.
6356            while _next_ordinal_to_read < 1 {
6357                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6358                _next_ordinal_to_read += 1;
6359                next_offset += envelope_size;
6360            }
6361
6362            let next_out_of_line = decoder.next_out_of_line();
6363            let handles_before = decoder.remaining_handles();
6364            if let Some((inlined, num_bytes, num_handles)) =
6365                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6366            {
6367                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6368                if inlined != (member_inline_size <= 4) {
6369                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6370                }
6371                let inner_offset;
6372                let mut inner_depth = depth.clone();
6373                if inlined {
6374                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6375                    inner_offset = next_offset;
6376                } else {
6377                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6378                    inner_depth.increment()?;
6379                }
6380                let val_ref = self.moniker.get_or_insert_with(|| {
6381                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6382                });
6383                fidl::decode!(
6384                    fidl::encoding::BoundedString<4096>,
6385                    D,
6386                    val_ref,
6387                    decoder,
6388                    inner_offset,
6389                    inner_depth
6390                )?;
6391                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6392                {
6393                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6394                }
6395                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6396                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6397                }
6398            }
6399
6400            next_offset += envelope_size;
6401            _next_ordinal_to_read += 1;
6402            if next_offset >= end_offset {
6403                return Ok(());
6404            }
6405
6406            // Decode unknown envelopes for gaps in ordinals.
6407            while _next_ordinal_to_read < 2 {
6408                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6409                _next_ordinal_to_read += 1;
6410                next_offset += envelope_size;
6411            }
6412
6413            let next_out_of_line = decoder.next_out_of_line();
6414            let handles_before = decoder.remaining_handles();
6415            if let Some((inlined, num_bytes, num_handles)) =
6416                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6417            {
6418                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6419                if inlined != (member_inline_size <= 4) {
6420                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6421                }
6422                let inner_offset;
6423                let mut inner_depth = depth.clone();
6424                if inlined {
6425                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6426                    inner_offset = next_offset;
6427                } else {
6428                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6429                    inner_depth.increment()?;
6430                }
6431                let val_ref = self.url.get_or_insert_with(|| {
6432                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6433                });
6434                fidl::decode!(
6435                    fidl::encoding::BoundedString<4096>,
6436                    D,
6437                    val_ref,
6438                    decoder,
6439                    inner_offset,
6440                    inner_depth
6441                )?;
6442                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6443                {
6444                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6445                }
6446                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6447                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6448                }
6449            }
6450
6451            next_offset += envelope_size;
6452            _next_ordinal_to_read += 1;
6453            if next_offset >= end_offset {
6454                return Ok(());
6455            }
6456
6457            // Decode unknown envelopes for gaps in ordinals.
6458            while _next_ordinal_to_read < 3 {
6459                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6460                _next_ordinal_to_read += 1;
6461                next_offset += envelope_size;
6462            }
6463
6464            let next_out_of_line = decoder.next_out_of_line();
6465            let handles_before = decoder.remaining_handles();
6466            if let Some((inlined, num_bytes, num_handles)) =
6467                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6468            {
6469                let member_inline_size =
6470                    <fidl::encoding::BoundedString<64> as fidl::encoding::TypeMarker>::inline_size(
6471                        decoder.context,
6472                    );
6473                if inlined != (member_inline_size <= 4) {
6474                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6475                }
6476                let inner_offset;
6477                let mut inner_depth = depth.clone();
6478                if inlined {
6479                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6480                    inner_offset = next_offset;
6481                } else {
6482                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6483                    inner_depth.increment()?;
6484                }
6485                let val_ref = self
6486                    .instance_id
6487                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<64>, D));
6488                fidl::decode!(
6489                    fidl::encoding::BoundedString<64>,
6490                    D,
6491                    val_ref,
6492                    decoder,
6493                    inner_offset,
6494                    inner_depth
6495                )?;
6496                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6497                {
6498                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6499                }
6500                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6501                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6502                }
6503            }
6504
6505            next_offset += envelope_size;
6506            _next_ordinal_to_read += 1;
6507            if next_offset >= end_offset {
6508                return Ok(());
6509            }
6510
6511            // Decode unknown envelopes for gaps in ordinals.
6512            while _next_ordinal_to_read < 4 {
6513                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6514                _next_ordinal_to_read += 1;
6515                next_offset += envelope_size;
6516            }
6517
6518            let next_out_of_line = decoder.next_out_of_line();
6519            let handles_before = decoder.remaining_handles();
6520            if let Some((inlined, num_bytes, num_handles)) =
6521                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6522            {
6523                let member_inline_size =
6524                    <ResolvedInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6525                if inlined != (member_inline_size <= 4) {
6526                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6527                }
6528                let inner_offset;
6529                let mut inner_depth = depth.clone();
6530                if inlined {
6531                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6532                    inner_offset = next_offset;
6533                } else {
6534                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6535                    inner_depth.increment()?;
6536                }
6537                let val_ref =
6538                    self.resolved_info.get_or_insert_with(|| fidl::new_empty!(ResolvedInfo, D));
6539                fidl::decode!(ResolvedInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6540                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6541                {
6542                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6543                }
6544                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6545                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6546                }
6547            }
6548
6549            next_offset += envelope_size;
6550            _next_ordinal_to_read += 1;
6551            if next_offset >= end_offset {
6552                return Ok(());
6553            }
6554
6555            // Decode unknown envelopes for gaps in ordinals.
6556            while _next_ordinal_to_read < 5 {
6557                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6558                _next_ordinal_to_read += 1;
6559                next_offset += envelope_size;
6560            }
6561
6562            let next_out_of_line = decoder.next_out_of_line();
6563            let handles_before = decoder.remaining_handles();
6564            if let Some((inlined, num_bytes, num_handles)) =
6565                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6566            {
6567                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6568                if inlined != (member_inline_size <= 4) {
6569                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6570                }
6571                let inner_offset;
6572                let mut inner_depth = depth.clone();
6573                if inlined {
6574                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6575                    inner_offset = next_offset;
6576                } else {
6577                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6578                    inner_depth.increment()?;
6579                }
6580                let val_ref = self.environment.get_or_insert_with(|| {
6581                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6582                });
6583                fidl::decode!(
6584                    fidl::encoding::BoundedString<4096>,
6585                    D,
6586                    val_ref,
6587                    decoder,
6588                    inner_offset,
6589                    inner_depth
6590                )?;
6591                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6592                {
6593                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6594                }
6595                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6596                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6597                }
6598            }
6599
6600            next_offset += envelope_size;
6601
6602            // Decode the remaining unknown envelopes.
6603            while next_offset < end_offset {
6604                _next_ordinal_to_read += 1;
6605                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6606                next_offset += envelope_size;
6607            }
6608
6609            Ok(())
6610        }
6611    }
6612
6613    impl ResolvedInfo {
6614        #[inline(always)]
6615        fn max_ordinal_present(&self) -> u64 {
6616            if let Some(_) = self.execution_info {
6617                return 2;
6618            }
6619            if let Some(_) = self.resolved_url {
6620                return 1;
6621            }
6622            0
6623        }
6624    }
6625
6626    impl fidl::encoding::ValueTypeMarker for ResolvedInfo {
6627        type Borrowed<'a> = &'a Self;
6628        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6629            value
6630        }
6631    }
6632
6633    unsafe impl fidl::encoding::TypeMarker for ResolvedInfo {
6634        type Owned = Self;
6635
6636        #[inline(always)]
6637        fn inline_align(_context: fidl::encoding::Context) -> usize {
6638            8
6639        }
6640
6641        #[inline(always)]
6642        fn inline_size(_context: fidl::encoding::Context) -> usize {
6643            16
6644        }
6645    }
6646
6647    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResolvedInfo, D>
6648        for &ResolvedInfo
6649    {
6650        unsafe fn encode(
6651            self,
6652            encoder: &mut fidl::encoding::Encoder<'_, D>,
6653            offset: usize,
6654            mut depth: fidl::encoding::Depth,
6655        ) -> fidl::Result<()> {
6656            encoder.debug_check_bounds::<ResolvedInfo>(offset);
6657            // Vector header
6658            let max_ordinal: u64 = self.max_ordinal_present();
6659            encoder.write_num(max_ordinal, offset);
6660            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6661            // Calling encoder.out_of_line_offset(0) is not allowed.
6662            if max_ordinal == 0 {
6663                return Ok(());
6664            }
6665            depth.increment()?;
6666            let envelope_size = 8;
6667            let bytes_len = max_ordinal as usize * envelope_size;
6668            #[allow(unused_variables)]
6669            let offset = encoder.out_of_line_offset(bytes_len);
6670            let mut _prev_end_offset: usize = 0;
6671            if 1 > max_ordinal {
6672                return Ok(());
6673            }
6674
6675            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6676            // are envelope_size bytes.
6677            let cur_offset: usize = (1 - 1) * envelope_size;
6678
6679            // Zero reserved fields.
6680            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6681
6682            // Safety:
6683            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6684            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6685            //   envelope_size bytes, there is always sufficient room.
6686            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6687            self.resolved_url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6688            encoder, offset + cur_offset, depth
6689        )?;
6690
6691            _prev_end_offset = cur_offset + envelope_size;
6692            if 2 > max_ordinal {
6693                return Ok(());
6694            }
6695
6696            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6697            // are envelope_size bytes.
6698            let cur_offset: usize = (2 - 1) * envelope_size;
6699
6700            // Zero reserved fields.
6701            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6702
6703            // Safety:
6704            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6705            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6706            //   envelope_size bytes, there is always sufficient room.
6707            fidl::encoding::encode_in_envelope_optional::<ExecutionInfo, D>(
6708                self.execution_info
6709                    .as_ref()
6710                    .map(<ExecutionInfo as fidl::encoding::ValueTypeMarker>::borrow),
6711                encoder,
6712                offset + cur_offset,
6713                depth,
6714            )?;
6715
6716            _prev_end_offset = cur_offset + envelope_size;
6717
6718            Ok(())
6719        }
6720    }
6721
6722    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolvedInfo {
6723        #[inline(always)]
6724        fn new_empty() -> Self {
6725            Self::default()
6726        }
6727
6728        unsafe fn decode(
6729            &mut self,
6730            decoder: &mut fidl::encoding::Decoder<'_, D>,
6731            offset: usize,
6732            mut depth: fidl::encoding::Depth,
6733        ) -> fidl::Result<()> {
6734            decoder.debug_check_bounds::<Self>(offset);
6735            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6736                None => return Err(fidl::Error::NotNullable),
6737                Some(len) => len,
6738            };
6739            // Calling decoder.out_of_line_offset(0) is not allowed.
6740            if len == 0 {
6741                return Ok(());
6742            };
6743            depth.increment()?;
6744            let envelope_size = 8;
6745            let bytes_len = len * envelope_size;
6746            let offset = decoder.out_of_line_offset(bytes_len)?;
6747            // Decode the envelope for each type.
6748            let mut _next_ordinal_to_read = 0;
6749            let mut next_offset = offset;
6750            let end_offset = offset + bytes_len;
6751            _next_ordinal_to_read += 1;
6752            if next_offset >= end_offset {
6753                return Ok(());
6754            }
6755
6756            // Decode unknown envelopes for gaps in ordinals.
6757            while _next_ordinal_to_read < 1 {
6758                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6759                _next_ordinal_to_read += 1;
6760                next_offset += envelope_size;
6761            }
6762
6763            let next_out_of_line = decoder.next_out_of_line();
6764            let handles_before = decoder.remaining_handles();
6765            if let Some((inlined, num_bytes, num_handles)) =
6766                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6767            {
6768                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6769                if inlined != (member_inline_size <= 4) {
6770                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6771                }
6772                let inner_offset;
6773                let mut inner_depth = depth.clone();
6774                if inlined {
6775                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6776                    inner_offset = next_offset;
6777                } else {
6778                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6779                    inner_depth.increment()?;
6780                }
6781                let val_ref = self.resolved_url.get_or_insert_with(|| {
6782                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6783                });
6784                fidl::decode!(
6785                    fidl::encoding::BoundedString<4096>,
6786                    D,
6787                    val_ref,
6788                    decoder,
6789                    inner_offset,
6790                    inner_depth
6791                )?;
6792                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6793                {
6794                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6795                }
6796                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6797                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6798                }
6799            }
6800
6801            next_offset += envelope_size;
6802            _next_ordinal_to_read += 1;
6803            if next_offset >= end_offset {
6804                return Ok(());
6805            }
6806
6807            // Decode unknown envelopes for gaps in ordinals.
6808            while _next_ordinal_to_read < 2 {
6809                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6810                _next_ordinal_to_read += 1;
6811                next_offset += envelope_size;
6812            }
6813
6814            let next_out_of_line = decoder.next_out_of_line();
6815            let handles_before = decoder.remaining_handles();
6816            if let Some((inlined, num_bytes, num_handles)) =
6817                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6818            {
6819                let member_inline_size =
6820                    <ExecutionInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6821                if inlined != (member_inline_size <= 4) {
6822                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6823                }
6824                let inner_offset;
6825                let mut inner_depth = depth.clone();
6826                if inlined {
6827                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6828                    inner_offset = next_offset;
6829                } else {
6830                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6831                    inner_depth.increment()?;
6832                }
6833                let val_ref =
6834                    self.execution_info.get_or_insert_with(|| fidl::new_empty!(ExecutionInfo, D));
6835                fidl::decode!(ExecutionInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6836                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6837                {
6838                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6839                }
6840                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6841                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6842                }
6843            }
6844
6845            next_offset += envelope_size;
6846
6847            // Decode the remaining unknown envelopes.
6848            while next_offset < end_offset {
6849                _next_ordinal_to_read += 1;
6850                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6851                next_offset += envelope_size;
6852            }
6853
6854            Ok(())
6855        }
6856    }
6857
6858    impl RouteError {
6859        #[inline(always)]
6860        fn max_ordinal_present(&self) -> u64 {
6861            if let Some(_) = self.summary {
6862                return 1;
6863            }
6864            0
6865        }
6866    }
6867
6868    impl fidl::encoding::ValueTypeMarker for RouteError {
6869        type Borrowed<'a> = &'a Self;
6870        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6871            value
6872        }
6873    }
6874
6875    unsafe impl fidl::encoding::TypeMarker for RouteError {
6876        type Owned = Self;
6877
6878        #[inline(always)]
6879        fn inline_align(_context: fidl::encoding::Context) -> usize {
6880            8
6881        }
6882
6883        #[inline(always)]
6884        fn inline_size(_context: fidl::encoding::Context) -> usize {
6885            16
6886        }
6887    }
6888
6889    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteError, D>
6890        for &RouteError
6891    {
6892        unsafe fn encode(
6893            self,
6894            encoder: &mut fidl::encoding::Encoder<'_, D>,
6895            offset: usize,
6896            mut depth: fidl::encoding::Depth,
6897        ) -> fidl::Result<()> {
6898            encoder.debug_check_bounds::<RouteError>(offset);
6899            // Vector header
6900            let max_ordinal: u64 = self.max_ordinal_present();
6901            encoder.write_num(max_ordinal, offset);
6902            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6903            // Calling encoder.out_of_line_offset(0) is not allowed.
6904            if max_ordinal == 0 {
6905                return Ok(());
6906            }
6907            depth.increment()?;
6908            let envelope_size = 8;
6909            let bytes_len = max_ordinal as usize * envelope_size;
6910            #[allow(unused_variables)]
6911            let offset = encoder.out_of_line_offset(bytes_len);
6912            let mut _prev_end_offset: usize = 0;
6913            if 1 > max_ordinal {
6914                return Ok(());
6915            }
6916
6917            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6918            // are envelope_size bytes.
6919            let cur_offset: usize = (1 - 1) * envelope_size;
6920
6921            // Zero reserved fields.
6922            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6923
6924            // Safety:
6925            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6926            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6927            //   envelope_size bytes, there is always sufficient room.
6928            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
6929                self.summary.as_ref().map(
6930                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
6931                ),
6932                encoder,
6933                offset + cur_offset,
6934                depth,
6935            )?;
6936
6937            _prev_end_offset = cur_offset + envelope_size;
6938
6939            Ok(())
6940        }
6941    }
6942
6943    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteError {
6944        #[inline(always)]
6945        fn new_empty() -> Self {
6946            Self::default()
6947        }
6948
6949        unsafe fn decode(
6950            &mut self,
6951            decoder: &mut fidl::encoding::Decoder<'_, D>,
6952            offset: usize,
6953            mut depth: fidl::encoding::Depth,
6954        ) -> fidl::Result<()> {
6955            decoder.debug_check_bounds::<Self>(offset);
6956            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6957                None => return Err(fidl::Error::NotNullable),
6958                Some(len) => len,
6959            };
6960            // Calling decoder.out_of_line_offset(0) is not allowed.
6961            if len == 0 {
6962                return Ok(());
6963            };
6964            depth.increment()?;
6965            let envelope_size = 8;
6966            let bytes_len = len * envelope_size;
6967            let offset = decoder.out_of_line_offset(bytes_len)?;
6968            // Decode the envelope for each type.
6969            let mut _next_ordinal_to_read = 0;
6970            let mut next_offset = offset;
6971            let end_offset = offset + bytes_len;
6972            _next_ordinal_to_read += 1;
6973            if next_offset >= end_offset {
6974                return Ok(());
6975            }
6976
6977            // Decode unknown envelopes for gaps in ordinals.
6978            while _next_ordinal_to_read < 1 {
6979                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6980                _next_ordinal_to_read += 1;
6981                next_offset += envelope_size;
6982            }
6983
6984            let next_out_of_line = decoder.next_out_of_line();
6985            let handles_before = decoder.remaining_handles();
6986            if let Some((inlined, num_bytes, num_handles)) =
6987                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6988            {
6989                let member_inline_size =
6990                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
6991                        decoder.context,
6992                    );
6993                if inlined != (member_inline_size <= 4) {
6994                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6995                }
6996                let inner_offset;
6997                let mut inner_depth = depth.clone();
6998                if inlined {
6999                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7000                    inner_offset = next_offset;
7001                } else {
7002                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7003                    inner_depth.increment()?;
7004                }
7005                let val_ref = self
7006                    .summary
7007                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7008                fidl::decode!(
7009                    fidl::encoding::UnboundedString,
7010                    D,
7011                    val_ref,
7012                    decoder,
7013                    inner_offset,
7014                    inner_depth
7015                )?;
7016                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7017                {
7018                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7019                }
7020                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7021                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7022                }
7023            }
7024
7025            next_offset += envelope_size;
7026
7027            // Decode the remaining unknown envelopes.
7028            while next_offset < end_offset {
7029                _next_ordinal_to_read += 1;
7030                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7031                next_offset += envelope_size;
7032            }
7033
7034            Ok(())
7035        }
7036    }
7037
7038    impl RouteReport {
7039        #[inline(always)]
7040        fn max_ordinal_present(&self) -> u64 {
7041            if let Some(_) = self.dictionary_entries {
7042                return 8;
7043            }
7044            if let Some(_) = self.outcome {
7045                return 7;
7046            }
7047            if let Some(_) = self.availability {
7048                return 6;
7049            }
7050            if let Some(_) = self.service_instances {
7051                return 5;
7052            }
7053            if let Some(_) = self.source_moniker {
7054                return 4;
7055            }
7056            if let Some(_) = self.error {
7057                return 3;
7058            }
7059            if let Some(_) = self.decl_type {
7060                return 2;
7061            }
7062            if let Some(_) = self.capability {
7063                return 1;
7064            }
7065            0
7066        }
7067    }
7068
7069    impl fidl::encoding::ValueTypeMarker for RouteReport {
7070        type Borrowed<'a> = &'a Self;
7071        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7072            value
7073        }
7074    }
7075
7076    unsafe impl fidl::encoding::TypeMarker for RouteReport {
7077        type Owned = Self;
7078
7079        #[inline(always)]
7080        fn inline_align(_context: fidl::encoding::Context) -> usize {
7081            8
7082        }
7083
7084        #[inline(always)]
7085        fn inline_size(_context: fidl::encoding::Context) -> usize {
7086            16
7087        }
7088    }
7089
7090    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteReport, D>
7091        for &RouteReport
7092    {
7093        unsafe fn encode(
7094            self,
7095            encoder: &mut fidl::encoding::Encoder<'_, D>,
7096            offset: usize,
7097            mut depth: fidl::encoding::Depth,
7098        ) -> fidl::Result<()> {
7099            encoder.debug_check_bounds::<RouteReport>(offset);
7100            // Vector header
7101            let max_ordinal: u64 = self.max_ordinal_present();
7102            encoder.write_num(max_ordinal, offset);
7103            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7104            // Calling encoder.out_of_line_offset(0) is not allowed.
7105            if max_ordinal == 0 {
7106                return Ok(());
7107            }
7108            depth.increment()?;
7109            let envelope_size = 8;
7110            let bytes_len = max_ordinal as usize * envelope_size;
7111            #[allow(unused_variables)]
7112            let offset = encoder.out_of_line_offset(bytes_len);
7113            let mut _prev_end_offset: usize = 0;
7114            if 1 > max_ordinal {
7115                return Ok(());
7116            }
7117
7118            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7119            // are envelope_size bytes.
7120            let cur_offset: usize = (1 - 1) * envelope_size;
7121
7122            // Zero reserved fields.
7123            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7124
7125            // Safety:
7126            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7127            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7128            //   envelope_size bytes, there is always sufficient room.
7129            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7130                self.capability.as_ref().map(
7131                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7132                ),
7133                encoder,
7134                offset + cur_offset,
7135                depth,
7136            )?;
7137
7138            _prev_end_offset = cur_offset + envelope_size;
7139            if 2 > max_ordinal {
7140                return Ok(());
7141            }
7142
7143            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7144            // are envelope_size bytes.
7145            let cur_offset: usize = (2 - 1) * envelope_size;
7146
7147            // Zero reserved fields.
7148            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7149
7150            // Safety:
7151            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7152            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7153            //   envelope_size bytes, there is always sufficient room.
7154            fidl::encoding::encode_in_envelope_optional::<DeclType, D>(
7155                self.decl_type.as_ref().map(<DeclType as fidl::encoding::ValueTypeMarker>::borrow),
7156                encoder,
7157                offset + cur_offset,
7158                depth,
7159            )?;
7160
7161            _prev_end_offset = cur_offset + envelope_size;
7162            if 3 > max_ordinal {
7163                return Ok(());
7164            }
7165
7166            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7167            // are envelope_size bytes.
7168            let cur_offset: usize = (3 - 1) * envelope_size;
7169
7170            // Zero reserved fields.
7171            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7172
7173            // Safety:
7174            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7175            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7176            //   envelope_size bytes, there is always sufficient room.
7177            fidl::encoding::encode_in_envelope_optional::<RouteError, D>(
7178                self.error.as_ref().map(<RouteError as fidl::encoding::ValueTypeMarker>::borrow),
7179                encoder,
7180                offset + cur_offset,
7181                depth,
7182            )?;
7183
7184            _prev_end_offset = cur_offset + envelope_size;
7185            if 4 > max_ordinal {
7186                return Ok(());
7187            }
7188
7189            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7190            // are envelope_size bytes.
7191            let cur_offset: usize = (4 - 1) * envelope_size;
7192
7193            // Zero reserved fields.
7194            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7195
7196            // Safety:
7197            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7198            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7199            //   envelope_size bytes, there is always sufficient room.
7200            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7201                self.source_moniker.as_ref().map(
7202                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7203                ),
7204                encoder,
7205                offset + cur_offset,
7206                depth,
7207            )?;
7208
7209            _prev_end_offset = cur_offset + envelope_size;
7210            if 5 > max_ordinal {
7211                return Ok(());
7212            }
7213
7214            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7215            // are envelope_size bytes.
7216            let cur_offset: usize = (5 - 1) * envelope_size;
7217
7218            // Zero reserved fields.
7219            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7220
7221            // Safety:
7222            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7223            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7224            //   envelope_size bytes, there is always sufficient room.
7225            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<ServiceInstance>, D>(
7226            self.service_instances.as_ref().map(<fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::ValueTypeMarker>::borrow),
7227            encoder, offset + cur_offset, depth
7228        )?;
7229
7230            _prev_end_offset = cur_offset + envelope_size;
7231            if 6 > max_ordinal {
7232                return Ok(());
7233            }
7234
7235            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7236            // are envelope_size bytes.
7237            let cur_offset: usize = (6 - 1) * envelope_size;
7238
7239            // Zero reserved fields.
7240            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7241
7242            // Safety:
7243            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7244            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7245            //   envelope_size bytes, there is always sufficient room.
7246            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_component_decl__common::Availability, D>(
7247            self.availability.as_ref().map(<fidl_fuchsia_component_decl__common::Availability as fidl::encoding::ValueTypeMarker>::borrow),
7248            encoder, offset + cur_offset, depth
7249        )?;
7250
7251            _prev_end_offset = cur_offset + envelope_size;
7252            if 7 > max_ordinal {
7253                return Ok(());
7254            }
7255
7256            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7257            // are envelope_size bytes.
7258            let cur_offset: usize = (7 - 1) * envelope_size;
7259
7260            // Zero reserved fields.
7261            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7262
7263            // Safety:
7264            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7265            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7266            //   envelope_size bytes, there is always sufficient room.
7267            fidl::encoding::encode_in_envelope_optional::<RouteOutcome, D>(
7268                self.outcome
7269                    .as_ref()
7270                    .map(<RouteOutcome as fidl::encoding::ValueTypeMarker>::borrow),
7271                encoder,
7272                offset + cur_offset,
7273                depth,
7274            )?;
7275
7276            _prev_end_offset = cur_offset + envelope_size;
7277            if 8 > max_ordinal {
7278                return Ok(());
7279            }
7280
7281            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7282            // are envelope_size bytes.
7283            let cur_offset: usize = (8 - 1) * envelope_size;
7284
7285            // Zero reserved fields.
7286            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7287
7288            // Safety:
7289            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7290            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7291            //   envelope_size bytes, there is always sufficient room.
7292            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<DictionaryEntry>, D>(
7293            self.dictionary_entries.as_ref().map(<fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::ValueTypeMarker>::borrow),
7294            encoder, offset + cur_offset, depth
7295        )?;
7296
7297            _prev_end_offset = cur_offset + envelope_size;
7298
7299            Ok(())
7300        }
7301    }
7302
7303    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteReport {
7304        #[inline(always)]
7305        fn new_empty() -> Self {
7306            Self::default()
7307        }
7308
7309        unsafe fn decode(
7310            &mut self,
7311            decoder: &mut fidl::encoding::Decoder<'_, D>,
7312            offset: usize,
7313            mut depth: fidl::encoding::Depth,
7314        ) -> fidl::Result<()> {
7315            decoder.debug_check_bounds::<Self>(offset);
7316            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7317                None => return Err(fidl::Error::NotNullable),
7318                Some(len) => len,
7319            };
7320            // Calling decoder.out_of_line_offset(0) is not allowed.
7321            if len == 0 {
7322                return Ok(());
7323            };
7324            depth.increment()?;
7325            let envelope_size = 8;
7326            let bytes_len = len * envelope_size;
7327            let offset = decoder.out_of_line_offset(bytes_len)?;
7328            // Decode the envelope for each type.
7329            let mut _next_ordinal_to_read = 0;
7330            let mut next_offset = offset;
7331            let end_offset = offset + bytes_len;
7332            _next_ordinal_to_read += 1;
7333            if next_offset >= end_offset {
7334                return Ok(());
7335            }
7336
7337            // Decode unknown envelopes for gaps in ordinals.
7338            while _next_ordinal_to_read < 1 {
7339                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7340                _next_ordinal_to_read += 1;
7341                next_offset += envelope_size;
7342            }
7343
7344            let next_out_of_line = decoder.next_out_of_line();
7345            let handles_before = decoder.remaining_handles();
7346            if let Some((inlined, num_bytes, num_handles)) =
7347                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7348            {
7349                let member_inline_size =
7350                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7351                        decoder.context,
7352                    );
7353                if inlined != (member_inline_size <= 4) {
7354                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7355                }
7356                let inner_offset;
7357                let mut inner_depth = depth.clone();
7358                if inlined {
7359                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7360                    inner_offset = next_offset;
7361                } else {
7362                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7363                    inner_depth.increment()?;
7364                }
7365                let val_ref = self
7366                    .capability
7367                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7368                fidl::decode!(
7369                    fidl::encoding::UnboundedString,
7370                    D,
7371                    val_ref,
7372                    decoder,
7373                    inner_offset,
7374                    inner_depth
7375                )?;
7376                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7377                {
7378                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7379                }
7380                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7381                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7382                }
7383            }
7384
7385            next_offset += envelope_size;
7386            _next_ordinal_to_read += 1;
7387            if next_offset >= end_offset {
7388                return Ok(());
7389            }
7390
7391            // Decode unknown envelopes for gaps in ordinals.
7392            while _next_ordinal_to_read < 2 {
7393                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7394                _next_ordinal_to_read += 1;
7395                next_offset += envelope_size;
7396            }
7397
7398            let next_out_of_line = decoder.next_out_of_line();
7399            let handles_before = decoder.remaining_handles();
7400            if let Some((inlined, num_bytes, num_handles)) =
7401                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7402            {
7403                let member_inline_size =
7404                    <DeclType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7405                if inlined != (member_inline_size <= 4) {
7406                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7407                }
7408                let inner_offset;
7409                let mut inner_depth = depth.clone();
7410                if inlined {
7411                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7412                    inner_offset = next_offset;
7413                } else {
7414                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7415                    inner_depth.increment()?;
7416                }
7417                let val_ref = self.decl_type.get_or_insert_with(|| fidl::new_empty!(DeclType, D));
7418                fidl::decode!(DeclType, D, val_ref, decoder, inner_offset, inner_depth)?;
7419                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7420                {
7421                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7422                }
7423                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7424                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7425                }
7426            }
7427
7428            next_offset += envelope_size;
7429            _next_ordinal_to_read += 1;
7430            if next_offset >= end_offset {
7431                return Ok(());
7432            }
7433
7434            // Decode unknown envelopes for gaps in ordinals.
7435            while _next_ordinal_to_read < 3 {
7436                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7437                _next_ordinal_to_read += 1;
7438                next_offset += envelope_size;
7439            }
7440
7441            let next_out_of_line = decoder.next_out_of_line();
7442            let handles_before = decoder.remaining_handles();
7443            if let Some((inlined, num_bytes, num_handles)) =
7444                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7445            {
7446                let member_inline_size =
7447                    <RouteError as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7448                if inlined != (member_inline_size <= 4) {
7449                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7450                }
7451                let inner_offset;
7452                let mut inner_depth = depth.clone();
7453                if inlined {
7454                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7455                    inner_offset = next_offset;
7456                } else {
7457                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7458                    inner_depth.increment()?;
7459                }
7460                let val_ref = self.error.get_or_insert_with(|| fidl::new_empty!(RouteError, D));
7461                fidl::decode!(RouteError, D, val_ref, decoder, inner_offset, inner_depth)?;
7462                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7463                {
7464                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7465                }
7466                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7467                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7468                }
7469            }
7470
7471            next_offset += envelope_size;
7472            _next_ordinal_to_read += 1;
7473            if next_offset >= end_offset {
7474                return Ok(());
7475            }
7476
7477            // Decode unknown envelopes for gaps in ordinals.
7478            while _next_ordinal_to_read < 4 {
7479                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7480                _next_ordinal_to_read += 1;
7481                next_offset += envelope_size;
7482            }
7483
7484            let next_out_of_line = decoder.next_out_of_line();
7485            let handles_before = decoder.remaining_handles();
7486            if let Some((inlined, num_bytes, num_handles)) =
7487                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7488            {
7489                let member_inline_size =
7490                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7491                        decoder.context,
7492                    );
7493                if inlined != (member_inline_size <= 4) {
7494                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7495                }
7496                let inner_offset;
7497                let mut inner_depth = depth.clone();
7498                if inlined {
7499                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7500                    inner_offset = next_offset;
7501                } else {
7502                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7503                    inner_depth.increment()?;
7504                }
7505                let val_ref = self
7506                    .source_moniker
7507                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7508                fidl::decode!(
7509                    fidl::encoding::UnboundedString,
7510                    D,
7511                    val_ref,
7512                    decoder,
7513                    inner_offset,
7514                    inner_depth
7515                )?;
7516                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7517                {
7518                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7519                }
7520                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7521                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7522                }
7523            }
7524
7525            next_offset += envelope_size;
7526            _next_ordinal_to_read += 1;
7527            if next_offset >= end_offset {
7528                return Ok(());
7529            }
7530
7531            // Decode unknown envelopes for gaps in ordinals.
7532            while _next_ordinal_to_read < 5 {
7533                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7534                _next_ordinal_to_read += 1;
7535                next_offset += envelope_size;
7536            }
7537
7538            let next_out_of_line = decoder.next_out_of_line();
7539            let handles_before = decoder.remaining_handles();
7540            if let Some((inlined, num_bytes, num_handles)) =
7541                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7542            {
7543                let member_inline_size = <fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7544                if inlined != (member_inline_size <= 4) {
7545                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7546                }
7547                let inner_offset;
7548                let mut inner_depth = depth.clone();
7549                if inlined {
7550                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7551                    inner_offset = next_offset;
7552                } else {
7553                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7554                    inner_depth.increment()?;
7555                }
7556                let val_ref = self.service_instances.get_or_insert_with(|| {
7557                    fidl::new_empty!(fidl::encoding::UnboundedVector<ServiceInstance>, D)
7558                });
7559                fidl::decode!(
7560                    fidl::encoding::UnboundedVector<ServiceInstance>,
7561                    D,
7562                    val_ref,
7563                    decoder,
7564                    inner_offset,
7565                    inner_depth
7566                )?;
7567                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7568                {
7569                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7570                }
7571                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7572                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7573                }
7574            }
7575
7576            next_offset += envelope_size;
7577            _next_ordinal_to_read += 1;
7578            if next_offset >= end_offset {
7579                return Ok(());
7580            }
7581
7582            // Decode unknown envelopes for gaps in ordinals.
7583            while _next_ordinal_to_read < 6 {
7584                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7585                _next_ordinal_to_read += 1;
7586                next_offset += envelope_size;
7587            }
7588
7589            let next_out_of_line = decoder.next_out_of_line();
7590            let handles_before = decoder.remaining_handles();
7591            if let Some((inlined, num_bytes, num_handles)) =
7592                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7593            {
7594                let member_inline_size = <fidl_fuchsia_component_decl__common::Availability as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7595                if inlined != (member_inline_size <= 4) {
7596                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7597                }
7598                let inner_offset;
7599                let mut inner_depth = depth.clone();
7600                if inlined {
7601                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7602                    inner_offset = next_offset;
7603                } else {
7604                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7605                    inner_depth.increment()?;
7606                }
7607                let val_ref = self.availability.get_or_insert_with(|| {
7608                    fidl::new_empty!(fidl_fuchsia_component_decl__common::Availability, D)
7609                });
7610                fidl::decode!(
7611                    fidl_fuchsia_component_decl__common::Availability,
7612                    D,
7613                    val_ref,
7614                    decoder,
7615                    inner_offset,
7616                    inner_depth
7617                )?;
7618                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7619                {
7620                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7621                }
7622                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7623                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7624                }
7625            }
7626
7627            next_offset += envelope_size;
7628            _next_ordinal_to_read += 1;
7629            if next_offset >= end_offset {
7630                return Ok(());
7631            }
7632
7633            // Decode unknown envelopes for gaps in ordinals.
7634            while _next_ordinal_to_read < 7 {
7635                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7636                _next_ordinal_to_read += 1;
7637                next_offset += envelope_size;
7638            }
7639
7640            let next_out_of_line = decoder.next_out_of_line();
7641            let handles_before = decoder.remaining_handles();
7642            if let Some((inlined, num_bytes, num_handles)) =
7643                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7644            {
7645                let member_inline_size =
7646                    <RouteOutcome as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7647                if inlined != (member_inline_size <= 4) {
7648                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7649                }
7650                let inner_offset;
7651                let mut inner_depth = depth.clone();
7652                if inlined {
7653                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7654                    inner_offset = next_offset;
7655                } else {
7656                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7657                    inner_depth.increment()?;
7658                }
7659                let val_ref = self.outcome.get_or_insert_with(|| fidl::new_empty!(RouteOutcome, D));
7660                fidl::decode!(RouteOutcome, D, val_ref, decoder, inner_offset, inner_depth)?;
7661                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7662                {
7663                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7664                }
7665                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7666                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7667                }
7668            }
7669
7670            next_offset += envelope_size;
7671            _next_ordinal_to_read += 1;
7672            if next_offset >= end_offset {
7673                return Ok(());
7674            }
7675
7676            // Decode unknown envelopes for gaps in ordinals.
7677            while _next_ordinal_to_read < 8 {
7678                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7679                _next_ordinal_to_read += 1;
7680                next_offset += envelope_size;
7681            }
7682
7683            let next_out_of_line = decoder.next_out_of_line();
7684            let handles_before = decoder.remaining_handles();
7685            if let Some((inlined, num_bytes, num_handles)) =
7686                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7687            {
7688                let member_inline_size = <fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7689                if inlined != (member_inline_size <= 4) {
7690                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7691                }
7692                let inner_offset;
7693                let mut inner_depth = depth.clone();
7694                if inlined {
7695                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7696                    inner_offset = next_offset;
7697                } else {
7698                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7699                    inner_depth.increment()?;
7700                }
7701                let val_ref = self.dictionary_entries.get_or_insert_with(|| {
7702                    fidl::new_empty!(fidl::encoding::UnboundedVector<DictionaryEntry>, D)
7703                });
7704                fidl::decode!(
7705                    fidl::encoding::UnboundedVector<DictionaryEntry>,
7706                    D,
7707                    val_ref,
7708                    decoder,
7709                    inner_offset,
7710                    inner_depth
7711                )?;
7712                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7713                {
7714                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7715                }
7716                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7717                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7718                }
7719            }
7720
7721            next_offset += envelope_size;
7722
7723            // Decode the remaining unknown envelopes.
7724            while next_offset < end_offset {
7725                _next_ordinal_to_read += 1;
7726                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7727                next_offset += envelope_size;
7728            }
7729
7730            Ok(())
7731        }
7732    }
7733
7734    impl ServiceInstance {
7735        #[inline(always)]
7736        fn max_ordinal_present(&self) -> u64 {
7737            if let Some(_) = self.child_instance_name {
7738                return 3;
7739            }
7740            if let Some(_) = self.child_name {
7741                return 2;
7742            }
7743            if let Some(_) = self.instance_name {
7744                return 1;
7745            }
7746            0
7747        }
7748    }
7749
7750    impl fidl::encoding::ValueTypeMarker for ServiceInstance {
7751        type Borrowed<'a> = &'a Self;
7752        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7753            value
7754        }
7755    }
7756
7757    unsafe impl fidl::encoding::TypeMarker for ServiceInstance {
7758        type Owned = Self;
7759
7760        #[inline(always)]
7761        fn inline_align(_context: fidl::encoding::Context) -> usize {
7762            8
7763        }
7764
7765        #[inline(always)]
7766        fn inline_size(_context: fidl::encoding::Context) -> usize {
7767            16
7768        }
7769    }
7770
7771    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServiceInstance, D>
7772        for &ServiceInstance
7773    {
7774        unsafe fn encode(
7775            self,
7776            encoder: &mut fidl::encoding::Encoder<'_, D>,
7777            offset: usize,
7778            mut depth: fidl::encoding::Depth,
7779        ) -> fidl::Result<()> {
7780            encoder.debug_check_bounds::<ServiceInstance>(offset);
7781            // Vector header
7782            let max_ordinal: u64 = self.max_ordinal_present();
7783            encoder.write_num(max_ordinal, offset);
7784            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7785            // Calling encoder.out_of_line_offset(0) is not allowed.
7786            if max_ordinal == 0 {
7787                return Ok(());
7788            }
7789            depth.increment()?;
7790            let envelope_size = 8;
7791            let bytes_len = max_ordinal as usize * envelope_size;
7792            #[allow(unused_variables)]
7793            let offset = encoder.out_of_line_offset(bytes_len);
7794            let mut _prev_end_offset: usize = 0;
7795            if 1 > max_ordinal {
7796                return Ok(());
7797            }
7798
7799            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7800            // are envelope_size bytes.
7801            let cur_offset: usize = (1 - 1) * envelope_size;
7802
7803            // Zero reserved fields.
7804            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7805
7806            // Safety:
7807            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7808            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7809            //   envelope_size bytes, there is always sufficient room.
7810            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7811                self.instance_name.as_ref().map(
7812                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7813                ),
7814                encoder,
7815                offset + cur_offset,
7816                depth,
7817            )?;
7818
7819            _prev_end_offset = cur_offset + envelope_size;
7820            if 2 > max_ordinal {
7821                return Ok(());
7822            }
7823
7824            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7825            // are envelope_size bytes.
7826            let cur_offset: usize = (2 - 1) * envelope_size;
7827
7828            // Zero reserved fields.
7829            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7830
7831            // Safety:
7832            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7833            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7834            //   envelope_size bytes, there is always sufficient room.
7835            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7836                self.child_name.as_ref().map(
7837                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7838                ),
7839                encoder,
7840                offset + cur_offset,
7841                depth,
7842            )?;
7843
7844            _prev_end_offset = cur_offset + envelope_size;
7845            if 3 > max_ordinal {
7846                return Ok(());
7847            }
7848
7849            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7850            // are envelope_size bytes.
7851            let cur_offset: usize = (3 - 1) * envelope_size;
7852
7853            // Zero reserved fields.
7854            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7855
7856            // Safety:
7857            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7858            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7859            //   envelope_size bytes, there is always sufficient room.
7860            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7861                self.child_instance_name.as_ref().map(
7862                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7863                ),
7864                encoder,
7865                offset + cur_offset,
7866                depth,
7867            )?;
7868
7869            _prev_end_offset = cur_offset + envelope_size;
7870
7871            Ok(())
7872        }
7873    }
7874
7875    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServiceInstance {
7876        #[inline(always)]
7877        fn new_empty() -> Self {
7878            Self::default()
7879        }
7880
7881        unsafe fn decode(
7882            &mut self,
7883            decoder: &mut fidl::encoding::Decoder<'_, D>,
7884            offset: usize,
7885            mut depth: fidl::encoding::Depth,
7886        ) -> fidl::Result<()> {
7887            decoder.debug_check_bounds::<Self>(offset);
7888            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7889                None => return Err(fidl::Error::NotNullable),
7890                Some(len) => len,
7891            };
7892            // Calling decoder.out_of_line_offset(0) is not allowed.
7893            if len == 0 {
7894                return Ok(());
7895            };
7896            depth.increment()?;
7897            let envelope_size = 8;
7898            let bytes_len = len * envelope_size;
7899            let offset = decoder.out_of_line_offset(bytes_len)?;
7900            // Decode the envelope for each type.
7901            let mut _next_ordinal_to_read = 0;
7902            let mut next_offset = offset;
7903            let end_offset = offset + bytes_len;
7904            _next_ordinal_to_read += 1;
7905            if next_offset >= end_offset {
7906                return Ok(());
7907            }
7908
7909            // Decode unknown envelopes for gaps in ordinals.
7910            while _next_ordinal_to_read < 1 {
7911                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7912                _next_ordinal_to_read += 1;
7913                next_offset += envelope_size;
7914            }
7915
7916            let next_out_of_line = decoder.next_out_of_line();
7917            let handles_before = decoder.remaining_handles();
7918            if let Some((inlined, num_bytes, num_handles)) =
7919                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7920            {
7921                let member_inline_size =
7922                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7923                        decoder.context,
7924                    );
7925                if inlined != (member_inline_size <= 4) {
7926                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7927                }
7928                let inner_offset;
7929                let mut inner_depth = depth.clone();
7930                if inlined {
7931                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7932                    inner_offset = next_offset;
7933                } else {
7934                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7935                    inner_depth.increment()?;
7936                }
7937                let val_ref = self
7938                    .instance_name
7939                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7940                fidl::decode!(
7941                    fidl::encoding::UnboundedString,
7942                    D,
7943                    val_ref,
7944                    decoder,
7945                    inner_offset,
7946                    inner_depth
7947                )?;
7948                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7949                {
7950                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7951                }
7952                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7953                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7954                }
7955            }
7956
7957            next_offset += envelope_size;
7958            _next_ordinal_to_read += 1;
7959            if next_offset >= end_offset {
7960                return Ok(());
7961            }
7962
7963            // Decode unknown envelopes for gaps in ordinals.
7964            while _next_ordinal_to_read < 2 {
7965                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7966                _next_ordinal_to_read += 1;
7967                next_offset += envelope_size;
7968            }
7969
7970            let next_out_of_line = decoder.next_out_of_line();
7971            let handles_before = decoder.remaining_handles();
7972            if let Some((inlined, num_bytes, num_handles)) =
7973                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7974            {
7975                let member_inline_size =
7976                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7977                        decoder.context,
7978                    );
7979                if inlined != (member_inline_size <= 4) {
7980                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7981                }
7982                let inner_offset;
7983                let mut inner_depth = depth.clone();
7984                if inlined {
7985                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7986                    inner_offset = next_offset;
7987                } else {
7988                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7989                    inner_depth.increment()?;
7990                }
7991                let val_ref = self
7992                    .child_name
7993                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7994                fidl::decode!(
7995                    fidl::encoding::UnboundedString,
7996                    D,
7997                    val_ref,
7998                    decoder,
7999                    inner_offset,
8000                    inner_depth
8001                )?;
8002                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8003                {
8004                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8005                }
8006                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8007                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8008                }
8009            }
8010
8011            next_offset += envelope_size;
8012            _next_ordinal_to_read += 1;
8013            if next_offset >= end_offset {
8014                return Ok(());
8015            }
8016
8017            // Decode unknown envelopes for gaps in ordinals.
8018            while _next_ordinal_to_read < 3 {
8019                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8020                _next_ordinal_to_read += 1;
8021                next_offset += envelope_size;
8022            }
8023
8024            let next_out_of_line = decoder.next_out_of_line();
8025            let handles_before = decoder.remaining_handles();
8026            if let Some((inlined, num_bytes, num_handles)) =
8027                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8028            {
8029                let member_inline_size =
8030                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8031                        decoder.context,
8032                    );
8033                if inlined != (member_inline_size <= 4) {
8034                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8035                }
8036                let inner_offset;
8037                let mut inner_depth = depth.clone();
8038                if inlined {
8039                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8040                    inner_offset = next_offset;
8041                } else {
8042                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8043                    inner_depth.increment()?;
8044                }
8045                let val_ref = self
8046                    .child_instance_name
8047                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8048                fidl::decode!(
8049                    fidl::encoding::UnboundedString,
8050                    D,
8051                    val_ref,
8052                    decoder,
8053                    inner_offset,
8054                    inner_depth
8055                )?;
8056                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8057                {
8058                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8059                }
8060                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8061                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8062                }
8063            }
8064
8065            next_offset += envelope_size;
8066
8067            // Decode the remaining unknown envelopes.
8068            while next_offset < end_offset {
8069                _next_ordinal_to_read += 1;
8070                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8071                next_offset += envelope_size;
8072            }
8073
8074            Ok(())
8075        }
8076    }
8077
8078    impl StorageStatus {
8079        #[inline(always)]
8080        fn max_ordinal_present(&self) -> u64 {
8081            if let Some(_) = self.used_size {
8082                return 2;
8083            }
8084            if let Some(_) = self.total_size {
8085                return 1;
8086            }
8087            0
8088        }
8089    }
8090
8091    impl fidl::encoding::ValueTypeMarker for StorageStatus {
8092        type Borrowed<'a> = &'a Self;
8093        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8094            value
8095        }
8096    }
8097
8098    unsafe impl fidl::encoding::TypeMarker for StorageStatus {
8099        type Owned = Self;
8100
8101        #[inline(always)]
8102        fn inline_align(_context: fidl::encoding::Context) -> usize {
8103            8
8104        }
8105
8106        #[inline(always)]
8107        fn inline_size(_context: fidl::encoding::Context) -> usize {
8108            16
8109        }
8110    }
8111
8112    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StorageStatus, D>
8113        for &StorageStatus
8114    {
8115        unsafe fn encode(
8116            self,
8117            encoder: &mut fidl::encoding::Encoder<'_, D>,
8118            offset: usize,
8119            mut depth: fidl::encoding::Depth,
8120        ) -> fidl::Result<()> {
8121            encoder.debug_check_bounds::<StorageStatus>(offset);
8122            // Vector header
8123            let max_ordinal: u64 = self.max_ordinal_present();
8124            encoder.write_num(max_ordinal, offset);
8125            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8126            // Calling encoder.out_of_line_offset(0) is not allowed.
8127            if max_ordinal == 0 {
8128                return Ok(());
8129            }
8130            depth.increment()?;
8131            let envelope_size = 8;
8132            let bytes_len = max_ordinal as usize * envelope_size;
8133            #[allow(unused_variables)]
8134            let offset = encoder.out_of_line_offset(bytes_len);
8135            let mut _prev_end_offset: usize = 0;
8136            if 1 > max_ordinal {
8137                return Ok(());
8138            }
8139
8140            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8141            // are envelope_size bytes.
8142            let cur_offset: usize = (1 - 1) * envelope_size;
8143
8144            // Zero reserved fields.
8145            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8146
8147            // Safety:
8148            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8149            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8150            //   envelope_size bytes, there is always sufficient room.
8151            fidl::encoding::encode_in_envelope_optional::<u64, D>(
8152                self.total_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8153                encoder,
8154                offset + cur_offset,
8155                depth,
8156            )?;
8157
8158            _prev_end_offset = cur_offset + envelope_size;
8159            if 2 > max_ordinal {
8160                return Ok(());
8161            }
8162
8163            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8164            // are envelope_size bytes.
8165            let cur_offset: usize = (2 - 1) * envelope_size;
8166
8167            // Zero reserved fields.
8168            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8169
8170            // Safety:
8171            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8172            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8173            //   envelope_size bytes, there is always sufficient room.
8174            fidl::encoding::encode_in_envelope_optional::<u64, D>(
8175                self.used_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8176                encoder,
8177                offset + cur_offset,
8178                depth,
8179            )?;
8180
8181            _prev_end_offset = cur_offset + envelope_size;
8182
8183            Ok(())
8184        }
8185    }
8186
8187    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StorageStatus {
8188        #[inline(always)]
8189        fn new_empty() -> Self {
8190            Self::default()
8191        }
8192
8193        unsafe fn decode(
8194            &mut self,
8195            decoder: &mut fidl::encoding::Decoder<'_, D>,
8196            offset: usize,
8197            mut depth: fidl::encoding::Depth,
8198        ) -> fidl::Result<()> {
8199            decoder.debug_check_bounds::<Self>(offset);
8200            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8201                None => return Err(fidl::Error::NotNullable),
8202                Some(len) => len,
8203            };
8204            // Calling decoder.out_of_line_offset(0) is not allowed.
8205            if len == 0 {
8206                return Ok(());
8207            };
8208            depth.increment()?;
8209            let envelope_size = 8;
8210            let bytes_len = len * envelope_size;
8211            let offset = decoder.out_of_line_offset(bytes_len)?;
8212            // Decode the envelope for each type.
8213            let mut _next_ordinal_to_read = 0;
8214            let mut next_offset = offset;
8215            let end_offset = offset + bytes_len;
8216            _next_ordinal_to_read += 1;
8217            if next_offset >= end_offset {
8218                return Ok(());
8219            }
8220
8221            // Decode unknown envelopes for gaps in ordinals.
8222            while _next_ordinal_to_read < 1 {
8223                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8224                _next_ordinal_to_read += 1;
8225                next_offset += envelope_size;
8226            }
8227
8228            let next_out_of_line = decoder.next_out_of_line();
8229            let handles_before = decoder.remaining_handles();
8230            if let Some((inlined, num_bytes, num_handles)) =
8231                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8232            {
8233                let member_inline_size =
8234                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8235                if inlined != (member_inline_size <= 4) {
8236                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8237                }
8238                let inner_offset;
8239                let mut inner_depth = depth.clone();
8240                if inlined {
8241                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8242                    inner_offset = next_offset;
8243                } else {
8244                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8245                    inner_depth.increment()?;
8246                }
8247                let val_ref = self.total_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8248                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8249                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8250                {
8251                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8252                }
8253                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8254                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8255                }
8256            }
8257
8258            next_offset += envelope_size;
8259            _next_ordinal_to_read += 1;
8260            if next_offset >= end_offset {
8261                return Ok(());
8262            }
8263
8264            // Decode unknown envelopes for gaps in ordinals.
8265            while _next_ordinal_to_read < 2 {
8266                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8267                _next_ordinal_to_read += 1;
8268                next_offset += envelope_size;
8269            }
8270
8271            let next_out_of_line = decoder.next_out_of_line();
8272            let handles_before = decoder.remaining_handles();
8273            if let Some((inlined, num_bytes, num_handles)) =
8274                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8275            {
8276                let member_inline_size =
8277                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8278                if inlined != (member_inline_size <= 4) {
8279                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8280                }
8281                let inner_offset;
8282                let mut inner_depth = depth.clone();
8283                if inlined {
8284                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8285                    inner_offset = next_offset;
8286                } else {
8287                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8288                    inner_depth.increment()?;
8289                }
8290                let val_ref = self.used_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8291                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8292                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8293                {
8294                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8295                }
8296                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8297                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8298                }
8299            }
8300
8301            next_offset += envelope_size;
8302
8303            // Decode the remaining unknown envelopes.
8304            while next_offset < end_offset {
8305                _next_ordinal_to_read += 1;
8306                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8307                next_offset += envelope_size;
8308            }
8309
8310            Ok(())
8311        }
8312    }
8313
8314    impl fidl::encoding::ValueTypeMarker for ChildLocation {
8315        type Borrowed<'a> = &'a Self;
8316        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8317            value
8318        }
8319    }
8320
8321    unsafe impl fidl::encoding::TypeMarker for ChildLocation {
8322        type Owned = Self;
8323
8324        #[inline(always)]
8325        fn inline_align(_context: fidl::encoding::Context) -> usize {
8326            8
8327        }
8328
8329        #[inline(always)]
8330        fn inline_size(_context: fidl::encoding::Context) -> usize {
8331            16
8332        }
8333    }
8334
8335    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ChildLocation, D>
8336        for &ChildLocation
8337    {
8338        #[inline]
8339        unsafe fn encode(
8340            self,
8341            encoder: &mut fidl::encoding::Encoder<'_, D>,
8342            offset: usize,
8343            _depth: fidl::encoding::Depth,
8344        ) -> fidl::Result<()> {
8345            encoder.debug_check_bounds::<ChildLocation>(offset);
8346            encoder.write_num::<u64>(self.ordinal(), offset);
8347            match self {
8348                ChildLocation::Collection(ref val) => fidl::encoding::encode_in_envelope::<
8349                    fidl::encoding::BoundedString<255>,
8350                    D,
8351                >(
8352                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
8353                        val,
8354                    ),
8355                    encoder,
8356                    offset + 8,
8357                    _depth,
8358                ),
8359                ChildLocation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
8360            }
8361        }
8362    }
8363
8364    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ChildLocation {
8365        #[inline(always)]
8366        fn new_empty() -> Self {
8367            Self::__SourceBreaking { unknown_ordinal: 0 }
8368        }
8369
8370        #[inline]
8371        unsafe fn decode(
8372            &mut self,
8373            decoder: &mut fidl::encoding::Decoder<'_, D>,
8374            offset: usize,
8375            mut depth: fidl::encoding::Depth,
8376        ) -> fidl::Result<()> {
8377            decoder.debug_check_bounds::<Self>(offset);
8378            #[allow(unused_variables)]
8379            let next_out_of_line = decoder.next_out_of_line();
8380            let handles_before = decoder.remaining_handles();
8381            let (ordinal, inlined, num_bytes, num_handles) =
8382                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
8383
8384            let member_inline_size = match ordinal {
8385                1 => {
8386                    <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
8387                        decoder.context,
8388                    )
8389                }
8390                0 => return Err(fidl::Error::UnknownUnionTag),
8391                _ => num_bytes as usize,
8392            };
8393
8394            if inlined != (member_inline_size <= 4) {
8395                return Err(fidl::Error::InvalidInlineBitInEnvelope);
8396            }
8397            let _inner_offset;
8398            if inlined {
8399                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
8400                _inner_offset = offset + 8;
8401            } else {
8402                depth.increment()?;
8403                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8404            }
8405            match ordinal {
8406                1 => {
8407                    #[allow(irrefutable_let_patterns)]
8408                    if let ChildLocation::Collection(_) = self {
8409                        // Do nothing, read the value into the object
8410                    } else {
8411                        // Initialize `self` to the right variant
8412                        *self = ChildLocation::Collection(fidl::new_empty!(
8413                            fidl::encoding::BoundedString<255>,
8414                            D
8415                        ));
8416                    }
8417                    #[allow(irrefutable_let_patterns)]
8418                    if let ChildLocation::Collection(ref mut val) = self {
8419                        fidl::decode!(
8420                            fidl::encoding::BoundedString<255>,
8421                            D,
8422                            val,
8423                            decoder,
8424                            _inner_offset,
8425                            depth
8426                        )?;
8427                    } else {
8428                        unreachable!()
8429                    }
8430                }
8431                #[allow(deprecated)]
8432                ordinal => {
8433                    for _ in 0..num_handles {
8434                        decoder.drop_next_handle()?;
8435                    }
8436                    *self = ChildLocation::__SourceBreaking { unknown_ordinal: ordinal };
8437                }
8438            }
8439            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
8440                return Err(fidl::Error::InvalidNumBytesInEnvelope);
8441            }
8442            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8443                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8444            }
8445            Ok(())
8446        }
8447    }
8448}