Skip to main content

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    /// The type of the capability.
1744    pub build_time_capability_type: Option<String>,
1745    #[doc(hidden)]
1746    pub __source_breaking: fidl::marker::SourceBreaking,
1747}
1748
1749impl fidl::Persistable for RouteReport {}
1750
1751/// Metadata about a service instance.
1752#[derive(Clone, Debug, Default, PartialEq)]
1753pub struct ServiceInstance {
1754    /// The name of the service instance in this service directory.
1755    pub instance_name: Option<String>,
1756    /// The name of the component that serves the service instance,
1757    /// including the collection name if the component is a child.
1758    pub child_name: Option<String>,
1759    /// The name of the service instance as exposed by the child.
1760    pub child_instance_name: Option<String>,
1761    #[doc(hidden)]
1762    pub __source_breaking: fidl::marker::SourceBreaking,
1763}
1764
1765impl fidl::Persistable for ServiceInstance {}
1766
1767/// Metadata about status of the storage
1768#[derive(Clone, Debug, Default, PartialEq)]
1769pub struct StorageStatus {
1770    pub total_size: Option<u64>,
1771    pub used_size: Option<u64>,
1772    #[doc(hidden)]
1773    pub __source_breaking: fidl::marker::SourceBreaking,
1774}
1775
1776impl fidl::Persistable for StorageStatus {}
1777
1778/// Locations from which a child could be resolved under a given parent.
1779#[derive(Clone, Debug)]
1780pub enum ChildLocation {
1781    Collection(String),
1782    #[doc(hidden)]
1783    __SourceBreaking {
1784        unknown_ordinal: u64,
1785    },
1786}
1787
1788/// Pattern that matches an unknown `ChildLocation` member.
1789#[macro_export]
1790macro_rules! ChildLocationUnknown {
1791    () => {
1792        _
1793    };
1794}
1795
1796// Custom PartialEq so that unknown variants are not equal to themselves.
1797impl PartialEq for ChildLocation {
1798    fn eq(&self, other: &Self) -> bool {
1799        match (self, other) {
1800            (Self::Collection(x), Self::Collection(y)) => *x == *y,
1801            _ => false,
1802        }
1803    }
1804}
1805
1806impl ChildLocation {
1807    #[inline]
1808    pub fn ordinal(&self) -> u64 {
1809        match *self {
1810            Self::Collection(_) => 1,
1811            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1812        }
1813    }
1814
1815    #[inline]
1816    pub fn unknown_variant_for_testing() -> Self {
1817        Self::__SourceBreaking { unknown_ordinal: 0 }
1818    }
1819
1820    #[inline]
1821    pub fn is_unknown(&self) -> bool {
1822        match self {
1823            Self::__SourceBreaking { .. } => true,
1824            _ => false,
1825        }
1826    }
1827}
1828
1829impl fidl::Persistable for ChildLocation {}
1830
1831pub mod boot_controller_ordinals {
1832    pub const NOTIFY: u64 = 0x55173ddd1d9ed8de;
1833}
1834
1835pub mod config_override_ordinals {
1836    pub const SET_STRUCTURED_CONFIG: u64 = 0x2c6a138832d2e0ee;
1837    pub const UNSET_STRUCTURED_CONFIG: u64 = 0x342ec7d2bef05552;
1838}
1839
1840pub mod crash_introspect_ordinals {
1841    pub const FIND_COMPONENT_BY_THREAD_KOID: u64 = 0x75d3ff081eca468d;
1842}
1843
1844pub mod instance_iterator_ordinals {
1845    pub const NEXT: u64 = 0x3a4e3d52432a52ee;
1846}
1847
1848pub mod lifecycle_controller_ordinals {
1849    pub const START_INSTANCE: u64 = 0x13fcb422876384bf;
1850    pub const START_INSTANCE_WITH_ARGS: u64 = 0xd3b467436223e9;
1851    pub const STOP_INSTANCE: u64 = 0x1362ba9d0e3caf36;
1852    pub const RESOLVE_INSTANCE: u64 = 0x426ab8dd53d8e737;
1853    pub const UNRESOLVE_INSTANCE: u64 = 0x18166a2aa798cb99;
1854    pub const CREATE_INSTANCE: u64 = 0x48d17ae777e4f9;
1855    pub const DESTROY_INSTANCE: u64 = 0x27640ae5889d7443;
1856}
1857
1858pub mod manifest_bytes_iterator_ordinals {
1859    pub const NEXT: u64 = 0x4be4659549b15500;
1860}
1861
1862pub mod realm_explorer_ordinals {}
1863
1864pub mod realm_query_ordinals {
1865    pub const GET_INSTANCE: u64 = 0x3496ca1e5a0c13a8;
1866    pub const GET_RESOLVED_DECLARATION: u64 = 0x31a493d284a0bc1f;
1867    pub const RESOLVE_DECLARATION: u64 = 0x1ab1adf2a87d962d;
1868    pub const GET_STRUCTURED_CONFIG: u64 = 0x16f88f6735bd204;
1869    pub const GET_ALL_INSTANCES: u64 = 0x7b5a8775d30cad47;
1870    pub const CONSTRUCT_NAMESPACE: u64 = 0x5ecb29c02c488eeb;
1871    pub const OPEN_DIRECTORY: u64 = 0x333d68f1deecec85;
1872    pub const CONNECT_TO_STORAGE_ADMIN: u64 = 0x7807e6b4f623ace;
1873    pub const OPEN_STORAGE_ADMIN: u64 = 0x54d6af83942b4069;
1874}
1875
1876pub mod route_validator_ordinals {
1877    pub const VALIDATE: u64 = 0x3360b96d5f86cdf4;
1878    pub const ROUTE: u64 = 0x51c9b268216d8239;
1879}
1880
1881pub mod storage_admin_ordinals {
1882    pub const OPEN_STORAGE: u64 = 0x6ceaa5904cfe4377;
1883    pub const LIST_STORAGE_IN_REALM: u64 = 0x764f6d1f083e8bfb;
1884    pub const OPEN_COMPONENT_STORAGE_BY_ID: u64 = 0x4802102cc55d5df1;
1885    pub const DELETE_COMPONENT_STORAGE: u64 = 0x1677c1cdfcdbf45a;
1886    pub const GET_STATUS: u64 = 0x7729e325a6c526c8;
1887    pub const DELETE_ALL_STORAGE_CONTENTS: u64 = 0x2ee980b4b2d24adb;
1888}
1889
1890pub mod storage_iterator_ordinals {
1891    pub const NEXT: u64 = 0x7a6b21f15fd01b72;
1892}
1893
1894pub mod system_controller_ordinals {
1895    pub const SHUTDOWN: u64 = 0x25f56c938344e549;
1896}
1897
1898mod internal {
1899    use super::*;
1900    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideError {
1901        type Owned = Self;
1902
1903        #[inline(always)]
1904        fn inline_align(_context: fidl::encoding::Context) -> usize {
1905            std::mem::align_of::<u32>()
1906        }
1907
1908        #[inline(always)]
1909        fn inline_size(_context: fidl::encoding::Context) -> usize {
1910            std::mem::size_of::<u32>()
1911        }
1912
1913        #[inline(always)]
1914        fn encode_is_copy() -> bool {
1915            false
1916        }
1917
1918        #[inline(always)]
1919        fn decode_is_copy() -> bool {
1920            false
1921        }
1922    }
1923
1924    impl fidl::encoding::ValueTypeMarker for ConfigOverrideError {
1925        type Borrowed<'a> = Self;
1926        #[inline(always)]
1927        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1928            *value
1929        }
1930    }
1931
1932    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1933        for ConfigOverrideError
1934    {
1935        #[inline]
1936        unsafe fn encode(
1937            self,
1938            encoder: &mut fidl::encoding::Encoder<'_, D>,
1939            offset: usize,
1940            _depth: fidl::encoding::Depth,
1941        ) -> fidl::Result<()> {
1942            encoder.debug_check_bounds::<Self>(offset);
1943            encoder.write_num(self.into_primitive(), offset);
1944            Ok(())
1945        }
1946    }
1947
1948    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigOverrideError {
1949        #[inline(always)]
1950        fn new_empty() -> Self {
1951            Self::unknown()
1952        }
1953
1954        #[inline]
1955        unsafe fn decode(
1956            &mut self,
1957            decoder: &mut fidl::encoding::Decoder<'_, D>,
1958            offset: usize,
1959            _depth: fidl::encoding::Depth,
1960        ) -> fidl::Result<()> {
1961            decoder.debug_check_bounds::<Self>(offset);
1962            let prim = decoder.read_num::<u32>(offset);
1963
1964            *self = Self::from_primitive_allow_unknown(prim);
1965            Ok(())
1966        }
1967    }
1968    unsafe impl fidl::encoding::TypeMarker for ConnectToStorageAdminError {
1969        type Owned = Self;
1970
1971        #[inline(always)]
1972        fn inline_align(_context: fidl::encoding::Context) -> usize {
1973            std::mem::align_of::<u32>()
1974        }
1975
1976        #[inline(always)]
1977        fn inline_size(_context: fidl::encoding::Context) -> usize {
1978            std::mem::size_of::<u32>()
1979        }
1980
1981        #[inline(always)]
1982        fn encode_is_copy() -> bool {
1983            false
1984        }
1985
1986        #[inline(always)]
1987        fn decode_is_copy() -> bool {
1988            false
1989        }
1990    }
1991
1992    impl fidl::encoding::ValueTypeMarker for ConnectToStorageAdminError {
1993        type Borrowed<'a> = Self;
1994        #[inline(always)]
1995        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1996            *value
1997        }
1998    }
1999
2000    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2001        for ConnectToStorageAdminError
2002    {
2003        #[inline]
2004        unsafe fn encode(
2005            self,
2006            encoder: &mut fidl::encoding::Encoder<'_, D>,
2007            offset: usize,
2008            _depth: fidl::encoding::Depth,
2009        ) -> fidl::Result<()> {
2010            encoder.debug_check_bounds::<Self>(offset);
2011            encoder.write_num(self.into_primitive(), offset);
2012            Ok(())
2013        }
2014    }
2015
2016    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2017        for ConnectToStorageAdminError
2018    {
2019        #[inline(always)]
2020        fn new_empty() -> Self {
2021            Self::unknown()
2022        }
2023
2024        #[inline]
2025        unsafe fn decode(
2026            &mut self,
2027            decoder: &mut fidl::encoding::Decoder<'_, D>,
2028            offset: usize,
2029            _depth: fidl::encoding::Depth,
2030        ) -> fidl::Result<()> {
2031            decoder.debug_check_bounds::<Self>(offset);
2032            let prim = decoder.read_num::<u32>(offset);
2033
2034            *self = Self::from_primitive_allow_unknown(prim);
2035            Ok(())
2036        }
2037    }
2038    unsafe impl fidl::encoding::TypeMarker for ConstructNamespaceError {
2039        type Owned = Self;
2040
2041        #[inline(always)]
2042        fn inline_align(_context: fidl::encoding::Context) -> usize {
2043            std::mem::align_of::<u32>()
2044        }
2045
2046        #[inline(always)]
2047        fn inline_size(_context: fidl::encoding::Context) -> usize {
2048            std::mem::size_of::<u32>()
2049        }
2050
2051        #[inline(always)]
2052        fn encode_is_copy() -> bool {
2053            false
2054        }
2055
2056        #[inline(always)]
2057        fn decode_is_copy() -> bool {
2058            false
2059        }
2060    }
2061
2062    impl fidl::encoding::ValueTypeMarker for ConstructNamespaceError {
2063        type Borrowed<'a> = Self;
2064        #[inline(always)]
2065        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2066            *value
2067        }
2068    }
2069
2070    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2071        for ConstructNamespaceError
2072    {
2073        #[inline]
2074        unsafe fn encode(
2075            self,
2076            encoder: &mut fidl::encoding::Encoder<'_, D>,
2077            offset: usize,
2078            _depth: fidl::encoding::Depth,
2079        ) -> fidl::Result<()> {
2080            encoder.debug_check_bounds::<Self>(offset);
2081            encoder.write_num(self.into_primitive(), offset);
2082            Ok(())
2083        }
2084    }
2085
2086    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2087        for ConstructNamespaceError
2088    {
2089        #[inline(always)]
2090        fn new_empty() -> Self {
2091            Self::unknown()
2092        }
2093
2094        #[inline]
2095        unsafe fn decode(
2096            &mut self,
2097            decoder: &mut fidl::encoding::Decoder<'_, D>,
2098            offset: usize,
2099            _depth: fidl::encoding::Depth,
2100        ) -> fidl::Result<()> {
2101            decoder.debug_check_bounds::<Self>(offset);
2102            let prim = decoder.read_num::<u32>(offset);
2103
2104            *self = Self::from_primitive_allow_unknown(prim);
2105            Ok(())
2106        }
2107    }
2108    unsafe impl fidl::encoding::TypeMarker for CreateError {
2109        type Owned = Self;
2110
2111        #[inline(always)]
2112        fn inline_align(_context: fidl::encoding::Context) -> usize {
2113            std::mem::align_of::<u32>()
2114        }
2115
2116        #[inline(always)]
2117        fn inline_size(_context: fidl::encoding::Context) -> usize {
2118            std::mem::size_of::<u32>()
2119        }
2120
2121        #[inline(always)]
2122        fn encode_is_copy() -> bool {
2123            false
2124        }
2125
2126        #[inline(always)]
2127        fn decode_is_copy() -> bool {
2128            false
2129        }
2130    }
2131
2132    impl fidl::encoding::ValueTypeMarker for CreateError {
2133        type Borrowed<'a> = Self;
2134        #[inline(always)]
2135        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2136            *value
2137        }
2138    }
2139
2140    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
2141        #[inline]
2142        unsafe fn encode(
2143            self,
2144            encoder: &mut fidl::encoding::Encoder<'_, D>,
2145            offset: usize,
2146            _depth: fidl::encoding::Depth,
2147        ) -> fidl::Result<()> {
2148            encoder.debug_check_bounds::<Self>(offset);
2149            encoder.write_num(self.into_primitive(), offset);
2150            Ok(())
2151        }
2152    }
2153
2154    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
2155        #[inline(always)]
2156        fn new_empty() -> Self {
2157            Self::unknown()
2158        }
2159
2160        #[inline]
2161        unsafe fn decode(
2162            &mut self,
2163            decoder: &mut fidl::encoding::Decoder<'_, D>,
2164            offset: usize,
2165            _depth: fidl::encoding::Depth,
2166        ) -> fidl::Result<()> {
2167            decoder.debug_check_bounds::<Self>(offset);
2168            let prim = decoder.read_num::<u32>(offset);
2169
2170            *self = Self::from_primitive_allow_unknown(prim);
2171            Ok(())
2172        }
2173    }
2174    unsafe impl fidl::encoding::TypeMarker for DeclType {
2175        type Owned = Self;
2176
2177        #[inline(always)]
2178        fn inline_align(_context: fidl::encoding::Context) -> usize {
2179            std::mem::align_of::<u32>()
2180        }
2181
2182        #[inline(always)]
2183        fn inline_size(_context: fidl::encoding::Context) -> usize {
2184            std::mem::size_of::<u32>()
2185        }
2186
2187        #[inline(always)]
2188        fn encode_is_copy() -> bool {
2189            false
2190        }
2191
2192        #[inline(always)]
2193        fn decode_is_copy() -> bool {
2194            false
2195        }
2196    }
2197
2198    impl fidl::encoding::ValueTypeMarker for DeclType {
2199        type Borrowed<'a> = Self;
2200        #[inline(always)]
2201        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2202            *value
2203        }
2204    }
2205
2206    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeclType {
2207        #[inline]
2208        unsafe fn encode(
2209            self,
2210            encoder: &mut fidl::encoding::Encoder<'_, D>,
2211            offset: usize,
2212            _depth: fidl::encoding::Depth,
2213        ) -> fidl::Result<()> {
2214            encoder.debug_check_bounds::<Self>(offset);
2215            encoder.write_num(self.into_primitive(), offset);
2216            Ok(())
2217        }
2218    }
2219
2220    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeclType {
2221        #[inline(always)]
2222        fn new_empty() -> Self {
2223            Self::unknown()
2224        }
2225
2226        #[inline]
2227        unsafe fn decode(
2228            &mut self,
2229            decoder: &mut fidl::encoding::Decoder<'_, D>,
2230            offset: usize,
2231            _depth: fidl::encoding::Depth,
2232        ) -> fidl::Result<()> {
2233            decoder.debug_check_bounds::<Self>(offset);
2234            let prim = decoder.read_num::<u32>(offset);
2235
2236            *self = Self::from_primitive_allow_unknown(prim);
2237            Ok(())
2238        }
2239    }
2240    unsafe impl fidl::encoding::TypeMarker for DeletionError {
2241        type Owned = Self;
2242
2243        #[inline(always)]
2244        fn inline_align(_context: fidl::encoding::Context) -> usize {
2245            std::mem::align_of::<u32>()
2246        }
2247
2248        #[inline(always)]
2249        fn inline_size(_context: fidl::encoding::Context) -> usize {
2250            std::mem::size_of::<u32>()
2251        }
2252
2253        #[inline(always)]
2254        fn encode_is_copy() -> bool {
2255            true
2256        }
2257
2258        #[inline(always)]
2259        fn decode_is_copy() -> bool {
2260            false
2261        }
2262    }
2263
2264    impl fidl::encoding::ValueTypeMarker for DeletionError {
2265        type Borrowed<'a> = Self;
2266        #[inline(always)]
2267        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2268            *value
2269        }
2270    }
2271
2272    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeletionError {
2273        #[inline]
2274        unsafe fn encode(
2275            self,
2276            encoder: &mut fidl::encoding::Encoder<'_, D>,
2277            offset: usize,
2278            _depth: fidl::encoding::Depth,
2279        ) -> fidl::Result<()> {
2280            encoder.debug_check_bounds::<Self>(offset);
2281            encoder.write_num(self.into_primitive(), offset);
2282            Ok(())
2283        }
2284    }
2285
2286    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeletionError {
2287        #[inline(always)]
2288        fn new_empty() -> Self {
2289            Self::Connection
2290        }
2291
2292        #[inline]
2293        unsafe fn decode(
2294            &mut self,
2295            decoder: &mut fidl::encoding::Decoder<'_, D>,
2296            offset: usize,
2297            _depth: fidl::encoding::Depth,
2298        ) -> fidl::Result<()> {
2299            decoder.debug_check_bounds::<Self>(offset);
2300            let prim = decoder.read_num::<u32>(offset);
2301
2302            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2303            Ok(())
2304        }
2305    }
2306    unsafe impl fidl::encoding::TypeMarker for DestroyError {
2307        type Owned = Self;
2308
2309        #[inline(always)]
2310        fn inline_align(_context: fidl::encoding::Context) -> usize {
2311            std::mem::align_of::<u32>()
2312        }
2313
2314        #[inline(always)]
2315        fn inline_size(_context: fidl::encoding::Context) -> usize {
2316            std::mem::size_of::<u32>()
2317        }
2318
2319        #[inline(always)]
2320        fn encode_is_copy() -> bool {
2321            false
2322        }
2323
2324        #[inline(always)]
2325        fn decode_is_copy() -> bool {
2326            false
2327        }
2328    }
2329
2330    impl fidl::encoding::ValueTypeMarker for DestroyError {
2331        type Borrowed<'a> = Self;
2332        #[inline(always)]
2333        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2334            *value
2335        }
2336    }
2337
2338    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DestroyError {
2339        #[inline]
2340        unsafe fn encode(
2341            self,
2342            encoder: &mut fidl::encoding::Encoder<'_, D>,
2343            offset: usize,
2344            _depth: fidl::encoding::Depth,
2345        ) -> fidl::Result<()> {
2346            encoder.debug_check_bounds::<Self>(offset);
2347            encoder.write_num(self.into_primitive(), offset);
2348            Ok(())
2349        }
2350    }
2351
2352    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyError {
2353        #[inline(always)]
2354        fn new_empty() -> Self {
2355            Self::unknown()
2356        }
2357
2358        #[inline]
2359        unsafe fn decode(
2360            &mut self,
2361            decoder: &mut fidl::encoding::Decoder<'_, D>,
2362            offset: usize,
2363            _depth: fidl::encoding::Depth,
2364        ) -> fidl::Result<()> {
2365            decoder.debug_check_bounds::<Self>(offset);
2366            let prim = decoder.read_num::<u32>(offset);
2367
2368            *self = Self::from_primitive_allow_unknown(prim);
2369            Ok(())
2370        }
2371    }
2372    unsafe impl fidl::encoding::TypeMarker for GetAllInstancesError {
2373        type Owned = Self;
2374
2375        #[inline(always)]
2376        fn inline_align(_context: fidl::encoding::Context) -> usize {
2377            std::mem::align_of::<u32>()
2378        }
2379
2380        #[inline(always)]
2381        fn inline_size(_context: fidl::encoding::Context) -> usize {
2382            std::mem::size_of::<u32>()
2383        }
2384
2385        #[inline(always)]
2386        fn encode_is_copy() -> bool {
2387            false
2388        }
2389
2390        #[inline(always)]
2391        fn decode_is_copy() -> bool {
2392            false
2393        }
2394    }
2395
2396    impl fidl::encoding::ValueTypeMarker for GetAllInstancesError {
2397        type Borrowed<'a> = Self;
2398        #[inline(always)]
2399        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2400            *value
2401        }
2402    }
2403
2404    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2405        for GetAllInstancesError
2406    {
2407        #[inline]
2408        unsafe fn encode(
2409            self,
2410            encoder: &mut fidl::encoding::Encoder<'_, D>,
2411            offset: usize,
2412            _depth: fidl::encoding::Depth,
2413        ) -> fidl::Result<()> {
2414            encoder.debug_check_bounds::<Self>(offset);
2415            encoder.write_num(self.into_primitive(), offset);
2416            Ok(())
2417        }
2418    }
2419
2420    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetAllInstancesError {
2421        #[inline(always)]
2422        fn new_empty() -> Self {
2423            Self::unknown()
2424        }
2425
2426        #[inline]
2427        unsafe fn decode(
2428            &mut self,
2429            decoder: &mut fidl::encoding::Decoder<'_, D>,
2430            offset: usize,
2431            _depth: fidl::encoding::Depth,
2432        ) -> fidl::Result<()> {
2433            decoder.debug_check_bounds::<Self>(offset);
2434            let prim = decoder.read_num::<u32>(offset);
2435
2436            *self = Self::from_primitive_allow_unknown(prim);
2437            Ok(())
2438        }
2439    }
2440    unsafe impl fidl::encoding::TypeMarker for GetDeclarationError {
2441        type Owned = Self;
2442
2443        #[inline(always)]
2444        fn inline_align(_context: fidl::encoding::Context) -> usize {
2445            std::mem::align_of::<u32>()
2446        }
2447
2448        #[inline(always)]
2449        fn inline_size(_context: fidl::encoding::Context) -> usize {
2450            std::mem::size_of::<u32>()
2451        }
2452
2453        #[inline(always)]
2454        fn encode_is_copy() -> bool {
2455            false
2456        }
2457
2458        #[inline(always)]
2459        fn decode_is_copy() -> bool {
2460            false
2461        }
2462    }
2463
2464    impl fidl::encoding::ValueTypeMarker for GetDeclarationError {
2465        type Borrowed<'a> = Self;
2466        #[inline(always)]
2467        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2468            *value
2469        }
2470    }
2471
2472    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2473        for GetDeclarationError
2474    {
2475        #[inline]
2476        unsafe fn encode(
2477            self,
2478            encoder: &mut fidl::encoding::Encoder<'_, D>,
2479            offset: usize,
2480            _depth: fidl::encoding::Depth,
2481        ) -> fidl::Result<()> {
2482            encoder.debug_check_bounds::<Self>(offset);
2483            encoder.write_num(self.into_primitive(), offset);
2484            Ok(())
2485        }
2486    }
2487
2488    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetDeclarationError {
2489        #[inline(always)]
2490        fn new_empty() -> Self {
2491            Self::unknown()
2492        }
2493
2494        #[inline]
2495        unsafe fn decode(
2496            &mut self,
2497            decoder: &mut fidl::encoding::Decoder<'_, D>,
2498            offset: usize,
2499            _depth: fidl::encoding::Depth,
2500        ) -> fidl::Result<()> {
2501            decoder.debug_check_bounds::<Self>(offset);
2502            let prim = decoder.read_num::<u32>(offset);
2503
2504            *self = Self::from_primitive_allow_unknown(prim);
2505            Ok(())
2506        }
2507    }
2508    unsafe impl fidl::encoding::TypeMarker for GetInstanceError {
2509        type Owned = Self;
2510
2511        #[inline(always)]
2512        fn inline_align(_context: fidl::encoding::Context) -> usize {
2513            std::mem::align_of::<u32>()
2514        }
2515
2516        #[inline(always)]
2517        fn inline_size(_context: fidl::encoding::Context) -> usize {
2518            std::mem::size_of::<u32>()
2519        }
2520
2521        #[inline(always)]
2522        fn encode_is_copy() -> bool {
2523            false
2524        }
2525
2526        #[inline(always)]
2527        fn decode_is_copy() -> bool {
2528            false
2529        }
2530    }
2531
2532    impl fidl::encoding::ValueTypeMarker for GetInstanceError {
2533        type Borrowed<'a> = Self;
2534        #[inline(always)]
2535        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2536            *value
2537        }
2538    }
2539
2540    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2541        for GetInstanceError
2542    {
2543        #[inline]
2544        unsafe fn encode(
2545            self,
2546            encoder: &mut fidl::encoding::Encoder<'_, D>,
2547            offset: usize,
2548            _depth: fidl::encoding::Depth,
2549        ) -> fidl::Result<()> {
2550            encoder.debug_check_bounds::<Self>(offset);
2551            encoder.write_num(self.into_primitive(), offset);
2552            Ok(())
2553        }
2554    }
2555
2556    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetInstanceError {
2557        #[inline(always)]
2558        fn new_empty() -> Self {
2559            Self::unknown()
2560        }
2561
2562        #[inline]
2563        unsafe fn decode(
2564            &mut self,
2565            decoder: &mut fidl::encoding::Decoder<'_, D>,
2566            offset: usize,
2567            _depth: fidl::encoding::Depth,
2568        ) -> fidl::Result<()> {
2569            decoder.debug_check_bounds::<Self>(offset);
2570            let prim = decoder.read_num::<u32>(offset);
2571
2572            *self = Self::from_primitive_allow_unknown(prim);
2573            Ok(())
2574        }
2575    }
2576    unsafe impl fidl::encoding::TypeMarker for GetStructuredConfigError {
2577        type Owned = Self;
2578
2579        #[inline(always)]
2580        fn inline_align(_context: fidl::encoding::Context) -> usize {
2581            std::mem::align_of::<u32>()
2582        }
2583
2584        #[inline(always)]
2585        fn inline_size(_context: fidl::encoding::Context) -> usize {
2586            std::mem::size_of::<u32>()
2587        }
2588
2589        #[inline(always)]
2590        fn encode_is_copy() -> bool {
2591            false
2592        }
2593
2594        #[inline(always)]
2595        fn decode_is_copy() -> bool {
2596            false
2597        }
2598    }
2599
2600    impl fidl::encoding::ValueTypeMarker for GetStructuredConfigError {
2601        type Borrowed<'a> = Self;
2602        #[inline(always)]
2603        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2604            *value
2605        }
2606    }
2607
2608    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2609        for GetStructuredConfigError
2610    {
2611        #[inline]
2612        unsafe fn encode(
2613            self,
2614            encoder: &mut fidl::encoding::Encoder<'_, D>,
2615            offset: usize,
2616            _depth: fidl::encoding::Depth,
2617        ) -> fidl::Result<()> {
2618            encoder.debug_check_bounds::<Self>(offset);
2619            encoder.write_num(self.into_primitive(), offset);
2620            Ok(())
2621        }
2622    }
2623
2624    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2625        for GetStructuredConfigError
2626    {
2627        #[inline(always)]
2628        fn new_empty() -> Self {
2629            Self::unknown()
2630        }
2631
2632        #[inline]
2633        unsafe fn decode(
2634            &mut self,
2635            decoder: &mut fidl::encoding::Decoder<'_, D>,
2636            offset: usize,
2637            _depth: fidl::encoding::Depth,
2638        ) -> fidl::Result<()> {
2639            decoder.debug_check_bounds::<Self>(offset);
2640            let prim = decoder.read_num::<u32>(offset);
2641
2642            *self = Self::from_primitive_allow_unknown(prim);
2643            Ok(())
2644        }
2645    }
2646    unsafe impl fidl::encoding::TypeMarker for OpenDirType {
2647        type Owned = Self;
2648
2649        #[inline(always)]
2650        fn inline_align(_context: fidl::encoding::Context) -> usize {
2651            std::mem::align_of::<u32>()
2652        }
2653
2654        #[inline(always)]
2655        fn inline_size(_context: fidl::encoding::Context) -> usize {
2656            std::mem::size_of::<u32>()
2657        }
2658
2659        #[inline(always)]
2660        fn encode_is_copy() -> bool {
2661            false
2662        }
2663
2664        #[inline(always)]
2665        fn decode_is_copy() -> bool {
2666            false
2667        }
2668    }
2669
2670    impl fidl::encoding::ValueTypeMarker for OpenDirType {
2671        type Borrowed<'a> = Self;
2672        #[inline(always)]
2673        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2674            *value
2675        }
2676    }
2677
2678    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenDirType {
2679        #[inline]
2680        unsafe fn encode(
2681            self,
2682            encoder: &mut fidl::encoding::Encoder<'_, D>,
2683            offset: usize,
2684            _depth: fidl::encoding::Depth,
2685        ) -> fidl::Result<()> {
2686            encoder.debug_check_bounds::<Self>(offset);
2687            encoder.write_num(self.into_primitive(), offset);
2688            Ok(())
2689        }
2690    }
2691
2692    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenDirType {
2693        #[inline(always)]
2694        fn new_empty() -> Self {
2695            Self::unknown()
2696        }
2697
2698        #[inline]
2699        unsafe fn decode(
2700            &mut self,
2701            decoder: &mut fidl::encoding::Decoder<'_, D>,
2702            offset: usize,
2703            _depth: fidl::encoding::Depth,
2704        ) -> fidl::Result<()> {
2705            decoder.debug_check_bounds::<Self>(offset);
2706            let prim = decoder.read_num::<u32>(offset);
2707
2708            *self = Self::from_primitive_allow_unknown(prim);
2709            Ok(())
2710        }
2711    }
2712    unsafe impl fidl::encoding::TypeMarker for OpenError {
2713        type Owned = Self;
2714
2715        #[inline(always)]
2716        fn inline_align(_context: fidl::encoding::Context) -> usize {
2717            std::mem::align_of::<u32>()
2718        }
2719
2720        #[inline(always)]
2721        fn inline_size(_context: fidl::encoding::Context) -> usize {
2722            std::mem::size_of::<u32>()
2723        }
2724
2725        #[inline(always)]
2726        fn encode_is_copy() -> bool {
2727            false
2728        }
2729
2730        #[inline(always)]
2731        fn decode_is_copy() -> bool {
2732            false
2733        }
2734    }
2735
2736    impl fidl::encoding::ValueTypeMarker for OpenError {
2737        type Borrowed<'a> = Self;
2738        #[inline(always)]
2739        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2740            *value
2741        }
2742    }
2743
2744    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenError {
2745        #[inline]
2746        unsafe fn encode(
2747            self,
2748            encoder: &mut fidl::encoding::Encoder<'_, D>,
2749            offset: usize,
2750            _depth: fidl::encoding::Depth,
2751        ) -> fidl::Result<()> {
2752            encoder.debug_check_bounds::<Self>(offset);
2753            encoder.write_num(self.into_primitive(), offset);
2754            Ok(())
2755        }
2756    }
2757
2758    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenError {
2759        #[inline(always)]
2760        fn new_empty() -> Self {
2761            Self::unknown()
2762        }
2763
2764        #[inline]
2765        unsafe fn decode(
2766            &mut self,
2767            decoder: &mut fidl::encoding::Decoder<'_, D>,
2768            offset: usize,
2769            _depth: fidl::encoding::Depth,
2770        ) -> fidl::Result<()> {
2771            decoder.debug_check_bounds::<Self>(offset);
2772            let prim = decoder.read_num::<u32>(offset);
2773
2774            *self = Self::from_primitive_allow_unknown(prim);
2775            Ok(())
2776        }
2777    }
2778    unsafe impl fidl::encoding::TypeMarker for RealmQueryError {
2779        type Owned = Self;
2780
2781        #[inline(always)]
2782        fn inline_align(_context: fidl::encoding::Context) -> usize {
2783            std::mem::align_of::<u32>()
2784        }
2785
2786        #[inline(always)]
2787        fn inline_size(_context: fidl::encoding::Context) -> usize {
2788            std::mem::size_of::<u32>()
2789        }
2790
2791        #[inline(always)]
2792        fn encode_is_copy() -> bool {
2793            false
2794        }
2795
2796        #[inline(always)]
2797        fn decode_is_copy() -> bool {
2798            false
2799        }
2800    }
2801
2802    impl fidl::encoding::ValueTypeMarker for RealmQueryError {
2803        type Borrowed<'a> = Self;
2804        #[inline(always)]
2805        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2806            *value
2807        }
2808    }
2809
2810    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2811        for RealmQueryError
2812    {
2813        #[inline]
2814        unsafe fn encode(
2815            self,
2816            encoder: &mut fidl::encoding::Encoder<'_, D>,
2817            offset: usize,
2818            _depth: fidl::encoding::Depth,
2819        ) -> fidl::Result<()> {
2820            encoder.debug_check_bounds::<Self>(offset);
2821            encoder.write_num(self.into_primitive(), offset);
2822            Ok(())
2823        }
2824    }
2825
2826    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RealmQueryError {
2827        #[inline(always)]
2828        fn new_empty() -> Self {
2829            Self::unknown()
2830        }
2831
2832        #[inline]
2833        unsafe fn decode(
2834            &mut self,
2835            decoder: &mut fidl::encoding::Decoder<'_, D>,
2836            offset: usize,
2837            _depth: fidl::encoding::Depth,
2838        ) -> fidl::Result<()> {
2839            decoder.debug_check_bounds::<Self>(offset);
2840            let prim = decoder.read_num::<u32>(offset);
2841
2842            *self = Self::from_primitive_allow_unknown(prim);
2843            Ok(())
2844        }
2845    }
2846    unsafe impl fidl::encoding::TypeMarker for ResolveError {
2847        type Owned = Self;
2848
2849        #[inline(always)]
2850        fn inline_align(_context: fidl::encoding::Context) -> usize {
2851            std::mem::align_of::<u32>()
2852        }
2853
2854        #[inline(always)]
2855        fn inline_size(_context: fidl::encoding::Context) -> usize {
2856            std::mem::size_of::<u32>()
2857        }
2858
2859        #[inline(always)]
2860        fn encode_is_copy() -> bool {
2861            false
2862        }
2863
2864        #[inline(always)]
2865        fn decode_is_copy() -> bool {
2866            false
2867        }
2868    }
2869
2870    impl fidl::encoding::ValueTypeMarker for ResolveError {
2871        type Borrowed<'a> = Self;
2872        #[inline(always)]
2873        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2874            *value
2875        }
2876    }
2877
2878    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ResolveError {
2879        #[inline]
2880        unsafe fn encode(
2881            self,
2882            encoder: &mut fidl::encoding::Encoder<'_, D>,
2883            offset: usize,
2884            _depth: fidl::encoding::Depth,
2885        ) -> fidl::Result<()> {
2886            encoder.debug_check_bounds::<Self>(offset);
2887            encoder.write_num(self.into_primitive(), offset);
2888            Ok(())
2889        }
2890    }
2891
2892    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolveError {
2893        #[inline(always)]
2894        fn new_empty() -> Self {
2895            Self::unknown()
2896        }
2897
2898        #[inline]
2899        unsafe fn decode(
2900            &mut self,
2901            decoder: &mut fidl::encoding::Decoder<'_, D>,
2902            offset: usize,
2903            _depth: fidl::encoding::Depth,
2904        ) -> fidl::Result<()> {
2905            decoder.debug_check_bounds::<Self>(offset);
2906            let prim = decoder.read_num::<u32>(offset);
2907
2908            *self = Self::from_primitive_allow_unknown(prim);
2909            Ok(())
2910        }
2911    }
2912    unsafe impl fidl::encoding::TypeMarker for RouteOutcome {
2913        type Owned = Self;
2914
2915        #[inline(always)]
2916        fn inline_align(_context: fidl::encoding::Context) -> usize {
2917            std::mem::align_of::<u32>()
2918        }
2919
2920        #[inline(always)]
2921        fn inline_size(_context: fidl::encoding::Context) -> usize {
2922            std::mem::size_of::<u32>()
2923        }
2924
2925        #[inline(always)]
2926        fn encode_is_copy() -> bool {
2927            false
2928        }
2929
2930        #[inline(always)]
2931        fn decode_is_copy() -> bool {
2932            false
2933        }
2934    }
2935
2936    impl fidl::encoding::ValueTypeMarker for RouteOutcome {
2937        type Borrowed<'a> = Self;
2938        #[inline(always)]
2939        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2940            *value
2941        }
2942    }
2943
2944    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RouteOutcome {
2945        #[inline]
2946        unsafe fn encode(
2947            self,
2948            encoder: &mut fidl::encoding::Encoder<'_, D>,
2949            offset: usize,
2950            _depth: fidl::encoding::Depth,
2951        ) -> fidl::Result<()> {
2952            encoder.debug_check_bounds::<Self>(offset);
2953            encoder.write_num(self.into_primitive(), offset);
2954            Ok(())
2955        }
2956    }
2957
2958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteOutcome {
2959        #[inline(always)]
2960        fn new_empty() -> Self {
2961            Self::unknown()
2962        }
2963
2964        #[inline]
2965        unsafe fn decode(
2966            &mut self,
2967            decoder: &mut fidl::encoding::Decoder<'_, D>,
2968            offset: usize,
2969            _depth: fidl::encoding::Depth,
2970        ) -> fidl::Result<()> {
2971            decoder.debug_check_bounds::<Self>(offset);
2972            let prim = decoder.read_num::<u32>(offset);
2973
2974            *self = Self::from_primitive_allow_unknown(prim);
2975            Ok(())
2976        }
2977    }
2978    unsafe impl fidl::encoding::TypeMarker for RouteValidatorError {
2979        type Owned = Self;
2980
2981        #[inline(always)]
2982        fn inline_align(_context: fidl::encoding::Context) -> usize {
2983            std::mem::align_of::<u32>()
2984        }
2985
2986        #[inline(always)]
2987        fn inline_size(_context: fidl::encoding::Context) -> usize {
2988            std::mem::size_of::<u32>()
2989        }
2990
2991        #[inline(always)]
2992        fn encode_is_copy() -> bool {
2993            false
2994        }
2995
2996        #[inline(always)]
2997        fn decode_is_copy() -> bool {
2998            false
2999        }
3000    }
3001
3002    impl fidl::encoding::ValueTypeMarker for RouteValidatorError {
3003        type Borrowed<'a> = Self;
3004        #[inline(always)]
3005        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3006            *value
3007        }
3008    }
3009
3010    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3011        for RouteValidatorError
3012    {
3013        #[inline]
3014        unsafe fn encode(
3015            self,
3016            encoder: &mut fidl::encoding::Encoder<'_, D>,
3017            offset: usize,
3018            _depth: fidl::encoding::Depth,
3019        ) -> fidl::Result<()> {
3020            encoder.debug_check_bounds::<Self>(offset);
3021            encoder.write_num(self.into_primitive(), offset);
3022            Ok(())
3023        }
3024    }
3025
3026    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteValidatorError {
3027        #[inline(always)]
3028        fn new_empty() -> Self {
3029            Self::unknown()
3030        }
3031
3032        #[inline]
3033        unsafe fn decode(
3034            &mut self,
3035            decoder: &mut fidl::encoding::Decoder<'_, D>,
3036            offset: usize,
3037            _depth: fidl::encoding::Depth,
3038        ) -> fidl::Result<()> {
3039            decoder.debug_check_bounds::<Self>(offset);
3040            let prim = decoder.read_num::<u32>(offset);
3041
3042            *self = Self::from_primitive_allow_unknown(prim);
3043            Ok(())
3044        }
3045    }
3046    unsafe impl fidl::encoding::TypeMarker for StartError {
3047        type Owned = Self;
3048
3049        #[inline(always)]
3050        fn inline_align(_context: fidl::encoding::Context) -> usize {
3051            std::mem::align_of::<u32>()
3052        }
3053
3054        #[inline(always)]
3055        fn inline_size(_context: fidl::encoding::Context) -> usize {
3056            std::mem::size_of::<u32>()
3057        }
3058
3059        #[inline(always)]
3060        fn encode_is_copy() -> bool {
3061            false
3062        }
3063
3064        #[inline(always)]
3065        fn decode_is_copy() -> bool {
3066            false
3067        }
3068    }
3069
3070    impl fidl::encoding::ValueTypeMarker for StartError {
3071        type Borrowed<'a> = Self;
3072        #[inline(always)]
3073        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3074            *value
3075        }
3076    }
3077
3078    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
3079        #[inline]
3080        unsafe fn encode(
3081            self,
3082            encoder: &mut fidl::encoding::Encoder<'_, D>,
3083            offset: usize,
3084            _depth: fidl::encoding::Depth,
3085        ) -> fidl::Result<()> {
3086            encoder.debug_check_bounds::<Self>(offset);
3087            encoder.write_num(self.into_primitive(), offset);
3088            Ok(())
3089        }
3090    }
3091
3092    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
3093        #[inline(always)]
3094        fn new_empty() -> Self {
3095            Self::unknown()
3096        }
3097
3098        #[inline]
3099        unsafe fn decode(
3100            &mut self,
3101            decoder: &mut fidl::encoding::Decoder<'_, D>,
3102            offset: usize,
3103            _depth: fidl::encoding::Depth,
3104        ) -> fidl::Result<()> {
3105            decoder.debug_check_bounds::<Self>(offset);
3106            let prim = decoder.read_num::<u32>(offset);
3107
3108            *self = Self::from_primitive_allow_unknown(prim);
3109            Ok(())
3110        }
3111    }
3112    unsafe impl fidl::encoding::TypeMarker for StatusError {
3113        type Owned = Self;
3114
3115        #[inline(always)]
3116        fn inline_align(_context: fidl::encoding::Context) -> usize {
3117            std::mem::align_of::<u32>()
3118        }
3119
3120        #[inline(always)]
3121        fn inline_size(_context: fidl::encoding::Context) -> usize {
3122            std::mem::size_of::<u32>()
3123        }
3124
3125        #[inline(always)]
3126        fn encode_is_copy() -> bool {
3127            true
3128        }
3129
3130        #[inline(always)]
3131        fn decode_is_copy() -> bool {
3132            false
3133        }
3134    }
3135
3136    impl fidl::encoding::ValueTypeMarker for StatusError {
3137        type Borrowed<'a> = Self;
3138        #[inline(always)]
3139        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3140            *value
3141        }
3142    }
3143
3144    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StatusError {
3145        #[inline]
3146        unsafe fn encode(
3147            self,
3148            encoder: &mut fidl::encoding::Encoder<'_, D>,
3149            offset: usize,
3150            _depth: fidl::encoding::Depth,
3151        ) -> fidl::Result<()> {
3152            encoder.debug_check_bounds::<Self>(offset);
3153            encoder.write_num(self.into_primitive(), offset);
3154            Ok(())
3155        }
3156    }
3157
3158    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StatusError {
3159        #[inline(always)]
3160        fn new_empty() -> Self {
3161            Self::Provider
3162        }
3163
3164        #[inline]
3165        unsafe fn decode(
3166            &mut self,
3167            decoder: &mut fidl::encoding::Decoder<'_, D>,
3168            offset: usize,
3169            _depth: fidl::encoding::Depth,
3170        ) -> fidl::Result<()> {
3171            decoder.debug_check_bounds::<Self>(offset);
3172            let prim = decoder.read_num::<u32>(offset);
3173
3174            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3175            Ok(())
3176        }
3177    }
3178    unsafe impl fidl::encoding::TypeMarker for StopError {
3179        type Owned = Self;
3180
3181        #[inline(always)]
3182        fn inline_align(_context: fidl::encoding::Context) -> usize {
3183            std::mem::align_of::<u32>()
3184        }
3185
3186        #[inline(always)]
3187        fn inline_size(_context: fidl::encoding::Context) -> usize {
3188            std::mem::size_of::<u32>()
3189        }
3190
3191        #[inline(always)]
3192        fn encode_is_copy() -> bool {
3193            false
3194        }
3195
3196        #[inline(always)]
3197        fn decode_is_copy() -> bool {
3198            false
3199        }
3200    }
3201
3202    impl fidl::encoding::ValueTypeMarker for StopError {
3203        type Borrowed<'a> = Self;
3204        #[inline(always)]
3205        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3206            *value
3207        }
3208    }
3209
3210    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopError {
3211        #[inline]
3212        unsafe fn encode(
3213            self,
3214            encoder: &mut fidl::encoding::Encoder<'_, D>,
3215            offset: usize,
3216            _depth: fidl::encoding::Depth,
3217        ) -> fidl::Result<()> {
3218            encoder.debug_check_bounds::<Self>(offset);
3219            encoder.write_num(self.into_primitive(), offset);
3220            Ok(())
3221        }
3222    }
3223
3224    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopError {
3225        #[inline(always)]
3226        fn new_empty() -> Self {
3227            Self::unknown()
3228        }
3229
3230        #[inline]
3231        unsafe fn decode(
3232            &mut self,
3233            decoder: &mut fidl::encoding::Decoder<'_, D>,
3234            offset: usize,
3235            _depth: fidl::encoding::Depth,
3236        ) -> fidl::Result<()> {
3237            decoder.debug_check_bounds::<Self>(offset);
3238            let prim = decoder.read_num::<u32>(offset);
3239
3240            *self = Self::from_primitive_allow_unknown(prim);
3241            Ok(())
3242        }
3243    }
3244    unsafe impl fidl::encoding::TypeMarker for UnresolveError {
3245        type Owned = Self;
3246
3247        #[inline(always)]
3248        fn inline_align(_context: fidl::encoding::Context) -> usize {
3249            std::mem::align_of::<u32>()
3250        }
3251
3252        #[inline(always)]
3253        fn inline_size(_context: fidl::encoding::Context) -> usize {
3254            std::mem::size_of::<u32>()
3255        }
3256
3257        #[inline(always)]
3258        fn encode_is_copy() -> bool {
3259            false
3260        }
3261
3262        #[inline(always)]
3263        fn decode_is_copy() -> bool {
3264            false
3265        }
3266    }
3267
3268    impl fidl::encoding::ValueTypeMarker for UnresolveError {
3269        type Borrowed<'a> = Self;
3270        #[inline(always)]
3271        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3272            *value
3273        }
3274    }
3275
3276    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnresolveError {
3277        #[inline]
3278        unsafe fn encode(
3279            self,
3280            encoder: &mut fidl::encoding::Encoder<'_, D>,
3281            offset: usize,
3282            _depth: fidl::encoding::Depth,
3283        ) -> fidl::Result<()> {
3284            encoder.debug_check_bounds::<Self>(offset);
3285            encoder.write_num(self.into_primitive(), offset);
3286            Ok(())
3287        }
3288    }
3289
3290    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnresolveError {
3291        #[inline(always)]
3292        fn new_empty() -> Self {
3293            Self::unknown()
3294        }
3295
3296        #[inline]
3297        unsafe fn decode(
3298            &mut self,
3299            decoder: &mut fidl::encoding::Decoder<'_, D>,
3300            offset: usize,
3301            _depth: fidl::encoding::Depth,
3302        ) -> fidl::Result<()> {
3303            decoder.debug_check_bounds::<Self>(offset);
3304            let prim = decoder.read_num::<u32>(offset);
3305
3306            *self = Self::from_primitive_allow_unknown(prim);
3307            Ok(())
3308        }
3309    }
3310
3311    impl fidl::encoding::ValueTypeMarker for ConfigOverrideSetStructuredConfigRequest {
3312        type Borrowed<'a> = &'a Self;
3313        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3314            value
3315        }
3316    }
3317
3318    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideSetStructuredConfigRequest {
3319        type Owned = Self;
3320
3321        #[inline(always)]
3322        fn inline_align(_context: fidl::encoding::Context) -> usize {
3323            8
3324        }
3325
3326        #[inline(always)]
3327        fn inline_size(_context: fidl::encoding::Context) -> usize {
3328            32
3329        }
3330    }
3331
3332    unsafe impl<D: fidl::encoding::ResourceDialect>
3333        fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D>
3334        for &ConfigOverrideSetStructuredConfigRequest
3335    {
3336        #[inline]
3337        unsafe fn encode(
3338            self,
3339            encoder: &mut fidl::encoding::Encoder<'_, D>,
3340            offset: usize,
3341            _depth: fidl::encoding::Depth,
3342        ) -> fidl::Result<()> {
3343            encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3344            // Delegate to tuple encoding.
3345            fidl::encoding::Encode::<ConfigOverrideSetStructuredConfigRequest, D>::encode(
3346                (
3347                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
3348                    <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl_common::ConfigOverride> as fidl::encoding::ValueTypeMarker>::borrow(&self.fields),
3349                ),
3350                encoder, offset, _depth
3351            )
3352        }
3353    }
3354    unsafe impl<
3355        D: fidl::encoding::ResourceDialect,
3356        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3357        T1: fidl::encoding::Encode<
3358                fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl_common::ConfigOverride>,
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<fidl_fuchsia_component_decl_common::ConfigOverride>,
3415                D,
3416                &mut self.fields,
3417                decoder,
3418                offset + 16,
3419                _depth
3420            )?;
3421            Ok(())
3422        }
3423    }
3424
3425    impl fidl::encoding::ValueTypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3426        type Borrowed<'a> = &'a Self;
3427        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3428            value
3429        }
3430    }
3431
3432    unsafe impl fidl::encoding::TypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3433        type Owned = Self;
3434
3435        #[inline(always)]
3436        fn inline_align(_context: fidl::encoding::Context) -> usize {
3437            8
3438        }
3439
3440        #[inline(always)]
3441        fn inline_size(_context: fidl::encoding::Context) -> usize {
3442            16
3443        }
3444    }
3445
3446    unsafe impl<D: fidl::encoding::ResourceDialect>
3447        fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D>
3448        for &ConfigOverrideUnsetStructuredConfigRequest
3449    {
3450        #[inline]
3451        unsafe fn encode(
3452            self,
3453            encoder: &mut fidl::encoding::Encoder<'_, D>,
3454            offset: usize,
3455            _depth: fidl::encoding::Depth,
3456        ) -> fidl::Result<()> {
3457            encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3458            // Delegate to tuple encoding.
3459            fidl::encoding::Encode::<ConfigOverrideUnsetStructuredConfigRequest, D>::encode(
3460                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3461                    &self.moniker,
3462                ),),
3463                encoder,
3464                offset,
3465                _depth,
3466            )
3467        }
3468    }
3469    unsafe impl<
3470        D: fidl::encoding::ResourceDialect,
3471        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3472    > fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D> for (T0,)
3473    {
3474        #[inline]
3475        unsafe fn encode(
3476            self,
3477            encoder: &mut fidl::encoding::Encoder<'_, D>,
3478            offset: usize,
3479            depth: fidl::encoding::Depth,
3480        ) -> fidl::Result<()> {
3481            encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3482            // Zero out padding regions. There's no need to apply masks
3483            // because the unmasked parts will be overwritten by fields.
3484            // Write the fields.
3485            self.0.encode(encoder, offset + 0, depth)?;
3486            Ok(())
3487        }
3488    }
3489
3490    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3491        for ConfigOverrideUnsetStructuredConfigRequest
3492    {
3493        #[inline(always)]
3494        fn new_empty() -> Self {
3495            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3496        }
3497
3498        #[inline]
3499        unsafe fn decode(
3500            &mut self,
3501            decoder: &mut fidl::encoding::Decoder<'_, D>,
3502            offset: usize,
3503            _depth: fidl::encoding::Depth,
3504        ) -> fidl::Result<()> {
3505            decoder.debug_check_bounds::<Self>(offset);
3506            // Verify that padding bytes are zero.
3507            fidl::decode!(
3508                fidl::encoding::BoundedString<4096>,
3509                D,
3510                &mut self.moniker,
3511                decoder,
3512                offset + 0,
3513                _depth
3514            )?;
3515            Ok(())
3516        }
3517    }
3518
3519    impl fidl::encoding::ValueTypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3520        type Borrowed<'a> = &'a Self;
3521        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3522            value
3523        }
3524    }
3525
3526    unsafe impl fidl::encoding::TypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3527        type Owned = Self;
3528
3529        #[inline(always)]
3530        fn inline_align(_context: fidl::encoding::Context) -> usize {
3531            8
3532        }
3533
3534        #[inline(always)]
3535        fn inline_size(_context: fidl::encoding::Context) -> usize {
3536            16
3537        }
3538    }
3539
3540    unsafe impl<D: fidl::encoding::ResourceDialect>
3541        fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D>
3542        for &CrashIntrospectFindComponentByThreadKoidResponse
3543    {
3544        #[inline]
3545        unsafe fn encode(
3546            self,
3547            encoder: &mut fidl::encoding::Encoder<'_, D>,
3548            offset: usize,
3549            _depth: fidl::encoding::Depth,
3550        ) -> fidl::Result<()> {
3551            encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3552            // Delegate to tuple encoding.
3553            fidl::encoding::Encode::<CrashIntrospectFindComponentByThreadKoidResponse, D>::encode(
3554                (<ComponentCrashInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3555                encoder,
3556                offset,
3557                _depth,
3558            )
3559        }
3560    }
3561    unsafe impl<
3562        D: fidl::encoding::ResourceDialect,
3563        T0: fidl::encoding::Encode<ComponentCrashInfo, D>,
3564    > fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D> for (T0,)
3565    {
3566        #[inline]
3567        unsafe fn encode(
3568            self,
3569            encoder: &mut fidl::encoding::Encoder<'_, D>,
3570            offset: usize,
3571            depth: fidl::encoding::Depth,
3572        ) -> fidl::Result<()> {
3573            encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3574            // Zero out padding regions. There's no need to apply masks
3575            // because the unmasked parts will be overwritten by fields.
3576            // Write the fields.
3577            self.0.encode(encoder, offset + 0, depth)?;
3578            Ok(())
3579        }
3580    }
3581
3582    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3583        for CrashIntrospectFindComponentByThreadKoidResponse
3584    {
3585        #[inline(always)]
3586        fn new_empty() -> Self {
3587            Self { info: fidl::new_empty!(ComponentCrashInfo, D) }
3588        }
3589
3590        #[inline]
3591        unsafe fn decode(
3592            &mut self,
3593            decoder: &mut fidl::encoding::Decoder<'_, D>,
3594            offset: usize,
3595            _depth: fidl::encoding::Depth,
3596        ) -> fidl::Result<()> {
3597            decoder.debug_check_bounds::<Self>(offset);
3598            // Verify that padding bytes are zero.
3599            fidl::decode!(ComponentCrashInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3600            Ok(())
3601        }
3602    }
3603
3604    impl fidl::encoding::ValueTypeMarker for InstanceIteratorNextResponse {
3605        type Borrowed<'a> = &'a Self;
3606        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3607            value
3608        }
3609    }
3610
3611    unsafe impl fidl::encoding::TypeMarker for InstanceIteratorNextResponse {
3612        type Owned = Self;
3613
3614        #[inline(always)]
3615        fn inline_align(_context: fidl::encoding::Context) -> usize {
3616            8
3617        }
3618
3619        #[inline(always)]
3620        fn inline_size(_context: fidl::encoding::Context) -> usize {
3621            16
3622        }
3623    }
3624
3625    unsafe impl<D: fidl::encoding::ResourceDialect>
3626        fidl::encoding::Encode<InstanceIteratorNextResponse, D> for &InstanceIteratorNextResponse
3627    {
3628        #[inline]
3629        unsafe fn encode(
3630            self,
3631            encoder: &mut fidl::encoding::Encoder<'_, D>,
3632            offset: usize,
3633            _depth: fidl::encoding::Depth,
3634        ) -> fidl::Result<()> {
3635            encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3636            // Delegate to tuple encoding.
3637            fidl::encoding::Encode::<InstanceIteratorNextResponse, D>::encode(
3638                (
3639                    <fidl::encoding::UnboundedVector<Instance> as fidl::encoding::ValueTypeMarker>::borrow(&self.infos),
3640                ),
3641                encoder, offset, _depth
3642            )
3643        }
3644    }
3645    unsafe impl<
3646        D: fidl::encoding::ResourceDialect,
3647        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Instance>, D>,
3648    > fidl::encoding::Encode<InstanceIteratorNextResponse, D> for (T0,)
3649    {
3650        #[inline]
3651        unsafe fn encode(
3652            self,
3653            encoder: &mut fidl::encoding::Encoder<'_, D>,
3654            offset: usize,
3655            depth: fidl::encoding::Depth,
3656        ) -> fidl::Result<()> {
3657            encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3658            // Zero out padding regions. There's no need to apply masks
3659            // because the unmasked parts will be overwritten by fields.
3660            // Write the fields.
3661            self.0.encode(encoder, offset + 0, depth)?;
3662            Ok(())
3663        }
3664    }
3665
3666    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3667        for InstanceIteratorNextResponse
3668    {
3669        #[inline(always)]
3670        fn new_empty() -> Self {
3671            Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<Instance>, D) }
3672        }
3673
3674        #[inline]
3675        unsafe fn decode(
3676            &mut self,
3677            decoder: &mut fidl::encoding::Decoder<'_, D>,
3678            offset: usize,
3679            _depth: fidl::encoding::Depth,
3680        ) -> fidl::Result<()> {
3681            decoder.debug_check_bounds::<Self>(offset);
3682            // Verify that padding bytes are zero.
3683            fidl::decode!(
3684                fidl::encoding::UnboundedVector<Instance>,
3685                D,
3686                &mut self.infos,
3687                decoder,
3688                offset + 0,
3689                _depth
3690            )?;
3691            Ok(())
3692        }
3693    }
3694
3695    impl fidl::encoding::ValueTypeMarker for LifecycleControllerDestroyInstanceRequest {
3696        type Borrowed<'a> = &'a Self;
3697        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3698            value
3699        }
3700    }
3701
3702    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerDestroyInstanceRequest {
3703        type Owned = Self;
3704
3705        #[inline(always)]
3706        fn inline_align(_context: fidl::encoding::Context) -> usize {
3707            8
3708        }
3709
3710        #[inline(always)]
3711        fn inline_size(_context: fidl::encoding::Context) -> usize {
3712            48
3713        }
3714    }
3715
3716    unsafe impl<D: fidl::encoding::ResourceDialect>
3717        fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D>
3718        for &LifecycleControllerDestroyInstanceRequest
3719    {
3720        #[inline]
3721        unsafe fn encode(
3722            self,
3723            encoder: &mut fidl::encoding::Encoder<'_, D>,
3724            offset: usize,
3725            _depth: fidl::encoding::Depth,
3726        ) -> fidl::Result<()> {
3727            encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3728            // Delegate to tuple encoding.
3729            fidl::encoding::Encode::<LifecycleControllerDestroyInstanceRequest, D>::encode(
3730                (
3731                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_moniker),
3732                    <fidl_fuchsia_component_decl_common::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
3733                ),
3734                encoder, offset, _depth
3735            )
3736        }
3737    }
3738    unsafe impl<
3739        D: fidl::encoding::ResourceDialect,
3740        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3741        T1: fidl::encoding::Encode<fidl_fuchsia_component_decl_common::ChildRef, D>,
3742    > fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D> for (T0, T1)
3743    {
3744        #[inline]
3745        unsafe fn encode(
3746            self,
3747            encoder: &mut fidl::encoding::Encoder<'_, D>,
3748            offset: usize,
3749            depth: fidl::encoding::Depth,
3750        ) -> fidl::Result<()> {
3751            encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3752            // Zero out padding regions. There's no need to apply masks
3753            // because the unmasked parts will be overwritten by fields.
3754            // Write the fields.
3755            self.0.encode(encoder, offset + 0, depth)?;
3756            self.1.encode(encoder, offset + 16, depth)?;
3757            Ok(())
3758        }
3759    }
3760
3761    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3762        for LifecycleControllerDestroyInstanceRequest
3763    {
3764        #[inline(always)]
3765        fn new_empty() -> Self {
3766            Self {
3767                parent_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3768                child: fidl::new_empty!(fidl_fuchsia_component_decl_common::ChildRef, D),
3769            }
3770        }
3771
3772        #[inline]
3773        unsafe fn decode(
3774            &mut self,
3775            decoder: &mut fidl::encoding::Decoder<'_, D>,
3776            offset: usize,
3777            _depth: fidl::encoding::Depth,
3778        ) -> fidl::Result<()> {
3779            decoder.debug_check_bounds::<Self>(offset);
3780            // Verify that padding bytes are zero.
3781            fidl::decode!(
3782                fidl::encoding::BoundedString<4096>,
3783                D,
3784                &mut self.parent_moniker,
3785                decoder,
3786                offset + 0,
3787                _depth
3788            )?;
3789            fidl::decode!(
3790                fidl_fuchsia_component_decl_common::ChildRef,
3791                D,
3792                &mut self.child,
3793                decoder,
3794                offset + 16,
3795                _depth
3796            )?;
3797            Ok(())
3798        }
3799    }
3800
3801    impl fidl::encoding::ValueTypeMarker for LifecycleControllerResolveInstanceRequest {
3802        type Borrowed<'a> = &'a Self;
3803        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3804            value
3805        }
3806    }
3807
3808    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerResolveInstanceRequest {
3809        type Owned = Self;
3810
3811        #[inline(always)]
3812        fn inline_align(_context: fidl::encoding::Context) -> usize {
3813            8
3814        }
3815
3816        #[inline(always)]
3817        fn inline_size(_context: fidl::encoding::Context) -> usize {
3818            16
3819        }
3820    }
3821
3822    unsafe impl<D: fidl::encoding::ResourceDialect>
3823        fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D>
3824        for &LifecycleControllerResolveInstanceRequest
3825    {
3826        #[inline]
3827        unsafe fn encode(
3828            self,
3829            encoder: &mut fidl::encoding::Encoder<'_, D>,
3830            offset: usize,
3831            _depth: fidl::encoding::Depth,
3832        ) -> fidl::Result<()> {
3833            encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3834            // Delegate to tuple encoding.
3835            fidl::encoding::Encode::<LifecycleControllerResolveInstanceRequest, D>::encode(
3836                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3837                    &self.moniker,
3838                ),),
3839                encoder,
3840                offset,
3841                _depth,
3842            )
3843        }
3844    }
3845    unsafe impl<
3846        D: fidl::encoding::ResourceDialect,
3847        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3848    > fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D> for (T0,)
3849    {
3850        #[inline]
3851        unsafe fn encode(
3852            self,
3853            encoder: &mut fidl::encoding::Encoder<'_, D>,
3854            offset: usize,
3855            depth: fidl::encoding::Depth,
3856        ) -> fidl::Result<()> {
3857            encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3858            // Zero out padding regions. There's no need to apply masks
3859            // because the unmasked parts will be overwritten by fields.
3860            // Write the fields.
3861            self.0.encode(encoder, offset + 0, depth)?;
3862            Ok(())
3863        }
3864    }
3865
3866    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3867        for LifecycleControllerResolveInstanceRequest
3868    {
3869        #[inline(always)]
3870        fn new_empty() -> Self {
3871            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3872        }
3873
3874        #[inline]
3875        unsafe fn decode(
3876            &mut self,
3877            decoder: &mut fidl::encoding::Decoder<'_, D>,
3878            offset: usize,
3879            _depth: fidl::encoding::Depth,
3880        ) -> fidl::Result<()> {
3881            decoder.debug_check_bounds::<Self>(offset);
3882            // Verify that padding bytes are zero.
3883            fidl::decode!(
3884                fidl::encoding::BoundedString<4096>,
3885                D,
3886                &mut self.moniker,
3887                decoder,
3888                offset + 0,
3889                _depth
3890            )?;
3891            Ok(())
3892        }
3893    }
3894
3895    impl fidl::encoding::ValueTypeMarker for LifecycleControllerStopInstanceRequest {
3896        type Borrowed<'a> = &'a Self;
3897        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3898            value
3899        }
3900    }
3901
3902    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStopInstanceRequest {
3903        type Owned = Self;
3904
3905        #[inline(always)]
3906        fn inline_align(_context: fidl::encoding::Context) -> usize {
3907            8
3908        }
3909
3910        #[inline(always)]
3911        fn inline_size(_context: fidl::encoding::Context) -> usize {
3912            16
3913        }
3914    }
3915
3916    unsafe impl<D: fidl::encoding::ResourceDialect>
3917        fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D>
3918        for &LifecycleControllerStopInstanceRequest
3919    {
3920        #[inline]
3921        unsafe fn encode(
3922            self,
3923            encoder: &mut fidl::encoding::Encoder<'_, D>,
3924            offset: usize,
3925            _depth: fidl::encoding::Depth,
3926        ) -> fidl::Result<()> {
3927            encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3928            // Delegate to tuple encoding.
3929            fidl::encoding::Encode::<LifecycleControllerStopInstanceRequest, D>::encode(
3930                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3931                    &self.moniker,
3932                ),),
3933                encoder,
3934                offset,
3935                _depth,
3936            )
3937        }
3938    }
3939    unsafe impl<
3940        D: fidl::encoding::ResourceDialect,
3941        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3942    > fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D> for (T0,)
3943    {
3944        #[inline]
3945        unsafe fn encode(
3946            self,
3947            encoder: &mut fidl::encoding::Encoder<'_, D>,
3948            offset: usize,
3949            depth: fidl::encoding::Depth,
3950        ) -> fidl::Result<()> {
3951            encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3952            // Zero out padding regions. There's no need to apply masks
3953            // because the unmasked parts will be overwritten by fields.
3954            // Write the fields.
3955            self.0.encode(encoder, offset + 0, depth)?;
3956            Ok(())
3957        }
3958    }
3959
3960    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3961        for LifecycleControllerStopInstanceRequest
3962    {
3963        #[inline(always)]
3964        fn new_empty() -> Self {
3965            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3966        }
3967
3968        #[inline]
3969        unsafe fn decode(
3970            &mut self,
3971            decoder: &mut fidl::encoding::Decoder<'_, D>,
3972            offset: usize,
3973            _depth: fidl::encoding::Depth,
3974        ) -> fidl::Result<()> {
3975            decoder.debug_check_bounds::<Self>(offset);
3976            // Verify that padding bytes are zero.
3977            fidl::decode!(
3978                fidl::encoding::BoundedString<4096>,
3979                D,
3980                &mut self.moniker,
3981                decoder,
3982                offset + 0,
3983                _depth
3984            )?;
3985            Ok(())
3986        }
3987    }
3988
3989    impl fidl::encoding::ValueTypeMarker for LifecycleControllerUnresolveInstanceRequest {
3990        type Borrowed<'a> = &'a Self;
3991        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3992            value
3993        }
3994    }
3995
3996    unsafe impl fidl::encoding::TypeMarker for LifecycleControllerUnresolveInstanceRequest {
3997        type Owned = Self;
3998
3999        #[inline(always)]
4000        fn inline_align(_context: fidl::encoding::Context) -> usize {
4001            8
4002        }
4003
4004        #[inline(always)]
4005        fn inline_size(_context: fidl::encoding::Context) -> usize {
4006            16
4007        }
4008    }
4009
4010    unsafe impl<D: fidl::encoding::ResourceDialect>
4011        fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D>
4012        for &LifecycleControllerUnresolveInstanceRequest
4013    {
4014        #[inline]
4015        unsafe fn encode(
4016            self,
4017            encoder: &mut fidl::encoding::Encoder<'_, D>,
4018            offset: usize,
4019            _depth: fidl::encoding::Depth,
4020        ) -> fidl::Result<()> {
4021            encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4022            // Delegate to tuple encoding.
4023            fidl::encoding::Encode::<LifecycleControllerUnresolveInstanceRequest, D>::encode(
4024                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4025                    &self.moniker,
4026                ),),
4027                encoder,
4028                offset,
4029                _depth,
4030            )
4031        }
4032    }
4033    unsafe impl<
4034        D: fidl::encoding::ResourceDialect,
4035        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4036    > fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D> for (T0,)
4037    {
4038        #[inline]
4039        unsafe fn encode(
4040            self,
4041            encoder: &mut fidl::encoding::Encoder<'_, D>,
4042            offset: usize,
4043            depth: fidl::encoding::Depth,
4044        ) -> fidl::Result<()> {
4045            encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4046            // Zero out padding regions. There's no need to apply masks
4047            // because the unmasked parts will be overwritten by fields.
4048            // Write the fields.
4049            self.0.encode(encoder, offset + 0, depth)?;
4050            Ok(())
4051        }
4052    }
4053
4054    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4055        for LifecycleControllerUnresolveInstanceRequest
4056    {
4057        #[inline(always)]
4058        fn new_empty() -> Self {
4059            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4060        }
4061
4062        #[inline]
4063        unsafe fn decode(
4064            &mut self,
4065            decoder: &mut fidl::encoding::Decoder<'_, D>,
4066            offset: usize,
4067            _depth: fidl::encoding::Depth,
4068        ) -> fidl::Result<()> {
4069            decoder.debug_check_bounds::<Self>(offset);
4070            // Verify that padding bytes are zero.
4071            fidl::decode!(
4072                fidl::encoding::BoundedString<4096>,
4073                D,
4074                &mut self.moniker,
4075                decoder,
4076                offset + 0,
4077                _depth
4078            )?;
4079            Ok(())
4080        }
4081    }
4082
4083    impl fidl::encoding::ValueTypeMarker for ManifestBytesIteratorNextResponse {
4084        type Borrowed<'a> = &'a Self;
4085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4086            value
4087        }
4088    }
4089
4090    unsafe impl fidl::encoding::TypeMarker for ManifestBytesIteratorNextResponse {
4091        type Owned = Self;
4092
4093        #[inline(always)]
4094        fn inline_align(_context: fidl::encoding::Context) -> usize {
4095            8
4096        }
4097
4098        #[inline(always)]
4099        fn inline_size(_context: fidl::encoding::Context) -> usize {
4100            16
4101        }
4102    }
4103
4104    unsafe impl<D: fidl::encoding::ResourceDialect>
4105        fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D>
4106        for &ManifestBytesIteratorNextResponse
4107    {
4108        #[inline]
4109        unsafe fn encode(
4110            self,
4111            encoder: &mut fidl::encoding::Encoder<'_, D>,
4112            offset: usize,
4113            _depth: fidl::encoding::Depth,
4114        ) -> fidl::Result<()> {
4115            encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4116            // Delegate to tuple encoding.
4117            fidl::encoding::Encode::<ManifestBytesIteratorNextResponse, D>::encode(
4118                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
4119                    &self.infos,
4120                ),),
4121                encoder,
4122                offset,
4123                _depth,
4124            )
4125        }
4126    }
4127    unsafe impl<
4128        D: fidl::encoding::ResourceDialect,
4129        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4130    > fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D> for (T0,)
4131    {
4132        #[inline]
4133        unsafe fn encode(
4134            self,
4135            encoder: &mut fidl::encoding::Encoder<'_, D>,
4136            offset: usize,
4137            depth: fidl::encoding::Depth,
4138        ) -> fidl::Result<()> {
4139            encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4140            // Zero out padding regions. There's no need to apply masks
4141            // because the unmasked parts will be overwritten by fields.
4142            // Write the fields.
4143            self.0.encode(encoder, offset + 0, depth)?;
4144            Ok(())
4145        }
4146    }
4147
4148    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4149        for ManifestBytesIteratorNextResponse
4150    {
4151        #[inline(always)]
4152        fn new_empty() -> Self {
4153            Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
4154        }
4155
4156        #[inline]
4157        unsafe fn decode(
4158            &mut self,
4159            decoder: &mut fidl::encoding::Decoder<'_, D>,
4160            offset: usize,
4161            _depth: fidl::encoding::Depth,
4162        ) -> fidl::Result<()> {
4163            decoder.debug_check_bounds::<Self>(offset);
4164            // Verify that padding bytes are zero.
4165            fidl::decode!(
4166                fidl::encoding::UnboundedVector<u8>,
4167                D,
4168                &mut self.infos,
4169                decoder,
4170                offset + 0,
4171                _depth
4172            )?;
4173            Ok(())
4174        }
4175    }
4176
4177    impl fidl::encoding::ValueTypeMarker for RealmQueryConstructNamespaceRequest {
4178        type Borrowed<'a> = &'a Self;
4179        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4180            value
4181        }
4182    }
4183
4184    unsafe impl fidl::encoding::TypeMarker for RealmQueryConstructNamespaceRequest {
4185        type Owned = Self;
4186
4187        #[inline(always)]
4188        fn inline_align(_context: fidl::encoding::Context) -> usize {
4189            8
4190        }
4191
4192        #[inline(always)]
4193        fn inline_size(_context: fidl::encoding::Context) -> usize {
4194            16
4195        }
4196    }
4197
4198    unsafe impl<D: fidl::encoding::ResourceDialect>
4199        fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D>
4200        for &RealmQueryConstructNamespaceRequest
4201    {
4202        #[inline]
4203        unsafe fn encode(
4204            self,
4205            encoder: &mut fidl::encoding::Encoder<'_, D>,
4206            offset: usize,
4207            _depth: fidl::encoding::Depth,
4208        ) -> fidl::Result<()> {
4209            encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4210            // Delegate to tuple encoding.
4211            fidl::encoding::Encode::<RealmQueryConstructNamespaceRequest, D>::encode(
4212                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4213                    &self.moniker,
4214                ),),
4215                encoder,
4216                offset,
4217                _depth,
4218            )
4219        }
4220    }
4221    unsafe impl<
4222        D: fidl::encoding::ResourceDialect,
4223        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4224    > fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D> for (T0,)
4225    {
4226        #[inline]
4227        unsafe fn encode(
4228            self,
4229            encoder: &mut fidl::encoding::Encoder<'_, D>,
4230            offset: usize,
4231            depth: fidl::encoding::Depth,
4232        ) -> fidl::Result<()> {
4233            encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4234            // Zero out padding regions. There's no need to apply masks
4235            // because the unmasked parts will be overwritten by fields.
4236            // Write the fields.
4237            self.0.encode(encoder, offset + 0, depth)?;
4238            Ok(())
4239        }
4240    }
4241
4242    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4243        for RealmQueryConstructNamespaceRequest
4244    {
4245        #[inline(always)]
4246        fn new_empty() -> Self {
4247            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4248        }
4249
4250        #[inline]
4251        unsafe fn decode(
4252            &mut self,
4253            decoder: &mut fidl::encoding::Decoder<'_, D>,
4254            offset: usize,
4255            _depth: fidl::encoding::Depth,
4256        ) -> fidl::Result<()> {
4257            decoder.debug_check_bounds::<Self>(offset);
4258            // Verify that padding bytes are zero.
4259            fidl::decode!(
4260                fidl::encoding::BoundedString<4096>,
4261                D,
4262                &mut self.moniker,
4263                decoder,
4264                offset + 0,
4265                _depth
4266            )?;
4267            Ok(())
4268        }
4269    }
4270
4271    impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceRequest {
4272        type Borrowed<'a> = &'a Self;
4273        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4274            value
4275        }
4276    }
4277
4278    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceRequest {
4279        type Owned = Self;
4280
4281        #[inline(always)]
4282        fn inline_align(_context: fidl::encoding::Context) -> usize {
4283            8
4284        }
4285
4286        #[inline(always)]
4287        fn inline_size(_context: fidl::encoding::Context) -> usize {
4288            16
4289        }
4290    }
4291
4292    unsafe impl<D: fidl::encoding::ResourceDialect>
4293        fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for &RealmQueryGetInstanceRequest
4294    {
4295        #[inline]
4296        unsafe fn encode(
4297            self,
4298            encoder: &mut fidl::encoding::Encoder<'_, D>,
4299            offset: usize,
4300            _depth: fidl::encoding::Depth,
4301        ) -> fidl::Result<()> {
4302            encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4303            // Delegate to tuple encoding.
4304            fidl::encoding::Encode::<RealmQueryGetInstanceRequest, D>::encode(
4305                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4306                    &self.moniker,
4307                ),),
4308                encoder,
4309                offset,
4310                _depth,
4311            )
4312        }
4313    }
4314    unsafe impl<
4315        D: fidl::encoding::ResourceDialect,
4316        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4317    > fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for (T0,)
4318    {
4319        #[inline]
4320        unsafe fn encode(
4321            self,
4322            encoder: &mut fidl::encoding::Encoder<'_, D>,
4323            offset: usize,
4324            depth: fidl::encoding::Depth,
4325        ) -> fidl::Result<()> {
4326            encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4327            // Zero out padding regions. There's no need to apply masks
4328            // because the unmasked parts will be overwritten by fields.
4329            // Write the fields.
4330            self.0.encode(encoder, offset + 0, depth)?;
4331            Ok(())
4332        }
4333    }
4334
4335    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4336        for RealmQueryGetInstanceRequest
4337    {
4338        #[inline(always)]
4339        fn new_empty() -> Self {
4340            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4341        }
4342
4343        #[inline]
4344        unsafe fn decode(
4345            &mut self,
4346            decoder: &mut fidl::encoding::Decoder<'_, D>,
4347            offset: usize,
4348            _depth: fidl::encoding::Depth,
4349        ) -> fidl::Result<()> {
4350            decoder.debug_check_bounds::<Self>(offset);
4351            // Verify that padding bytes are zero.
4352            fidl::decode!(
4353                fidl::encoding::BoundedString<4096>,
4354                D,
4355                &mut self.moniker,
4356                decoder,
4357                offset + 0,
4358                _depth
4359            )?;
4360            Ok(())
4361        }
4362    }
4363
4364    impl fidl::encoding::ValueTypeMarker for RealmQueryGetResolvedDeclarationRequest {
4365        type Borrowed<'a> = &'a Self;
4366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4367            value
4368        }
4369    }
4370
4371    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetResolvedDeclarationRequest {
4372        type Owned = Self;
4373
4374        #[inline(always)]
4375        fn inline_align(_context: fidl::encoding::Context) -> usize {
4376            8
4377        }
4378
4379        #[inline(always)]
4380        fn inline_size(_context: fidl::encoding::Context) -> usize {
4381            16
4382        }
4383    }
4384
4385    unsafe impl<D: fidl::encoding::ResourceDialect>
4386        fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D>
4387        for &RealmQueryGetResolvedDeclarationRequest
4388    {
4389        #[inline]
4390        unsafe fn encode(
4391            self,
4392            encoder: &mut fidl::encoding::Encoder<'_, D>,
4393            offset: usize,
4394            _depth: fidl::encoding::Depth,
4395        ) -> fidl::Result<()> {
4396            encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4397            // Delegate to tuple encoding.
4398            fidl::encoding::Encode::<RealmQueryGetResolvedDeclarationRequest, D>::encode(
4399                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4400                    &self.moniker,
4401                ),),
4402                encoder,
4403                offset,
4404                _depth,
4405            )
4406        }
4407    }
4408    unsafe impl<
4409        D: fidl::encoding::ResourceDialect,
4410        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4411    > fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D> for (T0,)
4412    {
4413        #[inline]
4414        unsafe fn encode(
4415            self,
4416            encoder: &mut fidl::encoding::Encoder<'_, D>,
4417            offset: usize,
4418            depth: fidl::encoding::Depth,
4419        ) -> fidl::Result<()> {
4420            encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4421            // Zero out padding regions. There's no need to apply masks
4422            // because the unmasked parts will be overwritten by fields.
4423            // Write the fields.
4424            self.0.encode(encoder, offset + 0, depth)?;
4425            Ok(())
4426        }
4427    }
4428
4429    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4430        for RealmQueryGetResolvedDeclarationRequest
4431    {
4432        #[inline(always)]
4433        fn new_empty() -> Self {
4434            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4435        }
4436
4437        #[inline]
4438        unsafe fn decode(
4439            &mut self,
4440            decoder: &mut fidl::encoding::Decoder<'_, D>,
4441            offset: usize,
4442            _depth: fidl::encoding::Depth,
4443        ) -> fidl::Result<()> {
4444            decoder.debug_check_bounds::<Self>(offset);
4445            // Verify that padding bytes are zero.
4446            fidl::decode!(
4447                fidl::encoding::BoundedString<4096>,
4448                D,
4449                &mut self.moniker,
4450                decoder,
4451                offset + 0,
4452                _depth
4453            )?;
4454            Ok(())
4455        }
4456    }
4457
4458    impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigRequest {
4459        type Borrowed<'a> = &'a Self;
4460        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4461            value
4462        }
4463    }
4464
4465    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigRequest {
4466        type Owned = Self;
4467
4468        #[inline(always)]
4469        fn inline_align(_context: fidl::encoding::Context) -> usize {
4470            8
4471        }
4472
4473        #[inline(always)]
4474        fn inline_size(_context: fidl::encoding::Context) -> usize {
4475            16
4476        }
4477    }
4478
4479    unsafe impl<D: fidl::encoding::ResourceDialect>
4480        fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D>
4481        for &RealmQueryGetStructuredConfigRequest
4482    {
4483        #[inline]
4484        unsafe fn encode(
4485            self,
4486            encoder: &mut fidl::encoding::Encoder<'_, D>,
4487            offset: usize,
4488            _depth: fidl::encoding::Depth,
4489        ) -> fidl::Result<()> {
4490            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4491            // Delegate to tuple encoding.
4492            fidl::encoding::Encode::<RealmQueryGetStructuredConfigRequest, D>::encode(
4493                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4494                    &self.moniker,
4495                ),),
4496                encoder,
4497                offset,
4498                _depth,
4499            )
4500        }
4501    }
4502    unsafe impl<
4503        D: fidl::encoding::ResourceDialect,
4504        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4505    > fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D> for (T0,)
4506    {
4507        #[inline]
4508        unsafe fn encode(
4509            self,
4510            encoder: &mut fidl::encoding::Encoder<'_, D>,
4511            offset: usize,
4512            depth: fidl::encoding::Depth,
4513        ) -> fidl::Result<()> {
4514            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4515            // Zero out padding regions. There's no need to apply masks
4516            // because the unmasked parts will be overwritten by fields.
4517            // Write the fields.
4518            self.0.encode(encoder, offset + 0, depth)?;
4519            Ok(())
4520        }
4521    }
4522
4523    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4524        for RealmQueryGetStructuredConfigRequest
4525    {
4526        #[inline(always)]
4527        fn new_empty() -> Self {
4528            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4529        }
4530
4531        #[inline]
4532        unsafe fn decode(
4533            &mut self,
4534            decoder: &mut fidl::encoding::Decoder<'_, D>,
4535            offset: usize,
4536            _depth: fidl::encoding::Depth,
4537        ) -> fidl::Result<()> {
4538            decoder.debug_check_bounds::<Self>(offset);
4539            // Verify that padding bytes are zero.
4540            fidl::decode!(
4541                fidl::encoding::BoundedString<4096>,
4542                D,
4543                &mut self.moniker,
4544                decoder,
4545                offset + 0,
4546                _depth
4547            )?;
4548            Ok(())
4549        }
4550    }
4551
4552    impl fidl::encoding::ValueTypeMarker for RealmQueryResolveDeclarationRequest {
4553        type Borrowed<'a> = &'a Self;
4554        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4555            value
4556        }
4557    }
4558
4559    unsafe impl fidl::encoding::TypeMarker for RealmQueryResolveDeclarationRequest {
4560        type Owned = Self;
4561
4562        #[inline(always)]
4563        fn inline_align(_context: fidl::encoding::Context) -> usize {
4564            8
4565        }
4566
4567        #[inline(always)]
4568        fn inline_size(_context: fidl::encoding::Context) -> usize {
4569            48
4570        }
4571    }
4572
4573    unsafe impl<D: fidl::encoding::ResourceDialect>
4574        fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D>
4575        for &RealmQueryResolveDeclarationRequest
4576    {
4577        #[inline]
4578        unsafe fn encode(
4579            self,
4580            encoder: &mut fidl::encoding::Encoder<'_, D>,
4581            offset: usize,
4582            _depth: fidl::encoding::Depth,
4583        ) -> fidl::Result<()> {
4584            encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4585            // Delegate to tuple encoding.
4586            fidl::encoding::Encode::<RealmQueryResolveDeclarationRequest, D>::encode(
4587                (
4588                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
4589                    <ChildLocation as fidl::encoding::ValueTypeMarker>::borrow(&self.child_location),
4590                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
4591                ),
4592                encoder, offset, _depth
4593            )
4594        }
4595    }
4596    unsafe impl<
4597        D: fidl::encoding::ResourceDialect,
4598        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4599        T1: fidl::encoding::Encode<ChildLocation, D>,
4600        T2: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4601    > fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D> for (T0, T1, T2)
4602    {
4603        #[inline]
4604        unsafe fn encode(
4605            self,
4606            encoder: &mut fidl::encoding::Encoder<'_, D>,
4607            offset: usize,
4608            depth: fidl::encoding::Depth,
4609        ) -> fidl::Result<()> {
4610            encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4611            // Zero out padding regions. There's no need to apply masks
4612            // because the unmasked parts will be overwritten by fields.
4613            // Write the fields.
4614            self.0.encode(encoder, offset + 0, depth)?;
4615            self.1.encode(encoder, offset + 16, depth)?;
4616            self.2.encode(encoder, offset + 32, depth)?;
4617            Ok(())
4618        }
4619    }
4620
4621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4622        for RealmQueryResolveDeclarationRequest
4623    {
4624        #[inline(always)]
4625        fn new_empty() -> Self {
4626            Self {
4627                parent: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4628                child_location: fidl::new_empty!(ChildLocation, D),
4629                url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4630            }
4631        }
4632
4633        #[inline]
4634        unsafe fn decode(
4635            &mut self,
4636            decoder: &mut fidl::encoding::Decoder<'_, D>,
4637            offset: usize,
4638            _depth: fidl::encoding::Depth,
4639        ) -> fidl::Result<()> {
4640            decoder.debug_check_bounds::<Self>(offset);
4641            // Verify that padding bytes are zero.
4642            fidl::decode!(
4643                fidl::encoding::BoundedString<4096>,
4644                D,
4645                &mut self.parent,
4646                decoder,
4647                offset + 0,
4648                _depth
4649            )?;
4650            fidl::decode!(
4651                ChildLocation,
4652                D,
4653                &mut self.child_location,
4654                decoder,
4655                offset + 16,
4656                _depth
4657            )?;
4658            fidl::decode!(
4659                fidl::encoding::BoundedString<4096>,
4660                D,
4661                &mut self.url,
4662                decoder,
4663                offset + 32,
4664                _depth
4665            )?;
4666            Ok(())
4667        }
4668    }
4669
4670    impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceResponse {
4671        type Borrowed<'a> = &'a Self;
4672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4673            value
4674        }
4675    }
4676
4677    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceResponse {
4678        type Owned = Self;
4679
4680        #[inline(always)]
4681        fn inline_align(_context: fidl::encoding::Context) -> usize {
4682            8
4683        }
4684
4685        #[inline(always)]
4686        fn inline_size(_context: fidl::encoding::Context) -> usize {
4687            16
4688        }
4689    }
4690
4691    unsafe impl<D: fidl::encoding::ResourceDialect>
4692        fidl::encoding::Encode<RealmQueryGetInstanceResponse, D>
4693        for &RealmQueryGetInstanceResponse
4694    {
4695        #[inline]
4696        unsafe fn encode(
4697            self,
4698            encoder: &mut fidl::encoding::Encoder<'_, D>,
4699            offset: usize,
4700            _depth: fidl::encoding::Depth,
4701        ) -> fidl::Result<()> {
4702            encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4703            // Delegate to tuple encoding.
4704            fidl::encoding::Encode::<RealmQueryGetInstanceResponse, D>::encode(
4705                (<Instance as fidl::encoding::ValueTypeMarker>::borrow(&self.instance),),
4706                encoder,
4707                offset,
4708                _depth,
4709            )
4710        }
4711    }
4712    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Instance, D>>
4713        fidl::encoding::Encode<RealmQueryGetInstanceResponse, D> for (T0,)
4714    {
4715        #[inline]
4716        unsafe fn encode(
4717            self,
4718            encoder: &mut fidl::encoding::Encoder<'_, D>,
4719            offset: usize,
4720            depth: fidl::encoding::Depth,
4721        ) -> fidl::Result<()> {
4722            encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4723            // Zero out padding regions. There's no need to apply masks
4724            // because the unmasked parts will be overwritten by fields.
4725            // Write the fields.
4726            self.0.encode(encoder, offset + 0, depth)?;
4727            Ok(())
4728        }
4729    }
4730
4731    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4732        for RealmQueryGetInstanceResponse
4733    {
4734        #[inline(always)]
4735        fn new_empty() -> Self {
4736            Self { instance: fidl::new_empty!(Instance, D) }
4737        }
4738
4739        #[inline]
4740        unsafe fn decode(
4741            &mut self,
4742            decoder: &mut fidl::encoding::Decoder<'_, D>,
4743            offset: usize,
4744            _depth: fidl::encoding::Depth,
4745        ) -> fidl::Result<()> {
4746            decoder.debug_check_bounds::<Self>(offset);
4747            // Verify that padding bytes are zero.
4748            fidl::decode!(Instance, D, &mut self.instance, decoder, offset + 0, _depth)?;
4749            Ok(())
4750        }
4751    }
4752
4753    impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigResponse {
4754        type Borrowed<'a> = &'a Self;
4755        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4756            value
4757        }
4758    }
4759
4760    unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigResponse {
4761        type Owned = Self;
4762
4763        #[inline(always)]
4764        fn inline_align(_context: fidl::encoding::Context) -> usize {
4765            8
4766        }
4767
4768        #[inline(always)]
4769        fn inline_size(_context: fidl::encoding::Context) -> usize {
4770            32
4771        }
4772    }
4773
4774    unsafe impl<D: fidl::encoding::ResourceDialect>
4775        fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D>
4776        for &RealmQueryGetStructuredConfigResponse
4777    {
4778        #[inline]
4779        unsafe fn encode(
4780            self,
4781            encoder: &mut fidl::encoding::Encoder<'_, D>,
4782            offset: usize,
4783            _depth: fidl::encoding::Depth,
4784        ) -> fidl::Result<()> {
4785            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4786            // Delegate to tuple encoding.
4787            fidl::encoding::Encode::<RealmQueryGetStructuredConfigResponse, D>::encode(
4788                (
4789                    <fidl_fuchsia_component_decl_common::ResolvedConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
4790                ),
4791                encoder, offset, _depth
4792            )
4793        }
4794    }
4795    unsafe impl<
4796        D: fidl::encoding::ResourceDialect,
4797        T0: fidl::encoding::Encode<fidl_fuchsia_component_decl_common::ResolvedConfig, D>,
4798    > fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D> for (T0,)
4799    {
4800        #[inline]
4801        unsafe fn encode(
4802            self,
4803            encoder: &mut fidl::encoding::Encoder<'_, D>,
4804            offset: usize,
4805            depth: fidl::encoding::Depth,
4806        ) -> fidl::Result<()> {
4807            encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4808            // Zero out padding regions. There's no need to apply masks
4809            // because the unmasked parts will be overwritten by fields.
4810            // Write the fields.
4811            self.0.encode(encoder, offset + 0, depth)?;
4812            Ok(())
4813        }
4814    }
4815
4816    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4817        for RealmQueryGetStructuredConfigResponse
4818    {
4819        #[inline(always)]
4820        fn new_empty() -> Self {
4821            Self { config: fidl::new_empty!(fidl_fuchsia_component_decl_common::ResolvedConfig, D) }
4822        }
4823
4824        #[inline]
4825        unsafe fn decode(
4826            &mut self,
4827            decoder: &mut fidl::encoding::Decoder<'_, D>,
4828            offset: usize,
4829            _depth: fidl::encoding::Depth,
4830        ) -> fidl::Result<()> {
4831            decoder.debug_check_bounds::<Self>(offset);
4832            // Verify that padding bytes are zero.
4833            fidl::decode!(
4834                fidl_fuchsia_component_decl_common::ResolvedConfig,
4835                D,
4836                &mut self.config,
4837                decoder,
4838                offset + 0,
4839                _depth
4840            )?;
4841            Ok(())
4842        }
4843    }
4844
4845    impl fidl::encoding::ValueTypeMarker for RouteTarget {
4846        type Borrowed<'a> = &'a Self;
4847        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4848            value
4849        }
4850    }
4851
4852    unsafe impl fidl::encoding::TypeMarker for RouteTarget {
4853        type Owned = Self;
4854
4855        #[inline(always)]
4856        fn inline_align(_context: fidl::encoding::Context) -> usize {
4857            8
4858        }
4859
4860        #[inline(always)]
4861        fn inline_size(_context: fidl::encoding::Context) -> usize {
4862            24
4863        }
4864    }
4865
4866    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteTarget, D>
4867        for &RouteTarget
4868    {
4869        #[inline]
4870        unsafe fn encode(
4871            self,
4872            encoder: &mut fidl::encoding::Encoder<'_, D>,
4873            offset: usize,
4874            _depth: fidl::encoding::Depth,
4875        ) -> fidl::Result<()> {
4876            encoder.debug_check_bounds::<RouteTarget>(offset);
4877            // Delegate to tuple encoding.
4878            fidl::encoding::Encode::<RouteTarget, D>::encode(
4879                (
4880                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4881                        &self.name,
4882                    ),
4883                    <DeclType as fidl::encoding::ValueTypeMarker>::borrow(&self.decl_type),
4884                ),
4885                encoder,
4886                offset,
4887                _depth,
4888            )
4889        }
4890    }
4891    unsafe impl<
4892        D: fidl::encoding::ResourceDialect,
4893        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4894        T1: fidl::encoding::Encode<DeclType, D>,
4895    > fidl::encoding::Encode<RouteTarget, D> for (T0, T1)
4896    {
4897        #[inline]
4898        unsafe fn encode(
4899            self,
4900            encoder: &mut fidl::encoding::Encoder<'_, D>,
4901            offset: usize,
4902            depth: fidl::encoding::Depth,
4903        ) -> fidl::Result<()> {
4904            encoder.debug_check_bounds::<RouteTarget>(offset);
4905            // Zero out padding regions. There's no need to apply masks
4906            // because the unmasked parts will be overwritten by fields.
4907            unsafe {
4908                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4909                (ptr as *mut u64).write_unaligned(0);
4910            }
4911            // Write the fields.
4912            self.0.encode(encoder, offset + 0, depth)?;
4913            self.1.encode(encoder, offset + 16, depth)?;
4914            Ok(())
4915        }
4916    }
4917
4918    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteTarget {
4919        #[inline(always)]
4920        fn new_empty() -> Self {
4921            Self {
4922                name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4923                decl_type: fidl::new_empty!(DeclType, D),
4924            }
4925        }
4926
4927        #[inline]
4928        unsafe fn decode(
4929            &mut self,
4930            decoder: &mut fidl::encoding::Decoder<'_, D>,
4931            offset: usize,
4932            _depth: fidl::encoding::Depth,
4933        ) -> fidl::Result<()> {
4934            decoder.debug_check_bounds::<Self>(offset);
4935            // Verify that padding bytes are zero.
4936            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4937            let padval = unsafe { (ptr as *const u64).read_unaligned() };
4938            let mask = 0xffffffff00000000u64;
4939            let maskedval = padval & mask;
4940            if maskedval != 0 {
4941                return Err(fidl::Error::NonZeroPadding {
4942                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4943                });
4944            }
4945            fidl::decode!(
4946                fidl::encoding::BoundedString<255>,
4947                D,
4948                &mut self.name,
4949                decoder,
4950                offset + 0,
4951                _depth
4952            )?;
4953            fidl::decode!(DeclType, D, &mut self.decl_type, decoder, offset + 16, _depth)?;
4954            Ok(())
4955        }
4956    }
4957
4958    impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteRequest {
4959        type Borrowed<'a> = &'a Self;
4960        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4961            value
4962        }
4963    }
4964
4965    unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteRequest {
4966        type Owned = Self;
4967
4968        #[inline(always)]
4969        fn inline_align(_context: fidl::encoding::Context) -> usize {
4970            8
4971        }
4972
4973        #[inline(always)]
4974        fn inline_size(_context: fidl::encoding::Context) -> usize {
4975            32
4976        }
4977    }
4978
4979    unsafe impl<D: fidl::encoding::ResourceDialect>
4980        fidl::encoding::Encode<RouteValidatorRouteRequest, D> for &RouteValidatorRouteRequest
4981    {
4982        #[inline]
4983        unsafe fn encode(
4984            self,
4985            encoder: &mut fidl::encoding::Encoder<'_, D>,
4986            offset: usize,
4987            _depth: fidl::encoding::Depth,
4988        ) -> fidl::Result<()> {
4989            encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
4990            // Delegate to tuple encoding.
4991            fidl::encoding::Encode::<RouteValidatorRouteRequest, D>::encode(
4992                (
4993                    <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
4994                    <fidl::encoding::UnboundedVector<RouteTarget> as fidl::encoding::ValueTypeMarker>::borrow(&self.targets),
4995                ),
4996                encoder, offset, _depth
4997            )
4998        }
4999    }
5000    unsafe impl<
5001        D: fidl::encoding::ResourceDialect,
5002        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5003        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteTarget>, D>,
5004    > fidl::encoding::Encode<RouteValidatorRouteRequest, D> for (T0, T1)
5005    {
5006        #[inline]
5007        unsafe fn encode(
5008            self,
5009            encoder: &mut fidl::encoding::Encoder<'_, D>,
5010            offset: usize,
5011            depth: fidl::encoding::Depth,
5012        ) -> fidl::Result<()> {
5013            encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
5014            // Zero out padding regions. There's no need to apply masks
5015            // because the unmasked parts will be overwritten by fields.
5016            // Write the fields.
5017            self.0.encode(encoder, offset + 0, depth)?;
5018            self.1.encode(encoder, offset + 16, depth)?;
5019            Ok(())
5020        }
5021    }
5022
5023    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5024        for RouteValidatorRouteRequest
5025    {
5026        #[inline(always)]
5027        fn new_empty() -> Self {
5028            Self {
5029                moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
5030                targets: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteTarget>, D),
5031            }
5032        }
5033
5034        #[inline]
5035        unsafe fn decode(
5036            &mut self,
5037            decoder: &mut fidl::encoding::Decoder<'_, D>,
5038            offset: usize,
5039            _depth: fidl::encoding::Depth,
5040        ) -> fidl::Result<()> {
5041            decoder.debug_check_bounds::<Self>(offset);
5042            // Verify that padding bytes are zero.
5043            fidl::decode!(
5044                fidl::encoding::BoundedString<4096>,
5045                D,
5046                &mut self.moniker,
5047                decoder,
5048                offset + 0,
5049                _depth
5050            )?;
5051            fidl::decode!(
5052                fidl::encoding::UnboundedVector<RouteTarget>,
5053                D,
5054                &mut self.targets,
5055                decoder,
5056                offset + 16,
5057                _depth
5058            )?;
5059            Ok(())
5060        }
5061    }
5062
5063    impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateRequest {
5064        type Borrowed<'a> = &'a Self;
5065        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5066            value
5067        }
5068    }
5069
5070    unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateRequest {
5071        type Owned = Self;
5072
5073        #[inline(always)]
5074        fn inline_align(_context: fidl::encoding::Context) -> usize {
5075            8
5076        }
5077
5078        #[inline(always)]
5079        fn inline_size(_context: fidl::encoding::Context) -> usize {
5080            16
5081        }
5082    }
5083
5084    unsafe impl<D: fidl::encoding::ResourceDialect>
5085        fidl::encoding::Encode<RouteValidatorValidateRequest, D>
5086        for &RouteValidatorValidateRequest
5087    {
5088        #[inline]
5089        unsafe fn encode(
5090            self,
5091            encoder: &mut fidl::encoding::Encoder<'_, D>,
5092            offset: usize,
5093            _depth: fidl::encoding::Depth,
5094        ) -> fidl::Result<()> {
5095            encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5096            // Delegate to tuple encoding.
5097            fidl::encoding::Encode::<RouteValidatorValidateRequest, D>::encode(
5098                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5099                    &self.moniker,
5100                ),),
5101                encoder,
5102                offset,
5103                _depth,
5104            )
5105        }
5106    }
5107    unsafe impl<
5108        D: fidl::encoding::ResourceDialect,
5109        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5110    > fidl::encoding::Encode<RouteValidatorValidateRequest, D> for (T0,)
5111    {
5112        #[inline]
5113        unsafe fn encode(
5114            self,
5115            encoder: &mut fidl::encoding::Encoder<'_, D>,
5116            offset: usize,
5117            depth: fidl::encoding::Depth,
5118        ) -> fidl::Result<()> {
5119            encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5120            // Zero out padding regions. There's no need to apply masks
5121            // because the unmasked parts will be overwritten by fields.
5122            // Write the fields.
5123            self.0.encode(encoder, offset + 0, depth)?;
5124            Ok(())
5125        }
5126    }
5127
5128    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5129        for RouteValidatorValidateRequest
5130    {
5131        #[inline(always)]
5132        fn new_empty() -> Self {
5133            Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5134        }
5135
5136        #[inline]
5137        unsafe fn decode(
5138            &mut self,
5139            decoder: &mut fidl::encoding::Decoder<'_, D>,
5140            offset: usize,
5141            _depth: fidl::encoding::Depth,
5142        ) -> fidl::Result<()> {
5143            decoder.debug_check_bounds::<Self>(offset);
5144            // Verify that padding bytes are zero.
5145            fidl::decode!(
5146                fidl::encoding::BoundedString<4096>,
5147                D,
5148                &mut self.moniker,
5149                decoder,
5150                offset + 0,
5151                _depth
5152            )?;
5153            Ok(())
5154        }
5155    }
5156
5157    impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteResponse {
5158        type Borrowed<'a> = &'a Self;
5159        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5160            value
5161        }
5162    }
5163
5164    unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteResponse {
5165        type Owned = Self;
5166
5167        #[inline(always)]
5168        fn inline_align(_context: fidl::encoding::Context) -> usize {
5169            8
5170        }
5171
5172        #[inline(always)]
5173        fn inline_size(_context: fidl::encoding::Context) -> usize {
5174            16
5175        }
5176    }
5177
5178    unsafe impl<D: fidl::encoding::ResourceDialect>
5179        fidl::encoding::Encode<RouteValidatorRouteResponse, D> for &RouteValidatorRouteResponse
5180    {
5181        #[inline]
5182        unsafe fn encode(
5183            self,
5184            encoder: &mut fidl::encoding::Encoder<'_, D>,
5185            offset: usize,
5186            _depth: fidl::encoding::Depth,
5187        ) -> fidl::Result<()> {
5188            encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5189            // Delegate to tuple encoding.
5190            fidl::encoding::Encode::<RouteValidatorRouteResponse, D>::encode(
5191                (
5192                    <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5193                ),
5194                encoder, offset, _depth
5195            )
5196        }
5197    }
5198    unsafe impl<
5199        D: fidl::encoding::ResourceDialect,
5200        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5201    > fidl::encoding::Encode<RouteValidatorRouteResponse, D> for (T0,)
5202    {
5203        #[inline]
5204        unsafe fn encode(
5205            self,
5206            encoder: &mut fidl::encoding::Encoder<'_, D>,
5207            offset: usize,
5208            depth: fidl::encoding::Depth,
5209        ) -> fidl::Result<()> {
5210            encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5211            // Zero out padding regions. There's no need to apply masks
5212            // because the unmasked parts will be overwritten by fields.
5213            // Write the fields.
5214            self.0.encode(encoder, offset + 0, depth)?;
5215            Ok(())
5216        }
5217    }
5218
5219    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5220        for RouteValidatorRouteResponse
5221    {
5222        #[inline(always)]
5223        fn new_empty() -> Self {
5224            Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5225        }
5226
5227        #[inline]
5228        unsafe fn decode(
5229            &mut self,
5230            decoder: &mut fidl::encoding::Decoder<'_, D>,
5231            offset: usize,
5232            _depth: fidl::encoding::Depth,
5233        ) -> fidl::Result<()> {
5234            decoder.debug_check_bounds::<Self>(offset);
5235            // Verify that padding bytes are zero.
5236            fidl::decode!(
5237                fidl::encoding::UnboundedVector<RouteReport>,
5238                D,
5239                &mut self.reports,
5240                decoder,
5241                offset + 0,
5242                _depth
5243            )?;
5244            Ok(())
5245        }
5246    }
5247
5248    impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateResponse {
5249        type Borrowed<'a> = &'a Self;
5250        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5251            value
5252        }
5253    }
5254
5255    unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateResponse {
5256        type Owned = Self;
5257
5258        #[inline(always)]
5259        fn inline_align(_context: fidl::encoding::Context) -> usize {
5260            8
5261        }
5262
5263        #[inline(always)]
5264        fn inline_size(_context: fidl::encoding::Context) -> usize {
5265            16
5266        }
5267    }
5268
5269    unsafe impl<D: fidl::encoding::ResourceDialect>
5270        fidl::encoding::Encode<RouteValidatorValidateResponse, D>
5271        for &RouteValidatorValidateResponse
5272    {
5273        #[inline]
5274        unsafe fn encode(
5275            self,
5276            encoder: &mut fidl::encoding::Encoder<'_, D>,
5277            offset: usize,
5278            _depth: fidl::encoding::Depth,
5279        ) -> fidl::Result<()> {
5280            encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5281            // Delegate to tuple encoding.
5282            fidl::encoding::Encode::<RouteValidatorValidateResponse, D>::encode(
5283                (
5284                    <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5285                ),
5286                encoder, offset, _depth
5287            )
5288        }
5289    }
5290    unsafe impl<
5291        D: fidl::encoding::ResourceDialect,
5292        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5293    > fidl::encoding::Encode<RouteValidatorValidateResponse, D> for (T0,)
5294    {
5295        #[inline]
5296        unsafe fn encode(
5297            self,
5298            encoder: &mut fidl::encoding::Encoder<'_, D>,
5299            offset: usize,
5300            depth: fidl::encoding::Depth,
5301        ) -> fidl::Result<()> {
5302            encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5303            // Zero out padding regions. There's no need to apply masks
5304            // because the unmasked parts will be overwritten by fields.
5305            // Write the fields.
5306            self.0.encode(encoder, offset + 0, depth)?;
5307            Ok(())
5308        }
5309    }
5310
5311    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5312        for RouteValidatorValidateResponse
5313    {
5314        #[inline(always)]
5315        fn new_empty() -> Self {
5316            Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5317        }
5318
5319        #[inline]
5320        unsafe fn decode(
5321            &mut self,
5322            decoder: &mut fidl::encoding::Decoder<'_, D>,
5323            offset: usize,
5324            _depth: fidl::encoding::Depth,
5325        ) -> fidl::Result<()> {
5326            decoder.debug_check_bounds::<Self>(offset);
5327            // Verify that padding bytes are zero.
5328            fidl::decode!(
5329                fidl::encoding::UnboundedVector<RouteReport>,
5330                D,
5331                &mut self.reports,
5332                decoder,
5333                offset + 0,
5334                _depth
5335            )?;
5336            Ok(())
5337        }
5338    }
5339
5340    impl fidl::encoding::ValueTypeMarker for StorageAdminDeleteComponentStorageRequest {
5341        type Borrowed<'a> = &'a Self;
5342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5343            value
5344        }
5345    }
5346
5347    unsafe impl fidl::encoding::TypeMarker for StorageAdminDeleteComponentStorageRequest {
5348        type Owned = Self;
5349
5350        #[inline(always)]
5351        fn inline_align(_context: fidl::encoding::Context) -> usize {
5352            8
5353        }
5354
5355        #[inline(always)]
5356        fn inline_size(_context: fidl::encoding::Context) -> usize {
5357            16
5358        }
5359    }
5360
5361    unsafe impl<D: fidl::encoding::ResourceDialect>
5362        fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D>
5363        for &StorageAdminDeleteComponentStorageRequest
5364    {
5365        #[inline]
5366        unsafe fn encode(
5367            self,
5368            encoder: &mut fidl::encoding::Encoder<'_, D>,
5369            offset: usize,
5370            _depth: fidl::encoding::Depth,
5371        ) -> fidl::Result<()> {
5372            encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5373            // Delegate to tuple encoding.
5374            fidl::encoding::Encode::<StorageAdminDeleteComponentStorageRequest, D>::encode(
5375                (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5376                    &self.relative_moniker,
5377                ),),
5378                encoder,
5379                offset,
5380                _depth,
5381            )
5382        }
5383    }
5384    unsafe impl<
5385        D: fidl::encoding::ResourceDialect,
5386        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5387    > fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D> for (T0,)
5388    {
5389        #[inline]
5390        unsafe fn encode(
5391            self,
5392            encoder: &mut fidl::encoding::Encoder<'_, D>,
5393            offset: usize,
5394            depth: fidl::encoding::Depth,
5395        ) -> fidl::Result<()> {
5396            encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5397            // Zero out padding regions. There's no need to apply masks
5398            // because the unmasked parts will be overwritten by fields.
5399            // Write the fields.
5400            self.0.encode(encoder, offset + 0, depth)?;
5401            Ok(())
5402        }
5403    }
5404
5405    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5406        for StorageAdminDeleteComponentStorageRequest
5407    {
5408        #[inline(always)]
5409        fn new_empty() -> Self {
5410            Self { relative_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5411        }
5412
5413        #[inline]
5414        unsafe fn decode(
5415            &mut self,
5416            decoder: &mut fidl::encoding::Decoder<'_, D>,
5417            offset: usize,
5418            _depth: fidl::encoding::Depth,
5419        ) -> fidl::Result<()> {
5420            decoder.debug_check_bounds::<Self>(offset);
5421            // Verify that padding bytes are zero.
5422            fidl::decode!(
5423                fidl::encoding::BoundedString<4096>,
5424                D,
5425                &mut self.relative_moniker,
5426                decoder,
5427                offset + 0,
5428                _depth
5429            )?;
5430            Ok(())
5431        }
5432    }
5433
5434    impl fidl::encoding::ValueTypeMarker for StorageIteratorNextResponse {
5435        type Borrowed<'a> = &'a Self;
5436        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5437            value
5438        }
5439    }
5440
5441    unsafe impl fidl::encoding::TypeMarker for StorageIteratorNextResponse {
5442        type Owned = Self;
5443
5444        #[inline(always)]
5445        fn inline_align(_context: fidl::encoding::Context) -> usize {
5446            8
5447        }
5448
5449        #[inline(always)]
5450        fn inline_size(_context: fidl::encoding::Context) -> usize {
5451            16
5452        }
5453    }
5454
5455    unsafe impl<D: fidl::encoding::ResourceDialect>
5456        fidl::encoding::Encode<StorageIteratorNextResponse, D> for &StorageIteratorNextResponse
5457    {
5458        #[inline]
5459        unsafe fn encode(
5460            self,
5461            encoder: &mut fidl::encoding::Encoder<'_, D>,
5462            offset: usize,
5463            _depth: fidl::encoding::Depth,
5464        ) -> fidl::Result<()> {
5465            encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5466            // Delegate to tuple encoding.
5467            fidl::encoding::Encode::<StorageIteratorNextResponse, D>::encode(
5468                (
5469                    <fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_monikers),
5470                ),
5471                encoder, offset, _depth
5472            )
5473        }
5474    }
5475    unsafe impl<
5476        D: fidl::encoding::ResourceDialect,
5477        T0: fidl::encoding::Encode<
5478                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5479                D,
5480            >,
5481    > fidl::encoding::Encode<StorageIteratorNextResponse, D> for (T0,)
5482    {
5483        #[inline]
5484        unsafe fn encode(
5485            self,
5486            encoder: &mut fidl::encoding::Encoder<'_, D>,
5487            offset: usize,
5488            depth: fidl::encoding::Depth,
5489        ) -> fidl::Result<()> {
5490            encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5491            // Zero out padding regions. There's no need to apply masks
5492            // because the unmasked parts will be overwritten by fields.
5493            // Write the fields.
5494            self.0.encode(encoder, offset + 0, depth)?;
5495            Ok(())
5496        }
5497    }
5498
5499    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5500        for StorageIteratorNextResponse
5501    {
5502        #[inline(always)]
5503        fn new_empty() -> Self {
5504            Self {
5505                relative_monikers: fidl::new_empty!(
5506                    fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5507                    D
5508                ),
5509            }
5510        }
5511
5512        #[inline]
5513        unsafe fn decode(
5514            &mut self,
5515            decoder: &mut fidl::encoding::Decoder<'_, D>,
5516            offset: usize,
5517            _depth: fidl::encoding::Depth,
5518        ) -> fidl::Result<()> {
5519            decoder.debug_check_bounds::<Self>(offset);
5520            // Verify that padding bytes are zero.
5521            fidl::decode!(
5522                fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5523                D,
5524                &mut self.relative_monikers,
5525                decoder,
5526                offset + 0,
5527                _depth
5528            )?;
5529            Ok(())
5530        }
5531    }
5532
5533    impl ComponentCrashInfo {
5534        #[inline(always)]
5535        fn max_ordinal_present(&self) -> u64 {
5536            if let Some(_) = self.moniker {
5537                return 2;
5538            }
5539            if let Some(_) = self.url {
5540                return 1;
5541            }
5542            0
5543        }
5544    }
5545
5546    impl fidl::encoding::ValueTypeMarker for ComponentCrashInfo {
5547        type Borrowed<'a> = &'a Self;
5548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5549            value
5550        }
5551    }
5552
5553    unsafe impl fidl::encoding::TypeMarker for ComponentCrashInfo {
5554        type Owned = Self;
5555
5556        #[inline(always)]
5557        fn inline_align(_context: fidl::encoding::Context) -> usize {
5558            8
5559        }
5560
5561        #[inline(always)]
5562        fn inline_size(_context: fidl::encoding::Context) -> usize {
5563            16
5564        }
5565    }
5566
5567    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ComponentCrashInfo, D>
5568        for &ComponentCrashInfo
5569    {
5570        unsafe fn encode(
5571            self,
5572            encoder: &mut fidl::encoding::Encoder<'_, D>,
5573            offset: usize,
5574            mut depth: fidl::encoding::Depth,
5575        ) -> fidl::Result<()> {
5576            encoder.debug_check_bounds::<ComponentCrashInfo>(offset);
5577            // Vector header
5578            let max_ordinal: u64 = self.max_ordinal_present();
5579            encoder.write_num(max_ordinal, offset);
5580            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5581            // Calling encoder.out_of_line_offset(0) is not allowed.
5582            if max_ordinal == 0 {
5583                return Ok(());
5584            }
5585            depth.increment()?;
5586            let envelope_size = 8;
5587            let bytes_len = max_ordinal as usize * envelope_size;
5588            #[allow(unused_variables)]
5589            let offset = encoder.out_of_line_offset(bytes_len);
5590            let mut _prev_end_offset: usize = 0;
5591            if 1 > max_ordinal {
5592                return Ok(());
5593            }
5594
5595            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5596            // are envelope_size bytes.
5597            let cur_offset: usize = (1 - 1) * envelope_size;
5598
5599            // Zero reserved fields.
5600            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5601
5602            // Safety:
5603            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5604            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5605            //   envelope_size bytes, there is always sufficient room.
5606            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5607            self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5608            encoder, offset + cur_offset, depth
5609        )?;
5610
5611            _prev_end_offset = cur_offset + envelope_size;
5612            if 2 > max_ordinal {
5613                return Ok(());
5614            }
5615
5616            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5617            // are envelope_size bytes.
5618            let cur_offset: usize = (2 - 1) * envelope_size;
5619
5620            // Zero reserved fields.
5621            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5622
5623            // Safety:
5624            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5625            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5626            //   envelope_size bytes, there is always sufficient room.
5627            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5628            self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5629            encoder, offset + cur_offset, depth
5630        )?;
5631
5632            _prev_end_offset = cur_offset + envelope_size;
5633
5634            Ok(())
5635        }
5636    }
5637
5638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ComponentCrashInfo {
5639        #[inline(always)]
5640        fn new_empty() -> Self {
5641            Self::default()
5642        }
5643
5644        unsafe fn decode(
5645            &mut self,
5646            decoder: &mut fidl::encoding::Decoder<'_, D>,
5647            offset: usize,
5648            mut depth: fidl::encoding::Depth,
5649        ) -> fidl::Result<()> {
5650            decoder.debug_check_bounds::<Self>(offset);
5651            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5652                None => return Err(fidl::Error::NotNullable),
5653                Some(len) => len,
5654            };
5655            // Calling decoder.out_of_line_offset(0) is not allowed.
5656            if len == 0 {
5657                return Ok(());
5658            };
5659            depth.increment()?;
5660            let envelope_size = 8;
5661            let bytes_len = len * envelope_size;
5662            let offset = decoder.out_of_line_offset(bytes_len)?;
5663            // Decode the envelope for each type.
5664            let mut _next_ordinal_to_read = 0;
5665            let mut next_offset = offset;
5666            let end_offset = offset + bytes_len;
5667            _next_ordinal_to_read += 1;
5668            if next_offset >= end_offset {
5669                return Ok(());
5670            }
5671
5672            // Decode unknown envelopes for gaps in ordinals.
5673            while _next_ordinal_to_read < 1 {
5674                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5675                _next_ordinal_to_read += 1;
5676                next_offset += envelope_size;
5677            }
5678
5679            let next_out_of_line = decoder.next_out_of_line();
5680            let handles_before = decoder.remaining_handles();
5681            if let Some((inlined, num_bytes, num_handles)) =
5682                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5683            {
5684                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5685                if inlined != (member_inline_size <= 4) {
5686                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5687                }
5688                let inner_offset;
5689                let mut inner_depth = depth.clone();
5690                if inlined {
5691                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5692                    inner_offset = next_offset;
5693                } else {
5694                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5695                    inner_depth.increment()?;
5696                }
5697                let val_ref = self.url.get_or_insert_with(|| {
5698                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5699                });
5700                fidl::decode!(
5701                    fidl::encoding::BoundedString<4096>,
5702                    D,
5703                    val_ref,
5704                    decoder,
5705                    inner_offset,
5706                    inner_depth
5707                )?;
5708                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5709                {
5710                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5711                }
5712                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5713                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5714                }
5715            }
5716
5717            next_offset += envelope_size;
5718            _next_ordinal_to_read += 1;
5719            if next_offset >= end_offset {
5720                return Ok(());
5721            }
5722
5723            // Decode unknown envelopes for gaps in ordinals.
5724            while _next_ordinal_to_read < 2 {
5725                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5726                _next_ordinal_to_read += 1;
5727                next_offset += envelope_size;
5728            }
5729
5730            let next_out_of_line = decoder.next_out_of_line();
5731            let handles_before = decoder.remaining_handles();
5732            if let Some((inlined, num_bytes, num_handles)) =
5733                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5734            {
5735                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5736                if inlined != (member_inline_size <= 4) {
5737                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5738                }
5739                let inner_offset;
5740                let mut inner_depth = depth.clone();
5741                if inlined {
5742                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5743                    inner_offset = next_offset;
5744                } else {
5745                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5746                    inner_depth.increment()?;
5747                }
5748                let val_ref = self.moniker.get_or_insert_with(|| {
5749                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5750                });
5751                fidl::decode!(
5752                    fidl::encoding::BoundedString<4096>,
5753                    D,
5754                    val_ref,
5755                    decoder,
5756                    inner_offset,
5757                    inner_depth
5758                )?;
5759                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5760                {
5761                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5762                }
5763                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5764                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5765                }
5766            }
5767
5768            next_offset += envelope_size;
5769
5770            // Decode the remaining unknown envelopes.
5771            while next_offset < end_offset {
5772                _next_ordinal_to_read += 1;
5773                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5774                next_offset += envelope_size;
5775            }
5776
5777            Ok(())
5778        }
5779    }
5780
5781    impl DictionaryEntry {
5782        #[inline(always)]
5783        fn max_ordinal_present(&self) -> u64 {
5784            if let Some(_) = self.name {
5785                return 1;
5786            }
5787            0
5788        }
5789    }
5790
5791    impl fidl::encoding::ValueTypeMarker for DictionaryEntry {
5792        type Borrowed<'a> = &'a Self;
5793        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5794            value
5795        }
5796    }
5797
5798    unsafe impl fidl::encoding::TypeMarker for DictionaryEntry {
5799        type Owned = Self;
5800
5801        #[inline(always)]
5802        fn inline_align(_context: fidl::encoding::Context) -> usize {
5803            8
5804        }
5805
5806        #[inline(always)]
5807        fn inline_size(_context: fidl::encoding::Context) -> usize {
5808            16
5809        }
5810    }
5811
5812    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DictionaryEntry, D>
5813        for &DictionaryEntry
5814    {
5815        unsafe fn encode(
5816            self,
5817            encoder: &mut fidl::encoding::Encoder<'_, D>,
5818            offset: usize,
5819            mut depth: fidl::encoding::Depth,
5820        ) -> fidl::Result<()> {
5821            encoder.debug_check_bounds::<DictionaryEntry>(offset);
5822            // Vector header
5823            let max_ordinal: u64 = self.max_ordinal_present();
5824            encoder.write_num(max_ordinal, offset);
5825            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5826            // Calling encoder.out_of_line_offset(0) is not allowed.
5827            if max_ordinal == 0 {
5828                return Ok(());
5829            }
5830            depth.increment()?;
5831            let envelope_size = 8;
5832            let bytes_len = max_ordinal as usize * envelope_size;
5833            #[allow(unused_variables)]
5834            let offset = encoder.out_of_line_offset(bytes_len);
5835            let mut _prev_end_offset: usize = 0;
5836            if 1 > max_ordinal {
5837                return Ok(());
5838            }
5839
5840            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
5841            // are envelope_size bytes.
5842            let cur_offset: usize = (1 - 1) * envelope_size;
5843
5844            // Zero reserved fields.
5845            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5846
5847            // Safety:
5848            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
5849            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
5850            //   envelope_size bytes, there is always sufficient room.
5851            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
5852                self.name.as_ref().map(
5853                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
5854                ),
5855                encoder,
5856                offset + cur_offset,
5857                depth,
5858            )?;
5859
5860            _prev_end_offset = cur_offset + envelope_size;
5861
5862            Ok(())
5863        }
5864    }
5865
5866    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DictionaryEntry {
5867        #[inline(always)]
5868        fn new_empty() -> Self {
5869            Self::default()
5870        }
5871
5872        unsafe fn decode(
5873            &mut self,
5874            decoder: &mut fidl::encoding::Decoder<'_, D>,
5875            offset: usize,
5876            mut depth: fidl::encoding::Depth,
5877        ) -> fidl::Result<()> {
5878            decoder.debug_check_bounds::<Self>(offset);
5879            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5880                None => return Err(fidl::Error::NotNullable),
5881                Some(len) => len,
5882            };
5883            // Calling decoder.out_of_line_offset(0) is not allowed.
5884            if len == 0 {
5885                return Ok(());
5886            };
5887            depth.increment()?;
5888            let envelope_size = 8;
5889            let bytes_len = len * envelope_size;
5890            let offset = decoder.out_of_line_offset(bytes_len)?;
5891            // Decode the envelope for each type.
5892            let mut _next_ordinal_to_read = 0;
5893            let mut next_offset = offset;
5894            let end_offset = offset + bytes_len;
5895            _next_ordinal_to_read += 1;
5896            if next_offset >= end_offset {
5897                return Ok(());
5898            }
5899
5900            // Decode unknown envelopes for gaps in ordinals.
5901            while _next_ordinal_to_read < 1 {
5902                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5903                _next_ordinal_to_read += 1;
5904                next_offset += envelope_size;
5905            }
5906
5907            let next_out_of_line = decoder.next_out_of_line();
5908            let handles_before = decoder.remaining_handles();
5909            if let Some((inlined, num_bytes, num_handles)) =
5910                fidl::encoding::decode_envelope_header(decoder, next_offset)?
5911            {
5912                let member_inline_size =
5913                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5914                        decoder.context,
5915                    );
5916                if inlined != (member_inline_size <= 4) {
5917                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
5918                }
5919                let inner_offset;
5920                let mut inner_depth = depth.clone();
5921                if inlined {
5922                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5923                    inner_offset = next_offset;
5924                } else {
5925                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5926                    inner_depth.increment()?;
5927                }
5928                let val_ref = self
5929                    .name
5930                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
5931                fidl::decode!(
5932                    fidl::encoding::UnboundedString,
5933                    D,
5934                    val_ref,
5935                    decoder,
5936                    inner_offset,
5937                    inner_depth
5938                )?;
5939                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5940                {
5941                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
5942                }
5943                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5944                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5945                }
5946            }
5947
5948            next_offset += envelope_size;
5949
5950            // Decode the remaining unknown envelopes.
5951            while next_offset < end_offset {
5952                _next_ordinal_to_read += 1;
5953                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5954                next_offset += envelope_size;
5955            }
5956
5957            Ok(())
5958        }
5959    }
5960
5961    impl ExecutionInfo {
5962        #[inline(always)]
5963        fn max_ordinal_present(&self) -> u64 {
5964            if let Some(_) = self.start_reason {
5965                return 1;
5966            }
5967            0
5968        }
5969    }
5970
5971    impl fidl::encoding::ValueTypeMarker for ExecutionInfo {
5972        type Borrowed<'a> = &'a Self;
5973        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5974            value
5975        }
5976    }
5977
5978    unsafe impl fidl::encoding::TypeMarker for ExecutionInfo {
5979        type Owned = Self;
5980
5981        #[inline(always)]
5982        fn inline_align(_context: fidl::encoding::Context) -> usize {
5983            8
5984        }
5985
5986        #[inline(always)]
5987        fn inline_size(_context: fidl::encoding::Context) -> usize {
5988            16
5989        }
5990    }
5991
5992    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ExecutionInfo, D>
5993        for &ExecutionInfo
5994    {
5995        unsafe fn encode(
5996            self,
5997            encoder: &mut fidl::encoding::Encoder<'_, D>,
5998            offset: usize,
5999            mut depth: fidl::encoding::Depth,
6000        ) -> fidl::Result<()> {
6001            encoder.debug_check_bounds::<ExecutionInfo>(offset);
6002            // Vector header
6003            let max_ordinal: u64 = self.max_ordinal_present();
6004            encoder.write_num(max_ordinal, offset);
6005            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6006            // Calling encoder.out_of_line_offset(0) is not allowed.
6007            if max_ordinal == 0 {
6008                return Ok(());
6009            }
6010            depth.increment()?;
6011            let envelope_size = 8;
6012            let bytes_len = max_ordinal as usize * envelope_size;
6013            #[allow(unused_variables)]
6014            let offset = encoder.out_of_line_offset(bytes_len);
6015            let mut _prev_end_offset: usize = 0;
6016            if 1 > max_ordinal {
6017                return Ok(());
6018            }
6019
6020            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6021            // are envelope_size bytes.
6022            let cur_offset: usize = (1 - 1) * envelope_size;
6023
6024            // Zero reserved fields.
6025            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6026
6027            // Safety:
6028            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6029            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6030            //   envelope_size bytes, there is always sufficient room.
6031            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<5000>, D>(
6032            self.start_reason.as_ref().map(<fidl::encoding::BoundedString<5000> as fidl::encoding::ValueTypeMarker>::borrow),
6033            encoder, offset + cur_offset, depth
6034        )?;
6035
6036            _prev_end_offset = cur_offset + envelope_size;
6037
6038            Ok(())
6039        }
6040    }
6041
6042    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExecutionInfo {
6043        #[inline(always)]
6044        fn new_empty() -> Self {
6045            Self::default()
6046        }
6047
6048        unsafe fn decode(
6049            &mut self,
6050            decoder: &mut fidl::encoding::Decoder<'_, D>,
6051            offset: usize,
6052            mut depth: fidl::encoding::Depth,
6053        ) -> fidl::Result<()> {
6054            decoder.debug_check_bounds::<Self>(offset);
6055            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6056                None => return Err(fidl::Error::NotNullable),
6057                Some(len) => len,
6058            };
6059            // Calling decoder.out_of_line_offset(0) is not allowed.
6060            if len == 0 {
6061                return Ok(());
6062            };
6063            depth.increment()?;
6064            let envelope_size = 8;
6065            let bytes_len = len * envelope_size;
6066            let offset = decoder.out_of_line_offset(bytes_len)?;
6067            // Decode the envelope for each type.
6068            let mut _next_ordinal_to_read = 0;
6069            let mut next_offset = offset;
6070            let end_offset = offset + bytes_len;
6071            _next_ordinal_to_read += 1;
6072            if next_offset >= end_offset {
6073                return Ok(());
6074            }
6075
6076            // Decode unknown envelopes for gaps in ordinals.
6077            while _next_ordinal_to_read < 1 {
6078                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6079                _next_ordinal_to_read += 1;
6080                next_offset += envelope_size;
6081            }
6082
6083            let next_out_of_line = decoder.next_out_of_line();
6084            let handles_before = decoder.remaining_handles();
6085            if let Some((inlined, num_bytes, num_handles)) =
6086                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6087            {
6088                let member_inline_size = <fidl::encoding::BoundedString<5000> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6089                if inlined != (member_inline_size <= 4) {
6090                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6091                }
6092                let inner_offset;
6093                let mut inner_depth = depth.clone();
6094                if inlined {
6095                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6096                    inner_offset = next_offset;
6097                } else {
6098                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6099                    inner_depth.increment()?;
6100                }
6101                let val_ref = self.start_reason.get_or_insert_with(|| {
6102                    fidl::new_empty!(fidl::encoding::BoundedString<5000>, D)
6103                });
6104                fidl::decode!(
6105                    fidl::encoding::BoundedString<5000>,
6106                    D,
6107                    val_ref,
6108                    decoder,
6109                    inner_offset,
6110                    inner_depth
6111                )?;
6112                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6113                {
6114                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6115                }
6116                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6117                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6118                }
6119            }
6120
6121            next_offset += envelope_size;
6122
6123            // Decode the remaining unknown envelopes.
6124            while next_offset < end_offset {
6125                _next_ordinal_to_read += 1;
6126                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6127                next_offset += envelope_size;
6128            }
6129
6130            Ok(())
6131        }
6132    }
6133
6134    impl Instance {
6135        #[inline(always)]
6136        fn max_ordinal_present(&self) -> u64 {
6137            if let Some(_) = self.environment {
6138                return 5;
6139            }
6140            if let Some(_) = self.resolved_info {
6141                return 4;
6142            }
6143            if let Some(_) = self.instance_id {
6144                return 3;
6145            }
6146            if let Some(_) = self.url {
6147                return 2;
6148            }
6149            if let Some(_) = self.moniker {
6150                return 1;
6151            }
6152            0
6153        }
6154    }
6155
6156    impl fidl::encoding::ValueTypeMarker for Instance {
6157        type Borrowed<'a> = &'a Self;
6158        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6159            value
6160        }
6161    }
6162
6163    unsafe impl fidl::encoding::TypeMarker for Instance {
6164        type Owned = Self;
6165
6166        #[inline(always)]
6167        fn inline_align(_context: fidl::encoding::Context) -> usize {
6168            8
6169        }
6170
6171        #[inline(always)]
6172        fn inline_size(_context: fidl::encoding::Context) -> usize {
6173            16
6174        }
6175    }
6176
6177    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Instance, D> for &Instance {
6178        unsafe fn encode(
6179            self,
6180            encoder: &mut fidl::encoding::Encoder<'_, D>,
6181            offset: usize,
6182            mut depth: fidl::encoding::Depth,
6183        ) -> fidl::Result<()> {
6184            encoder.debug_check_bounds::<Instance>(offset);
6185            // Vector header
6186            let max_ordinal: u64 = self.max_ordinal_present();
6187            encoder.write_num(max_ordinal, offset);
6188            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6189            // Calling encoder.out_of_line_offset(0) is not allowed.
6190            if max_ordinal == 0 {
6191                return Ok(());
6192            }
6193            depth.increment()?;
6194            let envelope_size = 8;
6195            let bytes_len = max_ordinal as usize * envelope_size;
6196            #[allow(unused_variables)]
6197            let offset = encoder.out_of_line_offset(bytes_len);
6198            let mut _prev_end_offset: usize = 0;
6199            if 1 > max_ordinal {
6200                return Ok(());
6201            }
6202
6203            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6204            // are envelope_size bytes.
6205            let cur_offset: usize = (1 - 1) * envelope_size;
6206
6207            // Zero reserved fields.
6208            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6209
6210            // Safety:
6211            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6212            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6213            //   envelope_size bytes, there is always sufficient room.
6214            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6215            self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6216            encoder, offset + cur_offset, depth
6217        )?;
6218
6219            _prev_end_offset = cur_offset + envelope_size;
6220            if 2 > max_ordinal {
6221                return Ok(());
6222            }
6223
6224            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6225            // are envelope_size bytes.
6226            let cur_offset: usize = (2 - 1) * envelope_size;
6227
6228            // Zero reserved fields.
6229            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6230
6231            // Safety:
6232            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6233            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6234            //   envelope_size bytes, there is always sufficient room.
6235            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6236            self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6237            encoder, offset + cur_offset, depth
6238        )?;
6239
6240            _prev_end_offset = cur_offset + envelope_size;
6241            if 3 > max_ordinal {
6242                return Ok(());
6243            }
6244
6245            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6246            // are envelope_size bytes.
6247            let cur_offset: usize = (3 - 1) * envelope_size;
6248
6249            // Zero reserved fields.
6250            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6251
6252            // Safety:
6253            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6254            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6255            //   envelope_size bytes, there is always sufficient room.
6256            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<64>, D>(
6257                self.instance_id.as_ref().map(
6258                    <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow,
6259                ),
6260                encoder,
6261                offset + cur_offset,
6262                depth,
6263            )?;
6264
6265            _prev_end_offset = cur_offset + envelope_size;
6266            if 4 > max_ordinal {
6267                return Ok(());
6268            }
6269
6270            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6271            // are envelope_size bytes.
6272            let cur_offset: usize = (4 - 1) * envelope_size;
6273
6274            // Zero reserved fields.
6275            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6276
6277            // Safety:
6278            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6279            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6280            //   envelope_size bytes, there is always sufficient room.
6281            fidl::encoding::encode_in_envelope_optional::<ResolvedInfo, D>(
6282                self.resolved_info
6283                    .as_ref()
6284                    .map(<ResolvedInfo as fidl::encoding::ValueTypeMarker>::borrow),
6285                encoder,
6286                offset + cur_offset,
6287                depth,
6288            )?;
6289
6290            _prev_end_offset = cur_offset + envelope_size;
6291            if 5 > max_ordinal {
6292                return Ok(());
6293            }
6294
6295            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6296            // are envelope_size bytes.
6297            let cur_offset: usize = (5 - 1) * envelope_size;
6298
6299            // Zero reserved fields.
6300            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6301
6302            // Safety:
6303            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6304            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6305            //   envelope_size bytes, there is always sufficient room.
6306            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6307            self.environment.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6308            encoder, offset + cur_offset, depth
6309        )?;
6310
6311            _prev_end_offset = cur_offset + envelope_size;
6312
6313            Ok(())
6314        }
6315    }
6316
6317    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Instance {
6318        #[inline(always)]
6319        fn new_empty() -> Self {
6320            Self::default()
6321        }
6322
6323        unsafe fn decode(
6324            &mut self,
6325            decoder: &mut fidl::encoding::Decoder<'_, D>,
6326            offset: usize,
6327            mut depth: fidl::encoding::Depth,
6328        ) -> fidl::Result<()> {
6329            decoder.debug_check_bounds::<Self>(offset);
6330            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6331                None => return Err(fidl::Error::NotNullable),
6332                Some(len) => len,
6333            };
6334            // Calling decoder.out_of_line_offset(0) is not allowed.
6335            if len == 0 {
6336                return Ok(());
6337            };
6338            depth.increment()?;
6339            let envelope_size = 8;
6340            let bytes_len = len * envelope_size;
6341            let offset = decoder.out_of_line_offset(bytes_len)?;
6342            // Decode the envelope for each type.
6343            let mut _next_ordinal_to_read = 0;
6344            let mut next_offset = offset;
6345            let end_offset = offset + bytes_len;
6346            _next_ordinal_to_read += 1;
6347            if next_offset >= end_offset {
6348                return Ok(());
6349            }
6350
6351            // Decode unknown envelopes for gaps in ordinals.
6352            while _next_ordinal_to_read < 1 {
6353                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6354                _next_ordinal_to_read += 1;
6355                next_offset += envelope_size;
6356            }
6357
6358            let next_out_of_line = decoder.next_out_of_line();
6359            let handles_before = decoder.remaining_handles();
6360            if let Some((inlined, num_bytes, num_handles)) =
6361                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6362            {
6363                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6364                if inlined != (member_inline_size <= 4) {
6365                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6366                }
6367                let inner_offset;
6368                let mut inner_depth = depth.clone();
6369                if inlined {
6370                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6371                    inner_offset = next_offset;
6372                } else {
6373                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6374                    inner_depth.increment()?;
6375                }
6376                let val_ref = self.moniker.get_or_insert_with(|| {
6377                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6378                });
6379                fidl::decode!(
6380                    fidl::encoding::BoundedString<4096>,
6381                    D,
6382                    val_ref,
6383                    decoder,
6384                    inner_offset,
6385                    inner_depth
6386                )?;
6387                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6388                {
6389                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6390                }
6391                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6392                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6393                }
6394            }
6395
6396            next_offset += envelope_size;
6397            _next_ordinal_to_read += 1;
6398            if next_offset >= end_offset {
6399                return Ok(());
6400            }
6401
6402            // Decode unknown envelopes for gaps in ordinals.
6403            while _next_ordinal_to_read < 2 {
6404                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6405                _next_ordinal_to_read += 1;
6406                next_offset += envelope_size;
6407            }
6408
6409            let next_out_of_line = decoder.next_out_of_line();
6410            let handles_before = decoder.remaining_handles();
6411            if let Some((inlined, num_bytes, num_handles)) =
6412                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6413            {
6414                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6415                if inlined != (member_inline_size <= 4) {
6416                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6417                }
6418                let inner_offset;
6419                let mut inner_depth = depth.clone();
6420                if inlined {
6421                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6422                    inner_offset = next_offset;
6423                } else {
6424                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6425                    inner_depth.increment()?;
6426                }
6427                let val_ref = self.url.get_or_insert_with(|| {
6428                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6429                });
6430                fidl::decode!(
6431                    fidl::encoding::BoundedString<4096>,
6432                    D,
6433                    val_ref,
6434                    decoder,
6435                    inner_offset,
6436                    inner_depth
6437                )?;
6438                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6439                {
6440                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6441                }
6442                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6443                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6444                }
6445            }
6446
6447            next_offset += envelope_size;
6448            _next_ordinal_to_read += 1;
6449            if next_offset >= end_offset {
6450                return Ok(());
6451            }
6452
6453            // Decode unknown envelopes for gaps in ordinals.
6454            while _next_ordinal_to_read < 3 {
6455                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6456                _next_ordinal_to_read += 1;
6457                next_offset += envelope_size;
6458            }
6459
6460            let next_out_of_line = decoder.next_out_of_line();
6461            let handles_before = decoder.remaining_handles();
6462            if let Some((inlined, num_bytes, num_handles)) =
6463                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6464            {
6465                let member_inline_size =
6466                    <fidl::encoding::BoundedString<64> as fidl::encoding::TypeMarker>::inline_size(
6467                        decoder.context,
6468                    );
6469                if inlined != (member_inline_size <= 4) {
6470                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6471                }
6472                let inner_offset;
6473                let mut inner_depth = depth.clone();
6474                if inlined {
6475                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6476                    inner_offset = next_offset;
6477                } else {
6478                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6479                    inner_depth.increment()?;
6480                }
6481                let val_ref = self
6482                    .instance_id
6483                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<64>, D));
6484                fidl::decode!(
6485                    fidl::encoding::BoundedString<64>,
6486                    D,
6487                    val_ref,
6488                    decoder,
6489                    inner_offset,
6490                    inner_depth
6491                )?;
6492                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6493                {
6494                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6495                }
6496                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6497                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6498                }
6499            }
6500
6501            next_offset += envelope_size;
6502            _next_ordinal_to_read += 1;
6503            if next_offset >= end_offset {
6504                return Ok(());
6505            }
6506
6507            // Decode unknown envelopes for gaps in ordinals.
6508            while _next_ordinal_to_read < 4 {
6509                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6510                _next_ordinal_to_read += 1;
6511                next_offset += envelope_size;
6512            }
6513
6514            let next_out_of_line = decoder.next_out_of_line();
6515            let handles_before = decoder.remaining_handles();
6516            if let Some((inlined, num_bytes, num_handles)) =
6517                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6518            {
6519                let member_inline_size =
6520                    <ResolvedInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6521                if inlined != (member_inline_size <= 4) {
6522                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6523                }
6524                let inner_offset;
6525                let mut inner_depth = depth.clone();
6526                if inlined {
6527                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6528                    inner_offset = next_offset;
6529                } else {
6530                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6531                    inner_depth.increment()?;
6532                }
6533                let val_ref =
6534                    self.resolved_info.get_or_insert_with(|| fidl::new_empty!(ResolvedInfo, D));
6535                fidl::decode!(ResolvedInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6536                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6537                {
6538                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6539                }
6540                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6541                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6542                }
6543            }
6544
6545            next_offset += envelope_size;
6546            _next_ordinal_to_read += 1;
6547            if next_offset >= end_offset {
6548                return Ok(());
6549            }
6550
6551            // Decode unknown envelopes for gaps in ordinals.
6552            while _next_ordinal_to_read < 5 {
6553                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6554                _next_ordinal_to_read += 1;
6555                next_offset += envelope_size;
6556            }
6557
6558            let next_out_of_line = decoder.next_out_of_line();
6559            let handles_before = decoder.remaining_handles();
6560            if let Some((inlined, num_bytes, num_handles)) =
6561                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6562            {
6563                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6564                if inlined != (member_inline_size <= 4) {
6565                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6566                }
6567                let inner_offset;
6568                let mut inner_depth = depth.clone();
6569                if inlined {
6570                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6571                    inner_offset = next_offset;
6572                } else {
6573                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6574                    inner_depth.increment()?;
6575                }
6576                let val_ref = self.environment.get_or_insert_with(|| {
6577                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6578                });
6579                fidl::decode!(
6580                    fidl::encoding::BoundedString<4096>,
6581                    D,
6582                    val_ref,
6583                    decoder,
6584                    inner_offset,
6585                    inner_depth
6586                )?;
6587                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6588                {
6589                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6590                }
6591                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6592                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6593                }
6594            }
6595
6596            next_offset += envelope_size;
6597
6598            // Decode the remaining unknown envelopes.
6599            while next_offset < end_offset {
6600                _next_ordinal_to_read += 1;
6601                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6602                next_offset += envelope_size;
6603            }
6604
6605            Ok(())
6606        }
6607    }
6608
6609    impl ResolvedInfo {
6610        #[inline(always)]
6611        fn max_ordinal_present(&self) -> u64 {
6612            if let Some(_) = self.execution_info {
6613                return 2;
6614            }
6615            if let Some(_) = self.resolved_url {
6616                return 1;
6617            }
6618            0
6619        }
6620    }
6621
6622    impl fidl::encoding::ValueTypeMarker for ResolvedInfo {
6623        type Borrowed<'a> = &'a Self;
6624        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6625            value
6626        }
6627    }
6628
6629    unsafe impl fidl::encoding::TypeMarker for ResolvedInfo {
6630        type Owned = Self;
6631
6632        #[inline(always)]
6633        fn inline_align(_context: fidl::encoding::Context) -> usize {
6634            8
6635        }
6636
6637        #[inline(always)]
6638        fn inline_size(_context: fidl::encoding::Context) -> usize {
6639            16
6640        }
6641    }
6642
6643    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResolvedInfo, D>
6644        for &ResolvedInfo
6645    {
6646        unsafe fn encode(
6647            self,
6648            encoder: &mut fidl::encoding::Encoder<'_, D>,
6649            offset: usize,
6650            mut depth: fidl::encoding::Depth,
6651        ) -> fidl::Result<()> {
6652            encoder.debug_check_bounds::<ResolvedInfo>(offset);
6653            // Vector header
6654            let max_ordinal: u64 = self.max_ordinal_present();
6655            encoder.write_num(max_ordinal, offset);
6656            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6657            // Calling encoder.out_of_line_offset(0) is not allowed.
6658            if max_ordinal == 0 {
6659                return Ok(());
6660            }
6661            depth.increment()?;
6662            let envelope_size = 8;
6663            let bytes_len = max_ordinal as usize * envelope_size;
6664            #[allow(unused_variables)]
6665            let offset = encoder.out_of_line_offset(bytes_len);
6666            let mut _prev_end_offset: usize = 0;
6667            if 1 > max_ordinal {
6668                return Ok(());
6669            }
6670
6671            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6672            // are envelope_size bytes.
6673            let cur_offset: usize = (1 - 1) * envelope_size;
6674
6675            // Zero reserved fields.
6676            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6677
6678            // Safety:
6679            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6680            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6681            //   envelope_size bytes, there is always sufficient room.
6682            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6683            self.resolved_url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6684            encoder, offset + cur_offset, depth
6685        )?;
6686
6687            _prev_end_offset = cur_offset + envelope_size;
6688            if 2 > max_ordinal {
6689                return Ok(());
6690            }
6691
6692            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6693            // are envelope_size bytes.
6694            let cur_offset: usize = (2 - 1) * envelope_size;
6695
6696            // Zero reserved fields.
6697            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6698
6699            // Safety:
6700            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6701            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6702            //   envelope_size bytes, there is always sufficient room.
6703            fidl::encoding::encode_in_envelope_optional::<ExecutionInfo, D>(
6704                self.execution_info
6705                    .as_ref()
6706                    .map(<ExecutionInfo as fidl::encoding::ValueTypeMarker>::borrow),
6707                encoder,
6708                offset + cur_offset,
6709                depth,
6710            )?;
6711
6712            _prev_end_offset = cur_offset + envelope_size;
6713
6714            Ok(())
6715        }
6716    }
6717
6718    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolvedInfo {
6719        #[inline(always)]
6720        fn new_empty() -> Self {
6721            Self::default()
6722        }
6723
6724        unsafe fn decode(
6725            &mut self,
6726            decoder: &mut fidl::encoding::Decoder<'_, D>,
6727            offset: usize,
6728            mut depth: fidl::encoding::Depth,
6729        ) -> fidl::Result<()> {
6730            decoder.debug_check_bounds::<Self>(offset);
6731            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6732                None => return Err(fidl::Error::NotNullable),
6733                Some(len) => len,
6734            };
6735            // Calling decoder.out_of_line_offset(0) is not allowed.
6736            if len == 0 {
6737                return Ok(());
6738            };
6739            depth.increment()?;
6740            let envelope_size = 8;
6741            let bytes_len = len * envelope_size;
6742            let offset = decoder.out_of_line_offset(bytes_len)?;
6743            // Decode the envelope for each type.
6744            let mut _next_ordinal_to_read = 0;
6745            let mut next_offset = offset;
6746            let end_offset = offset + bytes_len;
6747            _next_ordinal_to_read += 1;
6748            if next_offset >= end_offset {
6749                return Ok(());
6750            }
6751
6752            // Decode unknown envelopes for gaps in ordinals.
6753            while _next_ordinal_to_read < 1 {
6754                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6755                _next_ordinal_to_read += 1;
6756                next_offset += envelope_size;
6757            }
6758
6759            let next_out_of_line = decoder.next_out_of_line();
6760            let handles_before = decoder.remaining_handles();
6761            if let Some((inlined, num_bytes, num_handles)) =
6762                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6763            {
6764                let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6765                if inlined != (member_inline_size <= 4) {
6766                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6767                }
6768                let inner_offset;
6769                let mut inner_depth = depth.clone();
6770                if inlined {
6771                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6772                    inner_offset = next_offset;
6773                } else {
6774                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6775                    inner_depth.increment()?;
6776                }
6777                let val_ref = self.resolved_url.get_or_insert_with(|| {
6778                    fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6779                });
6780                fidl::decode!(
6781                    fidl::encoding::BoundedString<4096>,
6782                    D,
6783                    val_ref,
6784                    decoder,
6785                    inner_offset,
6786                    inner_depth
6787                )?;
6788                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6789                {
6790                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6791                }
6792                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6793                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6794                }
6795            }
6796
6797            next_offset += envelope_size;
6798            _next_ordinal_to_read += 1;
6799            if next_offset >= end_offset {
6800                return Ok(());
6801            }
6802
6803            // Decode unknown envelopes for gaps in ordinals.
6804            while _next_ordinal_to_read < 2 {
6805                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6806                _next_ordinal_to_read += 1;
6807                next_offset += envelope_size;
6808            }
6809
6810            let next_out_of_line = decoder.next_out_of_line();
6811            let handles_before = decoder.remaining_handles();
6812            if let Some((inlined, num_bytes, num_handles)) =
6813                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6814            {
6815                let member_inline_size =
6816                    <ExecutionInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6817                if inlined != (member_inline_size <= 4) {
6818                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6819                }
6820                let inner_offset;
6821                let mut inner_depth = depth.clone();
6822                if inlined {
6823                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6824                    inner_offset = next_offset;
6825                } else {
6826                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6827                    inner_depth.increment()?;
6828                }
6829                let val_ref =
6830                    self.execution_info.get_or_insert_with(|| fidl::new_empty!(ExecutionInfo, D));
6831                fidl::decode!(ExecutionInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6832                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6833                {
6834                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
6835                }
6836                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6837                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6838                }
6839            }
6840
6841            next_offset += envelope_size;
6842
6843            // Decode the remaining unknown envelopes.
6844            while next_offset < end_offset {
6845                _next_ordinal_to_read += 1;
6846                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6847                next_offset += envelope_size;
6848            }
6849
6850            Ok(())
6851        }
6852    }
6853
6854    impl RouteError {
6855        #[inline(always)]
6856        fn max_ordinal_present(&self) -> u64 {
6857            if let Some(_) = self.summary {
6858                return 1;
6859            }
6860            0
6861        }
6862    }
6863
6864    impl fidl::encoding::ValueTypeMarker for RouteError {
6865        type Borrowed<'a> = &'a Self;
6866        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6867            value
6868        }
6869    }
6870
6871    unsafe impl fidl::encoding::TypeMarker for RouteError {
6872        type Owned = Self;
6873
6874        #[inline(always)]
6875        fn inline_align(_context: fidl::encoding::Context) -> usize {
6876            8
6877        }
6878
6879        #[inline(always)]
6880        fn inline_size(_context: fidl::encoding::Context) -> usize {
6881            16
6882        }
6883    }
6884
6885    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteError, D>
6886        for &RouteError
6887    {
6888        unsafe fn encode(
6889            self,
6890            encoder: &mut fidl::encoding::Encoder<'_, D>,
6891            offset: usize,
6892            mut depth: fidl::encoding::Depth,
6893        ) -> fidl::Result<()> {
6894            encoder.debug_check_bounds::<RouteError>(offset);
6895            // Vector header
6896            let max_ordinal: u64 = self.max_ordinal_present();
6897            encoder.write_num(max_ordinal, offset);
6898            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6899            // Calling encoder.out_of_line_offset(0) is not allowed.
6900            if max_ordinal == 0 {
6901                return Ok(());
6902            }
6903            depth.increment()?;
6904            let envelope_size = 8;
6905            let bytes_len = max_ordinal as usize * envelope_size;
6906            #[allow(unused_variables)]
6907            let offset = encoder.out_of_line_offset(bytes_len);
6908            let mut _prev_end_offset: usize = 0;
6909            if 1 > max_ordinal {
6910                return Ok(());
6911            }
6912
6913            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
6914            // are envelope_size bytes.
6915            let cur_offset: usize = (1 - 1) * envelope_size;
6916
6917            // Zero reserved fields.
6918            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6919
6920            // Safety:
6921            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
6922            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
6923            //   envelope_size bytes, there is always sufficient room.
6924            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
6925                self.summary.as_ref().map(
6926                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
6927                ),
6928                encoder,
6929                offset + cur_offset,
6930                depth,
6931            )?;
6932
6933            _prev_end_offset = cur_offset + envelope_size;
6934
6935            Ok(())
6936        }
6937    }
6938
6939    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteError {
6940        #[inline(always)]
6941        fn new_empty() -> Self {
6942            Self::default()
6943        }
6944
6945        unsafe fn decode(
6946            &mut self,
6947            decoder: &mut fidl::encoding::Decoder<'_, D>,
6948            offset: usize,
6949            mut depth: fidl::encoding::Depth,
6950        ) -> fidl::Result<()> {
6951            decoder.debug_check_bounds::<Self>(offset);
6952            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6953                None => return Err(fidl::Error::NotNullable),
6954                Some(len) => len,
6955            };
6956            // Calling decoder.out_of_line_offset(0) is not allowed.
6957            if len == 0 {
6958                return Ok(());
6959            };
6960            depth.increment()?;
6961            let envelope_size = 8;
6962            let bytes_len = len * envelope_size;
6963            let offset = decoder.out_of_line_offset(bytes_len)?;
6964            // Decode the envelope for each type.
6965            let mut _next_ordinal_to_read = 0;
6966            let mut next_offset = offset;
6967            let end_offset = offset + bytes_len;
6968            _next_ordinal_to_read += 1;
6969            if next_offset >= end_offset {
6970                return Ok(());
6971            }
6972
6973            // Decode unknown envelopes for gaps in ordinals.
6974            while _next_ordinal_to_read < 1 {
6975                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6976                _next_ordinal_to_read += 1;
6977                next_offset += envelope_size;
6978            }
6979
6980            let next_out_of_line = decoder.next_out_of_line();
6981            let handles_before = decoder.remaining_handles();
6982            if let Some((inlined, num_bytes, num_handles)) =
6983                fidl::encoding::decode_envelope_header(decoder, next_offset)?
6984            {
6985                let member_inline_size =
6986                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
6987                        decoder.context,
6988                    );
6989                if inlined != (member_inline_size <= 4) {
6990                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
6991                }
6992                let inner_offset;
6993                let mut inner_depth = depth.clone();
6994                if inlined {
6995                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6996                    inner_offset = next_offset;
6997                } else {
6998                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6999                    inner_depth.increment()?;
7000                }
7001                let val_ref = self
7002                    .summary
7003                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7004                fidl::decode!(
7005                    fidl::encoding::UnboundedString,
7006                    D,
7007                    val_ref,
7008                    decoder,
7009                    inner_offset,
7010                    inner_depth
7011                )?;
7012                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7013                {
7014                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7015                }
7016                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7017                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7018                }
7019            }
7020
7021            next_offset += envelope_size;
7022
7023            // Decode the remaining unknown envelopes.
7024            while next_offset < end_offset {
7025                _next_ordinal_to_read += 1;
7026                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7027                next_offset += envelope_size;
7028            }
7029
7030            Ok(())
7031        }
7032    }
7033
7034    impl RouteReport {
7035        #[inline(always)]
7036        fn max_ordinal_present(&self) -> u64 {
7037            if let Some(_) = self.build_time_capability_type {
7038                return 9;
7039            }
7040            if let Some(_) = self.dictionary_entries {
7041                return 8;
7042            }
7043            if let Some(_) = self.outcome {
7044                return 7;
7045            }
7046            if let Some(_) = self.availability {
7047                return 6;
7048            }
7049            if let Some(_) = self.service_instances {
7050                return 5;
7051            }
7052            if let Some(_) = self.source_moniker {
7053                return 4;
7054            }
7055            if let Some(_) = self.error {
7056                return 3;
7057            }
7058            if let Some(_) = self.decl_type {
7059                return 2;
7060            }
7061            if let Some(_) = self.capability {
7062                return 1;
7063            }
7064            0
7065        }
7066    }
7067
7068    impl fidl::encoding::ValueTypeMarker for RouteReport {
7069        type Borrowed<'a> = &'a Self;
7070        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7071            value
7072        }
7073    }
7074
7075    unsafe impl fidl::encoding::TypeMarker for RouteReport {
7076        type Owned = Self;
7077
7078        #[inline(always)]
7079        fn inline_align(_context: fidl::encoding::Context) -> usize {
7080            8
7081        }
7082
7083        #[inline(always)]
7084        fn inline_size(_context: fidl::encoding::Context) -> usize {
7085            16
7086        }
7087    }
7088
7089    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteReport, D>
7090        for &RouteReport
7091    {
7092        unsafe fn encode(
7093            self,
7094            encoder: &mut fidl::encoding::Encoder<'_, D>,
7095            offset: usize,
7096            mut depth: fidl::encoding::Depth,
7097        ) -> fidl::Result<()> {
7098            encoder.debug_check_bounds::<RouteReport>(offset);
7099            // Vector header
7100            let max_ordinal: u64 = self.max_ordinal_present();
7101            encoder.write_num(max_ordinal, offset);
7102            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7103            // Calling encoder.out_of_line_offset(0) is not allowed.
7104            if max_ordinal == 0 {
7105                return Ok(());
7106            }
7107            depth.increment()?;
7108            let envelope_size = 8;
7109            let bytes_len = max_ordinal as usize * envelope_size;
7110            #[allow(unused_variables)]
7111            let offset = encoder.out_of_line_offset(bytes_len);
7112            let mut _prev_end_offset: usize = 0;
7113            if 1 > max_ordinal {
7114                return Ok(());
7115            }
7116
7117            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7118            // are envelope_size bytes.
7119            let cur_offset: usize = (1 - 1) * envelope_size;
7120
7121            // Zero reserved fields.
7122            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7123
7124            // Safety:
7125            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7126            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7127            //   envelope_size bytes, there is always sufficient room.
7128            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7129                self.capability.as_ref().map(
7130                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7131                ),
7132                encoder,
7133                offset + cur_offset,
7134                depth,
7135            )?;
7136
7137            _prev_end_offset = cur_offset + envelope_size;
7138            if 2 > max_ordinal {
7139                return Ok(());
7140            }
7141
7142            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7143            // are envelope_size bytes.
7144            let cur_offset: usize = (2 - 1) * envelope_size;
7145
7146            // Zero reserved fields.
7147            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7148
7149            // Safety:
7150            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7151            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7152            //   envelope_size bytes, there is always sufficient room.
7153            fidl::encoding::encode_in_envelope_optional::<DeclType, D>(
7154                self.decl_type.as_ref().map(<DeclType as fidl::encoding::ValueTypeMarker>::borrow),
7155                encoder,
7156                offset + cur_offset,
7157                depth,
7158            )?;
7159
7160            _prev_end_offset = cur_offset + envelope_size;
7161            if 3 > max_ordinal {
7162                return Ok(());
7163            }
7164
7165            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7166            // are envelope_size bytes.
7167            let cur_offset: usize = (3 - 1) * envelope_size;
7168
7169            // Zero reserved fields.
7170            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7171
7172            // Safety:
7173            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7174            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7175            //   envelope_size bytes, there is always sufficient room.
7176            fidl::encoding::encode_in_envelope_optional::<RouteError, D>(
7177                self.error.as_ref().map(<RouteError as fidl::encoding::ValueTypeMarker>::borrow),
7178                encoder,
7179                offset + cur_offset,
7180                depth,
7181            )?;
7182
7183            _prev_end_offset = cur_offset + envelope_size;
7184            if 4 > max_ordinal {
7185                return Ok(());
7186            }
7187
7188            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7189            // are envelope_size bytes.
7190            let cur_offset: usize = (4 - 1) * envelope_size;
7191
7192            // Zero reserved fields.
7193            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7194
7195            // Safety:
7196            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7197            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7198            //   envelope_size bytes, there is always sufficient room.
7199            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7200                self.source_moniker.as_ref().map(
7201                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7202                ),
7203                encoder,
7204                offset + cur_offset,
7205                depth,
7206            )?;
7207
7208            _prev_end_offset = cur_offset + envelope_size;
7209            if 5 > max_ordinal {
7210                return Ok(());
7211            }
7212
7213            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7214            // are envelope_size bytes.
7215            let cur_offset: usize = (5 - 1) * envelope_size;
7216
7217            // Zero reserved fields.
7218            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7219
7220            // Safety:
7221            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7222            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7223            //   envelope_size bytes, there is always sufficient room.
7224            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<ServiceInstance>, D>(
7225            self.service_instances.as_ref().map(<fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::ValueTypeMarker>::borrow),
7226            encoder, offset + cur_offset, depth
7227        )?;
7228
7229            _prev_end_offset = cur_offset + envelope_size;
7230            if 6 > max_ordinal {
7231                return Ok(());
7232            }
7233
7234            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7235            // are envelope_size bytes.
7236            let cur_offset: usize = (6 - 1) * envelope_size;
7237
7238            // Zero reserved fields.
7239            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7240
7241            // Safety:
7242            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7243            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7244            //   envelope_size bytes, there is always sufficient room.
7245            fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_component_decl_common::Availability, D>(
7246            self.availability.as_ref().map(<fidl_fuchsia_component_decl_common::Availability as fidl::encoding::ValueTypeMarker>::borrow),
7247            encoder, offset + cur_offset, depth
7248        )?;
7249
7250            _prev_end_offset = cur_offset + envelope_size;
7251            if 7 > max_ordinal {
7252                return Ok(());
7253            }
7254
7255            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7256            // are envelope_size bytes.
7257            let cur_offset: usize = (7 - 1) * envelope_size;
7258
7259            // Zero reserved fields.
7260            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7261
7262            // Safety:
7263            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7264            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7265            //   envelope_size bytes, there is always sufficient room.
7266            fidl::encoding::encode_in_envelope_optional::<RouteOutcome, D>(
7267                self.outcome
7268                    .as_ref()
7269                    .map(<RouteOutcome as fidl::encoding::ValueTypeMarker>::borrow),
7270                encoder,
7271                offset + cur_offset,
7272                depth,
7273            )?;
7274
7275            _prev_end_offset = cur_offset + envelope_size;
7276            if 8 > max_ordinal {
7277                return Ok(());
7278            }
7279
7280            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7281            // are envelope_size bytes.
7282            let cur_offset: usize = (8 - 1) * envelope_size;
7283
7284            // Zero reserved fields.
7285            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7286
7287            // Safety:
7288            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7289            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7290            //   envelope_size bytes, there is always sufficient room.
7291            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<DictionaryEntry>, D>(
7292            self.dictionary_entries.as_ref().map(<fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::ValueTypeMarker>::borrow),
7293            encoder, offset + cur_offset, depth
7294        )?;
7295
7296            _prev_end_offset = cur_offset + envelope_size;
7297            if 9 > max_ordinal {
7298                return Ok(());
7299            }
7300
7301            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7302            // are envelope_size bytes.
7303            let cur_offset: usize = (9 - 1) * envelope_size;
7304
7305            // Zero reserved fields.
7306            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7307
7308            // Safety:
7309            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7310            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7311            //   envelope_size bytes, there is always sufficient room.
7312            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7313                self.build_time_capability_type.as_ref().map(
7314                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7315                ),
7316                encoder,
7317                offset + cur_offset,
7318                depth,
7319            )?;
7320
7321            _prev_end_offset = cur_offset + envelope_size;
7322
7323            Ok(())
7324        }
7325    }
7326
7327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteReport {
7328        #[inline(always)]
7329        fn new_empty() -> Self {
7330            Self::default()
7331        }
7332
7333        unsafe fn decode(
7334            &mut self,
7335            decoder: &mut fidl::encoding::Decoder<'_, D>,
7336            offset: usize,
7337            mut depth: fidl::encoding::Depth,
7338        ) -> fidl::Result<()> {
7339            decoder.debug_check_bounds::<Self>(offset);
7340            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7341                None => return Err(fidl::Error::NotNullable),
7342                Some(len) => len,
7343            };
7344            // Calling decoder.out_of_line_offset(0) is not allowed.
7345            if len == 0 {
7346                return Ok(());
7347            };
7348            depth.increment()?;
7349            let envelope_size = 8;
7350            let bytes_len = len * envelope_size;
7351            let offset = decoder.out_of_line_offset(bytes_len)?;
7352            // Decode the envelope for each type.
7353            let mut _next_ordinal_to_read = 0;
7354            let mut next_offset = offset;
7355            let end_offset = offset + bytes_len;
7356            _next_ordinal_to_read += 1;
7357            if next_offset >= end_offset {
7358                return Ok(());
7359            }
7360
7361            // Decode unknown envelopes for gaps in ordinals.
7362            while _next_ordinal_to_read < 1 {
7363                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7364                _next_ordinal_to_read += 1;
7365                next_offset += envelope_size;
7366            }
7367
7368            let next_out_of_line = decoder.next_out_of_line();
7369            let handles_before = decoder.remaining_handles();
7370            if let Some((inlined, num_bytes, num_handles)) =
7371                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7372            {
7373                let member_inline_size =
7374                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7375                        decoder.context,
7376                    );
7377                if inlined != (member_inline_size <= 4) {
7378                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7379                }
7380                let inner_offset;
7381                let mut inner_depth = depth.clone();
7382                if inlined {
7383                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7384                    inner_offset = next_offset;
7385                } else {
7386                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7387                    inner_depth.increment()?;
7388                }
7389                let val_ref = self
7390                    .capability
7391                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7392                fidl::decode!(
7393                    fidl::encoding::UnboundedString,
7394                    D,
7395                    val_ref,
7396                    decoder,
7397                    inner_offset,
7398                    inner_depth
7399                )?;
7400                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7401                {
7402                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7403                }
7404                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7405                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7406                }
7407            }
7408
7409            next_offset += envelope_size;
7410            _next_ordinal_to_read += 1;
7411            if next_offset >= end_offset {
7412                return Ok(());
7413            }
7414
7415            // Decode unknown envelopes for gaps in ordinals.
7416            while _next_ordinal_to_read < 2 {
7417                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7418                _next_ordinal_to_read += 1;
7419                next_offset += envelope_size;
7420            }
7421
7422            let next_out_of_line = decoder.next_out_of_line();
7423            let handles_before = decoder.remaining_handles();
7424            if let Some((inlined, num_bytes, num_handles)) =
7425                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7426            {
7427                let member_inline_size =
7428                    <DeclType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7429                if inlined != (member_inline_size <= 4) {
7430                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7431                }
7432                let inner_offset;
7433                let mut inner_depth = depth.clone();
7434                if inlined {
7435                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7436                    inner_offset = next_offset;
7437                } else {
7438                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7439                    inner_depth.increment()?;
7440                }
7441                let val_ref = self.decl_type.get_or_insert_with(|| fidl::new_empty!(DeclType, D));
7442                fidl::decode!(DeclType, D, val_ref, decoder, inner_offset, inner_depth)?;
7443                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7444                {
7445                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7446                }
7447                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7448                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7449                }
7450            }
7451
7452            next_offset += envelope_size;
7453            _next_ordinal_to_read += 1;
7454            if next_offset >= end_offset {
7455                return Ok(());
7456            }
7457
7458            // Decode unknown envelopes for gaps in ordinals.
7459            while _next_ordinal_to_read < 3 {
7460                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7461                _next_ordinal_to_read += 1;
7462                next_offset += envelope_size;
7463            }
7464
7465            let next_out_of_line = decoder.next_out_of_line();
7466            let handles_before = decoder.remaining_handles();
7467            if let Some((inlined, num_bytes, num_handles)) =
7468                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7469            {
7470                let member_inline_size =
7471                    <RouteError as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7472                if inlined != (member_inline_size <= 4) {
7473                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7474                }
7475                let inner_offset;
7476                let mut inner_depth = depth.clone();
7477                if inlined {
7478                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7479                    inner_offset = next_offset;
7480                } else {
7481                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7482                    inner_depth.increment()?;
7483                }
7484                let val_ref = self.error.get_or_insert_with(|| fidl::new_empty!(RouteError, D));
7485                fidl::decode!(RouteError, D, val_ref, decoder, inner_offset, inner_depth)?;
7486                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7487                {
7488                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7489                }
7490                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7491                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7492                }
7493            }
7494
7495            next_offset += envelope_size;
7496            _next_ordinal_to_read += 1;
7497            if next_offset >= end_offset {
7498                return Ok(());
7499            }
7500
7501            // Decode unknown envelopes for gaps in ordinals.
7502            while _next_ordinal_to_read < 4 {
7503                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7504                _next_ordinal_to_read += 1;
7505                next_offset += envelope_size;
7506            }
7507
7508            let next_out_of_line = decoder.next_out_of_line();
7509            let handles_before = decoder.remaining_handles();
7510            if let Some((inlined, num_bytes, num_handles)) =
7511                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7512            {
7513                let member_inline_size =
7514                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7515                        decoder.context,
7516                    );
7517                if inlined != (member_inline_size <= 4) {
7518                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7519                }
7520                let inner_offset;
7521                let mut inner_depth = depth.clone();
7522                if inlined {
7523                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7524                    inner_offset = next_offset;
7525                } else {
7526                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7527                    inner_depth.increment()?;
7528                }
7529                let val_ref = self
7530                    .source_moniker
7531                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7532                fidl::decode!(
7533                    fidl::encoding::UnboundedString,
7534                    D,
7535                    val_ref,
7536                    decoder,
7537                    inner_offset,
7538                    inner_depth
7539                )?;
7540                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7541                {
7542                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7543                }
7544                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7545                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7546                }
7547            }
7548
7549            next_offset += envelope_size;
7550            _next_ordinal_to_read += 1;
7551            if next_offset >= end_offset {
7552                return Ok(());
7553            }
7554
7555            // Decode unknown envelopes for gaps in ordinals.
7556            while _next_ordinal_to_read < 5 {
7557                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7558                _next_ordinal_to_read += 1;
7559                next_offset += envelope_size;
7560            }
7561
7562            let next_out_of_line = decoder.next_out_of_line();
7563            let handles_before = decoder.remaining_handles();
7564            if let Some((inlined, num_bytes, num_handles)) =
7565                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7566            {
7567                let member_inline_size = <fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7568                if inlined != (member_inline_size <= 4) {
7569                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7570                }
7571                let inner_offset;
7572                let mut inner_depth = depth.clone();
7573                if inlined {
7574                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7575                    inner_offset = next_offset;
7576                } else {
7577                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7578                    inner_depth.increment()?;
7579                }
7580                let val_ref = self.service_instances.get_or_insert_with(|| {
7581                    fidl::new_empty!(fidl::encoding::UnboundedVector<ServiceInstance>, D)
7582                });
7583                fidl::decode!(
7584                    fidl::encoding::UnboundedVector<ServiceInstance>,
7585                    D,
7586                    val_ref,
7587                    decoder,
7588                    inner_offset,
7589                    inner_depth
7590                )?;
7591                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7592                {
7593                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7594                }
7595                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7596                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7597                }
7598            }
7599
7600            next_offset += envelope_size;
7601            _next_ordinal_to_read += 1;
7602            if next_offset >= end_offset {
7603                return Ok(());
7604            }
7605
7606            // Decode unknown envelopes for gaps in ordinals.
7607            while _next_ordinal_to_read < 6 {
7608                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7609                _next_ordinal_to_read += 1;
7610                next_offset += envelope_size;
7611            }
7612
7613            let next_out_of_line = decoder.next_out_of_line();
7614            let handles_before = decoder.remaining_handles();
7615            if let Some((inlined, num_bytes, num_handles)) =
7616                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7617            {
7618                let member_inline_size = <fidl_fuchsia_component_decl_common::Availability as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7619                if inlined != (member_inline_size <= 4) {
7620                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7621                }
7622                let inner_offset;
7623                let mut inner_depth = depth.clone();
7624                if inlined {
7625                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7626                    inner_offset = next_offset;
7627                } else {
7628                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7629                    inner_depth.increment()?;
7630                }
7631                let val_ref = self.availability.get_or_insert_with(|| {
7632                    fidl::new_empty!(fidl_fuchsia_component_decl_common::Availability, D)
7633                });
7634                fidl::decode!(
7635                    fidl_fuchsia_component_decl_common::Availability,
7636                    D,
7637                    val_ref,
7638                    decoder,
7639                    inner_offset,
7640                    inner_depth
7641                )?;
7642                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7643                {
7644                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7645                }
7646                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7647                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7648                }
7649            }
7650
7651            next_offset += envelope_size;
7652            _next_ordinal_to_read += 1;
7653            if next_offset >= end_offset {
7654                return Ok(());
7655            }
7656
7657            // Decode unknown envelopes for gaps in ordinals.
7658            while _next_ordinal_to_read < 7 {
7659                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7660                _next_ordinal_to_read += 1;
7661                next_offset += envelope_size;
7662            }
7663
7664            let next_out_of_line = decoder.next_out_of_line();
7665            let handles_before = decoder.remaining_handles();
7666            if let Some((inlined, num_bytes, num_handles)) =
7667                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7668            {
7669                let member_inline_size =
7670                    <RouteOutcome as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7671                if inlined != (member_inline_size <= 4) {
7672                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7673                }
7674                let inner_offset;
7675                let mut inner_depth = depth.clone();
7676                if inlined {
7677                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7678                    inner_offset = next_offset;
7679                } else {
7680                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7681                    inner_depth.increment()?;
7682                }
7683                let val_ref = self.outcome.get_or_insert_with(|| fidl::new_empty!(RouteOutcome, D));
7684                fidl::decode!(RouteOutcome, D, val_ref, decoder, inner_offset, inner_depth)?;
7685                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7686                {
7687                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7688                }
7689                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7690                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7691                }
7692            }
7693
7694            next_offset += envelope_size;
7695            _next_ordinal_to_read += 1;
7696            if next_offset >= end_offset {
7697                return Ok(());
7698            }
7699
7700            // Decode unknown envelopes for gaps in ordinals.
7701            while _next_ordinal_to_read < 8 {
7702                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7703                _next_ordinal_to_read += 1;
7704                next_offset += envelope_size;
7705            }
7706
7707            let next_out_of_line = decoder.next_out_of_line();
7708            let handles_before = decoder.remaining_handles();
7709            if let Some((inlined, num_bytes, num_handles)) =
7710                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7711            {
7712                let member_inline_size = <fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7713                if inlined != (member_inline_size <= 4) {
7714                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7715                }
7716                let inner_offset;
7717                let mut inner_depth = depth.clone();
7718                if inlined {
7719                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7720                    inner_offset = next_offset;
7721                } else {
7722                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7723                    inner_depth.increment()?;
7724                }
7725                let val_ref = self.dictionary_entries.get_or_insert_with(|| {
7726                    fidl::new_empty!(fidl::encoding::UnboundedVector<DictionaryEntry>, D)
7727                });
7728                fidl::decode!(
7729                    fidl::encoding::UnboundedVector<DictionaryEntry>,
7730                    D,
7731                    val_ref,
7732                    decoder,
7733                    inner_offset,
7734                    inner_depth
7735                )?;
7736                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7737                {
7738                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7739                }
7740                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7741                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7742                }
7743            }
7744
7745            next_offset += envelope_size;
7746            _next_ordinal_to_read += 1;
7747            if next_offset >= end_offset {
7748                return Ok(());
7749            }
7750
7751            // Decode unknown envelopes for gaps in ordinals.
7752            while _next_ordinal_to_read < 9 {
7753                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7754                _next_ordinal_to_read += 1;
7755                next_offset += envelope_size;
7756            }
7757
7758            let next_out_of_line = decoder.next_out_of_line();
7759            let handles_before = decoder.remaining_handles();
7760            if let Some((inlined, num_bytes, num_handles)) =
7761                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7762            {
7763                let member_inline_size =
7764                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7765                        decoder.context,
7766                    );
7767                if inlined != (member_inline_size <= 4) {
7768                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
7769                }
7770                let inner_offset;
7771                let mut inner_depth = depth.clone();
7772                if inlined {
7773                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7774                    inner_offset = next_offset;
7775                } else {
7776                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7777                    inner_depth.increment()?;
7778                }
7779                let val_ref = self
7780                    .build_time_capability_type
7781                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7782                fidl::decode!(
7783                    fidl::encoding::UnboundedString,
7784                    D,
7785                    val_ref,
7786                    decoder,
7787                    inner_offset,
7788                    inner_depth
7789                )?;
7790                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7791                {
7792                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
7793                }
7794                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7795                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7796                }
7797            }
7798
7799            next_offset += envelope_size;
7800
7801            // Decode the remaining unknown envelopes.
7802            while next_offset < end_offset {
7803                _next_ordinal_to_read += 1;
7804                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7805                next_offset += envelope_size;
7806            }
7807
7808            Ok(())
7809        }
7810    }
7811
7812    impl ServiceInstance {
7813        #[inline(always)]
7814        fn max_ordinal_present(&self) -> u64 {
7815            if let Some(_) = self.child_instance_name {
7816                return 3;
7817            }
7818            if let Some(_) = self.child_name {
7819                return 2;
7820            }
7821            if let Some(_) = self.instance_name {
7822                return 1;
7823            }
7824            0
7825        }
7826    }
7827
7828    impl fidl::encoding::ValueTypeMarker for ServiceInstance {
7829        type Borrowed<'a> = &'a Self;
7830        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7831            value
7832        }
7833    }
7834
7835    unsafe impl fidl::encoding::TypeMarker for ServiceInstance {
7836        type Owned = Self;
7837
7838        #[inline(always)]
7839        fn inline_align(_context: fidl::encoding::Context) -> usize {
7840            8
7841        }
7842
7843        #[inline(always)]
7844        fn inline_size(_context: fidl::encoding::Context) -> usize {
7845            16
7846        }
7847    }
7848
7849    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServiceInstance, D>
7850        for &ServiceInstance
7851    {
7852        unsafe fn encode(
7853            self,
7854            encoder: &mut fidl::encoding::Encoder<'_, D>,
7855            offset: usize,
7856            mut depth: fidl::encoding::Depth,
7857        ) -> fidl::Result<()> {
7858            encoder.debug_check_bounds::<ServiceInstance>(offset);
7859            // Vector header
7860            let max_ordinal: u64 = self.max_ordinal_present();
7861            encoder.write_num(max_ordinal, offset);
7862            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7863            // Calling encoder.out_of_line_offset(0) is not allowed.
7864            if max_ordinal == 0 {
7865                return Ok(());
7866            }
7867            depth.increment()?;
7868            let envelope_size = 8;
7869            let bytes_len = max_ordinal as usize * envelope_size;
7870            #[allow(unused_variables)]
7871            let offset = encoder.out_of_line_offset(bytes_len);
7872            let mut _prev_end_offset: usize = 0;
7873            if 1 > max_ordinal {
7874                return Ok(());
7875            }
7876
7877            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7878            // are envelope_size bytes.
7879            let cur_offset: usize = (1 - 1) * envelope_size;
7880
7881            // Zero reserved fields.
7882            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7883
7884            // Safety:
7885            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7886            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7887            //   envelope_size bytes, there is always sufficient room.
7888            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7889                self.instance_name.as_ref().map(
7890                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7891                ),
7892                encoder,
7893                offset + cur_offset,
7894                depth,
7895            )?;
7896
7897            _prev_end_offset = cur_offset + envelope_size;
7898            if 2 > max_ordinal {
7899                return Ok(());
7900            }
7901
7902            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7903            // are envelope_size bytes.
7904            let cur_offset: usize = (2 - 1) * envelope_size;
7905
7906            // Zero reserved fields.
7907            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7908
7909            // Safety:
7910            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7911            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7912            //   envelope_size bytes, there is always sufficient room.
7913            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7914                self.child_name.as_ref().map(
7915                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7916                ),
7917                encoder,
7918                offset + cur_offset,
7919                depth,
7920            )?;
7921
7922            _prev_end_offset = cur_offset + envelope_size;
7923            if 3 > max_ordinal {
7924                return Ok(());
7925            }
7926
7927            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
7928            // are envelope_size bytes.
7929            let cur_offset: usize = (3 - 1) * envelope_size;
7930
7931            // Zero reserved fields.
7932            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7933
7934            // Safety:
7935            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
7936            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
7937            //   envelope_size bytes, there is always sufficient room.
7938            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7939                self.child_instance_name.as_ref().map(
7940                    <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7941                ),
7942                encoder,
7943                offset + cur_offset,
7944                depth,
7945            )?;
7946
7947            _prev_end_offset = cur_offset + envelope_size;
7948
7949            Ok(())
7950        }
7951    }
7952
7953    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServiceInstance {
7954        #[inline(always)]
7955        fn new_empty() -> Self {
7956            Self::default()
7957        }
7958
7959        unsafe fn decode(
7960            &mut self,
7961            decoder: &mut fidl::encoding::Decoder<'_, D>,
7962            offset: usize,
7963            mut depth: fidl::encoding::Depth,
7964        ) -> fidl::Result<()> {
7965            decoder.debug_check_bounds::<Self>(offset);
7966            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7967                None => return Err(fidl::Error::NotNullable),
7968                Some(len) => len,
7969            };
7970            // Calling decoder.out_of_line_offset(0) is not allowed.
7971            if len == 0 {
7972                return Ok(());
7973            };
7974            depth.increment()?;
7975            let envelope_size = 8;
7976            let bytes_len = len * envelope_size;
7977            let offset = decoder.out_of_line_offset(bytes_len)?;
7978            // Decode the envelope for each type.
7979            let mut _next_ordinal_to_read = 0;
7980            let mut next_offset = offset;
7981            let end_offset = offset + bytes_len;
7982            _next_ordinal_to_read += 1;
7983            if next_offset >= end_offset {
7984                return Ok(());
7985            }
7986
7987            // Decode unknown envelopes for gaps in ordinals.
7988            while _next_ordinal_to_read < 1 {
7989                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7990                _next_ordinal_to_read += 1;
7991                next_offset += envelope_size;
7992            }
7993
7994            let next_out_of_line = decoder.next_out_of_line();
7995            let handles_before = decoder.remaining_handles();
7996            if let Some((inlined, num_bytes, num_handles)) =
7997                fidl::encoding::decode_envelope_header(decoder, next_offset)?
7998            {
7999                let member_inline_size =
8000                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8001                        decoder.context,
8002                    );
8003                if inlined != (member_inline_size <= 4) {
8004                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8005                }
8006                let inner_offset;
8007                let mut inner_depth = depth.clone();
8008                if inlined {
8009                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8010                    inner_offset = next_offset;
8011                } else {
8012                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8013                    inner_depth.increment()?;
8014                }
8015                let val_ref = self
8016                    .instance_name
8017                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8018                fidl::decode!(
8019                    fidl::encoding::UnboundedString,
8020                    D,
8021                    val_ref,
8022                    decoder,
8023                    inner_offset,
8024                    inner_depth
8025                )?;
8026                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8027                {
8028                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8029                }
8030                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8031                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8032                }
8033            }
8034
8035            next_offset += envelope_size;
8036            _next_ordinal_to_read += 1;
8037            if next_offset >= end_offset {
8038                return Ok(());
8039            }
8040
8041            // Decode unknown envelopes for gaps in ordinals.
8042            while _next_ordinal_to_read < 2 {
8043                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8044                _next_ordinal_to_read += 1;
8045                next_offset += envelope_size;
8046            }
8047
8048            let next_out_of_line = decoder.next_out_of_line();
8049            let handles_before = decoder.remaining_handles();
8050            if let Some((inlined, num_bytes, num_handles)) =
8051                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8052            {
8053                let member_inline_size =
8054                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8055                        decoder.context,
8056                    );
8057                if inlined != (member_inline_size <= 4) {
8058                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8059                }
8060                let inner_offset;
8061                let mut inner_depth = depth.clone();
8062                if inlined {
8063                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8064                    inner_offset = next_offset;
8065                } else {
8066                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8067                    inner_depth.increment()?;
8068                }
8069                let val_ref = self
8070                    .child_name
8071                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8072                fidl::decode!(
8073                    fidl::encoding::UnboundedString,
8074                    D,
8075                    val_ref,
8076                    decoder,
8077                    inner_offset,
8078                    inner_depth
8079                )?;
8080                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8081                {
8082                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8083                }
8084                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8085                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8086                }
8087            }
8088
8089            next_offset += envelope_size;
8090            _next_ordinal_to_read += 1;
8091            if next_offset >= end_offset {
8092                return Ok(());
8093            }
8094
8095            // Decode unknown envelopes for gaps in ordinals.
8096            while _next_ordinal_to_read < 3 {
8097                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8098                _next_ordinal_to_read += 1;
8099                next_offset += envelope_size;
8100            }
8101
8102            let next_out_of_line = decoder.next_out_of_line();
8103            let handles_before = decoder.remaining_handles();
8104            if let Some((inlined, num_bytes, num_handles)) =
8105                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8106            {
8107                let member_inline_size =
8108                    <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8109                        decoder.context,
8110                    );
8111                if inlined != (member_inline_size <= 4) {
8112                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8113                }
8114                let inner_offset;
8115                let mut inner_depth = depth.clone();
8116                if inlined {
8117                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8118                    inner_offset = next_offset;
8119                } else {
8120                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8121                    inner_depth.increment()?;
8122                }
8123                let val_ref = self
8124                    .child_instance_name
8125                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8126                fidl::decode!(
8127                    fidl::encoding::UnboundedString,
8128                    D,
8129                    val_ref,
8130                    decoder,
8131                    inner_offset,
8132                    inner_depth
8133                )?;
8134                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8135                {
8136                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8137                }
8138                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8139                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8140                }
8141            }
8142
8143            next_offset += envelope_size;
8144
8145            // Decode the remaining unknown envelopes.
8146            while next_offset < end_offset {
8147                _next_ordinal_to_read += 1;
8148                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8149                next_offset += envelope_size;
8150            }
8151
8152            Ok(())
8153        }
8154    }
8155
8156    impl StorageStatus {
8157        #[inline(always)]
8158        fn max_ordinal_present(&self) -> u64 {
8159            if let Some(_) = self.used_size {
8160                return 2;
8161            }
8162            if let Some(_) = self.total_size {
8163                return 1;
8164            }
8165            0
8166        }
8167    }
8168
8169    impl fidl::encoding::ValueTypeMarker for StorageStatus {
8170        type Borrowed<'a> = &'a Self;
8171        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8172            value
8173        }
8174    }
8175
8176    unsafe impl fidl::encoding::TypeMarker for StorageStatus {
8177        type Owned = Self;
8178
8179        #[inline(always)]
8180        fn inline_align(_context: fidl::encoding::Context) -> usize {
8181            8
8182        }
8183
8184        #[inline(always)]
8185        fn inline_size(_context: fidl::encoding::Context) -> usize {
8186            16
8187        }
8188    }
8189
8190    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StorageStatus, D>
8191        for &StorageStatus
8192    {
8193        unsafe fn encode(
8194            self,
8195            encoder: &mut fidl::encoding::Encoder<'_, D>,
8196            offset: usize,
8197            mut depth: fidl::encoding::Depth,
8198        ) -> fidl::Result<()> {
8199            encoder.debug_check_bounds::<StorageStatus>(offset);
8200            // Vector header
8201            let max_ordinal: u64 = self.max_ordinal_present();
8202            encoder.write_num(max_ordinal, offset);
8203            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8204            // Calling encoder.out_of_line_offset(0) is not allowed.
8205            if max_ordinal == 0 {
8206                return Ok(());
8207            }
8208            depth.increment()?;
8209            let envelope_size = 8;
8210            let bytes_len = max_ordinal as usize * envelope_size;
8211            #[allow(unused_variables)]
8212            let offset = encoder.out_of_line_offset(bytes_len);
8213            let mut _prev_end_offset: usize = 0;
8214            if 1 > max_ordinal {
8215                return Ok(());
8216            }
8217
8218            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8219            // are envelope_size bytes.
8220            let cur_offset: usize = (1 - 1) * envelope_size;
8221
8222            // Zero reserved fields.
8223            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8224
8225            // Safety:
8226            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8227            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8228            //   envelope_size bytes, there is always sufficient room.
8229            fidl::encoding::encode_in_envelope_optional::<u64, D>(
8230                self.total_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8231                encoder,
8232                offset + cur_offset,
8233                depth,
8234            )?;
8235
8236            _prev_end_offset = cur_offset + envelope_size;
8237            if 2 > max_ordinal {
8238                return Ok(());
8239            }
8240
8241            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
8242            // are envelope_size bytes.
8243            let cur_offset: usize = (2 - 1) * envelope_size;
8244
8245            // Zero reserved fields.
8246            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8247
8248            // Safety:
8249            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
8250            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
8251            //   envelope_size bytes, there is always sufficient room.
8252            fidl::encoding::encode_in_envelope_optional::<u64, D>(
8253                self.used_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8254                encoder,
8255                offset + cur_offset,
8256                depth,
8257            )?;
8258
8259            _prev_end_offset = cur_offset + envelope_size;
8260
8261            Ok(())
8262        }
8263    }
8264
8265    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StorageStatus {
8266        #[inline(always)]
8267        fn new_empty() -> Self {
8268            Self::default()
8269        }
8270
8271        unsafe fn decode(
8272            &mut self,
8273            decoder: &mut fidl::encoding::Decoder<'_, D>,
8274            offset: usize,
8275            mut depth: fidl::encoding::Depth,
8276        ) -> fidl::Result<()> {
8277            decoder.debug_check_bounds::<Self>(offset);
8278            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8279                None => return Err(fidl::Error::NotNullable),
8280                Some(len) => len,
8281            };
8282            // Calling decoder.out_of_line_offset(0) is not allowed.
8283            if len == 0 {
8284                return Ok(());
8285            };
8286            depth.increment()?;
8287            let envelope_size = 8;
8288            let bytes_len = len * envelope_size;
8289            let offset = decoder.out_of_line_offset(bytes_len)?;
8290            // Decode the envelope for each type.
8291            let mut _next_ordinal_to_read = 0;
8292            let mut next_offset = offset;
8293            let end_offset = offset + bytes_len;
8294            _next_ordinal_to_read += 1;
8295            if next_offset >= end_offset {
8296                return Ok(());
8297            }
8298
8299            // Decode unknown envelopes for gaps in ordinals.
8300            while _next_ordinal_to_read < 1 {
8301                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8302                _next_ordinal_to_read += 1;
8303                next_offset += envelope_size;
8304            }
8305
8306            let next_out_of_line = decoder.next_out_of_line();
8307            let handles_before = decoder.remaining_handles();
8308            if let Some((inlined, num_bytes, num_handles)) =
8309                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8310            {
8311                let member_inline_size =
8312                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8313                if inlined != (member_inline_size <= 4) {
8314                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8315                }
8316                let inner_offset;
8317                let mut inner_depth = depth.clone();
8318                if inlined {
8319                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8320                    inner_offset = next_offset;
8321                } else {
8322                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8323                    inner_depth.increment()?;
8324                }
8325                let val_ref = self.total_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8326                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8327                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8328                {
8329                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8330                }
8331                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8332                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8333                }
8334            }
8335
8336            next_offset += envelope_size;
8337            _next_ordinal_to_read += 1;
8338            if next_offset >= end_offset {
8339                return Ok(());
8340            }
8341
8342            // Decode unknown envelopes for gaps in ordinals.
8343            while _next_ordinal_to_read < 2 {
8344                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8345                _next_ordinal_to_read += 1;
8346                next_offset += envelope_size;
8347            }
8348
8349            let next_out_of_line = decoder.next_out_of_line();
8350            let handles_before = decoder.remaining_handles();
8351            if let Some((inlined, num_bytes, num_handles)) =
8352                fidl::encoding::decode_envelope_header(decoder, next_offset)?
8353            {
8354                let member_inline_size =
8355                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8356                if inlined != (member_inline_size <= 4) {
8357                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
8358                }
8359                let inner_offset;
8360                let mut inner_depth = depth.clone();
8361                if inlined {
8362                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8363                    inner_offset = next_offset;
8364                } else {
8365                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8366                    inner_depth.increment()?;
8367                }
8368                let val_ref = self.used_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8369                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8370                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8371                {
8372                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
8373                }
8374                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8375                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8376                }
8377            }
8378
8379            next_offset += envelope_size;
8380
8381            // Decode the remaining unknown envelopes.
8382            while next_offset < end_offset {
8383                _next_ordinal_to_read += 1;
8384                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8385                next_offset += envelope_size;
8386            }
8387
8388            Ok(())
8389        }
8390    }
8391
8392    impl fidl::encoding::ValueTypeMarker for ChildLocation {
8393        type Borrowed<'a> = &'a Self;
8394        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8395            value
8396        }
8397    }
8398
8399    unsafe impl fidl::encoding::TypeMarker for ChildLocation {
8400        type Owned = Self;
8401
8402        #[inline(always)]
8403        fn inline_align(_context: fidl::encoding::Context) -> usize {
8404            8
8405        }
8406
8407        #[inline(always)]
8408        fn inline_size(_context: fidl::encoding::Context) -> usize {
8409            16
8410        }
8411    }
8412
8413    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ChildLocation, D>
8414        for &ChildLocation
8415    {
8416        #[inline]
8417        unsafe fn encode(
8418            self,
8419            encoder: &mut fidl::encoding::Encoder<'_, D>,
8420            offset: usize,
8421            _depth: fidl::encoding::Depth,
8422        ) -> fidl::Result<()> {
8423            encoder.debug_check_bounds::<ChildLocation>(offset);
8424            encoder.write_num::<u64>(self.ordinal(), offset);
8425            match self {
8426                ChildLocation::Collection(ref val) => fidl::encoding::encode_in_envelope::<
8427                    fidl::encoding::BoundedString<255>,
8428                    D,
8429                >(
8430                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
8431                        val,
8432                    ),
8433                    encoder,
8434                    offset + 8,
8435                    _depth,
8436                ),
8437                ChildLocation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
8438            }
8439        }
8440    }
8441
8442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ChildLocation {
8443        #[inline(always)]
8444        fn new_empty() -> Self {
8445            Self::__SourceBreaking { unknown_ordinal: 0 }
8446        }
8447
8448        #[inline]
8449        unsafe fn decode(
8450            &mut self,
8451            decoder: &mut fidl::encoding::Decoder<'_, D>,
8452            offset: usize,
8453            mut depth: fidl::encoding::Depth,
8454        ) -> fidl::Result<()> {
8455            decoder.debug_check_bounds::<Self>(offset);
8456            #[allow(unused_variables)]
8457            let next_out_of_line = decoder.next_out_of_line();
8458            let handles_before = decoder.remaining_handles();
8459            let (ordinal, inlined, num_bytes, num_handles) =
8460                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
8461
8462            let member_inline_size = match ordinal {
8463                1 => {
8464                    <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
8465                        decoder.context,
8466                    )
8467                }
8468                0 => return Err(fidl::Error::UnknownUnionTag),
8469                _ => num_bytes as usize,
8470            };
8471
8472            if inlined != (member_inline_size <= 4) {
8473                return Err(fidl::Error::InvalidInlineBitInEnvelope);
8474            }
8475            let _inner_offset;
8476            if inlined {
8477                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
8478                _inner_offset = offset + 8;
8479            } else {
8480                depth.increment()?;
8481                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8482            }
8483            match ordinal {
8484                1 => {
8485                    #[allow(irrefutable_let_patterns)]
8486                    if let ChildLocation::Collection(_) = self {
8487                        // Do nothing, read the value into the object
8488                    } else {
8489                        // Initialize `self` to the right variant
8490                        *self = ChildLocation::Collection(fidl::new_empty!(
8491                            fidl::encoding::BoundedString<255>,
8492                            D
8493                        ));
8494                    }
8495                    #[allow(irrefutable_let_patterns)]
8496                    if let ChildLocation::Collection(ref mut val) = self {
8497                        fidl::decode!(
8498                            fidl::encoding::BoundedString<255>,
8499                            D,
8500                            val,
8501                            decoder,
8502                            _inner_offset,
8503                            depth
8504                        )?;
8505                    } else {
8506                        unreachable!()
8507                    }
8508                }
8509                #[allow(deprecated)]
8510                ordinal => {
8511                    for _ in 0..num_handles {
8512                        decoder.drop_next_handle()?;
8513                    }
8514                    *self = ChildLocation::__SourceBreaking { unknown_ordinal: ordinal };
8515                }
8516            }
8517            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
8518                return Err(fidl::Error::InvalidNumBytesInEnvelope);
8519            }
8520            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8521                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8522            }
8523            Ok(())
8524        }
8525    }
8526}