fidl_fuchsia_fs_startup__common/
fidl_fuchsia_fs_startup__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/// Compression algorithm specifier.
12#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
13pub enum CompressionAlgorithm {
14    ZstdChunked,
15    Uncompressed,
16    #[doc(hidden)]
17    __SourceBreaking {
18        unknown_ordinal: u32,
19    },
20}
21
22/// Pattern that matches an unknown `CompressionAlgorithm` member.
23#[macro_export]
24macro_rules! CompressionAlgorithmUnknown {
25    () => {
26        _
27    };
28}
29
30impl CompressionAlgorithm {
31    #[inline]
32    pub fn from_primitive(prim: u32) -> Option<Self> {
33        match prim {
34            0 => Some(Self::ZstdChunked),
35            1 => Some(Self::Uncompressed),
36            _ => None,
37        }
38    }
39
40    #[inline]
41    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
42        match prim {
43            0 => Self::ZstdChunked,
44            1 => Self::Uncompressed,
45            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
46        }
47    }
48
49    #[inline]
50    pub fn unknown() -> Self {
51        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
52    }
53
54    #[inline]
55    pub const fn into_primitive(self) -> u32 {
56        match self {
57            Self::ZstdChunked => 0,
58            Self::Uncompressed => 1,
59            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
60        }
61    }
62
63    #[inline]
64    pub fn is_unknown(&self) -> bool {
65        match self {
66            Self::__SourceBreaking { unknown_ordinal: _ } => true,
67            _ => false,
68        }
69    }
70}
71
72/// An optional eviction policy override for pager-backed blobs for blobfs.
73#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
74pub enum EvictionPolicyOverride {
75    /// Don't override the default cache policy.
76    None,
77    /// Override the default cache policy for pager-backed blobs with kNeverEvict.
78    NeverEvict,
79    /// Override the default cache policy for pager-backed blobs with kEvictImmediately.
80    EvictImmediately,
81    #[doc(hidden)]
82    __SourceBreaking { unknown_ordinal: u32 },
83}
84
85/// Pattern that matches an unknown `EvictionPolicyOverride` member.
86#[macro_export]
87macro_rules! EvictionPolicyOverrideUnknown {
88    () => {
89        _
90    };
91}
92
93impl EvictionPolicyOverride {
94    #[inline]
95    pub fn from_primitive(prim: u32) -> Option<Self> {
96        match prim {
97            0 => Some(Self::None),
98            1 => Some(Self::NeverEvict),
99            2 => Some(Self::EvictImmediately),
100            _ => None,
101        }
102    }
103
104    #[inline]
105    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
106        match prim {
107            0 => Self::None,
108            1 => Self::NeverEvict,
109            2 => Self::EvictImmediately,
110            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
111        }
112    }
113
114    #[inline]
115    pub fn unknown() -> Self {
116        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
117    }
118
119    #[inline]
120    pub const fn into_primitive(self) -> u32 {
121        match self {
122            Self::None => 0,
123            Self::NeverEvict => 1,
124            Self::EvictImmediately => 2,
125            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
126        }
127    }
128
129    #[inline]
130    pub fn is_unknown(&self) -> bool {
131        match self {
132            Self::__SourceBreaking { unknown_ordinal: _ } => true,
133            _ => false,
134        }
135    }
136}
137
138#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
139#[repr(C)]
140pub struct VolumeSetLimitRequest {
141    pub bytes: u64,
142}
143
144impl fidl::Persistable for VolumeSetLimitRequest {}
145
146#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147#[repr(C)]
148pub struct VolumeGetLimitResponse {
149    pub bytes: u64,
150}
151
152impl fidl::Persistable for VolumeGetLimitResponse {}
153
154#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
155pub struct VolumesRemoveRequest {
156    pub name: String,
157}
158
159impl fidl::Persistable for VolumesRemoveRequest {}
160
161#[derive(Clone, Debug, PartialEq)]
162pub struct VolumesGetInfoResponse {
163    pub info: Option<Box<fidl_fuchsia_hardware_block_volume__common::VolumeManagerInfo>>,
164}
165
166impl fidl::Persistable for VolumesGetInfoResponse {}
167
168/// Options for how to format filesystems.
169#[derive(Clone, Debug, Default, PartialEq)]
170pub struct FormatOptions {
171    /// Enable verbose logging.
172    pub verbose: Option<bool>,
173    /// If true, use the deprecated padded merkle tree blobfs format.
174    pub deprecated_padded_blobfs_format: Option<bool>,
175    /// The initial number of inodes to allocate space for. If zero, a default is used. Only
176    /// supported for blobfs.
177    pub num_inodes: Option<u64>,
178    /// The number of fvm slices to preallocate for data when the filesystem is created.
179    pub fvm_data_slices: Option<u32>,
180    /// The number of sectors-per-cluster (for FAT filesystems).
181    pub sectors_per_cluster: Option<u16>,
182    #[doc(hidden)]
183    pub __source_breaking: fidl::marker::SourceBreaking,
184}
185
186impl fidl::Persistable for FormatOptions {}
187
188/// Options for starting a filesystem.
189#[derive(Clone, Debug, Default, PartialEq)]
190pub struct StartOptions {
191    /// Start the filesystem in read-only mode.
192    pub read_only: Option<bool>,
193    /// Enable verbose logging.
194    pub verbose: Option<bool>,
195    /// If true, run fsck after every transaction. This is for testing purposes only - it's very
196    /// slow to run a filesystem like this.
197    pub fsck_after_every_transaction: Option<bool>,
198    /// A compression algorithm specifier for the filesystem to use when storing files (if the
199    /// filesystem supports it). Defaults to ZSTD_CHUNKED.
200    pub write_compression_algorithm: Option<CompressionAlgorithm>,
201    /// An optional compression level for the filesystem to use when storing files (if the
202    /// filesystem and the configured |write_compression_algorithm| supports it). Setting to < 0
203    /// indicates no value (the filesystem chooses a default if necessary).
204    pub write_compression_level: Option<i32>,
205    /// An optional eviction policy specifier for the filesystem to use for in-memory structures
206    /// (if the filesystem supports it), specifically for pager-backed files.
207    pub cache_eviction_policy_override: Option<EvictionPolicyOverride>,
208    /// Use profiling for the first N seconds after filesystem start. Records the access patterns
209    /// of objects for N seconds and if the profile already exists, prefetch data and hold the vmos
210    /// in cache for N seconds. Functionally this means that the first launch with this option
211    /// records the profile and all other launches with this option will replay that profile.
212    pub startup_profiling_seconds: Option<u32>,
213    /// If true, configures the filesystem to use the hardware's inline encryption engine when
214    /// writing encrypted data. This allows the filesystem to store user-encrypted data without
215    /// being able to read or write the plaintext contents, which enhances security and privacy.
216    /// Requires the block device to support inline encryption and for `barriers_enabled` to be
217    /// true.
218    /// TODO(https://fxbug.dev/393196849): For now, this flag only prevents the filesystem from
219    /// computing checksums. Update this comment when the filesystem actually uses inline
220    /// encryption.
221    pub inline_crypto_enabled: Option<bool>,
222    /// Configures the filesystem to use barriers instead of checksums to ensure consistency. If
223    /// set, barriers will be used to enforce proper ordering of data and metadata writes, which
224    /// is otherwise provided by computing and verifying data checksums.  Requires filesystem
225    /// support; at the time of writing, only Fxfs uses this argument.
226    /// Must be set to true if `inline_crypto_enabled` is true.
227    pub barriers_enabled: Option<bool>,
228    /// Only valid for GPT.
229    /// Configures the GPT to merge the `super` and `userdata` partitions into an overlay partition
230    /// `fxfs` when possible.  The partitions must be physically contiguous.  See
231    /// fuchsia.storage.partitions.OverlayPartition for more details.
232    pub merge_super_and_userdata: Option<bool>,
233    #[doc(hidden)]
234    pub __source_breaking: fidl::marker::SourceBreaking,
235}
236
237impl fidl::Persistable for StartOptions {}
238
239pub mod startup_ordinals {
240    pub const START: u64 = 0x317aa9458d3190c8;
241    pub const FORMAT: u64 = 0x3124676dd91933de;
242    pub const CHECK: u64 = 0x81e85b3190e7db3;
243}
244
245pub mod volume_ordinals {
246    pub const MOUNT: u64 = 0x3470ab56d455af0;
247    pub const CHECK: u64 = 0x5b638348f5e0418c;
248    pub const SET_LIMIT: u64 = 0x19286d83eb3cd137;
249    pub const GET_LIMIT: u64 = 0xb14e4950939f16;
250}
251
252pub mod volumes_ordinals {
253    pub const CREATE: u64 = 0x11a55097834b38e8;
254    pub const REMOVE: u64 = 0x70983b9344dc2292;
255    pub const GET_INFO: u64 = 0x50d2962df9a0746e;
256}
257
258mod internal {
259    use super::*;
260    unsafe impl fidl::encoding::TypeMarker for CompressionAlgorithm {
261        type Owned = Self;
262
263        #[inline(always)]
264        fn inline_align(_context: fidl::encoding::Context) -> usize {
265            std::mem::align_of::<u32>()
266        }
267
268        #[inline(always)]
269        fn inline_size(_context: fidl::encoding::Context) -> usize {
270            std::mem::size_of::<u32>()
271        }
272
273        #[inline(always)]
274        fn encode_is_copy() -> bool {
275            false
276        }
277
278        #[inline(always)]
279        fn decode_is_copy() -> bool {
280            false
281        }
282    }
283
284    impl fidl::encoding::ValueTypeMarker for CompressionAlgorithm {
285        type Borrowed<'a> = Self;
286        #[inline(always)]
287        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
288            *value
289        }
290    }
291
292    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
293        for CompressionAlgorithm
294    {
295        #[inline]
296        unsafe fn encode(
297            self,
298            encoder: &mut fidl::encoding::Encoder<'_, D>,
299            offset: usize,
300            _depth: fidl::encoding::Depth,
301        ) -> fidl::Result<()> {
302            encoder.debug_check_bounds::<Self>(offset);
303            encoder.write_num(self.into_primitive(), offset);
304            Ok(())
305        }
306    }
307
308    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CompressionAlgorithm {
309        #[inline(always)]
310        fn new_empty() -> Self {
311            Self::unknown()
312        }
313
314        #[inline]
315        unsafe fn decode(
316            &mut self,
317            decoder: &mut fidl::encoding::Decoder<'_, D>,
318            offset: usize,
319            _depth: fidl::encoding::Depth,
320        ) -> fidl::Result<()> {
321            decoder.debug_check_bounds::<Self>(offset);
322            let prim = decoder.read_num::<u32>(offset);
323
324            *self = Self::from_primitive_allow_unknown(prim);
325            Ok(())
326        }
327    }
328    unsafe impl fidl::encoding::TypeMarker for EvictionPolicyOverride {
329        type Owned = Self;
330
331        #[inline(always)]
332        fn inline_align(_context: fidl::encoding::Context) -> usize {
333            std::mem::align_of::<u32>()
334        }
335
336        #[inline(always)]
337        fn inline_size(_context: fidl::encoding::Context) -> usize {
338            std::mem::size_of::<u32>()
339        }
340
341        #[inline(always)]
342        fn encode_is_copy() -> bool {
343            false
344        }
345
346        #[inline(always)]
347        fn decode_is_copy() -> bool {
348            false
349        }
350    }
351
352    impl fidl::encoding::ValueTypeMarker for EvictionPolicyOverride {
353        type Borrowed<'a> = Self;
354        #[inline(always)]
355        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
356            *value
357        }
358    }
359
360    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
361        for EvictionPolicyOverride
362    {
363        #[inline]
364        unsafe fn encode(
365            self,
366            encoder: &mut fidl::encoding::Encoder<'_, D>,
367            offset: usize,
368            _depth: fidl::encoding::Depth,
369        ) -> fidl::Result<()> {
370            encoder.debug_check_bounds::<Self>(offset);
371            encoder.write_num(self.into_primitive(), offset);
372            Ok(())
373        }
374    }
375
376    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
377        for EvictionPolicyOverride
378    {
379        #[inline(always)]
380        fn new_empty() -> Self {
381            Self::unknown()
382        }
383
384        #[inline]
385        unsafe fn decode(
386            &mut self,
387            decoder: &mut fidl::encoding::Decoder<'_, D>,
388            offset: usize,
389            _depth: fidl::encoding::Depth,
390        ) -> fidl::Result<()> {
391            decoder.debug_check_bounds::<Self>(offset);
392            let prim = decoder.read_num::<u32>(offset);
393
394            *self = Self::from_primitive_allow_unknown(prim);
395            Ok(())
396        }
397    }
398
399    impl fidl::encoding::ValueTypeMarker for VolumeSetLimitRequest {
400        type Borrowed<'a> = &'a Self;
401        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
402            value
403        }
404    }
405
406    unsafe impl fidl::encoding::TypeMarker for VolumeSetLimitRequest {
407        type Owned = Self;
408
409        #[inline(always)]
410        fn inline_align(_context: fidl::encoding::Context) -> usize {
411            8
412        }
413
414        #[inline(always)]
415        fn inline_size(_context: fidl::encoding::Context) -> usize {
416            8
417        }
418        #[inline(always)]
419        fn encode_is_copy() -> bool {
420            true
421        }
422
423        #[inline(always)]
424        fn decode_is_copy() -> bool {
425            true
426        }
427    }
428
429    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VolumeSetLimitRequest, D>
430        for &VolumeSetLimitRequest
431    {
432        #[inline]
433        unsafe fn encode(
434            self,
435            encoder: &mut fidl::encoding::Encoder<'_, D>,
436            offset: usize,
437            _depth: fidl::encoding::Depth,
438        ) -> fidl::Result<()> {
439            encoder.debug_check_bounds::<VolumeSetLimitRequest>(offset);
440            unsafe {
441                // Copy the object into the buffer.
442                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
443                (buf_ptr as *mut VolumeSetLimitRequest)
444                    .write_unaligned((self as *const VolumeSetLimitRequest).read());
445                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
446                // done second because the memcpy will write garbage to these bytes.
447            }
448            Ok(())
449        }
450    }
451    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
452        fidl::encoding::Encode<VolumeSetLimitRequest, D> for (T0,)
453    {
454        #[inline]
455        unsafe fn encode(
456            self,
457            encoder: &mut fidl::encoding::Encoder<'_, D>,
458            offset: usize,
459            depth: fidl::encoding::Depth,
460        ) -> fidl::Result<()> {
461            encoder.debug_check_bounds::<VolumeSetLimitRequest>(offset);
462            // Zero out padding regions. There's no need to apply masks
463            // because the unmasked parts will be overwritten by fields.
464            // Write the fields.
465            self.0.encode(encoder, offset + 0, depth)?;
466            Ok(())
467        }
468    }
469
470    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VolumeSetLimitRequest {
471        #[inline(always)]
472        fn new_empty() -> Self {
473            Self { bytes: fidl::new_empty!(u64, D) }
474        }
475
476        #[inline]
477        unsafe fn decode(
478            &mut self,
479            decoder: &mut fidl::encoding::Decoder<'_, D>,
480            offset: usize,
481            _depth: fidl::encoding::Depth,
482        ) -> fidl::Result<()> {
483            decoder.debug_check_bounds::<Self>(offset);
484            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
485            // Verify that padding bytes are zero.
486            // Copy from the buffer into the object.
487            unsafe {
488                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
489            }
490            Ok(())
491        }
492    }
493
494    impl fidl::encoding::ValueTypeMarker for VolumeGetLimitResponse {
495        type Borrowed<'a> = &'a Self;
496        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
497            value
498        }
499    }
500
501    unsafe impl fidl::encoding::TypeMarker for VolumeGetLimitResponse {
502        type Owned = Self;
503
504        #[inline(always)]
505        fn inline_align(_context: fidl::encoding::Context) -> usize {
506            8
507        }
508
509        #[inline(always)]
510        fn inline_size(_context: fidl::encoding::Context) -> usize {
511            8
512        }
513        #[inline(always)]
514        fn encode_is_copy() -> bool {
515            true
516        }
517
518        #[inline(always)]
519        fn decode_is_copy() -> bool {
520            true
521        }
522    }
523
524    unsafe impl<D: fidl::encoding::ResourceDialect>
525        fidl::encoding::Encode<VolumeGetLimitResponse, D> for &VolumeGetLimitResponse
526    {
527        #[inline]
528        unsafe fn encode(
529            self,
530            encoder: &mut fidl::encoding::Encoder<'_, D>,
531            offset: usize,
532            _depth: fidl::encoding::Depth,
533        ) -> fidl::Result<()> {
534            encoder.debug_check_bounds::<VolumeGetLimitResponse>(offset);
535            unsafe {
536                // Copy the object into the buffer.
537                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
538                (buf_ptr as *mut VolumeGetLimitResponse)
539                    .write_unaligned((self as *const VolumeGetLimitResponse).read());
540                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
541                // done second because the memcpy will write garbage to these bytes.
542            }
543            Ok(())
544        }
545    }
546    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
547        fidl::encoding::Encode<VolumeGetLimitResponse, D> for (T0,)
548    {
549        #[inline]
550        unsafe fn encode(
551            self,
552            encoder: &mut fidl::encoding::Encoder<'_, D>,
553            offset: usize,
554            depth: fidl::encoding::Depth,
555        ) -> fidl::Result<()> {
556            encoder.debug_check_bounds::<VolumeGetLimitResponse>(offset);
557            // Zero out padding regions. There's no need to apply masks
558            // because the unmasked parts will be overwritten by fields.
559            // Write the fields.
560            self.0.encode(encoder, offset + 0, depth)?;
561            Ok(())
562        }
563    }
564
565    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
566        for VolumeGetLimitResponse
567    {
568        #[inline(always)]
569        fn new_empty() -> Self {
570            Self { bytes: fidl::new_empty!(u64, D) }
571        }
572
573        #[inline]
574        unsafe fn decode(
575            &mut self,
576            decoder: &mut fidl::encoding::Decoder<'_, D>,
577            offset: usize,
578            _depth: fidl::encoding::Depth,
579        ) -> fidl::Result<()> {
580            decoder.debug_check_bounds::<Self>(offset);
581            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
582            // Verify that padding bytes are zero.
583            // Copy from the buffer into the object.
584            unsafe {
585                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
586            }
587            Ok(())
588        }
589    }
590
591    impl fidl::encoding::ValueTypeMarker for VolumesRemoveRequest {
592        type Borrowed<'a> = &'a Self;
593        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
594            value
595        }
596    }
597
598    unsafe impl fidl::encoding::TypeMarker for VolumesRemoveRequest {
599        type Owned = Self;
600
601        #[inline(always)]
602        fn inline_align(_context: fidl::encoding::Context) -> usize {
603            8
604        }
605
606        #[inline(always)]
607        fn inline_size(_context: fidl::encoding::Context) -> usize {
608            16
609        }
610    }
611
612    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<VolumesRemoveRequest, D>
613        for &VolumesRemoveRequest
614    {
615        #[inline]
616        unsafe fn encode(
617            self,
618            encoder: &mut fidl::encoding::Encoder<'_, D>,
619            offset: usize,
620            _depth: fidl::encoding::Depth,
621        ) -> fidl::Result<()> {
622            encoder.debug_check_bounds::<VolumesRemoveRequest>(offset);
623            // Delegate to tuple encoding.
624            fidl::encoding::Encode::<VolumesRemoveRequest, D>::encode(
625                (<fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
626                    &self.name,
627                ),),
628                encoder,
629                offset,
630                _depth,
631            )
632        }
633    }
634    unsafe impl<
635        D: fidl::encoding::ResourceDialect,
636        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
637    > fidl::encoding::Encode<VolumesRemoveRequest, D> for (T0,)
638    {
639        #[inline]
640        unsafe fn encode(
641            self,
642            encoder: &mut fidl::encoding::Encoder<'_, D>,
643            offset: usize,
644            depth: fidl::encoding::Depth,
645        ) -> fidl::Result<()> {
646            encoder.debug_check_bounds::<VolumesRemoveRequest>(offset);
647            // Zero out padding regions. There's no need to apply masks
648            // because the unmasked parts will be overwritten by fields.
649            // Write the fields.
650            self.0.encode(encoder, offset + 0, depth)?;
651            Ok(())
652        }
653    }
654
655    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for VolumesRemoveRequest {
656        #[inline(always)]
657        fn new_empty() -> Self {
658            Self { name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D) }
659        }
660
661        #[inline]
662        unsafe fn decode(
663            &mut self,
664            decoder: &mut fidl::encoding::Decoder<'_, D>,
665            offset: usize,
666            _depth: fidl::encoding::Depth,
667        ) -> fidl::Result<()> {
668            decoder.debug_check_bounds::<Self>(offset);
669            // Verify that padding bytes are zero.
670            fidl::decode!(
671                fidl::encoding::BoundedString<255>,
672                D,
673                &mut self.name,
674                decoder,
675                offset + 0,
676                _depth
677            )?;
678            Ok(())
679        }
680    }
681
682    impl fidl::encoding::ValueTypeMarker for VolumesGetInfoResponse {
683        type Borrowed<'a> = &'a Self;
684        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
685            value
686        }
687    }
688
689    unsafe impl fidl::encoding::TypeMarker for VolumesGetInfoResponse {
690        type Owned = Self;
691
692        #[inline(always)]
693        fn inline_align(_context: fidl::encoding::Context) -> usize {
694            8
695        }
696
697        #[inline(always)]
698        fn inline_size(_context: fidl::encoding::Context) -> usize {
699            8
700        }
701    }
702
703    unsafe impl<D: fidl::encoding::ResourceDialect>
704        fidl::encoding::Encode<VolumesGetInfoResponse, D> for &VolumesGetInfoResponse
705    {
706        #[inline]
707        unsafe fn encode(
708            self,
709            encoder: &mut fidl::encoding::Encoder<'_, D>,
710            offset: usize,
711            _depth: fidl::encoding::Depth,
712        ) -> fidl::Result<()> {
713            encoder.debug_check_bounds::<VolumesGetInfoResponse>(offset);
714            // Delegate to tuple encoding.
715            fidl::encoding::Encode::<VolumesGetInfoResponse, D>::encode(
716                (<fidl::encoding::Boxed<
717                    fidl_fuchsia_hardware_block_volume__common::VolumeManagerInfo,
718                > as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
719                encoder,
720                offset,
721                _depth,
722            )
723        }
724    }
725    unsafe impl<
726        D: fidl::encoding::ResourceDialect,
727        T0: fidl::encoding::Encode<
728                fidl::encoding::Boxed<
729                    fidl_fuchsia_hardware_block_volume__common::VolumeManagerInfo,
730                >,
731                D,
732            >,
733    > fidl::encoding::Encode<VolumesGetInfoResponse, D> for (T0,)
734    {
735        #[inline]
736        unsafe fn encode(
737            self,
738            encoder: &mut fidl::encoding::Encoder<'_, D>,
739            offset: usize,
740            depth: fidl::encoding::Depth,
741        ) -> fidl::Result<()> {
742            encoder.debug_check_bounds::<VolumesGetInfoResponse>(offset);
743            // Zero out padding regions. There's no need to apply masks
744            // because the unmasked parts will be overwritten by fields.
745            // Write the fields.
746            self.0.encode(encoder, offset + 0, depth)?;
747            Ok(())
748        }
749    }
750
751    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
752        for VolumesGetInfoResponse
753    {
754        #[inline(always)]
755        fn new_empty() -> Self {
756            Self {
757                info: fidl::new_empty!(
758                    fidl::encoding::Boxed<
759                        fidl_fuchsia_hardware_block_volume__common::VolumeManagerInfo,
760                    >,
761                    D
762                ),
763            }
764        }
765
766        #[inline]
767        unsafe fn decode(
768            &mut self,
769            decoder: &mut fidl::encoding::Decoder<'_, D>,
770            offset: usize,
771            _depth: fidl::encoding::Depth,
772        ) -> fidl::Result<()> {
773            decoder.debug_check_bounds::<Self>(offset);
774            // Verify that padding bytes are zero.
775            fidl::decode!(
776                fidl::encoding::Boxed<
777                    fidl_fuchsia_hardware_block_volume__common::VolumeManagerInfo,
778                >,
779                D,
780                &mut self.info,
781                decoder,
782                offset + 0,
783                _depth
784            )?;
785            Ok(())
786        }
787    }
788
789    impl FormatOptions {
790        #[inline(always)]
791        fn max_ordinal_present(&self) -> u64 {
792            if let Some(_) = self.sectors_per_cluster {
793                return 5;
794            }
795            if let Some(_) = self.fvm_data_slices {
796                return 4;
797            }
798            if let Some(_) = self.num_inodes {
799                return 3;
800            }
801            if let Some(_) = self.deprecated_padded_blobfs_format {
802                return 2;
803            }
804            if let Some(_) = self.verbose {
805                return 1;
806            }
807            0
808        }
809    }
810
811    impl fidl::encoding::ValueTypeMarker for FormatOptions {
812        type Borrowed<'a> = &'a Self;
813        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
814            value
815        }
816    }
817
818    unsafe impl fidl::encoding::TypeMarker for FormatOptions {
819        type Owned = Self;
820
821        #[inline(always)]
822        fn inline_align(_context: fidl::encoding::Context) -> usize {
823            8
824        }
825
826        #[inline(always)]
827        fn inline_size(_context: fidl::encoding::Context) -> usize {
828            16
829        }
830    }
831
832    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FormatOptions, D>
833        for &FormatOptions
834    {
835        unsafe fn encode(
836            self,
837            encoder: &mut fidl::encoding::Encoder<'_, D>,
838            offset: usize,
839            mut depth: fidl::encoding::Depth,
840        ) -> fidl::Result<()> {
841            encoder.debug_check_bounds::<FormatOptions>(offset);
842            // Vector header
843            let max_ordinal: u64 = self.max_ordinal_present();
844            encoder.write_num(max_ordinal, offset);
845            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
846            // Calling encoder.out_of_line_offset(0) is not allowed.
847            if max_ordinal == 0 {
848                return Ok(());
849            }
850            depth.increment()?;
851            let envelope_size = 8;
852            let bytes_len = max_ordinal as usize * envelope_size;
853            #[allow(unused_variables)]
854            let offset = encoder.out_of_line_offset(bytes_len);
855            let mut _prev_end_offset: usize = 0;
856            if 1 > max_ordinal {
857                return Ok(());
858            }
859
860            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
861            // are envelope_size bytes.
862            let cur_offset: usize = (1 - 1) * envelope_size;
863
864            // Zero reserved fields.
865            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
866
867            // Safety:
868            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
869            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
870            //   envelope_size bytes, there is always sufficient room.
871            fidl::encoding::encode_in_envelope_optional::<bool, D>(
872                self.verbose.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
873                encoder,
874                offset + cur_offset,
875                depth,
876            )?;
877
878            _prev_end_offset = cur_offset + envelope_size;
879            if 2 > max_ordinal {
880                return Ok(());
881            }
882
883            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
884            // are envelope_size bytes.
885            let cur_offset: usize = (2 - 1) * envelope_size;
886
887            // Zero reserved fields.
888            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
889
890            // Safety:
891            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
892            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
893            //   envelope_size bytes, there is always sufficient room.
894            fidl::encoding::encode_in_envelope_optional::<bool, D>(
895                self.deprecated_padded_blobfs_format
896                    .as_ref()
897                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
898                encoder,
899                offset + cur_offset,
900                depth,
901            )?;
902
903            _prev_end_offset = cur_offset + envelope_size;
904            if 3 > max_ordinal {
905                return Ok(());
906            }
907
908            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
909            // are envelope_size bytes.
910            let cur_offset: usize = (3 - 1) * envelope_size;
911
912            // Zero reserved fields.
913            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
914
915            // Safety:
916            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
917            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
918            //   envelope_size bytes, there is always sufficient room.
919            fidl::encoding::encode_in_envelope_optional::<u64, D>(
920                self.num_inodes.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
921                encoder,
922                offset + cur_offset,
923                depth,
924            )?;
925
926            _prev_end_offset = cur_offset + envelope_size;
927            if 4 > max_ordinal {
928                return Ok(());
929            }
930
931            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
932            // are envelope_size bytes.
933            let cur_offset: usize = (4 - 1) * envelope_size;
934
935            // Zero reserved fields.
936            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
937
938            // Safety:
939            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
940            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
941            //   envelope_size bytes, there is always sufficient room.
942            fidl::encoding::encode_in_envelope_optional::<u32, D>(
943                self.fvm_data_slices.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
944                encoder,
945                offset + cur_offset,
946                depth,
947            )?;
948
949            _prev_end_offset = cur_offset + envelope_size;
950            if 5 > max_ordinal {
951                return Ok(());
952            }
953
954            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
955            // are envelope_size bytes.
956            let cur_offset: usize = (5 - 1) * envelope_size;
957
958            // Zero reserved fields.
959            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
960
961            // Safety:
962            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
963            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
964            //   envelope_size bytes, there is always sufficient room.
965            fidl::encoding::encode_in_envelope_optional::<u16, D>(
966                self.sectors_per_cluster
967                    .as_ref()
968                    .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
969                encoder,
970                offset + cur_offset,
971                depth,
972            )?;
973
974            _prev_end_offset = cur_offset + envelope_size;
975
976            Ok(())
977        }
978    }
979
980    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FormatOptions {
981        #[inline(always)]
982        fn new_empty() -> Self {
983            Self::default()
984        }
985
986        unsafe fn decode(
987            &mut self,
988            decoder: &mut fidl::encoding::Decoder<'_, D>,
989            offset: usize,
990            mut depth: fidl::encoding::Depth,
991        ) -> fidl::Result<()> {
992            decoder.debug_check_bounds::<Self>(offset);
993            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
994                None => return Err(fidl::Error::NotNullable),
995                Some(len) => len,
996            };
997            // Calling decoder.out_of_line_offset(0) is not allowed.
998            if len == 0 {
999                return Ok(());
1000            };
1001            depth.increment()?;
1002            let envelope_size = 8;
1003            let bytes_len = len * envelope_size;
1004            let offset = decoder.out_of_line_offset(bytes_len)?;
1005            // Decode the envelope for each type.
1006            let mut _next_ordinal_to_read = 0;
1007            let mut next_offset = offset;
1008            let end_offset = offset + bytes_len;
1009            _next_ordinal_to_read += 1;
1010            if next_offset >= end_offset {
1011                return Ok(());
1012            }
1013
1014            // Decode unknown envelopes for gaps in ordinals.
1015            while _next_ordinal_to_read < 1 {
1016                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1017                _next_ordinal_to_read += 1;
1018                next_offset += envelope_size;
1019            }
1020
1021            let next_out_of_line = decoder.next_out_of_line();
1022            let handles_before = decoder.remaining_handles();
1023            if let Some((inlined, num_bytes, num_handles)) =
1024                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1025            {
1026                let member_inline_size =
1027                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1028                if inlined != (member_inline_size <= 4) {
1029                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1030                }
1031                let inner_offset;
1032                let mut inner_depth = depth.clone();
1033                if inlined {
1034                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1035                    inner_offset = next_offset;
1036                } else {
1037                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1038                    inner_depth.increment()?;
1039                }
1040                let val_ref = self.verbose.get_or_insert_with(|| fidl::new_empty!(bool, D));
1041                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1042                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1043                {
1044                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1045                }
1046                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1047                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1048                }
1049            }
1050
1051            next_offset += envelope_size;
1052            _next_ordinal_to_read += 1;
1053            if next_offset >= end_offset {
1054                return Ok(());
1055            }
1056
1057            // Decode unknown envelopes for gaps in ordinals.
1058            while _next_ordinal_to_read < 2 {
1059                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1060                _next_ordinal_to_read += 1;
1061                next_offset += envelope_size;
1062            }
1063
1064            let next_out_of_line = decoder.next_out_of_line();
1065            let handles_before = decoder.remaining_handles();
1066            if let Some((inlined, num_bytes, num_handles)) =
1067                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1068            {
1069                let member_inline_size =
1070                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1071                if inlined != (member_inline_size <= 4) {
1072                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1073                }
1074                let inner_offset;
1075                let mut inner_depth = depth.clone();
1076                if inlined {
1077                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1078                    inner_offset = next_offset;
1079                } else {
1080                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1081                    inner_depth.increment()?;
1082                }
1083                let val_ref = self
1084                    .deprecated_padded_blobfs_format
1085                    .get_or_insert_with(|| fidl::new_empty!(bool, D));
1086                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1087                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1088                {
1089                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1090                }
1091                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1092                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1093                }
1094            }
1095
1096            next_offset += envelope_size;
1097            _next_ordinal_to_read += 1;
1098            if next_offset >= end_offset {
1099                return Ok(());
1100            }
1101
1102            // Decode unknown envelopes for gaps in ordinals.
1103            while _next_ordinal_to_read < 3 {
1104                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1105                _next_ordinal_to_read += 1;
1106                next_offset += envelope_size;
1107            }
1108
1109            let next_out_of_line = decoder.next_out_of_line();
1110            let handles_before = decoder.remaining_handles();
1111            if let Some((inlined, num_bytes, num_handles)) =
1112                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1113            {
1114                let member_inline_size =
1115                    <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1116                if inlined != (member_inline_size <= 4) {
1117                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1118                }
1119                let inner_offset;
1120                let mut inner_depth = depth.clone();
1121                if inlined {
1122                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1123                    inner_offset = next_offset;
1124                } else {
1125                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1126                    inner_depth.increment()?;
1127                }
1128                let val_ref = self.num_inodes.get_or_insert_with(|| fidl::new_empty!(u64, D));
1129                fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
1130                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1131                {
1132                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1133                }
1134                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1135                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1136                }
1137            }
1138
1139            next_offset += envelope_size;
1140            _next_ordinal_to_read += 1;
1141            if next_offset >= end_offset {
1142                return Ok(());
1143            }
1144
1145            // Decode unknown envelopes for gaps in ordinals.
1146            while _next_ordinal_to_read < 4 {
1147                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1148                _next_ordinal_to_read += 1;
1149                next_offset += envelope_size;
1150            }
1151
1152            let next_out_of_line = decoder.next_out_of_line();
1153            let handles_before = decoder.remaining_handles();
1154            if let Some((inlined, num_bytes, num_handles)) =
1155                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1156            {
1157                let member_inline_size =
1158                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1159                if inlined != (member_inline_size <= 4) {
1160                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1161                }
1162                let inner_offset;
1163                let mut inner_depth = depth.clone();
1164                if inlined {
1165                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1166                    inner_offset = next_offset;
1167                } else {
1168                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1169                    inner_depth.increment()?;
1170                }
1171                let val_ref = self.fvm_data_slices.get_or_insert_with(|| fidl::new_empty!(u32, D));
1172                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
1173                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1174                {
1175                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1176                }
1177                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1178                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1179                }
1180            }
1181
1182            next_offset += envelope_size;
1183            _next_ordinal_to_read += 1;
1184            if next_offset >= end_offset {
1185                return Ok(());
1186            }
1187
1188            // Decode unknown envelopes for gaps in ordinals.
1189            while _next_ordinal_to_read < 5 {
1190                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1191                _next_ordinal_to_read += 1;
1192                next_offset += envelope_size;
1193            }
1194
1195            let next_out_of_line = decoder.next_out_of_line();
1196            let handles_before = decoder.remaining_handles();
1197            if let Some((inlined, num_bytes, num_handles)) =
1198                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1199            {
1200                let member_inline_size =
1201                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1202                if inlined != (member_inline_size <= 4) {
1203                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1204                }
1205                let inner_offset;
1206                let mut inner_depth = depth.clone();
1207                if inlined {
1208                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1209                    inner_offset = next_offset;
1210                } else {
1211                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1212                    inner_depth.increment()?;
1213                }
1214                let val_ref =
1215                    self.sectors_per_cluster.get_or_insert_with(|| fidl::new_empty!(u16, D));
1216                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
1217                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1218                {
1219                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1220                }
1221                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1222                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1223                }
1224            }
1225
1226            next_offset += envelope_size;
1227
1228            // Decode the remaining unknown envelopes.
1229            while next_offset < end_offset {
1230                _next_ordinal_to_read += 1;
1231                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1232                next_offset += envelope_size;
1233            }
1234
1235            Ok(())
1236        }
1237    }
1238
1239    impl StartOptions {
1240        #[inline(always)]
1241        fn max_ordinal_present(&self) -> u64 {
1242            if let Some(_) = self.merge_super_and_userdata {
1243                return 10;
1244            }
1245            if let Some(_) = self.barriers_enabled {
1246                return 9;
1247            }
1248            if let Some(_) = self.inline_crypto_enabled {
1249                return 8;
1250            }
1251            if let Some(_) = self.startup_profiling_seconds {
1252                return 7;
1253            }
1254            if let Some(_) = self.cache_eviction_policy_override {
1255                return 6;
1256            }
1257            if let Some(_) = self.write_compression_level {
1258                return 5;
1259            }
1260            if let Some(_) = self.write_compression_algorithm {
1261                return 4;
1262            }
1263            if let Some(_) = self.fsck_after_every_transaction {
1264                return 3;
1265            }
1266            if let Some(_) = self.verbose {
1267                return 2;
1268            }
1269            if let Some(_) = self.read_only {
1270                return 1;
1271            }
1272            0
1273        }
1274    }
1275
1276    impl fidl::encoding::ValueTypeMarker for StartOptions {
1277        type Borrowed<'a> = &'a Self;
1278        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1279            value
1280        }
1281    }
1282
1283    unsafe impl fidl::encoding::TypeMarker for StartOptions {
1284        type Owned = Self;
1285
1286        #[inline(always)]
1287        fn inline_align(_context: fidl::encoding::Context) -> usize {
1288            8
1289        }
1290
1291        #[inline(always)]
1292        fn inline_size(_context: fidl::encoding::Context) -> usize {
1293            16
1294        }
1295    }
1296
1297    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StartOptions, D>
1298        for &StartOptions
1299    {
1300        unsafe fn encode(
1301            self,
1302            encoder: &mut fidl::encoding::Encoder<'_, D>,
1303            offset: usize,
1304            mut depth: fidl::encoding::Depth,
1305        ) -> fidl::Result<()> {
1306            encoder.debug_check_bounds::<StartOptions>(offset);
1307            // Vector header
1308            let max_ordinal: u64 = self.max_ordinal_present();
1309            encoder.write_num(max_ordinal, offset);
1310            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
1311            // Calling encoder.out_of_line_offset(0) is not allowed.
1312            if max_ordinal == 0 {
1313                return Ok(());
1314            }
1315            depth.increment()?;
1316            let envelope_size = 8;
1317            let bytes_len = max_ordinal as usize * envelope_size;
1318            #[allow(unused_variables)]
1319            let offset = encoder.out_of_line_offset(bytes_len);
1320            let mut _prev_end_offset: usize = 0;
1321            if 1 > max_ordinal {
1322                return Ok(());
1323            }
1324
1325            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1326            // are envelope_size bytes.
1327            let cur_offset: usize = (1 - 1) * envelope_size;
1328
1329            // Zero reserved fields.
1330            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1331
1332            // Safety:
1333            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1334            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1335            //   envelope_size bytes, there is always sufficient room.
1336            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1337                self.read_only.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1338                encoder,
1339                offset + cur_offset,
1340                depth,
1341            )?;
1342
1343            _prev_end_offset = cur_offset + envelope_size;
1344            if 2 > max_ordinal {
1345                return Ok(());
1346            }
1347
1348            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1349            // are envelope_size bytes.
1350            let cur_offset: usize = (2 - 1) * envelope_size;
1351
1352            // Zero reserved fields.
1353            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1354
1355            // Safety:
1356            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1357            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1358            //   envelope_size bytes, there is always sufficient room.
1359            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1360                self.verbose.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1361                encoder,
1362                offset + cur_offset,
1363                depth,
1364            )?;
1365
1366            _prev_end_offset = cur_offset + envelope_size;
1367            if 3 > max_ordinal {
1368                return Ok(());
1369            }
1370
1371            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1372            // are envelope_size bytes.
1373            let cur_offset: usize = (3 - 1) * envelope_size;
1374
1375            // Zero reserved fields.
1376            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1377
1378            // Safety:
1379            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1380            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1381            //   envelope_size bytes, there is always sufficient room.
1382            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1383                self.fsck_after_every_transaction
1384                    .as_ref()
1385                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1386                encoder,
1387                offset + cur_offset,
1388                depth,
1389            )?;
1390
1391            _prev_end_offset = cur_offset + envelope_size;
1392            if 4 > max_ordinal {
1393                return Ok(());
1394            }
1395
1396            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1397            // are envelope_size bytes.
1398            let cur_offset: usize = (4 - 1) * envelope_size;
1399
1400            // Zero reserved fields.
1401            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1402
1403            // Safety:
1404            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1405            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1406            //   envelope_size bytes, there is always sufficient room.
1407            fidl::encoding::encode_in_envelope_optional::<CompressionAlgorithm, D>(
1408                self.write_compression_algorithm
1409                    .as_ref()
1410                    .map(<CompressionAlgorithm as fidl::encoding::ValueTypeMarker>::borrow),
1411                encoder,
1412                offset + cur_offset,
1413                depth,
1414            )?;
1415
1416            _prev_end_offset = cur_offset + envelope_size;
1417            if 5 > max_ordinal {
1418                return Ok(());
1419            }
1420
1421            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1422            // are envelope_size bytes.
1423            let cur_offset: usize = (5 - 1) * envelope_size;
1424
1425            // Zero reserved fields.
1426            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1427
1428            // Safety:
1429            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1430            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1431            //   envelope_size bytes, there is always sufficient room.
1432            fidl::encoding::encode_in_envelope_optional::<i32, D>(
1433                self.write_compression_level
1434                    .as_ref()
1435                    .map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
1436                encoder,
1437                offset + cur_offset,
1438                depth,
1439            )?;
1440
1441            _prev_end_offset = cur_offset + envelope_size;
1442            if 6 > max_ordinal {
1443                return Ok(());
1444            }
1445
1446            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1447            // are envelope_size bytes.
1448            let cur_offset: usize = (6 - 1) * envelope_size;
1449
1450            // Zero reserved fields.
1451            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1452
1453            // Safety:
1454            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1455            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1456            //   envelope_size bytes, there is always sufficient room.
1457            fidl::encoding::encode_in_envelope_optional::<EvictionPolicyOverride, D>(
1458                self.cache_eviction_policy_override
1459                    .as_ref()
1460                    .map(<EvictionPolicyOverride as fidl::encoding::ValueTypeMarker>::borrow),
1461                encoder,
1462                offset + cur_offset,
1463                depth,
1464            )?;
1465
1466            _prev_end_offset = cur_offset + envelope_size;
1467            if 7 > max_ordinal {
1468                return Ok(());
1469            }
1470
1471            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1472            // are envelope_size bytes.
1473            let cur_offset: usize = (7 - 1) * envelope_size;
1474
1475            // Zero reserved fields.
1476            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1477
1478            // Safety:
1479            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1480            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1481            //   envelope_size bytes, there is always sufficient room.
1482            fidl::encoding::encode_in_envelope_optional::<u32, D>(
1483                self.startup_profiling_seconds
1484                    .as_ref()
1485                    .map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
1486                encoder,
1487                offset + cur_offset,
1488                depth,
1489            )?;
1490
1491            _prev_end_offset = cur_offset + envelope_size;
1492            if 8 > max_ordinal {
1493                return Ok(());
1494            }
1495
1496            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1497            // are envelope_size bytes.
1498            let cur_offset: usize = (8 - 1) * envelope_size;
1499
1500            // Zero reserved fields.
1501            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1502
1503            // Safety:
1504            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1505            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1506            //   envelope_size bytes, there is always sufficient room.
1507            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1508                self.inline_crypto_enabled
1509                    .as_ref()
1510                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1511                encoder,
1512                offset + cur_offset,
1513                depth,
1514            )?;
1515
1516            _prev_end_offset = cur_offset + envelope_size;
1517            if 9 > max_ordinal {
1518                return Ok(());
1519            }
1520
1521            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1522            // are envelope_size bytes.
1523            let cur_offset: usize = (9 - 1) * envelope_size;
1524
1525            // Zero reserved fields.
1526            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1527
1528            // Safety:
1529            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1530            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1531            //   envelope_size bytes, there is always sufficient room.
1532            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1533                self.barriers_enabled
1534                    .as_ref()
1535                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1536                encoder,
1537                offset + cur_offset,
1538                depth,
1539            )?;
1540
1541            _prev_end_offset = cur_offset + envelope_size;
1542            if 10 > max_ordinal {
1543                return Ok(());
1544            }
1545
1546            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
1547            // are envelope_size bytes.
1548            let cur_offset: usize = (10 - 1) * envelope_size;
1549
1550            // Zero reserved fields.
1551            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
1552
1553            // Safety:
1554            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
1555            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
1556            //   envelope_size bytes, there is always sufficient room.
1557            fidl::encoding::encode_in_envelope_optional::<bool, D>(
1558                self.merge_super_and_userdata
1559                    .as_ref()
1560                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
1561                encoder,
1562                offset + cur_offset,
1563                depth,
1564            )?;
1565
1566            _prev_end_offset = cur_offset + envelope_size;
1567
1568            Ok(())
1569        }
1570    }
1571
1572    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartOptions {
1573        #[inline(always)]
1574        fn new_empty() -> Self {
1575            Self::default()
1576        }
1577
1578        unsafe fn decode(
1579            &mut self,
1580            decoder: &mut fidl::encoding::Decoder<'_, D>,
1581            offset: usize,
1582            mut depth: fidl::encoding::Depth,
1583        ) -> fidl::Result<()> {
1584            decoder.debug_check_bounds::<Self>(offset);
1585            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
1586                None => return Err(fidl::Error::NotNullable),
1587                Some(len) => len,
1588            };
1589            // Calling decoder.out_of_line_offset(0) is not allowed.
1590            if len == 0 {
1591                return Ok(());
1592            };
1593            depth.increment()?;
1594            let envelope_size = 8;
1595            let bytes_len = len * envelope_size;
1596            let offset = decoder.out_of_line_offset(bytes_len)?;
1597            // Decode the envelope for each type.
1598            let mut _next_ordinal_to_read = 0;
1599            let mut next_offset = offset;
1600            let end_offset = offset + bytes_len;
1601            _next_ordinal_to_read += 1;
1602            if next_offset >= end_offset {
1603                return Ok(());
1604            }
1605
1606            // Decode unknown envelopes for gaps in ordinals.
1607            while _next_ordinal_to_read < 1 {
1608                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1609                _next_ordinal_to_read += 1;
1610                next_offset += envelope_size;
1611            }
1612
1613            let next_out_of_line = decoder.next_out_of_line();
1614            let handles_before = decoder.remaining_handles();
1615            if let Some((inlined, num_bytes, num_handles)) =
1616                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1617            {
1618                let member_inline_size =
1619                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1620                if inlined != (member_inline_size <= 4) {
1621                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1622                }
1623                let inner_offset;
1624                let mut inner_depth = depth.clone();
1625                if inlined {
1626                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1627                    inner_offset = next_offset;
1628                } else {
1629                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1630                    inner_depth.increment()?;
1631                }
1632                let val_ref = self.read_only.get_or_insert_with(|| fidl::new_empty!(bool, D));
1633                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1634                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1635                {
1636                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1637                }
1638                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1639                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1640                }
1641            }
1642
1643            next_offset += envelope_size;
1644            _next_ordinal_to_read += 1;
1645            if next_offset >= end_offset {
1646                return Ok(());
1647            }
1648
1649            // Decode unknown envelopes for gaps in ordinals.
1650            while _next_ordinal_to_read < 2 {
1651                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1652                _next_ordinal_to_read += 1;
1653                next_offset += envelope_size;
1654            }
1655
1656            let next_out_of_line = decoder.next_out_of_line();
1657            let handles_before = decoder.remaining_handles();
1658            if let Some((inlined, num_bytes, num_handles)) =
1659                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1660            {
1661                let member_inline_size =
1662                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1663                if inlined != (member_inline_size <= 4) {
1664                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1665                }
1666                let inner_offset;
1667                let mut inner_depth = depth.clone();
1668                if inlined {
1669                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1670                    inner_offset = next_offset;
1671                } else {
1672                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1673                    inner_depth.increment()?;
1674                }
1675                let val_ref = self.verbose.get_or_insert_with(|| fidl::new_empty!(bool, D));
1676                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1677                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1678                {
1679                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1680                }
1681                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1682                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1683                }
1684            }
1685
1686            next_offset += envelope_size;
1687            _next_ordinal_to_read += 1;
1688            if next_offset >= end_offset {
1689                return Ok(());
1690            }
1691
1692            // Decode unknown envelopes for gaps in ordinals.
1693            while _next_ordinal_to_read < 3 {
1694                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1695                _next_ordinal_to_read += 1;
1696                next_offset += envelope_size;
1697            }
1698
1699            let next_out_of_line = decoder.next_out_of_line();
1700            let handles_before = decoder.remaining_handles();
1701            if let Some((inlined, num_bytes, num_handles)) =
1702                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1703            {
1704                let member_inline_size =
1705                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1706                if inlined != (member_inline_size <= 4) {
1707                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1708                }
1709                let inner_offset;
1710                let mut inner_depth = depth.clone();
1711                if inlined {
1712                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1713                    inner_offset = next_offset;
1714                } else {
1715                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1716                    inner_depth.increment()?;
1717                }
1718                let val_ref = self
1719                    .fsck_after_every_transaction
1720                    .get_or_insert_with(|| fidl::new_empty!(bool, D));
1721                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1722                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1723                {
1724                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1725                }
1726                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1727                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1728                }
1729            }
1730
1731            next_offset += envelope_size;
1732            _next_ordinal_to_read += 1;
1733            if next_offset >= end_offset {
1734                return Ok(());
1735            }
1736
1737            // Decode unknown envelopes for gaps in ordinals.
1738            while _next_ordinal_to_read < 4 {
1739                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1740                _next_ordinal_to_read += 1;
1741                next_offset += envelope_size;
1742            }
1743
1744            let next_out_of_line = decoder.next_out_of_line();
1745            let handles_before = decoder.remaining_handles();
1746            if let Some((inlined, num_bytes, num_handles)) =
1747                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1748            {
1749                let member_inline_size =
1750                    <CompressionAlgorithm as fidl::encoding::TypeMarker>::inline_size(
1751                        decoder.context,
1752                    );
1753                if inlined != (member_inline_size <= 4) {
1754                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1755                }
1756                let inner_offset;
1757                let mut inner_depth = depth.clone();
1758                if inlined {
1759                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1760                    inner_offset = next_offset;
1761                } else {
1762                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1763                    inner_depth.increment()?;
1764                }
1765                let val_ref = self
1766                    .write_compression_algorithm
1767                    .get_or_insert_with(|| fidl::new_empty!(CompressionAlgorithm, D));
1768                fidl::decode!(
1769                    CompressionAlgorithm,
1770                    D,
1771                    val_ref,
1772                    decoder,
1773                    inner_offset,
1774                    inner_depth
1775                )?;
1776                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1777                {
1778                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1779                }
1780                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1781                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1782                }
1783            }
1784
1785            next_offset += envelope_size;
1786            _next_ordinal_to_read += 1;
1787            if next_offset >= end_offset {
1788                return Ok(());
1789            }
1790
1791            // Decode unknown envelopes for gaps in ordinals.
1792            while _next_ordinal_to_read < 5 {
1793                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1794                _next_ordinal_to_read += 1;
1795                next_offset += envelope_size;
1796            }
1797
1798            let next_out_of_line = decoder.next_out_of_line();
1799            let handles_before = decoder.remaining_handles();
1800            if let Some((inlined, num_bytes, num_handles)) =
1801                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1802            {
1803                let member_inline_size =
1804                    <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1805                if inlined != (member_inline_size <= 4) {
1806                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1807                }
1808                let inner_offset;
1809                let mut inner_depth = depth.clone();
1810                if inlined {
1811                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1812                    inner_offset = next_offset;
1813                } else {
1814                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1815                    inner_depth.increment()?;
1816                }
1817                let val_ref =
1818                    self.write_compression_level.get_or_insert_with(|| fidl::new_empty!(i32, D));
1819                fidl::decode!(i32, D, val_ref, decoder, inner_offset, inner_depth)?;
1820                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1821                {
1822                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1823                }
1824                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1825                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1826                }
1827            }
1828
1829            next_offset += envelope_size;
1830            _next_ordinal_to_read += 1;
1831            if next_offset >= end_offset {
1832                return Ok(());
1833            }
1834
1835            // Decode unknown envelopes for gaps in ordinals.
1836            while _next_ordinal_to_read < 6 {
1837                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1838                _next_ordinal_to_read += 1;
1839                next_offset += envelope_size;
1840            }
1841
1842            let next_out_of_line = decoder.next_out_of_line();
1843            let handles_before = decoder.remaining_handles();
1844            if let Some((inlined, num_bytes, num_handles)) =
1845                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1846            {
1847                let member_inline_size =
1848                    <EvictionPolicyOverride as fidl::encoding::TypeMarker>::inline_size(
1849                        decoder.context,
1850                    );
1851                if inlined != (member_inline_size <= 4) {
1852                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1853                }
1854                let inner_offset;
1855                let mut inner_depth = depth.clone();
1856                if inlined {
1857                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1858                    inner_offset = next_offset;
1859                } else {
1860                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1861                    inner_depth.increment()?;
1862                }
1863                let val_ref = self
1864                    .cache_eviction_policy_override
1865                    .get_or_insert_with(|| fidl::new_empty!(EvictionPolicyOverride, D));
1866                fidl::decode!(
1867                    EvictionPolicyOverride,
1868                    D,
1869                    val_ref,
1870                    decoder,
1871                    inner_offset,
1872                    inner_depth
1873                )?;
1874                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1875                {
1876                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1877                }
1878                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1879                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1880                }
1881            }
1882
1883            next_offset += envelope_size;
1884            _next_ordinal_to_read += 1;
1885            if next_offset >= end_offset {
1886                return Ok(());
1887            }
1888
1889            // Decode unknown envelopes for gaps in ordinals.
1890            while _next_ordinal_to_read < 7 {
1891                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1892                _next_ordinal_to_read += 1;
1893                next_offset += envelope_size;
1894            }
1895
1896            let next_out_of_line = decoder.next_out_of_line();
1897            let handles_before = decoder.remaining_handles();
1898            if let Some((inlined, num_bytes, num_handles)) =
1899                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1900            {
1901                let member_inline_size =
1902                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1903                if inlined != (member_inline_size <= 4) {
1904                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1905                }
1906                let inner_offset;
1907                let mut inner_depth = depth.clone();
1908                if inlined {
1909                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1910                    inner_offset = next_offset;
1911                } else {
1912                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1913                    inner_depth.increment()?;
1914                }
1915                let val_ref =
1916                    self.startup_profiling_seconds.get_or_insert_with(|| fidl::new_empty!(u32, D));
1917                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
1918                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1919                {
1920                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1921                }
1922                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1923                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1924                }
1925            }
1926
1927            next_offset += envelope_size;
1928            _next_ordinal_to_read += 1;
1929            if next_offset >= end_offset {
1930                return Ok(());
1931            }
1932
1933            // Decode unknown envelopes for gaps in ordinals.
1934            while _next_ordinal_to_read < 8 {
1935                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1936                _next_ordinal_to_read += 1;
1937                next_offset += envelope_size;
1938            }
1939
1940            let next_out_of_line = decoder.next_out_of_line();
1941            let handles_before = decoder.remaining_handles();
1942            if let Some((inlined, num_bytes, num_handles)) =
1943                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1944            {
1945                let member_inline_size =
1946                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1947                if inlined != (member_inline_size <= 4) {
1948                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1949                }
1950                let inner_offset;
1951                let mut inner_depth = depth.clone();
1952                if inlined {
1953                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1954                    inner_offset = next_offset;
1955                } else {
1956                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
1957                    inner_depth.increment()?;
1958                }
1959                let val_ref =
1960                    self.inline_crypto_enabled.get_or_insert_with(|| fidl::new_empty!(bool, D));
1961                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
1962                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
1963                {
1964                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
1965                }
1966                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
1967                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
1968                }
1969            }
1970
1971            next_offset += envelope_size;
1972            _next_ordinal_to_read += 1;
1973            if next_offset >= end_offset {
1974                return Ok(());
1975            }
1976
1977            // Decode unknown envelopes for gaps in ordinals.
1978            while _next_ordinal_to_read < 9 {
1979                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
1980                _next_ordinal_to_read += 1;
1981                next_offset += envelope_size;
1982            }
1983
1984            let next_out_of_line = decoder.next_out_of_line();
1985            let handles_before = decoder.remaining_handles();
1986            if let Some((inlined, num_bytes, num_handles)) =
1987                fidl::encoding::decode_envelope_header(decoder, next_offset)?
1988            {
1989                let member_inline_size =
1990                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
1991                if inlined != (member_inline_size <= 4) {
1992                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
1993                }
1994                let inner_offset;
1995                let mut inner_depth = depth.clone();
1996                if inlined {
1997                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
1998                    inner_offset = next_offset;
1999                } else {
2000                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2001                    inner_depth.increment()?;
2002                }
2003                let val_ref =
2004                    self.barriers_enabled.get_or_insert_with(|| fidl::new_empty!(bool, D));
2005                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2006                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2007                {
2008                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2009                }
2010                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2011                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2012                }
2013            }
2014
2015            next_offset += envelope_size;
2016            _next_ordinal_to_read += 1;
2017            if next_offset >= end_offset {
2018                return Ok(());
2019            }
2020
2021            // Decode unknown envelopes for gaps in ordinals.
2022            while _next_ordinal_to_read < 10 {
2023                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2024                _next_ordinal_to_read += 1;
2025                next_offset += envelope_size;
2026            }
2027
2028            let next_out_of_line = decoder.next_out_of_line();
2029            let handles_before = decoder.remaining_handles();
2030            if let Some((inlined, num_bytes, num_handles)) =
2031                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2032            {
2033                let member_inline_size =
2034                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2035                if inlined != (member_inline_size <= 4) {
2036                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2037                }
2038                let inner_offset;
2039                let mut inner_depth = depth.clone();
2040                if inlined {
2041                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2042                    inner_offset = next_offset;
2043                } else {
2044                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2045                    inner_depth.increment()?;
2046                }
2047                let val_ref =
2048                    self.merge_super_and_userdata.get_or_insert_with(|| fidl::new_empty!(bool, D));
2049                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2050                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2051                {
2052                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2053                }
2054                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2055                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2056                }
2057            }
2058
2059            next_offset += envelope_size;
2060
2061            // Decode the remaining unknown envelopes.
2062            while next_offset < end_offset {
2063                _next_ordinal_to_read += 1;
2064                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2065                next_offset += envelope_size;
2066            }
2067
2068            Ok(())
2069        }
2070    }
2071}