1#![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#[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 SealError {
73 Unknown,
74 FailedSeal,
75 #[doc(hidden)]
76 __SourceBreaking {
77 unknown_ordinal: u32,
78 },
79}
80
81#[macro_export]
83macro_rules! SealErrorUnknown {
84 () => {
85 _
86 };
87}
88
89impl SealError {
90 #[inline]
91 pub fn from_primitive(prim: u32) -> Option<Self> {
92 match prim {
93 0 => Some(Self::Unknown),
94 1 => Some(Self::FailedSeal),
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::FailedSeal,
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::FailedSeal => 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 UnsealError {
133 Unknown,
134 FailedUnseal,
135 #[doc(hidden)]
136 __SourceBreaking {
137 unknown_ordinal: u32,
138 },
139}
140
141#[macro_export]
143macro_rules! UnsealErrorUnknown {
144 () => {
145 _
146 };
147}
148
149impl UnsealError {
150 #[inline]
151 pub fn from_primitive(prim: u32) -> Option<Self> {
152 match prim {
153 0 => Some(Self::Unknown),
154 1 => Some(Self::FailedUnseal),
155 _ => None,
156 }
157 }
158
159 #[inline]
160 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
161 match prim {
162 0 => Self::Unknown,
163 1 => Self::FailedUnseal,
164 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
165 }
166 }
167
168 #[inline]
169 pub fn unknown() -> Self {
170 Self::__SourceBreaking { unknown_ordinal: 0x0 }
171 }
172
173 #[inline]
174 pub const fn into_primitive(self) -> u32 {
175 match self {
176 Self::Unknown => 0,
177 Self::FailedUnseal => 1,
178 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
179 }
180 }
181
182 #[inline]
183 pub fn is_unknown(&self) -> bool {
184 match self {
185 Self::__SourceBreaking { unknown_ordinal: _ } => true,
186 _ => false,
187 }
188 }
189}
190
191#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
192pub struct SealingKeysCreateSealingKeyRequest {
193 pub key_info: Vec<u8>,
194}
195
196impl fidl::Persistable for SealingKeysCreateSealingKeyRequest {}
197
198#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
199pub struct SealingKeysSealRequest {
200 pub key_info: Vec<u8>,
201 pub key_blob: Vec<u8>,
202 pub secret: Vec<u8>,
203}
204
205impl fidl::Persistable for SealingKeysSealRequest {}
206
207#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
208pub struct SealingKeysUnsealRequest {
209 pub key_info: Vec<u8>,
210 pub key_blob: Vec<u8>,
211 pub sealed_secret: Vec<u8>,
212}
213
214impl fidl::Persistable for SealingKeysUnsealRequest {}
215
216#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
217pub struct SealingKeysCreateSealingKeyResponse {
218 pub key_blob: Vec<u8>,
219}
220
221impl fidl::Persistable for SealingKeysCreateSealingKeyResponse {}
222
223#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
224pub struct SealingKeysSealResponse {
225 pub sealed_secret: Vec<u8>,
226}
227
228impl fidl::Persistable for SealingKeysSealResponse {}
229
230#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
231pub struct SealingKeysUnsealResponse {
232 pub unsealed_secret: Vec<u8>,
233}
234
235impl fidl::Persistable for SealingKeysUnsealResponse {}
236
237pub mod sealing_keys_ordinals {
238 pub const CREATE_SEALING_KEY: u64 = 0x5a191cbb6a8081bc;
239 pub const SEAL: u64 = 0x10d41255013918d1;
240 pub const UNSEAL: u64 = 0x7037d75ecb579c83;
241}
242
243mod internal {
244 use super::*;
245 unsafe impl fidl::encoding::TypeMarker for CreateError {
246 type Owned = Self;
247
248 #[inline(always)]
249 fn inline_align(_context: fidl::encoding::Context) -> usize {
250 std::mem::align_of::<u32>()
251 }
252
253 #[inline(always)]
254 fn inline_size(_context: fidl::encoding::Context) -> usize {
255 std::mem::size_of::<u32>()
256 }
257
258 #[inline(always)]
259 fn encode_is_copy() -> bool {
260 false
261 }
262
263 #[inline(always)]
264 fn decode_is_copy() -> bool {
265 false
266 }
267 }
268
269 impl fidl::encoding::ValueTypeMarker for CreateError {
270 type Borrowed<'a> = Self;
271 #[inline(always)]
272 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
273 *value
274 }
275 }
276
277 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
278 #[inline]
279 unsafe fn encode(
280 self,
281 encoder: &mut fidl::encoding::Encoder<'_, D>,
282 offset: usize,
283 _depth: fidl::encoding::Depth,
284 ) -> fidl::Result<()> {
285 encoder.debug_check_bounds::<Self>(offset);
286 encoder.write_num(self.into_primitive(), offset);
287 Ok(())
288 }
289 }
290
291 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
292 #[inline(always)]
293 fn new_empty() -> Self {
294 Self::unknown()
295 }
296
297 #[inline]
298 unsafe fn decode(
299 &mut self,
300 decoder: &mut fidl::encoding::Decoder<'_, D>,
301 offset: usize,
302 _depth: fidl::encoding::Depth,
303 ) -> fidl::Result<()> {
304 decoder.debug_check_bounds::<Self>(offset);
305 let prim = decoder.read_num::<u32>(offset);
306
307 *self = Self::from_primitive_allow_unknown(prim);
308 Ok(())
309 }
310 }
311 unsafe impl fidl::encoding::TypeMarker for SealError {
312 type Owned = Self;
313
314 #[inline(always)]
315 fn inline_align(_context: fidl::encoding::Context) -> usize {
316 std::mem::align_of::<u32>()
317 }
318
319 #[inline(always)]
320 fn inline_size(_context: fidl::encoding::Context) -> usize {
321 std::mem::size_of::<u32>()
322 }
323
324 #[inline(always)]
325 fn encode_is_copy() -> bool {
326 false
327 }
328
329 #[inline(always)]
330 fn decode_is_copy() -> bool {
331 false
332 }
333 }
334
335 impl fidl::encoding::ValueTypeMarker for SealError {
336 type Borrowed<'a> = Self;
337 #[inline(always)]
338 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
339 *value
340 }
341 }
342
343 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SealError {
344 #[inline]
345 unsafe fn encode(
346 self,
347 encoder: &mut fidl::encoding::Encoder<'_, D>,
348 offset: usize,
349 _depth: fidl::encoding::Depth,
350 ) -> fidl::Result<()> {
351 encoder.debug_check_bounds::<Self>(offset);
352 encoder.write_num(self.into_primitive(), offset);
353 Ok(())
354 }
355 }
356
357 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SealError {
358 #[inline(always)]
359 fn new_empty() -> Self {
360 Self::unknown()
361 }
362
363 #[inline]
364 unsafe fn decode(
365 &mut self,
366 decoder: &mut fidl::encoding::Decoder<'_, D>,
367 offset: usize,
368 _depth: fidl::encoding::Depth,
369 ) -> fidl::Result<()> {
370 decoder.debug_check_bounds::<Self>(offset);
371 let prim = decoder.read_num::<u32>(offset);
372
373 *self = Self::from_primitive_allow_unknown(prim);
374 Ok(())
375 }
376 }
377 unsafe impl fidl::encoding::TypeMarker for UnsealError {
378 type Owned = Self;
379
380 #[inline(always)]
381 fn inline_align(_context: fidl::encoding::Context) -> usize {
382 std::mem::align_of::<u32>()
383 }
384
385 #[inline(always)]
386 fn inline_size(_context: fidl::encoding::Context) -> usize {
387 std::mem::size_of::<u32>()
388 }
389
390 #[inline(always)]
391 fn encode_is_copy() -> bool {
392 false
393 }
394
395 #[inline(always)]
396 fn decode_is_copy() -> bool {
397 false
398 }
399 }
400
401 impl fidl::encoding::ValueTypeMarker for UnsealError {
402 type Borrowed<'a> = Self;
403 #[inline(always)]
404 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
405 *value
406 }
407 }
408
409 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnsealError {
410 #[inline]
411 unsafe fn encode(
412 self,
413 encoder: &mut fidl::encoding::Encoder<'_, D>,
414 offset: usize,
415 _depth: fidl::encoding::Depth,
416 ) -> fidl::Result<()> {
417 encoder.debug_check_bounds::<Self>(offset);
418 encoder.write_num(self.into_primitive(), offset);
419 Ok(())
420 }
421 }
422
423 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnsealError {
424 #[inline(always)]
425 fn new_empty() -> Self {
426 Self::unknown()
427 }
428
429 #[inline]
430 unsafe fn decode(
431 &mut self,
432 decoder: &mut fidl::encoding::Decoder<'_, D>,
433 offset: usize,
434 _depth: fidl::encoding::Depth,
435 ) -> fidl::Result<()> {
436 decoder.debug_check_bounds::<Self>(offset);
437 let prim = decoder.read_num::<u32>(offset);
438
439 *self = Self::from_primitive_allow_unknown(prim);
440 Ok(())
441 }
442 }
443
444 impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyRequest {
445 type Borrowed<'a> = &'a Self;
446 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
447 value
448 }
449 }
450
451 unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyRequest {
452 type Owned = Self;
453
454 #[inline(always)]
455 fn inline_align(_context: fidl::encoding::Context) -> usize {
456 8
457 }
458
459 #[inline(always)]
460 fn inline_size(_context: fidl::encoding::Context) -> usize {
461 16
462 }
463 }
464
465 unsafe impl<D: fidl::encoding::ResourceDialect>
466 fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D>
467 for &SealingKeysCreateSealingKeyRequest
468 {
469 #[inline]
470 unsafe fn encode(
471 self,
472 encoder: &mut fidl::encoding::Encoder<'_, D>,
473 offset: usize,
474 _depth: fidl::encoding::Depth,
475 ) -> fidl::Result<()> {
476 encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
477 fidl::encoding::Encode::<SealingKeysCreateSealingKeyRequest, D>::encode(
479 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
480 &self.key_info,
481 ),),
482 encoder,
483 offset,
484 _depth,
485 )
486 }
487 }
488 unsafe impl<
489 D: fidl::encoding::ResourceDialect,
490 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
491 > fidl::encoding::Encode<SealingKeysCreateSealingKeyRequest, D> for (T0,)
492 {
493 #[inline]
494 unsafe fn encode(
495 self,
496 encoder: &mut fidl::encoding::Encoder<'_, D>,
497 offset: usize,
498 depth: fidl::encoding::Depth,
499 ) -> fidl::Result<()> {
500 encoder.debug_check_bounds::<SealingKeysCreateSealingKeyRequest>(offset);
501 self.0.encode(encoder, offset + 0, depth)?;
505 Ok(())
506 }
507 }
508
509 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
510 for SealingKeysCreateSealingKeyRequest
511 {
512 #[inline(always)]
513 fn new_empty() -> Self {
514 Self { key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
515 }
516
517 #[inline]
518 unsafe fn decode(
519 &mut self,
520 decoder: &mut fidl::encoding::Decoder<'_, D>,
521 offset: usize,
522 _depth: fidl::encoding::Depth,
523 ) -> fidl::Result<()> {
524 decoder.debug_check_bounds::<Self>(offset);
525 fidl::decode!(
527 fidl::encoding::UnboundedVector<u8>,
528 D,
529 &mut self.key_info,
530 decoder,
531 offset + 0,
532 _depth
533 )?;
534 Ok(())
535 }
536 }
537
538 impl fidl::encoding::ValueTypeMarker for SealingKeysSealRequest {
539 type Borrowed<'a> = &'a Self;
540 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
541 value
542 }
543 }
544
545 unsafe impl fidl::encoding::TypeMarker for SealingKeysSealRequest {
546 type Owned = Self;
547
548 #[inline(always)]
549 fn inline_align(_context: fidl::encoding::Context) -> usize {
550 8
551 }
552
553 #[inline(always)]
554 fn inline_size(_context: fidl::encoding::Context) -> usize {
555 48
556 }
557 }
558
559 unsafe impl<D: fidl::encoding::ResourceDialect>
560 fidl::encoding::Encode<SealingKeysSealRequest, D> for &SealingKeysSealRequest
561 {
562 #[inline]
563 unsafe fn encode(
564 self,
565 encoder: &mut fidl::encoding::Encoder<'_, D>,
566 offset: usize,
567 _depth: fidl::encoding::Depth,
568 ) -> fidl::Result<()> {
569 encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
570 fidl::encoding::Encode::<SealingKeysSealRequest, D>::encode(
572 (
573 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
574 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
575 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.secret),
576 ),
577 encoder, offset, _depth
578 )
579 }
580 }
581 unsafe impl<
582 D: fidl::encoding::ResourceDialect,
583 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
584 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
585 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
586 > fidl::encoding::Encode<SealingKeysSealRequest, D> for (T0, T1, T2)
587 {
588 #[inline]
589 unsafe fn encode(
590 self,
591 encoder: &mut fidl::encoding::Encoder<'_, D>,
592 offset: usize,
593 depth: fidl::encoding::Depth,
594 ) -> fidl::Result<()> {
595 encoder.debug_check_bounds::<SealingKeysSealRequest>(offset);
596 self.0.encode(encoder, offset + 0, depth)?;
600 self.1.encode(encoder, offset + 16, depth)?;
601 self.2.encode(encoder, offset + 32, depth)?;
602 Ok(())
603 }
604 }
605
606 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
607 for SealingKeysSealRequest
608 {
609 #[inline(always)]
610 fn new_empty() -> Self {
611 Self {
612 key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
613 key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
614 secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
615 }
616 }
617
618 #[inline]
619 unsafe fn decode(
620 &mut self,
621 decoder: &mut fidl::encoding::Decoder<'_, D>,
622 offset: usize,
623 _depth: fidl::encoding::Depth,
624 ) -> fidl::Result<()> {
625 decoder.debug_check_bounds::<Self>(offset);
626 fidl::decode!(
628 fidl::encoding::UnboundedVector<u8>,
629 D,
630 &mut self.key_info,
631 decoder,
632 offset + 0,
633 _depth
634 )?;
635 fidl::decode!(
636 fidl::encoding::UnboundedVector<u8>,
637 D,
638 &mut self.key_blob,
639 decoder,
640 offset + 16,
641 _depth
642 )?;
643 fidl::decode!(
644 fidl::encoding::UnboundedVector<u8>,
645 D,
646 &mut self.secret,
647 decoder,
648 offset + 32,
649 _depth
650 )?;
651 Ok(())
652 }
653 }
654
655 impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealRequest {
656 type Borrowed<'a> = &'a Self;
657 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
658 value
659 }
660 }
661
662 unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealRequest {
663 type Owned = Self;
664
665 #[inline(always)]
666 fn inline_align(_context: fidl::encoding::Context) -> usize {
667 8
668 }
669
670 #[inline(always)]
671 fn inline_size(_context: fidl::encoding::Context) -> usize {
672 48
673 }
674 }
675
676 unsafe impl<D: fidl::encoding::ResourceDialect>
677 fidl::encoding::Encode<SealingKeysUnsealRequest, D> for &SealingKeysUnsealRequest
678 {
679 #[inline]
680 unsafe fn encode(
681 self,
682 encoder: &mut fidl::encoding::Encoder<'_, D>,
683 offset: usize,
684 _depth: fidl::encoding::Depth,
685 ) -> fidl::Result<()> {
686 encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
687 fidl::encoding::Encode::<SealingKeysUnsealRequest, D>::encode(
689 (
690 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_info),
691 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.key_blob),
692 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(&self.sealed_secret),
693 ),
694 encoder, offset, _depth
695 )
696 }
697 }
698 unsafe impl<
699 D: fidl::encoding::ResourceDialect,
700 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
701 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
702 T2: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
703 > fidl::encoding::Encode<SealingKeysUnsealRequest, D> for (T0, T1, T2)
704 {
705 #[inline]
706 unsafe fn encode(
707 self,
708 encoder: &mut fidl::encoding::Encoder<'_, D>,
709 offset: usize,
710 depth: fidl::encoding::Depth,
711 ) -> fidl::Result<()> {
712 encoder.debug_check_bounds::<SealingKeysUnsealRequest>(offset);
713 self.0.encode(encoder, offset + 0, depth)?;
717 self.1.encode(encoder, offset + 16, depth)?;
718 self.2.encode(encoder, offset + 32, depth)?;
719 Ok(())
720 }
721 }
722
723 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
724 for SealingKeysUnsealRequest
725 {
726 #[inline(always)]
727 fn new_empty() -> Self {
728 Self {
729 key_info: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
730 key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
731 sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D),
732 }
733 }
734
735 #[inline]
736 unsafe fn decode(
737 &mut self,
738 decoder: &mut fidl::encoding::Decoder<'_, D>,
739 offset: usize,
740 _depth: fidl::encoding::Depth,
741 ) -> fidl::Result<()> {
742 decoder.debug_check_bounds::<Self>(offset);
743 fidl::decode!(
745 fidl::encoding::UnboundedVector<u8>,
746 D,
747 &mut self.key_info,
748 decoder,
749 offset + 0,
750 _depth
751 )?;
752 fidl::decode!(
753 fidl::encoding::UnboundedVector<u8>,
754 D,
755 &mut self.key_blob,
756 decoder,
757 offset + 16,
758 _depth
759 )?;
760 fidl::decode!(
761 fidl::encoding::UnboundedVector<u8>,
762 D,
763 &mut self.sealed_secret,
764 decoder,
765 offset + 32,
766 _depth
767 )?;
768 Ok(())
769 }
770 }
771
772 impl fidl::encoding::ValueTypeMarker for SealingKeysCreateSealingKeyResponse {
773 type Borrowed<'a> = &'a Self;
774 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
775 value
776 }
777 }
778
779 unsafe impl fidl::encoding::TypeMarker for SealingKeysCreateSealingKeyResponse {
780 type Owned = Self;
781
782 #[inline(always)]
783 fn inline_align(_context: fidl::encoding::Context) -> usize {
784 8
785 }
786
787 #[inline(always)]
788 fn inline_size(_context: fidl::encoding::Context) -> usize {
789 16
790 }
791 }
792
793 unsafe impl<D: fidl::encoding::ResourceDialect>
794 fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D>
795 for &SealingKeysCreateSealingKeyResponse
796 {
797 #[inline]
798 unsafe fn encode(
799 self,
800 encoder: &mut fidl::encoding::Encoder<'_, D>,
801 offset: usize,
802 _depth: fidl::encoding::Depth,
803 ) -> fidl::Result<()> {
804 encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
805 fidl::encoding::Encode::<SealingKeysCreateSealingKeyResponse, D>::encode(
807 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
808 &self.key_blob,
809 ),),
810 encoder,
811 offset,
812 _depth,
813 )
814 }
815 }
816 unsafe impl<
817 D: fidl::encoding::ResourceDialect,
818 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
819 > fidl::encoding::Encode<SealingKeysCreateSealingKeyResponse, D> for (T0,)
820 {
821 #[inline]
822 unsafe fn encode(
823 self,
824 encoder: &mut fidl::encoding::Encoder<'_, D>,
825 offset: usize,
826 depth: fidl::encoding::Depth,
827 ) -> fidl::Result<()> {
828 encoder.debug_check_bounds::<SealingKeysCreateSealingKeyResponse>(offset);
829 self.0.encode(encoder, offset + 0, depth)?;
833 Ok(())
834 }
835 }
836
837 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
838 for SealingKeysCreateSealingKeyResponse
839 {
840 #[inline(always)]
841 fn new_empty() -> Self {
842 Self { key_blob: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
843 }
844
845 #[inline]
846 unsafe fn decode(
847 &mut self,
848 decoder: &mut fidl::encoding::Decoder<'_, D>,
849 offset: usize,
850 _depth: fidl::encoding::Depth,
851 ) -> fidl::Result<()> {
852 decoder.debug_check_bounds::<Self>(offset);
853 fidl::decode!(
855 fidl::encoding::UnboundedVector<u8>,
856 D,
857 &mut self.key_blob,
858 decoder,
859 offset + 0,
860 _depth
861 )?;
862 Ok(())
863 }
864 }
865
866 impl fidl::encoding::ValueTypeMarker for SealingKeysSealResponse {
867 type Borrowed<'a> = &'a Self;
868 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
869 value
870 }
871 }
872
873 unsafe impl fidl::encoding::TypeMarker for SealingKeysSealResponse {
874 type Owned = Self;
875
876 #[inline(always)]
877 fn inline_align(_context: fidl::encoding::Context) -> usize {
878 8
879 }
880
881 #[inline(always)]
882 fn inline_size(_context: fidl::encoding::Context) -> usize {
883 16
884 }
885 }
886
887 unsafe impl<D: fidl::encoding::ResourceDialect>
888 fidl::encoding::Encode<SealingKeysSealResponse, D> for &SealingKeysSealResponse
889 {
890 #[inline]
891 unsafe fn encode(
892 self,
893 encoder: &mut fidl::encoding::Encoder<'_, D>,
894 offset: usize,
895 _depth: fidl::encoding::Depth,
896 ) -> fidl::Result<()> {
897 encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
898 fidl::encoding::Encode::<SealingKeysSealResponse, D>::encode(
900 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
901 &self.sealed_secret,
902 ),),
903 encoder,
904 offset,
905 _depth,
906 )
907 }
908 }
909 unsafe impl<
910 D: fidl::encoding::ResourceDialect,
911 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
912 > fidl::encoding::Encode<SealingKeysSealResponse, D> for (T0,)
913 {
914 #[inline]
915 unsafe fn encode(
916 self,
917 encoder: &mut fidl::encoding::Encoder<'_, D>,
918 offset: usize,
919 depth: fidl::encoding::Depth,
920 ) -> fidl::Result<()> {
921 encoder.debug_check_bounds::<SealingKeysSealResponse>(offset);
922 self.0.encode(encoder, offset + 0, depth)?;
926 Ok(())
927 }
928 }
929
930 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
931 for SealingKeysSealResponse
932 {
933 #[inline(always)]
934 fn new_empty() -> Self {
935 Self { sealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
936 }
937
938 #[inline]
939 unsafe fn decode(
940 &mut self,
941 decoder: &mut fidl::encoding::Decoder<'_, D>,
942 offset: usize,
943 _depth: fidl::encoding::Depth,
944 ) -> fidl::Result<()> {
945 decoder.debug_check_bounds::<Self>(offset);
946 fidl::decode!(
948 fidl::encoding::UnboundedVector<u8>,
949 D,
950 &mut self.sealed_secret,
951 decoder,
952 offset + 0,
953 _depth
954 )?;
955 Ok(())
956 }
957 }
958
959 impl fidl::encoding::ValueTypeMarker for SealingKeysUnsealResponse {
960 type Borrowed<'a> = &'a Self;
961 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
962 value
963 }
964 }
965
966 unsafe impl fidl::encoding::TypeMarker for SealingKeysUnsealResponse {
967 type Owned = Self;
968
969 #[inline(always)]
970 fn inline_align(_context: fidl::encoding::Context) -> usize {
971 8
972 }
973
974 #[inline(always)]
975 fn inline_size(_context: fidl::encoding::Context) -> usize {
976 16
977 }
978 }
979
980 unsafe impl<D: fidl::encoding::ResourceDialect>
981 fidl::encoding::Encode<SealingKeysUnsealResponse, D> for &SealingKeysUnsealResponse
982 {
983 #[inline]
984 unsafe fn encode(
985 self,
986 encoder: &mut fidl::encoding::Encoder<'_, D>,
987 offset: usize,
988 _depth: fidl::encoding::Depth,
989 ) -> fidl::Result<()> {
990 encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
991 fidl::encoding::Encode::<SealingKeysUnsealResponse, D>::encode(
993 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
994 &self.unsealed_secret,
995 ),),
996 encoder,
997 offset,
998 _depth,
999 )
1000 }
1001 }
1002 unsafe impl<
1003 D: fidl::encoding::ResourceDialect,
1004 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
1005 > fidl::encoding::Encode<SealingKeysUnsealResponse, D> for (T0,)
1006 {
1007 #[inline]
1008 unsafe fn encode(
1009 self,
1010 encoder: &mut fidl::encoding::Encoder<'_, D>,
1011 offset: usize,
1012 depth: fidl::encoding::Depth,
1013 ) -> fidl::Result<()> {
1014 encoder.debug_check_bounds::<SealingKeysUnsealResponse>(offset);
1015 self.0.encode(encoder, offset + 0, depth)?;
1019 Ok(())
1020 }
1021 }
1022
1023 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1024 for SealingKeysUnsealResponse
1025 {
1026 #[inline(always)]
1027 fn new_empty() -> Self {
1028 Self { unsealed_secret: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
1029 }
1030
1031 #[inline]
1032 unsafe fn decode(
1033 &mut self,
1034 decoder: &mut fidl::encoding::Decoder<'_, D>,
1035 offset: usize,
1036 _depth: fidl::encoding::Depth,
1037 ) -> fidl::Result<()> {
1038 decoder.debug_check_bounds::<Self>(offset);
1039 fidl::decode!(
1041 fidl::encoding::UnboundedVector<u8>,
1042 D,
1043 &mut self.unsealed_secret,
1044 decoder,
1045 offset + 0,
1046 _depth
1047 )?;
1048 Ok(())
1049 }
1050 }
1051}