fidl_fuchsia_fxfs__common/
fidl_fuchsia_fxfs__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/// Error type for [`BlobCreator.Create`].
12#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
13#[repr(u32)]
14pub enum CreateBlobError {
15    /// This blob is currently readable in fxblob.
16    AlreadyExists = 1,
17    /// An unspecified error occurred while creating the blob.
18    Internal = 2,
19}
20
21impl CreateBlobError {
22    #[inline]
23    pub fn from_primitive(prim: u32) -> Option<Self> {
24        match prim {
25            1 => Some(Self::AlreadyExists),
26            2 => Some(Self::Internal),
27            _ => None,
28        }
29    }
30
31    #[inline]
32    pub const fn into_primitive(self) -> u32 {
33        self as u32
34    }
35}
36
37/// Designates the purpose of a key.
38#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
39pub enum KeyPurpose {
40    /// The key will be used to encrypt metadata.
41    Metadata,
42    /// The key will be used to encrypt data.
43    Data,
44    #[doc(hidden)]
45    __SourceBreaking { unknown_ordinal: u32 },
46}
47
48/// Pattern that matches an unknown `KeyPurpose` member.
49#[macro_export]
50macro_rules! KeyPurposeUnknown {
51    () => {
52        _
53    };
54}
55
56impl KeyPurpose {
57    #[inline]
58    pub fn from_primitive(prim: u32) -> Option<Self> {
59        match prim {
60            1 => Some(Self::Metadata),
61            2 => Some(Self::Data),
62            _ => None,
63        }
64    }
65
66    #[inline]
67    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
68        match prim {
69            1 => Self::Metadata,
70            2 => Self::Data,
71            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
72        }
73    }
74
75    #[inline]
76    pub fn unknown() -> Self {
77        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
78    }
79
80    #[inline]
81    pub const fn into_primitive(self) -> u32 {
82        match self {
83            Self::Metadata => 1,
84            Self::Data => 2,
85            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
86        }
87    }
88
89    #[inline]
90    pub fn is_unknown(&self) -> bool {
91        match self {
92            Self::__SourceBreaking { unknown_ordinal: _ } => true,
93            _ => false,
94        }
95    }
96}
97
98/// Designates the type of object that is interacting with the Crypt protocol.
99#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
100pub enum ObjectType {
101    File,
102    Directory,
103    Symlink,
104    #[doc(hidden)]
105    __SourceBreaking {
106        unknown_ordinal: u32,
107    },
108}
109
110/// Pattern that matches an unknown `ObjectType` member.
111#[macro_export]
112macro_rules! ObjectTypeUnknown {
113    () => {
114        _
115    };
116}
117
118impl ObjectType {
119    #[inline]
120    pub fn from_primitive(prim: u32) -> Option<Self> {
121        match prim {
122            1 => Some(Self::File),
123            2 => Some(Self::Directory),
124            3 => Some(Self::Symlink),
125            _ => None,
126        }
127    }
128
129    #[inline]
130    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
131        match prim {
132            1 => Self::File,
133            2 => Self::Directory,
134            3 => Self::Symlink,
135            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
136        }
137    }
138
139    #[inline]
140    pub fn unknown() -> Self {
141        Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
142    }
143
144    #[inline]
145    pub const fn into_primitive(self) -> u32 {
146        match self {
147            Self::File => 1,
148            Self::Directory => 2,
149            Self::Symlink => 3,
150            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
151        }
152    }
153
154    #[inline]
155    pub fn is_unknown(&self) -> bool {
156        match self {
157            Self::__SourceBreaking { unknown_ordinal: _ } => true,
158            _ => false,
159        }
160    }
161}
162
163#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
164pub struct BlobCreatorCreateRequest {
165    pub hash: [u8; 32],
166    pub allow_existing: bool,
167}
168
169impl fidl::Persistable for BlobCreatorCreateRequest {}
170
171#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
172#[repr(C)]
173pub struct BlobCreatorNeedsOverwriteRequest {
174    pub blob_hash: [u8; 32],
175}
176
177impl fidl::Persistable for BlobCreatorNeedsOverwriteRequest {}
178
179#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
180pub struct BlobCreatorNeedsOverwriteResponse {
181    pub needs_overwrite: bool,
182}
183
184impl fidl::Persistable for BlobCreatorNeedsOverwriteResponse {}
185
186#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187#[repr(C)]
188pub struct BlobReaderGetVmoRequest {
189    pub blob_hash: [u8; 32],
190}
191
192impl fidl::Persistable for BlobReaderGetVmoRequest {}
193
194#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
195#[repr(C)]
196pub struct BlobWriterBytesReadyRequest {
197    pub bytes_written: u64,
198}
199
200impl fidl::Persistable for BlobWriterBytesReadyRequest {}
201
202#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
203#[repr(C)]
204pub struct BlobWriterGetVmoRequest {
205    pub size: u64,
206}
207
208impl fidl::Persistable for BlobWriterGetVmoRequest {}
209
210/// Storage for a pair of related byte and node values.
211#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
212#[repr(C)]
213pub struct BytesAndNodes {
214    pub bytes: u64,
215    pub nodes: u64,
216}
217
218impl fidl::Persistable for BytesAndNodes {}
219
220#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
221pub struct CryptCreateKeyRequest {
222    pub owner: u64,
223    pub purpose: KeyPurpose,
224}
225
226impl fidl::Persistable for CryptCreateKeyRequest {}
227
228#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
229pub struct CryptCreateKeyWithIdRequest {
230    pub owner: u64,
231    pub wrapping_key_id: [u8; 16],
232    pub object_type: ObjectType,
233}
234
235impl fidl::Persistable for CryptCreateKeyWithIdRequest {}
236
237#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
238pub struct CryptManagementAddWrappingKeyRequest {
239    pub wrapping_key_id: [u8; 16],
240    pub key: Vec<u8>,
241}
242
243impl fidl::Persistable for CryptManagementAddWrappingKeyRequest {}
244
245#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
246#[repr(C)]
247pub struct CryptManagementForgetWrappingKeyRequest {
248    pub wrapping_key_id: [u8; 16],
249}
250
251impl fidl::Persistable for CryptManagementForgetWrappingKeyRequest {}
252
253#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
254pub struct CryptManagementSetActiveKeyRequest {
255    pub purpose: KeyPurpose,
256    pub wrapping_key_id: [u8; 16],
257}
258
259impl fidl::Persistable for CryptManagementSetActiveKeyRequest {}
260
261#[derive(Clone, Debug, PartialEq)]
262pub struct CryptUnwrapKeyRequest {
263    pub owner: u64,
264    pub wrapped_key: WrappedKey,
265}
266
267impl fidl::Persistable for CryptUnwrapKeyRequest {}
268
269#[derive(Clone, Debug, PartialEq)]
270pub struct CryptCreateKeyWithIdResponse {
271    pub wrapped_key: WrappedKey,
272    pub unwrapped_key: Vec<u8>,
273}
274
275impl fidl::Persistable for CryptCreateKeyWithIdResponse {}
276
277#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
278pub struct CryptCreateKeyResponse {
279    pub wrapping_key_id: [u8; 16],
280    pub wrapped_key: Vec<u8>,
281    pub unwrapped_key: Vec<u8>,
282}
283
284impl fidl::Persistable for CryptCreateKeyResponse {}
285
286#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
287pub struct CryptUnwrapKeyResponse {
288    pub unwrapped_key: Vec<u8>,
289}
290
291impl fidl::Persistable for CryptUnwrapKeyResponse {}
292
293#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
294pub struct DebugDeleteProfileRequest {
295    pub volume: String,
296    pub profile: String,
297}
298
299impl fidl::Persistable for DebugDeleteProfileRequest {}
300
301#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
302pub struct EmptyStruct;
303
304impl fidl::Persistable for EmptyStruct {}
305
306#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
307#[repr(C)]
308pub struct FscryptKeyIdentifier {
309    pub key_identifier: [u8; 16],
310}
311
312impl fidl::Persistable for FscryptKeyIdentifier {}
313
314#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
315#[repr(C)]
316pub struct FscryptKeyIdentifierAndNonce {
317    pub key_identifier: [u8; 16],
318    pub nonce: [u8; 16],
319}
320
321impl fidl::Persistable for FscryptKeyIdentifierAndNonce {}
322
323#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
324#[repr(C)]
325pub struct FxfsKey {
326    pub wrapping_key_id: [u8; 16],
327    pub wrapped_key: [u8; 48],
328}
329
330impl fidl::Persistable for FxfsKey {}
331
332#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
333#[repr(C)]
334pub struct ProjectIdClearForNodeRequest {
335    pub node_id: u64,
336}
337
338impl fidl::Persistable for ProjectIdClearForNodeRequest {}
339
340#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
341#[repr(C)]
342pub struct ProjectIdClearRequest {
343    pub project_id: u64,
344}
345
346impl fidl::Persistable for ProjectIdClearRequest {}
347
348#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
349#[repr(C)]
350pub struct ProjectIdGetForNodeRequest {
351    pub node_id: u64,
352}
353
354impl fidl::Persistable for ProjectIdGetForNodeRequest {}
355
356#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
357#[repr(C)]
358pub struct ProjectIdInfoRequest {
359    pub project_id: u64,
360}
361
362impl fidl::Persistable for ProjectIdInfoRequest {}
363
364#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
365pub struct ProjectIdListRequest {
366    pub token: Option<Box<ProjectIterToken>>,
367}
368
369impl fidl::Persistable for ProjectIdListRequest {}
370
371#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
372#[repr(C)]
373pub struct ProjectIdSetForNodeRequest {
374    pub node_id: u64,
375    pub project_id: u64,
376}
377
378impl fidl::Persistable for ProjectIdSetForNodeRequest {}
379
380#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
381#[repr(C)]
382pub struct ProjectIdSetLimitRequest {
383    pub project_id: u64,
384    pub bytes: u64,
385    pub nodes: u64,
386}
387
388impl fidl::Persistable for ProjectIdSetLimitRequest {}
389
390#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
391#[repr(C)]
392pub struct ProjectIdGetForNodeResponse {
393    pub project_id: u64,
394}
395
396impl fidl::Persistable for ProjectIdGetForNodeResponse {}
397
398#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
399#[repr(C)]
400pub struct ProjectIdInfoResponse {
401    pub limit: BytesAndNodes,
402    pub usage: BytesAndNodes,
403}
404
405impl fidl::Persistable for ProjectIdInfoResponse {}
406
407#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
408pub struct ProjectIdListResponse {
409    pub entries: Vec<u64>,
410    pub next_token: Option<Box<ProjectIterToken>>,
411}
412
413impl fidl::Persistable for ProjectIdListResponse {}
414
415/// A token used for paging through tracked projects. One may be returned by the `ProjectId.List`
416/// call so it can be passed into the succeeding call to continue the listing from where it left
417/// off.
418#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
419#[repr(C)]
420pub struct ProjectIterToken {
421    pub value: u64,
422}
423
424impl fidl::Persistable for ProjectIterToken {}
425
426#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
427pub struct VolumeInstallerInstallRequest {
428    pub src: String,
429    pub image_file: String,
430    pub dst: String,
431}
432
433impl fidl::Persistable for VolumeInstallerInstallRequest {}
434
435#[derive(Clone, Debug, Default, PartialEq)]
436pub struct CryptSettings {
437    pub active_data_wrapping_key_id: Option<[u8; 16]>,
438    pub active_metadata_wrapping_key_id: Option<[u8; 16]>,
439    #[doc(hidden)]
440    pub __source_breaking: fidl::marker::SourceBreaking,
441}
442
443impl fidl::Persistable for CryptSettings {}
444
445#[derive(Clone, Debug)]
446pub enum WrappedKey {
447    /// Fxfs's default crypto (AES256GCM-SIV wrapped key using AES256XTS encryption)
448    ///   In: 16-byte wrapping_key_id + 48-byte wrapped key.
449    ///   Out: 32-byte unwrapped key.
450    Fxfs(FxfsKey),
451    /// Zxcrypt (For use with FVM/Minfs only)
452    ///   In: 132-byte request blob.
453    ///   Out: 80-byte unwrapped key blob.
454    Zxcrypt(Vec<u8>),
455    /// Fscrypt INO_LBLK32 directory (For use with starnix only)
456    ///   In: 16-byte key_identifier + 16-byte UUID + 16-byte nonce.
457    ///   Out: 32-byte xts_key1, 32-byte xts_key2, 16-byte ino_hash, 16-byte dirhash.
458    FscryptInoLblk32Dir(FscryptKeyIdentifierAndNonce),
459    /// Fscrypt INO_LBLK32 file (For use with starnix only)
460    ///   In: 16-byte key_identifier + 16-byte UUID.
461    ///   Out: 32-byte xts_key1, 32-byte xts_key2, 16-byte ino_hash.
462    FscryptInoLblk32File(FscryptKeyIdentifier),
463    #[doc(hidden)]
464    __SourceBreaking { unknown_ordinal: u64 },
465}
466
467/// Pattern that matches an unknown `WrappedKey` member.
468#[macro_export]
469macro_rules! WrappedKeyUnknown {
470    () => {
471        _
472    };
473}
474
475// Custom PartialEq so that unknown variants are not equal to themselves.
476impl PartialEq for WrappedKey {
477    fn eq(&self, other: &Self) -> bool {
478        match (self, other) {
479            (Self::Fxfs(x), Self::Fxfs(y)) => *x == *y,
480            (Self::Zxcrypt(x), Self::Zxcrypt(y)) => *x == *y,
481            (Self::FscryptInoLblk32Dir(x), Self::FscryptInoLblk32Dir(y)) => *x == *y,
482            (Self::FscryptInoLblk32File(x), Self::FscryptInoLblk32File(y)) => *x == *y,
483            _ => false,
484        }
485    }
486}
487
488impl WrappedKey {
489    #[inline]
490    pub fn ordinal(&self) -> u64 {
491        match *self {
492            Self::Fxfs(_) => 1,
493            Self::Zxcrypt(_) => 2,
494            Self::FscryptInoLblk32Dir(_) => 3,
495            Self::FscryptInoLblk32File(_) => 4,
496            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
497        }
498    }
499
500    #[inline]
501    pub fn unknown_variant_for_testing() -> Self {
502        Self::__SourceBreaking { unknown_ordinal: 0 }
503    }
504
505    #[inline]
506    pub fn is_unknown(&self) -> bool {
507        match self {
508            Self::__SourceBreaking { .. } => true,
509            _ => false,
510        }
511    }
512}
513
514impl fidl::Persistable for WrappedKey {}
515
516pub mod blob_creator_ordinals {
517    pub const CREATE: u64 = 0x4288fe720cca70d7;
518    pub const NEEDS_OVERWRITE: u64 = 0x512e347a6be3e426;
519}
520
521pub mod blob_reader_ordinals {
522    pub const GET_VMO: u64 = 0x2fa72823ef7f11f4;
523}
524
525pub mod blob_writer_ordinals {
526    pub const GET_VMO: u64 = 0x50c8988b12b6f893;
527    pub const BYTES_READY: u64 = 0x7b308b473606c573;
528}
529
530pub mod crypt_ordinals {
531    pub const CREATE_KEY: u64 = 0x6ec69b3aee7fdbba;
532    pub const CREATE_KEY_WITH_ID: u64 = 0x21e8076688700b50;
533    pub const UNWRAP_KEY: u64 = 0x6ec34e2b64d46be9;
534}
535
536pub mod crypt_management_ordinals {
537    pub const ADD_WRAPPING_KEY: u64 = 0x59a5076762318bf;
538    pub const SET_ACTIVE_KEY: u64 = 0x5e81d600442f2872;
539    pub const FORGET_WRAPPING_KEY: u64 = 0x436d6d27696dfcf4;
540}
541
542pub mod debug_ordinals {
543    pub const COMPACT: u64 = 0x6553eb197306e489;
544    pub const DELETE_PROFILE: u64 = 0x54d9d4c9cf300a1e;
545    pub const STOP_PROFILE_TASKS: u64 = 0x1657b945dd629177;
546}
547
548pub mod file_backed_volume_provider_ordinals {
549    pub const OPEN: u64 = 0x67120b9fc9f319ee;
550}
551
552pub mod project_id_ordinals {
553    pub const SET_LIMIT: u64 = 0x20b0fc1e0413876f;
554    pub const CLEAR: u64 = 0x165b5f1e707863c1;
555    pub const SET_FOR_NODE: u64 = 0x4d7a8442dc58324c;
556    pub const GET_FOR_NODE: u64 = 0x644073bdf2542573;
557    pub const CLEAR_FOR_NODE: u64 = 0x3f2ca287bbfe6a62;
558    pub const LIST: u64 = 0x5505f95a36d522cc;
559    pub const INFO: u64 = 0x51b47743c9e2d1ab;
560}
561
562pub mod volume_installer_ordinals {
563    pub const INSTALL: u64 = 0x4c340be8a504ee1c;
564}
565
566mod internal {
567    use super::*;
568    unsafe impl fidl::encoding::TypeMarker for CreateBlobError {
569        type Owned = Self;
570
571        #[inline(always)]
572        fn inline_align(_context: fidl::encoding::Context) -> usize {
573            std::mem::align_of::<u32>()
574        }
575
576        #[inline(always)]
577        fn inline_size(_context: fidl::encoding::Context) -> usize {
578            std::mem::size_of::<u32>()
579        }
580
581        #[inline(always)]
582        fn encode_is_copy() -> bool {
583            true
584        }
585
586        #[inline(always)]
587        fn decode_is_copy() -> bool {
588            false
589        }
590    }
591
592    impl fidl::encoding::ValueTypeMarker for CreateBlobError {
593        type Borrowed<'a> = Self;
594        #[inline(always)]
595        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
596            *value
597        }
598    }
599
600    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
601        for CreateBlobError
602    {
603        #[inline]
604        unsafe fn encode(
605            self,
606            encoder: &mut fidl::encoding::Encoder<'_, D>,
607            offset: usize,
608            _depth: fidl::encoding::Depth,
609        ) -> fidl::Result<()> {
610            encoder.debug_check_bounds::<Self>(offset);
611            encoder.write_num(self.into_primitive(), offset);
612            Ok(())
613        }
614    }
615
616    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBlobError {
617        #[inline(always)]
618        fn new_empty() -> Self {
619            Self::AlreadyExists
620        }
621
622        #[inline]
623        unsafe fn decode(
624            &mut self,
625            decoder: &mut fidl::encoding::Decoder<'_, D>,
626            offset: usize,
627            _depth: fidl::encoding::Depth,
628        ) -> fidl::Result<()> {
629            decoder.debug_check_bounds::<Self>(offset);
630            let prim = decoder.read_num::<u32>(offset);
631
632            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
633            Ok(())
634        }
635    }
636    unsafe impl fidl::encoding::TypeMarker for KeyPurpose {
637        type Owned = Self;
638
639        #[inline(always)]
640        fn inline_align(_context: fidl::encoding::Context) -> usize {
641            std::mem::align_of::<u32>()
642        }
643
644        #[inline(always)]
645        fn inline_size(_context: fidl::encoding::Context) -> usize {
646            std::mem::size_of::<u32>()
647        }
648
649        #[inline(always)]
650        fn encode_is_copy() -> bool {
651            false
652        }
653
654        #[inline(always)]
655        fn decode_is_copy() -> bool {
656            false
657        }
658    }
659
660    impl fidl::encoding::ValueTypeMarker for KeyPurpose {
661        type Borrowed<'a> = Self;
662        #[inline(always)]
663        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
664            *value
665        }
666    }
667
668    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeyPurpose {
669        #[inline]
670        unsafe fn encode(
671            self,
672            encoder: &mut fidl::encoding::Encoder<'_, D>,
673            offset: usize,
674            _depth: fidl::encoding::Depth,
675        ) -> fidl::Result<()> {
676            encoder.debug_check_bounds::<Self>(offset);
677            encoder.write_num(self.into_primitive(), offset);
678            Ok(())
679        }
680    }
681
682    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeyPurpose {
683        #[inline(always)]
684        fn new_empty() -> Self {
685            Self::unknown()
686        }
687
688        #[inline]
689        unsafe fn decode(
690            &mut self,
691            decoder: &mut fidl::encoding::Decoder<'_, D>,
692            offset: usize,
693            _depth: fidl::encoding::Depth,
694        ) -> fidl::Result<()> {
695            decoder.debug_check_bounds::<Self>(offset);
696            let prim = decoder.read_num::<u32>(offset);
697
698            *self = Self::from_primitive_allow_unknown(prim);
699            Ok(())
700        }
701    }
702    unsafe impl fidl::encoding::TypeMarker for ObjectType {
703        type Owned = Self;
704
705        #[inline(always)]
706        fn inline_align(_context: fidl::encoding::Context) -> usize {
707            std::mem::align_of::<u32>()
708        }
709
710        #[inline(always)]
711        fn inline_size(_context: fidl::encoding::Context) -> usize {
712            std::mem::size_of::<u32>()
713        }
714
715        #[inline(always)]
716        fn encode_is_copy() -> bool {
717            false
718        }
719
720        #[inline(always)]
721        fn decode_is_copy() -> bool {
722            false
723        }
724    }
725
726    impl fidl::encoding::ValueTypeMarker for ObjectType {
727        type Borrowed<'a> = Self;
728        #[inline(always)]
729        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
730            *value
731        }
732    }
733
734    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjectType {
735        #[inline]
736        unsafe fn encode(
737            self,
738            encoder: &mut fidl::encoding::Encoder<'_, D>,
739            offset: usize,
740            _depth: fidl::encoding::Depth,
741        ) -> fidl::Result<()> {
742            encoder.debug_check_bounds::<Self>(offset);
743            encoder.write_num(self.into_primitive(), offset);
744            Ok(())
745        }
746    }
747
748    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjectType {
749        #[inline(always)]
750        fn new_empty() -> Self {
751            Self::unknown()
752        }
753
754        #[inline]
755        unsafe fn decode(
756            &mut self,
757            decoder: &mut fidl::encoding::Decoder<'_, D>,
758            offset: usize,
759            _depth: fidl::encoding::Depth,
760        ) -> fidl::Result<()> {
761            decoder.debug_check_bounds::<Self>(offset);
762            let prim = decoder.read_num::<u32>(offset);
763
764            *self = Self::from_primitive_allow_unknown(prim);
765            Ok(())
766        }
767    }
768
769    impl fidl::encoding::ValueTypeMarker for BlobCreatorCreateRequest {
770        type Borrowed<'a> = &'a Self;
771        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
772            value
773        }
774    }
775
776    unsafe impl fidl::encoding::TypeMarker for BlobCreatorCreateRequest {
777        type Owned = Self;
778
779        #[inline(always)]
780        fn inline_align(_context: fidl::encoding::Context) -> usize {
781            1
782        }
783
784        #[inline(always)]
785        fn inline_size(_context: fidl::encoding::Context) -> usize {
786            33
787        }
788    }
789
790    unsafe impl<D: fidl::encoding::ResourceDialect>
791        fidl::encoding::Encode<BlobCreatorCreateRequest, D> for &BlobCreatorCreateRequest
792    {
793        #[inline]
794        unsafe fn encode(
795            self,
796            encoder: &mut fidl::encoding::Encoder<'_, D>,
797            offset: usize,
798            _depth: fidl::encoding::Depth,
799        ) -> fidl::Result<()> {
800            encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
801            // Delegate to tuple encoding.
802            fidl::encoding::Encode::<BlobCreatorCreateRequest, D>::encode(
803                (
804                    <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
805                        &self.hash,
806                    ),
807                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_existing),
808                ),
809                encoder,
810                offset,
811                _depth,
812            )
813        }
814    }
815    unsafe impl<
816        D: fidl::encoding::ResourceDialect,
817        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
818        T1: fidl::encoding::Encode<bool, D>,
819    > fidl::encoding::Encode<BlobCreatorCreateRequest, D> for (T0, T1)
820    {
821        #[inline]
822        unsafe fn encode(
823            self,
824            encoder: &mut fidl::encoding::Encoder<'_, D>,
825            offset: usize,
826            depth: fidl::encoding::Depth,
827        ) -> fidl::Result<()> {
828            encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
829            // Zero out padding regions. There's no need to apply masks
830            // because the unmasked parts will be overwritten by fields.
831            // Write the fields.
832            self.0.encode(encoder, offset + 0, depth)?;
833            self.1.encode(encoder, offset + 32, depth)?;
834            Ok(())
835        }
836    }
837
838    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
839        for BlobCreatorCreateRequest
840    {
841        #[inline(always)]
842        fn new_empty() -> Self {
843            Self {
844                hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
845                allow_existing: fidl::new_empty!(bool, D),
846            }
847        }
848
849        #[inline]
850        unsafe fn decode(
851            &mut self,
852            decoder: &mut fidl::encoding::Decoder<'_, D>,
853            offset: usize,
854            _depth: fidl::encoding::Depth,
855        ) -> fidl::Result<()> {
856            decoder.debug_check_bounds::<Self>(offset);
857            // Verify that padding bytes are zero.
858            fidl::decode!(fidl::encoding::Array<u8, 32>, D, &mut self.hash, decoder, offset + 0, _depth)?;
859            fidl::decode!(bool, D, &mut self.allow_existing, decoder, offset + 32, _depth)?;
860            Ok(())
861        }
862    }
863
864    impl fidl::encoding::ValueTypeMarker for BlobCreatorNeedsOverwriteRequest {
865        type Borrowed<'a> = &'a Self;
866        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
867            value
868        }
869    }
870
871    unsafe impl fidl::encoding::TypeMarker for BlobCreatorNeedsOverwriteRequest {
872        type Owned = Self;
873
874        #[inline(always)]
875        fn inline_align(_context: fidl::encoding::Context) -> usize {
876            1
877        }
878
879        #[inline(always)]
880        fn inline_size(_context: fidl::encoding::Context) -> usize {
881            32
882        }
883        #[inline(always)]
884        fn encode_is_copy() -> bool {
885            true
886        }
887
888        #[inline(always)]
889        fn decode_is_copy() -> bool {
890            true
891        }
892    }
893
894    unsafe impl<D: fidl::encoding::ResourceDialect>
895        fidl::encoding::Encode<BlobCreatorNeedsOverwriteRequest, D>
896        for &BlobCreatorNeedsOverwriteRequest
897    {
898        #[inline]
899        unsafe fn encode(
900            self,
901            encoder: &mut fidl::encoding::Encoder<'_, D>,
902            offset: usize,
903            _depth: fidl::encoding::Depth,
904        ) -> fidl::Result<()> {
905            encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteRequest>(offset);
906            unsafe {
907                // Copy the object into the buffer.
908                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
909                (buf_ptr as *mut BlobCreatorNeedsOverwriteRequest)
910                    .write_unaligned((self as *const BlobCreatorNeedsOverwriteRequest).read());
911                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
912                // done second because the memcpy will write garbage to these bytes.
913            }
914            Ok(())
915        }
916    }
917    unsafe impl<
918        D: fidl::encoding::ResourceDialect,
919        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
920    > fidl::encoding::Encode<BlobCreatorNeedsOverwriteRequest, D> for (T0,)
921    {
922        #[inline]
923        unsafe fn encode(
924            self,
925            encoder: &mut fidl::encoding::Encoder<'_, D>,
926            offset: usize,
927            depth: fidl::encoding::Depth,
928        ) -> fidl::Result<()> {
929            encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteRequest>(offset);
930            // Zero out padding regions. There's no need to apply masks
931            // because the unmasked parts will be overwritten by fields.
932            // Write the fields.
933            self.0.encode(encoder, offset + 0, depth)?;
934            Ok(())
935        }
936    }
937
938    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
939        for BlobCreatorNeedsOverwriteRequest
940    {
941        #[inline(always)]
942        fn new_empty() -> Self {
943            Self { blob_hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
944        }
945
946        #[inline]
947        unsafe fn decode(
948            &mut self,
949            decoder: &mut fidl::encoding::Decoder<'_, D>,
950            offset: usize,
951            _depth: fidl::encoding::Depth,
952        ) -> fidl::Result<()> {
953            decoder.debug_check_bounds::<Self>(offset);
954            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
955            // Verify that padding bytes are zero.
956            // Copy from the buffer into the object.
957            unsafe {
958                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
959            }
960            Ok(())
961        }
962    }
963
964    impl fidl::encoding::ValueTypeMarker for BlobCreatorNeedsOverwriteResponse {
965        type Borrowed<'a> = &'a Self;
966        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
967            value
968        }
969    }
970
971    unsafe impl fidl::encoding::TypeMarker for BlobCreatorNeedsOverwriteResponse {
972        type Owned = Self;
973
974        #[inline(always)]
975        fn inline_align(_context: fidl::encoding::Context) -> usize {
976            1
977        }
978
979        #[inline(always)]
980        fn inline_size(_context: fidl::encoding::Context) -> usize {
981            1
982        }
983    }
984
985    unsafe impl<D: fidl::encoding::ResourceDialect>
986        fidl::encoding::Encode<BlobCreatorNeedsOverwriteResponse, D>
987        for &BlobCreatorNeedsOverwriteResponse
988    {
989        #[inline]
990        unsafe fn encode(
991            self,
992            encoder: &mut fidl::encoding::Encoder<'_, D>,
993            offset: usize,
994            _depth: fidl::encoding::Depth,
995        ) -> fidl::Result<()> {
996            encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteResponse>(offset);
997            // Delegate to tuple encoding.
998            fidl::encoding::Encode::<BlobCreatorNeedsOverwriteResponse, D>::encode(
999                (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.needs_overwrite),),
1000                encoder,
1001                offset,
1002                _depth,
1003            )
1004        }
1005    }
1006    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1007        fidl::encoding::Encode<BlobCreatorNeedsOverwriteResponse, D> for (T0,)
1008    {
1009        #[inline]
1010        unsafe fn encode(
1011            self,
1012            encoder: &mut fidl::encoding::Encoder<'_, D>,
1013            offset: usize,
1014            depth: fidl::encoding::Depth,
1015        ) -> fidl::Result<()> {
1016            encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteResponse>(offset);
1017            // Zero out padding regions. There's no need to apply masks
1018            // because the unmasked parts will be overwritten by fields.
1019            // Write the fields.
1020            self.0.encode(encoder, offset + 0, depth)?;
1021            Ok(())
1022        }
1023    }
1024
1025    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1026        for BlobCreatorNeedsOverwriteResponse
1027    {
1028        #[inline(always)]
1029        fn new_empty() -> Self {
1030            Self { needs_overwrite: fidl::new_empty!(bool, D) }
1031        }
1032
1033        #[inline]
1034        unsafe fn decode(
1035            &mut self,
1036            decoder: &mut fidl::encoding::Decoder<'_, D>,
1037            offset: usize,
1038            _depth: fidl::encoding::Depth,
1039        ) -> fidl::Result<()> {
1040            decoder.debug_check_bounds::<Self>(offset);
1041            // Verify that padding bytes are zero.
1042            fidl::decode!(bool, D, &mut self.needs_overwrite, decoder, offset + 0, _depth)?;
1043            Ok(())
1044        }
1045    }
1046
1047    impl fidl::encoding::ValueTypeMarker for BlobReaderGetVmoRequest {
1048        type Borrowed<'a> = &'a Self;
1049        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1050            value
1051        }
1052    }
1053
1054    unsafe impl fidl::encoding::TypeMarker for BlobReaderGetVmoRequest {
1055        type Owned = Self;
1056
1057        #[inline(always)]
1058        fn inline_align(_context: fidl::encoding::Context) -> usize {
1059            1
1060        }
1061
1062        #[inline(always)]
1063        fn inline_size(_context: fidl::encoding::Context) -> usize {
1064            32
1065        }
1066        #[inline(always)]
1067        fn encode_is_copy() -> bool {
1068            true
1069        }
1070
1071        #[inline(always)]
1072        fn decode_is_copy() -> bool {
1073            true
1074        }
1075    }
1076
1077    unsafe impl<D: fidl::encoding::ResourceDialect>
1078        fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for &BlobReaderGetVmoRequest
1079    {
1080        #[inline]
1081        unsafe fn encode(
1082            self,
1083            encoder: &mut fidl::encoding::Encoder<'_, D>,
1084            offset: usize,
1085            _depth: fidl::encoding::Depth,
1086        ) -> fidl::Result<()> {
1087            encoder.debug_check_bounds::<BlobReaderGetVmoRequest>(offset);
1088            unsafe {
1089                // Copy the object into the buffer.
1090                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1091                (buf_ptr as *mut BlobReaderGetVmoRequest)
1092                    .write_unaligned((self as *const BlobReaderGetVmoRequest).read());
1093                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1094                // done second because the memcpy will write garbage to these bytes.
1095            }
1096            Ok(())
1097        }
1098    }
1099    unsafe impl<
1100        D: fidl::encoding::ResourceDialect,
1101        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
1102    > fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for (T0,)
1103    {
1104        #[inline]
1105        unsafe fn encode(
1106            self,
1107            encoder: &mut fidl::encoding::Encoder<'_, D>,
1108            offset: usize,
1109            depth: fidl::encoding::Depth,
1110        ) -> fidl::Result<()> {
1111            encoder.debug_check_bounds::<BlobReaderGetVmoRequest>(offset);
1112            // Zero out padding regions. There's no need to apply masks
1113            // because the unmasked parts will be overwritten by fields.
1114            // Write the fields.
1115            self.0.encode(encoder, offset + 0, depth)?;
1116            Ok(())
1117        }
1118    }
1119
1120    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1121        for BlobReaderGetVmoRequest
1122    {
1123        #[inline(always)]
1124        fn new_empty() -> Self {
1125            Self { blob_hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
1126        }
1127
1128        #[inline]
1129        unsafe fn decode(
1130            &mut self,
1131            decoder: &mut fidl::encoding::Decoder<'_, D>,
1132            offset: usize,
1133            _depth: fidl::encoding::Depth,
1134        ) -> fidl::Result<()> {
1135            decoder.debug_check_bounds::<Self>(offset);
1136            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1137            // Verify that padding bytes are zero.
1138            // Copy from the buffer into the object.
1139            unsafe {
1140                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
1141            }
1142            Ok(())
1143        }
1144    }
1145
1146    impl fidl::encoding::ValueTypeMarker for BlobWriterBytesReadyRequest {
1147        type Borrowed<'a> = &'a Self;
1148        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1149            value
1150        }
1151    }
1152
1153    unsafe impl fidl::encoding::TypeMarker for BlobWriterBytesReadyRequest {
1154        type Owned = Self;
1155
1156        #[inline(always)]
1157        fn inline_align(_context: fidl::encoding::Context) -> usize {
1158            8
1159        }
1160
1161        #[inline(always)]
1162        fn inline_size(_context: fidl::encoding::Context) -> usize {
1163            8
1164        }
1165        #[inline(always)]
1166        fn encode_is_copy() -> bool {
1167            true
1168        }
1169
1170        #[inline(always)]
1171        fn decode_is_copy() -> bool {
1172            true
1173        }
1174    }
1175
1176    unsafe impl<D: fidl::encoding::ResourceDialect>
1177        fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for &BlobWriterBytesReadyRequest
1178    {
1179        #[inline]
1180        unsafe fn encode(
1181            self,
1182            encoder: &mut fidl::encoding::Encoder<'_, D>,
1183            offset: usize,
1184            _depth: fidl::encoding::Depth,
1185        ) -> fidl::Result<()> {
1186            encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
1187            unsafe {
1188                // Copy the object into the buffer.
1189                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1190                (buf_ptr as *mut BlobWriterBytesReadyRequest)
1191                    .write_unaligned((self as *const BlobWriterBytesReadyRequest).read());
1192                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1193                // done second because the memcpy will write garbage to these bytes.
1194            }
1195            Ok(())
1196        }
1197    }
1198    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1199        fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for (T0,)
1200    {
1201        #[inline]
1202        unsafe fn encode(
1203            self,
1204            encoder: &mut fidl::encoding::Encoder<'_, D>,
1205            offset: usize,
1206            depth: fidl::encoding::Depth,
1207        ) -> fidl::Result<()> {
1208            encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
1209            // Zero out padding regions. There's no need to apply masks
1210            // because the unmasked parts will be overwritten by fields.
1211            // Write the fields.
1212            self.0.encode(encoder, offset + 0, depth)?;
1213            Ok(())
1214        }
1215    }
1216
1217    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1218        for BlobWriterBytesReadyRequest
1219    {
1220        #[inline(always)]
1221        fn new_empty() -> Self {
1222            Self { bytes_written: fidl::new_empty!(u64, D) }
1223        }
1224
1225        #[inline]
1226        unsafe fn decode(
1227            &mut self,
1228            decoder: &mut fidl::encoding::Decoder<'_, D>,
1229            offset: usize,
1230            _depth: fidl::encoding::Depth,
1231        ) -> fidl::Result<()> {
1232            decoder.debug_check_bounds::<Self>(offset);
1233            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1234            // Verify that padding bytes are zero.
1235            // Copy from the buffer into the object.
1236            unsafe {
1237                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1238            }
1239            Ok(())
1240        }
1241    }
1242
1243    impl fidl::encoding::ValueTypeMarker for BlobWriterGetVmoRequest {
1244        type Borrowed<'a> = &'a Self;
1245        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1246            value
1247        }
1248    }
1249
1250    unsafe impl fidl::encoding::TypeMarker for BlobWriterGetVmoRequest {
1251        type Owned = Self;
1252
1253        #[inline(always)]
1254        fn inline_align(_context: fidl::encoding::Context) -> usize {
1255            8
1256        }
1257
1258        #[inline(always)]
1259        fn inline_size(_context: fidl::encoding::Context) -> usize {
1260            8
1261        }
1262        #[inline(always)]
1263        fn encode_is_copy() -> bool {
1264            true
1265        }
1266
1267        #[inline(always)]
1268        fn decode_is_copy() -> bool {
1269            true
1270        }
1271    }
1272
1273    unsafe impl<D: fidl::encoding::ResourceDialect>
1274        fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for &BlobWriterGetVmoRequest
1275    {
1276        #[inline]
1277        unsafe fn encode(
1278            self,
1279            encoder: &mut fidl::encoding::Encoder<'_, D>,
1280            offset: usize,
1281            _depth: fidl::encoding::Depth,
1282        ) -> fidl::Result<()> {
1283            encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
1284            unsafe {
1285                // Copy the object into the buffer.
1286                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1287                (buf_ptr as *mut BlobWriterGetVmoRequest)
1288                    .write_unaligned((self as *const BlobWriterGetVmoRequest).read());
1289                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1290                // done second because the memcpy will write garbage to these bytes.
1291            }
1292            Ok(())
1293        }
1294    }
1295    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1296        fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for (T0,)
1297    {
1298        #[inline]
1299        unsafe fn encode(
1300            self,
1301            encoder: &mut fidl::encoding::Encoder<'_, D>,
1302            offset: usize,
1303            depth: fidl::encoding::Depth,
1304        ) -> fidl::Result<()> {
1305            encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
1306            // Zero out padding regions. There's no need to apply masks
1307            // because the unmasked parts will be overwritten by fields.
1308            // Write the fields.
1309            self.0.encode(encoder, offset + 0, depth)?;
1310            Ok(())
1311        }
1312    }
1313
1314    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1315        for BlobWriterGetVmoRequest
1316    {
1317        #[inline(always)]
1318        fn new_empty() -> Self {
1319            Self { size: fidl::new_empty!(u64, D) }
1320        }
1321
1322        #[inline]
1323        unsafe fn decode(
1324            &mut self,
1325            decoder: &mut fidl::encoding::Decoder<'_, D>,
1326            offset: usize,
1327            _depth: fidl::encoding::Depth,
1328        ) -> fidl::Result<()> {
1329            decoder.debug_check_bounds::<Self>(offset);
1330            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1331            // Verify that padding bytes are zero.
1332            // Copy from the buffer into the object.
1333            unsafe {
1334                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1335            }
1336            Ok(())
1337        }
1338    }
1339
1340    impl fidl::encoding::ValueTypeMarker for BytesAndNodes {
1341        type Borrowed<'a> = &'a Self;
1342        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1343            value
1344        }
1345    }
1346
1347    unsafe impl fidl::encoding::TypeMarker for BytesAndNodes {
1348        type Owned = Self;
1349
1350        #[inline(always)]
1351        fn inline_align(_context: fidl::encoding::Context) -> usize {
1352            8
1353        }
1354
1355        #[inline(always)]
1356        fn inline_size(_context: fidl::encoding::Context) -> usize {
1357            16
1358        }
1359        #[inline(always)]
1360        fn encode_is_copy() -> bool {
1361            true
1362        }
1363
1364        #[inline(always)]
1365        fn decode_is_copy() -> bool {
1366            true
1367        }
1368    }
1369
1370    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BytesAndNodes, D>
1371        for &BytesAndNodes
1372    {
1373        #[inline]
1374        unsafe fn encode(
1375            self,
1376            encoder: &mut fidl::encoding::Encoder<'_, D>,
1377            offset: usize,
1378            _depth: fidl::encoding::Depth,
1379        ) -> fidl::Result<()> {
1380            encoder.debug_check_bounds::<BytesAndNodes>(offset);
1381            unsafe {
1382                // Copy the object into the buffer.
1383                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1384                (buf_ptr as *mut BytesAndNodes)
1385                    .write_unaligned((self as *const BytesAndNodes).read());
1386                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1387                // done second because the memcpy will write garbage to these bytes.
1388            }
1389            Ok(())
1390        }
1391    }
1392    unsafe impl<
1393        D: fidl::encoding::ResourceDialect,
1394        T0: fidl::encoding::Encode<u64, D>,
1395        T1: fidl::encoding::Encode<u64, D>,
1396    > fidl::encoding::Encode<BytesAndNodes, D> for (T0, T1)
1397    {
1398        #[inline]
1399        unsafe fn encode(
1400            self,
1401            encoder: &mut fidl::encoding::Encoder<'_, D>,
1402            offset: usize,
1403            depth: fidl::encoding::Depth,
1404        ) -> fidl::Result<()> {
1405            encoder.debug_check_bounds::<BytesAndNodes>(offset);
1406            // Zero out padding regions. There's no need to apply masks
1407            // because the unmasked parts will be overwritten by fields.
1408            // Write the fields.
1409            self.0.encode(encoder, offset + 0, depth)?;
1410            self.1.encode(encoder, offset + 8, depth)?;
1411            Ok(())
1412        }
1413    }
1414
1415    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BytesAndNodes {
1416        #[inline(always)]
1417        fn new_empty() -> Self {
1418            Self { bytes: fidl::new_empty!(u64, D), nodes: fidl::new_empty!(u64, D) }
1419        }
1420
1421        #[inline]
1422        unsafe fn decode(
1423            &mut self,
1424            decoder: &mut fidl::encoding::Decoder<'_, D>,
1425            offset: usize,
1426            _depth: fidl::encoding::Depth,
1427        ) -> fidl::Result<()> {
1428            decoder.debug_check_bounds::<Self>(offset);
1429            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1430            // Verify that padding bytes are zero.
1431            // Copy from the buffer into the object.
1432            unsafe {
1433                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1434            }
1435            Ok(())
1436        }
1437    }
1438
1439    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyRequest {
1440        type Borrowed<'a> = &'a Self;
1441        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1442            value
1443        }
1444    }
1445
1446    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyRequest {
1447        type Owned = Self;
1448
1449        #[inline(always)]
1450        fn inline_align(_context: fidl::encoding::Context) -> usize {
1451            8
1452        }
1453
1454        #[inline(always)]
1455        fn inline_size(_context: fidl::encoding::Context) -> usize {
1456            16
1457        }
1458    }
1459
1460    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptCreateKeyRequest, D>
1461        for &CryptCreateKeyRequest
1462    {
1463        #[inline]
1464        unsafe fn encode(
1465            self,
1466            encoder: &mut fidl::encoding::Encoder<'_, D>,
1467            offset: usize,
1468            _depth: fidl::encoding::Depth,
1469        ) -> fidl::Result<()> {
1470            encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
1471            // Delegate to tuple encoding.
1472            fidl::encoding::Encode::<CryptCreateKeyRequest, D>::encode(
1473                (
1474                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1475                    <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
1476                ),
1477                encoder,
1478                offset,
1479                _depth,
1480            )
1481        }
1482    }
1483    unsafe impl<
1484        D: fidl::encoding::ResourceDialect,
1485        T0: fidl::encoding::Encode<u64, D>,
1486        T1: fidl::encoding::Encode<KeyPurpose, D>,
1487    > fidl::encoding::Encode<CryptCreateKeyRequest, D> for (T0, T1)
1488    {
1489        #[inline]
1490        unsafe fn encode(
1491            self,
1492            encoder: &mut fidl::encoding::Encoder<'_, D>,
1493            offset: usize,
1494            depth: fidl::encoding::Depth,
1495        ) -> fidl::Result<()> {
1496            encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
1497            // Zero out padding regions. There's no need to apply masks
1498            // because the unmasked parts will be overwritten by fields.
1499            unsafe {
1500                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1501                (ptr as *mut u64).write_unaligned(0);
1502            }
1503            // Write the fields.
1504            self.0.encode(encoder, offset + 0, depth)?;
1505            self.1.encode(encoder, offset + 8, depth)?;
1506            Ok(())
1507        }
1508    }
1509
1510    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptCreateKeyRequest {
1511        #[inline(always)]
1512        fn new_empty() -> Self {
1513            Self { owner: fidl::new_empty!(u64, D), purpose: fidl::new_empty!(KeyPurpose, D) }
1514        }
1515
1516        #[inline]
1517        unsafe fn decode(
1518            &mut self,
1519            decoder: &mut fidl::encoding::Decoder<'_, D>,
1520            offset: usize,
1521            _depth: fidl::encoding::Depth,
1522        ) -> fidl::Result<()> {
1523            decoder.debug_check_bounds::<Self>(offset);
1524            // Verify that padding bytes are zero.
1525            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1526            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1527            let mask = 0xffffffff00000000u64;
1528            let maskedval = padval & mask;
1529            if maskedval != 0 {
1530                return Err(fidl::Error::NonZeroPadding {
1531                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1532                });
1533            }
1534            fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
1535            fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 8, _depth)?;
1536            Ok(())
1537        }
1538    }
1539
1540    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyWithIdRequest {
1541        type Borrowed<'a> = &'a Self;
1542        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1543            value
1544        }
1545    }
1546
1547    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyWithIdRequest {
1548        type Owned = Self;
1549
1550        #[inline(always)]
1551        fn inline_align(_context: fidl::encoding::Context) -> usize {
1552            8
1553        }
1554
1555        #[inline(always)]
1556        fn inline_size(_context: fidl::encoding::Context) -> usize {
1557            32
1558        }
1559    }
1560
1561    unsafe impl<D: fidl::encoding::ResourceDialect>
1562        fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for &CryptCreateKeyWithIdRequest
1563    {
1564        #[inline]
1565        unsafe fn encode(
1566            self,
1567            encoder: &mut fidl::encoding::Encoder<'_, D>,
1568            offset: usize,
1569            _depth: fidl::encoding::Depth,
1570        ) -> fidl::Result<()> {
1571            encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1572            // Delegate to tuple encoding.
1573            fidl::encoding::Encode::<CryptCreateKeyWithIdRequest, D>::encode(
1574                (
1575                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1576                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1577                        &self.wrapping_key_id,
1578                    ),
1579                    <ObjectType as fidl::encoding::ValueTypeMarker>::borrow(&self.object_type),
1580                ),
1581                encoder,
1582                offset,
1583                _depth,
1584            )
1585        }
1586    }
1587    unsafe impl<
1588        D: fidl::encoding::ResourceDialect,
1589        T0: fidl::encoding::Encode<u64, D>,
1590        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1591        T2: fidl::encoding::Encode<ObjectType, D>,
1592    > fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for (T0, T1, T2)
1593    {
1594        #[inline]
1595        unsafe fn encode(
1596            self,
1597            encoder: &mut fidl::encoding::Encoder<'_, D>,
1598            offset: usize,
1599            depth: fidl::encoding::Depth,
1600        ) -> fidl::Result<()> {
1601            encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1602            // Zero out padding regions. There's no need to apply masks
1603            // because the unmasked parts will be overwritten by fields.
1604            unsafe {
1605                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1606                (ptr as *mut u64).write_unaligned(0);
1607            }
1608            // Write the fields.
1609            self.0.encode(encoder, offset + 0, depth)?;
1610            self.1.encode(encoder, offset + 8, depth)?;
1611            self.2.encode(encoder, offset + 24, depth)?;
1612            Ok(())
1613        }
1614    }
1615
1616    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1617        for CryptCreateKeyWithIdRequest
1618    {
1619        #[inline(always)]
1620        fn new_empty() -> Self {
1621            Self {
1622                owner: fidl::new_empty!(u64, D),
1623                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1624                object_type: fidl::new_empty!(ObjectType, D),
1625            }
1626        }
1627
1628        #[inline]
1629        unsafe fn decode(
1630            &mut self,
1631            decoder: &mut fidl::encoding::Decoder<'_, D>,
1632            offset: usize,
1633            _depth: fidl::encoding::Depth,
1634        ) -> fidl::Result<()> {
1635            decoder.debug_check_bounds::<Self>(offset);
1636            // Verify that padding bytes are zero.
1637            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1638            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1639            let mask = 0xffffffff00000000u64;
1640            let maskedval = padval & mask;
1641            if maskedval != 0 {
1642                return Err(fidl::Error::NonZeroPadding {
1643                    padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1644                });
1645            }
1646            fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
1647            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 8, _depth)?;
1648            fidl::decode!(ObjectType, D, &mut self.object_type, decoder, offset + 24, _depth)?;
1649            Ok(())
1650        }
1651    }
1652
1653    impl fidl::encoding::ValueTypeMarker for CryptManagementAddWrappingKeyRequest {
1654        type Borrowed<'a> = &'a Self;
1655        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1656            value
1657        }
1658    }
1659
1660    unsafe impl fidl::encoding::TypeMarker for CryptManagementAddWrappingKeyRequest {
1661        type Owned = Self;
1662
1663        #[inline(always)]
1664        fn inline_align(_context: fidl::encoding::Context) -> usize {
1665            8
1666        }
1667
1668        #[inline(always)]
1669        fn inline_size(_context: fidl::encoding::Context) -> usize {
1670            32
1671        }
1672    }
1673
1674    unsafe impl<D: fidl::encoding::ResourceDialect>
1675        fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D>
1676        for &CryptManagementAddWrappingKeyRequest
1677    {
1678        #[inline]
1679        unsafe fn encode(
1680            self,
1681            encoder: &mut fidl::encoding::Encoder<'_, D>,
1682            offset: usize,
1683            _depth: fidl::encoding::Depth,
1684        ) -> fidl::Result<()> {
1685            encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1686            // Delegate to tuple encoding.
1687            fidl::encoding::Encode::<CryptManagementAddWrappingKeyRequest, D>::encode(
1688                (
1689                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1690                        &self.wrapping_key_id,
1691                    ),
1692                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1693                        &self.key,
1694                    ),
1695                ),
1696                encoder,
1697                offset,
1698                _depth,
1699            )
1700        }
1701    }
1702    unsafe impl<
1703        D: fidl::encoding::ResourceDialect,
1704        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1705        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1706    > fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D> for (T0, T1)
1707    {
1708        #[inline]
1709        unsafe fn encode(
1710            self,
1711            encoder: &mut fidl::encoding::Encoder<'_, D>,
1712            offset: usize,
1713            depth: fidl::encoding::Depth,
1714        ) -> fidl::Result<()> {
1715            encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1716            // Zero out padding regions. There's no need to apply masks
1717            // because the unmasked parts will be overwritten by fields.
1718            // Write the fields.
1719            self.0.encode(encoder, offset + 0, depth)?;
1720            self.1.encode(encoder, offset + 16, depth)?;
1721            Ok(())
1722        }
1723    }
1724
1725    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1726        for CryptManagementAddWrappingKeyRequest
1727    {
1728        #[inline(always)]
1729        fn new_empty() -> Self {
1730            Self {
1731                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1732                key: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1733            }
1734        }
1735
1736        #[inline]
1737        unsafe fn decode(
1738            &mut self,
1739            decoder: &mut fidl::encoding::Decoder<'_, D>,
1740            offset: usize,
1741            _depth: fidl::encoding::Depth,
1742        ) -> fidl::Result<()> {
1743            decoder.debug_check_bounds::<Self>(offset);
1744            // Verify that padding bytes are zero.
1745            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
1746            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.key, decoder, offset + 16, _depth)?;
1747            Ok(())
1748        }
1749    }
1750
1751    impl fidl::encoding::ValueTypeMarker for CryptManagementForgetWrappingKeyRequest {
1752        type Borrowed<'a> = &'a Self;
1753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1754            value
1755        }
1756    }
1757
1758    unsafe impl fidl::encoding::TypeMarker for CryptManagementForgetWrappingKeyRequest {
1759        type Owned = Self;
1760
1761        #[inline(always)]
1762        fn inline_align(_context: fidl::encoding::Context) -> usize {
1763            1
1764        }
1765
1766        #[inline(always)]
1767        fn inline_size(_context: fidl::encoding::Context) -> usize {
1768            16
1769        }
1770        #[inline(always)]
1771        fn encode_is_copy() -> bool {
1772            true
1773        }
1774
1775        #[inline(always)]
1776        fn decode_is_copy() -> bool {
1777            true
1778        }
1779    }
1780
1781    unsafe impl<D: fidl::encoding::ResourceDialect>
1782        fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D>
1783        for &CryptManagementForgetWrappingKeyRequest
1784    {
1785        #[inline]
1786        unsafe fn encode(
1787            self,
1788            encoder: &mut fidl::encoding::Encoder<'_, D>,
1789            offset: usize,
1790            _depth: fidl::encoding::Depth,
1791        ) -> fidl::Result<()> {
1792            encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1793            unsafe {
1794                // Copy the object into the buffer.
1795                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1796                (buf_ptr as *mut CryptManagementForgetWrappingKeyRequest).write_unaligned(
1797                    (self as *const CryptManagementForgetWrappingKeyRequest).read(),
1798                );
1799                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1800                // done second because the memcpy will write garbage to these bytes.
1801            }
1802            Ok(())
1803        }
1804    }
1805    unsafe impl<
1806        D: fidl::encoding::ResourceDialect,
1807        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1808    > fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D> for (T0,)
1809    {
1810        #[inline]
1811        unsafe fn encode(
1812            self,
1813            encoder: &mut fidl::encoding::Encoder<'_, D>,
1814            offset: usize,
1815            depth: fidl::encoding::Depth,
1816        ) -> fidl::Result<()> {
1817            encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1818            // Zero out padding regions. There's no need to apply masks
1819            // because the unmasked parts will be overwritten by fields.
1820            // Write the fields.
1821            self.0.encode(encoder, offset + 0, depth)?;
1822            Ok(())
1823        }
1824    }
1825
1826    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1827        for CryptManagementForgetWrappingKeyRequest
1828    {
1829        #[inline(always)]
1830        fn new_empty() -> Self {
1831            Self { wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D) }
1832        }
1833
1834        #[inline]
1835        unsafe fn decode(
1836            &mut self,
1837            decoder: &mut fidl::encoding::Decoder<'_, D>,
1838            offset: usize,
1839            _depth: fidl::encoding::Depth,
1840        ) -> fidl::Result<()> {
1841            decoder.debug_check_bounds::<Self>(offset);
1842            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1843            // Verify that padding bytes are zero.
1844            // Copy from the buffer into the object.
1845            unsafe {
1846                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1847            }
1848            Ok(())
1849        }
1850    }
1851
1852    impl fidl::encoding::ValueTypeMarker for CryptManagementSetActiveKeyRequest {
1853        type Borrowed<'a> = &'a Self;
1854        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1855            value
1856        }
1857    }
1858
1859    unsafe impl fidl::encoding::TypeMarker for CryptManagementSetActiveKeyRequest {
1860        type Owned = Self;
1861
1862        #[inline(always)]
1863        fn inline_align(_context: fidl::encoding::Context) -> usize {
1864            4
1865        }
1866
1867        #[inline(always)]
1868        fn inline_size(_context: fidl::encoding::Context) -> usize {
1869            20
1870        }
1871    }
1872
1873    unsafe impl<D: fidl::encoding::ResourceDialect>
1874        fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D>
1875        for &CryptManagementSetActiveKeyRequest
1876    {
1877        #[inline]
1878        unsafe fn encode(
1879            self,
1880            encoder: &mut fidl::encoding::Encoder<'_, D>,
1881            offset: usize,
1882            _depth: fidl::encoding::Depth,
1883        ) -> fidl::Result<()> {
1884            encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
1885            // Delegate to tuple encoding.
1886            fidl::encoding::Encode::<CryptManagementSetActiveKeyRequest, D>::encode(
1887                (
1888                    <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
1889                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1890                        &self.wrapping_key_id,
1891                    ),
1892                ),
1893                encoder,
1894                offset,
1895                _depth,
1896            )
1897        }
1898    }
1899    unsafe impl<
1900        D: fidl::encoding::ResourceDialect,
1901        T0: fidl::encoding::Encode<KeyPurpose, D>,
1902        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1903    > fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D> for (T0, T1)
1904    {
1905        #[inline]
1906        unsafe fn encode(
1907            self,
1908            encoder: &mut fidl::encoding::Encoder<'_, D>,
1909            offset: usize,
1910            depth: fidl::encoding::Depth,
1911        ) -> fidl::Result<()> {
1912            encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
1913            // Zero out padding regions. There's no need to apply masks
1914            // because the unmasked parts will be overwritten by fields.
1915            // Write the fields.
1916            self.0.encode(encoder, offset + 0, depth)?;
1917            self.1.encode(encoder, offset + 4, depth)?;
1918            Ok(())
1919        }
1920    }
1921
1922    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1923        for CryptManagementSetActiveKeyRequest
1924    {
1925        #[inline(always)]
1926        fn new_empty() -> Self {
1927            Self {
1928                purpose: fidl::new_empty!(KeyPurpose, D),
1929                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1930            }
1931        }
1932
1933        #[inline]
1934        unsafe fn decode(
1935            &mut self,
1936            decoder: &mut fidl::encoding::Decoder<'_, D>,
1937            offset: usize,
1938            _depth: fidl::encoding::Depth,
1939        ) -> fidl::Result<()> {
1940            decoder.debug_check_bounds::<Self>(offset);
1941            // Verify that padding bytes are zero.
1942            fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 0, _depth)?;
1943            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 4, _depth)?;
1944            Ok(())
1945        }
1946    }
1947
1948    impl fidl::encoding::ValueTypeMarker for CryptUnwrapKeyRequest {
1949        type Borrowed<'a> = &'a Self;
1950        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1951            value
1952        }
1953    }
1954
1955    unsafe impl fidl::encoding::TypeMarker for CryptUnwrapKeyRequest {
1956        type Owned = Self;
1957
1958        #[inline(always)]
1959        fn inline_align(_context: fidl::encoding::Context) -> usize {
1960            8
1961        }
1962
1963        #[inline(always)]
1964        fn inline_size(_context: fidl::encoding::Context) -> usize {
1965            24
1966        }
1967    }
1968
1969    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptUnwrapKeyRequest, D>
1970        for &CryptUnwrapKeyRequest
1971    {
1972        #[inline]
1973        unsafe fn encode(
1974            self,
1975            encoder: &mut fidl::encoding::Encoder<'_, D>,
1976            offset: usize,
1977            _depth: fidl::encoding::Depth,
1978        ) -> fidl::Result<()> {
1979            encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
1980            // Delegate to tuple encoding.
1981            fidl::encoding::Encode::<CryptUnwrapKeyRequest, D>::encode(
1982                (
1983                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1984                    <WrappedKey as fidl::encoding::ValueTypeMarker>::borrow(&self.wrapped_key),
1985                ),
1986                encoder,
1987                offset,
1988                _depth,
1989            )
1990        }
1991    }
1992    unsafe impl<
1993        D: fidl::encoding::ResourceDialect,
1994        T0: fidl::encoding::Encode<u64, D>,
1995        T1: fidl::encoding::Encode<WrappedKey, D>,
1996    > fidl::encoding::Encode<CryptUnwrapKeyRequest, D> for (T0, T1)
1997    {
1998        #[inline]
1999        unsafe fn encode(
2000            self,
2001            encoder: &mut fidl::encoding::Encoder<'_, D>,
2002            offset: usize,
2003            depth: fidl::encoding::Depth,
2004        ) -> fidl::Result<()> {
2005            encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
2006            // Zero out padding regions. There's no need to apply masks
2007            // because the unmasked parts will be overwritten by fields.
2008            // Write the fields.
2009            self.0.encode(encoder, offset + 0, depth)?;
2010            self.1.encode(encoder, offset + 8, depth)?;
2011            Ok(())
2012        }
2013    }
2014
2015    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptUnwrapKeyRequest {
2016        #[inline(always)]
2017        fn new_empty() -> Self {
2018            Self { owner: fidl::new_empty!(u64, D), wrapped_key: fidl::new_empty!(WrappedKey, D) }
2019        }
2020
2021        #[inline]
2022        unsafe fn decode(
2023            &mut self,
2024            decoder: &mut fidl::encoding::Decoder<'_, D>,
2025            offset: usize,
2026            _depth: fidl::encoding::Depth,
2027        ) -> fidl::Result<()> {
2028            decoder.debug_check_bounds::<Self>(offset);
2029            // Verify that padding bytes are zero.
2030            fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
2031            fidl::decode!(WrappedKey, D, &mut self.wrapped_key, decoder, offset + 8, _depth)?;
2032            Ok(())
2033        }
2034    }
2035
2036    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyWithIdResponse {
2037        type Borrowed<'a> = &'a Self;
2038        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2039            value
2040        }
2041    }
2042
2043    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyWithIdResponse {
2044        type Owned = Self;
2045
2046        #[inline(always)]
2047        fn inline_align(_context: fidl::encoding::Context) -> usize {
2048            8
2049        }
2050
2051        #[inline(always)]
2052        fn inline_size(_context: fidl::encoding::Context) -> usize {
2053            32
2054        }
2055    }
2056
2057    unsafe impl<D: fidl::encoding::ResourceDialect>
2058        fidl::encoding::Encode<CryptCreateKeyWithIdResponse, D> for &CryptCreateKeyWithIdResponse
2059    {
2060        #[inline]
2061        unsafe fn encode(
2062            self,
2063            encoder: &mut fidl::encoding::Encoder<'_, D>,
2064            offset: usize,
2065            _depth: fidl::encoding::Depth,
2066        ) -> fidl::Result<()> {
2067            encoder.debug_check_bounds::<CryptCreateKeyWithIdResponse>(offset);
2068            // Delegate to tuple encoding.
2069            fidl::encoding::Encode::<CryptCreateKeyWithIdResponse, D>::encode(
2070                (
2071                    <WrappedKey as fidl::encoding::ValueTypeMarker>::borrow(&self.wrapped_key),
2072                    <fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
2073                        &self.unwrapped_key,
2074                    ),
2075                ),
2076                encoder,
2077                offset,
2078                _depth,
2079            )
2080        }
2081    }
2082    unsafe impl<
2083        D: fidl::encoding::ResourceDialect,
2084        T0: fidl::encoding::Encode<WrappedKey, D>,
2085        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
2086    > fidl::encoding::Encode<CryptCreateKeyWithIdResponse, D> for (T0, T1)
2087    {
2088        #[inline]
2089        unsafe fn encode(
2090            self,
2091            encoder: &mut fidl::encoding::Encoder<'_, D>,
2092            offset: usize,
2093            depth: fidl::encoding::Depth,
2094        ) -> fidl::Result<()> {
2095            encoder.debug_check_bounds::<CryptCreateKeyWithIdResponse>(offset);
2096            // Zero out padding regions. There's no need to apply masks
2097            // because the unmasked parts will be overwritten by fields.
2098            // Write the fields.
2099            self.0.encode(encoder, offset + 0, depth)?;
2100            self.1.encode(encoder, offset + 16, depth)?;
2101            Ok(())
2102        }
2103    }
2104
2105    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2106        for CryptCreateKeyWithIdResponse
2107    {
2108        #[inline(always)]
2109        fn new_empty() -> Self {
2110            Self {
2111                wrapped_key: fidl::new_empty!(WrappedKey, D),
2112                unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D),
2113            }
2114        }
2115
2116        #[inline]
2117        unsafe fn decode(
2118            &mut self,
2119            decoder: &mut fidl::encoding::Decoder<'_, D>,
2120            offset: usize,
2121            _depth: fidl::encoding::Depth,
2122        ) -> fidl::Result<()> {
2123            decoder.debug_check_bounds::<Self>(offset);
2124            // Verify that padding bytes are zero.
2125            fidl::decode!(WrappedKey, D, &mut self.wrapped_key, decoder, offset + 0, _depth)?;
2126            fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 16, _depth)?;
2127            Ok(())
2128        }
2129    }
2130
2131    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyResponse {
2132        type Borrowed<'a> = &'a Self;
2133        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2134            value
2135        }
2136    }
2137
2138    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyResponse {
2139        type Owned = Self;
2140
2141        #[inline(always)]
2142        fn inline_align(_context: fidl::encoding::Context) -> usize {
2143            8
2144        }
2145
2146        #[inline(always)]
2147        fn inline_size(_context: fidl::encoding::Context) -> usize {
2148            48
2149        }
2150    }
2151
2152    unsafe impl<D: fidl::encoding::ResourceDialect>
2153        fidl::encoding::Encode<CryptCreateKeyResponse, D> for &CryptCreateKeyResponse
2154    {
2155        #[inline]
2156        unsafe fn encode(
2157            self,
2158            encoder: &mut fidl::encoding::Encoder<'_, D>,
2159            offset: usize,
2160            _depth: fidl::encoding::Depth,
2161        ) -> fidl::Result<()> {
2162            encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
2163            // Delegate to tuple encoding.
2164            fidl::encoding::Encode::<CryptCreateKeyResponse, D>::encode(
2165                (
2166                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
2167                        &self.wrapping_key_id,
2168                    ),
2169                    <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
2170                        &self.wrapped_key,
2171                    ),
2172                    <fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
2173                        &self.unwrapped_key,
2174                    ),
2175                ),
2176                encoder,
2177                offset,
2178                _depth,
2179            )
2180        }
2181    }
2182    unsafe impl<
2183        D: fidl::encoding::ResourceDialect,
2184        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2185        T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 132>, D>,
2186        T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
2187    > fidl::encoding::Encode<CryptCreateKeyResponse, D> for (T0, T1, T2)
2188    {
2189        #[inline]
2190        unsafe fn encode(
2191            self,
2192            encoder: &mut fidl::encoding::Encoder<'_, D>,
2193            offset: usize,
2194            depth: fidl::encoding::Depth,
2195        ) -> fidl::Result<()> {
2196            encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
2197            // Zero out padding regions. There's no need to apply masks
2198            // because the unmasked parts will be overwritten by fields.
2199            // Write the fields.
2200            self.0.encode(encoder, offset + 0, depth)?;
2201            self.1.encode(encoder, offset + 16, depth)?;
2202            self.2.encode(encoder, offset + 32, depth)?;
2203            Ok(())
2204        }
2205    }
2206
2207    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2208        for CryptCreateKeyResponse
2209    {
2210        #[inline(always)]
2211        fn new_empty() -> Self {
2212            Self {
2213                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2214                wrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
2215                unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D),
2216            }
2217        }
2218
2219        #[inline]
2220        unsafe fn decode(
2221            &mut self,
2222            decoder: &mut fidl::encoding::Decoder<'_, D>,
2223            offset: usize,
2224            _depth: fidl::encoding::Depth,
2225        ) -> fidl::Result<()> {
2226            decoder.debug_check_bounds::<Self>(offset);
2227            // Verify that padding bytes are zero.
2228            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
2229            fidl::decode!(fidl::encoding::Vector<u8, 132>, D, &mut self.wrapped_key, decoder, offset + 16, _depth)?;
2230            fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 32, _depth)?;
2231            Ok(())
2232        }
2233    }
2234
2235    impl fidl::encoding::ValueTypeMarker for CryptUnwrapKeyResponse {
2236        type Borrowed<'a> = &'a Self;
2237        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2238            value
2239        }
2240    }
2241
2242    unsafe impl fidl::encoding::TypeMarker for CryptUnwrapKeyResponse {
2243        type Owned = Self;
2244
2245        #[inline(always)]
2246        fn inline_align(_context: fidl::encoding::Context) -> usize {
2247            8
2248        }
2249
2250        #[inline(always)]
2251        fn inline_size(_context: fidl::encoding::Context) -> usize {
2252            16
2253        }
2254    }
2255
2256    unsafe impl<D: fidl::encoding::ResourceDialect>
2257        fidl::encoding::Encode<CryptUnwrapKeyResponse, D> for &CryptUnwrapKeyResponse
2258    {
2259        #[inline]
2260        unsafe fn encode(
2261            self,
2262            encoder: &mut fidl::encoding::Encoder<'_, D>,
2263            offset: usize,
2264            _depth: fidl::encoding::Depth,
2265        ) -> fidl::Result<()> {
2266            encoder.debug_check_bounds::<CryptUnwrapKeyResponse>(offset);
2267            // Delegate to tuple encoding.
2268            fidl::encoding::Encode::<CryptUnwrapKeyResponse, D>::encode(
2269                (<fidl::encoding::Vector<u8, 128> as fidl::encoding::ValueTypeMarker>::borrow(
2270                    &self.unwrapped_key,
2271                ),),
2272                encoder,
2273                offset,
2274                _depth,
2275            )
2276        }
2277    }
2278    unsafe impl<
2279        D: fidl::encoding::ResourceDialect,
2280        T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 128>, D>,
2281    > fidl::encoding::Encode<CryptUnwrapKeyResponse, D> for (T0,)
2282    {
2283        #[inline]
2284        unsafe fn encode(
2285            self,
2286            encoder: &mut fidl::encoding::Encoder<'_, D>,
2287            offset: usize,
2288            depth: fidl::encoding::Depth,
2289        ) -> fidl::Result<()> {
2290            encoder.debug_check_bounds::<CryptUnwrapKeyResponse>(offset);
2291            // Zero out padding regions. There's no need to apply masks
2292            // because the unmasked parts will be overwritten by fields.
2293            // Write the fields.
2294            self.0.encode(encoder, offset + 0, depth)?;
2295            Ok(())
2296        }
2297    }
2298
2299    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2300        for CryptUnwrapKeyResponse
2301    {
2302        #[inline(always)]
2303        fn new_empty() -> Self {
2304            Self { unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 128>, D) }
2305        }
2306
2307        #[inline]
2308        unsafe fn decode(
2309            &mut self,
2310            decoder: &mut fidl::encoding::Decoder<'_, D>,
2311            offset: usize,
2312            _depth: fidl::encoding::Depth,
2313        ) -> fidl::Result<()> {
2314            decoder.debug_check_bounds::<Self>(offset);
2315            // Verify that padding bytes are zero.
2316            fidl::decode!(fidl::encoding::Vector<u8, 128>, D, &mut self.unwrapped_key, decoder, offset + 0, _depth)?;
2317            Ok(())
2318        }
2319    }
2320
2321    impl fidl::encoding::ValueTypeMarker for DebugDeleteProfileRequest {
2322        type Borrowed<'a> = &'a Self;
2323        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2324            value
2325        }
2326    }
2327
2328    unsafe impl fidl::encoding::TypeMarker for DebugDeleteProfileRequest {
2329        type Owned = Self;
2330
2331        #[inline(always)]
2332        fn inline_align(_context: fidl::encoding::Context) -> usize {
2333            8
2334        }
2335
2336        #[inline(always)]
2337        fn inline_size(_context: fidl::encoding::Context) -> usize {
2338            32
2339        }
2340    }
2341
2342    unsafe impl<D: fidl::encoding::ResourceDialect>
2343        fidl::encoding::Encode<DebugDeleteProfileRequest, D> for &DebugDeleteProfileRequest
2344    {
2345        #[inline]
2346        unsafe fn encode(
2347            self,
2348            encoder: &mut fidl::encoding::Encoder<'_, D>,
2349            offset: usize,
2350            _depth: fidl::encoding::Depth,
2351        ) -> fidl::Result<()> {
2352            encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
2353            // Delegate to tuple encoding.
2354            fidl::encoding::Encode::<DebugDeleteProfileRequest, D>::encode(
2355                (
2356                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
2357                        &self.volume,
2358                    ),
2359                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
2360                        &self.profile,
2361                    ),
2362                ),
2363                encoder,
2364                offset,
2365                _depth,
2366            )
2367        }
2368    }
2369    unsafe impl<
2370        D: fidl::encoding::ResourceDialect,
2371        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2372        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2373    > fidl::encoding::Encode<DebugDeleteProfileRequest, D> for (T0, T1)
2374    {
2375        #[inline]
2376        unsafe fn encode(
2377            self,
2378            encoder: &mut fidl::encoding::Encoder<'_, D>,
2379            offset: usize,
2380            depth: fidl::encoding::Depth,
2381        ) -> fidl::Result<()> {
2382            encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
2383            // Zero out padding regions. There's no need to apply masks
2384            // because the unmasked parts will be overwritten by fields.
2385            // Write the fields.
2386            self.0.encode(encoder, offset + 0, depth)?;
2387            self.1.encode(encoder, offset + 16, depth)?;
2388            Ok(())
2389        }
2390    }
2391
2392    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2393        for DebugDeleteProfileRequest
2394    {
2395        #[inline(always)]
2396        fn new_empty() -> Self {
2397            Self {
2398                volume: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2399                profile: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2400            }
2401        }
2402
2403        #[inline]
2404        unsafe fn decode(
2405            &mut self,
2406            decoder: &mut fidl::encoding::Decoder<'_, D>,
2407            offset: usize,
2408            _depth: fidl::encoding::Depth,
2409        ) -> fidl::Result<()> {
2410            decoder.debug_check_bounds::<Self>(offset);
2411            // Verify that padding bytes are zero.
2412            fidl::decode!(
2413                fidl::encoding::BoundedString<255>,
2414                D,
2415                &mut self.volume,
2416                decoder,
2417                offset + 0,
2418                _depth
2419            )?;
2420            fidl::decode!(
2421                fidl::encoding::BoundedString<255>,
2422                D,
2423                &mut self.profile,
2424                decoder,
2425                offset + 16,
2426                _depth
2427            )?;
2428            Ok(())
2429        }
2430    }
2431
2432    impl fidl::encoding::ValueTypeMarker for EmptyStruct {
2433        type Borrowed<'a> = &'a Self;
2434        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2435            value
2436        }
2437    }
2438
2439    unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
2440        type Owned = Self;
2441
2442        #[inline(always)]
2443        fn inline_align(_context: fidl::encoding::Context) -> usize {
2444            1
2445        }
2446
2447        #[inline(always)]
2448        fn inline_size(_context: fidl::encoding::Context) -> usize {
2449            1
2450        }
2451    }
2452
2453    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
2454        for &EmptyStruct
2455    {
2456        #[inline]
2457        unsafe fn encode(
2458            self,
2459            encoder: &mut fidl::encoding::Encoder<'_, D>,
2460            offset: usize,
2461            _depth: fidl::encoding::Depth,
2462        ) -> fidl::Result<()> {
2463            encoder.debug_check_bounds::<EmptyStruct>(offset);
2464            encoder.write_num(0u8, offset);
2465            Ok(())
2466        }
2467    }
2468
2469    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
2470        #[inline(always)]
2471        fn new_empty() -> Self {
2472            Self
2473        }
2474
2475        #[inline]
2476        unsafe fn decode(
2477            &mut self,
2478            decoder: &mut fidl::encoding::Decoder<'_, D>,
2479            offset: usize,
2480            _depth: fidl::encoding::Depth,
2481        ) -> fidl::Result<()> {
2482            decoder.debug_check_bounds::<Self>(offset);
2483            match decoder.read_num::<u8>(offset) {
2484                0 => Ok(()),
2485                _ => Err(fidl::Error::Invalid),
2486            }
2487        }
2488    }
2489
2490    impl fidl::encoding::ValueTypeMarker for FscryptKeyIdentifier {
2491        type Borrowed<'a> = &'a Self;
2492        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2493            value
2494        }
2495    }
2496
2497    unsafe impl fidl::encoding::TypeMarker for FscryptKeyIdentifier {
2498        type Owned = Self;
2499
2500        #[inline(always)]
2501        fn inline_align(_context: fidl::encoding::Context) -> usize {
2502            1
2503        }
2504
2505        #[inline(always)]
2506        fn inline_size(_context: fidl::encoding::Context) -> usize {
2507            16
2508        }
2509        #[inline(always)]
2510        fn encode_is_copy() -> bool {
2511            true
2512        }
2513
2514        #[inline(always)]
2515        fn decode_is_copy() -> bool {
2516            true
2517        }
2518    }
2519
2520    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FscryptKeyIdentifier, D>
2521        for &FscryptKeyIdentifier
2522    {
2523        #[inline]
2524        unsafe fn encode(
2525            self,
2526            encoder: &mut fidl::encoding::Encoder<'_, D>,
2527            offset: usize,
2528            _depth: fidl::encoding::Depth,
2529        ) -> fidl::Result<()> {
2530            encoder.debug_check_bounds::<FscryptKeyIdentifier>(offset);
2531            unsafe {
2532                // Copy the object into the buffer.
2533                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2534                (buf_ptr as *mut FscryptKeyIdentifier)
2535                    .write_unaligned((self as *const FscryptKeyIdentifier).read());
2536                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2537                // done second because the memcpy will write garbage to these bytes.
2538            }
2539            Ok(())
2540        }
2541    }
2542    unsafe impl<
2543        D: fidl::encoding::ResourceDialect,
2544        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2545    > fidl::encoding::Encode<FscryptKeyIdentifier, D> for (T0,)
2546    {
2547        #[inline]
2548        unsafe fn encode(
2549            self,
2550            encoder: &mut fidl::encoding::Encoder<'_, D>,
2551            offset: usize,
2552            depth: fidl::encoding::Depth,
2553        ) -> fidl::Result<()> {
2554            encoder.debug_check_bounds::<FscryptKeyIdentifier>(offset);
2555            // Zero out padding regions. There's no need to apply masks
2556            // because the unmasked parts will be overwritten by fields.
2557            // Write the fields.
2558            self.0.encode(encoder, offset + 0, depth)?;
2559            Ok(())
2560        }
2561    }
2562
2563    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FscryptKeyIdentifier {
2564        #[inline(always)]
2565        fn new_empty() -> Self {
2566            Self { key_identifier: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D) }
2567        }
2568
2569        #[inline]
2570        unsafe fn decode(
2571            &mut self,
2572            decoder: &mut fidl::encoding::Decoder<'_, D>,
2573            offset: usize,
2574            _depth: fidl::encoding::Depth,
2575        ) -> fidl::Result<()> {
2576            decoder.debug_check_bounds::<Self>(offset);
2577            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2578            // Verify that padding bytes are zero.
2579            // Copy from the buffer into the object.
2580            unsafe {
2581                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2582            }
2583            Ok(())
2584        }
2585    }
2586
2587    impl fidl::encoding::ValueTypeMarker for FscryptKeyIdentifierAndNonce {
2588        type Borrowed<'a> = &'a Self;
2589        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2590            value
2591        }
2592    }
2593
2594    unsafe impl fidl::encoding::TypeMarker for FscryptKeyIdentifierAndNonce {
2595        type Owned = Self;
2596
2597        #[inline(always)]
2598        fn inline_align(_context: fidl::encoding::Context) -> usize {
2599            1
2600        }
2601
2602        #[inline(always)]
2603        fn inline_size(_context: fidl::encoding::Context) -> usize {
2604            32
2605        }
2606        #[inline(always)]
2607        fn encode_is_copy() -> bool {
2608            true
2609        }
2610
2611        #[inline(always)]
2612        fn decode_is_copy() -> bool {
2613            true
2614        }
2615    }
2616
2617    unsafe impl<D: fidl::encoding::ResourceDialect>
2618        fidl::encoding::Encode<FscryptKeyIdentifierAndNonce, D> for &FscryptKeyIdentifierAndNonce
2619    {
2620        #[inline]
2621        unsafe fn encode(
2622            self,
2623            encoder: &mut fidl::encoding::Encoder<'_, D>,
2624            offset: usize,
2625            _depth: fidl::encoding::Depth,
2626        ) -> fidl::Result<()> {
2627            encoder.debug_check_bounds::<FscryptKeyIdentifierAndNonce>(offset);
2628            unsafe {
2629                // Copy the object into the buffer.
2630                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2631                (buf_ptr as *mut FscryptKeyIdentifierAndNonce)
2632                    .write_unaligned((self as *const FscryptKeyIdentifierAndNonce).read());
2633                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2634                // done second because the memcpy will write garbage to these bytes.
2635            }
2636            Ok(())
2637        }
2638    }
2639    unsafe impl<
2640        D: fidl::encoding::ResourceDialect,
2641        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2642        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2643    > fidl::encoding::Encode<FscryptKeyIdentifierAndNonce, D> for (T0, T1)
2644    {
2645        #[inline]
2646        unsafe fn encode(
2647            self,
2648            encoder: &mut fidl::encoding::Encoder<'_, D>,
2649            offset: usize,
2650            depth: fidl::encoding::Depth,
2651        ) -> fidl::Result<()> {
2652            encoder.debug_check_bounds::<FscryptKeyIdentifierAndNonce>(offset);
2653            // Zero out padding regions. There's no need to apply masks
2654            // because the unmasked parts will be overwritten by fields.
2655            // Write the fields.
2656            self.0.encode(encoder, offset + 0, depth)?;
2657            self.1.encode(encoder, offset + 16, depth)?;
2658            Ok(())
2659        }
2660    }
2661
2662    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2663        for FscryptKeyIdentifierAndNonce
2664    {
2665        #[inline(always)]
2666        fn new_empty() -> Self {
2667            Self {
2668                key_identifier: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2669                nonce: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2670            }
2671        }
2672
2673        #[inline]
2674        unsafe fn decode(
2675            &mut self,
2676            decoder: &mut fidl::encoding::Decoder<'_, D>,
2677            offset: usize,
2678            _depth: fidl::encoding::Depth,
2679        ) -> fidl::Result<()> {
2680            decoder.debug_check_bounds::<Self>(offset);
2681            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2682            // Verify that padding bytes are zero.
2683            // Copy from the buffer into the object.
2684            unsafe {
2685                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2686            }
2687            Ok(())
2688        }
2689    }
2690
2691    impl fidl::encoding::ValueTypeMarker for FxfsKey {
2692        type Borrowed<'a> = &'a Self;
2693        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2694            value
2695        }
2696    }
2697
2698    unsafe impl fidl::encoding::TypeMarker for FxfsKey {
2699        type Owned = Self;
2700
2701        #[inline(always)]
2702        fn inline_align(_context: fidl::encoding::Context) -> usize {
2703            1
2704        }
2705
2706        #[inline(always)]
2707        fn inline_size(_context: fidl::encoding::Context) -> usize {
2708            64
2709        }
2710        #[inline(always)]
2711        fn encode_is_copy() -> bool {
2712            true
2713        }
2714
2715        #[inline(always)]
2716        fn decode_is_copy() -> bool {
2717            true
2718        }
2719    }
2720
2721    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FxfsKey, D> for &FxfsKey {
2722        #[inline]
2723        unsafe fn encode(
2724            self,
2725            encoder: &mut fidl::encoding::Encoder<'_, D>,
2726            offset: usize,
2727            _depth: fidl::encoding::Depth,
2728        ) -> fidl::Result<()> {
2729            encoder.debug_check_bounds::<FxfsKey>(offset);
2730            unsafe {
2731                // Copy the object into the buffer.
2732                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2733                (buf_ptr as *mut FxfsKey).write_unaligned((self as *const FxfsKey).read());
2734                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2735                // done second because the memcpy will write garbage to these bytes.
2736            }
2737            Ok(())
2738        }
2739    }
2740    unsafe impl<
2741        D: fidl::encoding::ResourceDialect,
2742        T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2743        T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 48>, D>,
2744    > fidl::encoding::Encode<FxfsKey, D> for (T0, T1)
2745    {
2746        #[inline]
2747        unsafe fn encode(
2748            self,
2749            encoder: &mut fidl::encoding::Encoder<'_, D>,
2750            offset: usize,
2751            depth: fidl::encoding::Depth,
2752        ) -> fidl::Result<()> {
2753            encoder.debug_check_bounds::<FxfsKey>(offset);
2754            // Zero out padding regions. There's no need to apply masks
2755            // because the unmasked parts will be overwritten by fields.
2756            // Write the fields.
2757            self.0.encode(encoder, offset + 0, depth)?;
2758            self.1.encode(encoder, offset + 16, depth)?;
2759            Ok(())
2760        }
2761    }
2762
2763    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FxfsKey {
2764        #[inline(always)]
2765        fn new_empty() -> Self {
2766            Self {
2767                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2768                wrapped_key: fidl::new_empty!(fidl::encoding::Array<u8, 48>, D),
2769            }
2770        }
2771
2772        #[inline]
2773        unsafe fn decode(
2774            &mut self,
2775            decoder: &mut fidl::encoding::Decoder<'_, D>,
2776            offset: usize,
2777            _depth: fidl::encoding::Depth,
2778        ) -> fidl::Result<()> {
2779            decoder.debug_check_bounds::<Self>(offset);
2780            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2781            // Verify that padding bytes are zero.
2782            // Copy from the buffer into the object.
2783            unsafe {
2784                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
2785            }
2786            Ok(())
2787        }
2788    }
2789
2790    impl fidl::encoding::ValueTypeMarker for ProjectIdClearForNodeRequest {
2791        type Borrowed<'a> = &'a Self;
2792        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2793            value
2794        }
2795    }
2796
2797    unsafe impl fidl::encoding::TypeMarker for ProjectIdClearForNodeRequest {
2798        type Owned = Self;
2799
2800        #[inline(always)]
2801        fn inline_align(_context: fidl::encoding::Context) -> usize {
2802            8
2803        }
2804
2805        #[inline(always)]
2806        fn inline_size(_context: fidl::encoding::Context) -> usize {
2807            8
2808        }
2809        #[inline(always)]
2810        fn encode_is_copy() -> bool {
2811            true
2812        }
2813
2814        #[inline(always)]
2815        fn decode_is_copy() -> bool {
2816            true
2817        }
2818    }
2819
2820    unsafe impl<D: fidl::encoding::ResourceDialect>
2821        fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for &ProjectIdClearForNodeRequest
2822    {
2823        #[inline]
2824        unsafe fn encode(
2825            self,
2826            encoder: &mut fidl::encoding::Encoder<'_, D>,
2827            offset: usize,
2828            _depth: fidl::encoding::Depth,
2829        ) -> fidl::Result<()> {
2830            encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
2831            unsafe {
2832                // Copy the object into the buffer.
2833                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2834                (buf_ptr as *mut ProjectIdClearForNodeRequest)
2835                    .write_unaligned((self as *const ProjectIdClearForNodeRequest).read());
2836                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2837                // done second because the memcpy will write garbage to these bytes.
2838            }
2839            Ok(())
2840        }
2841    }
2842    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2843        fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for (T0,)
2844    {
2845        #[inline]
2846        unsafe fn encode(
2847            self,
2848            encoder: &mut fidl::encoding::Encoder<'_, D>,
2849            offset: usize,
2850            depth: fidl::encoding::Depth,
2851        ) -> fidl::Result<()> {
2852            encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
2853            // Zero out padding regions. There's no need to apply masks
2854            // because the unmasked parts will be overwritten by fields.
2855            // Write the fields.
2856            self.0.encode(encoder, offset + 0, depth)?;
2857            Ok(())
2858        }
2859    }
2860
2861    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2862        for ProjectIdClearForNodeRequest
2863    {
2864        #[inline(always)]
2865        fn new_empty() -> Self {
2866            Self { node_id: fidl::new_empty!(u64, D) }
2867        }
2868
2869        #[inline]
2870        unsafe fn decode(
2871            &mut self,
2872            decoder: &mut fidl::encoding::Decoder<'_, D>,
2873            offset: usize,
2874            _depth: fidl::encoding::Depth,
2875        ) -> fidl::Result<()> {
2876            decoder.debug_check_bounds::<Self>(offset);
2877            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2878            // Verify that padding bytes are zero.
2879            // Copy from the buffer into the object.
2880            unsafe {
2881                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2882            }
2883            Ok(())
2884        }
2885    }
2886
2887    impl fidl::encoding::ValueTypeMarker for ProjectIdClearRequest {
2888        type Borrowed<'a> = &'a Self;
2889        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2890            value
2891        }
2892    }
2893
2894    unsafe impl fidl::encoding::TypeMarker for ProjectIdClearRequest {
2895        type Owned = Self;
2896
2897        #[inline(always)]
2898        fn inline_align(_context: fidl::encoding::Context) -> usize {
2899            8
2900        }
2901
2902        #[inline(always)]
2903        fn inline_size(_context: fidl::encoding::Context) -> usize {
2904            8
2905        }
2906        #[inline(always)]
2907        fn encode_is_copy() -> bool {
2908            true
2909        }
2910
2911        #[inline(always)]
2912        fn decode_is_copy() -> bool {
2913            true
2914        }
2915    }
2916
2917    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdClearRequest, D>
2918        for &ProjectIdClearRequest
2919    {
2920        #[inline]
2921        unsafe fn encode(
2922            self,
2923            encoder: &mut fidl::encoding::Encoder<'_, D>,
2924            offset: usize,
2925            _depth: fidl::encoding::Depth,
2926        ) -> fidl::Result<()> {
2927            encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
2928            unsafe {
2929                // Copy the object into the buffer.
2930                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2931                (buf_ptr as *mut ProjectIdClearRequest)
2932                    .write_unaligned((self as *const ProjectIdClearRequest).read());
2933                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2934                // done second because the memcpy will write garbage to these bytes.
2935            }
2936            Ok(())
2937        }
2938    }
2939    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2940        fidl::encoding::Encode<ProjectIdClearRequest, D> for (T0,)
2941    {
2942        #[inline]
2943        unsafe fn encode(
2944            self,
2945            encoder: &mut fidl::encoding::Encoder<'_, D>,
2946            offset: usize,
2947            depth: fidl::encoding::Depth,
2948        ) -> fidl::Result<()> {
2949            encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
2950            // Zero out padding regions. There's no need to apply masks
2951            // because the unmasked parts will be overwritten by fields.
2952            // Write the fields.
2953            self.0.encode(encoder, offset + 0, depth)?;
2954            Ok(())
2955        }
2956    }
2957
2958    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdClearRequest {
2959        #[inline(always)]
2960        fn new_empty() -> Self {
2961            Self { project_id: fidl::new_empty!(u64, D) }
2962        }
2963
2964        #[inline]
2965        unsafe fn decode(
2966            &mut self,
2967            decoder: &mut fidl::encoding::Decoder<'_, D>,
2968            offset: usize,
2969            _depth: fidl::encoding::Depth,
2970        ) -> fidl::Result<()> {
2971            decoder.debug_check_bounds::<Self>(offset);
2972            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2973            // Verify that padding bytes are zero.
2974            // Copy from the buffer into the object.
2975            unsafe {
2976                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2977            }
2978            Ok(())
2979        }
2980    }
2981
2982    impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeRequest {
2983        type Borrowed<'a> = &'a Self;
2984        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2985            value
2986        }
2987    }
2988
2989    unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeRequest {
2990        type Owned = Self;
2991
2992        #[inline(always)]
2993        fn inline_align(_context: fidl::encoding::Context) -> usize {
2994            8
2995        }
2996
2997        #[inline(always)]
2998        fn inline_size(_context: fidl::encoding::Context) -> usize {
2999            8
3000        }
3001        #[inline(always)]
3002        fn encode_is_copy() -> bool {
3003            true
3004        }
3005
3006        #[inline(always)]
3007        fn decode_is_copy() -> bool {
3008            true
3009        }
3010    }
3011
3012    unsafe impl<D: fidl::encoding::ResourceDialect>
3013        fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for &ProjectIdGetForNodeRequest
3014    {
3015        #[inline]
3016        unsafe fn encode(
3017            self,
3018            encoder: &mut fidl::encoding::Encoder<'_, D>,
3019            offset: usize,
3020            _depth: fidl::encoding::Depth,
3021        ) -> fidl::Result<()> {
3022            encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
3023            unsafe {
3024                // Copy the object into the buffer.
3025                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3026                (buf_ptr as *mut ProjectIdGetForNodeRequest)
3027                    .write_unaligned((self as *const ProjectIdGetForNodeRequest).read());
3028                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3029                // done second because the memcpy will write garbage to these bytes.
3030            }
3031            Ok(())
3032        }
3033    }
3034    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3035        fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for (T0,)
3036    {
3037        #[inline]
3038        unsafe fn encode(
3039            self,
3040            encoder: &mut fidl::encoding::Encoder<'_, D>,
3041            offset: usize,
3042            depth: fidl::encoding::Depth,
3043        ) -> fidl::Result<()> {
3044            encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
3045            // Zero out padding regions. There's no need to apply masks
3046            // because the unmasked parts will be overwritten by fields.
3047            // Write the fields.
3048            self.0.encode(encoder, offset + 0, depth)?;
3049            Ok(())
3050        }
3051    }
3052
3053    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3054        for ProjectIdGetForNodeRequest
3055    {
3056        #[inline(always)]
3057        fn new_empty() -> Self {
3058            Self { node_id: fidl::new_empty!(u64, D) }
3059        }
3060
3061        #[inline]
3062        unsafe fn decode(
3063            &mut self,
3064            decoder: &mut fidl::encoding::Decoder<'_, D>,
3065            offset: usize,
3066            _depth: fidl::encoding::Depth,
3067        ) -> fidl::Result<()> {
3068            decoder.debug_check_bounds::<Self>(offset);
3069            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3070            // Verify that padding bytes are zero.
3071            // Copy from the buffer into the object.
3072            unsafe {
3073                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3074            }
3075            Ok(())
3076        }
3077    }
3078
3079    impl fidl::encoding::ValueTypeMarker for ProjectIdInfoRequest {
3080        type Borrowed<'a> = &'a Self;
3081        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3082            value
3083        }
3084    }
3085
3086    unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoRequest {
3087        type Owned = Self;
3088
3089        #[inline(always)]
3090        fn inline_align(_context: fidl::encoding::Context) -> usize {
3091            8
3092        }
3093
3094        #[inline(always)]
3095        fn inline_size(_context: fidl::encoding::Context) -> usize {
3096            8
3097        }
3098        #[inline(always)]
3099        fn encode_is_copy() -> bool {
3100            true
3101        }
3102
3103        #[inline(always)]
3104        fn decode_is_copy() -> bool {
3105            true
3106        }
3107    }
3108
3109    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoRequest, D>
3110        for &ProjectIdInfoRequest
3111    {
3112        #[inline]
3113        unsafe fn encode(
3114            self,
3115            encoder: &mut fidl::encoding::Encoder<'_, D>,
3116            offset: usize,
3117            _depth: fidl::encoding::Depth,
3118        ) -> fidl::Result<()> {
3119            encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
3120            unsafe {
3121                // Copy the object into the buffer.
3122                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3123                (buf_ptr as *mut ProjectIdInfoRequest)
3124                    .write_unaligned((self as *const ProjectIdInfoRequest).read());
3125                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3126                // done second because the memcpy will write garbage to these bytes.
3127            }
3128            Ok(())
3129        }
3130    }
3131    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3132        fidl::encoding::Encode<ProjectIdInfoRequest, D> for (T0,)
3133    {
3134        #[inline]
3135        unsafe fn encode(
3136            self,
3137            encoder: &mut fidl::encoding::Encoder<'_, D>,
3138            offset: usize,
3139            depth: fidl::encoding::Depth,
3140        ) -> fidl::Result<()> {
3141            encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
3142            // Zero out padding regions. There's no need to apply masks
3143            // because the unmasked parts will be overwritten by fields.
3144            // Write the fields.
3145            self.0.encode(encoder, offset + 0, depth)?;
3146            Ok(())
3147        }
3148    }
3149
3150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoRequest {
3151        #[inline(always)]
3152        fn new_empty() -> Self {
3153            Self { project_id: fidl::new_empty!(u64, D) }
3154        }
3155
3156        #[inline]
3157        unsafe fn decode(
3158            &mut self,
3159            decoder: &mut fidl::encoding::Decoder<'_, D>,
3160            offset: usize,
3161            _depth: fidl::encoding::Depth,
3162        ) -> fidl::Result<()> {
3163            decoder.debug_check_bounds::<Self>(offset);
3164            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3165            // Verify that padding bytes are zero.
3166            // Copy from the buffer into the object.
3167            unsafe {
3168                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3169            }
3170            Ok(())
3171        }
3172    }
3173
3174    impl fidl::encoding::ValueTypeMarker for ProjectIdListRequest {
3175        type Borrowed<'a> = &'a Self;
3176        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3177            value
3178        }
3179    }
3180
3181    unsafe impl fidl::encoding::TypeMarker for ProjectIdListRequest {
3182        type Owned = Self;
3183
3184        #[inline(always)]
3185        fn inline_align(_context: fidl::encoding::Context) -> usize {
3186            8
3187        }
3188
3189        #[inline(always)]
3190        fn inline_size(_context: fidl::encoding::Context) -> usize {
3191            8
3192        }
3193    }
3194
3195    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListRequest, D>
3196        for &ProjectIdListRequest
3197    {
3198        #[inline]
3199        unsafe fn encode(
3200            self,
3201            encoder: &mut fidl::encoding::Encoder<'_, D>,
3202            offset: usize,
3203            _depth: fidl::encoding::Depth,
3204        ) -> fidl::Result<()> {
3205            encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
3206            // Delegate to tuple encoding.
3207            fidl::encoding::Encode::<ProjectIdListRequest, D>::encode(
3208                (
3209                    <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.token),
3210                ),
3211                encoder, offset, _depth
3212            )
3213        }
3214    }
3215    unsafe impl<
3216        D: fidl::encoding::ResourceDialect,
3217        T0: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
3218    > fidl::encoding::Encode<ProjectIdListRequest, D> for (T0,)
3219    {
3220        #[inline]
3221        unsafe fn encode(
3222            self,
3223            encoder: &mut fidl::encoding::Encoder<'_, D>,
3224            offset: usize,
3225            depth: fidl::encoding::Depth,
3226        ) -> fidl::Result<()> {
3227            encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
3228            // Zero out padding regions. There's no need to apply masks
3229            // because the unmasked parts will be overwritten by fields.
3230            // Write the fields.
3231            self.0.encode(encoder, offset + 0, depth)?;
3232            Ok(())
3233        }
3234    }
3235
3236    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListRequest {
3237        #[inline(always)]
3238        fn new_empty() -> Self {
3239            Self { token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D) }
3240        }
3241
3242        #[inline]
3243        unsafe fn decode(
3244            &mut self,
3245            decoder: &mut fidl::encoding::Decoder<'_, D>,
3246            offset: usize,
3247            _depth: fidl::encoding::Depth,
3248        ) -> fidl::Result<()> {
3249            decoder.debug_check_bounds::<Self>(offset);
3250            // Verify that padding bytes are zero.
3251            fidl::decode!(
3252                fidl::encoding::Boxed<ProjectIterToken>,
3253                D,
3254                &mut self.token,
3255                decoder,
3256                offset + 0,
3257                _depth
3258            )?;
3259            Ok(())
3260        }
3261    }
3262
3263    impl fidl::encoding::ValueTypeMarker for ProjectIdSetForNodeRequest {
3264        type Borrowed<'a> = &'a Self;
3265        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3266            value
3267        }
3268    }
3269
3270    unsafe impl fidl::encoding::TypeMarker for ProjectIdSetForNodeRequest {
3271        type Owned = Self;
3272
3273        #[inline(always)]
3274        fn inline_align(_context: fidl::encoding::Context) -> usize {
3275            8
3276        }
3277
3278        #[inline(always)]
3279        fn inline_size(_context: fidl::encoding::Context) -> usize {
3280            16
3281        }
3282        #[inline(always)]
3283        fn encode_is_copy() -> bool {
3284            true
3285        }
3286
3287        #[inline(always)]
3288        fn decode_is_copy() -> bool {
3289            true
3290        }
3291    }
3292
3293    unsafe impl<D: fidl::encoding::ResourceDialect>
3294        fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for &ProjectIdSetForNodeRequest
3295    {
3296        #[inline]
3297        unsafe fn encode(
3298            self,
3299            encoder: &mut fidl::encoding::Encoder<'_, D>,
3300            offset: usize,
3301            _depth: fidl::encoding::Depth,
3302        ) -> fidl::Result<()> {
3303            encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
3304            unsafe {
3305                // Copy the object into the buffer.
3306                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3307                (buf_ptr as *mut ProjectIdSetForNodeRequest)
3308                    .write_unaligned((self as *const ProjectIdSetForNodeRequest).read());
3309                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3310                // done second because the memcpy will write garbage to these bytes.
3311            }
3312            Ok(())
3313        }
3314    }
3315    unsafe impl<
3316        D: fidl::encoding::ResourceDialect,
3317        T0: fidl::encoding::Encode<u64, D>,
3318        T1: fidl::encoding::Encode<u64, D>,
3319    > fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for (T0, T1)
3320    {
3321        #[inline]
3322        unsafe fn encode(
3323            self,
3324            encoder: &mut fidl::encoding::Encoder<'_, D>,
3325            offset: usize,
3326            depth: fidl::encoding::Depth,
3327        ) -> fidl::Result<()> {
3328            encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
3329            // Zero out padding regions. There's no need to apply masks
3330            // because the unmasked parts will be overwritten by fields.
3331            // Write the fields.
3332            self.0.encode(encoder, offset + 0, depth)?;
3333            self.1.encode(encoder, offset + 8, depth)?;
3334            Ok(())
3335        }
3336    }
3337
3338    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3339        for ProjectIdSetForNodeRequest
3340    {
3341        #[inline(always)]
3342        fn new_empty() -> Self {
3343            Self { node_id: fidl::new_empty!(u64, D), project_id: fidl::new_empty!(u64, D) }
3344        }
3345
3346        #[inline]
3347        unsafe fn decode(
3348            &mut self,
3349            decoder: &mut fidl::encoding::Decoder<'_, D>,
3350            offset: usize,
3351            _depth: fidl::encoding::Depth,
3352        ) -> fidl::Result<()> {
3353            decoder.debug_check_bounds::<Self>(offset);
3354            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3355            // Verify that padding bytes are zero.
3356            // Copy from the buffer into the object.
3357            unsafe {
3358                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
3359            }
3360            Ok(())
3361        }
3362    }
3363
3364    impl fidl::encoding::ValueTypeMarker for ProjectIdSetLimitRequest {
3365        type Borrowed<'a> = &'a Self;
3366        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3367            value
3368        }
3369    }
3370
3371    unsafe impl fidl::encoding::TypeMarker for ProjectIdSetLimitRequest {
3372        type Owned = Self;
3373
3374        #[inline(always)]
3375        fn inline_align(_context: fidl::encoding::Context) -> usize {
3376            8
3377        }
3378
3379        #[inline(always)]
3380        fn inline_size(_context: fidl::encoding::Context) -> usize {
3381            24
3382        }
3383        #[inline(always)]
3384        fn encode_is_copy() -> bool {
3385            true
3386        }
3387
3388        #[inline(always)]
3389        fn decode_is_copy() -> bool {
3390            true
3391        }
3392    }
3393
3394    unsafe impl<D: fidl::encoding::ResourceDialect>
3395        fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for &ProjectIdSetLimitRequest
3396    {
3397        #[inline]
3398        unsafe fn encode(
3399            self,
3400            encoder: &mut fidl::encoding::Encoder<'_, D>,
3401            offset: usize,
3402            _depth: fidl::encoding::Depth,
3403        ) -> fidl::Result<()> {
3404            encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
3405            unsafe {
3406                // Copy the object into the buffer.
3407                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3408                (buf_ptr as *mut ProjectIdSetLimitRequest)
3409                    .write_unaligned((self as *const ProjectIdSetLimitRequest).read());
3410                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3411                // done second because the memcpy will write garbage to these bytes.
3412            }
3413            Ok(())
3414        }
3415    }
3416    unsafe impl<
3417        D: fidl::encoding::ResourceDialect,
3418        T0: fidl::encoding::Encode<u64, D>,
3419        T1: fidl::encoding::Encode<u64, D>,
3420        T2: fidl::encoding::Encode<u64, D>,
3421    > fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for (T0, T1, T2)
3422    {
3423        #[inline]
3424        unsafe fn encode(
3425            self,
3426            encoder: &mut fidl::encoding::Encoder<'_, D>,
3427            offset: usize,
3428            depth: fidl::encoding::Depth,
3429        ) -> fidl::Result<()> {
3430            encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
3431            // Zero out padding regions. There's no need to apply masks
3432            // because the unmasked parts will be overwritten by fields.
3433            // Write the fields.
3434            self.0.encode(encoder, offset + 0, depth)?;
3435            self.1.encode(encoder, offset + 8, depth)?;
3436            self.2.encode(encoder, offset + 16, depth)?;
3437            Ok(())
3438        }
3439    }
3440
3441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3442        for ProjectIdSetLimitRequest
3443    {
3444        #[inline(always)]
3445        fn new_empty() -> Self {
3446            Self {
3447                project_id: fidl::new_empty!(u64, D),
3448                bytes: fidl::new_empty!(u64, D),
3449                nodes: fidl::new_empty!(u64, D),
3450            }
3451        }
3452
3453        #[inline]
3454        unsafe fn decode(
3455            &mut self,
3456            decoder: &mut fidl::encoding::Decoder<'_, D>,
3457            offset: usize,
3458            _depth: fidl::encoding::Depth,
3459        ) -> fidl::Result<()> {
3460            decoder.debug_check_bounds::<Self>(offset);
3461            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3462            // Verify that padding bytes are zero.
3463            // Copy from the buffer into the object.
3464            unsafe {
3465                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
3466            }
3467            Ok(())
3468        }
3469    }
3470
3471    impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeResponse {
3472        type Borrowed<'a> = &'a Self;
3473        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3474            value
3475        }
3476    }
3477
3478    unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeResponse {
3479        type Owned = Self;
3480
3481        #[inline(always)]
3482        fn inline_align(_context: fidl::encoding::Context) -> usize {
3483            8
3484        }
3485
3486        #[inline(always)]
3487        fn inline_size(_context: fidl::encoding::Context) -> usize {
3488            8
3489        }
3490        #[inline(always)]
3491        fn encode_is_copy() -> bool {
3492            true
3493        }
3494
3495        #[inline(always)]
3496        fn decode_is_copy() -> bool {
3497            true
3498        }
3499    }
3500
3501    unsafe impl<D: fidl::encoding::ResourceDialect>
3502        fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for &ProjectIdGetForNodeResponse
3503    {
3504        #[inline]
3505        unsafe fn encode(
3506            self,
3507            encoder: &mut fidl::encoding::Encoder<'_, D>,
3508            offset: usize,
3509            _depth: fidl::encoding::Depth,
3510        ) -> fidl::Result<()> {
3511            encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
3512            unsafe {
3513                // Copy the object into the buffer.
3514                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3515                (buf_ptr as *mut ProjectIdGetForNodeResponse)
3516                    .write_unaligned((self as *const ProjectIdGetForNodeResponse).read());
3517                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3518                // done second because the memcpy will write garbage to these bytes.
3519            }
3520            Ok(())
3521        }
3522    }
3523    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3524        fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for (T0,)
3525    {
3526        #[inline]
3527        unsafe fn encode(
3528            self,
3529            encoder: &mut fidl::encoding::Encoder<'_, D>,
3530            offset: usize,
3531            depth: fidl::encoding::Depth,
3532        ) -> fidl::Result<()> {
3533            encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
3534            // Zero out padding regions. There's no need to apply masks
3535            // because the unmasked parts will be overwritten by fields.
3536            // Write the fields.
3537            self.0.encode(encoder, offset + 0, depth)?;
3538            Ok(())
3539        }
3540    }
3541
3542    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3543        for ProjectIdGetForNodeResponse
3544    {
3545        #[inline(always)]
3546        fn new_empty() -> Self {
3547            Self { project_id: fidl::new_empty!(u64, D) }
3548        }
3549
3550        #[inline]
3551        unsafe fn decode(
3552            &mut self,
3553            decoder: &mut fidl::encoding::Decoder<'_, D>,
3554            offset: usize,
3555            _depth: fidl::encoding::Depth,
3556        ) -> fidl::Result<()> {
3557            decoder.debug_check_bounds::<Self>(offset);
3558            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3559            // Verify that padding bytes are zero.
3560            // Copy from the buffer into the object.
3561            unsafe {
3562                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3563            }
3564            Ok(())
3565        }
3566    }
3567
3568    impl fidl::encoding::ValueTypeMarker for ProjectIdInfoResponse {
3569        type Borrowed<'a> = &'a Self;
3570        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3571            value
3572        }
3573    }
3574
3575    unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoResponse {
3576        type Owned = Self;
3577
3578        #[inline(always)]
3579        fn inline_align(_context: fidl::encoding::Context) -> usize {
3580            8
3581        }
3582
3583        #[inline(always)]
3584        fn inline_size(_context: fidl::encoding::Context) -> usize {
3585            32
3586        }
3587        #[inline(always)]
3588        fn encode_is_copy() -> bool {
3589            true
3590        }
3591
3592        #[inline(always)]
3593        fn decode_is_copy() -> bool {
3594            true
3595        }
3596    }
3597
3598    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoResponse, D>
3599        for &ProjectIdInfoResponse
3600    {
3601        #[inline]
3602        unsafe fn encode(
3603            self,
3604            encoder: &mut fidl::encoding::Encoder<'_, D>,
3605            offset: usize,
3606            _depth: fidl::encoding::Depth,
3607        ) -> fidl::Result<()> {
3608            encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
3609            unsafe {
3610                // Copy the object into the buffer.
3611                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3612                (buf_ptr as *mut ProjectIdInfoResponse)
3613                    .write_unaligned((self as *const ProjectIdInfoResponse).read());
3614                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3615                // done second because the memcpy will write garbage to these bytes.
3616            }
3617            Ok(())
3618        }
3619    }
3620    unsafe impl<
3621        D: fidl::encoding::ResourceDialect,
3622        T0: fidl::encoding::Encode<BytesAndNodes, D>,
3623        T1: fidl::encoding::Encode<BytesAndNodes, D>,
3624    > fidl::encoding::Encode<ProjectIdInfoResponse, D> for (T0, T1)
3625    {
3626        #[inline]
3627        unsafe fn encode(
3628            self,
3629            encoder: &mut fidl::encoding::Encoder<'_, D>,
3630            offset: usize,
3631            depth: fidl::encoding::Depth,
3632        ) -> fidl::Result<()> {
3633            encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
3634            // Zero out padding regions. There's no need to apply masks
3635            // because the unmasked parts will be overwritten by fields.
3636            // Write the fields.
3637            self.0.encode(encoder, offset + 0, depth)?;
3638            self.1.encode(encoder, offset + 16, depth)?;
3639            Ok(())
3640        }
3641    }
3642
3643    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoResponse {
3644        #[inline(always)]
3645        fn new_empty() -> Self {
3646            Self {
3647                limit: fidl::new_empty!(BytesAndNodes, D),
3648                usage: fidl::new_empty!(BytesAndNodes, D),
3649            }
3650        }
3651
3652        #[inline]
3653        unsafe fn decode(
3654            &mut self,
3655            decoder: &mut fidl::encoding::Decoder<'_, D>,
3656            offset: usize,
3657            _depth: fidl::encoding::Depth,
3658        ) -> fidl::Result<()> {
3659            decoder.debug_check_bounds::<Self>(offset);
3660            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3661            // Verify that padding bytes are zero.
3662            // Copy from the buffer into the object.
3663            unsafe {
3664                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
3665            }
3666            Ok(())
3667        }
3668    }
3669
3670    impl fidl::encoding::ValueTypeMarker for ProjectIdListResponse {
3671        type Borrowed<'a> = &'a Self;
3672        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3673            value
3674        }
3675    }
3676
3677    unsafe impl fidl::encoding::TypeMarker for ProjectIdListResponse {
3678        type Owned = Self;
3679
3680        #[inline(always)]
3681        fn inline_align(_context: fidl::encoding::Context) -> usize {
3682            8
3683        }
3684
3685        #[inline(always)]
3686        fn inline_size(_context: fidl::encoding::Context) -> usize {
3687            24
3688        }
3689    }
3690
3691    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListResponse, D>
3692        for &ProjectIdListResponse
3693    {
3694        #[inline]
3695        unsafe fn encode(
3696            self,
3697            encoder: &mut fidl::encoding::Encoder<'_, D>,
3698            offset: usize,
3699            _depth: fidl::encoding::Depth,
3700        ) -> fidl::Result<()> {
3701            encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
3702            // Delegate to tuple encoding.
3703            fidl::encoding::Encode::<ProjectIdListResponse, D>::encode(
3704                (
3705                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.entries),
3706                    <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.next_token),
3707                ),
3708                encoder, offset, _depth
3709            )
3710        }
3711    }
3712    unsafe impl<
3713        D: fidl::encoding::ResourceDialect,
3714        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
3715        T1: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
3716    > fidl::encoding::Encode<ProjectIdListResponse, D> for (T0, T1)
3717    {
3718        #[inline]
3719        unsafe fn encode(
3720            self,
3721            encoder: &mut fidl::encoding::Encoder<'_, D>,
3722            offset: usize,
3723            depth: fidl::encoding::Depth,
3724        ) -> fidl::Result<()> {
3725            encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
3726            // Zero out padding regions. There's no need to apply masks
3727            // because the unmasked parts will be overwritten by fields.
3728            // Write the fields.
3729            self.0.encode(encoder, offset + 0, depth)?;
3730            self.1.encode(encoder, offset + 16, depth)?;
3731            Ok(())
3732        }
3733    }
3734
3735    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListResponse {
3736        #[inline(always)]
3737        fn new_empty() -> Self {
3738            Self {
3739                entries: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
3740                next_token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D),
3741            }
3742        }
3743
3744        #[inline]
3745        unsafe fn decode(
3746            &mut self,
3747            decoder: &mut fidl::encoding::Decoder<'_, D>,
3748            offset: usize,
3749            _depth: fidl::encoding::Depth,
3750        ) -> fidl::Result<()> {
3751            decoder.debug_check_bounds::<Self>(offset);
3752            // Verify that padding bytes are zero.
3753            fidl::decode!(
3754                fidl::encoding::UnboundedVector<u64>,
3755                D,
3756                &mut self.entries,
3757                decoder,
3758                offset + 0,
3759                _depth
3760            )?;
3761            fidl::decode!(
3762                fidl::encoding::Boxed<ProjectIterToken>,
3763                D,
3764                &mut self.next_token,
3765                decoder,
3766                offset + 16,
3767                _depth
3768            )?;
3769            Ok(())
3770        }
3771    }
3772
3773    impl fidl::encoding::ValueTypeMarker for ProjectIterToken {
3774        type Borrowed<'a> = &'a Self;
3775        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3776            value
3777        }
3778    }
3779
3780    unsafe impl fidl::encoding::TypeMarker for ProjectIterToken {
3781        type Owned = Self;
3782
3783        #[inline(always)]
3784        fn inline_align(_context: fidl::encoding::Context) -> usize {
3785            8
3786        }
3787
3788        #[inline(always)]
3789        fn inline_size(_context: fidl::encoding::Context) -> usize {
3790            8
3791        }
3792        #[inline(always)]
3793        fn encode_is_copy() -> bool {
3794            true
3795        }
3796
3797        #[inline(always)]
3798        fn decode_is_copy() -> bool {
3799            true
3800        }
3801    }
3802
3803    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIterToken, D>
3804        for &ProjectIterToken
3805    {
3806        #[inline]
3807        unsafe fn encode(
3808            self,
3809            encoder: &mut fidl::encoding::Encoder<'_, D>,
3810            offset: usize,
3811            _depth: fidl::encoding::Depth,
3812        ) -> fidl::Result<()> {
3813            encoder.debug_check_bounds::<ProjectIterToken>(offset);
3814            unsafe {
3815                // Copy the object into the buffer.
3816                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3817                (buf_ptr as *mut ProjectIterToken)
3818                    .write_unaligned((self as *const ProjectIterToken).read());
3819                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
3820                // done second because the memcpy will write garbage to these bytes.
3821            }
3822            Ok(())
3823        }
3824    }
3825    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3826        fidl::encoding::Encode<ProjectIterToken, D> for (T0,)
3827    {
3828        #[inline]
3829        unsafe fn encode(
3830            self,
3831            encoder: &mut fidl::encoding::Encoder<'_, D>,
3832            offset: usize,
3833            depth: fidl::encoding::Depth,
3834        ) -> fidl::Result<()> {
3835            encoder.debug_check_bounds::<ProjectIterToken>(offset);
3836            // Zero out padding regions. There's no need to apply masks
3837            // because the unmasked parts will be overwritten by fields.
3838            // Write the fields.
3839            self.0.encode(encoder, offset + 0, depth)?;
3840            Ok(())
3841        }
3842    }
3843
3844    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIterToken {
3845        #[inline(always)]
3846        fn new_empty() -> Self {
3847            Self { value: fidl::new_empty!(u64, D) }
3848        }
3849
3850        #[inline]
3851        unsafe fn decode(
3852            &mut self,
3853            decoder: &mut fidl::encoding::Decoder<'_, D>,
3854            offset: usize,
3855            _depth: fidl::encoding::Depth,
3856        ) -> fidl::Result<()> {
3857            decoder.debug_check_bounds::<Self>(offset);
3858            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3859            // Verify that padding bytes are zero.
3860            // Copy from the buffer into the object.
3861            unsafe {
3862                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3863            }
3864            Ok(())
3865        }
3866    }
3867
3868    impl fidl::encoding::ValueTypeMarker for VolumeInstallerInstallRequest {
3869        type Borrowed<'a> = &'a Self;
3870        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3871            value
3872        }
3873    }
3874
3875    unsafe impl fidl::encoding::TypeMarker for VolumeInstallerInstallRequest {
3876        type Owned = Self;
3877
3878        #[inline(always)]
3879        fn inline_align(_context: fidl::encoding::Context) -> usize {
3880            8
3881        }
3882
3883        #[inline(always)]
3884        fn inline_size(_context: fidl::encoding::Context) -> usize {
3885            48
3886        }
3887    }
3888
3889    unsafe impl<D: fidl::encoding::ResourceDialect>
3890        fidl::encoding::Encode<VolumeInstallerInstallRequest, D>
3891        for &VolumeInstallerInstallRequest
3892    {
3893        #[inline]
3894        unsafe fn encode(
3895            self,
3896            encoder: &mut fidl::encoding::Encoder<'_, D>,
3897            offset: usize,
3898            _depth: fidl::encoding::Depth,
3899        ) -> fidl::Result<()> {
3900            encoder.debug_check_bounds::<VolumeInstallerInstallRequest>(offset);
3901            // Delegate to tuple encoding.
3902            fidl::encoding::Encode::<VolumeInstallerInstallRequest, D>::encode(
3903                (
3904                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
3905                        &self.src,
3906                    ),
3907                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
3908                        &self.image_file,
3909                    ),
3910                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
3911                        &self.dst,
3912                    ),
3913                ),
3914                encoder,
3915                offset,
3916                _depth,
3917            )
3918        }
3919    }
3920    unsafe impl<
3921        D: fidl::encoding::ResourceDialect,
3922        T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
3923        T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
3924        T2: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
3925    > fidl::encoding::Encode<VolumeInstallerInstallRequest, D> for (T0, T1, T2)
3926    {
3927        #[inline]
3928        unsafe fn encode(
3929            self,
3930            encoder: &mut fidl::encoding::Encoder<'_, D>,
3931            offset: usize,
3932            depth: fidl::encoding::Depth,
3933        ) -> fidl::Result<()> {
3934            encoder.debug_check_bounds::<VolumeInstallerInstallRequest>(offset);
3935            // Zero out padding regions. There's no need to apply masks
3936            // because the unmasked parts will be overwritten by fields.
3937            // Write the fields.
3938            self.0.encode(encoder, offset + 0, depth)?;
3939            self.1.encode(encoder, offset + 16, depth)?;
3940            self.2.encode(encoder, offset + 32, depth)?;
3941            Ok(())
3942        }
3943    }
3944
3945    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3946        for VolumeInstallerInstallRequest
3947    {
3948        #[inline(always)]
3949        fn new_empty() -> Self {
3950            Self {
3951                src: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
3952                image_file: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
3953                dst: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
3954            }
3955        }
3956
3957        #[inline]
3958        unsafe fn decode(
3959            &mut self,
3960            decoder: &mut fidl::encoding::Decoder<'_, D>,
3961            offset: usize,
3962            _depth: fidl::encoding::Depth,
3963        ) -> fidl::Result<()> {
3964            decoder.debug_check_bounds::<Self>(offset);
3965            // Verify that padding bytes are zero.
3966            fidl::decode!(
3967                fidl::encoding::BoundedString<255>,
3968                D,
3969                &mut self.src,
3970                decoder,
3971                offset + 0,
3972                _depth
3973            )?;
3974            fidl::decode!(
3975                fidl::encoding::BoundedString<255>,
3976                D,
3977                &mut self.image_file,
3978                decoder,
3979                offset + 16,
3980                _depth
3981            )?;
3982            fidl::decode!(
3983                fidl::encoding::BoundedString<255>,
3984                D,
3985                &mut self.dst,
3986                decoder,
3987                offset + 32,
3988                _depth
3989            )?;
3990            Ok(())
3991        }
3992    }
3993
3994    impl CryptSettings {
3995        #[inline(always)]
3996        fn max_ordinal_present(&self) -> u64 {
3997            if let Some(_) = self.active_metadata_wrapping_key_id {
3998                return 2;
3999            }
4000            if let Some(_) = self.active_data_wrapping_key_id {
4001                return 1;
4002            }
4003            0
4004        }
4005    }
4006
4007    impl fidl::encoding::ValueTypeMarker for CryptSettings {
4008        type Borrowed<'a> = &'a Self;
4009        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4010            value
4011        }
4012    }
4013
4014    unsafe impl fidl::encoding::TypeMarker for CryptSettings {
4015        type Owned = Self;
4016
4017        #[inline(always)]
4018        fn inline_align(_context: fidl::encoding::Context) -> usize {
4019            8
4020        }
4021
4022        #[inline(always)]
4023        fn inline_size(_context: fidl::encoding::Context) -> usize {
4024            16
4025        }
4026    }
4027
4028    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptSettings, D>
4029        for &CryptSettings
4030    {
4031        unsafe fn encode(
4032            self,
4033            encoder: &mut fidl::encoding::Encoder<'_, D>,
4034            offset: usize,
4035            mut depth: fidl::encoding::Depth,
4036        ) -> fidl::Result<()> {
4037            encoder.debug_check_bounds::<CryptSettings>(offset);
4038            // Vector header
4039            let max_ordinal: u64 = self.max_ordinal_present();
4040            encoder.write_num(max_ordinal, offset);
4041            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4042            // Calling encoder.out_of_line_offset(0) is not allowed.
4043            if max_ordinal == 0 {
4044                return Ok(());
4045            }
4046            depth.increment()?;
4047            let envelope_size = 8;
4048            let bytes_len = max_ordinal as usize * envelope_size;
4049            #[allow(unused_variables)]
4050            let offset = encoder.out_of_line_offset(bytes_len);
4051            let mut _prev_end_offset: usize = 0;
4052            if 1 > max_ordinal {
4053                return Ok(());
4054            }
4055
4056            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4057            // are envelope_size bytes.
4058            let cur_offset: usize = (1 - 1) * envelope_size;
4059
4060            // Zero reserved fields.
4061            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4062
4063            // Safety:
4064            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4065            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4066            //   envelope_size bytes, there is always sufficient room.
4067            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
4068                self.active_data_wrapping_key_id.as_ref().map(
4069                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
4070                ),
4071                encoder,
4072                offset + cur_offset,
4073                depth,
4074            )?;
4075
4076            _prev_end_offset = cur_offset + envelope_size;
4077            if 2 > max_ordinal {
4078                return Ok(());
4079            }
4080
4081            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4082            // are envelope_size bytes.
4083            let cur_offset: usize = (2 - 1) * envelope_size;
4084
4085            // Zero reserved fields.
4086            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4087
4088            // Safety:
4089            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4090            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4091            //   envelope_size bytes, there is always sufficient room.
4092            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
4093                self.active_metadata_wrapping_key_id.as_ref().map(
4094                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
4095                ),
4096                encoder,
4097                offset + cur_offset,
4098                depth,
4099            )?;
4100
4101            _prev_end_offset = cur_offset + envelope_size;
4102
4103            Ok(())
4104        }
4105    }
4106
4107    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptSettings {
4108        #[inline(always)]
4109        fn new_empty() -> Self {
4110            Self::default()
4111        }
4112
4113        unsafe fn decode(
4114            &mut self,
4115            decoder: &mut fidl::encoding::Decoder<'_, D>,
4116            offset: usize,
4117            mut depth: fidl::encoding::Depth,
4118        ) -> fidl::Result<()> {
4119            decoder.debug_check_bounds::<Self>(offset);
4120            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4121                None => return Err(fidl::Error::NotNullable),
4122                Some(len) => len,
4123            };
4124            // Calling decoder.out_of_line_offset(0) is not allowed.
4125            if len == 0 {
4126                return Ok(());
4127            };
4128            depth.increment()?;
4129            let envelope_size = 8;
4130            let bytes_len = len * envelope_size;
4131            let offset = decoder.out_of_line_offset(bytes_len)?;
4132            // Decode the envelope for each type.
4133            let mut _next_ordinal_to_read = 0;
4134            let mut next_offset = offset;
4135            let end_offset = offset + bytes_len;
4136            _next_ordinal_to_read += 1;
4137            if next_offset >= end_offset {
4138                return Ok(());
4139            }
4140
4141            // Decode unknown envelopes for gaps in ordinals.
4142            while _next_ordinal_to_read < 1 {
4143                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4144                _next_ordinal_to_read += 1;
4145                next_offset += envelope_size;
4146            }
4147
4148            let next_out_of_line = decoder.next_out_of_line();
4149            let handles_before = decoder.remaining_handles();
4150            if let Some((inlined, num_bytes, num_handles)) =
4151                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4152            {
4153                let member_inline_size =
4154                    <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
4155                        decoder.context,
4156                    );
4157                if inlined != (member_inline_size <= 4) {
4158                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4159                }
4160                let inner_offset;
4161                let mut inner_depth = depth.clone();
4162                if inlined {
4163                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4164                    inner_offset = next_offset;
4165                } else {
4166                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4167                    inner_depth.increment()?;
4168                }
4169                let val_ref = self
4170                    .active_data_wrapping_key_id
4171                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
4172                fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
4173                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4174                {
4175                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4176                }
4177                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4178                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4179                }
4180            }
4181
4182            next_offset += envelope_size;
4183            _next_ordinal_to_read += 1;
4184            if next_offset >= end_offset {
4185                return Ok(());
4186            }
4187
4188            // Decode unknown envelopes for gaps in ordinals.
4189            while _next_ordinal_to_read < 2 {
4190                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4191                _next_ordinal_to_read += 1;
4192                next_offset += envelope_size;
4193            }
4194
4195            let next_out_of_line = decoder.next_out_of_line();
4196            let handles_before = decoder.remaining_handles();
4197            if let Some((inlined, num_bytes, num_handles)) =
4198                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4199            {
4200                let member_inline_size =
4201                    <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
4202                        decoder.context,
4203                    );
4204                if inlined != (member_inline_size <= 4) {
4205                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4206                }
4207                let inner_offset;
4208                let mut inner_depth = depth.clone();
4209                if inlined {
4210                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4211                    inner_offset = next_offset;
4212                } else {
4213                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4214                    inner_depth.increment()?;
4215                }
4216                let val_ref = self
4217                    .active_metadata_wrapping_key_id
4218                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
4219                fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
4220                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4221                {
4222                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4223                }
4224                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4225                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4226                }
4227            }
4228
4229            next_offset += envelope_size;
4230
4231            // Decode the remaining unknown envelopes.
4232            while next_offset < end_offset {
4233                _next_ordinal_to_read += 1;
4234                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4235                next_offset += envelope_size;
4236            }
4237
4238            Ok(())
4239        }
4240    }
4241
4242    impl fidl::encoding::ValueTypeMarker for WrappedKey {
4243        type Borrowed<'a> = &'a Self;
4244        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4245            value
4246        }
4247    }
4248
4249    unsafe impl fidl::encoding::TypeMarker for WrappedKey {
4250        type Owned = Self;
4251
4252        #[inline(always)]
4253        fn inline_align(_context: fidl::encoding::Context) -> usize {
4254            8
4255        }
4256
4257        #[inline(always)]
4258        fn inline_size(_context: fidl::encoding::Context) -> usize {
4259            16
4260        }
4261    }
4262
4263    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WrappedKey, D>
4264        for &WrappedKey
4265    {
4266        #[inline]
4267        unsafe fn encode(
4268            self,
4269            encoder: &mut fidl::encoding::Encoder<'_, D>,
4270            offset: usize,
4271            _depth: fidl::encoding::Depth,
4272        ) -> fidl::Result<()> {
4273            encoder.debug_check_bounds::<WrappedKey>(offset);
4274            encoder.write_num::<u64>(self.ordinal(), offset);
4275            match self {
4276                WrappedKey::Fxfs(ref val) => fidl::encoding::encode_in_envelope::<FxfsKey, D>(
4277                    <FxfsKey as fidl::encoding::ValueTypeMarker>::borrow(val),
4278                    encoder,
4279                    offset + 8,
4280                    _depth,
4281                ),
4282                WrappedKey::Zxcrypt(ref val) => fidl::encoding::encode_in_envelope::<
4283                    fidl::encoding::Vector<u8, 132>,
4284                    D,
4285                >(
4286                    <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
4287                        val,
4288                    ),
4289                    encoder,
4290                    offset + 8,
4291                    _depth,
4292                ),
4293                WrappedKey::FscryptInoLblk32Dir(ref val) => fidl::encoding::encode_in_envelope::<
4294                    FscryptKeyIdentifierAndNonce,
4295                    D,
4296                >(
4297                    <FscryptKeyIdentifierAndNonce as fidl::encoding::ValueTypeMarker>::borrow(val),
4298                    encoder,
4299                    offset + 8,
4300                    _depth,
4301                ),
4302                WrappedKey::FscryptInoLblk32File(ref val) => {
4303                    fidl::encoding::encode_in_envelope::<FscryptKeyIdentifier, D>(
4304                        <FscryptKeyIdentifier as fidl::encoding::ValueTypeMarker>::borrow(val),
4305                        encoder,
4306                        offset + 8,
4307                        _depth,
4308                    )
4309                }
4310                WrappedKey::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4311            }
4312        }
4313    }
4314
4315    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WrappedKey {
4316        #[inline(always)]
4317        fn new_empty() -> Self {
4318            Self::__SourceBreaking { unknown_ordinal: 0 }
4319        }
4320
4321        #[inline]
4322        unsafe fn decode(
4323            &mut self,
4324            decoder: &mut fidl::encoding::Decoder<'_, D>,
4325            offset: usize,
4326            mut depth: fidl::encoding::Depth,
4327        ) -> fidl::Result<()> {
4328            decoder.debug_check_bounds::<Self>(offset);
4329            #[allow(unused_variables)]
4330            let next_out_of_line = decoder.next_out_of_line();
4331            let handles_before = decoder.remaining_handles();
4332            let (ordinal, inlined, num_bytes, num_handles) =
4333                fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4334
4335            let member_inline_size = match ordinal {
4336                1 => <FxfsKey as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4337                2 => <fidl::encoding::Vector<u8, 132> as fidl::encoding::TypeMarker>::inline_size(
4338                    decoder.context,
4339                ),
4340                3 => <FscryptKeyIdentifierAndNonce as fidl::encoding::TypeMarker>::inline_size(
4341                    decoder.context,
4342                ),
4343                4 => <FscryptKeyIdentifier as fidl::encoding::TypeMarker>::inline_size(
4344                    decoder.context,
4345                ),
4346                0 => return Err(fidl::Error::UnknownUnionTag),
4347                _ => num_bytes as usize,
4348            };
4349
4350            if inlined != (member_inline_size <= 4) {
4351                return Err(fidl::Error::InvalidInlineBitInEnvelope);
4352            }
4353            let _inner_offset;
4354            if inlined {
4355                decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4356                _inner_offset = offset + 8;
4357            } else {
4358                depth.increment()?;
4359                _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4360            }
4361            match ordinal {
4362                1 => {
4363                    #[allow(irrefutable_let_patterns)]
4364                    if let WrappedKey::Fxfs(_) = self {
4365                        // Do nothing, read the value into the object
4366                    } else {
4367                        // Initialize `self` to the right variant
4368                        *self = WrappedKey::Fxfs(fidl::new_empty!(FxfsKey, D));
4369                    }
4370                    #[allow(irrefutable_let_patterns)]
4371                    if let WrappedKey::Fxfs(ref mut val) = self {
4372                        fidl::decode!(FxfsKey, D, val, decoder, _inner_offset, depth)?;
4373                    } else {
4374                        unreachable!()
4375                    }
4376                }
4377                2 => {
4378                    #[allow(irrefutable_let_patterns)]
4379                    if let WrappedKey::Zxcrypt(_) = self {
4380                        // Do nothing, read the value into the object
4381                    } else {
4382                        // Initialize `self` to the right variant
4383                        *self = WrappedKey::Zxcrypt(
4384                            fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
4385                        );
4386                    }
4387                    #[allow(irrefutable_let_patterns)]
4388                    if let WrappedKey::Zxcrypt(ref mut val) = self {
4389                        fidl::decode!(fidl::encoding::Vector<u8, 132>, D, val, decoder, _inner_offset, depth)?;
4390                    } else {
4391                        unreachable!()
4392                    }
4393                }
4394                3 => {
4395                    #[allow(irrefutable_let_patterns)]
4396                    if let WrappedKey::FscryptInoLblk32Dir(_) = self {
4397                        // Do nothing, read the value into the object
4398                    } else {
4399                        // Initialize `self` to the right variant
4400                        *self = WrappedKey::FscryptInoLblk32Dir(fidl::new_empty!(
4401                            FscryptKeyIdentifierAndNonce,
4402                            D
4403                        ));
4404                    }
4405                    #[allow(irrefutable_let_patterns)]
4406                    if let WrappedKey::FscryptInoLblk32Dir(ref mut val) = self {
4407                        fidl::decode!(
4408                            FscryptKeyIdentifierAndNonce,
4409                            D,
4410                            val,
4411                            decoder,
4412                            _inner_offset,
4413                            depth
4414                        )?;
4415                    } else {
4416                        unreachable!()
4417                    }
4418                }
4419                4 => {
4420                    #[allow(irrefutable_let_patterns)]
4421                    if let WrappedKey::FscryptInoLblk32File(_) = self {
4422                        // Do nothing, read the value into the object
4423                    } else {
4424                        // Initialize `self` to the right variant
4425                        *self = WrappedKey::FscryptInoLblk32File(fidl::new_empty!(
4426                            FscryptKeyIdentifier,
4427                            D
4428                        ));
4429                    }
4430                    #[allow(irrefutable_let_patterns)]
4431                    if let WrappedKey::FscryptInoLblk32File(ref mut val) = self {
4432                        fidl::decode!(FscryptKeyIdentifier, D, val, decoder, _inner_offset, depth)?;
4433                    } else {
4434                        unreachable!()
4435                    }
4436                }
4437                #[allow(deprecated)]
4438                ordinal => {
4439                    for _ in 0..num_handles {
4440                        decoder.drop_next_handle()?;
4441                    }
4442                    *self = WrappedKey::__SourceBreaking { unknown_ordinal: ordinal };
4443                }
4444            }
4445            if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4446                return Err(fidl::Error::InvalidNumBytesInEnvelope);
4447            }
4448            if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4449                return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4450            }
4451            Ok(())
4452        }
4453    }
4454}