fidl_fuchsia_storage_ext4__common/
fidl_fuchsia_storage_ext4__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#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
12#[repr(u32)]
13pub enum OutOfBoundsDirection {
14    Below = 1,
15    Above = 2,
16}
17
18impl OutOfBoundsDirection {
19    #[inline]
20    pub fn from_primitive(prim: u32) -> Option<Self> {
21        match prim {
22            1 => Some(Self::Below),
23            2 => Some(Self::Above),
24            _ => None,
25        }
26    }
27
28    #[inline]
29    pub const fn into_primitive(self) -> u32 {
30        self as u32
31    }
32}
33
34#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
35pub struct BadDirectory {
36    /// Path of directory.
37    pub path: String,
38}
39
40impl fidl::Persistable for BadDirectory {}
41
42/// Directory entry has bad type value.
43#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44#[repr(C)]
45pub struct BadEntryType {
46    /// Type value.
47    pub value: u8,
48}
49
50impl fidl::Persistable for BadEntryType {}
51
52#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct BadFile {
54    /// Path of file.
55    pub path: String,
56}
57
58impl fidl::Persistable for BadFile {}
59
60/// Feature Incompatible flag has banned flags.
61#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
62#[repr(C)]
63pub struct BannedFeatureIncompat {
64    /// Bitwise flags that are banned.
65    pub value: u32,
66}
67
68impl fidl::Persistable for BannedFeatureIncompat {}
69
70#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71#[repr(C)]
72pub struct BlockNumberOutOfBounds {
73    /// Block number.
74    pub block_number: u64,
75}
76
77impl fidl::Persistable for BlockNumberOutOfBounds {}
78
79#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
80#[repr(C)]
81pub struct BlockSizeInvalid {
82    /// Block size.
83    pub block_size: u32,
84}
85
86impl fidl::Persistable for BlockSizeInvalid {}
87
88#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
89pub struct DirEntry2NonUtf8 {
90    /// Data that was unable to be converted into UTF-8.
91    /// Limiting to 255 to match with the max filename length.
92    pub data: Vec<u8>,
93}
94
95impl fidl::Persistable for DirEntry2NonUtf8 {}
96
97#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
98#[repr(C)]
99pub struct ExtentUnexpectedLength {
100    /// Size received.
101    pub size: u64,
102    /// Size expected.
103    pub expected: u64,
104}
105
106impl fidl::Persistable for ExtentUnexpectedLength {}
107
108#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
109pub struct Incompatible {
110    /// Message stating what is wrong.
111    pub msg: String,
112}
113
114impl fidl::Persistable for Incompatible {}
115
116#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
117pub struct InvalidAddress {
118    /// Byte position in filesystem image.
119    pub position: u64,
120    /// Direction of out of bounds.
121    pub direction: OutOfBoundsDirection,
122    /// Boundary that was exceeded.
123    pub bound: u64,
124}
125
126impl fidl::Persistable for InvalidAddress {}
127
128#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
129#[repr(C)]
130pub struct InvalidBlockGroupDesc {
131    /// Byte position in filesystem image.
132    pub position: u64,
133}
134
135impl fidl::Persistable for InvalidBlockGroupDesc {}
136
137#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
138#[repr(C)]
139pub struct InvalidDirEntry2 {
140    /// Byte position in filesystem image.
141    pub position: u64,
142}
143
144impl fidl::Persistable for InvalidDirEntry2 {}
145
146#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
147#[repr(C)]
148pub struct InvalidExtent {
149    /// Byte position in filesystem image.
150    pub position: u64,
151}
152
153impl fidl::Persistable for InvalidExtent {}
154
155#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
156pub struct InvalidExtentHeader;
157
158impl fidl::Persistable for InvalidExtentHeader {}
159
160#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
161#[repr(C)]
162pub struct InvalidExtentHeaderMagic {
163    /// Magic number.
164    pub value: u16,
165}
166
167impl fidl::Persistable for InvalidExtentHeaderMagic {}
168
169#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
170#[repr(C)]
171pub struct InvalidINode {
172    /// INode number.
173    pub inode_number: u32,
174}
175
176impl fidl::Persistable for InvalidINode {}
177
178#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
179pub struct InvalidInputPath {
180    /// Not implemented. Will be empty string.
181    pub path: String,
182}
183
184impl fidl::Persistable for InvalidInputPath {}
185
186#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187#[repr(C)]
188pub struct InvalidSuperBlock {
189    /// Byte position in filesystem image.
190    pub position: u64,
191}
192
193impl fidl::Persistable for InvalidSuperBlock {}
194
195#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
196#[repr(C)]
197pub struct InvalidSuperBlockMagic {
198    /// Magic number.
199    pub value: u16,
200}
201
202impl fidl::Persistable for InvalidSuperBlockMagic {}
203
204#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
205pub struct PathNotFound {
206    /// Path given.
207    pub path: String,
208}
209
210impl fidl::Persistable for PathNotFound {}
211
212/// Use `InvalidAddress` instead.
213#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
214#[repr(C)]
215pub struct ReaderOutOfBounds {
216    /// Byte position in filesystem image.
217    pub position: u64,
218    /// Size of image.
219    pub size: u64,
220}
221
222impl fidl::Persistable for ReaderOutOfBounds {}
223
224#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
225#[repr(C)]
226pub struct ReaderReadError {
227    /// Byte position in filesystem image.
228    pub position: u64,
229}
230
231impl fidl::Persistable for ReaderReadError {}
232
233/// Feature Incompatible flag has missing flags.
234#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
235#[repr(C)]
236pub struct RequiredFeatureIncompat {
237    /// Bitwise flags that are missing.
238    pub value: u32,
239}
240
241impl fidl::Persistable for RequiredFeatureIncompat {}
242
243#[derive(Clone, Debug, PartialEq)]
244pub struct ServerMountVmoResponse {
245    pub result: MountVmoResult,
246}
247
248impl fidl::Persistable for ServerMountVmoResponse {}
249
250#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
251pub struct Success;
252
253impl fidl::Persistable for Success {}
254
255/// Result of an [`Ext4Server.MountVmo`] call.
256#[derive(Clone, Debug)]
257pub enum MountVmoResult {
258    /// The server has managed to read the image far enough to load the
259    /// root directory and none of the early validation checks have failed.
260    Success(Success),
261    /// Error reading the VMO.
262    VmoReadFailure(i32),
263    ParseError(ParseError),
264    #[doc(hidden)]
265    __SourceBreaking {
266        unknown_ordinal: u64,
267    },
268}
269
270/// Pattern that matches an unknown `MountVmoResult` member.
271#[macro_export]
272macro_rules! MountVmoResultUnknown {
273    () => {
274        _
275    };
276}
277
278// Custom PartialEq so that unknown variants are not equal to themselves.
279impl PartialEq for MountVmoResult {
280    fn eq(&self, other: &Self) -> bool {
281        match (self, other) {
282            (Self::Success(x), Self::Success(y)) => *x == *y,
283            (Self::VmoReadFailure(x), Self::VmoReadFailure(y)) => *x == *y,
284            (Self::ParseError(x), Self::ParseError(y)) => *x == *y,
285            _ => false,
286        }
287    }
288}
289
290impl MountVmoResult {
291    #[inline]
292    pub fn ordinal(&self) -> u64 {
293        match *self {
294            Self::Success(_) => 1,
295            Self::VmoReadFailure(_) => 2,
296            Self::ParseError(_) => 3,
297            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
298        }
299    }
300
301    #[inline]
302    pub fn unknown_variant_for_testing() -> Self {
303        Self::__SourceBreaking { unknown_ordinal: 0 }
304    }
305
306    #[inline]
307    pub fn is_unknown(&self) -> bool {
308        match self {
309            Self::__SourceBreaking { .. } => true,
310            _ => false,
311        }
312    }
313}
314
315impl fidl::Persistable for MountVmoResult {}
316
317/// Sub-result of an [`Ext4Server.MountVmo`] call denoting the actual error
318/// that occurred in the reader.
319#[derive(Clone, Debug)]
320pub enum ParseError {
321    InvalidSuperBlock(InvalidSuperBlock),
322    InvalidSuperBlockMagic(InvalidSuperBlockMagic),
323    BlockNumberOutOfBounds(BlockNumberOutOfBounds),
324    BlockSizeInvalid(BlockSizeInvalid),
325    InvalidBlockGroupDesc(InvalidBlockGroupDesc),
326    InvalidInode(InvalidINode),
327    InvalidExtentHeader(InvalidExtentHeader),
328    InvalidExtentHeaderMagic(InvalidExtentHeaderMagic),
329    InvalidExtent(InvalidExtent),
330    ExtentUnexpectedLength(ExtentUnexpectedLength),
331    InvalidDirEntry2(InvalidDirEntry2),
332    DirEntry2NonUtf8(DirEntry2NonUtf8),
333    InvalidInputPath(InvalidInputPath),
334    PathNotFound(PathNotFound),
335    BadEntryType(BadEntryType),
336    Incompatible(Incompatible),
337    BadFile(BadFile),
338    BadDirectory(BadDirectory),
339    ReaderReadError(ReaderReadError),
340    ReaderOutOfBounds(ReaderOutOfBounds),
341    RequiredFeatureIncompat(RequiredFeatureIncompat),
342    BannedFeatureIncompat(BannedFeatureIncompat),
343    InvalidAddress(InvalidAddress),
344    #[doc(hidden)]
345    __SourceBreaking {
346        unknown_ordinal: u64,
347    },
348}
349
350/// Pattern that matches an unknown `ParseError` member.
351#[macro_export]
352macro_rules! ParseErrorUnknown {
353    () => {
354        _
355    };
356}
357
358// Custom PartialEq so that unknown variants are not equal to themselves.
359impl PartialEq for ParseError {
360    fn eq(&self, other: &Self) -> bool {
361        match (self, other) {
362            (Self::InvalidSuperBlock(x), Self::InvalidSuperBlock(y)) => *x == *y,
363            (Self::InvalidSuperBlockMagic(x), Self::InvalidSuperBlockMagic(y)) => *x == *y,
364            (Self::BlockNumberOutOfBounds(x), Self::BlockNumberOutOfBounds(y)) => *x == *y,
365            (Self::BlockSizeInvalid(x), Self::BlockSizeInvalid(y)) => *x == *y,
366            (Self::InvalidBlockGroupDesc(x), Self::InvalidBlockGroupDesc(y)) => *x == *y,
367            (Self::InvalidInode(x), Self::InvalidInode(y)) => *x == *y,
368            (Self::InvalidExtentHeader(x), Self::InvalidExtentHeader(y)) => *x == *y,
369            (Self::InvalidExtentHeaderMagic(x), Self::InvalidExtentHeaderMagic(y)) => *x == *y,
370            (Self::InvalidExtent(x), Self::InvalidExtent(y)) => *x == *y,
371            (Self::ExtentUnexpectedLength(x), Self::ExtentUnexpectedLength(y)) => *x == *y,
372            (Self::InvalidDirEntry2(x), Self::InvalidDirEntry2(y)) => *x == *y,
373            (Self::DirEntry2NonUtf8(x), Self::DirEntry2NonUtf8(y)) => *x == *y,
374            (Self::InvalidInputPath(x), Self::InvalidInputPath(y)) => *x == *y,
375            (Self::PathNotFound(x), Self::PathNotFound(y)) => *x == *y,
376            (Self::BadEntryType(x), Self::BadEntryType(y)) => *x == *y,
377            (Self::Incompatible(x), Self::Incompatible(y)) => *x == *y,
378            (Self::BadFile(x), Self::BadFile(y)) => *x == *y,
379            (Self::BadDirectory(x), Self::BadDirectory(y)) => *x == *y,
380            (Self::ReaderReadError(x), Self::ReaderReadError(y)) => *x == *y,
381            (Self::ReaderOutOfBounds(x), Self::ReaderOutOfBounds(y)) => *x == *y,
382            (Self::RequiredFeatureIncompat(x), Self::RequiredFeatureIncompat(y)) => *x == *y,
383            (Self::BannedFeatureIncompat(x), Self::BannedFeatureIncompat(y)) => *x == *y,
384            (Self::InvalidAddress(x), Self::InvalidAddress(y)) => *x == *y,
385            _ => false,
386        }
387    }
388}
389
390impl ParseError {
391    #[inline]
392    pub fn ordinal(&self) -> u64 {
393        match *self {
394            Self::InvalidSuperBlock(_) => 1,
395            Self::InvalidSuperBlockMagic(_) => 2,
396            Self::BlockNumberOutOfBounds(_) => 3,
397            Self::BlockSizeInvalid(_) => 4,
398            Self::InvalidBlockGroupDesc(_) => 5,
399            Self::InvalidInode(_) => 6,
400            Self::InvalidExtentHeader(_) => 7,
401            Self::InvalidExtentHeaderMagic(_) => 8,
402            Self::InvalidExtent(_) => 9,
403            Self::ExtentUnexpectedLength(_) => 10,
404            Self::InvalidDirEntry2(_) => 11,
405            Self::DirEntry2NonUtf8(_) => 12,
406            Self::InvalidInputPath(_) => 13,
407            Self::PathNotFound(_) => 14,
408            Self::BadEntryType(_) => 15,
409            Self::Incompatible(_) => 16,
410            Self::BadFile(_) => 17,
411            Self::BadDirectory(_) => 18,
412            Self::ReaderReadError(_) => 19,
413            Self::ReaderOutOfBounds(_) => 20,
414            Self::RequiredFeatureIncompat(_) => 21,
415            Self::BannedFeatureIncompat(_) => 22,
416            Self::InvalidAddress(_) => 23,
417            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
418        }
419    }
420
421    #[inline]
422    pub fn unknown_variant_for_testing() -> Self {
423        Self::__SourceBreaking { unknown_ordinal: 0 }
424    }
425
426    #[inline]
427    pub fn is_unknown(&self) -> bool {
428        match self {
429            Self::__SourceBreaking { .. } => true,
430            _ => false,
431        }
432    }
433}
434
435impl fidl::Persistable for ParseError {}
436
437mod internal {
438    use super::*;
439    unsafe impl fidl::encoding::TypeMarker for OutOfBoundsDirection {
440        type Owned = Self;
441
442        #[inline(always)]
443        fn inline_align(_context: fidl::encoding::Context) -> usize {
444            std::mem::align_of::<u32>()
445        }
446
447        #[inline(always)]
448        fn inline_size(_context: fidl::encoding::Context) -> usize {
449            std::mem::size_of::<u32>()
450        }
451
452        #[inline(always)]
453        fn encode_is_copy() -> bool {
454            true
455        }
456
457        #[inline(always)]
458        fn decode_is_copy() -> bool {
459            false
460        }
461    }
462
463    impl fidl::encoding::ValueTypeMarker for OutOfBoundsDirection {
464        type Borrowed<'a> = Self;
465        #[inline(always)]
466        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
467            *value
468        }
469    }
470
471    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
472        for OutOfBoundsDirection
473    {
474        #[inline]
475        unsafe fn encode(
476            self,
477            encoder: &mut fidl::encoding::Encoder<'_, D>,
478            offset: usize,
479            _depth: fidl::encoding::Depth,
480        ) -> fidl::Result<()> {
481            encoder.debug_check_bounds::<Self>(offset);
482            encoder.write_num(self.into_primitive(), offset);
483            Ok(())
484        }
485    }
486
487    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OutOfBoundsDirection {
488        #[inline(always)]
489        fn new_empty() -> Self {
490            Self::Below
491        }
492
493        #[inline]
494        unsafe fn decode(
495            &mut self,
496            decoder: &mut fidl::encoding::Decoder<'_, D>,
497            offset: usize,
498            _depth: fidl::encoding::Depth,
499        ) -> fidl::Result<()> {
500            decoder.debug_check_bounds::<Self>(offset);
501            let prim = decoder.read_num::<u32>(offset);
502
503            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
504            Ok(())
505        }
506    }
507
508    impl fidl::encoding::ValueTypeMarker for BadDirectory {
509        type Borrowed<'a> = &'a Self;
510        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
511            value
512        }
513    }
514
515    unsafe impl fidl::encoding::TypeMarker for BadDirectory {
516        type Owned = Self;
517
518        #[inline(always)]
519        fn inline_align(_context: fidl::encoding::Context) -> usize {
520            8
521        }
522
523        #[inline(always)]
524        fn inline_size(_context: fidl::encoding::Context) -> usize {
525            16
526        }
527    }
528
529    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadDirectory, D>
530        for &BadDirectory
531    {
532        #[inline]
533        unsafe fn encode(
534            self,
535            encoder: &mut fidl::encoding::Encoder<'_, D>,
536            offset: usize,
537            _depth: fidl::encoding::Depth,
538        ) -> fidl::Result<()> {
539            encoder.debug_check_bounds::<BadDirectory>(offset);
540            // Delegate to tuple encoding.
541            fidl::encoding::Encode::<BadDirectory, D>::encode(
542                (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
543                    &self.path,
544                ),),
545                encoder,
546                offset,
547                _depth,
548            )
549        }
550    }
551    unsafe impl<
552            D: fidl::encoding::ResourceDialect,
553            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
554        > fidl::encoding::Encode<BadDirectory, D> for (T0,)
555    {
556        #[inline]
557        unsafe fn encode(
558            self,
559            encoder: &mut fidl::encoding::Encoder<'_, D>,
560            offset: usize,
561            depth: fidl::encoding::Depth,
562        ) -> fidl::Result<()> {
563            encoder.debug_check_bounds::<BadDirectory>(offset);
564            // Zero out padding regions. There's no need to apply masks
565            // because the unmasked parts will be overwritten by fields.
566            // Write the fields.
567            self.0.encode(encoder, offset + 0, depth)?;
568            Ok(())
569        }
570    }
571
572    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadDirectory {
573        #[inline(always)]
574        fn new_empty() -> Self {
575            Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
576        }
577
578        #[inline]
579        unsafe fn decode(
580            &mut self,
581            decoder: &mut fidl::encoding::Decoder<'_, D>,
582            offset: usize,
583            _depth: fidl::encoding::Depth,
584        ) -> fidl::Result<()> {
585            decoder.debug_check_bounds::<Self>(offset);
586            // Verify that padding bytes are zero.
587            fidl::decode!(
588                fidl::encoding::BoundedString<1024>,
589                D,
590                &mut self.path,
591                decoder,
592                offset + 0,
593                _depth
594            )?;
595            Ok(())
596        }
597    }
598
599    impl fidl::encoding::ValueTypeMarker for BadEntryType {
600        type Borrowed<'a> = &'a Self;
601        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
602            value
603        }
604    }
605
606    unsafe impl fidl::encoding::TypeMarker for BadEntryType {
607        type Owned = Self;
608
609        #[inline(always)]
610        fn inline_align(_context: fidl::encoding::Context) -> usize {
611            1
612        }
613
614        #[inline(always)]
615        fn inline_size(_context: fidl::encoding::Context) -> usize {
616            1
617        }
618        #[inline(always)]
619        fn encode_is_copy() -> bool {
620            true
621        }
622
623        #[inline(always)]
624        fn decode_is_copy() -> bool {
625            true
626        }
627    }
628
629    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadEntryType, D>
630        for &BadEntryType
631    {
632        #[inline]
633        unsafe fn encode(
634            self,
635            encoder: &mut fidl::encoding::Encoder<'_, D>,
636            offset: usize,
637            _depth: fidl::encoding::Depth,
638        ) -> fidl::Result<()> {
639            encoder.debug_check_bounds::<BadEntryType>(offset);
640            unsafe {
641                // Copy the object into the buffer.
642                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
643                (buf_ptr as *mut BadEntryType)
644                    .write_unaligned((self as *const BadEntryType).read());
645                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
646                // done second because the memcpy will write garbage to these bytes.
647            }
648            Ok(())
649        }
650    }
651    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u8, D>>
652        fidl::encoding::Encode<BadEntryType, D> for (T0,)
653    {
654        #[inline]
655        unsafe fn encode(
656            self,
657            encoder: &mut fidl::encoding::Encoder<'_, D>,
658            offset: usize,
659            depth: fidl::encoding::Depth,
660        ) -> fidl::Result<()> {
661            encoder.debug_check_bounds::<BadEntryType>(offset);
662            // Zero out padding regions. There's no need to apply masks
663            // because the unmasked parts will be overwritten by fields.
664            // Write the fields.
665            self.0.encode(encoder, offset + 0, depth)?;
666            Ok(())
667        }
668    }
669
670    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadEntryType {
671        #[inline(always)]
672        fn new_empty() -> Self {
673            Self { value: fidl::new_empty!(u8, D) }
674        }
675
676        #[inline]
677        unsafe fn decode(
678            &mut self,
679            decoder: &mut fidl::encoding::Decoder<'_, D>,
680            offset: usize,
681            _depth: fidl::encoding::Depth,
682        ) -> fidl::Result<()> {
683            decoder.debug_check_bounds::<Self>(offset);
684            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
685            // Verify that padding bytes are zero.
686            // Copy from the buffer into the object.
687            unsafe {
688                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 1);
689            }
690            Ok(())
691        }
692    }
693
694    impl fidl::encoding::ValueTypeMarker for BadFile {
695        type Borrowed<'a> = &'a Self;
696        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
697            value
698        }
699    }
700
701    unsafe impl fidl::encoding::TypeMarker for BadFile {
702        type Owned = Self;
703
704        #[inline(always)]
705        fn inline_align(_context: fidl::encoding::Context) -> usize {
706            8
707        }
708
709        #[inline(always)]
710        fn inline_size(_context: fidl::encoding::Context) -> usize {
711            16
712        }
713    }
714
715    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BadFile, D> for &BadFile {
716        #[inline]
717        unsafe fn encode(
718            self,
719            encoder: &mut fidl::encoding::Encoder<'_, D>,
720            offset: usize,
721            _depth: fidl::encoding::Depth,
722        ) -> fidl::Result<()> {
723            encoder.debug_check_bounds::<BadFile>(offset);
724            // Delegate to tuple encoding.
725            fidl::encoding::Encode::<BadFile, D>::encode(
726                (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
727                    &self.path,
728                ),),
729                encoder,
730                offset,
731                _depth,
732            )
733        }
734    }
735    unsafe impl<
736            D: fidl::encoding::ResourceDialect,
737            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
738        > fidl::encoding::Encode<BadFile, D> for (T0,)
739    {
740        #[inline]
741        unsafe fn encode(
742            self,
743            encoder: &mut fidl::encoding::Encoder<'_, D>,
744            offset: usize,
745            depth: fidl::encoding::Depth,
746        ) -> fidl::Result<()> {
747            encoder.debug_check_bounds::<BadFile>(offset);
748            // Zero out padding regions. There's no need to apply masks
749            // because the unmasked parts will be overwritten by fields.
750            // Write the fields.
751            self.0.encode(encoder, offset + 0, depth)?;
752            Ok(())
753        }
754    }
755
756    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BadFile {
757        #[inline(always)]
758        fn new_empty() -> Self {
759            Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
760        }
761
762        #[inline]
763        unsafe fn decode(
764            &mut self,
765            decoder: &mut fidl::encoding::Decoder<'_, D>,
766            offset: usize,
767            _depth: fidl::encoding::Depth,
768        ) -> fidl::Result<()> {
769            decoder.debug_check_bounds::<Self>(offset);
770            // Verify that padding bytes are zero.
771            fidl::decode!(
772                fidl::encoding::BoundedString<1024>,
773                D,
774                &mut self.path,
775                decoder,
776                offset + 0,
777                _depth
778            )?;
779            Ok(())
780        }
781    }
782
783    impl fidl::encoding::ValueTypeMarker for BannedFeatureIncompat {
784        type Borrowed<'a> = &'a Self;
785        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
786            value
787        }
788    }
789
790    unsafe impl fidl::encoding::TypeMarker for BannedFeatureIncompat {
791        type Owned = Self;
792
793        #[inline(always)]
794        fn inline_align(_context: fidl::encoding::Context) -> usize {
795            4
796        }
797
798        #[inline(always)]
799        fn inline_size(_context: fidl::encoding::Context) -> usize {
800            4
801        }
802        #[inline(always)]
803        fn encode_is_copy() -> bool {
804            true
805        }
806
807        #[inline(always)]
808        fn decode_is_copy() -> bool {
809            true
810        }
811    }
812
813    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BannedFeatureIncompat, D>
814        for &BannedFeatureIncompat
815    {
816        #[inline]
817        unsafe fn encode(
818            self,
819            encoder: &mut fidl::encoding::Encoder<'_, D>,
820            offset: usize,
821            _depth: fidl::encoding::Depth,
822        ) -> fidl::Result<()> {
823            encoder.debug_check_bounds::<BannedFeatureIncompat>(offset);
824            unsafe {
825                // Copy the object into the buffer.
826                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
827                (buf_ptr as *mut BannedFeatureIncompat)
828                    .write_unaligned((self as *const BannedFeatureIncompat).read());
829                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
830                // done second because the memcpy will write garbage to these bytes.
831            }
832            Ok(())
833        }
834    }
835    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
836        fidl::encoding::Encode<BannedFeatureIncompat, D> for (T0,)
837    {
838        #[inline]
839        unsafe fn encode(
840            self,
841            encoder: &mut fidl::encoding::Encoder<'_, D>,
842            offset: usize,
843            depth: fidl::encoding::Depth,
844        ) -> fidl::Result<()> {
845            encoder.debug_check_bounds::<BannedFeatureIncompat>(offset);
846            // Zero out padding regions. There's no need to apply masks
847            // because the unmasked parts will be overwritten by fields.
848            // Write the fields.
849            self.0.encode(encoder, offset + 0, depth)?;
850            Ok(())
851        }
852    }
853
854    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BannedFeatureIncompat {
855        #[inline(always)]
856        fn new_empty() -> Self {
857            Self { value: fidl::new_empty!(u32, D) }
858        }
859
860        #[inline]
861        unsafe fn decode(
862            &mut self,
863            decoder: &mut fidl::encoding::Decoder<'_, D>,
864            offset: usize,
865            _depth: fidl::encoding::Depth,
866        ) -> fidl::Result<()> {
867            decoder.debug_check_bounds::<Self>(offset);
868            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
869            // Verify that padding bytes are zero.
870            // Copy from the buffer into the object.
871            unsafe {
872                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
873            }
874            Ok(())
875        }
876    }
877
878    impl fidl::encoding::ValueTypeMarker for BlockNumberOutOfBounds {
879        type Borrowed<'a> = &'a Self;
880        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
881            value
882        }
883    }
884
885    unsafe impl fidl::encoding::TypeMarker for BlockNumberOutOfBounds {
886        type Owned = Self;
887
888        #[inline(always)]
889        fn inline_align(_context: fidl::encoding::Context) -> usize {
890            8
891        }
892
893        #[inline(always)]
894        fn inline_size(_context: fidl::encoding::Context) -> usize {
895            8
896        }
897        #[inline(always)]
898        fn encode_is_copy() -> bool {
899            true
900        }
901
902        #[inline(always)]
903        fn decode_is_copy() -> bool {
904            true
905        }
906    }
907
908    unsafe impl<D: fidl::encoding::ResourceDialect>
909        fidl::encoding::Encode<BlockNumberOutOfBounds, D> for &BlockNumberOutOfBounds
910    {
911        #[inline]
912        unsafe fn encode(
913            self,
914            encoder: &mut fidl::encoding::Encoder<'_, D>,
915            offset: usize,
916            _depth: fidl::encoding::Depth,
917        ) -> fidl::Result<()> {
918            encoder.debug_check_bounds::<BlockNumberOutOfBounds>(offset);
919            unsafe {
920                // Copy the object into the buffer.
921                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
922                (buf_ptr as *mut BlockNumberOutOfBounds)
923                    .write_unaligned((self as *const BlockNumberOutOfBounds).read());
924                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
925                // done second because the memcpy will write garbage to these bytes.
926            }
927            Ok(())
928        }
929    }
930    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
931        fidl::encoding::Encode<BlockNumberOutOfBounds, D> for (T0,)
932    {
933        #[inline]
934        unsafe fn encode(
935            self,
936            encoder: &mut fidl::encoding::Encoder<'_, D>,
937            offset: usize,
938            depth: fidl::encoding::Depth,
939        ) -> fidl::Result<()> {
940            encoder.debug_check_bounds::<BlockNumberOutOfBounds>(offset);
941            // Zero out padding regions. There's no need to apply masks
942            // because the unmasked parts will be overwritten by fields.
943            // Write the fields.
944            self.0.encode(encoder, offset + 0, depth)?;
945            Ok(())
946        }
947    }
948
949    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
950        for BlockNumberOutOfBounds
951    {
952        #[inline(always)]
953        fn new_empty() -> Self {
954            Self { block_number: fidl::new_empty!(u64, D) }
955        }
956
957        #[inline]
958        unsafe fn decode(
959            &mut self,
960            decoder: &mut fidl::encoding::Decoder<'_, D>,
961            offset: usize,
962            _depth: fidl::encoding::Depth,
963        ) -> fidl::Result<()> {
964            decoder.debug_check_bounds::<Self>(offset);
965            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
966            // Verify that padding bytes are zero.
967            // Copy from the buffer into the object.
968            unsafe {
969                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
970            }
971            Ok(())
972        }
973    }
974
975    impl fidl::encoding::ValueTypeMarker for BlockSizeInvalid {
976        type Borrowed<'a> = &'a Self;
977        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
978            value
979        }
980    }
981
982    unsafe impl fidl::encoding::TypeMarker for BlockSizeInvalid {
983        type Owned = Self;
984
985        #[inline(always)]
986        fn inline_align(_context: fidl::encoding::Context) -> usize {
987            4
988        }
989
990        #[inline(always)]
991        fn inline_size(_context: fidl::encoding::Context) -> usize {
992            4
993        }
994        #[inline(always)]
995        fn encode_is_copy() -> bool {
996            true
997        }
998
999        #[inline(always)]
1000        fn decode_is_copy() -> bool {
1001            true
1002        }
1003    }
1004
1005    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BlockSizeInvalid, D>
1006        for &BlockSizeInvalid
1007    {
1008        #[inline]
1009        unsafe fn encode(
1010            self,
1011            encoder: &mut fidl::encoding::Encoder<'_, D>,
1012            offset: usize,
1013            _depth: fidl::encoding::Depth,
1014        ) -> fidl::Result<()> {
1015            encoder.debug_check_bounds::<BlockSizeInvalid>(offset);
1016            unsafe {
1017                // Copy the object into the buffer.
1018                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1019                (buf_ptr as *mut BlockSizeInvalid)
1020                    .write_unaligned((self as *const BlockSizeInvalid).read());
1021                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1022                // done second because the memcpy will write garbage to these bytes.
1023            }
1024            Ok(())
1025        }
1026    }
1027    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1028        fidl::encoding::Encode<BlockSizeInvalid, D> for (T0,)
1029    {
1030        #[inline]
1031        unsafe fn encode(
1032            self,
1033            encoder: &mut fidl::encoding::Encoder<'_, D>,
1034            offset: usize,
1035            depth: fidl::encoding::Depth,
1036        ) -> fidl::Result<()> {
1037            encoder.debug_check_bounds::<BlockSizeInvalid>(offset);
1038            // Zero out padding regions. There's no need to apply masks
1039            // because the unmasked parts will be overwritten by fields.
1040            // Write the fields.
1041            self.0.encode(encoder, offset + 0, depth)?;
1042            Ok(())
1043        }
1044    }
1045
1046    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlockSizeInvalid {
1047        #[inline(always)]
1048        fn new_empty() -> Self {
1049            Self { block_size: fidl::new_empty!(u32, D) }
1050        }
1051
1052        #[inline]
1053        unsafe fn decode(
1054            &mut self,
1055            decoder: &mut fidl::encoding::Decoder<'_, D>,
1056            offset: usize,
1057            _depth: fidl::encoding::Depth,
1058        ) -> fidl::Result<()> {
1059            decoder.debug_check_bounds::<Self>(offset);
1060            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1061            // Verify that padding bytes are zero.
1062            // Copy from the buffer into the object.
1063            unsafe {
1064                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1065            }
1066            Ok(())
1067        }
1068    }
1069
1070    impl fidl::encoding::ValueTypeMarker for DirEntry2NonUtf8 {
1071        type Borrowed<'a> = &'a Self;
1072        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1073            value
1074        }
1075    }
1076
1077    unsafe impl fidl::encoding::TypeMarker for DirEntry2NonUtf8 {
1078        type Owned = Self;
1079
1080        #[inline(always)]
1081        fn inline_align(_context: fidl::encoding::Context) -> usize {
1082            8
1083        }
1084
1085        #[inline(always)]
1086        fn inline_size(_context: fidl::encoding::Context) -> usize {
1087            16
1088        }
1089    }
1090
1091    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DirEntry2NonUtf8, D>
1092        for &DirEntry2NonUtf8
1093    {
1094        #[inline]
1095        unsafe fn encode(
1096            self,
1097            encoder: &mut fidl::encoding::Encoder<'_, D>,
1098            offset: usize,
1099            _depth: fidl::encoding::Depth,
1100        ) -> fidl::Result<()> {
1101            encoder.debug_check_bounds::<DirEntry2NonUtf8>(offset);
1102            // Delegate to tuple encoding.
1103            fidl::encoding::Encode::<DirEntry2NonUtf8, D>::encode(
1104                (<fidl::encoding::Vector<u8, 255> as fidl::encoding::ValueTypeMarker>::borrow(
1105                    &self.data,
1106                ),),
1107                encoder,
1108                offset,
1109                _depth,
1110            )
1111        }
1112    }
1113    unsafe impl<
1114            D: fidl::encoding::ResourceDialect,
1115            T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 255>, D>,
1116        > fidl::encoding::Encode<DirEntry2NonUtf8, D> for (T0,)
1117    {
1118        #[inline]
1119        unsafe fn encode(
1120            self,
1121            encoder: &mut fidl::encoding::Encoder<'_, D>,
1122            offset: usize,
1123            depth: fidl::encoding::Depth,
1124        ) -> fidl::Result<()> {
1125            encoder.debug_check_bounds::<DirEntry2NonUtf8>(offset);
1126            // Zero out padding regions. There's no need to apply masks
1127            // because the unmasked parts will be overwritten by fields.
1128            // Write the fields.
1129            self.0.encode(encoder, offset + 0, depth)?;
1130            Ok(())
1131        }
1132    }
1133
1134    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DirEntry2NonUtf8 {
1135        #[inline(always)]
1136        fn new_empty() -> Self {
1137            Self { data: fidl::new_empty!(fidl::encoding::Vector<u8, 255>, D) }
1138        }
1139
1140        #[inline]
1141        unsafe fn decode(
1142            &mut self,
1143            decoder: &mut fidl::encoding::Decoder<'_, D>,
1144            offset: usize,
1145            _depth: fidl::encoding::Depth,
1146        ) -> fidl::Result<()> {
1147            decoder.debug_check_bounds::<Self>(offset);
1148            // Verify that padding bytes are zero.
1149            fidl::decode!(fidl::encoding::Vector<u8, 255>, D, &mut self.data, decoder, offset + 0, _depth)?;
1150            Ok(())
1151        }
1152    }
1153
1154    impl fidl::encoding::ValueTypeMarker for ExtentUnexpectedLength {
1155        type Borrowed<'a> = &'a Self;
1156        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1157            value
1158        }
1159    }
1160
1161    unsafe impl fidl::encoding::TypeMarker for ExtentUnexpectedLength {
1162        type Owned = Self;
1163
1164        #[inline(always)]
1165        fn inline_align(_context: fidl::encoding::Context) -> usize {
1166            8
1167        }
1168
1169        #[inline(always)]
1170        fn inline_size(_context: fidl::encoding::Context) -> usize {
1171            16
1172        }
1173        #[inline(always)]
1174        fn encode_is_copy() -> bool {
1175            true
1176        }
1177
1178        #[inline(always)]
1179        fn decode_is_copy() -> bool {
1180            true
1181        }
1182    }
1183
1184    unsafe impl<D: fidl::encoding::ResourceDialect>
1185        fidl::encoding::Encode<ExtentUnexpectedLength, D> for &ExtentUnexpectedLength
1186    {
1187        #[inline]
1188        unsafe fn encode(
1189            self,
1190            encoder: &mut fidl::encoding::Encoder<'_, D>,
1191            offset: usize,
1192            _depth: fidl::encoding::Depth,
1193        ) -> fidl::Result<()> {
1194            encoder.debug_check_bounds::<ExtentUnexpectedLength>(offset);
1195            unsafe {
1196                // Copy the object into the buffer.
1197                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1198                (buf_ptr as *mut ExtentUnexpectedLength)
1199                    .write_unaligned((self as *const ExtentUnexpectedLength).read());
1200                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1201                // done second because the memcpy will write garbage to these bytes.
1202            }
1203            Ok(())
1204        }
1205    }
1206    unsafe impl<
1207            D: fidl::encoding::ResourceDialect,
1208            T0: fidl::encoding::Encode<u64, D>,
1209            T1: fidl::encoding::Encode<u64, D>,
1210        > fidl::encoding::Encode<ExtentUnexpectedLength, D> for (T0, T1)
1211    {
1212        #[inline]
1213        unsafe fn encode(
1214            self,
1215            encoder: &mut fidl::encoding::Encoder<'_, D>,
1216            offset: usize,
1217            depth: fidl::encoding::Depth,
1218        ) -> fidl::Result<()> {
1219            encoder.debug_check_bounds::<ExtentUnexpectedLength>(offset);
1220            // Zero out padding regions. There's no need to apply masks
1221            // because the unmasked parts will be overwritten by fields.
1222            // Write the fields.
1223            self.0.encode(encoder, offset + 0, depth)?;
1224            self.1.encode(encoder, offset + 8, depth)?;
1225            Ok(())
1226        }
1227    }
1228
1229    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1230        for ExtentUnexpectedLength
1231    {
1232        #[inline(always)]
1233        fn new_empty() -> Self {
1234            Self { size: fidl::new_empty!(u64, D), expected: fidl::new_empty!(u64, D) }
1235        }
1236
1237        #[inline]
1238        unsafe fn decode(
1239            &mut self,
1240            decoder: &mut fidl::encoding::Decoder<'_, D>,
1241            offset: usize,
1242            _depth: fidl::encoding::Depth,
1243        ) -> fidl::Result<()> {
1244            decoder.debug_check_bounds::<Self>(offset);
1245            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1246            // Verify that padding bytes are zero.
1247            // Copy from the buffer into the object.
1248            unsafe {
1249                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1250            }
1251            Ok(())
1252        }
1253    }
1254
1255    impl fidl::encoding::ValueTypeMarker for Incompatible {
1256        type Borrowed<'a> = &'a Self;
1257        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1258            value
1259        }
1260    }
1261
1262    unsafe impl fidl::encoding::TypeMarker for Incompatible {
1263        type Owned = Self;
1264
1265        #[inline(always)]
1266        fn inline_align(_context: fidl::encoding::Context) -> usize {
1267            8
1268        }
1269
1270        #[inline(always)]
1271        fn inline_size(_context: fidl::encoding::Context) -> usize {
1272            16
1273        }
1274    }
1275
1276    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Incompatible, D>
1277        for &Incompatible
1278    {
1279        #[inline]
1280        unsafe fn encode(
1281            self,
1282            encoder: &mut fidl::encoding::Encoder<'_, D>,
1283            offset: usize,
1284            _depth: fidl::encoding::Depth,
1285        ) -> fidl::Result<()> {
1286            encoder.debug_check_bounds::<Incompatible>(offset);
1287            // Delegate to tuple encoding.
1288            fidl::encoding::Encode::<Incompatible, D>::encode(
1289                (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
1290                    &self.msg,
1291                ),),
1292                encoder,
1293                offset,
1294                _depth,
1295            )
1296        }
1297    }
1298    unsafe impl<
1299            D: fidl::encoding::ResourceDialect,
1300            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
1301        > fidl::encoding::Encode<Incompatible, D> for (T0,)
1302    {
1303        #[inline]
1304        unsafe fn encode(
1305            self,
1306            encoder: &mut fidl::encoding::Encoder<'_, D>,
1307            offset: usize,
1308            depth: fidl::encoding::Depth,
1309        ) -> fidl::Result<()> {
1310            encoder.debug_check_bounds::<Incompatible>(offset);
1311            // Zero out padding regions. There's no need to apply masks
1312            // because the unmasked parts will be overwritten by fields.
1313            // Write the fields.
1314            self.0.encode(encoder, offset + 0, depth)?;
1315            Ok(())
1316        }
1317    }
1318
1319    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Incompatible {
1320        #[inline(always)]
1321        fn new_empty() -> Self {
1322            Self { msg: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
1323        }
1324
1325        #[inline]
1326        unsafe fn decode(
1327            &mut self,
1328            decoder: &mut fidl::encoding::Decoder<'_, D>,
1329            offset: usize,
1330            _depth: fidl::encoding::Depth,
1331        ) -> fidl::Result<()> {
1332            decoder.debug_check_bounds::<Self>(offset);
1333            // Verify that padding bytes are zero.
1334            fidl::decode!(
1335                fidl::encoding::BoundedString<1024>,
1336                D,
1337                &mut self.msg,
1338                decoder,
1339                offset + 0,
1340                _depth
1341            )?;
1342            Ok(())
1343        }
1344    }
1345
1346    impl fidl::encoding::ValueTypeMarker for InvalidAddress {
1347        type Borrowed<'a> = &'a Self;
1348        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1349            value
1350        }
1351    }
1352
1353    unsafe impl fidl::encoding::TypeMarker for InvalidAddress {
1354        type Owned = Self;
1355
1356        #[inline(always)]
1357        fn inline_align(_context: fidl::encoding::Context) -> usize {
1358            8
1359        }
1360
1361        #[inline(always)]
1362        fn inline_size(_context: fidl::encoding::Context) -> usize {
1363            24
1364        }
1365    }
1366
1367    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidAddress, D>
1368        for &InvalidAddress
1369    {
1370        #[inline]
1371        unsafe fn encode(
1372            self,
1373            encoder: &mut fidl::encoding::Encoder<'_, D>,
1374            offset: usize,
1375            _depth: fidl::encoding::Depth,
1376        ) -> fidl::Result<()> {
1377            encoder.debug_check_bounds::<InvalidAddress>(offset);
1378            // Delegate to tuple encoding.
1379            fidl::encoding::Encode::<InvalidAddress, D>::encode(
1380                (
1381                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.position),
1382                    <OutOfBoundsDirection as fidl::encoding::ValueTypeMarker>::borrow(
1383                        &self.direction,
1384                    ),
1385                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.bound),
1386                ),
1387                encoder,
1388                offset,
1389                _depth,
1390            )
1391        }
1392    }
1393    unsafe impl<
1394            D: fidl::encoding::ResourceDialect,
1395            T0: fidl::encoding::Encode<u64, D>,
1396            T1: fidl::encoding::Encode<OutOfBoundsDirection, D>,
1397            T2: fidl::encoding::Encode<u64, D>,
1398        > fidl::encoding::Encode<InvalidAddress, D> for (T0, T1, T2)
1399    {
1400        #[inline]
1401        unsafe fn encode(
1402            self,
1403            encoder: &mut fidl::encoding::Encoder<'_, D>,
1404            offset: usize,
1405            depth: fidl::encoding::Depth,
1406        ) -> fidl::Result<()> {
1407            encoder.debug_check_bounds::<InvalidAddress>(offset);
1408            // Zero out padding regions. There's no need to apply masks
1409            // because the unmasked parts will be overwritten by fields.
1410            unsafe {
1411                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1412                (ptr as *mut u64).write_unaligned(0);
1413            }
1414            // Write the fields.
1415            self.0.encode(encoder, offset + 0, depth)?;
1416            self.1.encode(encoder, offset + 8, depth)?;
1417            self.2.encode(encoder, offset + 16, depth)?;
1418            Ok(())
1419        }
1420    }
1421
1422    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidAddress {
1423        #[inline(always)]
1424        fn new_empty() -> Self {
1425            Self {
1426                position: fidl::new_empty!(u64, D),
1427                direction: fidl::new_empty!(OutOfBoundsDirection, D),
1428                bound: fidl::new_empty!(u64, D),
1429            }
1430        }
1431
1432        #[inline]
1433        unsafe fn decode(
1434            &mut self,
1435            decoder: &mut fidl::encoding::Decoder<'_, D>,
1436            offset: usize,
1437            _depth: fidl::encoding::Depth,
1438        ) -> fidl::Result<()> {
1439            decoder.debug_check_bounds::<Self>(offset);
1440            // Verify that padding bytes are zero.
1441            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1442            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1443            let mask = 0xffffffff00000000u64;
1444            let maskedval = padval & mask;
1445            if maskedval != 0 {
1446                return Err(fidl::Error::NonZeroPadding {
1447                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1448                });
1449            }
1450            fidl::decode!(u64, D, &mut self.position, decoder, offset + 0, _depth)?;
1451            fidl::decode!(
1452                OutOfBoundsDirection,
1453                D,
1454                &mut self.direction,
1455                decoder,
1456                offset + 8,
1457                _depth
1458            )?;
1459            fidl::decode!(u64, D, &mut self.bound, decoder, offset + 16, _depth)?;
1460            Ok(())
1461        }
1462    }
1463
1464    impl fidl::encoding::ValueTypeMarker for InvalidBlockGroupDesc {
1465        type Borrowed<'a> = &'a Self;
1466        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1467            value
1468        }
1469    }
1470
1471    unsafe impl fidl::encoding::TypeMarker for InvalidBlockGroupDesc {
1472        type Owned = Self;
1473
1474        #[inline(always)]
1475        fn inline_align(_context: fidl::encoding::Context) -> usize {
1476            8
1477        }
1478
1479        #[inline(always)]
1480        fn inline_size(_context: fidl::encoding::Context) -> usize {
1481            8
1482        }
1483        #[inline(always)]
1484        fn encode_is_copy() -> bool {
1485            true
1486        }
1487
1488        #[inline(always)]
1489        fn decode_is_copy() -> bool {
1490            true
1491        }
1492    }
1493
1494    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidBlockGroupDesc, D>
1495        for &InvalidBlockGroupDesc
1496    {
1497        #[inline]
1498        unsafe fn encode(
1499            self,
1500            encoder: &mut fidl::encoding::Encoder<'_, D>,
1501            offset: usize,
1502            _depth: fidl::encoding::Depth,
1503        ) -> fidl::Result<()> {
1504            encoder.debug_check_bounds::<InvalidBlockGroupDesc>(offset);
1505            unsafe {
1506                // Copy the object into the buffer.
1507                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1508                (buf_ptr as *mut InvalidBlockGroupDesc)
1509                    .write_unaligned((self as *const InvalidBlockGroupDesc).read());
1510                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1511                // done second because the memcpy will write garbage to these bytes.
1512            }
1513            Ok(())
1514        }
1515    }
1516    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1517        fidl::encoding::Encode<InvalidBlockGroupDesc, D> for (T0,)
1518    {
1519        #[inline]
1520        unsafe fn encode(
1521            self,
1522            encoder: &mut fidl::encoding::Encoder<'_, D>,
1523            offset: usize,
1524            depth: fidl::encoding::Depth,
1525        ) -> fidl::Result<()> {
1526            encoder.debug_check_bounds::<InvalidBlockGroupDesc>(offset);
1527            // Zero out padding regions. There's no need to apply masks
1528            // because the unmasked parts will be overwritten by fields.
1529            // Write the fields.
1530            self.0.encode(encoder, offset + 0, depth)?;
1531            Ok(())
1532        }
1533    }
1534
1535    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidBlockGroupDesc {
1536        #[inline(always)]
1537        fn new_empty() -> Self {
1538            Self { position: fidl::new_empty!(u64, D) }
1539        }
1540
1541        #[inline]
1542        unsafe fn decode(
1543            &mut self,
1544            decoder: &mut fidl::encoding::Decoder<'_, D>,
1545            offset: usize,
1546            _depth: fidl::encoding::Depth,
1547        ) -> fidl::Result<()> {
1548            decoder.debug_check_bounds::<Self>(offset);
1549            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1550            // Verify that padding bytes are zero.
1551            // Copy from the buffer into the object.
1552            unsafe {
1553                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1554            }
1555            Ok(())
1556        }
1557    }
1558
1559    impl fidl::encoding::ValueTypeMarker for InvalidDirEntry2 {
1560        type Borrowed<'a> = &'a Self;
1561        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1562            value
1563        }
1564    }
1565
1566    unsafe impl fidl::encoding::TypeMarker for InvalidDirEntry2 {
1567        type Owned = Self;
1568
1569        #[inline(always)]
1570        fn inline_align(_context: fidl::encoding::Context) -> usize {
1571            8
1572        }
1573
1574        #[inline(always)]
1575        fn inline_size(_context: fidl::encoding::Context) -> usize {
1576            8
1577        }
1578        #[inline(always)]
1579        fn encode_is_copy() -> bool {
1580            true
1581        }
1582
1583        #[inline(always)]
1584        fn decode_is_copy() -> bool {
1585            true
1586        }
1587    }
1588
1589    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidDirEntry2, D>
1590        for &InvalidDirEntry2
1591    {
1592        #[inline]
1593        unsafe fn encode(
1594            self,
1595            encoder: &mut fidl::encoding::Encoder<'_, D>,
1596            offset: usize,
1597            _depth: fidl::encoding::Depth,
1598        ) -> fidl::Result<()> {
1599            encoder.debug_check_bounds::<InvalidDirEntry2>(offset);
1600            unsafe {
1601                // Copy the object into the buffer.
1602                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1603                (buf_ptr as *mut InvalidDirEntry2)
1604                    .write_unaligned((self as *const InvalidDirEntry2).read());
1605                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1606                // done second because the memcpy will write garbage to these bytes.
1607            }
1608            Ok(())
1609        }
1610    }
1611    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1612        fidl::encoding::Encode<InvalidDirEntry2, D> for (T0,)
1613    {
1614        #[inline]
1615        unsafe fn encode(
1616            self,
1617            encoder: &mut fidl::encoding::Encoder<'_, D>,
1618            offset: usize,
1619            depth: fidl::encoding::Depth,
1620        ) -> fidl::Result<()> {
1621            encoder.debug_check_bounds::<InvalidDirEntry2>(offset);
1622            // Zero out padding regions. There's no need to apply masks
1623            // because the unmasked parts will be overwritten by fields.
1624            // Write the fields.
1625            self.0.encode(encoder, offset + 0, depth)?;
1626            Ok(())
1627        }
1628    }
1629
1630    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidDirEntry2 {
1631        #[inline(always)]
1632        fn new_empty() -> Self {
1633            Self { position: fidl::new_empty!(u64, D) }
1634        }
1635
1636        #[inline]
1637        unsafe fn decode(
1638            &mut self,
1639            decoder: &mut fidl::encoding::Decoder<'_, D>,
1640            offset: usize,
1641            _depth: fidl::encoding::Depth,
1642        ) -> fidl::Result<()> {
1643            decoder.debug_check_bounds::<Self>(offset);
1644            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1645            // Verify that padding bytes are zero.
1646            // Copy from the buffer into the object.
1647            unsafe {
1648                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1649            }
1650            Ok(())
1651        }
1652    }
1653
1654    impl fidl::encoding::ValueTypeMarker for InvalidExtent {
1655        type Borrowed<'a> = &'a Self;
1656        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1657            value
1658        }
1659    }
1660
1661    unsafe impl fidl::encoding::TypeMarker for InvalidExtent {
1662        type Owned = Self;
1663
1664        #[inline(always)]
1665        fn inline_align(_context: fidl::encoding::Context) -> usize {
1666            8
1667        }
1668
1669        #[inline(always)]
1670        fn inline_size(_context: fidl::encoding::Context) -> usize {
1671            8
1672        }
1673        #[inline(always)]
1674        fn encode_is_copy() -> bool {
1675            true
1676        }
1677
1678        #[inline(always)]
1679        fn decode_is_copy() -> bool {
1680            true
1681        }
1682    }
1683
1684    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidExtent, D>
1685        for &InvalidExtent
1686    {
1687        #[inline]
1688        unsafe fn encode(
1689            self,
1690            encoder: &mut fidl::encoding::Encoder<'_, D>,
1691            offset: usize,
1692            _depth: fidl::encoding::Depth,
1693        ) -> fidl::Result<()> {
1694            encoder.debug_check_bounds::<InvalidExtent>(offset);
1695            unsafe {
1696                // Copy the object into the buffer.
1697                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1698                (buf_ptr as *mut InvalidExtent)
1699                    .write_unaligned((self as *const InvalidExtent).read());
1700                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1701                // done second because the memcpy will write garbage to these bytes.
1702            }
1703            Ok(())
1704        }
1705    }
1706    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1707        fidl::encoding::Encode<InvalidExtent, D> for (T0,)
1708    {
1709        #[inline]
1710        unsafe fn encode(
1711            self,
1712            encoder: &mut fidl::encoding::Encoder<'_, D>,
1713            offset: usize,
1714            depth: fidl::encoding::Depth,
1715        ) -> fidl::Result<()> {
1716            encoder.debug_check_bounds::<InvalidExtent>(offset);
1717            // Zero out padding regions. There's no need to apply masks
1718            // because the unmasked parts will be overwritten by fields.
1719            // Write the fields.
1720            self.0.encode(encoder, offset + 0, depth)?;
1721            Ok(())
1722        }
1723    }
1724
1725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtent {
1726        #[inline(always)]
1727        fn new_empty() -> Self {
1728            Self { position: fidl::new_empty!(u64, D) }
1729        }
1730
1731        #[inline]
1732        unsafe fn decode(
1733            &mut self,
1734            decoder: &mut fidl::encoding::Decoder<'_, D>,
1735            offset: usize,
1736            _depth: fidl::encoding::Depth,
1737        ) -> fidl::Result<()> {
1738            decoder.debug_check_bounds::<Self>(offset);
1739            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1740            // Verify that padding bytes are zero.
1741            // Copy from the buffer into the object.
1742            unsafe {
1743                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1744            }
1745            Ok(())
1746        }
1747    }
1748
1749    impl fidl::encoding::ValueTypeMarker for InvalidExtentHeader {
1750        type Borrowed<'a> = &'a Self;
1751        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1752            value
1753        }
1754    }
1755
1756    unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeader {
1757        type Owned = Self;
1758
1759        #[inline(always)]
1760        fn inline_align(_context: fidl::encoding::Context) -> usize {
1761            1
1762        }
1763
1764        #[inline(always)]
1765        fn inline_size(_context: fidl::encoding::Context) -> usize {
1766            1
1767        }
1768    }
1769
1770    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidExtentHeader, D>
1771        for &InvalidExtentHeader
1772    {
1773        #[inline]
1774        unsafe fn encode(
1775            self,
1776            encoder: &mut fidl::encoding::Encoder<'_, D>,
1777            offset: usize,
1778            _depth: fidl::encoding::Depth,
1779        ) -> fidl::Result<()> {
1780            encoder.debug_check_bounds::<InvalidExtentHeader>(offset);
1781            encoder.write_num(0u8, offset);
1782            Ok(())
1783        }
1784    }
1785
1786    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidExtentHeader {
1787        #[inline(always)]
1788        fn new_empty() -> Self {
1789            Self
1790        }
1791
1792        #[inline]
1793        unsafe fn decode(
1794            &mut self,
1795            decoder: &mut fidl::encoding::Decoder<'_, D>,
1796            offset: usize,
1797            _depth: fidl::encoding::Depth,
1798        ) -> fidl::Result<()> {
1799            decoder.debug_check_bounds::<Self>(offset);
1800            match decoder.read_num::<u8>(offset) {
1801                0 => Ok(()),
1802                _ => Err(fidl::Error::Invalid),
1803            }
1804        }
1805    }
1806
1807    impl fidl::encoding::ValueTypeMarker for InvalidExtentHeaderMagic {
1808        type Borrowed<'a> = &'a Self;
1809        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1810            value
1811        }
1812    }
1813
1814    unsafe impl fidl::encoding::TypeMarker for InvalidExtentHeaderMagic {
1815        type Owned = Self;
1816
1817        #[inline(always)]
1818        fn inline_align(_context: fidl::encoding::Context) -> usize {
1819            2
1820        }
1821
1822        #[inline(always)]
1823        fn inline_size(_context: fidl::encoding::Context) -> usize {
1824            2
1825        }
1826        #[inline(always)]
1827        fn encode_is_copy() -> bool {
1828            true
1829        }
1830
1831        #[inline(always)]
1832        fn decode_is_copy() -> bool {
1833            true
1834        }
1835    }
1836
1837    unsafe impl<D: fidl::encoding::ResourceDialect>
1838        fidl::encoding::Encode<InvalidExtentHeaderMagic, D> for &InvalidExtentHeaderMagic
1839    {
1840        #[inline]
1841        unsafe fn encode(
1842            self,
1843            encoder: &mut fidl::encoding::Encoder<'_, D>,
1844            offset: usize,
1845            _depth: fidl::encoding::Depth,
1846        ) -> fidl::Result<()> {
1847            encoder.debug_check_bounds::<InvalidExtentHeaderMagic>(offset);
1848            unsafe {
1849                // Copy the object into the buffer.
1850                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1851                (buf_ptr as *mut InvalidExtentHeaderMagic)
1852                    .write_unaligned((self as *const InvalidExtentHeaderMagic).read());
1853                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1854                // done second because the memcpy will write garbage to these bytes.
1855            }
1856            Ok(())
1857        }
1858    }
1859    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
1860        fidl::encoding::Encode<InvalidExtentHeaderMagic, D> for (T0,)
1861    {
1862        #[inline]
1863        unsafe fn encode(
1864            self,
1865            encoder: &mut fidl::encoding::Encoder<'_, D>,
1866            offset: usize,
1867            depth: fidl::encoding::Depth,
1868        ) -> fidl::Result<()> {
1869            encoder.debug_check_bounds::<InvalidExtentHeaderMagic>(offset);
1870            // Zero out padding regions. There's no need to apply masks
1871            // because the unmasked parts will be overwritten by fields.
1872            // Write the fields.
1873            self.0.encode(encoder, offset + 0, depth)?;
1874            Ok(())
1875        }
1876    }
1877
1878    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1879        for InvalidExtentHeaderMagic
1880    {
1881        #[inline(always)]
1882        fn new_empty() -> Self {
1883            Self { value: fidl::new_empty!(u16, D) }
1884        }
1885
1886        #[inline]
1887        unsafe fn decode(
1888            &mut self,
1889            decoder: &mut fidl::encoding::Decoder<'_, D>,
1890            offset: usize,
1891            _depth: fidl::encoding::Depth,
1892        ) -> fidl::Result<()> {
1893            decoder.debug_check_bounds::<Self>(offset);
1894            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1895            // Verify that padding bytes are zero.
1896            // Copy from the buffer into the object.
1897            unsafe {
1898                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
1899            }
1900            Ok(())
1901        }
1902    }
1903
1904    impl fidl::encoding::ValueTypeMarker for InvalidINode {
1905        type Borrowed<'a> = &'a Self;
1906        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1907            value
1908        }
1909    }
1910
1911    unsafe impl fidl::encoding::TypeMarker for InvalidINode {
1912        type Owned = Self;
1913
1914        #[inline(always)]
1915        fn inline_align(_context: fidl::encoding::Context) -> usize {
1916            4
1917        }
1918
1919        #[inline(always)]
1920        fn inline_size(_context: fidl::encoding::Context) -> usize {
1921            4
1922        }
1923        #[inline(always)]
1924        fn encode_is_copy() -> bool {
1925            true
1926        }
1927
1928        #[inline(always)]
1929        fn decode_is_copy() -> bool {
1930            true
1931        }
1932    }
1933
1934    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidINode, D>
1935        for &InvalidINode
1936    {
1937        #[inline]
1938        unsafe fn encode(
1939            self,
1940            encoder: &mut fidl::encoding::Encoder<'_, D>,
1941            offset: usize,
1942            _depth: fidl::encoding::Depth,
1943        ) -> fidl::Result<()> {
1944            encoder.debug_check_bounds::<InvalidINode>(offset);
1945            unsafe {
1946                // Copy the object into the buffer.
1947                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1948                (buf_ptr as *mut InvalidINode)
1949                    .write_unaligned((self as *const InvalidINode).read());
1950                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1951                // done second because the memcpy will write garbage to these bytes.
1952            }
1953            Ok(())
1954        }
1955    }
1956    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1957        fidl::encoding::Encode<InvalidINode, D> for (T0,)
1958    {
1959        #[inline]
1960        unsafe fn encode(
1961            self,
1962            encoder: &mut fidl::encoding::Encoder<'_, D>,
1963            offset: usize,
1964            depth: fidl::encoding::Depth,
1965        ) -> fidl::Result<()> {
1966            encoder.debug_check_bounds::<InvalidINode>(offset);
1967            // Zero out padding regions. There's no need to apply masks
1968            // because the unmasked parts will be overwritten by fields.
1969            // Write the fields.
1970            self.0.encode(encoder, offset + 0, depth)?;
1971            Ok(())
1972        }
1973    }
1974
1975    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidINode {
1976        #[inline(always)]
1977        fn new_empty() -> Self {
1978            Self { inode_number: fidl::new_empty!(u32, D) }
1979        }
1980
1981        #[inline]
1982        unsafe fn decode(
1983            &mut self,
1984            decoder: &mut fidl::encoding::Decoder<'_, D>,
1985            offset: usize,
1986            _depth: fidl::encoding::Depth,
1987        ) -> fidl::Result<()> {
1988            decoder.debug_check_bounds::<Self>(offset);
1989            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1990            // Verify that padding bytes are zero.
1991            // Copy from the buffer into the object.
1992            unsafe {
1993                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1994            }
1995            Ok(())
1996        }
1997    }
1998
1999    impl fidl::encoding::ValueTypeMarker for InvalidInputPath {
2000        type Borrowed<'a> = &'a Self;
2001        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2002            value
2003        }
2004    }
2005
2006    unsafe impl fidl::encoding::TypeMarker for InvalidInputPath {
2007        type Owned = Self;
2008
2009        #[inline(always)]
2010        fn inline_align(_context: fidl::encoding::Context) -> usize {
2011            8
2012        }
2013
2014        #[inline(always)]
2015        fn inline_size(_context: fidl::encoding::Context) -> usize {
2016            16
2017        }
2018    }
2019
2020    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidInputPath, D>
2021        for &InvalidInputPath
2022    {
2023        #[inline]
2024        unsafe fn encode(
2025            self,
2026            encoder: &mut fidl::encoding::Encoder<'_, D>,
2027            offset: usize,
2028            _depth: fidl::encoding::Depth,
2029        ) -> fidl::Result<()> {
2030            encoder.debug_check_bounds::<InvalidInputPath>(offset);
2031            // Delegate to tuple encoding.
2032            fidl::encoding::Encode::<InvalidInputPath, D>::encode(
2033                (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
2034                    &self.path,
2035                ),),
2036                encoder,
2037                offset,
2038                _depth,
2039            )
2040        }
2041    }
2042    unsafe impl<
2043            D: fidl::encoding::ResourceDialect,
2044            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
2045        > fidl::encoding::Encode<InvalidInputPath, D> for (T0,)
2046    {
2047        #[inline]
2048        unsafe fn encode(
2049            self,
2050            encoder: &mut fidl::encoding::Encoder<'_, D>,
2051            offset: usize,
2052            depth: fidl::encoding::Depth,
2053        ) -> fidl::Result<()> {
2054            encoder.debug_check_bounds::<InvalidInputPath>(offset);
2055            // Zero out padding regions. There's no need to apply masks
2056            // because the unmasked parts will be overwritten by fields.
2057            // Write the fields.
2058            self.0.encode(encoder, offset + 0, depth)?;
2059            Ok(())
2060        }
2061    }
2062
2063    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidInputPath {
2064        #[inline(always)]
2065        fn new_empty() -> Self {
2066            Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
2067        }
2068
2069        #[inline]
2070        unsafe fn decode(
2071            &mut self,
2072            decoder: &mut fidl::encoding::Decoder<'_, D>,
2073            offset: usize,
2074            _depth: fidl::encoding::Depth,
2075        ) -> fidl::Result<()> {
2076            decoder.debug_check_bounds::<Self>(offset);
2077            // Verify that padding bytes are zero.
2078            fidl::decode!(
2079                fidl::encoding::BoundedString<1024>,
2080                D,
2081                &mut self.path,
2082                decoder,
2083                offset + 0,
2084                _depth
2085            )?;
2086            Ok(())
2087        }
2088    }
2089
2090    impl fidl::encoding::ValueTypeMarker for InvalidSuperBlock {
2091        type Borrowed<'a> = &'a Self;
2092        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2093            value
2094        }
2095    }
2096
2097    unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlock {
2098        type Owned = Self;
2099
2100        #[inline(always)]
2101        fn inline_align(_context: fidl::encoding::Context) -> usize {
2102            8
2103        }
2104
2105        #[inline(always)]
2106        fn inline_size(_context: fidl::encoding::Context) -> usize {
2107            8
2108        }
2109        #[inline(always)]
2110        fn encode_is_copy() -> bool {
2111            true
2112        }
2113
2114        #[inline(always)]
2115        fn decode_is_copy() -> bool {
2116            true
2117        }
2118    }
2119
2120    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<InvalidSuperBlock, D>
2121        for &InvalidSuperBlock
2122    {
2123        #[inline]
2124        unsafe fn encode(
2125            self,
2126            encoder: &mut fidl::encoding::Encoder<'_, D>,
2127            offset: usize,
2128            _depth: fidl::encoding::Depth,
2129        ) -> fidl::Result<()> {
2130            encoder.debug_check_bounds::<InvalidSuperBlock>(offset);
2131            unsafe {
2132                // Copy the object into the buffer.
2133                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2134                (buf_ptr as *mut InvalidSuperBlock)
2135                    .write_unaligned((self as *const InvalidSuperBlock).read());
2136                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2137                // done second because the memcpy will write garbage to these bytes.
2138            }
2139            Ok(())
2140        }
2141    }
2142    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2143        fidl::encoding::Encode<InvalidSuperBlock, D> for (T0,)
2144    {
2145        #[inline]
2146        unsafe fn encode(
2147            self,
2148            encoder: &mut fidl::encoding::Encoder<'_, D>,
2149            offset: usize,
2150            depth: fidl::encoding::Depth,
2151        ) -> fidl::Result<()> {
2152            encoder.debug_check_bounds::<InvalidSuperBlock>(offset);
2153            // Zero out padding regions. There's no need to apply masks
2154            // because the unmasked parts will be overwritten by fields.
2155            // Write the fields.
2156            self.0.encode(encoder, offset + 0, depth)?;
2157            Ok(())
2158        }
2159    }
2160
2161    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for InvalidSuperBlock {
2162        #[inline(always)]
2163        fn new_empty() -> Self {
2164            Self { position: fidl::new_empty!(u64, D) }
2165        }
2166
2167        #[inline]
2168        unsafe fn decode(
2169            &mut self,
2170            decoder: &mut fidl::encoding::Decoder<'_, D>,
2171            offset: usize,
2172            _depth: fidl::encoding::Depth,
2173        ) -> fidl::Result<()> {
2174            decoder.debug_check_bounds::<Self>(offset);
2175            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2176            // Verify that padding bytes are zero.
2177            // Copy from the buffer into the object.
2178            unsafe {
2179                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2180            }
2181            Ok(())
2182        }
2183    }
2184
2185    impl fidl::encoding::ValueTypeMarker for InvalidSuperBlockMagic {
2186        type Borrowed<'a> = &'a Self;
2187        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2188            value
2189        }
2190    }
2191
2192    unsafe impl fidl::encoding::TypeMarker for InvalidSuperBlockMagic {
2193        type Owned = Self;
2194
2195        #[inline(always)]
2196        fn inline_align(_context: fidl::encoding::Context) -> usize {
2197            2
2198        }
2199
2200        #[inline(always)]
2201        fn inline_size(_context: fidl::encoding::Context) -> usize {
2202            2
2203        }
2204        #[inline(always)]
2205        fn encode_is_copy() -> bool {
2206            true
2207        }
2208
2209        #[inline(always)]
2210        fn decode_is_copy() -> bool {
2211            true
2212        }
2213    }
2214
2215    unsafe impl<D: fidl::encoding::ResourceDialect>
2216        fidl::encoding::Encode<InvalidSuperBlockMagic, D> for &InvalidSuperBlockMagic
2217    {
2218        #[inline]
2219        unsafe fn encode(
2220            self,
2221            encoder: &mut fidl::encoding::Encoder<'_, D>,
2222            offset: usize,
2223            _depth: fidl::encoding::Depth,
2224        ) -> fidl::Result<()> {
2225            encoder.debug_check_bounds::<InvalidSuperBlockMagic>(offset);
2226            unsafe {
2227                // Copy the object into the buffer.
2228                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2229                (buf_ptr as *mut InvalidSuperBlockMagic)
2230                    .write_unaligned((self as *const InvalidSuperBlockMagic).read());
2231                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2232                // done second because the memcpy will write garbage to these bytes.
2233            }
2234            Ok(())
2235        }
2236    }
2237    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u16, D>>
2238        fidl::encoding::Encode<InvalidSuperBlockMagic, D> for (T0,)
2239    {
2240        #[inline]
2241        unsafe fn encode(
2242            self,
2243            encoder: &mut fidl::encoding::Encoder<'_, D>,
2244            offset: usize,
2245            depth: fidl::encoding::Depth,
2246        ) -> fidl::Result<()> {
2247            encoder.debug_check_bounds::<InvalidSuperBlockMagic>(offset);
2248            // Zero out padding regions. There's no need to apply masks
2249            // because the unmasked parts will be overwritten by fields.
2250            // Write the fields.
2251            self.0.encode(encoder, offset + 0, depth)?;
2252            Ok(())
2253        }
2254    }
2255
2256    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2257        for InvalidSuperBlockMagic
2258    {
2259        #[inline(always)]
2260        fn new_empty() -> Self {
2261            Self { value: fidl::new_empty!(u16, D) }
2262        }
2263
2264        #[inline]
2265        unsafe fn decode(
2266            &mut self,
2267            decoder: &mut fidl::encoding::Decoder<'_, D>,
2268            offset: usize,
2269            _depth: fidl::encoding::Depth,
2270        ) -> fidl::Result<()> {
2271            decoder.debug_check_bounds::<Self>(offset);
2272            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2273            // Verify that padding bytes are zero.
2274            // Copy from the buffer into the object.
2275            unsafe {
2276                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 2);
2277            }
2278            Ok(())
2279        }
2280    }
2281
2282    impl fidl::encoding::ValueTypeMarker for PathNotFound {
2283        type Borrowed<'a> = &'a Self;
2284        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2285            value
2286        }
2287    }
2288
2289    unsafe impl fidl::encoding::TypeMarker for PathNotFound {
2290        type Owned = Self;
2291
2292        #[inline(always)]
2293        fn inline_align(_context: fidl::encoding::Context) -> usize {
2294            8
2295        }
2296
2297        #[inline(always)]
2298        fn inline_size(_context: fidl::encoding::Context) -> usize {
2299            16
2300        }
2301    }
2302
2303    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PathNotFound, D>
2304        for &PathNotFound
2305    {
2306        #[inline]
2307        unsafe fn encode(
2308            self,
2309            encoder: &mut fidl::encoding::Encoder<'_, D>,
2310            offset: usize,
2311            _depth: fidl::encoding::Depth,
2312        ) -> fidl::Result<()> {
2313            encoder.debug_check_bounds::<PathNotFound>(offset);
2314            // Delegate to tuple encoding.
2315            fidl::encoding::Encode::<PathNotFound, D>::encode(
2316                (<fidl::encoding::BoundedString<1024> as fidl::encoding::ValueTypeMarker>::borrow(
2317                    &self.path,
2318                ),),
2319                encoder,
2320                offset,
2321                _depth,
2322            )
2323        }
2324    }
2325    unsafe impl<
2326            D: fidl::encoding::ResourceDialect,
2327            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<1024>, D>,
2328        > fidl::encoding::Encode<PathNotFound, D> for (T0,)
2329    {
2330        #[inline]
2331        unsafe fn encode(
2332            self,
2333            encoder: &mut fidl::encoding::Encoder<'_, D>,
2334            offset: usize,
2335            depth: fidl::encoding::Depth,
2336        ) -> fidl::Result<()> {
2337            encoder.debug_check_bounds::<PathNotFound>(offset);
2338            // Zero out padding regions. There's no need to apply masks
2339            // because the unmasked parts will be overwritten by fields.
2340            // Write the fields.
2341            self.0.encode(encoder, offset + 0, depth)?;
2342            Ok(())
2343        }
2344    }
2345
2346    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PathNotFound {
2347        #[inline(always)]
2348        fn new_empty() -> Self {
2349            Self { path: fidl::new_empty!(fidl::encoding::BoundedString<1024>, D) }
2350        }
2351
2352        #[inline]
2353        unsafe fn decode(
2354            &mut self,
2355            decoder: &mut fidl::encoding::Decoder<'_, D>,
2356            offset: usize,
2357            _depth: fidl::encoding::Depth,
2358        ) -> fidl::Result<()> {
2359            decoder.debug_check_bounds::<Self>(offset);
2360            // Verify that padding bytes are zero.
2361            fidl::decode!(
2362                fidl::encoding::BoundedString<1024>,
2363                D,
2364                &mut self.path,
2365                decoder,
2366                offset + 0,
2367                _depth
2368            )?;
2369            Ok(())
2370        }
2371    }
2372
2373    impl fidl::encoding::ValueTypeMarker for ReaderOutOfBounds {
2374        type Borrowed<'a> = &'a Self;
2375        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2376            value
2377        }
2378    }
2379
2380    unsafe impl fidl::encoding::TypeMarker for ReaderOutOfBounds {
2381        type Owned = Self;
2382
2383        #[inline(always)]
2384        fn inline_align(_context: fidl::encoding::Context) -> usize {
2385            8
2386        }
2387
2388        #[inline(always)]
2389        fn inline_size(_context: fidl::encoding::Context) -> usize {
2390            16
2391        }
2392        #[inline(always)]
2393        fn encode_is_copy() -> bool {
2394            true
2395        }
2396
2397        #[inline(always)]
2398        fn decode_is_copy() -> bool {
2399            true
2400        }
2401    }
2402
2403    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReaderOutOfBounds, D>
2404        for &ReaderOutOfBounds
2405    {
2406        #[inline]
2407        unsafe fn encode(
2408            self,
2409            encoder: &mut fidl::encoding::Encoder<'_, D>,
2410            offset: usize,
2411            _depth: fidl::encoding::Depth,
2412        ) -> fidl::Result<()> {
2413            encoder.debug_check_bounds::<ReaderOutOfBounds>(offset);
2414            unsafe {
2415                // Copy the object into the buffer.
2416                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2417                (buf_ptr as *mut ReaderOutOfBounds)
2418                    .write_unaligned((self as *const ReaderOutOfBounds).read());
2419                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2420                // done second because the memcpy will write garbage to these bytes.
2421            }
2422            Ok(())
2423        }
2424    }
2425    unsafe impl<
2426            D: fidl::encoding::ResourceDialect,
2427            T0: fidl::encoding::Encode<u64, D>,
2428            T1: fidl::encoding::Encode<u64, D>,
2429        > fidl::encoding::Encode<ReaderOutOfBounds, D> for (T0, T1)
2430    {
2431        #[inline]
2432        unsafe fn encode(
2433            self,
2434            encoder: &mut fidl::encoding::Encoder<'_, D>,
2435            offset: usize,
2436            depth: fidl::encoding::Depth,
2437        ) -> fidl::Result<()> {
2438            encoder.debug_check_bounds::<ReaderOutOfBounds>(offset);
2439            // Zero out padding regions. There's no need to apply masks
2440            // because the unmasked parts will be overwritten by fields.
2441            // Write the fields.
2442            self.0.encode(encoder, offset + 0, depth)?;
2443            self.1.encode(encoder, offset + 8, depth)?;
2444            Ok(())
2445        }
2446    }
2447
2448    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReaderOutOfBounds {
2449        #[inline(always)]
2450        fn new_empty() -> Self {
2451            Self { position: fidl::new_empty!(u64, D), size: fidl::new_empty!(u64, D) }
2452        }
2453
2454        #[inline]
2455        unsafe fn decode(
2456            &mut self,
2457            decoder: &mut fidl::encoding::Decoder<'_, D>,
2458            offset: usize,
2459            _depth: fidl::encoding::Depth,
2460        ) -> fidl::Result<()> {
2461            decoder.debug_check_bounds::<Self>(offset);
2462            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2463            // Verify that padding bytes are zero.
2464            // Copy from the buffer into the object.
2465            unsafe {
2466                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2467            }
2468            Ok(())
2469        }
2470    }
2471
2472    impl fidl::encoding::ValueTypeMarker for ReaderReadError {
2473        type Borrowed<'a> = &'a Self;
2474        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2475            value
2476        }
2477    }
2478
2479    unsafe impl fidl::encoding::TypeMarker for ReaderReadError {
2480        type Owned = Self;
2481
2482        #[inline(always)]
2483        fn inline_align(_context: fidl::encoding::Context) -> usize {
2484            8
2485        }
2486
2487        #[inline(always)]
2488        fn inline_size(_context: fidl::encoding::Context) -> usize {
2489            8
2490        }
2491        #[inline(always)]
2492        fn encode_is_copy() -> bool {
2493            true
2494        }
2495
2496        #[inline(always)]
2497        fn decode_is_copy() -> bool {
2498            true
2499        }
2500    }
2501
2502    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ReaderReadError, D>
2503        for &ReaderReadError
2504    {
2505        #[inline]
2506        unsafe fn encode(
2507            self,
2508            encoder: &mut fidl::encoding::Encoder<'_, D>,
2509            offset: usize,
2510            _depth: fidl::encoding::Depth,
2511        ) -> fidl::Result<()> {
2512            encoder.debug_check_bounds::<ReaderReadError>(offset);
2513            unsafe {
2514                // Copy the object into the buffer.
2515                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2516                (buf_ptr as *mut ReaderReadError)
2517                    .write_unaligned((self as *const ReaderReadError).read());
2518                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2519                // done second because the memcpy will write garbage to these bytes.
2520            }
2521            Ok(())
2522        }
2523    }
2524    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2525        fidl::encoding::Encode<ReaderReadError, D> for (T0,)
2526    {
2527        #[inline]
2528        unsafe fn encode(
2529            self,
2530            encoder: &mut fidl::encoding::Encoder<'_, D>,
2531            offset: usize,
2532            depth: fidl::encoding::Depth,
2533        ) -> fidl::Result<()> {
2534            encoder.debug_check_bounds::<ReaderReadError>(offset);
2535            // Zero out padding regions. There's no need to apply masks
2536            // because the unmasked parts will be overwritten by fields.
2537            // Write the fields.
2538            self.0.encode(encoder, offset + 0, depth)?;
2539            Ok(())
2540        }
2541    }
2542
2543    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ReaderReadError {
2544        #[inline(always)]
2545        fn new_empty() -> Self {
2546            Self { position: fidl::new_empty!(u64, D) }
2547        }
2548
2549        #[inline]
2550        unsafe fn decode(
2551            &mut self,
2552            decoder: &mut fidl::encoding::Decoder<'_, D>,
2553            offset: usize,
2554            _depth: fidl::encoding::Depth,
2555        ) -> fidl::Result<()> {
2556            decoder.debug_check_bounds::<Self>(offset);
2557            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2558            // Verify that padding bytes are zero.
2559            // Copy from the buffer into the object.
2560            unsafe {
2561                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2562            }
2563            Ok(())
2564        }
2565    }
2566
2567    impl fidl::encoding::ValueTypeMarker for RequiredFeatureIncompat {
2568        type Borrowed<'a> = &'a Self;
2569        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2570            value
2571        }
2572    }
2573
2574    unsafe impl fidl::encoding::TypeMarker for RequiredFeatureIncompat {
2575        type Owned = Self;
2576
2577        #[inline(always)]
2578        fn inline_align(_context: fidl::encoding::Context) -> usize {
2579            4
2580        }
2581
2582        #[inline(always)]
2583        fn inline_size(_context: fidl::encoding::Context) -> usize {
2584            4
2585        }
2586        #[inline(always)]
2587        fn encode_is_copy() -> bool {
2588            true
2589        }
2590
2591        #[inline(always)]
2592        fn decode_is_copy() -> bool {
2593            true
2594        }
2595    }
2596
2597    unsafe impl<D: fidl::encoding::ResourceDialect>
2598        fidl::encoding::Encode<RequiredFeatureIncompat, D> for &RequiredFeatureIncompat
2599    {
2600        #[inline]
2601        unsafe fn encode(
2602            self,
2603            encoder: &mut fidl::encoding::Encoder<'_, D>,
2604            offset: usize,
2605            _depth: fidl::encoding::Depth,
2606        ) -> fidl::Result<()> {
2607            encoder.debug_check_bounds::<RequiredFeatureIncompat>(offset);
2608            unsafe {
2609                // Copy the object into the buffer.
2610                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2611                (buf_ptr as *mut RequiredFeatureIncompat)
2612                    .write_unaligned((self as *const RequiredFeatureIncompat).read());
2613                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2614                // done second because the memcpy will write garbage to these bytes.
2615            }
2616            Ok(())
2617        }
2618    }
2619    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
2620        fidl::encoding::Encode<RequiredFeatureIncompat, D> for (T0,)
2621    {
2622        #[inline]
2623        unsafe fn encode(
2624            self,
2625            encoder: &mut fidl::encoding::Encoder<'_, D>,
2626            offset: usize,
2627            depth: fidl::encoding::Depth,
2628        ) -> fidl::Result<()> {
2629            encoder.debug_check_bounds::<RequiredFeatureIncompat>(offset);
2630            // Zero out padding regions. There's no need to apply masks
2631            // because the unmasked parts will be overwritten by fields.
2632            // Write the fields.
2633            self.0.encode(encoder, offset + 0, depth)?;
2634            Ok(())
2635        }
2636    }
2637
2638    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2639        for RequiredFeatureIncompat
2640    {
2641        #[inline(always)]
2642        fn new_empty() -> Self {
2643            Self { value: fidl::new_empty!(u32, D) }
2644        }
2645
2646        #[inline]
2647        unsafe fn decode(
2648            &mut self,
2649            decoder: &mut fidl::encoding::Decoder<'_, D>,
2650            offset: usize,
2651            _depth: fidl::encoding::Depth,
2652        ) -> fidl::Result<()> {
2653            decoder.debug_check_bounds::<Self>(offset);
2654            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2655            // Verify that padding bytes are zero.
2656            // Copy from the buffer into the object.
2657            unsafe {
2658                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
2659            }
2660            Ok(())
2661        }
2662    }
2663
2664    impl fidl::encoding::ValueTypeMarker for ServerMountVmoResponse {
2665        type Borrowed<'a> = &'a Self;
2666        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2667            value
2668        }
2669    }
2670
2671    unsafe impl fidl::encoding::TypeMarker for ServerMountVmoResponse {
2672        type Owned = Self;
2673
2674        #[inline(always)]
2675        fn inline_align(_context: fidl::encoding::Context) -> usize {
2676            8
2677        }
2678
2679        #[inline(always)]
2680        fn inline_size(_context: fidl::encoding::Context) -> usize {
2681            16
2682        }
2683    }
2684
2685    unsafe impl<D: fidl::encoding::ResourceDialect>
2686        fidl::encoding::Encode<ServerMountVmoResponse, D> for &ServerMountVmoResponse
2687    {
2688        #[inline]
2689        unsafe fn encode(
2690            self,
2691            encoder: &mut fidl::encoding::Encoder<'_, D>,
2692            offset: usize,
2693            _depth: fidl::encoding::Depth,
2694        ) -> fidl::Result<()> {
2695            encoder.debug_check_bounds::<ServerMountVmoResponse>(offset);
2696            // Delegate to tuple encoding.
2697            fidl::encoding::Encode::<ServerMountVmoResponse, D>::encode(
2698                (<MountVmoResult as fidl::encoding::ValueTypeMarker>::borrow(&self.result),),
2699                encoder,
2700                offset,
2701                _depth,
2702            )
2703        }
2704    }
2705    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<MountVmoResult, D>>
2706        fidl::encoding::Encode<ServerMountVmoResponse, D> for (T0,)
2707    {
2708        #[inline]
2709        unsafe fn encode(
2710            self,
2711            encoder: &mut fidl::encoding::Encoder<'_, D>,
2712            offset: usize,
2713            depth: fidl::encoding::Depth,
2714        ) -> fidl::Result<()> {
2715            encoder.debug_check_bounds::<ServerMountVmoResponse>(offset);
2716            // Zero out padding regions. There's no need to apply masks
2717            // because the unmasked parts will be overwritten by fields.
2718            // Write the fields.
2719            self.0.encode(encoder, offset + 0, depth)?;
2720            Ok(())
2721        }
2722    }
2723
2724    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2725        for ServerMountVmoResponse
2726    {
2727        #[inline(always)]
2728        fn new_empty() -> Self {
2729            Self { result: fidl::new_empty!(MountVmoResult, D) }
2730        }
2731
2732        #[inline]
2733        unsafe fn decode(
2734            &mut self,
2735            decoder: &mut fidl::encoding::Decoder<'_, D>,
2736            offset: usize,
2737            _depth: fidl::encoding::Depth,
2738        ) -> fidl::Result<()> {
2739            decoder.debug_check_bounds::<Self>(offset);
2740            // Verify that padding bytes are zero.
2741            fidl::decode!(MountVmoResult, D, &mut self.result, decoder, offset + 0, _depth)?;
2742            Ok(())
2743        }
2744    }
2745
2746    impl fidl::encoding::ValueTypeMarker for Success {
2747        type Borrowed<'a> = &'a Self;
2748        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2749            value
2750        }
2751    }
2752
2753    unsafe impl fidl::encoding::TypeMarker for Success {
2754        type Owned = Self;
2755
2756        #[inline(always)]
2757        fn inline_align(_context: fidl::encoding::Context) -> usize {
2758            1
2759        }
2760
2761        #[inline(always)]
2762        fn inline_size(_context: fidl::encoding::Context) -> usize {
2763            1
2764        }
2765    }
2766
2767    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Success, D> for &Success {
2768        #[inline]
2769        unsafe fn encode(
2770            self,
2771            encoder: &mut fidl::encoding::Encoder<'_, D>,
2772            offset: usize,
2773            _depth: fidl::encoding::Depth,
2774        ) -> fidl::Result<()> {
2775            encoder.debug_check_bounds::<Success>(offset);
2776            encoder.write_num(0u8, offset);
2777            Ok(())
2778        }
2779    }
2780
2781    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Success {
2782        #[inline(always)]
2783        fn new_empty() -> Self {
2784            Self
2785        }
2786
2787        #[inline]
2788        unsafe fn decode(
2789            &mut self,
2790            decoder: &mut fidl::encoding::Decoder<'_, D>,
2791            offset: usize,
2792            _depth: fidl::encoding::Depth,
2793        ) -> fidl::Result<()> {
2794            decoder.debug_check_bounds::<Self>(offset);
2795            match decoder.read_num::<u8>(offset) {
2796                0 => Ok(()),
2797                _ => Err(fidl::Error::Invalid),
2798            }
2799        }
2800    }
2801
2802    impl fidl::encoding::ValueTypeMarker for MountVmoResult {
2803        type Borrowed<'a> = &'a Self;
2804        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2805            value
2806        }
2807    }
2808
2809    unsafe impl fidl::encoding::TypeMarker for MountVmoResult {
2810        type Owned = Self;
2811
2812        #[inline(always)]
2813        fn inline_align(_context: fidl::encoding::Context) -> usize {
2814            8
2815        }
2816
2817        #[inline(always)]
2818        fn inline_size(_context: fidl::encoding::Context) -> usize {
2819            16
2820        }
2821    }
2822
2823    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MountVmoResult, D>
2824        for &MountVmoResult
2825    {
2826        #[inline]
2827        unsafe fn encode(
2828            self,
2829            encoder: &mut fidl::encoding::Encoder<'_, D>,
2830            offset: usize,
2831            _depth: fidl::encoding::Depth,
2832        ) -> fidl::Result<()> {
2833            encoder.debug_check_bounds::<MountVmoResult>(offset);
2834            encoder.write_num::<u64>(self.ordinal(), offset);
2835            match self {
2836                MountVmoResult::Success(ref val) => {
2837                    fidl::encoding::encode_in_envelope::<Success, D>(
2838                        <Success as fidl::encoding::ValueTypeMarker>::borrow(val),
2839                        encoder,
2840                        offset + 8,
2841                        _depth,
2842                    )
2843                }
2844                MountVmoResult::VmoReadFailure(ref val) => {
2845                    fidl::encoding::encode_in_envelope::<i32, D>(
2846                        <i32 as fidl::encoding::ValueTypeMarker>::borrow(val),
2847                        encoder,
2848                        offset + 8,
2849                        _depth,
2850                    )
2851                }
2852                MountVmoResult::ParseError(ref val) => {
2853                    fidl::encoding::encode_in_envelope::<ParseError, D>(
2854                        <ParseError as fidl::encoding::ValueTypeMarker>::borrow(val),
2855                        encoder,
2856                        offset + 8,
2857                        _depth,
2858                    )
2859                }
2860                MountVmoResult::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
2861            }
2862        }
2863    }
2864
2865    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MountVmoResult {
2866        #[inline(always)]
2867        fn new_empty() -> Self {
2868            Self::__SourceBreaking { unknown_ordinal: 0 }
2869        }
2870
2871        #[inline]
2872        unsafe fn decode(
2873            &mut self,
2874            decoder: &mut fidl::encoding::Decoder<'_, D>,
2875            offset: usize,
2876            mut depth: fidl::encoding::Depth,
2877        ) -> fidl::Result<()> {
2878            decoder.debug_check_bounds::<Self>(offset);
2879            #[allow(unused_variables)]
2880            let next_out_of_line = decoder.next_out_of_line();
2881            let handles_before = decoder.remaining_handles();
2882            let (ordinal, inlined, num_bytes, num_handles) =
2883                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
2884
2885            let member_inline_size = match ordinal {
2886                1 => <Success as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2887                2 => <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2888                3 => <ParseError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
2889                0 => return Err(fidl::Error::UnknownUnionTag),
2890                _ => num_bytes as usize,
2891            };
2892
2893            if inlined != (member_inline_size <= 4) {
2894                return Err(fidl::Error::InvalidInlineBitInEnvelope);
2895            }
2896            let _inner_offset;
2897            if inlined {
2898                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
2899                _inner_offset = offset + 8;
2900            } else {
2901                depth.increment()?;
2902                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2903            }
2904            match ordinal {
2905                1 => {
2906                    #[allow(irrefutable_let_patterns)]
2907                    if let MountVmoResult::Success(_) = self {
2908                        // Do nothing, read the value into the object
2909                    } else {
2910                        // Initialize `self` to the right variant
2911                        *self = MountVmoResult::Success(fidl::new_empty!(Success, D));
2912                    }
2913                    #[allow(irrefutable_let_patterns)]
2914                    if let MountVmoResult::Success(ref mut val) = self {
2915                        fidl::decode!(Success, D, val, decoder, _inner_offset, depth)?;
2916                    } else {
2917                        unreachable!()
2918                    }
2919                }
2920                2 => {
2921                    #[allow(irrefutable_let_patterns)]
2922                    if let MountVmoResult::VmoReadFailure(_) = self {
2923                        // Do nothing, read the value into the object
2924                    } else {
2925                        // Initialize `self` to the right variant
2926                        *self = MountVmoResult::VmoReadFailure(fidl::new_empty!(i32, D));
2927                    }
2928                    #[allow(irrefutable_let_patterns)]
2929                    if let MountVmoResult::VmoReadFailure(ref mut val) = self {
2930                        fidl::decode!(i32, D, val, decoder, _inner_offset, depth)?;
2931                    } else {
2932                        unreachable!()
2933                    }
2934                }
2935                3 => {
2936                    #[allow(irrefutable_let_patterns)]
2937                    if let MountVmoResult::ParseError(_) = self {
2938                        // Do nothing, read the value into the object
2939                    } else {
2940                        // Initialize `self` to the right variant
2941                        *self = MountVmoResult::ParseError(fidl::new_empty!(ParseError, D));
2942                    }
2943                    #[allow(irrefutable_let_patterns)]
2944                    if let MountVmoResult::ParseError(ref mut val) = self {
2945                        fidl::decode!(ParseError, D, val, decoder, _inner_offset, depth)?;
2946                    } else {
2947                        unreachable!()
2948                    }
2949                }
2950                #[allow(deprecated)]
2951                ordinal => {
2952                    for _ in 0..num_handles {
2953                        decoder.drop_next_handle()?;
2954                    }
2955                    *self = MountVmoResult::__SourceBreaking { unknown_ordinal: ordinal };
2956                }
2957            }
2958            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
2959                return Err(fidl::Error::InvalidNumBytesInEnvelope);
2960            }
2961            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2962                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2963            }
2964            Ok(())
2965        }
2966    }
2967
2968    impl fidl::encoding::ValueTypeMarker for ParseError {
2969        type Borrowed<'a> = &'a Self;
2970        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2971            value
2972        }
2973    }
2974
2975    unsafe impl fidl::encoding::TypeMarker for ParseError {
2976        type Owned = Self;
2977
2978        #[inline(always)]
2979        fn inline_align(_context: fidl::encoding::Context) -> usize {
2980            8
2981        }
2982
2983        #[inline(always)]
2984        fn inline_size(_context: fidl::encoding::Context) -> usize {
2985            16
2986        }
2987    }
2988
2989    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ParseError, D>
2990        for &ParseError
2991    {
2992        #[inline]
2993        unsafe fn encode(
2994            self,
2995            encoder: &mut fidl::encoding::Encoder<'_, D>,
2996            offset: usize,
2997            _depth: fidl::encoding::Depth,
2998        ) -> fidl::Result<()> {
2999            encoder.debug_check_bounds::<ParseError>(offset);
3000            encoder.write_num::<u64>(self.ordinal(), offset);
3001            match self {
3002                ParseError::InvalidSuperBlock(ref val) => {
3003                    fidl::encoding::encode_in_envelope::<InvalidSuperBlock, D>(
3004                        <InvalidSuperBlock as fidl::encoding::ValueTypeMarker>::borrow(val),
3005                        encoder,
3006                        offset + 8,
3007                        _depth,
3008                    )
3009                }
3010                ParseError::InvalidSuperBlockMagic(ref val) => {
3011                    fidl::encoding::encode_in_envelope::<InvalidSuperBlockMagic, D>(
3012                        <InvalidSuperBlockMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
3013                        encoder,
3014                        offset + 8,
3015                        _depth,
3016                    )
3017                }
3018                ParseError::BlockNumberOutOfBounds(ref val) => {
3019                    fidl::encoding::encode_in_envelope::<BlockNumberOutOfBounds, D>(
3020                        <BlockNumberOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
3021                        encoder,
3022                        offset + 8,
3023                        _depth,
3024                    )
3025                }
3026                ParseError::BlockSizeInvalid(ref val) => {
3027                    fidl::encoding::encode_in_envelope::<BlockSizeInvalid, D>(
3028                        <BlockSizeInvalid as fidl::encoding::ValueTypeMarker>::borrow(val),
3029                        encoder,
3030                        offset + 8,
3031                        _depth,
3032                    )
3033                }
3034                ParseError::InvalidBlockGroupDesc(ref val) => {
3035                    fidl::encoding::encode_in_envelope::<InvalidBlockGroupDesc, D>(
3036                        <InvalidBlockGroupDesc as fidl::encoding::ValueTypeMarker>::borrow(val),
3037                        encoder,
3038                        offset + 8,
3039                        _depth,
3040                    )
3041                }
3042                ParseError::InvalidInode(ref val) => {
3043                    fidl::encoding::encode_in_envelope::<InvalidINode, D>(
3044                        <InvalidINode as fidl::encoding::ValueTypeMarker>::borrow(val),
3045                        encoder,
3046                        offset + 8,
3047                        _depth,
3048                    )
3049                }
3050                ParseError::InvalidExtentHeader(ref val) => {
3051                    fidl::encoding::encode_in_envelope::<InvalidExtentHeader, D>(
3052                        <InvalidExtentHeader as fidl::encoding::ValueTypeMarker>::borrow(val),
3053                        encoder,
3054                        offset + 8,
3055                        _depth,
3056                    )
3057                }
3058                ParseError::InvalidExtentHeaderMagic(ref val) => {
3059                    fidl::encoding::encode_in_envelope::<InvalidExtentHeaderMagic, D>(
3060                        <InvalidExtentHeaderMagic as fidl::encoding::ValueTypeMarker>::borrow(val),
3061                        encoder,
3062                        offset + 8,
3063                        _depth,
3064                    )
3065                }
3066                ParseError::InvalidExtent(ref val) => {
3067                    fidl::encoding::encode_in_envelope::<InvalidExtent, D>(
3068                        <InvalidExtent as fidl::encoding::ValueTypeMarker>::borrow(val),
3069                        encoder,
3070                        offset + 8,
3071                        _depth,
3072                    )
3073                }
3074                ParseError::ExtentUnexpectedLength(ref val) => {
3075                    fidl::encoding::encode_in_envelope::<ExtentUnexpectedLength, D>(
3076                        <ExtentUnexpectedLength as fidl::encoding::ValueTypeMarker>::borrow(val),
3077                        encoder,
3078                        offset + 8,
3079                        _depth,
3080                    )
3081                }
3082                ParseError::InvalidDirEntry2(ref val) => {
3083                    fidl::encoding::encode_in_envelope::<InvalidDirEntry2, D>(
3084                        <InvalidDirEntry2 as fidl::encoding::ValueTypeMarker>::borrow(val),
3085                        encoder,
3086                        offset + 8,
3087                        _depth,
3088                    )
3089                }
3090                ParseError::DirEntry2NonUtf8(ref val) => {
3091                    fidl::encoding::encode_in_envelope::<DirEntry2NonUtf8, D>(
3092                        <DirEntry2NonUtf8 as fidl::encoding::ValueTypeMarker>::borrow(val),
3093                        encoder,
3094                        offset + 8,
3095                        _depth,
3096                    )
3097                }
3098                ParseError::InvalidInputPath(ref val) => {
3099                    fidl::encoding::encode_in_envelope::<InvalidInputPath, D>(
3100                        <InvalidInputPath as fidl::encoding::ValueTypeMarker>::borrow(val),
3101                        encoder,
3102                        offset + 8,
3103                        _depth,
3104                    )
3105                }
3106                ParseError::PathNotFound(ref val) => {
3107                    fidl::encoding::encode_in_envelope::<PathNotFound, D>(
3108                        <PathNotFound as fidl::encoding::ValueTypeMarker>::borrow(val),
3109                        encoder,
3110                        offset + 8,
3111                        _depth,
3112                    )
3113                }
3114                ParseError::BadEntryType(ref val) => {
3115                    fidl::encoding::encode_in_envelope::<BadEntryType, D>(
3116                        <BadEntryType as fidl::encoding::ValueTypeMarker>::borrow(val),
3117                        encoder,
3118                        offset + 8,
3119                        _depth,
3120                    )
3121                }
3122                ParseError::Incompatible(ref val) => {
3123                    fidl::encoding::encode_in_envelope::<Incompatible, D>(
3124                        <Incompatible as fidl::encoding::ValueTypeMarker>::borrow(val),
3125                        encoder,
3126                        offset + 8,
3127                        _depth,
3128                    )
3129                }
3130                ParseError::BadFile(ref val) => fidl::encoding::encode_in_envelope::<BadFile, D>(
3131                    <BadFile as fidl::encoding::ValueTypeMarker>::borrow(val),
3132                    encoder,
3133                    offset + 8,
3134                    _depth,
3135                ),
3136                ParseError::BadDirectory(ref val) => {
3137                    fidl::encoding::encode_in_envelope::<BadDirectory, D>(
3138                        <BadDirectory as fidl::encoding::ValueTypeMarker>::borrow(val),
3139                        encoder,
3140                        offset + 8,
3141                        _depth,
3142                    )
3143                }
3144                ParseError::ReaderReadError(ref val) => {
3145                    fidl::encoding::encode_in_envelope::<ReaderReadError, D>(
3146                        <ReaderReadError as fidl::encoding::ValueTypeMarker>::borrow(val),
3147                        encoder,
3148                        offset + 8,
3149                        _depth,
3150                    )
3151                }
3152                ParseError::ReaderOutOfBounds(ref val) => {
3153                    fidl::encoding::encode_in_envelope::<ReaderOutOfBounds, D>(
3154                        <ReaderOutOfBounds as fidl::encoding::ValueTypeMarker>::borrow(val),
3155                        encoder,
3156                        offset + 8,
3157                        _depth,
3158                    )
3159                }
3160                ParseError::RequiredFeatureIncompat(ref val) => {
3161                    fidl::encoding::encode_in_envelope::<RequiredFeatureIncompat, D>(
3162                        <RequiredFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
3163                        encoder,
3164                        offset + 8,
3165                        _depth,
3166                    )
3167                }
3168                ParseError::BannedFeatureIncompat(ref val) => {
3169                    fidl::encoding::encode_in_envelope::<BannedFeatureIncompat, D>(
3170                        <BannedFeatureIncompat as fidl::encoding::ValueTypeMarker>::borrow(val),
3171                        encoder,
3172                        offset + 8,
3173                        _depth,
3174                    )
3175                }
3176                ParseError::InvalidAddress(ref val) => {
3177                    fidl::encoding::encode_in_envelope::<InvalidAddress, D>(
3178                        <InvalidAddress as fidl::encoding::ValueTypeMarker>::borrow(val),
3179                        encoder,
3180                        offset + 8,
3181                        _depth,
3182                    )
3183                }
3184                ParseError::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
3185            }
3186        }
3187    }
3188
3189    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ParseError {
3190        #[inline(always)]
3191        fn new_empty() -> Self {
3192            Self::__SourceBreaking { unknown_ordinal: 0 }
3193        }
3194
3195        #[inline]
3196        unsafe fn decode(
3197            &mut self,
3198            decoder: &mut fidl::encoding::Decoder<'_, D>,
3199            offset: usize,
3200            mut depth: fidl::encoding::Depth,
3201        ) -> fidl::Result<()> {
3202            decoder.debug_check_bounds::<Self>(offset);
3203            #[allow(unused_variables)]
3204            let next_out_of_line = decoder.next_out_of_line();
3205            let handles_before = decoder.remaining_handles();
3206            let (ordinal, inlined, num_bytes, num_handles) =
3207                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
3208
3209            let member_inline_size = match ordinal {
3210                1 => {
3211                    <InvalidSuperBlock as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3212                }
3213                2 => <InvalidSuperBlockMagic as fidl::encoding::TypeMarker>::inline_size(
3214                    decoder.context,
3215                ),
3216                3 => <BlockNumberOutOfBounds as fidl::encoding::TypeMarker>::inline_size(
3217                    decoder.context,
3218                ),
3219                4 => <BlockSizeInvalid as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3220                5 => <InvalidBlockGroupDesc as fidl::encoding::TypeMarker>::inline_size(
3221                    decoder.context,
3222                ),
3223                6 => <InvalidINode as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3224                7 => <InvalidExtentHeader as fidl::encoding::TypeMarker>::inline_size(
3225                    decoder.context,
3226                ),
3227                8 => <InvalidExtentHeaderMagic as fidl::encoding::TypeMarker>::inline_size(
3228                    decoder.context,
3229                ),
3230                9 => <InvalidExtent as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3231                10 => <ExtentUnexpectedLength as fidl::encoding::TypeMarker>::inline_size(
3232                    decoder.context,
3233                ),
3234                11 => {
3235                    <InvalidDirEntry2 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3236                }
3237                12 => {
3238                    <DirEntry2NonUtf8 as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3239                }
3240                13 => {
3241                    <InvalidInputPath as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3242                }
3243                14 => <PathNotFound as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3244                15 => <BadEntryType as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3245                16 => <Incompatible as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3246                17 => <BadFile as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3247                18 => <BadDirectory as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3248                19 => <ReaderReadError as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3249                20 => {
3250                    <ReaderOutOfBounds as fidl::encoding::TypeMarker>::inline_size(decoder.context)
3251                }
3252                21 => <RequiredFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
3253                    decoder.context,
3254                ),
3255                22 => <BannedFeatureIncompat as fidl::encoding::TypeMarker>::inline_size(
3256                    decoder.context,
3257                ),
3258                23 => <InvalidAddress as fidl::encoding::TypeMarker>::inline_size(decoder.context),
3259                0 => return Err(fidl::Error::UnknownUnionTag),
3260                _ => num_bytes as usize,
3261            };
3262
3263            if inlined != (member_inline_size <= 4) {
3264                return Err(fidl::Error::InvalidInlineBitInEnvelope);
3265            }
3266            let _inner_offset;
3267            if inlined {
3268                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
3269                _inner_offset = offset + 8;
3270            } else {
3271                depth.increment()?;
3272                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3273            }
3274            match ordinal {
3275                1 => {
3276                    #[allow(irrefutable_let_patterns)]
3277                    if let ParseError::InvalidSuperBlock(_) = self {
3278                        // Do nothing, read the value into the object
3279                    } else {
3280                        // Initialize `self` to the right variant
3281                        *self =
3282                            ParseError::InvalidSuperBlock(fidl::new_empty!(InvalidSuperBlock, D));
3283                    }
3284                    #[allow(irrefutable_let_patterns)]
3285                    if let ParseError::InvalidSuperBlock(ref mut val) = self {
3286                        fidl::decode!(InvalidSuperBlock, D, val, decoder, _inner_offset, depth)?;
3287                    } else {
3288                        unreachable!()
3289                    }
3290                }
3291                2 => {
3292                    #[allow(irrefutable_let_patterns)]
3293                    if let ParseError::InvalidSuperBlockMagic(_) = self {
3294                        // Do nothing, read the value into the object
3295                    } else {
3296                        // Initialize `self` to the right variant
3297                        *self = ParseError::InvalidSuperBlockMagic(fidl::new_empty!(
3298                            InvalidSuperBlockMagic,
3299                            D
3300                        ));
3301                    }
3302                    #[allow(irrefutable_let_patterns)]
3303                    if let ParseError::InvalidSuperBlockMagic(ref mut val) = self {
3304                        fidl::decode!(
3305                            InvalidSuperBlockMagic,
3306                            D,
3307                            val,
3308                            decoder,
3309                            _inner_offset,
3310                            depth
3311                        )?;
3312                    } else {
3313                        unreachable!()
3314                    }
3315                }
3316                3 => {
3317                    #[allow(irrefutable_let_patterns)]
3318                    if let ParseError::BlockNumberOutOfBounds(_) = self {
3319                        // Do nothing, read the value into the object
3320                    } else {
3321                        // Initialize `self` to the right variant
3322                        *self = ParseError::BlockNumberOutOfBounds(fidl::new_empty!(
3323                            BlockNumberOutOfBounds,
3324                            D
3325                        ));
3326                    }
3327                    #[allow(irrefutable_let_patterns)]
3328                    if let ParseError::BlockNumberOutOfBounds(ref mut val) = self {
3329                        fidl::decode!(
3330                            BlockNumberOutOfBounds,
3331                            D,
3332                            val,
3333                            decoder,
3334                            _inner_offset,
3335                            depth
3336                        )?;
3337                    } else {
3338                        unreachable!()
3339                    }
3340                }
3341                4 => {
3342                    #[allow(irrefutable_let_patterns)]
3343                    if let ParseError::BlockSizeInvalid(_) = self {
3344                        // Do nothing, read the value into the object
3345                    } else {
3346                        // Initialize `self` to the right variant
3347                        *self = ParseError::BlockSizeInvalid(fidl::new_empty!(BlockSizeInvalid, D));
3348                    }
3349                    #[allow(irrefutable_let_patterns)]
3350                    if let ParseError::BlockSizeInvalid(ref mut val) = self {
3351                        fidl::decode!(BlockSizeInvalid, D, val, decoder, _inner_offset, depth)?;
3352                    } else {
3353                        unreachable!()
3354                    }
3355                }
3356                5 => {
3357                    #[allow(irrefutable_let_patterns)]
3358                    if let ParseError::InvalidBlockGroupDesc(_) = self {
3359                        // Do nothing, read the value into the object
3360                    } else {
3361                        // Initialize `self` to the right variant
3362                        *self = ParseError::InvalidBlockGroupDesc(fidl::new_empty!(
3363                            InvalidBlockGroupDesc,
3364                            D
3365                        ));
3366                    }
3367                    #[allow(irrefutable_let_patterns)]
3368                    if let ParseError::InvalidBlockGroupDesc(ref mut val) = self {
3369                        fidl::decode!(
3370                            InvalidBlockGroupDesc,
3371                            D,
3372                            val,
3373                            decoder,
3374                            _inner_offset,
3375                            depth
3376                        )?;
3377                    } else {
3378                        unreachable!()
3379                    }
3380                }
3381                6 => {
3382                    #[allow(irrefutable_let_patterns)]
3383                    if let ParseError::InvalidInode(_) = self {
3384                        // Do nothing, read the value into the object
3385                    } else {
3386                        // Initialize `self` to the right variant
3387                        *self = ParseError::InvalidInode(fidl::new_empty!(InvalidINode, D));
3388                    }
3389                    #[allow(irrefutable_let_patterns)]
3390                    if let ParseError::InvalidInode(ref mut val) = self {
3391                        fidl::decode!(InvalidINode, D, val, decoder, _inner_offset, depth)?;
3392                    } else {
3393                        unreachable!()
3394                    }
3395                }
3396                7 => {
3397                    #[allow(irrefutable_let_patterns)]
3398                    if let ParseError::InvalidExtentHeader(_) = self {
3399                        // Do nothing, read the value into the object
3400                    } else {
3401                        // Initialize `self` to the right variant
3402                        *self = ParseError::InvalidExtentHeader(fidl::new_empty!(
3403                            InvalidExtentHeader,
3404                            D
3405                        ));
3406                    }
3407                    #[allow(irrefutable_let_patterns)]
3408                    if let ParseError::InvalidExtentHeader(ref mut val) = self {
3409                        fidl::decode!(InvalidExtentHeader, D, val, decoder, _inner_offset, depth)?;
3410                    } else {
3411                        unreachable!()
3412                    }
3413                }
3414                8 => {
3415                    #[allow(irrefutable_let_patterns)]
3416                    if let ParseError::InvalidExtentHeaderMagic(_) = self {
3417                        // Do nothing, read the value into the object
3418                    } else {
3419                        // Initialize `self` to the right variant
3420                        *self = ParseError::InvalidExtentHeaderMagic(fidl::new_empty!(
3421                            InvalidExtentHeaderMagic,
3422                            D
3423                        ));
3424                    }
3425                    #[allow(irrefutable_let_patterns)]
3426                    if let ParseError::InvalidExtentHeaderMagic(ref mut val) = self {
3427                        fidl::decode!(
3428                            InvalidExtentHeaderMagic,
3429                            D,
3430                            val,
3431                            decoder,
3432                            _inner_offset,
3433                            depth
3434                        )?;
3435                    } else {
3436                        unreachable!()
3437                    }
3438                }
3439                9 => {
3440                    #[allow(irrefutable_let_patterns)]
3441                    if let ParseError::InvalidExtent(_) = self {
3442                        // Do nothing, read the value into the object
3443                    } else {
3444                        // Initialize `self` to the right variant
3445                        *self = ParseError::InvalidExtent(fidl::new_empty!(InvalidExtent, D));
3446                    }
3447                    #[allow(irrefutable_let_patterns)]
3448                    if let ParseError::InvalidExtent(ref mut val) = self {
3449                        fidl::decode!(InvalidExtent, D, val, decoder, _inner_offset, depth)?;
3450                    } else {
3451                        unreachable!()
3452                    }
3453                }
3454                10 => {
3455                    #[allow(irrefutable_let_patterns)]
3456                    if let ParseError::ExtentUnexpectedLength(_) = self {
3457                        // Do nothing, read the value into the object
3458                    } else {
3459                        // Initialize `self` to the right variant
3460                        *self = ParseError::ExtentUnexpectedLength(fidl::new_empty!(
3461                            ExtentUnexpectedLength,
3462                            D
3463                        ));
3464                    }
3465                    #[allow(irrefutable_let_patterns)]
3466                    if let ParseError::ExtentUnexpectedLength(ref mut val) = self {
3467                        fidl::decode!(
3468                            ExtentUnexpectedLength,
3469                            D,
3470                            val,
3471                            decoder,
3472                            _inner_offset,
3473                            depth
3474                        )?;
3475                    } else {
3476                        unreachable!()
3477                    }
3478                }
3479                11 => {
3480                    #[allow(irrefutable_let_patterns)]
3481                    if let ParseError::InvalidDirEntry2(_) = self {
3482                        // Do nothing, read the value into the object
3483                    } else {
3484                        // Initialize `self` to the right variant
3485                        *self = ParseError::InvalidDirEntry2(fidl::new_empty!(InvalidDirEntry2, D));
3486                    }
3487                    #[allow(irrefutable_let_patterns)]
3488                    if let ParseError::InvalidDirEntry2(ref mut val) = self {
3489                        fidl::decode!(InvalidDirEntry2, D, val, decoder, _inner_offset, depth)?;
3490                    } else {
3491                        unreachable!()
3492                    }
3493                }
3494                12 => {
3495                    #[allow(irrefutable_let_patterns)]
3496                    if let ParseError::DirEntry2NonUtf8(_) = self {
3497                        // Do nothing, read the value into the object
3498                    } else {
3499                        // Initialize `self` to the right variant
3500                        *self = ParseError::DirEntry2NonUtf8(fidl::new_empty!(DirEntry2NonUtf8, D));
3501                    }
3502                    #[allow(irrefutable_let_patterns)]
3503                    if let ParseError::DirEntry2NonUtf8(ref mut val) = self {
3504                        fidl::decode!(DirEntry2NonUtf8, D, val, decoder, _inner_offset, depth)?;
3505                    } else {
3506                        unreachable!()
3507                    }
3508                }
3509                13 => {
3510                    #[allow(irrefutable_let_patterns)]
3511                    if let ParseError::InvalidInputPath(_) = self {
3512                        // Do nothing, read the value into the object
3513                    } else {
3514                        // Initialize `self` to the right variant
3515                        *self = ParseError::InvalidInputPath(fidl::new_empty!(InvalidInputPath, D));
3516                    }
3517                    #[allow(irrefutable_let_patterns)]
3518                    if let ParseError::InvalidInputPath(ref mut val) = self {
3519                        fidl::decode!(InvalidInputPath, D, val, decoder, _inner_offset, depth)?;
3520                    } else {
3521                        unreachable!()
3522                    }
3523                }
3524                14 => {
3525                    #[allow(irrefutable_let_patterns)]
3526                    if let ParseError::PathNotFound(_) = self {
3527                        // Do nothing, read the value into the object
3528                    } else {
3529                        // Initialize `self` to the right variant
3530                        *self = ParseError::PathNotFound(fidl::new_empty!(PathNotFound, D));
3531                    }
3532                    #[allow(irrefutable_let_patterns)]
3533                    if let ParseError::PathNotFound(ref mut val) = self {
3534                        fidl::decode!(PathNotFound, D, val, decoder, _inner_offset, depth)?;
3535                    } else {
3536                        unreachable!()
3537                    }
3538                }
3539                15 => {
3540                    #[allow(irrefutable_let_patterns)]
3541                    if let ParseError::BadEntryType(_) = self {
3542                        // Do nothing, read the value into the object
3543                    } else {
3544                        // Initialize `self` to the right variant
3545                        *self = ParseError::BadEntryType(fidl::new_empty!(BadEntryType, D));
3546                    }
3547                    #[allow(irrefutable_let_patterns)]
3548                    if let ParseError::BadEntryType(ref mut val) = self {
3549                        fidl::decode!(BadEntryType, D, val, decoder, _inner_offset, depth)?;
3550                    } else {
3551                        unreachable!()
3552                    }
3553                }
3554                16 => {
3555                    #[allow(irrefutable_let_patterns)]
3556                    if let ParseError::Incompatible(_) = self {
3557                        // Do nothing, read the value into the object
3558                    } else {
3559                        // Initialize `self` to the right variant
3560                        *self = ParseError::Incompatible(fidl::new_empty!(Incompatible, D));
3561                    }
3562                    #[allow(irrefutable_let_patterns)]
3563                    if let ParseError::Incompatible(ref mut val) = self {
3564                        fidl::decode!(Incompatible, D, val, decoder, _inner_offset, depth)?;
3565                    } else {
3566                        unreachable!()
3567                    }
3568                }
3569                17 => {
3570                    #[allow(irrefutable_let_patterns)]
3571                    if let ParseError::BadFile(_) = self {
3572                        // Do nothing, read the value into the object
3573                    } else {
3574                        // Initialize `self` to the right variant
3575                        *self = ParseError::BadFile(fidl::new_empty!(BadFile, D));
3576                    }
3577                    #[allow(irrefutable_let_patterns)]
3578                    if let ParseError::BadFile(ref mut val) = self {
3579                        fidl::decode!(BadFile, D, val, decoder, _inner_offset, depth)?;
3580                    } else {
3581                        unreachable!()
3582                    }
3583                }
3584                18 => {
3585                    #[allow(irrefutable_let_patterns)]
3586                    if let ParseError::BadDirectory(_) = self {
3587                        // Do nothing, read the value into the object
3588                    } else {
3589                        // Initialize `self` to the right variant
3590                        *self = ParseError::BadDirectory(fidl::new_empty!(BadDirectory, D));
3591                    }
3592                    #[allow(irrefutable_let_patterns)]
3593                    if let ParseError::BadDirectory(ref mut val) = self {
3594                        fidl::decode!(BadDirectory, D, val, decoder, _inner_offset, depth)?;
3595                    } else {
3596                        unreachable!()
3597                    }
3598                }
3599                19 => {
3600                    #[allow(irrefutable_let_patterns)]
3601                    if let ParseError::ReaderReadError(_) = self {
3602                        // Do nothing, read the value into the object
3603                    } else {
3604                        // Initialize `self` to the right variant
3605                        *self = ParseError::ReaderReadError(fidl::new_empty!(ReaderReadError, D));
3606                    }
3607                    #[allow(irrefutable_let_patterns)]
3608                    if let ParseError::ReaderReadError(ref mut val) = self {
3609                        fidl::decode!(ReaderReadError, D, val, decoder, _inner_offset, depth)?;
3610                    } else {
3611                        unreachable!()
3612                    }
3613                }
3614                20 => {
3615                    #[allow(irrefutable_let_patterns)]
3616                    if let ParseError::ReaderOutOfBounds(_) = self {
3617                        // Do nothing, read the value into the object
3618                    } else {
3619                        // Initialize `self` to the right variant
3620                        *self =
3621                            ParseError::ReaderOutOfBounds(fidl::new_empty!(ReaderOutOfBounds, D));
3622                    }
3623                    #[allow(irrefutable_let_patterns)]
3624                    if let ParseError::ReaderOutOfBounds(ref mut val) = self {
3625                        fidl::decode!(ReaderOutOfBounds, D, val, decoder, _inner_offset, depth)?;
3626                    } else {
3627                        unreachable!()
3628                    }
3629                }
3630                21 => {
3631                    #[allow(irrefutable_let_patterns)]
3632                    if let ParseError::RequiredFeatureIncompat(_) = self {
3633                        // Do nothing, read the value into the object
3634                    } else {
3635                        // Initialize `self` to the right variant
3636                        *self = ParseError::RequiredFeatureIncompat(fidl::new_empty!(
3637                            RequiredFeatureIncompat,
3638                            D
3639                        ));
3640                    }
3641                    #[allow(irrefutable_let_patterns)]
3642                    if let ParseError::RequiredFeatureIncompat(ref mut val) = self {
3643                        fidl::decode!(
3644                            RequiredFeatureIncompat,
3645                            D,
3646                            val,
3647                            decoder,
3648                            _inner_offset,
3649                            depth
3650                        )?;
3651                    } else {
3652                        unreachable!()
3653                    }
3654                }
3655                22 => {
3656                    #[allow(irrefutable_let_patterns)]
3657                    if let ParseError::BannedFeatureIncompat(_) = self {
3658                        // Do nothing, read the value into the object
3659                    } else {
3660                        // Initialize `self` to the right variant
3661                        *self = ParseError::BannedFeatureIncompat(fidl::new_empty!(
3662                            BannedFeatureIncompat,
3663                            D
3664                        ));
3665                    }
3666                    #[allow(irrefutable_let_patterns)]
3667                    if let ParseError::BannedFeatureIncompat(ref mut val) = self {
3668                        fidl::decode!(
3669                            BannedFeatureIncompat,
3670                            D,
3671                            val,
3672                            decoder,
3673                            _inner_offset,
3674                            depth
3675                        )?;
3676                    } else {
3677                        unreachable!()
3678                    }
3679                }
3680                23 => {
3681                    #[allow(irrefutable_let_patterns)]
3682                    if let ParseError::InvalidAddress(_) = self {
3683                        // Do nothing, read the value into the object
3684                    } else {
3685                        // Initialize `self` to the right variant
3686                        *self = ParseError::InvalidAddress(fidl::new_empty!(InvalidAddress, D));
3687                    }
3688                    #[allow(irrefutable_let_patterns)]
3689                    if let ParseError::InvalidAddress(ref mut val) = self {
3690                        fidl::decode!(InvalidAddress, D, val, decoder, _inner_offset, depth)?;
3691                    } else {
3692                        unreachable!()
3693                    }
3694                }
3695                #[allow(deprecated)]
3696                ordinal => {
3697                    for _ in 0..num_handles {
3698                        decoder.drop_next_handle()?;
3699                    }
3700                    *self = ParseError::__SourceBreaking { unknown_ordinal: ordinal };
3701                }
3702            }
3703            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
3704                return Err(fidl::Error::InvalidNumBytesInEnvelope);
3705            }
3706            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3707                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3708            }
3709            Ok(())
3710        }
3711    }
3712}