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