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