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 SealingKeysDeleteSealingKeyRequest {
328    pub key_blob: Vec<u8>,
329}
330
331impl fidl::Persistable for SealingKeysDeleteSealingKeyRequest {}
332
333#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
334pub struct SealingKeysSealRequest {
335    pub key_info: Vec<u8>,
336    pub key_blob: Vec<u8>,
337    pub secret: Vec<u8>,
338}
339
340impl fidl::Persistable for SealingKeysSealRequest {}
341
342#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
343pub struct SealingKeysUnsealRequest {
344    pub key_info: Vec<u8>,
345    pub key_blob: Vec<u8>,
346    pub sealed_secret: Vec<u8>,
347}
348
349impl fidl::Persistable for SealingKeysUnsealRequest {}
350
351#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
352pub struct SealingKeysUpgradeSealingKeyRequest {
353    pub key_info: Vec<u8>,
354    pub key_blob: Vec<u8>,
355}
356
357impl fidl::Persistable for SealingKeysUpgradeSealingKeyRequest {}
358
359#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
360pub struct SealingKeysCreateSealingKeyResponse {
361    pub key_blob: Vec<u8>,
362}
363
364impl fidl::Persistable for SealingKeysCreateSealingKeyResponse {}
365
366#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
367pub struct SealingKeysSealResponse {
368    pub sealed_secret: Vec<u8>,
369}
370
371impl fidl::Persistable for SealingKeysSealResponse {}
372
373#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
374pub struct SealingKeysUnsealResponse {
375    pub unsealed_secret: Vec<u8>,
376}
377
378impl fidl::Persistable for SealingKeysUnsealResponse {}
379
380#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
381pub struct SealingKeysUpgradeSealingKeyResponse {
382    pub key_blob: Vec<u8>,
383}
384
385impl fidl::Persistable for SealingKeysUpgradeSealingKeyResponse {}
386
387pub mod admin_ordinals {
388    pub const DELETE_ALL_KEYS: u64 = 0x7865f60b70087392;
389}
390
391pub mod sealing_keys_ordinals {
392    pub const CREATE_SEALING_KEY: u64 = 0x5a191cbb6a8081bc;
393    pub const SEAL: u64 = 0x10d41255013918d1;
394    pub const UNSEAL: u64 = 0x7037d75ecb579c83;
395    pub const UPGRADE_SEALING_KEY: u64 = 0x68584c5a799181e7;
396    pub const DELETE_SEALING_KEY: u64 = 0xad65bae761e8c3;
397}
398
399mod internal {
400    use super::*;
401    unsafe impl fidl::encoding::TypeMarker for CreateError {
402        type Owned = Self;
403
404        #[inline(always)]
405        fn inline_align(_context: fidl::encoding::Context) -> usize {
406            std::mem::align_of::<u32>()
407        }
408
409        #[inline(always)]
410        fn inline_size(_context: fidl::encoding::Context) -> usize {
411            std::mem::size_of::<u32>()
412        }
413
414        #[inline(always)]
415        fn encode_is_copy() -> bool {
416            false
417        }
418
419        #[inline(always)]
420        fn decode_is_copy() -> bool {
421            false
422        }
423    }
424
425    impl fidl::encoding::ValueTypeMarker for CreateError {
426        type Borrowed<'a> = Self;
427        #[inline(always)]
428        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
429            *value
430        }
431    }
432
433    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
434        #[inline]
435        unsafe fn encode(
436            self,
437            encoder: &mut fidl::encoding::Encoder<'_, D>,
438            offset: usize,
439            _depth: fidl::encoding::Depth,
440        ) -> fidl::Result<()> {
441            encoder.debug_check_bounds::<Self>(offset);
442            encoder.write_num(self.into_primitive(), offset);
443            Ok(())
444        }
445    }
446
447    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
448        #[inline(always)]
449        fn new_empty() -> Self {
450            Self::unknown()
451        }
452
453        #[inline]
454        unsafe fn decode(
455            &mut self,
456            decoder: &mut fidl::encoding::Decoder<'_, D>,
457            offset: usize,
458            _depth: fidl::encoding::Depth,
459        ) -> fidl::Result<()> {
460            decoder.debug_check_bounds::<Self>(offset);
461            let prim = decoder.read_num::<u32>(offset);
462
463            *self = Self::from_primitive_allow_unknown(prim);
464            Ok(())
465        }
466    }
467    unsafe impl fidl::encoding::TypeMarker for DeleteError {
468        type Owned = Self;
469
470        #[inline(always)]
471        fn inline_align(_context: fidl::encoding::Context) -> usize {
472            std::mem::align_of::<u32>()
473        }
474
475        #[inline(always)]
476        fn inline_size(_context: fidl::encoding::Context) -> usize {
477            std::mem::size_of::<u32>()
478        }
479
480        #[inline(always)]
481        fn encode_is_copy() -> bool {
482            false
483        }
484
485        #[inline(always)]
486        fn decode_is_copy() -> bool {
487            false
488        }
489    }
490
491    impl fidl::encoding::ValueTypeMarker for DeleteError {
492        type Borrowed<'a> = Self;
493        #[inline(always)]
494        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
495            *value
496        }
497    }
498
499    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeleteError {
500        #[inline]
501        unsafe fn encode(
502            self,
503            encoder: &mut fidl::encoding::Encoder<'_, D>,
504            offset: usize,
505            _depth: fidl::encoding::Depth,
506        ) -> fidl::Result<()> {
507            encoder.debug_check_bounds::<Self>(offset);
508            encoder.write_num(self.into_primitive(), offset);
509            Ok(())
510        }
511    }
512
513    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeleteError {
514        #[inline(always)]
515        fn new_empty() -> Self {
516            Self::unknown()
517        }
518
519        #[inline]
520        unsafe fn decode(
521            &mut self,
522            decoder: &mut fidl::encoding::Decoder<'_, D>,
523            offset: usize,
524            _depth: fidl::encoding::Depth,
525        ) -> fidl::Result<()> {
526            decoder.debug_check_bounds::<Self>(offset);
527            let prim = decoder.read_num::<u32>(offset);
528
529            *self = Self::from_primitive_allow_unknown(prim);
530            Ok(())
531        }
532    }
533    unsafe impl fidl::encoding::TypeMarker for SealError {
534        type Owned = Self;
535
536        #[inline(always)]
537        fn inline_align(_context: fidl::encoding::Context) -> usize {
538            std::mem::align_of::<u32>()
539        }
540
541        #[inline(always)]
542        fn inline_size(_context: fidl::encoding::Context) -> usize {
543            std::mem::size_of::<u32>()
544        }
545
546        #[inline(always)]
547        fn encode_is_copy() -> bool {
548            false
549        }
550
551        #[inline(always)]
552        fn decode_is_copy() -> bool {
553            false
554        }
555    }
556
557    impl fidl::encoding::ValueTypeMarker for SealError {
558        type Borrowed<'a> = Self;
559        #[inline(always)]
560        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
561            *value
562        }
563    }
564
565    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SealError {
566        #[inline]
567        unsafe fn encode(
568            self,
569            encoder: &mut fidl::encoding::Encoder<'_, D>,
570            offset: usize,
571            _depth: fidl::encoding::Depth,
572        ) -> fidl::Result<()> {
573            encoder.debug_check_bounds::<Self>(offset);
574            encoder.write_num(self.into_primitive(), offset);
575            Ok(())
576        }
577    }
578
579    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SealError {
580        #[inline(always)]
581        fn new_empty() -> Self {
582            Self::unknown()
583        }
584
585        #[inline]
586        unsafe fn decode(
587            &mut self,
588            decoder: &mut fidl::encoding::Decoder<'_, D>,
589            offset: usize,
590            _depth: fidl::encoding::Depth,
591        ) -> fidl::Result<()> {
592            decoder.debug_check_bounds::<Self>(offset);
593            let prim = decoder.read_num::<u32>(offset);
594
595            *self = Self::from_primitive_allow_unknown(prim);
596            Ok(())
597        }
598    }
599    unsafe impl fidl::encoding::TypeMarker for UnsealError {
600        type Owned = Self;
601
602        #[inline(always)]
603        fn inline_align(_context: fidl::encoding::Context) -> usize {
604            std::mem::align_of::<u32>()
605        }
606
607        #[inline(always)]
608        fn inline_size(_context: fidl::encoding::Context) -> usize {
609            std::mem::size_of::<u32>()
610        }
611
612        #[inline(always)]
613        fn encode_is_copy() -> bool {
614            false
615        }
616
617        #[inline(always)]
618        fn decode_is_copy() -> bool {
619            false
620        }
621    }
622
623    impl fidl::encoding::ValueTypeMarker for UnsealError {
624        type Borrowed<'a> = Self;
625        #[inline(always)]
626        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
627            *value
628        }
629    }
630
631    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsealError {
632        #[inline]
633        unsafe fn encode(
634            self,
635            encoder: &mut fidl::encoding::Encoder<'_, D>,
636            offset: usize,
637            _depth: fidl::encoding::Depth,
638        ) -> fidl::Result<()> {
639            encoder.debug_check_bounds::<Self>(offset);
640            encoder.write_num(self.into_primitive(), offset);
641            Ok(())
642        }
643    }
644
645    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsealError {
646        #[inline(always)]
647        fn new_empty() -> Self {
648            Self::unknown()
649        }
650
651        #[inline]
652        unsafe fn decode(
653            &mut self,
654            decoder: &mut fidl::encoding::Decoder<'_, D>,
655            offset: usize,
656            _depth: fidl::encoding::Depth,
657        ) -> fidl::Result<()> {
658            decoder.debug_check_bounds::<Self>(offset);
659            let prim = decoder.read_num::<u32>(offset);
660
661            *self = Self::from_primitive_allow_unknown(prim);
662            Ok(())
663        }
664    }
665    unsafe impl fidl::encoding::TypeMarker for UpgradeError {
666        type Owned = Self;
667
668        #[inline(always)]
669        fn inline_align(_context: fidl::encoding::Context) -> usize {
670            std::mem::align_of::<u32>()
671        }
672
673        #[inline(always)]
674        fn inline_size(_context: fidl::encoding::Context) -> usize {
675            std::mem::size_of::<u32>()
676        }
677
678        #[inline(always)]
679        fn encode_is_copy() -> bool {
680            false
681        }
682
683        #[inline(always)]
684        fn decode_is_copy() -> bool {
685            false
686        }
687    }
688
689    impl fidl::encoding::ValueTypeMarker for UpgradeError {
690        type Borrowed<'a> = Self;
691        #[inline(always)]
692        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
693            *value
694        }
695    }
696
697    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UpgradeError {
698        #[inline]
699        unsafe fn encode(
700            self,
701            encoder: &mut fidl::encoding::Encoder<'_, D>,
702            offset: usize,
703            _depth: fidl::encoding::Depth,
704        ) -> fidl::Result<()> {
705            encoder.debug_check_bounds::<Self>(offset);
706            encoder.write_num(self.into_primitive(), offset);
707            Ok(())
708        }
709    }
710
711    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UpgradeError {
712        #[inline(always)]
713        fn new_empty() -> Self {
714            Self::unknown()
715        }
716
717        #[inline]
718        unsafe fn decode(
719            &mut self,
720            decoder: &mut fidl::encoding::Decoder<'_, D>,
721            offset: usize,
722            _depth: fidl::encoding::Depth,
723        ) -> fidl::Result<()> {
724            decoder.debug_check_bounds::<Self>(offset);
725            let prim = decoder.read_num::<u32>(offset);
726
727            *self = Self::from_primitive_allow_unknown(prim);
728            Ok(())
729        }
730    }
731
732    impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyRequest {
733        type Borrowed<'a> = &'a Self;
734        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
735            value
736        }
737    }
738
739    unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyRequest {
740        type Owned = Self;
741
742        #[inline(always)]
743        fn inline_align(_context: fidl::encoding::Context) -> usize {
744            8
745        }
746
747        #[inline(always)]
748        fn inline_size(_context: fidl::encoding::Context) -> usize {
749            16
750        }
751    }
752
753    unsafe impl<D: fidl::encoding::ResourceDialect>
754        fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D>
755        for &SealingKeysCreateSealingKeyRequest
756    {
757        #[inline]
758        unsafe fn encode(
759            self,
760            encoder: &mut fidl::encoding::Encoder<'_, D>,
761            offset: usize,
762            _depth: fidl::encoding::Depth,
763        ) -> fidl::Result<()> {
764            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
765            // Delegate to tuple encoding.
766            fidl::encoding::Encode::<SealingKeysCreateSealingKeyRequest, D>::encode(
767                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
768                    &self.key_info,
769                ),),
770                encoder,
771                offset,
772                _depth,
773            )
774        }
775    }
776    unsafe impl<
777        D: fidl::encoding::ResourceDialect,
778        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
779    > fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D> for (T0,)
780    {
781        #[inline]
782        unsafe fn encode(
783            self,
784            encoder: &mut fidl::encoding::Encoder<'_, D>,
785            offset: usize,
786            depth: fidl::encoding::Depth,
787        ) -> fidl::Result<()> {
788            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
789            // Zero out padding regions. There's no need to apply masks
790            // because the unmasked parts will be overwritten by fields.
791            // Write the fields.
792            self.0.encode(encoder, offset + 0, depth)?;
793            Ok(())
794        }
795    }
796
797    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
798        for SealingKeysCreateSealingKeyRequest
799    {
800        #[inline(always)]
801        fn new_empty() -> Self {
802            Self { key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
803        }
804
805        #[inline]
806        unsafe fn decode(
807            &mut self,
808            decoder: &mut fidl::encoding::Decoder<'_, D>,
809            offset: usize,
810            _depth: fidl::encoding::Depth,
811        ) -> fidl::Result<()> {
812            decoder.debug_check_bounds::<Self>(offset);
813            // Verify that padding bytes are zero.
814            fidl::decode!(
815                fidl::encoding::UnboundedVector<u8>,
816                D,
817                &mut self.key_info,
818                decoder,
819                offset + 0,
820                _depth
821            )?;
822            Ok(())
823        }
824    }
825
826    impl fidl::encoding::ValueTypeMarker for SealingKeysDeleteSealingKeyRequest {
827        type Borrowed<'a> = &'a Self;
828        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
829            value
830        }
831    }
832
833    unsafe impl fidl::encoding::TypeMarker for SealingKeysDeleteSealingKeyRequest {
834        type Owned = Self;
835
836        #[inline(always)]
837        fn inline_align(_context: fidl::encoding::Context) -> usize {
838            8
839        }
840
841        #[inline(always)]
842        fn inline_size(_context: fidl::encoding::Context) -> usize {
843            16
844        }
845    }
846
847    unsafe impl<D: fidl::encoding::ResourceDialect>
848        fidl::encoding::Encode<SealingKeysDeleteSealingKeyRequest, D>
849        for &SealingKeysDeleteSealingKeyRequest
850    {
851        #[inline]
852        unsafe fn encode(
853            self,
854            encoder: &mut fidl::encoding::Encoder<'_, D>,
855            offset: usize,
856            _depth: fidl::encoding::Depth,
857        ) -> fidl::Result<()> {
858            encoder.debug_check_bounds::<SealingKeysDeleteSealingKeyRequest>(offset);
859            // Delegate to tuple encoding.
860            fidl::encoding::Encode::<SealingKeysDeleteSealingKeyRequest, D>::encode(
861                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
862                    &self.key_blob,
863                ),),
864                encoder,
865                offset,
866                _depth,
867            )
868        }
869    }
870    unsafe impl<
871        D: fidl::encoding::ResourceDialect,
872        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
873    > fidl::encoding::Encode<SealingKeysDeleteSealingKeyRequest, D> for (T0,)
874    {
875        #[inline]
876        unsafe fn encode(
877            self,
878            encoder: &mut fidl::encoding::Encoder<'_, D>,
879            offset: usize,
880            depth: fidl::encoding::Depth,
881        ) -> fidl::Result<()> {
882            encoder.debug_check_bounds::<SealingKeysDeleteSealingKeyRequest>(offset);
883            // Zero out padding regions. There's no need to apply masks
884            // because the unmasked parts will be overwritten by fields.
885            // Write the fields.
886            self.0.encode(encoder, offset + 0, depth)?;
887            Ok(())
888        }
889    }
890
891    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
892        for SealingKeysDeleteSealingKeyRequest
893    {
894        #[inline(always)]
895        fn new_empty() -> Self {
896            Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
897        }
898
899        #[inline]
900        unsafe fn decode(
901            &mut self,
902            decoder: &mut fidl::encoding::Decoder<'_, D>,
903            offset: usize,
904            _depth: fidl::encoding::Depth,
905        ) -> fidl::Result<()> {
906            decoder.debug_check_bounds::<Self>(offset);
907            // Verify that padding bytes are zero.
908            fidl::decode!(
909                fidl::encoding::UnboundedVector<u8>,
910                D,
911                &mut self.key_blob,
912                decoder,
913                offset + 0,
914                _depth
915            )?;
916            Ok(())
917        }
918    }
919
920    impl fidl::encoding::ValueTypeMarker for SealingKeysSealRequest {
921        type Borrowed<'a> = &'a Self;
922        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
923            value
924        }
925    }
926
927    unsafe impl fidl::encoding::TypeMarker for SealingKeysSealRequest {
928        type Owned = Self;
929
930        #[inline(always)]
931        fn inline_align(_context: fidl::encoding::Context) -> usize {
932            8
933        }
934
935        #[inline(always)]
936        fn inline_size(_context: fidl::encoding::Context) -> usize {
937            48
938        }
939    }
940
941    unsafe impl<D: fidl::encoding::ResourceDialect>
942        fidl::encoding::Encode<SealingKeysSealRequest, D> for &SealingKeysSealRequest
943    {
944        #[inline]
945        unsafe fn encode(
946            self,
947            encoder: &mut fidl::encoding::Encoder<'_, D>,
948            offset: usize,
949            _depth: fidl::encoding::Depth,
950        ) -> fidl::Result<()> {
951            encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
952            // Delegate to tuple encoding.
953            fidl::encoding::Encode::<SealingKeysSealRequest, D>::encode(
954                (
955                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
956                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
957                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.secret),
958                ),
959                encoder, offset, _depth
960            )
961        }
962    }
963    unsafe impl<
964        D: fidl::encoding::ResourceDialect,
965        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
966        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
967        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
968    > fidl::encoding::Encode<SealingKeysSealRequest, D> for (T0, T1, T2)
969    {
970        #[inline]
971        unsafe fn encode(
972            self,
973            encoder: &mut fidl::encoding::Encoder<'_, D>,
974            offset: usize,
975            depth: fidl::encoding::Depth,
976        ) -> fidl::Result<()> {
977            encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
978            // Zero out padding regions. There's no need to apply masks
979            // because the unmasked parts will be overwritten by fields.
980            // Write the fields.
981            self.0.encode(encoder, offset + 0, depth)?;
982            self.1.encode(encoder, offset + 16, depth)?;
983            self.2.encode(encoder, offset + 32, depth)?;
984            Ok(())
985        }
986    }
987
988    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
989        for SealingKeysSealRequest
990    {
991        #[inline(always)]
992        fn new_empty() -> Self {
993            Self {
994                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
995                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
996                secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
997            }
998        }
999
1000        #[inline]
1001        unsafe fn decode(
1002            &mut self,
1003            decoder: &mut fidl::encoding::Decoder<'_, D>,
1004            offset: usize,
1005            _depth: fidl::encoding::Depth,
1006        ) -> fidl::Result<()> {
1007            decoder.debug_check_bounds::<Self>(offset);
1008            // Verify that padding bytes are zero.
1009            fidl::decode!(
1010                fidl::encoding::UnboundedVector<u8>,
1011                D,
1012                &mut self.key_info,
1013                decoder,
1014                offset + 0,
1015                _depth
1016            )?;
1017            fidl::decode!(
1018                fidl::encoding::UnboundedVector<u8>,
1019                D,
1020                &mut self.key_blob,
1021                decoder,
1022                offset + 16,
1023                _depth
1024            )?;
1025            fidl::decode!(
1026                fidl::encoding::UnboundedVector<u8>,
1027                D,
1028                &mut self.secret,
1029                decoder,
1030                offset + 32,
1031                _depth
1032            )?;
1033            Ok(())
1034        }
1035    }
1036
1037    impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealRequest {
1038        type Borrowed<'a> = &'a Self;
1039        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1040            value
1041        }
1042    }
1043
1044    unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealRequest {
1045        type Owned = Self;
1046
1047        #[inline(always)]
1048        fn inline_align(_context: fidl::encoding::Context) -> usize {
1049            8
1050        }
1051
1052        #[inline(always)]
1053        fn inline_size(_context: fidl::encoding::Context) -> usize {
1054            48
1055        }
1056    }
1057
1058    unsafe impl<D: fidl::encoding::ResourceDialect>
1059        fidl::encoding::Encode<SealingKeysUnsealRequest, D> for &SealingKeysUnsealRequest
1060    {
1061        #[inline]
1062        unsafe fn encode(
1063            self,
1064            encoder: &mut fidl::encoding::Encoder<'_, D>,
1065            offset: usize,
1066            _depth: fidl::encoding::Depth,
1067        ) -> fidl::Result<()> {
1068            encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
1069            // Delegate to tuple encoding.
1070            fidl::encoding::Encode::<SealingKeysUnsealRequest, D>::encode(
1071                (
1072                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
1073                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
1074                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sealed_secret),
1075                ),
1076                encoder, offset, _depth
1077            )
1078        }
1079    }
1080    unsafe impl<
1081        D: fidl::encoding::ResourceDialect,
1082        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1083        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1084        T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1085    > fidl::encoding::Encode<SealingKeysUnsealRequest, D> for (T0, T1, T2)
1086    {
1087        #[inline]
1088        unsafe fn encode(
1089            self,
1090            encoder: &mut fidl::encoding::Encoder<'_, D>,
1091            offset: usize,
1092            depth: fidl::encoding::Depth,
1093        ) -> fidl::Result<()> {
1094            encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
1095            // Zero out padding regions. There's no need to apply masks
1096            // because the unmasked parts will be overwritten by fields.
1097            // Write the fields.
1098            self.0.encode(encoder, offset + 0, depth)?;
1099            self.1.encode(encoder, offset + 16, depth)?;
1100            self.2.encode(encoder, offset + 32, depth)?;
1101            Ok(())
1102        }
1103    }
1104
1105    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1106        for SealingKeysUnsealRequest
1107    {
1108        #[inline(always)]
1109        fn new_empty() -> Self {
1110            Self {
1111                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1112                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1113                sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1114            }
1115        }
1116
1117        #[inline]
1118        unsafe fn decode(
1119            &mut self,
1120            decoder: &mut fidl::encoding::Decoder<'_, D>,
1121            offset: usize,
1122            _depth: fidl::encoding::Depth,
1123        ) -> fidl::Result<()> {
1124            decoder.debug_check_bounds::<Self>(offset);
1125            // Verify that padding bytes are zero.
1126            fidl::decode!(
1127                fidl::encoding::UnboundedVector<u8>,
1128                D,
1129                &mut self.key_info,
1130                decoder,
1131                offset + 0,
1132                _depth
1133            )?;
1134            fidl::decode!(
1135                fidl::encoding::UnboundedVector<u8>,
1136                D,
1137                &mut self.key_blob,
1138                decoder,
1139                offset + 16,
1140                _depth
1141            )?;
1142            fidl::decode!(
1143                fidl::encoding::UnboundedVector<u8>,
1144                D,
1145                &mut self.sealed_secret,
1146                decoder,
1147                offset + 32,
1148                _depth
1149            )?;
1150            Ok(())
1151        }
1152    }
1153
1154    impl fidl::encoding::ValueTypeMarker for SealingKeysUpgradeSealingKeyRequest {
1155        type Borrowed<'a> = &'a Self;
1156        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1157            value
1158        }
1159    }
1160
1161    unsafe impl fidl::encoding::TypeMarker for SealingKeysUpgradeSealingKeyRequest {
1162        type Owned = Self;
1163
1164        #[inline(always)]
1165        fn inline_align(_context: fidl::encoding::Context) -> usize {
1166            8
1167        }
1168
1169        #[inline(always)]
1170        fn inline_size(_context: fidl::encoding::Context) -> usize {
1171            32
1172        }
1173    }
1174
1175    unsafe impl<D: fidl::encoding::ResourceDialect>
1176        fidl::encoding::Encode<SealingKeysUpgradeSealingKeyRequest, D>
1177        for &SealingKeysUpgradeSealingKeyRequest
1178    {
1179        #[inline]
1180        unsafe fn encode(
1181            self,
1182            encoder: &mut fidl::encoding::Encoder<'_, D>,
1183            offset: usize,
1184            _depth: fidl::encoding::Depth,
1185        ) -> fidl::Result<()> {
1186            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyRequest>(offset);
1187            // Delegate to tuple encoding.
1188            fidl::encoding::Encode::<SealingKeysUpgradeSealingKeyRequest, D>::encode(
1189                (
1190                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
1191                    <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
1192                ),
1193                encoder, offset, _depth
1194            )
1195        }
1196    }
1197    unsafe impl<
1198        D: fidl::encoding::ResourceDialect,
1199        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1200        T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1201    > fidl::encoding::Encode<SealingKeysUpgradeSealingKeyRequest, D> for (T0, T1)
1202    {
1203        #[inline]
1204        unsafe fn encode(
1205            self,
1206            encoder: &mut fidl::encoding::Encoder<'_, D>,
1207            offset: usize,
1208            depth: fidl::encoding::Depth,
1209        ) -> fidl::Result<()> {
1210            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyRequest>(offset);
1211            // Zero out padding regions. There's no need to apply masks
1212            // because the unmasked parts will be overwritten by fields.
1213            // Write the fields.
1214            self.0.encode(encoder, offset + 0, depth)?;
1215            self.1.encode(encoder, offset + 16, depth)?;
1216            Ok(())
1217        }
1218    }
1219
1220    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1221        for SealingKeysUpgradeSealingKeyRequest
1222    {
1223        #[inline(always)]
1224        fn new_empty() -> Self {
1225            Self {
1226                key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1227                key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
1228            }
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_info,
1244                decoder,
1245                offset + 0,
1246                _depth
1247            )?;
1248            fidl::decode!(
1249                fidl::encoding::UnboundedVector<u8>,
1250                D,
1251                &mut self.key_blob,
1252                decoder,
1253                offset + 16,
1254                _depth
1255            )?;
1256            Ok(())
1257        }
1258    }
1259
1260    impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyResponse {
1261        type Borrowed<'a> = &'a Self;
1262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1263            value
1264        }
1265    }
1266
1267    unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyResponse {
1268        type Owned = Self;
1269
1270        #[inline(always)]
1271        fn inline_align(_context: fidl::encoding::Context) -> usize {
1272            8
1273        }
1274
1275        #[inline(always)]
1276        fn inline_size(_context: fidl::encoding::Context) -> usize {
1277            16
1278        }
1279    }
1280
1281    unsafe impl<D: fidl::encoding::ResourceDialect>
1282        fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D>
1283        for &SealingKeysCreateSealingKeyResponse
1284    {
1285        #[inline]
1286        unsafe fn encode(
1287            self,
1288            encoder: &mut fidl::encoding::Encoder<'_, D>,
1289            offset: usize,
1290            _depth: fidl::encoding::Depth,
1291        ) -> fidl::Result<()> {
1292            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
1293            // Delegate to tuple encoding.
1294            fidl::encoding::Encode::<SealingKeysCreateSealingKeyResponse, D>::encode(
1295                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1296                    &self.key_blob,
1297                ),),
1298                encoder,
1299                offset,
1300                _depth,
1301            )
1302        }
1303    }
1304    unsafe impl<
1305        D: fidl::encoding::ResourceDialect,
1306        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1307    > fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D> for (T0,)
1308    {
1309        #[inline]
1310        unsafe fn encode(
1311            self,
1312            encoder: &mut fidl::encoding::Encoder<'_, D>,
1313            offset: usize,
1314            depth: fidl::encoding::Depth,
1315        ) -> fidl::Result<()> {
1316            encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
1317            // Zero out padding regions. There's no need to apply masks
1318            // because the unmasked parts will be overwritten by fields.
1319            // Write the fields.
1320            self.0.encode(encoder, offset + 0, depth)?;
1321            Ok(())
1322        }
1323    }
1324
1325    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1326        for SealingKeysCreateSealingKeyResponse
1327    {
1328        #[inline(always)]
1329        fn new_empty() -> Self {
1330            Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1331        }
1332
1333        #[inline]
1334        unsafe fn decode(
1335            &mut self,
1336            decoder: &mut fidl::encoding::Decoder<'_, D>,
1337            offset: usize,
1338            _depth: fidl::encoding::Depth,
1339        ) -> fidl::Result<()> {
1340            decoder.debug_check_bounds::<Self>(offset);
1341            // Verify that padding bytes are zero.
1342            fidl::decode!(
1343                fidl::encoding::UnboundedVector<u8>,
1344                D,
1345                &mut self.key_blob,
1346                decoder,
1347                offset + 0,
1348                _depth
1349            )?;
1350            Ok(())
1351        }
1352    }
1353
1354    impl fidl::encoding::ValueTypeMarker for SealingKeysSealResponse {
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 SealingKeysSealResponse {
1362        type Owned = Self;
1363
1364        #[inline(always)]
1365        fn inline_align(_context: fidl::encoding::Context) -> usize {
1366            8
1367        }
1368
1369        #[inline(always)]
1370        fn inline_size(_context: fidl::encoding::Context) -> usize {
1371            16
1372        }
1373    }
1374
1375    unsafe impl<D: fidl::encoding::ResourceDialect>
1376        fidl::encoding::Encode<SealingKeysSealResponse, D> for &SealingKeysSealResponse
1377    {
1378        #[inline]
1379        unsafe fn encode(
1380            self,
1381            encoder: &mut fidl::encoding::Encoder<'_, D>,
1382            offset: usize,
1383            _depth: fidl::encoding::Depth,
1384        ) -> fidl::Result<()> {
1385            encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
1386            // Delegate to tuple encoding.
1387            fidl::encoding::Encode::<SealingKeysSealResponse, D>::encode(
1388                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1389                    &self.sealed_secret,
1390                ),),
1391                encoder,
1392                offset,
1393                _depth,
1394            )
1395        }
1396    }
1397    unsafe impl<
1398        D: fidl::encoding::ResourceDialect,
1399        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1400    > fidl::encoding::Encode<SealingKeysSealResponse, D> for (T0,)
1401    {
1402        #[inline]
1403        unsafe fn encode(
1404            self,
1405            encoder: &mut fidl::encoding::Encoder<'_, D>,
1406            offset: usize,
1407            depth: fidl::encoding::Depth,
1408        ) -> fidl::Result<()> {
1409            encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
1410            // Zero out padding regions. There's no need to apply masks
1411            // because the unmasked parts will be overwritten by fields.
1412            // Write the fields.
1413            self.0.encode(encoder, offset + 0, depth)?;
1414            Ok(())
1415        }
1416    }
1417
1418    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1419        for SealingKeysSealResponse
1420    {
1421        #[inline(always)]
1422        fn new_empty() -> Self {
1423            Self { sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1424        }
1425
1426        #[inline]
1427        unsafe fn decode(
1428            &mut self,
1429            decoder: &mut fidl::encoding::Decoder<'_, D>,
1430            offset: usize,
1431            _depth: fidl::encoding::Depth,
1432        ) -> fidl::Result<()> {
1433            decoder.debug_check_bounds::<Self>(offset);
1434            // Verify that padding bytes are zero.
1435            fidl::decode!(
1436                fidl::encoding::UnboundedVector<u8>,
1437                D,
1438                &mut self.sealed_secret,
1439                decoder,
1440                offset + 0,
1441                _depth
1442            )?;
1443            Ok(())
1444        }
1445    }
1446
1447    impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealResponse {
1448        type Borrowed<'a> = &'a Self;
1449        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1450            value
1451        }
1452    }
1453
1454    unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealResponse {
1455        type Owned = Self;
1456
1457        #[inline(always)]
1458        fn inline_align(_context: fidl::encoding::Context) -> usize {
1459            8
1460        }
1461
1462        #[inline(always)]
1463        fn inline_size(_context: fidl::encoding::Context) -> usize {
1464            16
1465        }
1466    }
1467
1468    unsafe impl<D: fidl::encoding::ResourceDialect>
1469        fidl::encoding::Encode<SealingKeysUnsealResponse, D> for &SealingKeysUnsealResponse
1470    {
1471        #[inline]
1472        unsafe fn encode(
1473            self,
1474            encoder: &mut fidl::encoding::Encoder<'_, D>,
1475            offset: usize,
1476            _depth: fidl::encoding::Depth,
1477        ) -> fidl::Result<()> {
1478            encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
1479            // Delegate to tuple encoding.
1480            fidl::encoding::Encode::<SealingKeysUnsealResponse, D>::encode(
1481                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1482                    &self.unsealed_secret,
1483                ),),
1484                encoder,
1485                offset,
1486                _depth,
1487            )
1488        }
1489    }
1490    unsafe impl<
1491        D: fidl::encoding::ResourceDialect,
1492        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1493    > fidl::encoding::Encode<SealingKeysUnsealResponse, D> for (T0,)
1494    {
1495        #[inline]
1496        unsafe fn encode(
1497            self,
1498            encoder: &mut fidl::encoding::Encoder<'_, D>,
1499            offset: usize,
1500            depth: fidl::encoding::Depth,
1501        ) -> fidl::Result<()> {
1502            encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
1503            // Zero out padding regions. There's no need to apply masks
1504            // because the unmasked parts will be overwritten by fields.
1505            // Write the fields.
1506            self.0.encode(encoder, offset + 0, depth)?;
1507            Ok(())
1508        }
1509    }
1510
1511    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1512        for SealingKeysUnsealResponse
1513    {
1514        #[inline(always)]
1515        fn new_empty() -> Self {
1516            Self { unsealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1517        }
1518
1519        #[inline]
1520        unsafe fn decode(
1521            &mut self,
1522            decoder: &mut fidl::encoding::Decoder<'_, D>,
1523            offset: usize,
1524            _depth: fidl::encoding::Depth,
1525        ) -> fidl::Result<()> {
1526            decoder.debug_check_bounds::<Self>(offset);
1527            // Verify that padding bytes are zero.
1528            fidl::decode!(
1529                fidl::encoding::UnboundedVector<u8>,
1530                D,
1531                &mut self.unsealed_secret,
1532                decoder,
1533                offset + 0,
1534                _depth
1535            )?;
1536            Ok(())
1537        }
1538    }
1539
1540    impl fidl::encoding::ValueTypeMarker for SealingKeysUpgradeSealingKeyResponse {
1541        type Borrowed<'a> = &'a Self;
1542        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1543            value
1544        }
1545    }
1546
1547    unsafe impl fidl::encoding::TypeMarker for SealingKeysUpgradeSealingKeyResponse {
1548        type Owned = Self;
1549
1550        #[inline(always)]
1551        fn inline_align(_context: fidl::encoding::Context) -> usize {
1552            8
1553        }
1554
1555        #[inline(always)]
1556        fn inline_size(_context: fidl::encoding::Context) -> usize {
1557            16
1558        }
1559    }
1560
1561    unsafe impl<D: fidl::encoding::ResourceDialect>
1562        fidl::encoding::Encode<SealingKeysUpgradeSealingKeyResponse, D>
1563        for &SealingKeysUpgradeSealingKeyResponse
1564    {
1565        #[inline]
1566        unsafe fn encode(
1567            self,
1568            encoder: &mut fidl::encoding::Encoder<'_, D>,
1569            offset: usize,
1570            _depth: fidl::encoding::Depth,
1571        ) -> fidl::Result<()> {
1572            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyResponse>(offset);
1573            // Delegate to tuple encoding.
1574            fidl::encoding::Encode::<SealingKeysUpgradeSealingKeyResponse, D>::encode(
1575                (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
1576                    &self.key_blob,
1577                ),),
1578                encoder,
1579                offset,
1580                _depth,
1581            )
1582        }
1583    }
1584    unsafe impl<
1585        D: fidl::encoding::ResourceDialect,
1586        T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1587    > fidl::encoding::Encode<SealingKeysUpgradeSealingKeyResponse, D> for (T0,)
1588    {
1589        #[inline]
1590        unsafe fn encode(
1591            self,
1592            encoder: &mut fidl::encoding::Encoder<'_, D>,
1593            offset: usize,
1594            depth: fidl::encoding::Depth,
1595        ) -> fidl::Result<()> {
1596            encoder.debug_check_bounds::<SealingKeysUpgradeSealingKeyResponse>(offset);
1597            // Zero out padding regions. There's no need to apply masks
1598            // because the unmasked parts will be overwritten by fields.
1599            // Write the fields.
1600            self.0.encode(encoder, offset + 0, depth)?;
1601            Ok(())
1602        }
1603    }
1604
1605    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1606        for SealingKeysUpgradeSealingKeyResponse
1607    {
1608        #[inline(always)]
1609        fn new_empty() -> Self {
1610            Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1611        }
1612
1613        #[inline]
1614        unsafe fn decode(
1615            &mut self,
1616            decoder: &mut fidl::encoding::Decoder<'_, D>,
1617            offset: usize,
1618            _depth: fidl::encoding::Depth,
1619        ) -> fidl::Result<()> {
1620            decoder.debug_check_bounds::<Self>(offset);
1621            // Verify that padding bytes are zero.
1622            fidl::decode!(
1623                fidl::encoding::UnboundedVector<u8>,
1624                D,
1625                &mut self.key_blob,
1626                decoder,
1627                offset + 0,
1628                _depth
1629            )?;
1630            Ok(())
1631        }
1632    }
1633}