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, Eq, Hash, Ord, PartialEq, PartialOrd)]
182pub struct CryptUnwrapKeyRequest {
183    pub wrapping_key_id: [u8; 16],
184    pub owner: u64,
185    pub key: Vec<u8>,
186}
187
188impl fidl::Persistable for CryptUnwrapKeyRequest {}
189
190#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
191pub struct CryptCreateKeyWithIdResponse {
192    pub wrapped_key: Vec<u8>,
193    pub unwrapped_key: Vec<u8>,
194}
195
196impl fidl::Persistable for CryptCreateKeyWithIdResponse {}
197
198#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
199pub struct CryptCreateKeyResponse {
200    pub wrapping_key_id: [u8; 16],
201    pub wrapped_key: Vec<u8>,
202    pub unwrapped_key: Vec<u8>,
203}
204
205impl fidl::Persistable for CryptCreateKeyResponse {}
206
207#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
208pub struct CryptUnwrapKeyResponse {
209    pub unwrapped_key: Vec<u8>,
210}
211
212impl fidl::Persistable for CryptUnwrapKeyResponse {}
213
214#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
215pub struct DebugDeleteProfileRequest {
216    pub volume: String,
217    pub profile: String,
218}
219
220impl fidl::Persistable for DebugDeleteProfileRequest {}
221
222#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
223#[repr(C)]
224pub struct ProjectIdClearForNodeRequest {
225    pub node_id: u64,
226}
227
228impl fidl::Persistable for ProjectIdClearForNodeRequest {}
229
230#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
231#[repr(C)]
232pub struct ProjectIdClearRequest {
233    pub project_id: u64,
234}
235
236impl fidl::Persistable for ProjectIdClearRequest {}
237
238#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
239#[repr(C)]
240pub struct ProjectIdGetForNodeRequest {
241    pub node_id: u64,
242}
243
244impl fidl::Persistable for ProjectIdGetForNodeRequest {}
245
246#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247#[repr(C)]
248pub struct ProjectIdInfoRequest {
249    pub project_id: u64,
250}
251
252impl fidl::Persistable for ProjectIdInfoRequest {}
253
254#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
255pub struct ProjectIdListRequest {
256    pub token: Option<Box<ProjectIterToken>>,
257}
258
259impl fidl::Persistable for ProjectIdListRequest {}
260
261#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
262#[repr(C)]
263pub struct ProjectIdSetForNodeRequest {
264    pub node_id: u64,
265    pub project_id: u64,
266}
267
268impl fidl::Persistable for ProjectIdSetForNodeRequest {}
269
270#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
271#[repr(C)]
272pub struct ProjectIdSetLimitRequest {
273    pub project_id: u64,
274    pub bytes: u64,
275    pub nodes: u64,
276}
277
278impl fidl::Persistable for ProjectIdSetLimitRequest {}
279
280#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
281#[repr(C)]
282pub struct ProjectIdGetForNodeResponse {
283    pub project_id: u64,
284}
285
286impl fidl::Persistable for ProjectIdGetForNodeResponse {}
287
288#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
289#[repr(C)]
290pub struct ProjectIdInfoResponse {
291    pub limit: BytesAndNodes,
292    pub usage: BytesAndNodes,
293}
294
295impl fidl::Persistable for ProjectIdInfoResponse {}
296
297#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
298pub struct ProjectIdListResponse {
299    pub entries: Vec<u64>,
300    pub next_token: Option<Box<ProjectIterToken>>,
301}
302
303impl fidl::Persistable for ProjectIdListResponse {}
304
305/// A token used for paging through tracked projects. One may be returned by the `ProjectId.List`
306/// call so it can be passed into the succeeding call to continue the listing from where it left
307/// off.
308#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
309#[repr(C)]
310pub struct ProjectIterToken {
311    pub value: u64,
312}
313
314impl fidl::Persistable for ProjectIterToken {}
315
316#[derive(Clone, Debug, Default, PartialEq)]
317pub struct CryptSettings {
318    pub active_data_wrapping_key_id: Option<[u8; 16]>,
319    pub active_metadata_wrapping_key_id: Option<[u8; 16]>,
320    #[doc(hidden)]
321    pub __source_breaking: fidl::marker::SourceBreaking,
322}
323
324impl fidl::Persistable for CryptSettings {}
325
326mod internal {
327    use super::*;
328    unsafe impl fidl::encoding::TypeMarker for CreateBlobError {
329        type Owned = Self;
330
331        #[inline(always)]
332        fn inline_align(_context: fidl::encoding::Context) -> usize {
333            std::mem::align_of::<u32>()
334        }
335
336        #[inline(always)]
337        fn inline_size(_context: fidl::encoding::Context) -> usize {
338            std::mem::size_of::<u32>()
339        }
340
341        #[inline(always)]
342        fn encode_is_copy() -> bool {
343            true
344        }
345
346        #[inline(always)]
347        fn decode_is_copy() -> bool {
348            false
349        }
350    }
351
352    impl fidl::encoding::ValueTypeMarker for CreateBlobError {
353        type Borrowed<'a> = Self;
354        #[inline(always)]
355        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
356            *value
357        }
358    }
359
360    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
361        for CreateBlobError
362    {
363        #[inline]
364        unsafe fn encode(
365            self,
366            encoder: &mut fidl::encoding::Encoder<'_, D>,
367            offset: usize,
368            _depth: fidl::encoding::Depth,
369        ) -> fidl::Result<()> {
370            encoder.debug_check_bounds::<Self>(offset);
371            encoder.write_num(self.into_primitive(), offset);
372            Ok(())
373        }
374    }
375
376    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBlobError {
377        #[inline(always)]
378        fn new_empty() -> Self {
379            Self::AlreadyExists
380        }
381
382        #[inline]
383        unsafe fn decode(
384            &mut self,
385            decoder: &mut fidl::encoding::Decoder<'_, D>,
386            offset: usize,
387            _depth: fidl::encoding::Depth,
388        ) -> fidl::Result<()> {
389            decoder.debug_check_bounds::<Self>(offset);
390            let prim = decoder.read_num::<u32>(offset);
391
392            *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
393            Ok(())
394        }
395    }
396    unsafe impl fidl::encoding::TypeMarker for KeyPurpose {
397        type Owned = Self;
398
399        #[inline(always)]
400        fn inline_align(_context: fidl::encoding::Context) -> usize {
401            std::mem::align_of::<u32>()
402        }
403
404        #[inline(always)]
405        fn inline_size(_context: fidl::encoding::Context) -> usize {
406            std::mem::size_of::<u32>()
407        }
408
409        #[inline(always)]
410        fn encode_is_copy() -> bool {
411            false
412        }
413
414        #[inline(always)]
415        fn decode_is_copy() -> bool {
416            false
417        }
418    }
419
420    impl fidl::encoding::ValueTypeMarker for KeyPurpose {
421        type Borrowed<'a> = Self;
422        #[inline(always)]
423        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
424            *value
425        }
426    }
427
428    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeyPurpose {
429        #[inline]
430        unsafe fn encode(
431            self,
432            encoder: &mut fidl::encoding::Encoder<'_, D>,
433            offset: usize,
434            _depth: fidl::encoding::Depth,
435        ) -> fidl::Result<()> {
436            encoder.debug_check_bounds::<Self>(offset);
437            encoder.write_num(self.into_primitive(), offset);
438            Ok(())
439        }
440    }
441
442    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeyPurpose {
443        #[inline(always)]
444        fn new_empty() -> Self {
445            Self::unknown()
446        }
447
448        #[inline]
449        unsafe fn decode(
450            &mut self,
451            decoder: &mut fidl::encoding::Decoder<'_, D>,
452            offset: usize,
453            _depth: fidl::encoding::Depth,
454        ) -> fidl::Result<()> {
455            decoder.debug_check_bounds::<Self>(offset);
456            let prim = decoder.read_num::<u32>(offset);
457
458            *self = Self::from_primitive_allow_unknown(prim);
459            Ok(())
460        }
461    }
462
463    impl fidl::encoding::ValueTypeMarker for BlobCreatorCreateRequest {
464        type Borrowed<'a> = &'a Self;
465        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
466            value
467        }
468    }
469
470    unsafe impl fidl::encoding::TypeMarker for BlobCreatorCreateRequest {
471        type Owned = Self;
472
473        #[inline(always)]
474        fn inline_align(_context: fidl::encoding::Context) -> usize {
475            1
476        }
477
478        #[inline(always)]
479        fn inline_size(_context: fidl::encoding::Context) -> usize {
480            33
481        }
482    }
483
484    unsafe impl<D: fidl::encoding::ResourceDialect>
485        fidl::encoding::Encode<BlobCreatorCreateRequest, D> for &BlobCreatorCreateRequest
486    {
487        #[inline]
488        unsafe fn encode(
489            self,
490            encoder: &mut fidl::encoding::Encoder<'_, D>,
491            offset: usize,
492            _depth: fidl::encoding::Depth,
493        ) -> fidl::Result<()> {
494            encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
495            // Delegate to tuple encoding.
496            fidl::encoding::Encode::<BlobCreatorCreateRequest, D>::encode(
497                (
498                    <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
499                        &self.hash,
500                    ),
501                    <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_existing),
502                ),
503                encoder,
504                offset,
505                _depth,
506            )
507        }
508    }
509    unsafe impl<
510            D: fidl::encoding::ResourceDialect,
511            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
512            T1: fidl::encoding::Encode<bool, D>,
513        > fidl::encoding::Encode<BlobCreatorCreateRequest, D> for (T0, T1)
514    {
515        #[inline]
516        unsafe fn encode(
517            self,
518            encoder: &mut fidl::encoding::Encoder<'_, D>,
519            offset: usize,
520            depth: fidl::encoding::Depth,
521        ) -> fidl::Result<()> {
522            encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
523            // Zero out padding regions. There's no need to apply masks
524            // because the unmasked parts will be overwritten by fields.
525            // Write the fields.
526            self.0.encode(encoder, offset + 0, depth)?;
527            self.1.encode(encoder, offset + 32, depth)?;
528            Ok(())
529        }
530    }
531
532    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
533        for BlobCreatorCreateRequest
534    {
535        #[inline(always)]
536        fn new_empty() -> Self {
537            Self {
538                hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
539                allow_existing: fidl::new_empty!(bool, D),
540            }
541        }
542
543        #[inline]
544        unsafe fn decode(
545            &mut self,
546            decoder: &mut fidl::encoding::Decoder<'_, D>,
547            offset: usize,
548            _depth: fidl::encoding::Depth,
549        ) -> fidl::Result<()> {
550            decoder.debug_check_bounds::<Self>(offset);
551            // Verify that padding bytes are zero.
552            fidl::decode!(fidl::encoding::Array<u8, 32>, D, &mut self.hash, decoder, offset + 0, _depth)?;
553            fidl::decode!(bool, D, &mut self.allow_existing, decoder, offset + 32, _depth)?;
554            Ok(())
555        }
556    }
557
558    impl fidl::encoding::ValueTypeMarker for BlobReaderGetVmoRequest {
559        type Borrowed<'a> = &'a Self;
560        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
561            value
562        }
563    }
564
565    unsafe impl fidl::encoding::TypeMarker for BlobReaderGetVmoRequest {
566        type Owned = Self;
567
568        #[inline(always)]
569        fn inline_align(_context: fidl::encoding::Context) -> usize {
570            1
571        }
572
573        #[inline(always)]
574        fn inline_size(_context: fidl::encoding::Context) -> usize {
575            32
576        }
577        #[inline(always)]
578        fn encode_is_copy() -> bool {
579            true
580        }
581
582        #[inline(always)]
583        fn decode_is_copy() -> bool {
584            true
585        }
586    }
587
588    unsafe impl<D: fidl::encoding::ResourceDialect>
589        fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for &BlobReaderGetVmoRequest
590    {
591        #[inline]
592        unsafe fn encode(
593            self,
594            encoder: &mut fidl::encoding::Encoder<'_, D>,
595            offset: usize,
596            _depth: fidl::encoding::Depth,
597        ) -> fidl::Result<()> {
598            encoder.debug_check_bounds::<BlobReaderGetVmoRequest>(offset);
599            unsafe {
600                // Copy the object into the buffer.
601                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
602                (buf_ptr as *mut BlobReaderGetVmoRequest)
603                    .write_unaligned((self as *const BlobReaderGetVmoRequest).read());
604                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
605                // done second because the memcpy will write garbage to these bytes.
606            }
607            Ok(())
608        }
609    }
610    unsafe impl<
611            D: fidl::encoding::ResourceDialect,
612            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
613        > fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for (T0,)
614    {
615        #[inline]
616        unsafe fn encode(
617            self,
618            encoder: &mut fidl::encoding::Encoder<'_, D>,
619            offset: usize,
620            depth: fidl::encoding::Depth,
621        ) -> fidl::Result<()> {
622            encoder.debug_check_bounds::<BlobReaderGetVmoRequest>(offset);
623            // Zero out padding regions. There's no need to apply masks
624            // because the unmasked parts will be overwritten by fields.
625            // Write the fields.
626            self.0.encode(encoder, offset + 0, depth)?;
627            Ok(())
628        }
629    }
630
631    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
632        for BlobReaderGetVmoRequest
633    {
634        #[inline(always)]
635        fn new_empty() -> Self {
636            Self { blob_hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
637        }
638
639        #[inline]
640        unsafe fn decode(
641            &mut self,
642            decoder: &mut fidl::encoding::Decoder<'_, D>,
643            offset: usize,
644            _depth: fidl::encoding::Depth,
645        ) -> fidl::Result<()> {
646            decoder.debug_check_bounds::<Self>(offset);
647            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
648            // Verify that padding bytes are zero.
649            // Copy from the buffer into the object.
650            unsafe {
651                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
652            }
653            Ok(())
654        }
655    }
656
657    impl fidl::encoding::ValueTypeMarker for BlobWriterBytesReadyRequest {
658        type Borrowed<'a> = &'a Self;
659        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
660            value
661        }
662    }
663
664    unsafe impl fidl::encoding::TypeMarker for BlobWriterBytesReadyRequest {
665        type Owned = Self;
666
667        #[inline(always)]
668        fn inline_align(_context: fidl::encoding::Context) -> usize {
669            8
670        }
671
672        #[inline(always)]
673        fn inline_size(_context: fidl::encoding::Context) -> usize {
674            8
675        }
676        #[inline(always)]
677        fn encode_is_copy() -> bool {
678            true
679        }
680
681        #[inline(always)]
682        fn decode_is_copy() -> bool {
683            true
684        }
685    }
686
687    unsafe impl<D: fidl::encoding::ResourceDialect>
688        fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for &BlobWriterBytesReadyRequest
689    {
690        #[inline]
691        unsafe fn encode(
692            self,
693            encoder: &mut fidl::encoding::Encoder<'_, D>,
694            offset: usize,
695            _depth: fidl::encoding::Depth,
696        ) -> fidl::Result<()> {
697            encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
698            unsafe {
699                // Copy the object into the buffer.
700                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
701                (buf_ptr as *mut BlobWriterBytesReadyRequest)
702                    .write_unaligned((self as *const BlobWriterBytesReadyRequest).read());
703                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
704                // done second because the memcpy will write garbage to these bytes.
705            }
706            Ok(())
707        }
708    }
709    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
710        fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for (T0,)
711    {
712        #[inline]
713        unsafe fn encode(
714            self,
715            encoder: &mut fidl::encoding::Encoder<'_, D>,
716            offset: usize,
717            depth: fidl::encoding::Depth,
718        ) -> fidl::Result<()> {
719            encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
720            // Zero out padding regions. There's no need to apply masks
721            // because the unmasked parts will be overwritten by fields.
722            // Write the fields.
723            self.0.encode(encoder, offset + 0, depth)?;
724            Ok(())
725        }
726    }
727
728    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
729        for BlobWriterBytesReadyRequest
730    {
731        #[inline(always)]
732        fn new_empty() -> Self {
733            Self { bytes_written: fidl::new_empty!(u64, D) }
734        }
735
736        #[inline]
737        unsafe fn decode(
738            &mut self,
739            decoder: &mut fidl::encoding::Decoder<'_, D>,
740            offset: usize,
741            _depth: fidl::encoding::Depth,
742        ) -> fidl::Result<()> {
743            decoder.debug_check_bounds::<Self>(offset);
744            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
745            // Verify that padding bytes are zero.
746            // Copy from the buffer into the object.
747            unsafe {
748                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
749            }
750            Ok(())
751        }
752    }
753
754    impl fidl::encoding::ValueTypeMarker for BlobWriterGetVmoRequest {
755        type Borrowed<'a> = &'a Self;
756        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
757            value
758        }
759    }
760
761    unsafe impl fidl::encoding::TypeMarker for BlobWriterGetVmoRequest {
762        type Owned = Self;
763
764        #[inline(always)]
765        fn inline_align(_context: fidl::encoding::Context) -> usize {
766            8
767        }
768
769        #[inline(always)]
770        fn inline_size(_context: fidl::encoding::Context) -> usize {
771            8
772        }
773        #[inline(always)]
774        fn encode_is_copy() -> bool {
775            true
776        }
777
778        #[inline(always)]
779        fn decode_is_copy() -> bool {
780            true
781        }
782    }
783
784    unsafe impl<D: fidl::encoding::ResourceDialect>
785        fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for &BlobWriterGetVmoRequest
786    {
787        #[inline]
788        unsafe fn encode(
789            self,
790            encoder: &mut fidl::encoding::Encoder<'_, D>,
791            offset: usize,
792            _depth: fidl::encoding::Depth,
793        ) -> fidl::Result<()> {
794            encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
795            unsafe {
796                // Copy the object into the buffer.
797                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
798                (buf_ptr as *mut BlobWriterGetVmoRequest)
799                    .write_unaligned((self as *const BlobWriterGetVmoRequest).read());
800                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
801                // done second because the memcpy will write garbage to these bytes.
802            }
803            Ok(())
804        }
805    }
806    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
807        fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for (T0,)
808    {
809        #[inline]
810        unsafe fn encode(
811            self,
812            encoder: &mut fidl::encoding::Encoder<'_, D>,
813            offset: usize,
814            depth: fidl::encoding::Depth,
815        ) -> fidl::Result<()> {
816            encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
817            // Zero out padding regions. There's no need to apply masks
818            // because the unmasked parts will be overwritten by fields.
819            // Write the fields.
820            self.0.encode(encoder, offset + 0, depth)?;
821            Ok(())
822        }
823    }
824
825    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
826        for BlobWriterGetVmoRequest
827    {
828        #[inline(always)]
829        fn new_empty() -> Self {
830            Self { size: fidl::new_empty!(u64, D) }
831        }
832
833        #[inline]
834        unsafe fn decode(
835            &mut self,
836            decoder: &mut fidl::encoding::Decoder<'_, D>,
837            offset: usize,
838            _depth: fidl::encoding::Depth,
839        ) -> fidl::Result<()> {
840            decoder.debug_check_bounds::<Self>(offset);
841            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
842            // Verify that padding bytes are zero.
843            // Copy from the buffer into the object.
844            unsafe {
845                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
846            }
847            Ok(())
848        }
849    }
850
851    impl fidl::encoding::ValueTypeMarker for BytesAndNodes {
852        type Borrowed<'a> = &'a Self;
853        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
854            value
855        }
856    }
857
858    unsafe impl fidl::encoding::TypeMarker for BytesAndNodes {
859        type Owned = Self;
860
861        #[inline(always)]
862        fn inline_align(_context: fidl::encoding::Context) -> usize {
863            8
864        }
865
866        #[inline(always)]
867        fn inline_size(_context: fidl::encoding::Context) -> usize {
868            16
869        }
870        #[inline(always)]
871        fn encode_is_copy() -> bool {
872            true
873        }
874
875        #[inline(always)]
876        fn decode_is_copy() -> bool {
877            true
878        }
879    }
880
881    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BytesAndNodes, D>
882        for &BytesAndNodes
883    {
884        #[inline]
885        unsafe fn encode(
886            self,
887            encoder: &mut fidl::encoding::Encoder<'_, D>,
888            offset: usize,
889            _depth: fidl::encoding::Depth,
890        ) -> fidl::Result<()> {
891            encoder.debug_check_bounds::<BytesAndNodes>(offset);
892            unsafe {
893                // Copy the object into the buffer.
894                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
895                (buf_ptr as *mut BytesAndNodes)
896                    .write_unaligned((self as *const BytesAndNodes).read());
897                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
898                // done second because the memcpy will write garbage to these bytes.
899            }
900            Ok(())
901        }
902    }
903    unsafe impl<
904            D: fidl::encoding::ResourceDialect,
905            T0: fidl::encoding::Encode<u64, D>,
906            T1: fidl::encoding::Encode<u64, D>,
907        > fidl::encoding::Encode<BytesAndNodes, D> for (T0, T1)
908    {
909        #[inline]
910        unsafe fn encode(
911            self,
912            encoder: &mut fidl::encoding::Encoder<'_, D>,
913            offset: usize,
914            depth: fidl::encoding::Depth,
915        ) -> fidl::Result<()> {
916            encoder.debug_check_bounds::<BytesAndNodes>(offset);
917            // Zero out padding regions. There's no need to apply masks
918            // because the unmasked parts will be overwritten by fields.
919            // Write the fields.
920            self.0.encode(encoder, offset + 0, depth)?;
921            self.1.encode(encoder, offset + 8, depth)?;
922            Ok(())
923        }
924    }
925
926    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BytesAndNodes {
927        #[inline(always)]
928        fn new_empty() -> Self {
929            Self { bytes: fidl::new_empty!(u64, D), nodes: fidl::new_empty!(u64, D) }
930        }
931
932        #[inline]
933        unsafe fn decode(
934            &mut self,
935            decoder: &mut fidl::encoding::Decoder<'_, D>,
936            offset: usize,
937            _depth: fidl::encoding::Depth,
938        ) -> fidl::Result<()> {
939            decoder.debug_check_bounds::<Self>(offset);
940            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
941            // Verify that padding bytes are zero.
942            // Copy from the buffer into the object.
943            unsafe {
944                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
945            }
946            Ok(())
947        }
948    }
949
950    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyRequest {
951        type Borrowed<'a> = &'a Self;
952        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
953            value
954        }
955    }
956
957    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyRequest {
958        type Owned = Self;
959
960        #[inline(always)]
961        fn inline_align(_context: fidl::encoding::Context) -> usize {
962            8
963        }
964
965        #[inline(always)]
966        fn inline_size(_context: fidl::encoding::Context) -> usize {
967            16
968        }
969    }
970
971    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptCreateKeyRequest, D>
972        for &CryptCreateKeyRequest
973    {
974        #[inline]
975        unsafe fn encode(
976            self,
977            encoder: &mut fidl::encoding::Encoder<'_, D>,
978            offset: usize,
979            _depth: fidl::encoding::Depth,
980        ) -> fidl::Result<()> {
981            encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
982            // Delegate to tuple encoding.
983            fidl::encoding::Encode::<CryptCreateKeyRequest, D>::encode(
984                (
985                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
986                    <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
987                ),
988                encoder,
989                offset,
990                _depth,
991            )
992        }
993    }
994    unsafe impl<
995            D: fidl::encoding::ResourceDialect,
996            T0: fidl::encoding::Encode<u64, D>,
997            T1: fidl::encoding::Encode<KeyPurpose, D>,
998        > fidl::encoding::Encode<CryptCreateKeyRequest, D> for (T0, T1)
999    {
1000        #[inline]
1001        unsafe fn encode(
1002            self,
1003            encoder: &mut fidl::encoding::Encoder<'_, D>,
1004            offset: usize,
1005            depth: fidl::encoding::Depth,
1006        ) -> fidl::Result<()> {
1007            encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
1008            // Zero out padding regions. There's no need to apply masks
1009            // because the unmasked parts will be overwritten by fields.
1010            unsafe {
1011                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1012                (ptr as *mut u64).write_unaligned(0);
1013            }
1014            // Write the fields.
1015            self.0.encode(encoder, offset + 0, depth)?;
1016            self.1.encode(encoder, offset + 8, depth)?;
1017            Ok(())
1018        }
1019    }
1020
1021    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptCreateKeyRequest {
1022        #[inline(always)]
1023        fn new_empty() -> Self {
1024            Self { owner: fidl::new_empty!(u64, D), purpose: fidl::new_empty!(KeyPurpose, D) }
1025        }
1026
1027        #[inline]
1028        unsafe fn decode(
1029            &mut self,
1030            decoder: &mut fidl::encoding::Decoder<'_, D>,
1031            offset: usize,
1032            _depth: fidl::encoding::Depth,
1033        ) -> fidl::Result<()> {
1034            decoder.debug_check_bounds::<Self>(offset);
1035            // Verify that padding bytes are zero.
1036            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1037            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1038            let mask = 0xffffffff00000000u64;
1039            let maskedval = padval & mask;
1040            if maskedval != 0 {
1041                return Err(fidl::Error::NonZeroPadding {
1042                    padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1043                });
1044            }
1045            fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
1046            fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 8, _depth)?;
1047            Ok(())
1048        }
1049    }
1050
1051    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyWithIdRequest {
1052        type Borrowed<'a> = &'a Self;
1053        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1054            value
1055        }
1056    }
1057
1058    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyWithIdRequest {
1059        type Owned = Self;
1060
1061        #[inline(always)]
1062        fn inline_align(_context: fidl::encoding::Context) -> usize {
1063            8
1064        }
1065
1066        #[inline(always)]
1067        fn inline_size(_context: fidl::encoding::Context) -> usize {
1068            24
1069        }
1070        #[inline(always)]
1071        fn encode_is_copy() -> bool {
1072            true
1073        }
1074
1075        #[inline(always)]
1076        fn decode_is_copy() -> bool {
1077            true
1078        }
1079    }
1080
1081    unsafe impl<D: fidl::encoding::ResourceDialect>
1082        fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for &CryptCreateKeyWithIdRequest
1083    {
1084        #[inline]
1085        unsafe fn encode(
1086            self,
1087            encoder: &mut fidl::encoding::Encoder<'_, D>,
1088            offset: usize,
1089            _depth: fidl::encoding::Depth,
1090        ) -> fidl::Result<()> {
1091            encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1092            unsafe {
1093                // Copy the object into the buffer.
1094                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1095                (buf_ptr as *mut CryptCreateKeyWithIdRequest)
1096                    .write_unaligned((self as *const CryptCreateKeyWithIdRequest).read());
1097                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1098                // done second because the memcpy will write garbage to these bytes.
1099            }
1100            Ok(())
1101        }
1102    }
1103    unsafe impl<
1104            D: fidl::encoding::ResourceDialect,
1105            T0: fidl::encoding::Encode<u64, D>,
1106            T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1107        > fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for (T0, T1)
1108    {
1109        #[inline]
1110        unsafe fn encode(
1111            self,
1112            encoder: &mut fidl::encoding::Encoder<'_, D>,
1113            offset: usize,
1114            depth: fidl::encoding::Depth,
1115        ) -> fidl::Result<()> {
1116            encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1117            // Zero out padding regions. There's no need to apply masks
1118            // because the unmasked parts will be overwritten by fields.
1119            // Write the fields.
1120            self.0.encode(encoder, offset + 0, depth)?;
1121            self.1.encode(encoder, offset + 8, depth)?;
1122            Ok(())
1123        }
1124    }
1125
1126    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1127        for CryptCreateKeyWithIdRequest
1128    {
1129        #[inline(always)]
1130        fn new_empty() -> Self {
1131            Self {
1132                owner: fidl::new_empty!(u64, D),
1133                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1134            }
1135        }
1136
1137        #[inline]
1138        unsafe fn decode(
1139            &mut self,
1140            decoder: &mut fidl::encoding::Decoder<'_, D>,
1141            offset: usize,
1142            _depth: fidl::encoding::Depth,
1143        ) -> fidl::Result<()> {
1144            decoder.debug_check_bounds::<Self>(offset);
1145            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1146            // Verify that padding bytes are zero.
1147            // Copy from the buffer into the object.
1148            unsafe {
1149                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
1150            }
1151            Ok(())
1152        }
1153    }
1154
1155    impl fidl::encoding::ValueTypeMarker for CryptManagementAddWrappingKeyRequest {
1156        type Borrowed<'a> = &'a Self;
1157        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1158            value
1159        }
1160    }
1161
1162    unsafe impl fidl::encoding::TypeMarker for CryptManagementAddWrappingKeyRequest {
1163        type Owned = Self;
1164
1165        #[inline(always)]
1166        fn inline_align(_context: fidl::encoding::Context) -> usize {
1167            8
1168        }
1169
1170        #[inline(always)]
1171        fn inline_size(_context: fidl::encoding::Context) -> usize {
1172            32
1173        }
1174    }
1175
1176    unsafe impl<D: fidl::encoding::ResourceDialect>
1177        fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D>
1178        for &CryptManagementAddWrappingKeyRequest
1179    {
1180        #[inline]
1181        unsafe fn encode(
1182            self,
1183            encoder: &mut fidl::encoding::Encoder<'_, D>,
1184            offset: usize,
1185            _depth: fidl::encoding::Depth,
1186        ) -> fidl::Result<()> {
1187            encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1188            // Delegate to tuple encoding.
1189            fidl::encoding::Encode::<CryptManagementAddWrappingKeyRequest, D>::encode(
1190                (
1191                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1192                        &self.wrapping_key_id,
1193                    ),
1194                    <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1195                        &self.key,
1196                    ),
1197                ),
1198                encoder,
1199                offset,
1200                _depth,
1201            )
1202        }
1203    }
1204    unsafe impl<
1205            D: fidl::encoding::ResourceDialect,
1206            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1207            T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1208        > fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D> for (T0, T1)
1209    {
1210        #[inline]
1211        unsafe fn encode(
1212            self,
1213            encoder: &mut fidl::encoding::Encoder<'_, D>,
1214            offset: usize,
1215            depth: fidl::encoding::Depth,
1216        ) -> fidl::Result<()> {
1217            encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1218            // Zero out padding regions. There's no need to apply masks
1219            // because the unmasked parts will be overwritten by fields.
1220            // Write the fields.
1221            self.0.encode(encoder, offset + 0, depth)?;
1222            self.1.encode(encoder, offset + 16, depth)?;
1223            Ok(())
1224        }
1225    }
1226
1227    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1228        for CryptManagementAddWrappingKeyRequest
1229    {
1230        #[inline(always)]
1231        fn new_empty() -> Self {
1232            Self {
1233                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1234                key: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1235            }
1236        }
1237
1238        #[inline]
1239        unsafe fn decode(
1240            &mut self,
1241            decoder: &mut fidl::encoding::Decoder<'_, D>,
1242            offset: usize,
1243            _depth: fidl::encoding::Depth,
1244        ) -> fidl::Result<()> {
1245            decoder.debug_check_bounds::<Self>(offset);
1246            // Verify that padding bytes are zero.
1247            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
1248            fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.key, decoder, offset + 16, _depth)?;
1249            Ok(())
1250        }
1251    }
1252
1253    impl fidl::encoding::ValueTypeMarker for CryptManagementForgetWrappingKeyRequest {
1254        type Borrowed<'a> = &'a Self;
1255        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1256            value
1257        }
1258    }
1259
1260    unsafe impl fidl::encoding::TypeMarker for CryptManagementForgetWrappingKeyRequest {
1261        type Owned = Self;
1262
1263        #[inline(always)]
1264        fn inline_align(_context: fidl::encoding::Context) -> usize {
1265            1
1266        }
1267
1268        #[inline(always)]
1269        fn inline_size(_context: fidl::encoding::Context) -> usize {
1270            16
1271        }
1272        #[inline(always)]
1273        fn encode_is_copy() -> bool {
1274            true
1275        }
1276
1277        #[inline(always)]
1278        fn decode_is_copy() -> bool {
1279            true
1280        }
1281    }
1282
1283    unsafe impl<D: fidl::encoding::ResourceDialect>
1284        fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D>
1285        for &CryptManagementForgetWrappingKeyRequest
1286    {
1287        #[inline]
1288        unsafe fn encode(
1289            self,
1290            encoder: &mut fidl::encoding::Encoder<'_, D>,
1291            offset: usize,
1292            _depth: fidl::encoding::Depth,
1293        ) -> fidl::Result<()> {
1294            encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1295            unsafe {
1296                // Copy the object into the buffer.
1297                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1298                (buf_ptr as *mut CryptManagementForgetWrappingKeyRequest).write_unaligned(
1299                    (self as *const CryptManagementForgetWrappingKeyRequest).read(),
1300                );
1301                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1302                // done second because the memcpy will write garbage to these bytes.
1303            }
1304            Ok(())
1305        }
1306    }
1307    unsafe impl<
1308            D: fidl::encoding::ResourceDialect,
1309            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1310        > fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D> for (T0,)
1311    {
1312        #[inline]
1313        unsafe fn encode(
1314            self,
1315            encoder: &mut fidl::encoding::Encoder<'_, D>,
1316            offset: usize,
1317            depth: fidl::encoding::Depth,
1318        ) -> fidl::Result<()> {
1319            encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1320            // Zero out padding regions. There's no need to apply masks
1321            // because the unmasked parts will be overwritten by fields.
1322            // Write the fields.
1323            self.0.encode(encoder, offset + 0, depth)?;
1324            Ok(())
1325        }
1326    }
1327
1328    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1329        for CryptManagementForgetWrappingKeyRequest
1330    {
1331        #[inline(always)]
1332        fn new_empty() -> Self {
1333            Self { wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D) }
1334        }
1335
1336        #[inline]
1337        unsafe fn decode(
1338            &mut self,
1339            decoder: &mut fidl::encoding::Decoder<'_, D>,
1340            offset: usize,
1341            _depth: fidl::encoding::Depth,
1342        ) -> fidl::Result<()> {
1343            decoder.debug_check_bounds::<Self>(offset);
1344            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1345            // Verify that padding bytes are zero.
1346            // Copy from the buffer into the object.
1347            unsafe {
1348                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1349            }
1350            Ok(())
1351        }
1352    }
1353
1354    impl fidl::encoding::ValueTypeMarker for CryptManagementSetActiveKeyRequest {
1355        type Borrowed<'a> = &'a Self;
1356        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1357            value
1358        }
1359    }
1360
1361    unsafe impl fidl::encoding::TypeMarker for CryptManagementSetActiveKeyRequest {
1362        type Owned = Self;
1363
1364        #[inline(always)]
1365        fn inline_align(_context: fidl::encoding::Context) -> usize {
1366            4
1367        }
1368
1369        #[inline(always)]
1370        fn inline_size(_context: fidl::encoding::Context) -> usize {
1371            20
1372        }
1373    }
1374
1375    unsafe impl<D: fidl::encoding::ResourceDialect>
1376        fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D>
1377        for &CryptManagementSetActiveKeyRequest
1378    {
1379        #[inline]
1380        unsafe fn encode(
1381            self,
1382            encoder: &mut fidl::encoding::Encoder<'_, D>,
1383            offset: usize,
1384            _depth: fidl::encoding::Depth,
1385        ) -> fidl::Result<()> {
1386            encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
1387            // Delegate to tuple encoding.
1388            fidl::encoding::Encode::<CryptManagementSetActiveKeyRequest, D>::encode(
1389                (
1390                    <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
1391                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1392                        &self.wrapping_key_id,
1393                    ),
1394                ),
1395                encoder,
1396                offset,
1397                _depth,
1398            )
1399        }
1400    }
1401    unsafe impl<
1402            D: fidl::encoding::ResourceDialect,
1403            T0: fidl::encoding::Encode<KeyPurpose, D>,
1404            T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1405        > fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D> for (T0, T1)
1406    {
1407        #[inline]
1408        unsafe fn encode(
1409            self,
1410            encoder: &mut fidl::encoding::Encoder<'_, D>,
1411            offset: usize,
1412            depth: fidl::encoding::Depth,
1413        ) -> fidl::Result<()> {
1414            encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
1415            // Zero out padding regions. There's no need to apply masks
1416            // because the unmasked parts will be overwritten by fields.
1417            // Write the fields.
1418            self.0.encode(encoder, offset + 0, depth)?;
1419            self.1.encode(encoder, offset + 4, depth)?;
1420            Ok(())
1421        }
1422    }
1423
1424    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1425        for CryptManagementSetActiveKeyRequest
1426    {
1427        #[inline(always)]
1428        fn new_empty() -> Self {
1429            Self {
1430                purpose: fidl::new_empty!(KeyPurpose, D),
1431                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1432            }
1433        }
1434
1435        #[inline]
1436        unsafe fn decode(
1437            &mut self,
1438            decoder: &mut fidl::encoding::Decoder<'_, D>,
1439            offset: usize,
1440            _depth: fidl::encoding::Depth,
1441        ) -> fidl::Result<()> {
1442            decoder.debug_check_bounds::<Self>(offset);
1443            // Verify that padding bytes are zero.
1444            fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 0, _depth)?;
1445            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 4, _depth)?;
1446            Ok(())
1447        }
1448    }
1449
1450    impl fidl::encoding::ValueTypeMarker for CryptUnwrapKeyRequest {
1451        type Borrowed<'a> = &'a Self;
1452        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1453            value
1454        }
1455    }
1456
1457    unsafe impl fidl::encoding::TypeMarker for CryptUnwrapKeyRequest {
1458        type Owned = Self;
1459
1460        #[inline(always)]
1461        fn inline_align(_context: fidl::encoding::Context) -> usize {
1462            8
1463        }
1464
1465        #[inline(always)]
1466        fn inline_size(_context: fidl::encoding::Context) -> usize {
1467            40
1468        }
1469    }
1470
1471    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptUnwrapKeyRequest, D>
1472        for &CryptUnwrapKeyRequest
1473    {
1474        #[inline]
1475        unsafe fn encode(
1476            self,
1477            encoder: &mut fidl::encoding::Encoder<'_, D>,
1478            offset: usize,
1479            _depth: fidl::encoding::Depth,
1480        ) -> fidl::Result<()> {
1481            encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
1482            // Delegate to tuple encoding.
1483            fidl::encoding::Encode::<CryptUnwrapKeyRequest, D>::encode(
1484                (
1485                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1486                        &self.wrapping_key_id,
1487                    ),
1488                    <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1489                    <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
1490                        &self.key,
1491                    ),
1492                ),
1493                encoder,
1494                offset,
1495                _depth,
1496            )
1497        }
1498    }
1499    unsafe impl<
1500            D: fidl::encoding::ResourceDialect,
1501            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1502            T1: fidl::encoding::Encode<u64, D>,
1503            T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 132>, D>,
1504        > fidl::encoding::Encode<CryptUnwrapKeyRequest, D> for (T0, T1, T2)
1505    {
1506        #[inline]
1507        unsafe fn encode(
1508            self,
1509            encoder: &mut fidl::encoding::Encoder<'_, D>,
1510            offset: usize,
1511            depth: fidl::encoding::Depth,
1512        ) -> fidl::Result<()> {
1513            encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
1514            // Zero out padding regions. There's no need to apply masks
1515            // because the unmasked parts will be overwritten by fields.
1516            // Write the fields.
1517            self.0.encode(encoder, offset + 0, depth)?;
1518            self.1.encode(encoder, offset + 16, depth)?;
1519            self.2.encode(encoder, offset + 24, depth)?;
1520            Ok(())
1521        }
1522    }
1523
1524    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptUnwrapKeyRequest {
1525        #[inline(always)]
1526        fn new_empty() -> Self {
1527            Self {
1528                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1529                owner: fidl::new_empty!(u64, D),
1530                key: fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
1531            }
1532        }
1533
1534        #[inline]
1535        unsafe fn decode(
1536            &mut self,
1537            decoder: &mut fidl::encoding::Decoder<'_, D>,
1538            offset: usize,
1539            _depth: fidl::encoding::Depth,
1540        ) -> fidl::Result<()> {
1541            decoder.debug_check_bounds::<Self>(offset);
1542            // Verify that padding bytes are zero.
1543            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
1544            fidl::decode!(u64, D, &mut self.owner, decoder, offset + 16, _depth)?;
1545            fidl::decode!(fidl::encoding::Vector<u8, 132>, D, &mut self.key, decoder, offset + 24, _depth)?;
1546            Ok(())
1547        }
1548    }
1549
1550    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyWithIdResponse {
1551        type Borrowed<'a> = &'a Self;
1552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1553            value
1554        }
1555    }
1556
1557    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyWithIdResponse {
1558        type Owned = Self;
1559
1560        #[inline(always)]
1561        fn inline_align(_context: fidl::encoding::Context) -> usize {
1562            8
1563        }
1564
1565        #[inline(always)]
1566        fn inline_size(_context: fidl::encoding::Context) -> usize {
1567            32
1568        }
1569    }
1570
1571    unsafe impl<D: fidl::encoding::ResourceDialect>
1572        fidl::encoding::Encode<CryptCreateKeyWithIdResponse, D> for &CryptCreateKeyWithIdResponse
1573    {
1574        #[inline]
1575        unsafe fn encode(
1576            self,
1577            encoder: &mut fidl::encoding::Encoder<'_, D>,
1578            offset: usize,
1579            _depth: fidl::encoding::Depth,
1580        ) -> fidl::Result<()> {
1581            encoder.debug_check_bounds::<CryptCreateKeyWithIdResponse>(offset);
1582            // Delegate to tuple encoding.
1583            fidl::encoding::Encode::<CryptCreateKeyWithIdResponse, D>::encode(
1584                (
1585                    <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
1586                        &self.wrapped_key,
1587                    ),
1588                    <fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
1589                        &self.unwrapped_key,
1590                    ),
1591                ),
1592                encoder,
1593                offset,
1594                _depth,
1595            )
1596        }
1597    }
1598    unsafe impl<
1599            D: fidl::encoding::ResourceDialect,
1600            T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 132>, D>,
1601            T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
1602        > fidl::encoding::Encode<CryptCreateKeyWithIdResponse, D> for (T0, T1)
1603    {
1604        #[inline]
1605        unsafe fn encode(
1606            self,
1607            encoder: &mut fidl::encoding::Encoder<'_, D>,
1608            offset: usize,
1609            depth: fidl::encoding::Depth,
1610        ) -> fidl::Result<()> {
1611            encoder.debug_check_bounds::<CryptCreateKeyWithIdResponse>(offset);
1612            // Zero out padding regions. There's no need to apply masks
1613            // because the unmasked parts will be overwritten by fields.
1614            // Write the fields.
1615            self.0.encode(encoder, offset + 0, depth)?;
1616            self.1.encode(encoder, offset + 16, depth)?;
1617            Ok(())
1618        }
1619    }
1620
1621    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1622        for CryptCreateKeyWithIdResponse
1623    {
1624        #[inline(always)]
1625        fn new_empty() -> Self {
1626            Self {
1627                wrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
1628                unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D),
1629            }
1630        }
1631
1632        #[inline]
1633        unsafe fn decode(
1634            &mut self,
1635            decoder: &mut fidl::encoding::Decoder<'_, D>,
1636            offset: usize,
1637            _depth: fidl::encoding::Depth,
1638        ) -> fidl::Result<()> {
1639            decoder.debug_check_bounds::<Self>(offset);
1640            // Verify that padding bytes are zero.
1641            fidl::decode!(fidl::encoding::Vector<u8, 132>, D, &mut self.wrapped_key, decoder, offset + 0, _depth)?;
1642            fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 16, _depth)?;
1643            Ok(())
1644        }
1645    }
1646
1647    impl fidl::encoding::ValueTypeMarker for CryptCreateKeyResponse {
1648        type Borrowed<'a> = &'a Self;
1649        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1650            value
1651        }
1652    }
1653
1654    unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyResponse {
1655        type Owned = Self;
1656
1657        #[inline(always)]
1658        fn inline_align(_context: fidl::encoding::Context) -> usize {
1659            8
1660        }
1661
1662        #[inline(always)]
1663        fn inline_size(_context: fidl::encoding::Context) -> usize {
1664            48
1665        }
1666    }
1667
1668    unsafe impl<D: fidl::encoding::ResourceDialect>
1669        fidl::encoding::Encode<CryptCreateKeyResponse, D> for &CryptCreateKeyResponse
1670    {
1671        #[inline]
1672        unsafe fn encode(
1673            self,
1674            encoder: &mut fidl::encoding::Encoder<'_, D>,
1675            offset: usize,
1676            _depth: fidl::encoding::Depth,
1677        ) -> fidl::Result<()> {
1678            encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
1679            // Delegate to tuple encoding.
1680            fidl::encoding::Encode::<CryptCreateKeyResponse, D>::encode(
1681                (
1682                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1683                        &self.wrapping_key_id,
1684                    ),
1685                    <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
1686                        &self.wrapped_key,
1687                    ),
1688                    <fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
1689                        &self.unwrapped_key,
1690                    ),
1691                ),
1692                encoder,
1693                offset,
1694                _depth,
1695            )
1696        }
1697    }
1698    unsafe impl<
1699            D: fidl::encoding::ResourceDialect,
1700            T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1701            T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 132>, D>,
1702            T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
1703        > fidl::encoding::Encode<CryptCreateKeyResponse, D> for (T0, T1, T2)
1704    {
1705        #[inline]
1706        unsafe fn encode(
1707            self,
1708            encoder: &mut fidl::encoding::Encoder<'_, D>,
1709            offset: usize,
1710            depth: fidl::encoding::Depth,
1711        ) -> fidl::Result<()> {
1712            encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
1713            // Zero out padding regions. There's no need to apply masks
1714            // because the unmasked parts will be overwritten by fields.
1715            // Write the fields.
1716            self.0.encode(encoder, offset + 0, depth)?;
1717            self.1.encode(encoder, offset + 16, depth)?;
1718            self.2.encode(encoder, offset + 32, depth)?;
1719            Ok(())
1720        }
1721    }
1722
1723    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1724        for CryptCreateKeyResponse
1725    {
1726        #[inline(always)]
1727        fn new_empty() -> Self {
1728            Self {
1729                wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1730                wrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
1731                unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D),
1732            }
1733        }
1734
1735        #[inline]
1736        unsafe fn decode(
1737            &mut self,
1738            decoder: &mut fidl::encoding::Decoder<'_, D>,
1739            offset: usize,
1740            _depth: fidl::encoding::Depth,
1741        ) -> fidl::Result<()> {
1742            decoder.debug_check_bounds::<Self>(offset);
1743            // Verify that padding bytes are zero.
1744            fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
1745            fidl::decode!(fidl::encoding::Vector<u8, 132>, D, &mut self.wrapped_key, decoder, offset + 16, _depth)?;
1746            fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 32, _depth)?;
1747            Ok(())
1748        }
1749    }
1750
1751    impl fidl::encoding::ValueTypeMarker for CryptUnwrapKeyResponse {
1752        type Borrowed<'a> = &'a Self;
1753        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1754            value
1755        }
1756    }
1757
1758    unsafe impl fidl::encoding::TypeMarker for CryptUnwrapKeyResponse {
1759        type Owned = Self;
1760
1761        #[inline(always)]
1762        fn inline_align(_context: fidl::encoding::Context) -> usize {
1763            8
1764        }
1765
1766        #[inline(always)]
1767        fn inline_size(_context: fidl::encoding::Context) -> usize {
1768            16
1769        }
1770    }
1771
1772    unsafe impl<D: fidl::encoding::ResourceDialect>
1773        fidl::encoding::Encode<CryptUnwrapKeyResponse, D> for &CryptUnwrapKeyResponse
1774    {
1775        #[inline]
1776        unsafe fn encode(
1777            self,
1778            encoder: &mut fidl::encoding::Encoder<'_, D>,
1779            offset: usize,
1780            _depth: fidl::encoding::Depth,
1781        ) -> fidl::Result<()> {
1782            encoder.debug_check_bounds::<CryptUnwrapKeyResponse>(offset);
1783            // Delegate to tuple encoding.
1784            fidl::encoding::Encode::<CryptUnwrapKeyResponse, D>::encode(
1785                (<fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
1786                    &self.unwrapped_key,
1787                ),),
1788                encoder,
1789                offset,
1790                _depth,
1791            )
1792        }
1793    }
1794    unsafe impl<
1795            D: fidl::encoding::ResourceDialect,
1796            T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
1797        > fidl::encoding::Encode<CryptUnwrapKeyResponse, D> for (T0,)
1798    {
1799        #[inline]
1800        unsafe fn encode(
1801            self,
1802            encoder: &mut fidl::encoding::Encoder<'_, D>,
1803            offset: usize,
1804            depth: fidl::encoding::Depth,
1805        ) -> fidl::Result<()> {
1806            encoder.debug_check_bounds::<CryptUnwrapKeyResponse>(offset);
1807            // Zero out padding regions. There's no need to apply masks
1808            // because the unmasked parts will be overwritten by fields.
1809            // Write the fields.
1810            self.0.encode(encoder, offset + 0, depth)?;
1811            Ok(())
1812        }
1813    }
1814
1815    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1816        for CryptUnwrapKeyResponse
1817    {
1818        #[inline(always)]
1819        fn new_empty() -> Self {
1820            Self { unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D) }
1821        }
1822
1823        #[inline]
1824        unsafe fn decode(
1825            &mut self,
1826            decoder: &mut fidl::encoding::Decoder<'_, D>,
1827            offset: usize,
1828            _depth: fidl::encoding::Depth,
1829        ) -> fidl::Result<()> {
1830            decoder.debug_check_bounds::<Self>(offset);
1831            // Verify that padding bytes are zero.
1832            fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 0, _depth)?;
1833            Ok(())
1834        }
1835    }
1836
1837    impl fidl::encoding::ValueTypeMarker for DebugDeleteProfileRequest {
1838        type Borrowed<'a> = &'a Self;
1839        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1840            value
1841        }
1842    }
1843
1844    unsafe impl fidl::encoding::TypeMarker for DebugDeleteProfileRequest {
1845        type Owned = Self;
1846
1847        #[inline(always)]
1848        fn inline_align(_context: fidl::encoding::Context) -> usize {
1849            8
1850        }
1851
1852        #[inline(always)]
1853        fn inline_size(_context: fidl::encoding::Context) -> usize {
1854            32
1855        }
1856    }
1857
1858    unsafe impl<D: fidl::encoding::ResourceDialect>
1859        fidl::encoding::Encode<DebugDeleteProfileRequest, D> for &DebugDeleteProfileRequest
1860    {
1861        #[inline]
1862        unsafe fn encode(
1863            self,
1864            encoder: &mut fidl::encoding::Encoder<'_, D>,
1865            offset: usize,
1866            _depth: fidl::encoding::Depth,
1867        ) -> fidl::Result<()> {
1868            encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
1869            // Delegate to tuple encoding.
1870            fidl::encoding::Encode::<DebugDeleteProfileRequest, D>::encode(
1871                (
1872                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
1873                        &self.volume,
1874                    ),
1875                    <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
1876                        &self.profile,
1877                    ),
1878                ),
1879                encoder,
1880                offset,
1881                _depth,
1882            )
1883        }
1884    }
1885    unsafe impl<
1886            D: fidl::encoding::ResourceDialect,
1887            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
1888            T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
1889        > fidl::encoding::Encode<DebugDeleteProfileRequest, D> for (T0, T1)
1890    {
1891        #[inline]
1892        unsafe fn encode(
1893            self,
1894            encoder: &mut fidl::encoding::Encoder<'_, D>,
1895            offset: usize,
1896            depth: fidl::encoding::Depth,
1897        ) -> fidl::Result<()> {
1898            encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
1899            // Zero out padding regions. There's no need to apply masks
1900            // because the unmasked parts will be overwritten by fields.
1901            // Write the fields.
1902            self.0.encode(encoder, offset + 0, depth)?;
1903            self.1.encode(encoder, offset + 16, depth)?;
1904            Ok(())
1905        }
1906    }
1907
1908    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1909        for DebugDeleteProfileRequest
1910    {
1911        #[inline(always)]
1912        fn new_empty() -> Self {
1913            Self {
1914                volume: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
1915                profile: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
1916            }
1917        }
1918
1919        #[inline]
1920        unsafe fn decode(
1921            &mut self,
1922            decoder: &mut fidl::encoding::Decoder<'_, D>,
1923            offset: usize,
1924            _depth: fidl::encoding::Depth,
1925        ) -> fidl::Result<()> {
1926            decoder.debug_check_bounds::<Self>(offset);
1927            // Verify that padding bytes are zero.
1928            fidl::decode!(
1929                fidl::encoding::BoundedString<255>,
1930                D,
1931                &mut self.volume,
1932                decoder,
1933                offset + 0,
1934                _depth
1935            )?;
1936            fidl::decode!(
1937                fidl::encoding::BoundedString<255>,
1938                D,
1939                &mut self.profile,
1940                decoder,
1941                offset + 16,
1942                _depth
1943            )?;
1944            Ok(())
1945        }
1946    }
1947
1948    impl fidl::encoding::ValueTypeMarker for ProjectIdClearForNodeRequest {
1949        type Borrowed<'a> = &'a Self;
1950        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1951            value
1952        }
1953    }
1954
1955    unsafe impl fidl::encoding::TypeMarker for ProjectIdClearForNodeRequest {
1956        type Owned = Self;
1957
1958        #[inline(always)]
1959        fn inline_align(_context: fidl::encoding::Context) -> usize {
1960            8
1961        }
1962
1963        #[inline(always)]
1964        fn inline_size(_context: fidl::encoding::Context) -> usize {
1965            8
1966        }
1967        #[inline(always)]
1968        fn encode_is_copy() -> bool {
1969            true
1970        }
1971
1972        #[inline(always)]
1973        fn decode_is_copy() -> bool {
1974            true
1975        }
1976    }
1977
1978    unsafe impl<D: fidl::encoding::ResourceDialect>
1979        fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for &ProjectIdClearForNodeRequest
1980    {
1981        #[inline]
1982        unsafe fn encode(
1983            self,
1984            encoder: &mut fidl::encoding::Encoder<'_, D>,
1985            offset: usize,
1986            _depth: fidl::encoding::Depth,
1987        ) -> fidl::Result<()> {
1988            encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
1989            unsafe {
1990                // Copy the object into the buffer.
1991                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1992                (buf_ptr as *mut ProjectIdClearForNodeRequest)
1993                    .write_unaligned((self as *const ProjectIdClearForNodeRequest).read());
1994                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1995                // done second because the memcpy will write garbage to these bytes.
1996            }
1997            Ok(())
1998        }
1999    }
2000    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2001        fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for (T0,)
2002    {
2003        #[inline]
2004        unsafe fn encode(
2005            self,
2006            encoder: &mut fidl::encoding::Encoder<'_, D>,
2007            offset: usize,
2008            depth: fidl::encoding::Depth,
2009        ) -> fidl::Result<()> {
2010            encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
2011            // Zero out padding regions. There's no need to apply masks
2012            // because the unmasked parts will be overwritten by fields.
2013            // Write the fields.
2014            self.0.encode(encoder, offset + 0, depth)?;
2015            Ok(())
2016        }
2017    }
2018
2019    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2020        for ProjectIdClearForNodeRequest
2021    {
2022        #[inline(always)]
2023        fn new_empty() -> Self {
2024            Self { node_id: fidl::new_empty!(u64, D) }
2025        }
2026
2027        #[inline]
2028        unsafe fn decode(
2029            &mut self,
2030            decoder: &mut fidl::encoding::Decoder<'_, D>,
2031            offset: usize,
2032            _depth: fidl::encoding::Depth,
2033        ) -> fidl::Result<()> {
2034            decoder.debug_check_bounds::<Self>(offset);
2035            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2036            // Verify that padding bytes are zero.
2037            // Copy from the buffer into the object.
2038            unsafe {
2039                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2040            }
2041            Ok(())
2042        }
2043    }
2044
2045    impl fidl::encoding::ValueTypeMarker for ProjectIdClearRequest {
2046        type Borrowed<'a> = &'a Self;
2047        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2048            value
2049        }
2050    }
2051
2052    unsafe impl fidl::encoding::TypeMarker for ProjectIdClearRequest {
2053        type Owned = Self;
2054
2055        #[inline(always)]
2056        fn inline_align(_context: fidl::encoding::Context) -> usize {
2057            8
2058        }
2059
2060        #[inline(always)]
2061        fn inline_size(_context: fidl::encoding::Context) -> usize {
2062            8
2063        }
2064        #[inline(always)]
2065        fn encode_is_copy() -> bool {
2066            true
2067        }
2068
2069        #[inline(always)]
2070        fn decode_is_copy() -> bool {
2071            true
2072        }
2073    }
2074
2075    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdClearRequest, D>
2076        for &ProjectIdClearRequest
2077    {
2078        #[inline]
2079        unsafe fn encode(
2080            self,
2081            encoder: &mut fidl::encoding::Encoder<'_, D>,
2082            offset: usize,
2083            _depth: fidl::encoding::Depth,
2084        ) -> fidl::Result<()> {
2085            encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
2086            unsafe {
2087                // Copy the object into the buffer.
2088                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2089                (buf_ptr as *mut ProjectIdClearRequest)
2090                    .write_unaligned((self as *const ProjectIdClearRequest).read());
2091                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2092                // done second because the memcpy will write garbage to these bytes.
2093            }
2094            Ok(())
2095        }
2096    }
2097    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2098        fidl::encoding::Encode<ProjectIdClearRequest, D> for (T0,)
2099    {
2100        #[inline]
2101        unsafe fn encode(
2102            self,
2103            encoder: &mut fidl::encoding::Encoder<'_, D>,
2104            offset: usize,
2105            depth: fidl::encoding::Depth,
2106        ) -> fidl::Result<()> {
2107            encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
2108            // Zero out padding regions. There's no need to apply masks
2109            // because the unmasked parts will be overwritten by fields.
2110            // Write the fields.
2111            self.0.encode(encoder, offset + 0, depth)?;
2112            Ok(())
2113        }
2114    }
2115
2116    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdClearRequest {
2117        #[inline(always)]
2118        fn new_empty() -> Self {
2119            Self { project_id: fidl::new_empty!(u64, D) }
2120        }
2121
2122        #[inline]
2123        unsafe fn decode(
2124            &mut self,
2125            decoder: &mut fidl::encoding::Decoder<'_, D>,
2126            offset: usize,
2127            _depth: fidl::encoding::Depth,
2128        ) -> fidl::Result<()> {
2129            decoder.debug_check_bounds::<Self>(offset);
2130            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2131            // Verify that padding bytes are zero.
2132            // Copy from the buffer into the object.
2133            unsafe {
2134                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2135            }
2136            Ok(())
2137        }
2138    }
2139
2140    impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeRequest {
2141        type Borrowed<'a> = &'a Self;
2142        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2143            value
2144        }
2145    }
2146
2147    unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeRequest {
2148        type Owned = Self;
2149
2150        #[inline(always)]
2151        fn inline_align(_context: fidl::encoding::Context) -> usize {
2152            8
2153        }
2154
2155        #[inline(always)]
2156        fn inline_size(_context: fidl::encoding::Context) -> usize {
2157            8
2158        }
2159        #[inline(always)]
2160        fn encode_is_copy() -> bool {
2161            true
2162        }
2163
2164        #[inline(always)]
2165        fn decode_is_copy() -> bool {
2166            true
2167        }
2168    }
2169
2170    unsafe impl<D: fidl::encoding::ResourceDialect>
2171        fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for &ProjectIdGetForNodeRequest
2172    {
2173        #[inline]
2174        unsafe fn encode(
2175            self,
2176            encoder: &mut fidl::encoding::Encoder<'_, D>,
2177            offset: usize,
2178            _depth: fidl::encoding::Depth,
2179        ) -> fidl::Result<()> {
2180            encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
2181            unsafe {
2182                // Copy the object into the buffer.
2183                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2184                (buf_ptr as *mut ProjectIdGetForNodeRequest)
2185                    .write_unaligned((self as *const ProjectIdGetForNodeRequest).read());
2186                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2187                // done second because the memcpy will write garbage to these bytes.
2188            }
2189            Ok(())
2190        }
2191    }
2192    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2193        fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for (T0,)
2194    {
2195        #[inline]
2196        unsafe fn encode(
2197            self,
2198            encoder: &mut fidl::encoding::Encoder<'_, D>,
2199            offset: usize,
2200            depth: fidl::encoding::Depth,
2201        ) -> fidl::Result<()> {
2202            encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
2203            // Zero out padding regions. There's no need to apply masks
2204            // because the unmasked parts will be overwritten by fields.
2205            // Write the fields.
2206            self.0.encode(encoder, offset + 0, depth)?;
2207            Ok(())
2208        }
2209    }
2210
2211    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2212        for ProjectIdGetForNodeRequest
2213    {
2214        #[inline(always)]
2215        fn new_empty() -> Self {
2216            Self { node_id: fidl::new_empty!(u64, D) }
2217        }
2218
2219        #[inline]
2220        unsafe fn decode(
2221            &mut self,
2222            decoder: &mut fidl::encoding::Decoder<'_, D>,
2223            offset: usize,
2224            _depth: fidl::encoding::Depth,
2225        ) -> fidl::Result<()> {
2226            decoder.debug_check_bounds::<Self>(offset);
2227            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2228            // Verify that padding bytes are zero.
2229            // Copy from the buffer into the object.
2230            unsafe {
2231                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2232            }
2233            Ok(())
2234        }
2235    }
2236
2237    impl fidl::encoding::ValueTypeMarker for ProjectIdInfoRequest {
2238        type Borrowed<'a> = &'a Self;
2239        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2240            value
2241        }
2242    }
2243
2244    unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoRequest {
2245        type Owned = Self;
2246
2247        #[inline(always)]
2248        fn inline_align(_context: fidl::encoding::Context) -> usize {
2249            8
2250        }
2251
2252        #[inline(always)]
2253        fn inline_size(_context: fidl::encoding::Context) -> usize {
2254            8
2255        }
2256        #[inline(always)]
2257        fn encode_is_copy() -> bool {
2258            true
2259        }
2260
2261        #[inline(always)]
2262        fn decode_is_copy() -> bool {
2263            true
2264        }
2265    }
2266
2267    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoRequest, D>
2268        for &ProjectIdInfoRequest
2269    {
2270        #[inline]
2271        unsafe fn encode(
2272            self,
2273            encoder: &mut fidl::encoding::Encoder<'_, D>,
2274            offset: usize,
2275            _depth: fidl::encoding::Depth,
2276        ) -> fidl::Result<()> {
2277            encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
2278            unsafe {
2279                // Copy the object into the buffer.
2280                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2281                (buf_ptr as *mut ProjectIdInfoRequest)
2282                    .write_unaligned((self as *const ProjectIdInfoRequest).read());
2283                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2284                // done second because the memcpy will write garbage to these bytes.
2285            }
2286            Ok(())
2287        }
2288    }
2289    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2290        fidl::encoding::Encode<ProjectIdInfoRequest, D> for (T0,)
2291    {
2292        #[inline]
2293        unsafe fn encode(
2294            self,
2295            encoder: &mut fidl::encoding::Encoder<'_, D>,
2296            offset: usize,
2297            depth: fidl::encoding::Depth,
2298        ) -> fidl::Result<()> {
2299            encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
2300            // Zero out padding regions. There's no need to apply masks
2301            // because the unmasked parts will be overwritten by fields.
2302            // Write the fields.
2303            self.0.encode(encoder, offset + 0, depth)?;
2304            Ok(())
2305        }
2306    }
2307
2308    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoRequest {
2309        #[inline(always)]
2310        fn new_empty() -> Self {
2311            Self { project_id: fidl::new_empty!(u64, D) }
2312        }
2313
2314        #[inline]
2315        unsafe fn decode(
2316            &mut self,
2317            decoder: &mut fidl::encoding::Decoder<'_, D>,
2318            offset: usize,
2319            _depth: fidl::encoding::Depth,
2320        ) -> fidl::Result<()> {
2321            decoder.debug_check_bounds::<Self>(offset);
2322            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2323            // Verify that padding bytes are zero.
2324            // Copy from the buffer into the object.
2325            unsafe {
2326                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2327            }
2328            Ok(())
2329        }
2330    }
2331
2332    impl fidl::encoding::ValueTypeMarker for ProjectIdListRequest {
2333        type Borrowed<'a> = &'a Self;
2334        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2335            value
2336        }
2337    }
2338
2339    unsafe impl fidl::encoding::TypeMarker for ProjectIdListRequest {
2340        type Owned = Self;
2341
2342        #[inline(always)]
2343        fn inline_align(_context: fidl::encoding::Context) -> usize {
2344            8
2345        }
2346
2347        #[inline(always)]
2348        fn inline_size(_context: fidl::encoding::Context) -> usize {
2349            8
2350        }
2351    }
2352
2353    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListRequest, D>
2354        for &ProjectIdListRequest
2355    {
2356        #[inline]
2357        unsafe fn encode(
2358            self,
2359            encoder: &mut fidl::encoding::Encoder<'_, D>,
2360            offset: usize,
2361            _depth: fidl::encoding::Depth,
2362        ) -> fidl::Result<()> {
2363            encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
2364            // Delegate to tuple encoding.
2365            fidl::encoding::Encode::<ProjectIdListRequest, D>::encode(
2366                (
2367                    <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.token),
2368                ),
2369                encoder, offset, _depth
2370            )
2371        }
2372    }
2373    unsafe impl<
2374            D: fidl::encoding::ResourceDialect,
2375            T0: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
2376        > fidl::encoding::Encode<ProjectIdListRequest, D> for (T0,)
2377    {
2378        #[inline]
2379        unsafe fn encode(
2380            self,
2381            encoder: &mut fidl::encoding::Encoder<'_, D>,
2382            offset: usize,
2383            depth: fidl::encoding::Depth,
2384        ) -> fidl::Result<()> {
2385            encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
2386            // Zero out padding regions. There's no need to apply masks
2387            // because the unmasked parts will be overwritten by fields.
2388            // Write the fields.
2389            self.0.encode(encoder, offset + 0, depth)?;
2390            Ok(())
2391        }
2392    }
2393
2394    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListRequest {
2395        #[inline(always)]
2396        fn new_empty() -> Self {
2397            Self { token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D) }
2398        }
2399
2400        #[inline]
2401        unsafe fn decode(
2402            &mut self,
2403            decoder: &mut fidl::encoding::Decoder<'_, D>,
2404            offset: usize,
2405            _depth: fidl::encoding::Depth,
2406        ) -> fidl::Result<()> {
2407            decoder.debug_check_bounds::<Self>(offset);
2408            // Verify that padding bytes are zero.
2409            fidl::decode!(
2410                fidl::encoding::Boxed<ProjectIterToken>,
2411                D,
2412                &mut self.token,
2413                decoder,
2414                offset + 0,
2415                _depth
2416            )?;
2417            Ok(())
2418        }
2419    }
2420
2421    impl fidl::encoding::ValueTypeMarker for ProjectIdSetForNodeRequest {
2422        type Borrowed<'a> = &'a Self;
2423        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2424            value
2425        }
2426    }
2427
2428    unsafe impl fidl::encoding::TypeMarker for ProjectIdSetForNodeRequest {
2429        type Owned = Self;
2430
2431        #[inline(always)]
2432        fn inline_align(_context: fidl::encoding::Context) -> usize {
2433            8
2434        }
2435
2436        #[inline(always)]
2437        fn inline_size(_context: fidl::encoding::Context) -> usize {
2438            16
2439        }
2440        #[inline(always)]
2441        fn encode_is_copy() -> bool {
2442            true
2443        }
2444
2445        #[inline(always)]
2446        fn decode_is_copy() -> bool {
2447            true
2448        }
2449    }
2450
2451    unsafe impl<D: fidl::encoding::ResourceDialect>
2452        fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for &ProjectIdSetForNodeRequest
2453    {
2454        #[inline]
2455        unsafe fn encode(
2456            self,
2457            encoder: &mut fidl::encoding::Encoder<'_, D>,
2458            offset: usize,
2459            _depth: fidl::encoding::Depth,
2460        ) -> fidl::Result<()> {
2461            encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
2462            unsafe {
2463                // Copy the object into the buffer.
2464                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2465                (buf_ptr as *mut ProjectIdSetForNodeRequest)
2466                    .write_unaligned((self as *const ProjectIdSetForNodeRequest).read());
2467                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2468                // done second because the memcpy will write garbage to these bytes.
2469            }
2470            Ok(())
2471        }
2472    }
2473    unsafe impl<
2474            D: fidl::encoding::ResourceDialect,
2475            T0: fidl::encoding::Encode<u64, D>,
2476            T1: fidl::encoding::Encode<u64, D>,
2477        > fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for (T0, T1)
2478    {
2479        #[inline]
2480        unsafe fn encode(
2481            self,
2482            encoder: &mut fidl::encoding::Encoder<'_, D>,
2483            offset: usize,
2484            depth: fidl::encoding::Depth,
2485        ) -> fidl::Result<()> {
2486            encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
2487            // Zero out padding regions. There's no need to apply masks
2488            // because the unmasked parts will be overwritten by fields.
2489            // Write the fields.
2490            self.0.encode(encoder, offset + 0, depth)?;
2491            self.1.encode(encoder, offset + 8, depth)?;
2492            Ok(())
2493        }
2494    }
2495
2496    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2497        for ProjectIdSetForNodeRequest
2498    {
2499        #[inline(always)]
2500        fn new_empty() -> Self {
2501            Self { node_id: fidl::new_empty!(u64, D), project_id: fidl::new_empty!(u64, D) }
2502        }
2503
2504        #[inline]
2505        unsafe fn decode(
2506            &mut self,
2507            decoder: &mut fidl::encoding::Decoder<'_, D>,
2508            offset: usize,
2509            _depth: fidl::encoding::Depth,
2510        ) -> fidl::Result<()> {
2511            decoder.debug_check_bounds::<Self>(offset);
2512            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2513            // Verify that padding bytes are zero.
2514            // Copy from the buffer into the object.
2515            unsafe {
2516                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2517            }
2518            Ok(())
2519        }
2520    }
2521
2522    impl fidl::encoding::ValueTypeMarker for ProjectIdSetLimitRequest {
2523        type Borrowed<'a> = &'a Self;
2524        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2525            value
2526        }
2527    }
2528
2529    unsafe impl fidl::encoding::TypeMarker for ProjectIdSetLimitRequest {
2530        type Owned = Self;
2531
2532        #[inline(always)]
2533        fn inline_align(_context: fidl::encoding::Context) -> usize {
2534            8
2535        }
2536
2537        #[inline(always)]
2538        fn inline_size(_context: fidl::encoding::Context) -> usize {
2539            24
2540        }
2541        #[inline(always)]
2542        fn encode_is_copy() -> bool {
2543            true
2544        }
2545
2546        #[inline(always)]
2547        fn decode_is_copy() -> bool {
2548            true
2549        }
2550    }
2551
2552    unsafe impl<D: fidl::encoding::ResourceDialect>
2553        fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for &ProjectIdSetLimitRequest
2554    {
2555        #[inline]
2556        unsafe fn encode(
2557            self,
2558            encoder: &mut fidl::encoding::Encoder<'_, D>,
2559            offset: usize,
2560            _depth: fidl::encoding::Depth,
2561        ) -> fidl::Result<()> {
2562            encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
2563            unsafe {
2564                // Copy the object into the buffer.
2565                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2566                (buf_ptr as *mut ProjectIdSetLimitRequest)
2567                    .write_unaligned((self as *const ProjectIdSetLimitRequest).read());
2568                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2569                // done second because the memcpy will write garbage to these bytes.
2570            }
2571            Ok(())
2572        }
2573    }
2574    unsafe impl<
2575            D: fidl::encoding::ResourceDialect,
2576            T0: fidl::encoding::Encode<u64, D>,
2577            T1: fidl::encoding::Encode<u64, D>,
2578            T2: fidl::encoding::Encode<u64, D>,
2579        > fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for (T0, T1, T2)
2580    {
2581        #[inline]
2582        unsafe fn encode(
2583            self,
2584            encoder: &mut fidl::encoding::Encoder<'_, D>,
2585            offset: usize,
2586            depth: fidl::encoding::Depth,
2587        ) -> fidl::Result<()> {
2588            encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
2589            // Zero out padding regions. There's no need to apply masks
2590            // because the unmasked parts will be overwritten by fields.
2591            // Write the fields.
2592            self.0.encode(encoder, offset + 0, depth)?;
2593            self.1.encode(encoder, offset + 8, depth)?;
2594            self.2.encode(encoder, offset + 16, depth)?;
2595            Ok(())
2596        }
2597    }
2598
2599    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2600        for ProjectIdSetLimitRequest
2601    {
2602        #[inline(always)]
2603        fn new_empty() -> Self {
2604            Self {
2605                project_id: fidl::new_empty!(u64, D),
2606                bytes: fidl::new_empty!(u64, D),
2607                nodes: fidl::new_empty!(u64, D),
2608            }
2609        }
2610
2611        #[inline]
2612        unsafe fn decode(
2613            &mut self,
2614            decoder: &mut fidl::encoding::Decoder<'_, D>,
2615            offset: usize,
2616            _depth: fidl::encoding::Depth,
2617        ) -> fidl::Result<()> {
2618            decoder.debug_check_bounds::<Self>(offset);
2619            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2620            // Verify that padding bytes are zero.
2621            // Copy from the buffer into the object.
2622            unsafe {
2623                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
2624            }
2625            Ok(())
2626        }
2627    }
2628
2629    impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeResponse {
2630        type Borrowed<'a> = &'a Self;
2631        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2632            value
2633        }
2634    }
2635
2636    unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeResponse {
2637        type Owned = Self;
2638
2639        #[inline(always)]
2640        fn inline_align(_context: fidl::encoding::Context) -> usize {
2641            8
2642        }
2643
2644        #[inline(always)]
2645        fn inline_size(_context: fidl::encoding::Context) -> usize {
2646            8
2647        }
2648        #[inline(always)]
2649        fn encode_is_copy() -> bool {
2650            true
2651        }
2652
2653        #[inline(always)]
2654        fn decode_is_copy() -> bool {
2655            true
2656        }
2657    }
2658
2659    unsafe impl<D: fidl::encoding::ResourceDialect>
2660        fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for &ProjectIdGetForNodeResponse
2661    {
2662        #[inline]
2663        unsafe fn encode(
2664            self,
2665            encoder: &mut fidl::encoding::Encoder<'_, D>,
2666            offset: usize,
2667            _depth: fidl::encoding::Depth,
2668        ) -> fidl::Result<()> {
2669            encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
2670            unsafe {
2671                // Copy the object into the buffer.
2672                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2673                (buf_ptr as *mut ProjectIdGetForNodeResponse)
2674                    .write_unaligned((self as *const ProjectIdGetForNodeResponse).read());
2675                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2676                // done second because the memcpy will write garbage to these bytes.
2677            }
2678            Ok(())
2679        }
2680    }
2681    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2682        fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for (T0,)
2683    {
2684        #[inline]
2685        unsafe fn encode(
2686            self,
2687            encoder: &mut fidl::encoding::Encoder<'_, D>,
2688            offset: usize,
2689            depth: fidl::encoding::Depth,
2690        ) -> fidl::Result<()> {
2691            encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
2692            // Zero out padding regions. There's no need to apply masks
2693            // because the unmasked parts will be overwritten by fields.
2694            // Write the fields.
2695            self.0.encode(encoder, offset + 0, depth)?;
2696            Ok(())
2697        }
2698    }
2699
2700    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2701        for ProjectIdGetForNodeResponse
2702    {
2703        #[inline(always)]
2704        fn new_empty() -> Self {
2705            Self { project_id: fidl::new_empty!(u64, D) }
2706        }
2707
2708        #[inline]
2709        unsafe fn decode(
2710            &mut self,
2711            decoder: &mut fidl::encoding::Decoder<'_, D>,
2712            offset: usize,
2713            _depth: fidl::encoding::Depth,
2714        ) -> fidl::Result<()> {
2715            decoder.debug_check_bounds::<Self>(offset);
2716            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2717            // Verify that padding bytes are zero.
2718            // Copy from the buffer into the object.
2719            unsafe {
2720                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
2721            }
2722            Ok(())
2723        }
2724    }
2725
2726    impl fidl::encoding::ValueTypeMarker for ProjectIdInfoResponse {
2727        type Borrowed<'a> = &'a Self;
2728        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2729            value
2730        }
2731    }
2732
2733    unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoResponse {
2734        type Owned = Self;
2735
2736        #[inline(always)]
2737        fn inline_align(_context: fidl::encoding::Context) -> usize {
2738            8
2739        }
2740
2741        #[inline(always)]
2742        fn inline_size(_context: fidl::encoding::Context) -> usize {
2743            32
2744        }
2745        #[inline(always)]
2746        fn encode_is_copy() -> bool {
2747            true
2748        }
2749
2750        #[inline(always)]
2751        fn decode_is_copy() -> bool {
2752            true
2753        }
2754    }
2755
2756    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoResponse, D>
2757        for &ProjectIdInfoResponse
2758    {
2759        #[inline]
2760        unsafe fn encode(
2761            self,
2762            encoder: &mut fidl::encoding::Encoder<'_, D>,
2763            offset: usize,
2764            _depth: fidl::encoding::Depth,
2765        ) -> fidl::Result<()> {
2766            encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
2767            unsafe {
2768                // Copy the object into the buffer.
2769                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2770                (buf_ptr as *mut ProjectIdInfoResponse)
2771                    .write_unaligned((self as *const ProjectIdInfoResponse).read());
2772                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2773                // done second because the memcpy will write garbage to these bytes.
2774            }
2775            Ok(())
2776        }
2777    }
2778    unsafe impl<
2779            D: fidl::encoding::ResourceDialect,
2780            T0: fidl::encoding::Encode<BytesAndNodes, D>,
2781            T1: fidl::encoding::Encode<BytesAndNodes, D>,
2782        > fidl::encoding::Encode<ProjectIdInfoResponse, D> for (T0, T1)
2783    {
2784        #[inline]
2785        unsafe fn encode(
2786            self,
2787            encoder: &mut fidl::encoding::Encoder<'_, D>,
2788            offset: usize,
2789            depth: fidl::encoding::Depth,
2790        ) -> fidl::Result<()> {
2791            encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
2792            // Zero out padding regions. There's no need to apply masks
2793            // because the unmasked parts will be overwritten by fields.
2794            // Write the fields.
2795            self.0.encode(encoder, offset + 0, depth)?;
2796            self.1.encode(encoder, offset + 16, depth)?;
2797            Ok(())
2798        }
2799    }
2800
2801    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoResponse {
2802        #[inline(always)]
2803        fn new_empty() -> Self {
2804            Self {
2805                limit: fidl::new_empty!(BytesAndNodes, D),
2806                usage: fidl::new_empty!(BytesAndNodes, D),
2807            }
2808        }
2809
2810        #[inline]
2811        unsafe fn decode(
2812            &mut self,
2813            decoder: &mut fidl::encoding::Decoder<'_, D>,
2814            offset: usize,
2815            _depth: fidl::encoding::Depth,
2816        ) -> fidl::Result<()> {
2817            decoder.debug_check_bounds::<Self>(offset);
2818            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2819            // Verify that padding bytes are zero.
2820            // Copy from the buffer into the object.
2821            unsafe {
2822                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2823            }
2824            Ok(())
2825        }
2826    }
2827
2828    impl fidl::encoding::ValueTypeMarker for ProjectIdListResponse {
2829        type Borrowed<'a> = &'a Self;
2830        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2831            value
2832        }
2833    }
2834
2835    unsafe impl fidl::encoding::TypeMarker for ProjectIdListResponse {
2836        type Owned = Self;
2837
2838        #[inline(always)]
2839        fn inline_align(_context: fidl::encoding::Context) -> usize {
2840            8
2841        }
2842
2843        #[inline(always)]
2844        fn inline_size(_context: fidl::encoding::Context) -> usize {
2845            24
2846        }
2847    }
2848
2849    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListResponse, D>
2850        for &ProjectIdListResponse
2851    {
2852        #[inline]
2853        unsafe fn encode(
2854            self,
2855            encoder: &mut fidl::encoding::Encoder<'_, D>,
2856            offset: usize,
2857            _depth: fidl::encoding::Depth,
2858        ) -> fidl::Result<()> {
2859            encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
2860            // Delegate to tuple encoding.
2861            fidl::encoding::Encode::<ProjectIdListResponse, D>::encode(
2862                (
2863                    <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.entries),
2864                    <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.next_token),
2865                ),
2866                encoder, offset, _depth
2867            )
2868        }
2869    }
2870    unsafe impl<
2871            D: fidl::encoding::ResourceDialect,
2872            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
2873            T1: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
2874        > fidl::encoding::Encode<ProjectIdListResponse, D> for (T0, T1)
2875    {
2876        #[inline]
2877        unsafe fn encode(
2878            self,
2879            encoder: &mut fidl::encoding::Encoder<'_, D>,
2880            offset: usize,
2881            depth: fidl::encoding::Depth,
2882        ) -> fidl::Result<()> {
2883            encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
2884            // Zero out padding regions. There's no need to apply masks
2885            // because the unmasked parts will be overwritten by fields.
2886            // Write the fields.
2887            self.0.encode(encoder, offset + 0, depth)?;
2888            self.1.encode(encoder, offset + 16, depth)?;
2889            Ok(())
2890        }
2891    }
2892
2893    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListResponse {
2894        #[inline(always)]
2895        fn new_empty() -> Self {
2896            Self {
2897                entries: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
2898                next_token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D),
2899            }
2900        }
2901
2902        #[inline]
2903        unsafe fn decode(
2904            &mut self,
2905            decoder: &mut fidl::encoding::Decoder<'_, D>,
2906            offset: usize,
2907            _depth: fidl::encoding::Depth,
2908        ) -> fidl::Result<()> {
2909            decoder.debug_check_bounds::<Self>(offset);
2910            // Verify that padding bytes are zero.
2911            fidl::decode!(
2912                fidl::encoding::UnboundedVector<u64>,
2913                D,
2914                &mut self.entries,
2915                decoder,
2916                offset + 0,
2917                _depth
2918            )?;
2919            fidl::decode!(
2920                fidl::encoding::Boxed<ProjectIterToken>,
2921                D,
2922                &mut self.next_token,
2923                decoder,
2924                offset + 16,
2925                _depth
2926            )?;
2927            Ok(())
2928        }
2929    }
2930
2931    impl fidl::encoding::ValueTypeMarker for ProjectIterToken {
2932        type Borrowed<'a> = &'a Self;
2933        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2934            value
2935        }
2936    }
2937
2938    unsafe impl fidl::encoding::TypeMarker for ProjectIterToken {
2939        type Owned = Self;
2940
2941        #[inline(always)]
2942        fn inline_align(_context: fidl::encoding::Context) -> usize {
2943            8
2944        }
2945
2946        #[inline(always)]
2947        fn inline_size(_context: fidl::encoding::Context) -> usize {
2948            8
2949        }
2950        #[inline(always)]
2951        fn encode_is_copy() -> bool {
2952            true
2953        }
2954
2955        #[inline(always)]
2956        fn decode_is_copy() -> bool {
2957            true
2958        }
2959    }
2960
2961    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIterToken, D>
2962        for &ProjectIterToken
2963    {
2964        #[inline]
2965        unsafe fn encode(
2966            self,
2967            encoder: &mut fidl::encoding::Encoder<'_, D>,
2968            offset: usize,
2969            _depth: fidl::encoding::Depth,
2970        ) -> fidl::Result<()> {
2971            encoder.debug_check_bounds::<ProjectIterToken>(offset);
2972            unsafe {
2973                // Copy the object into the buffer.
2974                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2975                (buf_ptr as *mut ProjectIterToken)
2976                    .write_unaligned((self as *const ProjectIterToken).read());
2977                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
2978                // done second because the memcpy will write garbage to these bytes.
2979            }
2980            Ok(())
2981        }
2982    }
2983    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
2984        fidl::encoding::Encode<ProjectIterToken, D> for (T0,)
2985    {
2986        #[inline]
2987        unsafe fn encode(
2988            self,
2989            encoder: &mut fidl::encoding::Encoder<'_, D>,
2990            offset: usize,
2991            depth: fidl::encoding::Depth,
2992        ) -> fidl::Result<()> {
2993            encoder.debug_check_bounds::<ProjectIterToken>(offset);
2994            // Zero out padding regions. There's no need to apply masks
2995            // because the unmasked parts will be overwritten by fields.
2996            // Write the fields.
2997            self.0.encode(encoder, offset + 0, depth)?;
2998            Ok(())
2999        }
3000    }
3001
3002    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIterToken {
3003        #[inline(always)]
3004        fn new_empty() -> Self {
3005            Self { value: fidl::new_empty!(u64, D) }
3006        }
3007
3008        #[inline]
3009        unsafe fn decode(
3010            &mut self,
3011            decoder: &mut fidl::encoding::Decoder<'_, D>,
3012            offset: usize,
3013            _depth: fidl::encoding::Depth,
3014        ) -> fidl::Result<()> {
3015            decoder.debug_check_bounds::<Self>(offset);
3016            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3017            // Verify that padding bytes are zero.
3018            // Copy from the buffer into the object.
3019            unsafe {
3020                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3021            }
3022            Ok(())
3023        }
3024    }
3025
3026    impl CryptSettings {
3027        #[inline(always)]
3028        fn max_ordinal_present(&self) -> u64 {
3029            if let Some(_) = self.active_metadata_wrapping_key_id {
3030                return 2;
3031            }
3032            if let Some(_) = self.active_data_wrapping_key_id {
3033                return 1;
3034            }
3035            0
3036        }
3037    }
3038
3039    impl fidl::encoding::ValueTypeMarker for CryptSettings {
3040        type Borrowed<'a> = &'a Self;
3041        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3042            value
3043        }
3044    }
3045
3046    unsafe impl fidl::encoding::TypeMarker for CryptSettings {
3047        type Owned = Self;
3048
3049        #[inline(always)]
3050        fn inline_align(_context: fidl::encoding::Context) -> usize {
3051            8
3052        }
3053
3054        #[inline(always)]
3055        fn inline_size(_context: fidl::encoding::Context) -> usize {
3056            16
3057        }
3058    }
3059
3060    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptSettings, D>
3061        for &CryptSettings
3062    {
3063        unsafe fn encode(
3064            self,
3065            encoder: &mut fidl::encoding::Encoder<'_, D>,
3066            offset: usize,
3067            mut depth: fidl::encoding::Depth,
3068        ) -> fidl::Result<()> {
3069            encoder.debug_check_bounds::<CryptSettings>(offset);
3070            // Vector header
3071            let max_ordinal: u64 = self.max_ordinal_present();
3072            encoder.write_num(max_ordinal, offset);
3073            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3074            // Calling encoder.out_of_line_offset(0) is not allowed.
3075            if max_ordinal == 0 {
3076                return Ok(());
3077            }
3078            depth.increment()?;
3079            let envelope_size = 8;
3080            let bytes_len = max_ordinal as usize * envelope_size;
3081            #[allow(unused_variables)]
3082            let offset = encoder.out_of_line_offset(bytes_len);
3083            let mut _prev_end_offset: usize = 0;
3084            if 1 > max_ordinal {
3085                return Ok(());
3086            }
3087
3088            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3089            // are envelope_size bytes.
3090            let cur_offset: usize = (1 - 1) * envelope_size;
3091
3092            // Zero reserved fields.
3093            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3094
3095            // Safety:
3096            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3097            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3098            //   envelope_size bytes, there is always sufficient room.
3099            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
3100                self.active_data_wrapping_key_id.as_ref().map(
3101                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
3102                ),
3103                encoder,
3104                offset + cur_offset,
3105                depth,
3106            )?;
3107
3108            _prev_end_offset = cur_offset + envelope_size;
3109            if 2 > max_ordinal {
3110                return Ok(());
3111            }
3112
3113            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3114            // are envelope_size bytes.
3115            let cur_offset: usize = (2 - 1) * envelope_size;
3116
3117            // Zero reserved fields.
3118            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3119
3120            // Safety:
3121            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3122            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3123            //   envelope_size bytes, there is always sufficient room.
3124            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
3125                self.active_metadata_wrapping_key_id.as_ref().map(
3126                    <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
3127                ),
3128                encoder,
3129                offset + cur_offset,
3130                depth,
3131            )?;
3132
3133            _prev_end_offset = cur_offset + envelope_size;
3134
3135            Ok(())
3136        }
3137    }
3138
3139    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptSettings {
3140        #[inline(always)]
3141        fn new_empty() -> Self {
3142            Self::default()
3143        }
3144
3145        unsafe fn decode(
3146            &mut self,
3147            decoder: &mut fidl::encoding::Decoder<'_, D>,
3148            offset: usize,
3149            mut depth: fidl::encoding::Depth,
3150        ) -> fidl::Result<()> {
3151            decoder.debug_check_bounds::<Self>(offset);
3152            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3153                None => return Err(fidl::Error::NotNullable),
3154                Some(len) => len,
3155            };
3156            // Calling decoder.out_of_line_offset(0) is not allowed.
3157            if len == 0 {
3158                return Ok(());
3159            };
3160            depth.increment()?;
3161            let envelope_size = 8;
3162            let bytes_len = len * envelope_size;
3163            let offset = decoder.out_of_line_offset(bytes_len)?;
3164            // Decode the envelope for each type.
3165            let mut _next_ordinal_to_read = 0;
3166            let mut next_offset = offset;
3167            let end_offset = offset + bytes_len;
3168            _next_ordinal_to_read += 1;
3169            if next_offset >= end_offset {
3170                return Ok(());
3171            }
3172
3173            // Decode unknown envelopes for gaps in ordinals.
3174            while _next_ordinal_to_read < 1 {
3175                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3176                _next_ordinal_to_read += 1;
3177                next_offset += envelope_size;
3178            }
3179
3180            let next_out_of_line = decoder.next_out_of_line();
3181            let handles_before = decoder.remaining_handles();
3182            if let Some((inlined, num_bytes, num_handles)) =
3183                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3184            {
3185                let member_inline_size =
3186                    <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
3187                        decoder.context,
3188                    );
3189                if inlined != (member_inline_size <= 4) {
3190                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3191                }
3192                let inner_offset;
3193                let mut inner_depth = depth.clone();
3194                if inlined {
3195                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3196                    inner_offset = next_offset;
3197                } else {
3198                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3199                    inner_depth.increment()?;
3200                }
3201                let val_ref = self
3202                    .active_data_wrapping_key_id
3203                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
3204                fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
3205                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3206                {
3207                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3208                }
3209                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3210                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3211                }
3212            }
3213
3214            next_offset += envelope_size;
3215            _next_ordinal_to_read += 1;
3216            if next_offset >= end_offset {
3217                return Ok(());
3218            }
3219
3220            // Decode unknown envelopes for gaps in ordinals.
3221            while _next_ordinal_to_read < 2 {
3222                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3223                _next_ordinal_to_read += 1;
3224                next_offset += envelope_size;
3225            }
3226
3227            let next_out_of_line = decoder.next_out_of_line();
3228            let handles_before = decoder.remaining_handles();
3229            if let Some((inlined, num_bytes, num_handles)) =
3230                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3231            {
3232                let member_inline_size =
3233                    <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
3234                        decoder.context,
3235                    );
3236                if inlined != (member_inline_size <= 4) {
3237                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3238                }
3239                let inner_offset;
3240                let mut inner_depth = depth.clone();
3241                if inlined {
3242                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3243                    inner_offset = next_offset;
3244                } else {
3245                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3246                    inner_depth.increment()?;
3247                }
3248                let val_ref = self
3249                    .active_metadata_wrapping_key_id
3250                    .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
3251                fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
3252                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3253                {
3254                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3255                }
3256                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3257                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3258                }
3259            }
3260
3261            next_offset += envelope_size;
3262
3263            // Decode the remaining unknown envelopes.
3264            while next_offset < end_offset {
3265                _next_ordinal_to_read += 1;
3266                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3267                next_offset += envelope_size;
3268            }
3269
3270            Ok(())
3271        }
3272    }
3273}