fidl_fuchsia_security_keymint__common/
fidl_fuchsia_security_keymint__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
12pub enum CreateError {
13    Unknown,
14    FailedCreation,
15    #[doc(hidden)]
16    __SourceBreaking {
17        unknown_ordinal: u32,
18    },
19}
20
21/// Pattern that matches an unknown `CreateError` member.
22#[macro_export]
23macro_rules! CreateErrorUnknown {
24    () => {
25        _
26    };
27}
28
29impl CreateError {
30    #[inline]
31    pub fn from_primitive(prim: u32) -> Option<Self> {
32        match prim {
33            0 => Some(Self::Unknown),
34            1 => Some(Self::FailedCreation),
35            _ => None,
36        }
37    }
38
39    #[inline]
40    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
41        match prim {
42            0 => Self::Unknown,
43            1 => Self::FailedCreation,
44            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
45        }
46    }
47
48    #[inline]
49    pub fn unknown() -> Self {
50        Self::__SourceBreaking { unknown_ordinal: 0x0 }
51    }
52
53    #[inline]
54    pub const fn into_primitive(self) -> u32 {
55        match self {
56            Self::Unknown => 0,
57            Self::FailedCreation => 1,
58            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
59        }
60    }
61
62    #[inline]
63    pub fn is_unknown(&self) -> bool {
64        match self {
65            Self::__SourceBreaking { unknown_ordinal: _ } => true,
66            _ => false,
67        }
68    }
69}
70
71#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
72pub enum DeleteError {
73    Unknown,
74    FailedDelete,
75    #[doc(hidden)]
76    __SourceBreaking {
77        unknown_ordinal: u32,
78    },
79}
80
81/// Pattern that matches an unknown `DeleteError` member.
82#[macro_export]
83macro_rules! DeleteErrorUnknown {
84    () => {
85        _
86    };
87}
88
89impl DeleteError {
90    #[inline]
91    pub fn from_primitive(prim: u32) -> Option<Self> {
92        match prim {
93            0 => Some(Self::Unknown),
94            1 => Some(Self::FailedDelete),
95            _ => None,
96        }
97    }
98
99    #[inline]
100    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
101        match prim {
102            0 => Self::Unknown,
103            1 => Self::FailedDelete,
104            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
105        }
106    }
107
108    #[inline]
109    pub fn unknown() -> Self {
110        Self::__SourceBreaking { unknown_ordinal: 0x0 }
111    }
112
113    #[inline]
114    pub const fn into_primitive(self) -> u32 {
115        match self {
116            Self::Unknown => 0,
117            Self::FailedDelete => 1,
118            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
119        }
120    }
121
122    #[inline]
123    pub fn is_unknown(&self) -> bool {
124        match self {
125            Self::__SourceBreaking { unknown_ordinal: _ } => true,
126            _ => false,
127        }
128    }
129}
130
131#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
132pub enum SealError {
133    Unknown,
134    FailedSeal,
135    KeyRequiresUpgrade,
136    #[doc(hidden)]
137    __SourceBreaking {
138        unknown_ordinal: u32,
139    },
140}
141
142/// Pattern that matches an unknown `SealError` member.
143#[macro_export]
144macro_rules! SealErrorUnknown {
145    () => {
146        _
147    };
148}
149
150impl SealError {
151    #[inline]
152    pub fn from_primitive(prim: u32) -> Option<Self> {
153        match prim {
154            0 => Some(Self::Unknown),
155            1 => Some(Self::FailedSeal),
156            2 => Some(Self::KeyRequiresUpgrade),
157            _ => None,
158        }
159    }
160
161    #[inline]
162    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
163        match prim {
164            0 => Self::Unknown,
165            1 => Self::FailedSeal,
166            2 => Self::KeyRequiresUpgrade,
167            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
168        }
169    }
170
171    #[inline]
172    pub fn unknown() -> Self {
173        Self::__SourceBreaking { unknown_ordinal: 0x0 }
174    }
175
176    #[inline]
177    pub const fn into_primitive(self) -> u32 {
178        match self {
179            Self::Unknown => 0,
180            Self::FailedSeal => 1,
181            Self::KeyRequiresUpgrade => 2,
182            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
183        }
184    }
185
186    #[inline]
187    pub fn is_unknown(&self) -> bool {
188        match self {
189            Self::__SourceBreaking { unknown_ordinal: _ } => true,
190            _ => false,
191        }
192    }
193}
194
195#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
196pub enum UnsealError {
197    Unknown,
198    FailedUnseal,
199    KeyRequiresUpgrade,
200    #[doc(hidden)]
201    __SourceBreaking {
202        unknown_ordinal: u32,
203    },
204}
205
206/// Pattern that matches an unknown `UnsealError` member.
207#[macro_export]
208macro_rules! UnsealErrorUnknown {
209    () => {
210        _
211    };
212}
213
214impl UnsealError {
215    #[inline]
216    pub fn from_primitive(prim: u32) -> Option<Self> {
217        match prim {
218            0 => Some(Self::Unknown),
219            1 => Some(Self::FailedUnseal),
220            2 => Some(Self::KeyRequiresUpgrade),
221            _ => None,
222        }
223    }
224
225    #[inline]
226    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
227        match prim {
228            0 => Self::Unknown,
229            1 => Self::FailedUnseal,
230            2 => Self::KeyRequiresUpgrade,
231            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
232        }
233    }
234
235    #[inline]
236    pub fn unknown() -> Self {
237        Self::__SourceBreaking { unknown_ordinal: 0x0 }
238    }
239
240    #[inline]
241    pub const fn into_primitive(self) -> u32 {
242        match self {
243            Self::Unknown => 0,
244            Self::FailedUnseal => 1,
245            Self::KeyRequiresUpgrade => 2,
246            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
247        }
248    }
249
250    #[inline]
251    pub fn is_unknown(&self) -> bool {
252        match self {
253            Self::__SourceBreaking { unknown_ordinal: _ } => true,
254            _ => false,
255        }
256    }
257}
258
259#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
260pub enum UpgradeError {
261    Unknown,
262    FailedUpgrade,
263    #[doc(hidden)]
264    __SourceBreaking {
265        unknown_ordinal: u32,
266    },
267}
268
269/// Pattern that matches an unknown `UpgradeError` member.
270#[macro_export]
271macro_rules! UpgradeErrorUnknown {
272    () => {
273        _
274    };
275}
276
277impl UpgradeError {
278    #[inline]
279    pub fn from_primitive(prim: u32) -> Option<Self> {
280        match prim {
281            0 => Some(Self::Unknown),
282            1 => Some(Self::FailedUpgrade),
283            _ => None,
284        }
285    }
286
287    #[inline]
288    pub fn from_primitive_allow_unknown(prim: u32) -> Self {
289        match prim {
290            0 => Self::Unknown,
291            1 => Self::FailedUpgrade,
292            unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
293        }
294    }
295
296    #[inline]
297    pub fn unknown() -> Self {
298        Self::__SourceBreaking { unknown_ordinal: 0x0 }
299    }
300
301    #[inline]
302    pub const fn into_primitive(self) -> u32 {
303        match self {
304            Self::Unknown => 0,
305            Self::FailedUpgrade => 1,
306            Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
307        }
308    }
309
310    #[inline]
311    pub fn is_unknown(&self) -> bool {
312        match self {
313            Self::__SourceBreaking { unknown_ordinal: _ } => true,
314            _ => false,
315        }
316    }
317}
318
319#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
320pub struct SealingKeysCreateSealingKeyRequest {
321    pub key_info: Vec<u8>,
322}
323
324impl fidl::Persistable for SealingKeysCreateSealingKeyRequest {}
325
326#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
327pub struct SealingKeysSealRequest {
328    pub key_info: Vec<u8>,
329    pub key_blob: Vec<u8>,
330    pub secret: Vec<u8>,
331}
332
333impl fidl::Persistable for SealingKeysSealRequest {}
334
335#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
336pub struct SealingKeysUnsealRequest {
337    pub key_info: Vec<u8>,
338    pub key_blob: Vec<u8>,
339    pub sealed_secret: Vec<u8>,
340}
341
342impl fidl::Persistable for SealingKeysUnsealRequest {}
343
344#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
345pub struct SealingKeysUpgradeSealingKeyRequest {
346    pub key_info: Vec<u8>,
347    pub key_blob: Vec<u8>,
348}
349
350impl fidl::Persistable for SealingKeysUpgradeSealingKeyRequest {}
351
352#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
353pub struct SealingKeysCreateSealingKeyResponse {
354    pub key_blob: Vec<u8>,
355}
356
357impl fidl::Persistable for SealingKeysCreateSealingKeyResponse {}
358
359#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
360pub struct SealingKeysSealResponse {
361    pub sealed_secret: Vec<u8>,
362}
363
364impl fidl::Persistable for SealingKeysSealResponse {}
365
366#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
367pub struct SealingKeysUnsealResponse {
368    pub unsealed_secret: Vec<u8>,
369}
370
371impl fidl::Persistable for SealingKeysUnsealResponse {}
372
373#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
374pub struct SealingKeysUpgradeSealingKeyResponse {
375    pub key_blob: Vec<u8>,
376}
377
378impl fidl::Persistable for SealingKeysUpgradeSealingKeyResponse {}
379
380pub mod admin_ordinals {
381    pub const DELETE_ALL_KEYS: u64 = 0x7865f60b70087392;
382}
383
384pub mod sealing_keys_ordinals {
385    pub const CREATE_SEALING_KEY: u64 = 0x5a191cbb6a8081bc;
386    pub const SEAL: u64 = 0x10d41255013918d1;
387    pub const UNSEAL: u64 = 0x7037d75ecb579c83;
388    pub const UPGRADE_SEALING_KEY: u64 = 0x68584c5a799181e7;
389}
390
391mod internal {
392    use super::*;
393    unsafe impl fidl::encoding::TypeMarker for CreateError {
394        type Owned = Self;
395
396        #[inline(always)]
397        fn inline_align(_context: fidl::encoding::Context) -> usize {
398            std::mem::align_of::<u32>()
399        }
400
401        #[inline(always)]
402        fn inline_size(_context: fidl::encoding::Context) -> usize {
403            std::mem::size_of::<u32>()
404        }
405
406        #[inline(always)]
407        fn encode_is_copy() -> bool {
408            false
409        }
410
411        #[inline(always)]
412        fn decode_is_copy() -> bool {
413            false
414        }
415    }
416
417    impl fidl::encoding::ValueTypeMarker for CreateError {
418        type Borrowed<'a> = Self;
419        #[inline(always)]
420        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
421            *value
422        }
423    }
424
425    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
426        #[inline]
427        unsafe fn encode(
428            self,
429            encoder: &mut fidl::encoding::Encoder<'_, D>,
430            offset: usize,
431            _depth: fidl::encoding::Depth,
432        ) -> fidl::Result<()> {
433            encoder.debug_check_bounds::<Self>(offset);
434            encoder.write_num(self.into_primitive(), offset);
435            Ok(())
436        }
437    }
438
439    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
440        #[inline(always)]
441        fn new_empty() -> Self {
442            Self::unknown()
443        }
444
445        #[inline]
446        unsafe fn decode(
447            &mut self,
448            decoder: &mut fidl::encoding::Decoder<'_, D>,
449            offset: usize,
450            _depth: fidl::encoding::Depth,
451        ) -> fidl::Result<()> {
452            decoder.debug_check_bounds::<Self>(offset);
453            let prim = decoder.read_num::<u32>(offset);
454
455            *self = Self::from_primitive_allow_unknown(prim);
456            Ok(())
457        }
458    }
459    unsafe impl fidl::encoding::TypeMarker for DeleteError {
460        type Owned = Self;
461
462        #[inline(always)]
463        fn inline_align(_context: fidl::encoding::Context) -> usize {
464            std::mem::align_of::<u32>()
465        }
466
467        #[inline(always)]
468        fn inline_size(_context: fidl::encoding::Context) -> usize {
469            std::mem::size_of::<u32>()
470        }
471
472        #[inline(always)]
473        fn encode_is_copy() -> bool {
474            false
475        }
476
477        #[inline(always)]
478        fn decode_is_copy() -> bool {
479            false
480        }
481    }
482
483    impl fidl::encoding::ValueTypeMarker for DeleteError {
484        type Borrowed<'a> = Self;
485        #[inline(always)]
486        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
487            *value
488        }
489    }
490
491    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeleteError {
492        #[inline]
493        unsafe fn encode(
494            self,
495            encoder: &mut fidl::encoding::Encoder<'_, D>,
496            offset: usize,
497            _depth: fidl::encoding::Depth,
498        ) -> fidl::Result<()> {
499            encoder.debug_check_bounds::<Self>(offset);
500            encoder.write_num(self.into_primitive(), offset);
501            Ok(())
502        }
503    }
504
505    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteError {
506        #[inline(always)]
507        fn new_empty() -> Self {
508            Self::unknown()
509        }
510
511        #[inline]
512        unsafe fn decode(
513            &mut self,
514            decoder: &mut fidl::encoding::Decoder<'_, D>,
515            offset: usize,
516            _depth: fidl::encoding::Depth,
517        ) -> fidl::Result<()> {
518            decoder.debug_check_bounds::<Self>(offset);
519            let prim = decoder.read_num::<u32>(offset);
520
521            *self = Self::from_primitive_allow_unknown(prim);
522            Ok(())
523        }
524    }
525    unsafe impl fidl::encoding::TypeMarker for SealError {
526        type Owned = Self;
527
528        #[inline(always)]
529        fn inline_align(_context: fidl::encoding::Context) -> usize {
530            std::mem::align_of::<u32>()
531        }
532
533        #[inline(always)]
534        fn inline_size(_context: fidl::encoding::Context) -> usize {
535            std::mem::size_of::<u32>()
536        }
537
538        #[inline(always)]
539        fn encode_is_copy() -> bool {
540            false
541        }
542
543        #[inline(always)]
544        fn decode_is_copy() -> bool {
545            false
546        }
547    }
548
549    impl fidl::encoding::ValueTypeMarker for SealError {
550        type Borrowed<'a> = Self;
551        #[inline(always)]
552        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
553            *value
554        }
555    }
556
557    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SealError {
558        #[inline]
559        unsafe fn encode(
560            self,
561            encoder: &mut fidl::encoding::Encoder<'_, D>,
562            offset: usize,
563            _depth: fidl::encoding::Depth,
564        ) -> fidl::Result<()> {
565            encoder.debug_check_bounds::<Self>(offset);
566            encoder.write_num(self.into_primitive(), offset);
567            Ok(())
568        }
569    }
570
571    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SealError {
572        #[inline(always)]
573        fn new_empty() -> Self {
574            Self::unknown()
575        }
576
577        #[inline]
578        unsafe fn decode(
579            &mut self,
580            decoder: &mut fidl::encoding::Decoder<'_, D>,
581            offset: usize,
582            _depth: fidl::encoding::Depth,
583        ) -> fidl::Result<()> {
584            decoder.debug_check_bounds::<Self>(offset);
585            let prim = decoder.read_num::<u32>(offset);
586
587            *self = Self::from_primitive_allow_unknown(prim);
588            Ok(())
589        }
590    }
591    unsafe impl fidl::encoding::TypeMarker for UnsealError {
592        type Owned = Self;
593
594        #[inline(always)]
595        fn inline_align(_context: fidl::encoding::Context) -> usize {
596            std::mem::align_of::<u32>()
597        }
598
599        #[inline(always)]
600        fn inline_size(_context: fidl::encoding::Context) -> usize {
601            std::mem::size_of::<u32>()
602        }
603
604        #[inline(always)]
605        fn encode_is_copy() -> bool {
606            false
607        }
608
609        #[inline(always)]
610        fn decode_is_copy() -> bool {
611            false
612        }
613    }
614
615    impl fidl::encoding::ValueTypeMarker for UnsealError {
616        type Borrowed<'a> = Self;
617        #[inline(always)]
618        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
619            *value
620        }
621    }
622
623    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsealError {
624        #[inline]
625        unsafe fn encode(
626            self,
627            encoder: &mut fidl::encoding::Encoder<'_, D>,
628            offset: usize,
629            _depth: fidl::encoding::Depth,
630        ) -> fidl::Result<()> {
631            encoder.debug_check_bounds::<Self>(offset);
632            encoder.write_num(self.into_primitive(), offset);
633            Ok(())
634        }
635    }
636
637    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsealError {
638        #[inline(always)]
639        fn new_empty() -> Self {
640            Self::unknown()
641        }
642
643        #[inline]
644        unsafe fn decode(
645            &mut self,
646            decoder: &mut fidl::encoding::Decoder<'_, D>,
647            offset: usize,
648            _depth: fidl::encoding::Depth,
649        ) -> fidl::Result<()> {
650            decoder.debug_check_bounds::<Self>(offset);
651            let prim = decoder.read_num::<u32>(offset);
652
653            *self = Self::from_primitive_allow_unknown(prim);
654            Ok(())
655        }
656    }
657    unsafe impl fidl::encoding::TypeMarker for UpgradeError {
658        type Owned = Self;
659
660        #[inline(always)]
661        fn inline_align(_context: fidl::encoding::Context) -> usize {
662            std::mem::align_of::<u32>()
663        }
664
665        #[inline(always)]
666        fn inline_size(_context: fidl::encoding::Context) -> usize {
667            std::mem::size_of::<u32>()
668        }
669
670        #[inline(always)]
671        fn encode_is_copy() -> bool {
672            false
673        }
674
675        #[inline(always)]
676        fn decode_is_copy() -> bool {
677            false
678        }
679    }
680
681    impl fidl::encoding::ValueTypeMarker for UpgradeError {
682        type Borrowed<'a> = Self;
683        #[inline(always)]
684        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
685            *value
686        }
687    }
688
689    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UpgradeError {
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::<Self>(offset);
698            encoder.write_num(self.into_primitive(), offset);
699            Ok(())
700        }
701    }
702
703    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpgradeError {
704        #[inline(always)]
705        fn new_empty() -> Self {
706            Self::unknown()
707        }
708
709        #[inline]
710        unsafe fn decode(
711            &mut self,
712            decoder: &mut fidl::encoding::Decoder<'_, D>,
713            offset: usize,
714            _depth: fidl::encoding::Depth,
715        ) -> fidl::Result<()> {
716            decoder.debug_check_bounds::<Self>(offset);
717            let prim = decoder.read_num::<u32>(offset);
718
719            *self = Self::from_primitive_allow_unknown(prim);
720            Ok(())
721        }
722    }
723
724    impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyRequest {
725        type Borrowed<'a> = &'a Self;
726        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
727            value
728        }
729    }
730
731    unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyRequest {
732        type Owned = Self;
733
734        #[inline(always)]
735        fn inline_align(_context: fidl::encoding::Context) -> usize {
736            8
737        }
738
739        #[inline(always)]
740        fn inline_size(_context: fidl::encoding::Context) -> usize {
741            16
742        }
743    }
744
745    unsafe impl<D: fidl::encoding::ResourceDialect>
746        fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D>
747        for &SealingKeysCreateSealingKeyRequest
748    {
749        #[inline]
750        unsafe fn encode(
751            self,
752            encoder: &mut fidl::encoding::Encoder<'_, D>,
753            offset: usize,
754            _depth: fidl::encoding::Depth,
755        ) -> fidl::Result<()> {
756            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
757            // Delegate to tuple encoding.
758            fidl::encoding::Encode::<SealingKeysCreateSealingKeyRequest, D>::encode(
759                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
760                    &self.key_info,
761                ),),
762                encoder,
763                offset,
764                _depth,
765            )
766        }
767    }
768    unsafe impl<
769        D: fidl::encoding::ResourceDialect,
770        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
771    > fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D> for (T0,)
772    {
773        #[inline]
774        unsafe fn encode(
775            self,
776            encoder: &mut fidl::encoding::Encoder<'_, D>,
777            offset: usize,
778            depth: fidl::encoding::Depth,
779        ) -> fidl::Result<()> {
780            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
781            // Zero out padding regions. There's no need to apply masks
782            // because the unmasked parts will be overwritten by fields.
783            // Write the fields.
784            self.0.encode(encoder, offset + 0, depth)?;
785            Ok(())
786        }
787    }
788
789    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
790        for SealingKeysCreateSealingKeyRequest
791    {
792        #[inline(always)]
793        fn new_empty() -> Self {
794            Self { key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
795        }
796
797        #[inline]
798        unsafe fn decode(
799            &mut self,
800            decoder: &mut fidl::encoding::Decoder<'_, D>,
801            offset: usize,
802            _depth: fidl::encoding::Depth,
803        ) -> fidl::Result<()> {
804            decoder.debug_check_bounds::<Self>(offset);
805            // Verify that padding bytes are zero.
806            fidl::decode!(
807                fidl::encoding::UnboundedVector<u8>,
808                D,
809                &mut self.key_info,
810                decoder,
811                offset + 0,
812                _depth
813            )?;
814            Ok(())
815        }
816    }
817
818    impl fidl::encoding::ValueTypeMarker for SealingKeysSealRequest {
819        type Borrowed<'a> = &'a Self;
820        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
821            value
822        }
823    }
824
825    unsafe impl fidl::encoding::TypeMarker for SealingKeysSealRequest {
826        type Owned = Self;
827
828        #[inline(always)]
829        fn inline_align(_context: fidl::encoding::Context) -> usize {
830            8
831        }
832
833        #[inline(always)]
834        fn inline_size(_context: fidl::encoding::Context) -> usize {
835            48
836        }
837    }
838
839    unsafe impl<D: fidl::encoding::ResourceDialect>
840        fidl::encoding::Encode<SealingKeysSealRequest, D> for &SealingKeysSealRequest
841    {
842        #[inline]
843        unsafe fn encode(
844            self,
845            encoder: &mut fidl::encoding::Encoder<'_, D>,
846            offset: usize,
847            _depth: fidl::encoding::Depth,
848        ) -> fidl::Result<()> {
849            encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
850            // Delegate to tuple encoding.
851            fidl::encoding::Encode::<SealingKeysSealRequest, D>::encode(
852                (
853                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
854                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
855                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.secret),
856                ),
857                encoder, offset, _depth
858            )
859        }
860    }
861    unsafe impl<
862        D: fidl::encoding::ResourceDialect,
863        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
864        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
865        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
866    > fidl::encoding::Encode<SealingKeysSealRequest, D> for (T0, T1, T2)
867    {
868        #[inline]
869        unsafe fn encode(
870            self,
871            encoder: &mut fidl::encoding::Encoder<'_, D>,
872            offset: usize,
873            depth: fidl::encoding::Depth,
874        ) -> fidl::Result<()> {
875            encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
876            // Zero out padding regions. There's no need to apply masks
877            // because the unmasked parts will be overwritten by fields.
878            // Write the fields.
879            self.0.encode(encoder, offset + 0, depth)?;
880            self.1.encode(encoder, offset + 16, depth)?;
881            self.2.encode(encoder, offset + 32, depth)?;
882            Ok(())
883        }
884    }
885
886    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
887        for SealingKeysSealRequest
888    {
889        #[inline(always)]
890        fn new_empty() -> Self {
891            Self {
892                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
893                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
894                secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
895            }
896        }
897
898        #[inline]
899        unsafe fn decode(
900            &mut self,
901            decoder: &mut fidl::encoding::Decoder<'_, D>,
902            offset: usize,
903            _depth: fidl::encoding::Depth,
904        ) -> fidl::Result<()> {
905            decoder.debug_check_bounds::<Self>(offset);
906            // Verify that padding bytes are zero.
907            fidl::decode!(
908                fidl::encoding::UnboundedVector<u8>,
909                D,
910                &mut self.key_info,
911                decoder,
912                offset + 0,
913                _depth
914            )?;
915            fidl::decode!(
916                fidl::encoding::UnboundedVector<u8>,
917                D,
918                &mut self.key_blob,
919                decoder,
920                offset + 16,
921                _depth
922            )?;
923            fidl::decode!(
924                fidl::encoding::UnboundedVector<u8>,
925                D,
926                &mut self.secret,
927                decoder,
928                offset + 32,
929                _depth
930            )?;
931            Ok(())
932        }
933    }
934
935    impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealRequest {
936        type Borrowed<'a> = &'a Self;
937        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
938            value
939        }
940    }
941
942    unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealRequest {
943        type Owned = Self;
944
945        #[inline(always)]
946        fn inline_align(_context: fidl::encoding::Context) -> usize {
947            8
948        }
949
950        #[inline(always)]
951        fn inline_size(_context: fidl::encoding::Context) -> usize {
952            48
953        }
954    }
955
956    unsafe impl<D: fidl::encoding::ResourceDialect>
957        fidl::encoding::Encode<SealingKeysUnsealRequest, D> for &SealingKeysUnsealRequest
958    {
959        #[inline]
960        unsafe fn encode(
961            self,
962            encoder: &mut fidl::encoding::Encoder<'_, D>,
963            offset: usize,
964            _depth: fidl::encoding::Depth,
965        ) -> fidl::Result<()> {
966            encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
967            // Delegate to tuple encoding.
968            fidl::encoding::Encode::<SealingKeysUnsealRequest, D>::encode(
969                (
970                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
971                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
972                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sealed_secret),
973                ),
974                encoder, offset, _depth
975            )
976        }
977    }
978    unsafe impl<
979        D: fidl::encoding::ResourceDialect,
980        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
981        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
982        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
983    > fidl::encoding::Encode<SealingKeysUnsealRequest, D> for (T0, T1, T2)
984    {
985        #[inline]
986        unsafe fn encode(
987            self,
988            encoder: &mut fidl::encoding::Encoder<'_, D>,
989            offset: usize,
990            depth: fidl::encoding::Depth,
991        ) -> fidl::Result<()> {
992            encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
993            // Zero out padding regions. There's no need to apply masks
994            // because the unmasked parts will be overwritten by fields.
995            // Write the fields.
996            self.0.encode(encoder, offset + 0, depth)?;
997            self.1.encode(encoder, offset + 16, depth)?;
998            self.2.encode(encoder, offset + 32, depth)?;
999            Ok(())
1000        }
1001    }
1002
1003    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1004        for SealingKeysUnsealRequest
1005    {
1006        #[inline(always)]
1007        fn new_empty() -> Self {
1008            Self {
1009                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1010                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1011                sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1012            }
1013        }
1014
1015        #[inline]
1016        unsafe fn decode(
1017            &mut self,
1018            decoder: &mut fidl::encoding::Decoder<'_, D>,
1019            offset: usize,
1020            _depth: fidl::encoding::Depth,
1021        ) -> fidl::Result<()> {
1022            decoder.debug_check_bounds::<Self>(offset);
1023            // Verify that padding bytes are zero.
1024            fidl::decode!(
1025                fidl::encoding::UnboundedVector<u8>,
1026                D,
1027                &mut self.key_info,
1028                decoder,
1029                offset + 0,
1030                _depth
1031            )?;
1032            fidl::decode!(
1033                fidl::encoding::UnboundedVector<u8>,
1034                D,
1035                &mut self.key_blob,
1036                decoder,
1037                offset + 16,
1038                _depth
1039            )?;
1040            fidl::decode!(
1041                fidl::encoding::UnboundedVector<u8>,
1042                D,
1043                &mut self.sealed_secret,
1044                decoder,
1045                offset + 32,
1046                _depth
1047            )?;
1048            Ok(())
1049        }
1050    }
1051
1052    impl fidl::encoding::ValueTypeMarker for SealingKeysUpgradeSealingKeyRequest {
1053        type Borrowed<'a> = &'a Self;
1054        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1055            value
1056        }
1057    }
1058
1059    unsafe impl fidl::encoding::TypeMarker for SealingKeysUpgradeSealingKeyRequest {
1060        type Owned = Self;
1061
1062        #[inline(always)]
1063        fn inline_align(_context: fidl::encoding::Context) -> usize {
1064            8
1065        }
1066
1067        #[inline(always)]
1068        fn inline_size(_context: fidl::encoding::Context) -> usize {
1069            32
1070        }
1071    }
1072
1073    unsafe impl<D: fidl::encoding::ResourceDialect>
1074        fidl::encoding::Encode<SealingKeysUpgradeSealingKeyRequest, D>
1075        for &SealingKeysUpgradeSealingKeyRequest
1076    {
1077        #[inline]
1078        unsafe fn encode(
1079            self,
1080            encoder: &mut fidl::encoding::Encoder<'_, D>,
1081            offset: usize,
1082            _depth: fidl::encoding::Depth,
1083        ) -> fidl::Result<()> {
1084            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyRequest>(offset);
1085            // Delegate to tuple encoding.
1086            fidl::encoding::Encode::<SealingKeysUpgradeSealingKeyRequest, D>::encode(
1087                (
1088                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
1089                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
1090                ),
1091                encoder, offset, _depth
1092            )
1093        }
1094    }
1095    unsafe impl<
1096        D: fidl::encoding::ResourceDialect,
1097        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1098        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1099    > fidl::encoding::Encode<SealingKeysUpgradeSealingKeyRequest, D> for (T0, T1)
1100    {
1101        #[inline]
1102        unsafe fn encode(
1103            self,
1104            encoder: &mut fidl::encoding::Encoder<'_, D>,
1105            offset: usize,
1106            depth: fidl::encoding::Depth,
1107        ) -> fidl::Result<()> {
1108            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyRequest>(offset);
1109            // Zero out padding regions. There's no need to apply masks
1110            // because the unmasked parts will be overwritten by fields.
1111            // Write the fields.
1112            self.0.encode(encoder, offset + 0, depth)?;
1113            self.1.encode(encoder, offset + 16, depth)?;
1114            Ok(())
1115        }
1116    }
1117
1118    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1119        for SealingKeysUpgradeSealingKeyRequest
1120    {
1121        #[inline(always)]
1122        fn new_empty() -> Self {
1123            Self {
1124                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1125                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1126            }
1127        }
1128
1129        #[inline]
1130        unsafe fn decode(
1131            &mut self,
1132            decoder: &mut fidl::encoding::Decoder<'_, D>,
1133            offset: usize,
1134            _depth: fidl::encoding::Depth,
1135        ) -> fidl::Result<()> {
1136            decoder.debug_check_bounds::<Self>(offset);
1137            // Verify that padding bytes are zero.
1138            fidl::decode!(
1139                fidl::encoding::UnboundedVector<u8>,
1140                D,
1141                &mut self.key_info,
1142                decoder,
1143                offset + 0,
1144                _depth
1145            )?;
1146            fidl::decode!(
1147                fidl::encoding::UnboundedVector<u8>,
1148                D,
1149                &mut self.key_blob,
1150                decoder,
1151                offset + 16,
1152                _depth
1153            )?;
1154            Ok(())
1155        }
1156    }
1157
1158    impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyResponse {
1159        type Borrowed<'a> = &'a Self;
1160        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1161            value
1162        }
1163    }
1164
1165    unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyResponse {
1166        type Owned = Self;
1167
1168        #[inline(always)]
1169        fn inline_align(_context: fidl::encoding::Context) -> usize {
1170            8
1171        }
1172
1173        #[inline(always)]
1174        fn inline_size(_context: fidl::encoding::Context) -> usize {
1175            16
1176        }
1177    }
1178
1179    unsafe impl<D: fidl::encoding::ResourceDialect>
1180        fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D>
1181        for &SealingKeysCreateSealingKeyResponse
1182    {
1183        #[inline]
1184        unsafe fn encode(
1185            self,
1186            encoder: &mut fidl::encoding::Encoder<'_, D>,
1187            offset: usize,
1188            _depth: fidl::encoding::Depth,
1189        ) -> fidl::Result<()> {
1190            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
1191            // Delegate to tuple encoding.
1192            fidl::encoding::Encode::<SealingKeysCreateSealingKeyResponse, D>::encode(
1193                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1194                    &self.key_blob,
1195                ),),
1196                encoder,
1197                offset,
1198                _depth,
1199            )
1200        }
1201    }
1202    unsafe impl<
1203        D: fidl::encoding::ResourceDialect,
1204        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1205    > fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D> for (T0,)
1206    {
1207        #[inline]
1208        unsafe fn encode(
1209            self,
1210            encoder: &mut fidl::encoding::Encoder<'_, D>,
1211            offset: usize,
1212            depth: fidl::encoding::Depth,
1213        ) -> fidl::Result<()> {
1214            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
1215            // Zero out padding regions. There's no need to apply masks
1216            // because the unmasked parts will be overwritten by fields.
1217            // Write the fields.
1218            self.0.encode(encoder, offset + 0, depth)?;
1219            Ok(())
1220        }
1221    }
1222
1223    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1224        for SealingKeysCreateSealingKeyResponse
1225    {
1226        #[inline(always)]
1227        fn new_empty() -> Self {
1228            Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1229        }
1230
1231        #[inline]
1232        unsafe fn decode(
1233            &mut self,
1234            decoder: &mut fidl::encoding::Decoder<'_, D>,
1235            offset: usize,
1236            _depth: fidl::encoding::Depth,
1237        ) -> fidl::Result<()> {
1238            decoder.debug_check_bounds::<Self>(offset);
1239            // Verify that padding bytes are zero.
1240            fidl::decode!(
1241                fidl::encoding::UnboundedVector<u8>,
1242                D,
1243                &mut self.key_blob,
1244                decoder,
1245                offset + 0,
1246                _depth
1247            )?;
1248            Ok(())
1249        }
1250    }
1251
1252    impl fidl::encoding::ValueTypeMarker for SealingKeysSealResponse {
1253        type Borrowed<'a> = &'a Self;
1254        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1255            value
1256        }
1257    }
1258
1259    unsafe impl fidl::encoding::TypeMarker for SealingKeysSealResponse {
1260        type Owned = Self;
1261
1262        #[inline(always)]
1263        fn inline_align(_context: fidl::encoding::Context) -> usize {
1264            8
1265        }
1266
1267        #[inline(always)]
1268        fn inline_size(_context: fidl::encoding::Context) -> usize {
1269            16
1270        }
1271    }
1272
1273    unsafe impl<D: fidl::encoding::ResourceDialect>
1274        fidl::encoding::Encode<SealingKeysSealResponse, D> for &SealingKeysSealResponse
1275    {
1276        #[inline]
1277        unsafe fn encode(
1278            self,
1279            encoder: &mut fidl::encoding::Encoder<'_, D>,
1280            offset: usize,
1281            _depth: fidl::encoding::Depth,
1282        ) -> fidl::Result<()> {
1283            encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
1284            // Delegate to tuple encoding.
1285            fidl::encoding::Encode::<SealingKeysSealResponse, D>::encode(
1286                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1287                    &self.sealed_secret,
1288                ),),
1289                encoder,
1290                offset,
1291                _depth,
1292            )
1293        }
1294    }
1295    unsafe impl<
1296        D: fidl::encoding::ResourceDialect,
1297        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1298    > fidl::encoding::Encode<SealingKeysSealResponse, D> for (T0,)
1299    {
1300        #[inline]
1301        unsafe fn encode(
1302            self,
1303            encoder: &mut fidl::encoding::Encoder<'_, D>,
1304            offset: usize,
1305            depth: fidl::encoding::Depth,
1306        ) -> fidl::Result<()> {
1307            encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
1308            // Zero out padding regions. There's no need to apply masks
1309            // because the unmasked parts will be overwritten by fields.
1310            // Write the fields.
1311            self.0.encode(encoder, offset + 0, depth)?;
1312            Ok(())
1313        }
1314    }
1315
1316    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1317        for SealingKeysSealResponse
1318    {
1319        #[inline(always)]
1320        fn new_empty() -> Self {
1321            Self { sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1322        }
1323
1324        #[inline]
1325        unsafe fn decode(
1326            &mut self,
1327            decoder: &mut fidl::encoding::Decoder<'_, D>,
1328            offset: usize,
1329            _depth: fidl::encoding::Depth,
1330        ) -> fidl::Result<()> {
1331            decoder.debug_check_bounds::<Self>(offset);
1332            // Verify that padding bytes are zero.
1333            fidl::decode!(
1334                fidl::encoding::UnboundedVector<u8>,
1335                D,
1336                &mut self.sealed_secret,
1337                decoder,
1338                offset + 0,
1339                _depth
1340            )?;
1341            Ok(())
1342        }
1343    }
1344
1345    impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealResponse {
1346        type Borrowed<'a> = &'a Self;
1347        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1348            value
1349        }
1350    }
1351
1352    unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealResponse {
1353        type Owned = Self;
1354
1355        #[inline(always)]
1356        fn inline_align(_context: fidl::encoding::Context) -> usize {
1357            8
1358        }
1359
1360        #[inline(always)]
1361        fn inline_size(_context: fidl::encoding::Context) -> usize {
1362            16
1363        }
1364    }
1365
1366    unsafe impl<D: fidl::encoding::ResourceDialect>
1367        fidl::encoding::Encode<SealingKeysUnsealResponse, D> for &SealingKeysUnsealResponse
1368    {
1369        #[inline]
1370        unsafe fn encode(
1371            self,
1372            encoder: &mut fidl::encoding::Encoder<'_, D>,
1373            offset: usize,
1374            _depth: fidl::encoding::Depth,
1375        ) -> fidl::Result<()> {
1376            encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
1377            // Delegate to tuple encoding.
1378            fidl::encoding::Encode::<SealingKeysUnsealResponse, D>::encode(
1379                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1380                    &self.unsealed_secret,
1381                ),),
1382                encoder,
1383                offset,
1384                _depth,
1385            )
1386        }
1387    }
1388    unsafe impl<
1389        D: fidl::encoding::ResourceDialect,
1390        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1391    > fidl::encoding::Encode<SealingKeysUnsealResponse, D> for (T0,)
1392    {
1393        #[inline]
1394        unsafe fn encode(
1395            self,
1396            encoder: &mut fidl::encoding::Encoder<'_, D>,
1397            offset: usize,
1398            depth: fidl::encoding::Depth,
1399        ) -> fidl::Result<()> {
1400            encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
1401            // Zero out padding regions. There's no need to apply masks
1402            // because the unmasked parts will be overwritten by fields.
1403            // Write the fields.
1404            self.0.encode(encoder, offset + 0, depth)?;
1405            Ok(())
1406        }
1407    }
1408
1409    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1410        for SealingKeysUnsealResponse
1411    {
1412        #[inline(always)]
1413        fn new_empty() -> Self {
1414            Self { unsealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1415        }
1416
1417        #[inline]
1418        unsafe fn decode(
1419            &mut self,
1420            decoder: &mut fidl::encoding::Decoder<'_, D>,
1421            offset: usize,
1422            _depth: fidl::encoding::Depth,
1423        ) -> fidl::Result<()> {
1424            decoder.debug_check_bounds::<Self>(offset);
1425            // Verify that padding bytes are zero.
1426            fidl::decode!(
1427                fidl::encoding::UnboundedVector<u8>,
1428                D,
1429                &mut self.unsealed_secret,
1430                decoder,
1431                offset + 0,
1432                _depth
1433            )?;
1434            Ok(())
1435        }
1436    }
1437
1438    impl fidl::encoding::ValueTypeMarker for SealingKeysUpgradeSealingKeyResponse {
1439        type Borrowed<'a> = &'a Self;
1440        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1441            value
1442        }
1443    }
1444
1445    unsafe impl fidl::encoding::TypeMarker for SealingKeysUpgradeSealingKeyResponse {
1446        type Owned = Self;
1447
1448        #[inline(always)]
1449        fn inline_align(_context: fidl::encoding::Context) -> usize {
1450            8
1451        }
1452
1453        #[inline(always)]
1454        fn inline_size(_context: fidl::encoding::Context) -> usize {
1455            16
1456        }
1457    }
1458
1459    unsafe impl<D: fidl::encoding::ResourceDialect>
1460        fidl::encoding::Encode<SealingKeysUpgradeSealingKeyResponse, D>
1461        for &SealingKeysUpgradeSealingKeyResponse
1462    {
1463        #[inline]
1464        unsafe fn encode(
1465            self,
1466            encoder: &mut fidl::encoding::Encoder<'_, D>,
1467            offset: usize,
1468            _depth: fidl::encoding::Depth,
1469        ) -> fidl::Result<()> {
1470            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyResponse>(offset);
1471            // Delegate to tuple encoding.
1472            fidl::encoding::Encode::<SealingKeysUpgradeSealingKeyResponse, D>::encode(
1473                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1474                    &self.key_blob,
1475                ),),
1476                encoder,
1477                offset,
1478                _depth,
1479            )
1480        }
1481    }
1482    unsafe impl<
1483        D: fidl::encoding::ResourceDialect,
1484        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1485    > fidl::encoding::Encode<SealingKeysUpgradeSealingKeyResponse, D> for (T0,)
1486    {
1487        #[inline]
1488        unsafe fn encode(
1489            self,
1490            encoder: &mut fidl::encoding::Encoder<'_, D>,
1491            offset: usize,
1492            depth: fidl::encoding::Depth,
1493        ) -> fidl::Result<()> {
1494            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyResponse>(offset);
1495            // Zero out padding regions. There's no need to apply masks
1496            // because the unmasked parts will be overwritten by fields.
1497            // Write the fields.
1498            self.0.encode(encoder, offset + 0, depth)?;
1499            Ok(())
1500        }
1501    }
1502
1503    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1504        for SealingKeysUpgradeSealingKeyResponse
1505    {
1506        #[inline(always)]
1507        fn new_empty() -> Self {
1508            Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1509        }
1510
1511        #[inline]
1512        unsafe fn decode(
1513            &mut self,
1514            decoder: &mut fidl::encoding::Decoder<'_, D>,
1515            offset: usize,
1516            _depth: fidl::encoding::Depth,
1517        ) -> fidl::Result<()> {
1518            decoder.debug_check_bounds::<Self>(offset);
1519            // Verify that padding bytes are zero.
1520            fidl::decode!(
1521                fidl::encoding::UnboundedVector<u8>,
1522                D,
1523                &mut self.key_blob,
1524                decoder,
1525                offset + 0,
1526                _depth
1527            )?;
1528            Ok(())
1529        }
1530    }
1531}