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