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)]
13#[repr(u32)]
14pub enum CreateBlobError {
15 AlreadyExists = 1,
17 Internal = 2,
19}
20
21impl CreateBlobError {
22 #[inline]
23 pub fn from_primitive(prim: u32) -> Option<Self> {
24 match prim {
25 1 => Some(Self::AlreadyExists),
26 2 => Some(Self::Internal),
27 _ => None,
28 }
29 }
30
31 #[inline]
32 pub const fn into_primitive(self) -> u32 {
33 self as u32
34 }
35}
36
37#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
39pub enum KeyPurpose {
40 Metadata,
42 Data,
44 #[doc(hidden)]
45 __SourceBreaking { unknown_ordinal: u32 },
46}
47
48#[macro_export]
50macro_rules! KeyPurposeUnknown {
51 () => {
52 _
53 };
54}
55
56impl KeyPurpose {
57 #[inline]
58 pub fn from_primitive(prim: u32) -> Option<Self> {
59 match prim {
60 1 => Some(Self::Metadata),
61 2 => Some(Self::Data),
62 _ => None,
63 }
64 }
65
66 #[inline]
67 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
68 match prim {
69 1 => Self::Metadata,
70 2 => Self::Data,
71 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
72 }
73 }
74
75 #[inline]
76 pub fn unknown() -> Self {
77 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
78 }
79
80 #[inline]
81 pub const fn into_primitive(self) -> u32 {
82 match self {
83 Self::Metadata => 1,
84 Self::Data => 2,
85 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
86 }
87 }
88
89 #[inline]
90 pub fn is_unknown(&self) -> bool {
91 match self {
92 Self::__SourceBreaking { unknown_ordinal: _ } => true,
93 _ => false,
94 }
95 }
96}
97
98#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
100pub enum ObjectType {
101 File,
102 Directory,
103 Symlink,
104 #[doc(hidden)]
105 __SourceBreaking {
106 unknown_ordinal: u32,
107 },
108}
109
110#[macro_export]
112macro_rules! ObjectTypeUnknown {
113 () => {
114 _
115 };
116}
117
118impl ObjectType {
119 #[inline]
120 pub fn from_primitive(prim: u32) -> Option<Self> {
121 match prim {
122 1 => Some(Self::File),
123 2 => Some(Self::Directory),
124 3 => Some(Self::Symlink),
125 _ => None,
126 }
127 }
128
129 #[inline]
130 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
131 match prim {
132 1 => Self::File,
133 2 => Self::Directory,
134 3 => Self::Symlink,
135 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
136 }
137 }
138
139 #[inline]
140 pub fn unknown() -> Self {
141 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
142 }
143
144 #[inline]
145 pub const fn into_primitive(self) -> u32 {
146 match self {
147 Self::File => 1,
148 Self::Directory => 2,
149 Self::Symlink => 3,
150 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
151 }
152 }
153
154 #[inline]
155 pub fn is_unknown(&self) -> bool {
156 match self {
157 Self::__SourceBreaking { unknown_ordinal: _ } => true,
158 _ => false,
159 }
160 }
161}
162
163#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
164pub struct BlobCreatorCreateRequest {
165 pub hash: [u8; 32],
166 pub allow_existing: bool,
167}
168
169impl fidl::Persistable for BlobCreatorCreateRequest {}
170
171#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
172#[repr(C)]
173pub struct BlobCreatorNeedsOverwriteRequest {
174 pub blob_hash: [u8; 32],
175}
176
177impl fidl::Persistable for BlobCreatorNeedsOverwriteRequest {}
178
179#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
180pub struct BlobCreatorNeedsOverwriteResponse {
181 pub needs_overwrite: bool,
182}
183
184impl fidl::Persistable for BlobCreatorNeedsOverwriteResponse {}
185
186#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187#[repr(C)]
188pub struct BlobReaderGetVmoRequest {
189 pub blob_hash: [u8; 32],
190}
191
192impl fidl::Persistable for BlobReaderGetVmoRequest {}
193
194#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
195#[repr(C)]
196pub struct BlobWriterBytesReadyRequest {
197 pub bytes_written: u64,
198}
199
200impl fidl::Persistable for BlobWriterBytesReadyRequest {}
201
202#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
203#[repr(C)]
204pub struct BlobWriterGetVmoRequest {
205 pub size: u64,
206}
207
208impl fidl::Persistable for BlobWriterGetVmoRequest {}
209
210#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
212#[repr(C)]
213pub struct BytesAndNodes {
214 pub bytes: u64,
215 pub nodes: u64,
216}
217
218impl fidl::Persistable for BytesAndNodes {}
219
220#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
221pub struct CryptCreateKeyRequest {
222 pub owner: u64,
223 pub purpose: KeyPurpose,
224}
225
226impl fidl::Persistable for CryptCreateKeyRequest {}
227
228#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
229pub struct CryptCreateKeyWithIdRequest {
230 pub owner: u64,
231 pub wrapping_key_id: [u8; 16],
232 pub object_type: ObjectType,
233 pub flags: fidl_fuchsia_io_common::FscryptPolicyFlags,
234}
235
236impl fidl::Persistable for CryptCreateKeyWithIdRequest {}
237
238#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
239pub struct CryptManagementAddWrappingKeyRequest {
240 pub wrapping_key_id: [u8; 16],
241 pub key: Vec<u8>,
242}
243
244impl fidl::Persistable for CryptManagementAddWrappingKeyRequest {}
245
246#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
247#[repr(C)]
248pub struct CryptManagementForgetWrappingKeyRequest {
249 pub wrapping_key_id: [u8; 16],
250}
251
252impl fidl::Persistable for CryptManagementForgetWrappingKeyRequest {}
253
254#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
255pub struct CryptManagementSetActiveKeyRequest {
256 pub purpose: KeyPurpose,
257 pub wrapping_key_id: [u8; 16],
258}
259
260impl fidl::Persistable for CryptManagementSetActiveKeyRequest {}
261
262#[derive(Clone, Debug, PartialEq)]
263pub struct CryptUnwrapKeyRequest {
264 pub owner: u64,
265 pub wrapped_key: WrappedKey,
266}
267
268impl fidl::Persistable for CryptUnwrapKeyRequest {}
269
270#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
271pub struct CryptCreateKeyResponse {
272 pub wrapping_key_id: [u8; 16],
273 pub wrapped_key: Vec<u8>,
274 pub unwrapped_key: Vec<u8>,
275}
276
277impl fidl::Persistable for CryptCreateKeyResponse {}
278
279#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
280pub struct DebugDeleteProfileRequest {
281 pub volume: String,
282 pub profile: String,
283}
284
285impl fidl::Persistable for DebugDeleteProfileRequest {}
286
287#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
288pub struct DebugRecordAndReplayProfileRequest {
289 pub volume: Option<String>,
290 pub profile: String,
291 pub duration_secs: u32,
292}
293
294impl fidl::Persistable for DebugRecordAndReplayProfileRequest {}
295
296#[derive(Clone, Debug, PartialEq)]
297pub struct DebugReplayXorRecordProfileRequest {
298 pub volume: String,
299 pub identifier: ProfileIdentifier,
300 pub duration_secs: u32,
301}
302
303impl fidl::Persistable for DebugReplayXorRecordProfileRequest {}
304
305#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
306pub struct EmptyStruct;
307
308impl fidl::Persistable for EmptyStruct {}
309
310#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
311#[repr(C)]
312pub struct FscryptKeyIdentifier {
313 pub key_identifier: [u8; 16],
314}
315
316impl fidl::Persistable for FscryptKeyIdentifier {}
317
318#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
319#[repr(C)]
320pub struct FscryptKeyIdentifierAndNonce {
321 pub key_identifier: [u8; 16],
322 pub nonce: [u8; 16],
323}
324
325impl fidl::Persistable for FscryptKeyIdentifierAndNonce {}
326
327#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
328#[repr(C)]
329pub struct FxfsKey {
330 pub wrapping_key_id: [u8; 16],
331 pub wrapped_key: [u8; 48],
332}
333
334impl fidl::Persistable for FxfsKey {}
335
336#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
337#[repr(C)]
338pub struct ProjectIdClearForNodeRequest {
339 pub node_id: u64,
340}
341
342impl fidl::Persistable for ProjectIdClearForNodeRequest {}
343
344#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
345#[repr(C)]
346pub struct ProjectIdClearRequest {
347 pub project_id: u64,
348}
349
350impl fidl::Persistable for ProjectIdClearRequest {}
351
352#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
353#[repr(C)]
354pub struct ProjectIdGetForNodeRequest {
355 pub node_id: u64,
356}
357
358impl fidl::Persistable for ProjectIdGetForNodeRequest {}
359
360#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
361#[repr(C)]
362pub struct ProjectIdInfoRequest {
363 pub project_id: u64,
364}
365
366impl fidl::Persistable for ProjectIdInfoRequest {}
367
368#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
369pub struct ProjectIdListRequest {
370 pub token: Option<Box<ProjectIterToken>>,
371}
372
373impl fidl::Persistable for ProjectIdListRequest {}
374
375#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
376#[repr(C)]
377pub struct ProjectIdSetForNodeRequest {
378 pub node_id: u64,
379 pub project_id: u64,
380}
381
382impl fidl::Persistable for ProjectIdSetForNodeRequest {}
383
384#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
385#[repr(C)]
386pub struct ProjectIdSetLimitRequest {
387 pub project_id: u64,
388 pub bytes: u64,
389 pub nodes: u64,
390}
391
392impl fidl::Persistable for ProjectIdSetLimitRequest {}
393
394#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
395#[repr(C)]
396pub struct ProjectIdGetForNodeResponse {
397 pub project_id: u64,
398}
399
400impl fidl::Persistable for ProjectIdGetForNodeResponse {}
401
402#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
403#[repr(C)]
404pub struct ProjectIdInfoResponse {
405 pub limit: BytesAndNodes,
406 pub usage: BytesAndNodes,
407}
408
409impl fidl::Persistable for ProjectIdInfoResponse {}
410
411#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
412pub struct ProjectIdListResponse {
413 pub entries: Vec<u64>,
414 pub next_token: Option<Box<ProjectIterToken>>,
415}
416
417impl fidl::Persistable for ProjectIdListResponse {}
418
419#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
423#[repr(C)]
424pub struct ProjectIterToken {
425 pub value: u64,
426}
427
428impl fidl::Persistable for ProjectIterToken {}
429
430#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
431pub struct VolumeInstallerInstallRequest {
432 pub src: String,
433 pub image_file: String,
434 pub dst: String,
435}
436
437impl fidl::Persistable for VolumeInstallerInstallRequest {}
438
439#[derive(Clone, Debug, Default, PartialEq)]
440pub struct CryptSettings {
441 pub active_data_wrapping_key_id: Option<[u8; 16]>,
442 pub active_metadata_wrapping_key_id: Option<[u8; 16]>,
443 #[doc(hidden)]
444 pub __source_breaking: fidl::marker::SourceBreaking,
445}
446
447impl fidl::Persistable for CryptSettings {}
448
449#[derive(Clone, Debug)]
450pub enum ProfileIdentifier {
451 ObjectId(u64),
452 BlobHash([u8; 32]),
453 #[doc(hidden)]
454 __SourceBreaking {
455 unknown_ordinal: u64,
456 },
457}
458
459#[macro_export]
461macro_rules! ProfileIdentifierUnknown {
462 () => {
463 _
464 };
465}
466
467impl PartialEq for ProfileIdentifier {
469 fn eq(&self, other: &Self) -> bool {
470 match (self, other) {
471 (Self::ObjectId(x), Self::ObjectId(y)) => *x == *y,
472 (Self::BlobHash(x), Self::BlobHash(y)) => *x == *y,
473 _ => false,
474 }
475 }
476}
477
478impl ProfileIdentifier {
479 #[inline]
480 pub fn ordinal(&self) -> u64 {
481 match *self {
482 Self::ObjectId(_) => 1,
483 Self::BlobHash(_) => 2,
484 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
485 }
486 }
487
488 #[inline]
489 pub fn unknown_variant_for_testing() -> Self {
490 Self::__SourceBreaking { unknown_ordinal: 0 }
491 }
492
493 #[inline]
494 pub fn is_unknown(&self) -> bool {
495 match self {
496 Self::__SourceBreaking { .. } => true,
497 _ => false,
498 }
499 }
500}
501
502impl fidl::Persistable for ProfileIdentifier {}
503
504#[derive(Clone, Debug)]
505pub enum WrappedKey {
506 Fxfs(FxfsKey),
510 Zxcrypt(Vec<u8>),
514 FscryptInoLblk32Dir(FscryptKeyIdentifierAndNonce),
518 FscryptInoLblk32File(FscryptKeyIdentifier),
522 FscryptInoLblk64Dir(FscryptKeyIdentifierAndNonce),
526 FscryptInoLblk64File(FscryptKeyIdentifier),
530 #[doc(hidden)]
531 __SourceBreaking { unknown_ordinal: u64 },
532}
533
534#[macro_export]
536macro_rules! WrappedKeyUnknown {
537 () => {
538 _
539 };
540}
541
542impl PartialEq for WrappedKey {
544 fn eq(&self, other: &Self) -> bool {
545 match (self, other) {
546 (Self::Fxfs(x), Self::Fxfs(y)) => *x == *y,
547 (Self::Zxcrypt(x), Self::Zxcrypt(y)) => *x == *y,
548 (Self::FscryptInoLblk32Dir(x), Self::FscryptInoLblk32Dir(y)) => *x == *y,
549 (Self::FscryptInoLblk32File(x), Self::FscryptInoLblk32File(y)) => *x == *y,
550 (Self::FscryptInoLblk64Dir(x), Self::FscryptInoLblk64Dir(y)) => *x == *y,
551 (Self::FscryptInoLblk64File(x), Self::FscryptInoLblk64File(y)) => *x == *y,
552 _ => false,
553 }
554 }
555}
556
557impl WrappedKey {
558 #[inline]
559 pub fn ordinal(&self) -> u64 {
560 match *self {
561 Self::Fxfs(_) => 1,
562 Self::Zxcrypt(_) => 2,
563 Self::FscryptInoLblk32Dir(_) => 3,
564 Self::FscryptInoLblk32File(_) => 4,
565 Self::FscryptInoLblk64Dir(_) => 5,
566 Self::FscryptInoLblk64File(_) => 6,
567 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
568 }
569 }
570
571 #[inline]
572 pub fn unknown_variant_for_testing() -> Self {
573 Self::__SourceBreaking { unknown_ordinal: 0 }
574 }
575
576 #[inline]
577 pub fn is_unknown(&self) -> bool {
578 match self {
579 Self::__SourceBreaking { .. } => true,
580 _ => false,
581 }
582 }
583}
584
585impl fidl::Persistable for WrappedKey {}
586
587pub mod blob_creator_ordinals {
588 pub const CREATE: u64 = 0x4288fe720cca70d7;
589 pub const NEEDS_OVERWRITE: u64 = 0x512e347a6be3e426;
590}
591
592pub mod blob_reader_ordinals {
593 pub const GET_VMO: u64 = 0x2fa72823ef7f11f4;
594}
595
596pub mod blob_writer_ordinals {
597 pub const GET_VMO: u64 = 0x50c8988b12b6f893;
598 pub const BYTES_READY: u64 = 0x7b308b473606c573;
599}
600
601pub mod crypt_ordinals {
602 pub const CREATE_KEY: u64 = 0x6ec69b3aee7fdbba;
603 pub const CREATE_KEY_WITH_ID: u64 = 0x21e8076688700b50;
604 pub const UNWRAP_KEY: u64 = 0x6ec34e2b64d46be9;
605}
606
607pub mod crypt_management_ordinals {
608 pub const ADD_WRAPPING_KEY: u64 = 0x59a5076762318bf;
609 pub const SET_ACTIVE_KEY: u64 = 0x5e81d600442f2872;
610 pub const FORGET_WRAPPING_KEY: u64 = 0x436d6d27696dfcf4;
611}
612
613pub mod debug_ordinals {
614 pub const COMPACT: u64 = 0x6553eb197306e489;
615 pub const DELETE_PROFILE: u64 = 0x54d9d4c9cf300a1e;
616 pub const RECORD_AND_REPLAY_PROFILE: u64 = 0x3973943f9b3a9010;
617 pub const REPLAY_XOR_RECORD_PROFILE: u64 = 0x301678a1cebeef20;
618 pub const STOP_PROFILE_TASKS: u64 = 0x1657b945dd629177;
619 pub const CLEAR_CACHES: u64 = 0x539de2a4580de767;
620}
621
622pub mod file_backed_volume_provider_ordinals {
623 pub const OPEN: u64 = 0x67120b9fc9f319ee;
624}
625
626pub mod project_id_ordinals {
627 pub const SET_LIMIT: u64 = 0x20b0fc1e0413876f;
628 pub const CLEAR: u64 = 0x165b5f1e707863c1;
629 pub const SET_FOR_NODE: u64 = 0x4d7a8442dc58324c;
630 pub const GET_FOR_NODE: u64 = 0x644073bdf2542573;
631 pub const CLEAR_FOR_NODE: u64 = 0x3f2ca287bbfe6a62;
632 pub const LIST: u64 = 0x5505f95a36d522cc;
633 pub const INFO: u64 = 0x51b47743c9e2d1ab;
634}
635
636pub mod remote_volume_ordinals {
637 pub const OPEN_FILE: u64 = 0xf023cebd3c8f24c;
638 pub const CLOSE: u64 = 0x70dd19a98e627440;
639}
640
641pub mod volume_installer_ordinals {
642 pub const INSTALL: u64 = 0x4c340be8a504ee1c;
643}
644
645mod internal {
646 use super::*;
647 unsafe impl fidl::encoding::TypeMarker for CreateBlobError {
648 type Owned = Self;
649
650 #[inline(always)]
651 fn inline_align(_context: fidl::encoding::Context) -> usize {
652 std::mem::align_of::<u32>()
653 }
654
655 #[inline(always)]
656 fn inline_size(_context: fidl::encoding::Context) -> usize {
657 std::mem::size_of::<u32>()
658 }
659
660 #[inline(always)]
661 fn encode_is_copy() -> bool {
662 true
663 }
664
665 #[inline(always)]
666 fn decode_is_copy() -> bool {
667 false
668 }
669 }
670
671 impl fidl::encoding::ValueTypeMarker for CreateBlobError {
672 type Borrowed<'a> = Self;
673 #[inline(always)]
674 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
675 *value
676 }
677 }
678
679 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
680 for CreateBlobError
681 {
682 #[inline]
683 unsafe fn encode(
684 self,
685 encoder: &mut fidl::encoding::Encoder<'_, D>,
686 offset: usize,
687 _depth: fidl::encoding::Depth,
688 ) -> fidl::Result<()> {
689 encoder.debug_check_bounds::<Self>(offset);
690 encoder.write_num(self.into_primitive(), offset);
691 Ok(())
692 }
693 }
694
695 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateBlobError {
696 #[inline(always)]
697 fn new_empty() -> Self {
698 Self::AlreadyExists
699 }
700
701 #[inline]
702 unsafe fn decode(
703 &mut self,
704 decoder: &mut fidl::encoding::Decoder<'_, D>,
705 offset: usize,
706 _depth: fidl::encoding::Depth,
707 ) -> fidl::Result<()> {
708 decoder.debug_check_bounds::<Self>(offset);
709 let prim = decoder.read_num::<u32>(offset);
710
711 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
712 Ok(())
713 }
714 }
715 unsafe impl fidl::encoding::TypeMarker for KeyPurpose {
716 type Owned = Self;
717
718 #[inline(always)]
719 fn inline_align(_context: fidl::encoding::Context) -> usize {
720 std::mem::align_of::<u32>()
721 }
722
723 #[inline(always)]
724 fn inline_size(_context: fidl::encoding::Context) -> usize {
725 std::mem::size_of::<u32>()
726 }
727
728 #[inline(always)]
729 fn encode_is_copy() -> bool {
730 false
731 }
732
733 #[inline(always)]
734 fn decode_is_copy() -> bool {
735 false
736 }
737 }
738
739 impl fidl::encoding::ValueTypeMarker for KeyPurpose {
740 type Borrowed<'a> = Self;
741 #[inline(always)]
742 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
743 *value
744 }
745 }
746
747 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for KeyPurpose {
748 #[inline]
749 unsafe fn encode(
750 self,
751 encoder: &mut fidl::encoding::Encoder<'_, D>,
752 offset: usize,
753 _depth: fidl::encoding::Depth,
754 ) -> fidl::Result<()> {
755 encoder.debug_check_bounds::<Self>(offset);
756 encoder.write_num(self.into_primitive(), offset);
757 Ok(())
758 }
759 }
760
761 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for KeyPurpose {
762 #[inline(always)]
763 fn new_empty() -> Self {
764 Self::unknown()
765 }
766
767 #[inline]
768 unsafe fn decode(
769 &mut self,
770 decoder: &mut fidl::encoding::Decoder<'_, D>,
771 offset: usize,
772 _depth: fidl::encoding::Depth,
773 ) -> fidl::Result<()> {
774 decoder.debug_check_bounds::<Self>(offset);
775 let prim = decoder.read_num::<u32>(offset);
776
777 *self = Self::from_primitive_allow_unknown(prim);
778 Ok(())
779 }
780 }
781 unsafe impl fidl::encoding::TypeMarker for ObjectType {
782 type Owned = Self;
783
784 #[inline(always)]
785 fn inline_align(_context: fidl::encoding::Context) -> usize {
786 std::mem::align_of::<u32>()
787 }
788
789 #[inline(always)]
790 fn inline_size(_context: fidl::encoding::Context) -> usize {
791 std::mem::size_of::<u32>()
792 }
793
794 #[inline(always)]
795 fn encode_is_copy() -> bool {
796 false
797 }
798
799 #[inline(always)]
800 fn decode_is_copy() -> bool {
801 false
802 }
803 }
804
805 impl fidl::encoding::ValueTypeMarker for ObjectType {
806 type Borrowed<'a> = Self;
807 #[inline(always)]
808 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
809 *value
810 }
811 }
812
813 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ObjectType {
814 #[inline]
815 unsafe fn encode(
816 self,
817 encoder: &mut fidl::encoding::Encoder<'_, D>,
818 offset: usize,
819 _depth: fidl::encoding::Depth,
820 ) -> fidl::Result<()> {
821 encoder.debug_check_bounds::<Self>(offset);
822 encoder.write_num(self.into_primitive(), offset);
823 Ok(())
824 }
825 }
826
827 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ObjectType {
828 #[inline(always)]
829 fn new_empty() -> Self {
830 Self::unknown()
831 }
832
833 #[inline]
834 unsafe fn decode(
835 &mut self,
836 decoder: &mut fidl::encoding::Decoder<'_, D>,
837 offset: usize,
838 _depth: fidl::encoding::Depth,
839 ) -> fidl::Result<()> {
840 decoder.debug_check_bounds::<Self>(offset);
841 let prim = decoder.read_num::<u32>(offset);
842
843 *self = Self::from_primitive_allow_unknown(prim);
844 Ok(())
845 }
846 }
847
848 impl fidl::encoding::ValueTypeMarker for BlobCreatorCreateRequest {
849 type Borrowed<'a> = &'a Self;
850 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
851 value
852 }
853 }
854
855 unsafe impl fidl::encoding::TypeMarker for BlobCreatorCreateRequest {
856 type Owned = Self;
857
858 #[inline(always)]
859 fn inline_align(_context: fidl::encoding::Context) -> usize {
860 1
861 }
862
863 #[inline(always)]
864 fn inline_size(_context: fidl::encoding::Context) -> usize {
865 33
866 }
867 }
868
869 unsafe impl<D: fidl::encoding::ResourceDialect>
870 fidl::encoding::Encode<BlobCreatorCreateRequest, D> for &BlobCreatorCreateRequest
871 {
872 #[inline]
873 unsafe fn encode(
874 self,
875 encoder: &mut fidl::encoding::Encoder<'_, D>,
876 offset: usize,
877 _depth: fidl::encoding::Depth,
878 ) -> fidl::Result<()> {
879 encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
880 fidl::encoding::Encode::<BlobCreatorCreateRequest, D>::encode(
882 (
883 <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
884 &self.hash,
885 ),
886 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.allow_existing),
887 ),
888 encoder,
889 offset,
890 _depth,
891 )
892 }
893 }
894 unsafe impl<
895 D: fidl::encoding::ResourceDialect,
896 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
897 T1: fidl::encoding::Encode<bool, D>,
898 > fidl::encoding::Encode<BlobCreatorCreateRequest, D> for (T0, T1)
899 {
900 #[inline]
901 unsafe fn encode(
902 self,
903 encoder: &mut fidl::encoding::Encoder<'_, D>,
904 offset: usize,
905 depth: fidl::encoding::Depth,
906 ) -> fidl::Result<()> {
907 encoder.debug_check_bounds::<BlobCreatorCreateRequest>(offset);
908 self.0.encode(encoder, offset + 0, depth)?;
912 self.1.encode(encoder, offset + 32, depth)?;
913 Ok(())
914 }
915 }
916
917 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
918 for BlobCreatorCreateRequest
919 {
920 #[inline(always)]
921 fn new_empty() -> Self {
922 Self {
923 hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
924 allow_existing: fidl::new_empty!(bool, D),
925 }
926 }
927
928 #[inline]
929 unsafe fn decode(
930 &mut self,
931 decoder: &mut fidl::encoding::Decoder<'_, D>,
932 offset: usize,
933 _depth: fidl::encoding::Depth,
934 ) -> fidl::Result<()> {
935 decoder.debug_check_bounds::<Self>(offset);
936 fidl::decode!(fidl::encoding::Array<u8, 32>, D, &mut self.hash, decoder, offset + 0, _depth)?;
938 fidl::decode!(bool, D, &mut self.allow_existing, decoder, offset + 32, _depth)?;
939 Ok(())
940 }
941 }
942
943 impl fidl::encoding::ValueTypeMarker for BlobCreatorNeedsOverwriteRequest {
944 type Borrowed<'a> = &'a Self;
945 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
946 value
947 }
948 }
949
950 unsafe impl fidl::encoding::TypeMarker for BlobCreatorNeedsOverwriteRequest {
951 type Owned = Self;
952
953 #[inline(always)]
954 fn inline_align(_context: fidl::encoding::Context) -> usize {
955 1
956 }
957
958 #[inline(always)]
959 fn inline_size(_context: fidl::encoding::Context) -> usize {
960 32
961 }
962 #[inline(always)]
963 fn encode_is_copy() -> bool {
964 true
965 }
966
967 #[inline(always)]
968 fn decode_is_copy() -> bool {
969 true
970 }
971 }
972
973 unsafe impl<D: fidl::encoding::ResourceDialect>
974 fidl::encoding::Encode<BlobCreatorNeedsOverwriteRequest, D>
975 for &BlobCreatorNeedsOverwriteRequest
976 {
977 #[inline]
978 unsafe fn encode(
979 self,
980 encoder: &mut fidl::encoding::Encoder<'_, D>,
981 offset: usize,
982 _depth: fidl::encoding::Depth,
983 ) -> fidl::Result<()> {
984 encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteRequest>(offset);
985 unsafe {
986 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
988 (buf_ptr as *mut BlobCreatorNeedsOverwriteRequest)
989 .write_unaligned((self as *const BlobCreatorNeedsOverwriteRequest).read());
990 }
993 Ok(())
994 }
995 }
996 unsafe impl<
997 D: fidl::encoding::ResourceDialect,
998 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
999 > fidl::encoding::Encode<BlobCreatorNeedsOverwriteRequest, D> for (T0,)
1000 {
1001 #[inline]
1002 unsafe fn encode(
1003 self,
1004 encoder: &mut fidl::encoding::Encoder<'_, D>,
1005 offset: usize,
1006 depth: fidl::encoding::Depth,
1007 ) -> fidl::Result<()> {
1008 encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteRequest>(offset);
1009 self.0.encode(encoder, offset + 0, depth)?;
1013 Ok(())
1014 }
1015 }
1016
1017 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1018 for BlobCreatorNeedsOverwriteRequest
1019 {
1020 #[inline(always)]
1021 fn new_empty() -> Self {
1022 Self { blob_hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
1023 }
1024
1025 #[inline]
1026 unsafe fn decode(
1027 &mut self,
1028 decoder: &mut fidl::encoding::Decoder<'_, D>,
1029 offset: usize,
1030 _depth: fidl::encoding::Depth,
1031 ) -> fidl::Result<()> {
1032 decoder.debug_check_bounds::<Self>(offset);
1033 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1034 unsafe {
1037 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
1038 }
1039 Ok(())
1040 }
1041 }
1042
1043 impl fidl::encoding::ValueTypeMarker for BlobCreatorNeedsOverwriteResponse {
1044 type Borrowed<'a> = &'a Self;
1045 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1046 value
1047 }
1048 }
1049
1050 unsafe impl fidl::encoding::TypeMarker for BlobCreatorNeedsOverwriteResponse {
1051 type Owned = Self;
1052
1053 #[inline(always)]
1054 fn inline_align(_context: fidl::encoding::Context) -> usize {
1055 1
1056 }
1057
1058 #[inline(always)]
1059 fn inline_size(_context: fidl::encoding::Context) -> usize {
1060 1
1061 }
1062 }
1063
1064 unsafe impl<D: fidl::encoding::ResourceDialect>
1065 fidl::encoding::Encode<BlobCreatorNeedsOverwriteResponse, D>
1066 for &BlobCreatorNeedsOverwriteResponse
1067 {
1068 #[inline]
1069 unsafe fn encode(
1070 self,
1071 encoder: &mut fidl::encoding::Encoder<'_, D>,
1072 offset: usize,
1073 _depth: fidl::encoding::Depth,
1074 ) -> fidl::Result<()> {
1075 encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteResponse>(offset);
1076 fidl::encoding::Encode::<BlobCreatorNeedsOverwriteResponse, D>::encode(
1078 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.needs_overwrite),),
1079 encoder,
1080 offset,
1081 _depth,
1082 )
1083 }
1084 }
1085 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
1086 fidl::encoding::Encode<BlobCreatorNeedsOverwriteResponse, D> for (T0,)
1087 {
1088 #[inline]
1089 unsafe fn encode(
1090 self,
1091 encoder: &mut fidl::encoding::Encoder<'_, D>,
1092 offset: usize,
1093 depth: fidl::encoding::Depth,
1094 ) -> fidl::Result<()> {
1095 encoder.debug_check_bounds::<BlobCreatorNeedsOverwriteResponse>(offset);
1096 self.0.encode(encoder, offset + 0, depth)?;
1100 Ok(())
1101 }
1102 }
1103
1104 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1105 for BlobCreatorNeedsOverwriteResponse
1106 {
1107 #[inline(always)]
1108 fn new_empty() -> Self {
1109 Self { needs_overwrite: fidl::new_empty!(bool, D) }
1110 }
1111
1112 #[inline]
1113 unsafe fn decode(
1114 &mut self,
1115 decoder: &mut fidl::encoding::Decoder<'_, D>,
1116 offset: usize,
1117 _depth: fidl::encoding::Depth,
1118 ) -> fidl::Result<()> {
1119 decoder.debug_check_bounds::<Self>(offset);
1120 fidl::decode!(bool, D, &mut self.needs_overwrite, decoder, offset + 0, _depth)?;
1122 Ok(())
1123 }
1124 }
1125
1126 impl fidl::encoding::ValueTypeMarker for BlobReaderGetVmoRequest {
1127 type Borrowed<'a> = &'a Self;
1128 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1129 value
1130 }
1131 }
1132
1133 unsafe impl fidl::encoding::TypeMarker for BlobReaderGetVmoRequest {
1134 type Owned = Self;
1135
1136 #[inline(always)]
1137 fn inline_align(_context: fidl::encoding::Context) -> usize {
1138 1
1139 }
1140
1141 #[inline(always)]
1142 fn inline_size(_context: fidl::encoding::Context) -> usize {
1143 32
1144 }
1145 #[inline(always)]
1146 fn encode_is_copy() -> bool {
1147 true
1148 }
1149
1150 #[inline(always)]
1151 fn decode_is_copy() -> bool {
1152 true
1153 }
1154 }
1155
1156 unsafe impl<D: fidl::encoding::ResourceDialect>
1157 fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for &BlobReaderGetVmoRequest
1158 {
1159 #[inline]
1160 unsafe fn encode(
1161 self,
1162 encoder: &mut fidl::encoding::Encoder<'_, D>,
1163 offset: usize,
1164 _depth: fidl::encoding::Depth,
1165 ) -> fidl::Result<()> {
1166 encoder.debug_check_bounds::<BlobReaderGetVmoRequest>(offset);
1167 unsafe {
1168 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1170 (buf_ptr as *mut BlobReaderGetVmoRequest)
1171 .write_unaligned((self as *const BlobReaderGetVmoRequest).read());
1172 }
1175 Ok(())
1176 }
1177 }
1178 unsafe impl<
1179 D: fidl::encoding::ResourceDialect,
1180 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
1181 > fidl::encoding::Encode<BlobReaderGetVmoRequest, D> for (T0,)
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::<BlobReaderGetVmoRequest>(offset);
1191 self.0.encode(encoder, offset + 0, depth)?;
1195 Ok(())
1196 }
1197 }
1198
1199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1200 for BlobReaderGetVmoRequest
1201 {
1202 #[inline(always)]
1203 fn new_empty() -> Self {
1204 Self { blob_hash: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
1205 }
1206
1207 #[inline]
1208 unsafe fn decode(
1209 &mut self,
1210 decoder: &mut fidl::encoding::Decoder<'_, D>,
1211 offset: usize,
1212 _depth: fidl::encoding::Depth,
1213 ) -> fidl::Result<()> {
1214 decoder.debug_check_bounds::<Self>(offset);
1215 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1216 unsafe {
1219 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
1220 }
1221 Ok(())
1222 }
1223 }
1224
1225 impl fidl::encoding::ValueTypeMarker for BlobWriterBytesReadyRequest {
1226 type Borrowed<'a> = &'a Self;
1227 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1228 value
1229 }
1230 }
1231
1232 unsafe impl fidl::encoding::TypeMarker for BlobWriterBytesReadyRequest {
1233 type Owned = Self;
1234
1235 #[inline(always)]
1236 fn inline_align(_context: fidl::encoding::Context) -> usize {
1237 8
1238 }
1239
1240 #[inline(always)]
1241 fn inline_size(_context: fidl::encoding::Context) -> usize {
1242 8
1243 }
1244 #[inline(always)]
1245 fn encode_is_copy() -> bool {
1246 true
1247 }
1248
1249 #[inline(always)]
1250 fn decode_is_copy() -> bool {
1251 true
1252 }
1253 }
1254
1255 unsafe impl<D: fidl::encoding::ResourceDialect>
1256 fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for &BlobWriterBytesReadyRequest
1257 {
1258 #[inline]
1259 unsafe fn encode(
1260 self,
1261 encoder: &mut fidl::encoding::Encoder<'_, D>,
1262 offset: usize,
1263 _depth: fidl::encoding::Depth,
1264 ) -> fidl::Result<()> {
1265 encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
1266 unsafe {
1267 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1269 (buf_ptr as *mut BlobWriterBytesReadyRequest)
1270 .write_unaligned((self as *const BlobWriterBytesReadyRequest).read());
1271 }
1274 Ok(())
1275 }
1276 }
1277 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1278 fidl::encoding::Encode<BlobWriterBytesReadyRequest, D> for (T0,)
1279 {
1280 #[inline]
1281 unsafe fn encode(
1282 self,
1283 encoder: &mut fidl::encoding::Encoder<'_, D>,
1284 offset: usize,
1285 depth: fidl::encoding::Depth,
1286 ) -> fidl::Result<()> {
1287 encoder.debug_check_bounds::<BlobWriterBytesReadyRequest>(offset);
1288 self.0.encode(encoder, offset + 0, depth)?;
1292 Ok(())
1293 }
1294 }
1295
1296 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1297 for BlobWriterBytesReadyRequest
1298 {
1299 #[inline(always)]
1300 fn new_empty() -> Self {
1301 Self { bytes_written: fidl::new_empty!(u64, D) }
1302 }
1303
1304 #[inline]
1305 unsafe fn decode(
1306 &mut self,
1307 decoder: &mut fidl::encoding::Decoder<'_, D>,
1308 offset: usize,
1309 _depth: fidl::encoding::Depth,
1310 ) -> fidl::Result<()> {
1311 decoder.debug_check_bounds::<Self>(offset);
1312 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1313 unsafe {
1316 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1317 }
1318 Ok(())
1319 }
1320 }
1321
1322 impl fidl::encoding::ValueTypeMarker for BlobWriterGetVmoRequest {
1323 type Borrowed<'a> = &'a Self;
1324 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1325 value
1326 }
1327 }
1328
1329 unsafe impl fidl::encoding::TypeMarker for BlobWriterGetVmoRequest {
1330 type Owned = Self;
1331
1332 #[inline(always)]
1333 fn inline_align(_context: fidl::encoding::Context) -> usize {
1334 8
1335 }
1336
1337 #[inline(always)]
1338 fn inline_size(_context: fidl::encoding::Context) -> usize {
1339 8
1340 }
1341 #[inline(always)]
1342 fn encode_is_copy() -> bool {
1343 true
1344 }
1345
1346 #[inline(always)]
1347 fn decode_is_copy() -> bool {
1348 true
1349 }
1350 }
1351
1352 unsafe impl<D: fidl::encoding::ResourceDialect>
1353 fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for &BlobWriterGetVmoRequest
1354 {
1355 #[inline]
1356 unsafe fn encode(
1357 self,
1358 encoder: &mut fidl::encoding::Encoder<'_, D>,
1359 offset: usize,
1360 _depth: fidl::encoding::Depth,
1361 ) -> fidl::Result<()> {
1362 encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
1363 unsafe {
1364 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1366 (buf_ptr as *mut BlobWriterGetVmoRequest)
1367 .write_unaligned((self as *const BlobWriterGetVmoRequest).read());
1368 }
1371 Ok(())
1372 }
1373 }
1374 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
1375 fidl::encoding::Encode<BlobWriterGetVmoRequest, D> for (T0,)
1376 {
1377 #[inline]
1378 unsafe fn encode(
1379 self,
1380 encoder: &mut fidl::encoding::Encoder<'_, D>,
1381 offset: usize,
1382 depth: fidl::encoding::Depth,
1383 ) -> fidl::Result<()> {
1384 encoder.debug_check_bounds::<BlobWriterGetVmoRequest>(offset);
1385 self.0.encode(encoder, offset + 0, depth)?;
1389 Ok(())
1390 }
1391 }
1392
1393 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1394 for BlobWriterGetVmoRequest
1395 {
1396 #[inline(always)]
1397 fn new_empty() -> Self {
1398 Self { size: fidl::new_empty!(u64, D) }
1399 }
1400
1401 #[inline]
1402 unsafe fn decode(
1403 &mut self,
1404 decoder: &mut fidl::encoding::Decoder<'_, D>,
1405 offset: usize,
1406 _depth: fidl::encoding::Depth,
1407 ) -> fidl::Result<()> {
1408 decoder.debug_check_bounds::<Self>(offset);
1409 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1410 unsafe {
1413 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
1414 }
1415 Ok(())
1416 }
1417 }
1418
1419 impl fidl::encoding::ValueTypeMarker for BytesAndNodes {
1420 type Borrowed<'a> = &'a Self;
1421 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1422 value
1423 }
1424 }
1425
1426 unsafe impl fidl::encoding::TypeMarker for BytesAndNodes {
1427 type Owned = Self;
1428
1429 #[inline(always)]
1430 fn inline_align(_context: fidl::encoding::Context) -> usize {
1431 8
1432 }
1433
1434 #[inline(always)]
1435 fn inline_size(_context: fidl::encoding::Context) -> usize {
1436 16
1437 }
1438 #[inline(always)]
1439 fn encode_is_copy() -> bool {
1440 true
1441 }
1442
1443 #[inline(always)]
1444 fn decode_is_copy() -> bool {
1445 true
1446 }
1447 }
1448
1449 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BytesAndNodes, D>
1450 for &BytesAndNodes
1451 {
1452 #[inline]
1453 unsafe fn encode(
1454 self,
1455 encoder: &mut fidl::encoding::Encoder<'_, D>,
1456 offset: usize,
1457 _depth: fidl::encoding::Depth,
1458 ) -> fidl::Result<()> {
1459 encoder.debug_check_bounds::<BytesAndNodes>(offset);
1460 unsafe {
1461 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1463 (buf_ptr as *mut BytesAndNodes)
1464 .write_unaligned((self as *const BytesAndNodes).read());
1465 }
1468 Ok(())
1469 }
1470 }
1471 unsafe impl<
1472 D: fidl::encoding::ResourceDialect,
1473 T0: fidl::encoding::Encode<u64, D>,
1474 T1: fidl::encoding::Encode<u64, D>,
1475 > fidl::encoding::Encode<BytesAndNodes, D> for (T0, T1)
1476 {
1477 #[inline]
1478 unsafe fn encode(
1479 self,
1480 encoder: &mut fidl::encoding::Encoder<'_, D>,
1481 offset: usize,
1482 depth: fidl::encoding::Depth,
1483 ) -> fidl::Result<()> {
1484 encoder.debug_check_bounds::<BytesAndNodes>(offset);
1485 self.0.encode(encoder, offset + 0, depth)?;
1489 self.1.encode(encoder, offset + 8, depth)?;
1490 Ok(())
1491 }
1492 }
1493
1494 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BytesAndNodes {
1495 #[inline(always)]
1496 fn new_empty() -> Self {
1497 Self { bytes: fidl::new_empty!(u64, D), nodes: fidl::new_empty!(u64, D) }
1498 }
1499
1500 #[inline]
1501 unsafe fn decode(
1502 &mut self,
1503 decoder: &mut fidl::encoding::Decoder<'_, D>,
1504 offset: usize,
1505 _depth: fidl::encoding::Depth,
1506 ) -> fidl::Result<()> {
1507 decoder.debug_check_bounds::<Self>(offset);
1508 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1509 unsafe {
1512 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1513 }
1514 Ok(())
1515 }
1516 }
1517
1518 impl fidl::encoding::ValueTypeMarker for CryptCreateKeyRequest {
1519 type Borrowed<'a> = &'a Self;
1520 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1521 value
1522 }
1523 }
1524
1525 unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyRequest {
1526 type Owned = Self;
1527
1528 #[inline(always)]
1529 fn inline_align(_context: fidl::encoding::Context) -> usize {
1530 8
1531 }
1532
1533 #[inline(always)]
1534 fn inline_size(_context: fidl::encoding::Context) -> usize {
1535 16
1536 }
1537 }
1538
1539 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptCreateKeyRequest, D>
1540 for &CryptCreateKeyRequest
1541 {
1542 #[inline]
1543 unsafe fn encode(
1544 self,
1545 encoder: &mut fidl::encoding::Encoder<'_, D>,
1546 offset: usize,
1547 _depth: fidl::encoding::Depth,
1548 ) -> fidl::Result<()> {
1549 encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
1550 fidl::encoding::Encode::<CryptCreateKeyRequest, D>::encode(
1552 (
1553 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1554 <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
1555 ),
1556 encoder,
1557 offset,
1558 _depth,
1559 )
1560 }
1561 }
1562 unsafe impl<
1563 D: fidl::encoding::ResourceDialect,
1564 T0: fidl::encoding::Encode<u64, D>,
1565 T1: fidl::encoding::Encode<KeyPurpose, D>,
1566 > fidl::encoding::Encode<CryptCreateKeyRequest, D> for (T0, T1)
1567 {
1568 #[inline]
1569 unsafe fn encode(
1570 self,
1571 encoder: &mut fidl::encoding::Encoder<'_, D>,
1572 offset: usize,
1573 depth: fidl::encoding::Depth,
1574 ) -> fidl::Result<()> {
1575 encoder.debug_check_bounds::<CryptCreateKeyRequest>(offset);
1576 unsafe {
1579 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(8);
1580 (ptr as *mut u64).write_unaligned(0);
1581 }
1582 self.0.encode(encoder, offset + 0, depth)?;
1584 self.1.encode(encoder, offset + 8, depth)?;
1585 Ok(())
1586 }
1587 }
1588
1589 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptCreateKeyRequest {
1590 #[inline(always)]
1591 fn new_empty() -> Self {
1592 Self { owner: fidl::new_empty!(u64, D), purpose: fidl::new_empty!(KeyPurpose, D) }
1593 }
1594
1595 #[inline]
1596 unsafe fn decode(
1597 &mut self,
1598 decoder: &mut fidl::encoding::Decoder<'_, D>,
1599 offset: usize,
1600 _depth: fidl::encoding::Depth,
1601 ) -> fidl::Result<()> {
1602 decoder.debug_check_bounds::<Self>(offset);
1603 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(8) };
1605 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1606 let mask = 0xffffffff00000000u64;
1607 let maskedval = padval & mask;
1608 if maskedval != 0 {
1609 return Err(fidl::Error::NonZeroPadding {
1610 padding_start: offset + 8 + ((mask as u64).trailing_zeros() / 8) as usize,
1611 });
1612 }
1613 fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
1614 fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 8, _depth)?;
1615 Ok(())
1616 }
1617 }
1618
1619 impl fidl::encoding::ValueTypeMarker for CryptCreateKeyWithIdRequest {
1620 type Borrowed<'a> = &'a Self;
1621 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1622 value
1623 }
1624 }
1625
1626 unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyWithIdRequest {
1627 type Owned = Self;
1628
1629 #[inline(always)]
1630 fn inline_align(_context: fidl::encoding::Context) -> usize {
1631 8
1632 }
1633
1634 #[inline(always)]
1635 fn inline_size(_context: fidl::encoding::Context) -> usize {
1636 32
1637 }
1638 }
1639
1640 unsafe impl<D: fidl::encoding::ResourceDialect>
1641 fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for &CryptCreateKeyWithIdRequest
1642 {
1643 #[inline]
1644 unsafe fn encode(
1645 self,
1646 encoder: &mut fidl::encoding::Encoder<'_, D>,
1647 offset: usize,
1648 _depth: fidl::encoding::Depth,
1649 ) -> fidl::Result<()> {
1650 encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1651 fidl::encoding::Encode::<CryptCreateKeyWithIdRequest, D>::encode(
1653 (
1654 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
1655 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(&self.wrapping_key_id),
1656 <ObjectType as fidl::encoding::ValueTypeMarker>::borrow(&self.object_type),
1657 <fidl_fuchsia_io_common::FscryptPolicyFlags as fidl::encoding::ValueTypeMarker>::borrow(&self.flags),
1658 ),
1659 encoder, offset, _depth
1660 )
1661 }
1662 }
1663 unsafe impl<
1664 D: fidl::encoding::ResourceDialect,
1665 T0: fidl::encoding::Encode<u64, D>,
1666 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1667 T2: fidl::encoding::Encode<ObjectType, D>,
1668 T3: fidl::encoding::Encode<fidl_fuchsia_io_common::FscryptPolicyFlags, D>,
1669 > fidl::encoding::Encode<CryptCreateKeyWithIdRequest, D> for (T0, T1, T2, T3)
1670 {
1671 #[inline]
1672 unsafe fn encode(
1673 self,
1674 encoder: &mut fidl::encoding::Encoder<'_, D>,
1675 offset: usize,
1676 depth: fidl::encoding::Depth,
1677 ) -> fidl::Result<()> {
1678 encoder.debug_check_bounds::<CryptCreateKeyWithIdRequest>(offset);
1679 unsafe {
1682 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(24);
1683 (ptr as *mut u64).write_unaligned(0);
1684 }
1685 self.0.encode(encoder, offset + 0, depth)?;
1687 self.1.encode(encoder, offset + 8, depth)?;
1688 self.2.encode(encoder, offset + 24, depth)?;
1689 self.3.encode(encoder, offset + 28, depth)?;
1690 Ok(())
1691 }
1692 }
1693
1694 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1695 for CryptCreateKeyWithIdRequest
1696 {
1697 #[inline(always)]
1698 fn new_empty() -> Self {
1699 Self {
1700 owner: fidl::new_empty!(u64, D),
1701 wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1702 object_type: fidl::new_empty!(ObjectType, D),
1703 flags: fidl::new_empty!(fidl_fuchsia_io_common::FscryptPolicyFlags, D),
1704 }
1705 }
1706
1707 #[inline]
1708 unsafe fn decode(
1709 &mut self,
1710 decoder: &mut fidl::encoding::Decoder<'_, D>,
1711 offset: usize,
1712 _depth: fidl::encoding::Depth,
1713 ) -> fidl::Result<()> {
1714 decoder.debug_check_bounds::<Self>(offset);
1715 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(24) };
1717 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1718 let mask = 0xffffff0000000000u64;
1719 let maskedval = padval & mask;
1720 if maskedval != 0 {
1721 return Err(fidl::Error::NonZeroPadding {
1722 padding_start: offset + 24 + ((mask as u64).trailing_zeros() / 8) as usize,
1723 });
1724 }
1725 fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
1726 fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 8, _depth)?;
1727 fidl::decode!(ObjectType, D, &mut self.object_type, decoder, offset + 24, _depth)?;
1728 fidl::decode!(
1729 fidl_fuchsia_io_common::FscryptPolicyFlags,
1730 D,
1731 &mut self.flags,
1732 decoder,
1733 offset + 28,
1734 _depth
1735 )?;
1736 Ok(())
1737 }
1738 }
1739
1740 impl fidl::encoding::ValueTypeMarker for CryptManagementAddWrappingKeyRequest {
1741 type Borrowed<'a> = &'a Self;
1742 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1743 value
1744 }
1745 }
1746
1747 unsafe impl fidl::encoding::TypeMarker for CryptManagementAddWrappingKeyRequest {
1748 type Owned = Self;
1749
1750 #[inline(always)]
1751 fn inline_align(_context: fidl::encoding::Context) -> usize {
1752 8
1753 }
1754
1755 #[inline(always)]
1756 fn inline_size(_context: fidl::encoding::Context) -> usize {
1757 32
1758 }
1759 }
1760
1761 unsafe impl<D: fidl::encoding::ResourceDialect>
1762 fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D>
1763 for &CryptManagementAddWrappingKeyRequest
1764 {
1765 #[inline]
1766 unsafe fn encode(
1767 self,
1768 encoder: &mut fidl::encoding::Encoder<'_, D>,
1769 offset: usize,
1770 _depth: fidl::encoding::Depth,
1771 ) -> fidl::Result<()> {
1772 encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1773 fidl::encoding::Encode::<CryptManagementAddWrappingKeyRequest, D>::encode(
1775 (
1776 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1777 &self.wrapping_key_id,
1778 ),
1779 <fidl::encoding::Vector<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(
1780 &self.key,
1781 ),
1782 ),
1783 encoder,
1784 offset,
1785 _depth,
1786 )
1787 }
1788 }
1789 unsafe impl<
1790 D: fidl::encoding::ResourceDialect,
1791 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1792 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 32>, D>,
1793 > fidl::encoding::Encode<CryptManagementAddWrappingKeyRequest, D> for (T0, T1)
1794 {
1795 #[inline]
1796 unsafe fn encode(
1797 self,
1798 encoder: &mut fidl::encoding::Encoder<'_, D>,
1799 offset: usize,
1800 depth: fidl::encoding::Depth,
1801 ) -> fidl::Result<()> {
1802 encoder.debug_check_bounds::<CryptManagementAddWrappingKeyRequest>(offset);
1803 self.0.encode(encoder, offset + 0, depth)?;
1807 self.1.encode(encoder, offset + 16, depth)?;
1808 Ok(())
1809 }
1810 }
1811
1812 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1813 for CryptManagementAddWrappingKeyRequest
1814 {
1815 #[inline(always)]
1816 fn new_empty() -> Self {
1817 Self {
1818 wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
1819 key: fidl::new_empty!(fidl::encoding::Vector<u8, 32>, D),
1820 }
1821 }
1822
1823 #[inline]
1824 unsafe fn decode(
1825 &mut self,
1826 decoder: &mut fidl::encoding::Decoder<'_, D>,
1827 offset: usize,
1828 _depth: fidl::encoding::Depth,
1829 ) -> fidl::Result<()> {
1830 decoder.debug_check_bounds::<Self>(offset);
1831 fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
1833 fidl::decode!(fidl::encoding::Vector<u8, 32>, D, &mut self.key, decoder, offset + 16, _depth)?;
1834 Ok(())
1835 }
1836 }
1837
1838 impl fidl::encoding::ValueTypeMarker for CryptManagementForgetWrappingKeyRequest {
1839 type Borrowed<'a> = &'a Self;
1840 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1841 value
1842 }
1843 }
1844
1845 unsafe impl fidl::encoding::TypeMarker for CryptManagementForgetWrappingKeyRequest {
1846 type Owned = Self;
1847
1848 #[inline(always)]
1849 fn inline_align(_context: fidl::encoding::Context) -> usize {
1850 1
1851 }
1852
1853 #[inline(always)]
1854 fn inline_size(_context: fidl::encoding::Context) -> usize {
1855 16
1856 }
1857 #[inline(always)]
1858 fn encode_is_copy() -> bool {
1859 true
1860 }
1861
1862 #[inline(always)]
1863 fn decode_is_copy() -> bool {
1864 true
1865 }
1866 }
1867
1868 unsafe impl<D: fidl::encoding::ResourceDialect>
1869 fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D>
1870 for &CryptManagementForgetWrappingKeyRequest
1871 {
1872 #[inline]
1873 unsafe fn encode(
1874 self,
1875 encoder: &mut fidl::encoding::Encoder<'_, D>,
1876 offset: usize,
1877 _depth: fidl::encoding::Depth,
1878 ) -> fidl::Result<()> {
1879 encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1880 unsafe {
1881 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1883 (buf_ptr as *mut CryptManagementForgetWrappingKeyRequest).write_unaligned(
1884 (self as *const CryptManagementForgetWrappingKeyRequest).read(),
1885 );
1886 }
1889 Ok(())
1890 }
1891 }
1892 unsafe impl<
1893 D: fidl::encoding::ResourceDialect,
1894 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1895 > fidl::encoding::Encode<CryptManagementForgetWrappingKeyRequest, D> for (T0,)
1896 {
1897 #[inline]
1898 unsafe fn encode(
1899 self,
1900 encoder: &mut fidl::encoding::Encoder<'_, D>,
1901 offset: usize,
1902 depth: fidl::encoding::Depth,
1903 ) -> fidl::Result<()> {
1904 encoder.debug_check_bounds::<CryptManagementForgetWrappingKeyRequest>(offset);
1905 self.0.encode(encoder, offset + 0, depth)?;
1909 Ok(())
1910 }
1911 }
1912
1913 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1914 for CryptManagementForgetWrappingKeyRequest
1915 {
1916 #[inline(always)]
1917 fn new_empty() -> Self {
1918 Self { wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D) }
1919 }
1920
1921 #[inline]
1922 unsafe fn decode(
1923 &mut self,
1924 decoder: &mut fidl::encoding::Decoder<'_, D>,
1925 offset: usize,
1926 _depth: fidl::encoding::Depth,
1927 ) -> fidl::Result<()> {
1928 decoder.debug_check_bounds::<Self>(offset);
1929 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1930 unsafe {
1933 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
1934 }
1935 Ok(())
1936 }
1937 }
1938
1939 impl fidl::encoding::ValueTypeMarker for CryptManagementSetActiveKeyRequest {
1940 type Borrowed<'a> = &'a Self;
1941 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1942 value
1943 }
1944 }
1945
1946 unsafe impl fidl::encoding::TypeMarker for CryptManagementSetActiveKeyRequest {
1947 type Owned = Self;
1948
1949 #[inline(always)]
1950 fn inline_align(_context: fidl::encoding::Context) -> usize {
1951 4
1952 }
1953
1954 #[inline(always)]
1955 fn inline_size(_context: fidl::encoding::Context) -> usize {
1956 20
1957 }
1958 }
1959
1960 unsafe impl<D: fidl::encoding::ResourceDialect>
1961 fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D>
1962 for &CryptManagementSetActiveKeyRequest
1963 {
1964 #[inline]
1965 unsafe fn encode(
1966 self,
1967 encoder: &mut fidl::encoding::Encoder<'_, D>,
1968 offset: usize,
1969 _depth: fidl::encoding::Depth,
1970 ) -> fidl::Result<()> {
1971 encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
1972 fidl::encoding::Encode::<CryptManagementSetActiveKeyRequest, D>::encode(
1974 (
1975 <KeyPurpose as fidl::encoding::ValueTypeMarker>::borrow(&self.purpose),
1976 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
1977 &self.wrapping_key_id,
1978 ),
1979 ),
1980 encoder,
1981 offset,
1982 _depth,
1983 )
1984 }
1985 }
1986 unsafe impl<
1987 D: fidl::encoding::ResourceDialect,
1988 T0: fidl::encoding::Encode<KeyPurpose, D>,
1989 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
1990 > fidl::encoding::Encode<CryptManagementSetActiveKeyRequest, D> for (T0, T1)
1991 {
1992 #[inline]
1993 unsafe fn encode(
1994 self,
1995 encoder: &mut fidl::encoding::Encoder<'_, D>,
1996 offset: usize,
1997 depth: fidl::encoding::Depth,
1998 ) -> fidl::Result<()> {
1999 encoder.debug_check_bounds::<CryptManagementSetActiveKeyRequest>(offset);
2000 self.0.encode(encoder, offset + 0, depth)?;
2004 self.1.encode(encoder, offset + 4, depth)?;
2005 Ok(())
2006 }
2007 }
2008
2009 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2010 for CryptManagementSetActiveKeyRequest
2011 {
2012 #[inline(always)]
2013 fn new_empty() -> Self {
2014 Self {
2015 purpose: fidl::new_empty!(KeyPurpose, D),
2016 wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2017 }
2018 }
2019
2020 #[inline]
2021 unsafe fn decode(
2022 &mut self,
2023 decoder: &mut fidl::encoding::Decoder<'_, D>,
2024 offset: usize,
2025 _depth: fidl::encoding::Depth,
2026 ) -> fidl::Result<()> {
2027 decoder.debug_check_bounds::<Self>(offset);
2028 fidl::decode!(KeyPurpose, D, &mut self.purpose, decoder, offset + 0, _depth)?;
2030 fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 4, _depth)?;
2031 Ok(())
2032 }
2033 }
2034
2035 impl fidl::encoding::ValueTypeMarker for CryptUnwrapKeyRequest {
2036 type Borrowed<'a> = &'a Self;
2037 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2038 value
2039 }
2040 }
2041
2042 unsafe impl fidl::encoding::TypeMarker for CryptUnwrapKeyRequest {
2043 type Owned = Self;
2044
2045 #[inline(always)]
2046 fn inline_align(_context: fidl::encoding::Context) -> usize {
2047 8
2048 }
2049
2050 #[inline(always)]
2051 fn inline_size(_context: fidl::encoding::Context) -> usize {
2052 24
2053 }
2054 }
2055
2056 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptUnwrapKeyRequest, D>
2057 for &CryptUnwrapKeyRequest
2058 {
2059 #[inline]
2060 unsafe fn encode(
2061 self,
2062 encoder: &mut fidl::encoding::Encoder<'_, D>,
2063 offset: usize,
2064 _depth: fidl::encoding::Depth,
2065 ) -> fidl::Result<()> {
2066 encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
2067 fidl::encoding::Encode::<CryptUnwrapKeyRequest, D>::encode(
2069 (
2070 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.owner),
2071 <WrappedKey as fidl::encoding::ValueTypeMarker>::borrow(&self.wrapped_key),
2072 ),
2073 encoder,
2074 offset,
2075 _depth,
2076 )
2077 }
2078 }
2079 unsafe impl<
2080 D: fidl::encoding::ResourceDialect,
2081 T0: fidl::encoding::Encode<u64, D>,
2082 T1: fidl::encoding::Encode<WrappedKey, D>,
2083 > fidl::encoding::Encode<CryptUnwrapKeyRequest, D> for (T0, T1)
2084 {
2085 #[inline]
2086 unsafe fn encode(
2087 self,
2088 encoder: &mut fidl::encoding::Encoder<'_, D>,
2089 offset: usize,
2090 depth: fidl::encoding::Depth,
2091 ) -> fidl::Result<()> {
2092 encoder.debug_check_bounds::<CryptUnwrapKeyRequest>(offset);
2093 self.0.encode(encoder, offset + 0, depth)?;
2097 self.1.encode(encoder, offset + 8, depth)?;
2098 Ok(())
2099 }
2100 }
2101
2102 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptUnwrapKeyRequest {
2103 #[inline(always)]
2104 fn new_empty() -> Self {
2105 Self { owner: fidl::new_empty!(u64, D), wrapped_key: fidl::new_empty!(WrappedKey, D) }
2106 }
2107
2108 #[inline]
2109 unsafe fn decode(
2110 &mut self,
2111 decoder: &mut fidl::encoding::Decoder<'_, D>,
2112 offset: usize,
2113 _depth: fidl::encoding::Depth,
2114 ) -> fidl::Result<()> {
2115 decoder.debug_check_bounds::<Self>(offset);
2116 fidl::decode!(u64, D, &mut self.owner, decoder, offset + 0, _depth)?;
2118 fidl::decode!(WrappedKey, D, &mut self.wrapped_key, decoder, offset + 8, _depth)?;
2119 Ok(())
2120 }
2121 }
2122
2123 impl fidl::encoding::ValueTypeMarker for CryptCreateKeyResponse {
2124 type Borrowed<'a> = &'a Self;
2125 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2126 value
2127 }
2128 }
2129
2130 unsafe impl fidl::encoding::TypeMarker for CryptCreateKeyResponse {
2131 type Owned = Self;
2132
2133 #[inline(always)]
2134 fn inline_align(_context: fidl::encoding::Context) -> usize {
2135 8
2136 }
2137
2138 #[inline(always)]
2139 fn inline_size(_context: fidl::encoding::Context) -> usize {
2140 48
2141 }
2142 }
2143
2144 unsafe impl<D: fidl::encoding::ResourceDialect>
2145 fidl::encoding::Encode<CryptCreateKeyResponse, D> for &CryptCreateKeyResponse
2146 {
2147 #[inline]
2148 unsafe fn encode(
2149 self,
2150 encoder: &mut fidl::encoding::Encoder<'_, D>,
2151 offset: usize,
2152 _depth: fidl::encoding::Depth,
2153 ) -> fidl::Result<()> {
2154 encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
2155 fidl::encoding::Encode::<CryptCreateKeyResponse, D>::encode(
2157 (
2158 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow(
2159 &self.wrapping_key_id,
2160 ),
2161 <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
2162 &self.wrapped_key,
2163 ),
2164 <fidl::encoding::Vector<u8, 80> as fidl::encoding::ValueTypeMarker>::borrow(
2165 &self.unwrapped_key,
2166 ),
2167 ),
2168 encoder,
2169 offset,
2170 _depth,
2171 )
2172 }
2173 }
2174 unsafe impl<
2175 D: fidl::encoding::ResourceDialect,
2176 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2177 T1: fidl::encoding::Encode<fidl::encoding::Vector<u8, 132>, D>,
2178 T2: fidl::encoding::Encode<fidl::encoding::Vector<u8, 80>, D>,
2179 > fidl::encoding::Encode<CryptCreateKeyResponse, D> for (T0, T1, T2)
2180 {
2181 #[inline]
2182 unsafe fn encode(
2183 self,
2184 encoder: &mut fidl::encoding::Encoder<'_, D>,
2185 offset: usize,
2186 depth: fidl::encoding::Depth,
2187 ) -> fidl::Result<()> {
2188 encoder.debug_check_bounds::<CryptCreateKeyResponse>(offset);
2189 self.0.encode(encoder, offset + 0, depth)?;
2193 self.1.encode(encoder, offset + 16, depth)?;
2194 self.2.encode(encoder, offset + 32, depth)?;
2195 Ok(())
2196 }
2197 }
2198
2199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2200 for CryptCreateKeyResponse
2201 {
2202 #[inline(always)]
2203 fn new_empty() -> Self {
2204 Self {
2205 wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2206 wrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
2207 unwrapped_key: fidl::new_empty!(fidl::encoding::Vector<u8, 80>, D),
2208 }
2209 }
2210
2211 #[inline]
2212 unsafe fn decode(
2213 &mut self,
2214 decoder: &mut fidl::encoding::Decoder<'_, D>,
2215 offset: usize,
2216 _depth: fidl::encoding::Depth,
2217 ) -> fidl::Result<()> {
2218 decoder.debug_check_bounds::<Self>(offset);
2219 fidl::decode!(fidl::encoding::Array<u8, 16>, D, &mut self.wrapping_key_id, decoder, offset + 0, _depth)?;
2221 fidl::decode!(fidl::encoding::Vector<u8, 132>, D, &mut self.wrapped_key, decoder, offset + 16, _depth)?;
2222 fidl::decode!(fidl::encoding::Vector<u8, 80>, D, &mut self.unwrapped_key, decoder, offset + 32, _depth)?;
2223 Ok(())
2224 }
2225 }
2226
2227 impl fidl::encoding::ValueTypeMarker for DebugDeleteProfileRequest {
2228 type Borrowed<'a> = &'a Self;
2229 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2230 value
2231 }
2232 }
2233
2234 unsafe impl fidl::encoding::TypeMarker for DebugDeleteProfileRequest {
2235 type Owned = Self;
2236
2237 #[inline(always)]
2238 fn inline_align(_context: fidl::encoding::Context) -> usize {
2239 8
2240 }
2241
2242 #[inline(always)]
2243 fn inline_size(_context: fidl::encoding::Context) -> usize {
2244 32
2245 }
2246 }
2247
2248 unsafe impl<D: fidl::encoding::ResourceDialect>
2249 fidl::encoding::Encode<DebugDeleteProfileRequest, D> for &DebugDeleteProfileRequest
2250 {
2251 #[inline]
2252 unsafe fn encode(
2253 self,
2254 encoder: &mut fidl::encoding::Encoder<'_, D>,
2255 offset: usize,
2256 _depth: fidl::encoding::Depth,
2257 ) -> fidl::Result<()> {
2258 encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
2259 fidl::encoding::Encode::<DebugDeleteProfileRequest, D>::encode(
2261 (
2262 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
2263 &self.volume,
2264 ),
2265 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
2266 &self.profile,
2267 ),
2268 ),
2269 encoder,
2270 offset,
2271 _depth,
2272 )
2273 }
2274 }
2275 unsafe impl<
2276 D: fidl::encoding::ResourceDialect,
2277 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2278 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2279 > fidl::encoding::Encode<DebugDeleteProfileRequest, D> for (T0, T1)
2280 {
2281 #[inline]
2282 unsafe fn encode(
2283 self,
2284 encoder: &mut fidl::encoding::Encoder<'_, D>,
2285 offset: usize,
2286 depth: fidl::encoding::Depth,
2287 ) -> fidl::Result<()> {
2288 encoder.debug_check_bounds::<DebugDeleteProfileRequest>(offset);
2289 self.0.encode(encoder, offset + 0, depth)?;
2293 self.1.encode(encoder, offset + 16, depth)?;
2294 Ok(())
2295 }
2296 }
2297
2298 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2299 for DebugDeleteProfileRequest
2300 {
2301 #[inline(always)]
2302 fn new_empty() -> Self {
2303 Self {
2304 volume: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2305 profile: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2306 }
2307 }
2308
2309 #[inline]
2310 unsafe fn decode(
2311 &mut self,
2312 decoder: &mut fidl::encoding::Decoder<'_, D>,
2313 offset: usize,
2314 _depth: fidl::encoding::Depth,
2315 ) -> fidl::Result<()> {
2316 decoder.debug_check_bounds::<Self>(offset);
2317 fidl::decode!(
2319 fidl::encoding::BoundedString<255>,
2320 D,
2321 &mut self.volume,
2322 decoder,
2323 offset + 0,
2324 _depth
2325 )?;
2326 fidl::decode!(
2327 fidl::encoding::BoundedString<255>,
2328 D,
2329 &mut self.profile,
2330 decoder,
2331 offset + 16,
2332 _depth
2333 )?;
2334 Ok(())
2335 }
2336 }
2337
2338 impl fidl::encoding::ValueTypeMarker for DebugRecordAndReplayProfileRequest {
2339 type Borrowed<'a> = &'a Self;
2340 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2341 value
2342 }
2343 }
2344
2345 unsafe impl fidl::encoding::TypeMarker for DebugRecordAndReplayProfileRequest {
2346 type Owned = Self;
2347
2348 #[inline(always)]
2349 fn inline_align(_context: fidl::encoding::Context) -> usize {
2350 8
2351 }
2352
2353 #[inline(always)]
2354 fn inline_size(_context: fidl::encoding::Context) -> usize {
2355 40
2356 }
2357 }
2358
2359 unsafe impl<D: fidl::encoding::ResourceDialect>
2360 fidl::encoding::Encode<DebugRecordAndReplayProfileRequest, D>
2361 for &DebugRecordAndReplayProfileRequest
2362 {
2363 #[inline]
2364 unsafe fn encode(
2365 self,
2366 encoder: &mut fidl::encoding::Encoder<'_, D>,
2367 offset: usize,
2368 _depth: fidl::encoding::Depth,
2369 ) -> fidl::Result<()> {
2370 encoder.debug_check_bounds::<DebugRecordAndReplayProfileRequest>(offset);
2371 fidl::encoding::Encode::<DebugRecordAndReplayProfileRequest, D>::encode(
2373 (
2374 <fidl::encoding::Optional<fidl::encoding::BoundedString<255>> as fidl::encoding::ValueTypeMarker>::borrow(&self.volume),
2375 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(&self.profile),
2376 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.duration_secs),
2377 ),
2378 encoder, offset, _depth
2379 )
2380 }
2381 }
2382 unsafe impl<
2383 D: fidl::encoding::ResourceDialect,
2384 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<255>>, D>,
2385 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2386 T2: fidl::encoding::Encode<u32, D>,
2387 > fidl::encoding::Encode<DebugRecordAndReplayProfileRequest, D> for (T0, T1, T2)
2388 {
2389 #[inline]
2390 unsafe fn encode(
2391 self,
2392 encoder: &mut fidl::encoding::Encoder<'_, D>,
2393 offset: usize,
2394 depth: fidl::encoding::Depth,
2395 ) -> fidl::Result<()> {
2396 encoder.debug_check_bounds::<DebugRecordAndReplayProfileRequest>(offset);
2397 unsafe {
2400 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2401 (ptr as *mut u64).write_unaligned(0);
2402 }
2403 self.0.encode(encoder, offset + 0, depth)?;
2405 self.1.encode(encoder, offset + 16, depth)?;
2406 self.2.encode(encoder, offset + 32, depth)?;
2407 Ok(())
2408 }
2409 }
2410
2411 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2412 for DebugRecordAndReplayProfileRequest
2413 {
2414 #[inline(always)]
2415 fn new_empty() -> Self {
2416 Self {
2417 volume: fidl::new_empty!(
2418 fidl::encoding::Optional<fidl::encoding::BoundedString<255>>,
2419 D
2420 ),
2421 profile: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2422 duration_secs: fidl::new_empty!(u32, D),
2423 }
2424 }
2425
2426 #[inline]
2427 unsafe fn decode(
2428 &mut self,
2429 decoder: &mut fidl::encoding::Decoder<'_, D>,
2430 offset: usize,
2431 _depth: fidl::encoding::Depth,
2432 ) -> fidl::Result<()> {
2433 decoder.debug_check_bounds::<Self>(offset);
2434 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2436 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2437 let mask = 0xffffffff00000000u64;
2438 let maskedval = padval & mask;
2439 if maskedval != 0 {
2440 return Err(fidl::Error::NonZeroPadding {
2441 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2442 });
2443 }
2444 fidl::decode!(
2445 fidl::encoding::Optional<fidl::encoding::BoundedString<255>>,
2446 D,
2447 &mut self.volume,
2448 decoder,
2449 offset + 0,
2450 _depth
2451 )?;
2452 fidl::decode!(
2453 fidl::encoding::BoundedString<255>,
2454 D,
2455 &mut self.profile,
2456 decoder,
2457 offset + 16,
2458 _depth
2459 )?;
2460 fidl::decode!(u32, D, &mut self.duration_secs, decoder, offset + 32, _depth)?;
2461 Ok(())
2462 }
2463 }
2464
2465 impl fidl::encoding::ValueTypeMarker for DebugReplayXorRecordProfileRequest {
2466 type Borrowed<'a> = &'a Self;
2467 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2468 value
2469 }
2470 }
2471
2472 unsafe impl fidl::encoding::TypeMarker for DebugReplayXorRecordProfileRequest {
2473 type Owned = Self;
2474
2475 #[inline(always)]
2476 fn inline_align(_context: fidl::encoding::Context) -> usize {
2477 8
2478 }
2479
2480 #[inline(always)]
2481 fn inline_size(_context: fidl::encoding::Context) -> usize {
2482 40
2483 }
2484 }
2485
2486 unsafe impl<D: fidl::encoding::ResourceDialect>
2487 fidl::encoding::Encode<DebugReplayXorRecordProfileRequest, D>
2488 for &DebugReplayXorRecordProfileRequest
2489 {
2490 #[inline]
2491 unsafe fn encode(
2492 self,
2493 encoder: &mut fidl::encoding::Encoder<'_, D>,
2494 offset: usize,
2495 _depth: fidl::encoding::Depth,
2496 ) -> fidl::Result<()> {
2497 encoder.debug_check_bounds::<DebugReplayXorRecordProfileRequest>(offset);
2498 fidl::encoding::Encode::<DebugReplayXorRecordProfileRequest, D>::encode(
2500 (
2501 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
2502 &self.volume,
2503 ),
2504 <ProfileIdentifier as fidl::encoding::ValueTypeMarker>::borrow(
2505 &self.identifier,
2506 ),
2507 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.duration_secs),
2508 ),
2509 encoder,
2510 offset,
2511 _depth,
2512 )
2513 }
2514 }
2515 unsafe impl<
2516 D: fidl::encoding::ResourceDialect,
2517 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
2518 T1: fidl::encoding::Encode<ProfileIdentifier, D>,
2519 T2: fidl::encoding::Encode<u32, D>,
2520 > fidl::encoding::Encode<DebugReplayXorRecordProfileRequest, D> for (T0, T1, T2)
2521 {
2522 #[inline]
2523 unsafe fn encode(
2524 self,
2525 encoder: &mut fidl::encoding::Encoder<'_, D>,
2526 offset: usize,
2527 depth: fidl::encoding::Depth,
2528 ) -> fidl::Result<()> {
2529 encoder.debug_check_bounds::<DebugReplayXorRecordProfileRequest>(offset);
2530 unsafe {
2533 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
2534 (ptr as *mut u64).write_unaligned(0);
2535 }
2536 self.0.encode(encoder, offset + 0, depth)?;
2538 self.1.encode(encoder, offset + 16, depth)?;
2539 self.2.encode(encoder, offset + 32, depth)?;
2540 Ok(())
2541 }
2542 }
2543
2544 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2545 for DebugReplayXorRecordProfileRequest
2546 {
2547 #[inline(always)]
2548 fn new_empty() -> Self {
2549 Self {
2550 volume: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
2551 identifier: fidl::new_empty!(ProfileIdentifier, D),
2552 duration_secs: fidl::new_empty!(u32, D),
2553 }
2554 }
2555
2556 #[inline]
2557 unsafe fn decode(
2558 &mut self,
2559 decoder: &mut fidl::encoding::Decoder<'_, D>,
2560 offset: usize,
2561 _depth: fidl::encoding::Depth,
2562 ) -> fidl::Result<()> {
2563 decoder.debug_check_bounds::<Self>(offset);
2564 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
2566 let padval = unsafe { (ptr as *const u64).read_unaligned() };
2567 let mask = 0xffffffff00000000u64;
2568 let maskedval = padval & mask;
2569 if maskedval != 0 {
2570 return Err(fidl::Error::NonZeroPadding {
2571 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
2572 });
2573 }
2574 fidl::decode!(
2575 fidl::encoding::BoundedString<255>,
2576 D,
2577 &mut self.volume,
2578 decoder,
2579 offset + 0,
2580 _depth
2581 )?;
2582 fidl::decode!(
2583 ProfileIdentifier,
2584 D,
2585 &mut self.identifier,
2586 decoder,
2587 offset + 16,
2588 _depth
2589 )?;
2590 fidl::decode!(u32, D, &mut self.duration_secs, decoder, offset + 32, _depth)?;
2591 Ok(())
2592 }
2593 }
2594
2595 impl fidl::encoding::ValueTypeMarker for EmptyStruct {
2596 type Borrowed<'a> = &'a Self;
2597 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2598 value
2599 }
2600 }
2601
2602 unsafe impl fidl::encoding::TypeMarker for EmptyStruct {
2603 type Owned = Self;
2604
2605 #[inline(always)]
2606 fn inline_align(_context: fidl::encoding::Context) -> usize {
2607 1
2608 }
2609
2610 #[inline(always)]
2611 fn inline_size(_context: fidl::encoding::Context) -> usize {
2612 1
2613 }
2614 }
2615
2616 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<EmptyStruct, D>
2617 for &EmptyStruct
2618 {
2619 #[inline]
2620 unsafe fn encode(
2621 self,
2622 encoder: &mut fidl::encoding::Encoder<'_, D>,
2623 offset: usize,
2624 _depth: fidl::encoding::Depth,
2625 ) -> fidl::Result<()> {
2626 encoder.debug_check_bounds::<EmptyStruct>(offset);
2627 encoder.write_num(0u8, offset);
2628 Ok(())
2629 }
2630 }
2631
2632 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for EmptyStruct {
2633 #[inline(always)]
2634 fn new_empty() -> Self {
2635 Self
2636 }
2637
2638 #[inline]
2639 unsafe fn decode(
2640 &mut self,
2641 decoder: &mut fidl::encoding::Decoder<'_, D>,
2642 offset: usize,
2643 _depth: fidl::encoding::Depth,
2644 ) -> fidl::Result<()> {
2645 decoder.debug_check_bounds::<Self>(offset);
2646 match decoder.read_num::<u8>(offset) {
2647 0 => Ok(()),
2648 _ => Err(fidl::Error::Invalid),
2649 }
2650 }
2651 }
2652
2653 impl fidl::encoding::ValueTypeMarker for FscryptKeyIdentifier {
2654 type Borrowed<'a> = &'a Self;
2655 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2656 value
2657 }
2658 }
2659
2660 unsafe impl fidl::encoding::TypeMarker for FscryptKeyIdentifier {
2661 type Owned = Self;
2662
2663 #[inline(always)]
2664 fn inline_align(_context: fidl::encoding::Context) -> usize {
2665 1
2666 }
2667
2668 #[inline(always)]
2669 fn inline_size(_context: fidl::encoding::Context) -> usize {
2670 16
2671 }
2672 #[inline(always)]
2673 fn encode_is_copy() -> bool {
2674 true
2675 }
2676
2677 #[inline(always)]
2678 fn decode_is_copy() -> bool {
2679 true
2680 }
2681 }
2682
2683 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FscryptKeyIdentifier, D>
2684 for &FscryptKeyIdentifier
2685 {
2686 #[inline]
2687 unsafe fn encode(
2688 self,
2689 encoder: &mut fidl::encoding::Encoder<'_, D>,
2690 offset: usize,
2691 _depth: fidl::encoding::Depth,
2692 ) -> fidl::Result<()> {
2693 encoder.debug_check_bounds::<FscryptKeyIdentifier>(offset);
2694 unsafe {
2695 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2697 (buf_ptr as *mut FscryptKeyIdentifier)
2698 .write_unaligned((self as *const FscryptKeyIdentifier).read());
2699 }
2702 Ok(())
2703 }
2704 }
2705 unsafe impl<
2706 D: fidl::encoding::ResourceDialect,
2707 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2708 > fidl::encoding::Encode<FscryptKeyIdentifier, D> for (T0,)
2709 {
2710 #[inline]
2711 unsafe fn encode(
2712 self,
2713 encoder: &mut fidl::encoding::Encoder<'_, D>,
2714 offset: usize,
2715 depth: fidl::encoding::Depth,
2716 ) -> fidl::Result<()> {
2717 encoder.debug_check_bounds::<FscryptKeyIdentifier>(offset);
2718 self.0.encode(encoder, offset + 0, depth)?;
2722 Ok(())
2723 }
2724 }
2725
2726 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FscryptKeyIdentifier {
2727 #[inline(always)]
2728 fn new_empty() -> Self {
2729 Self { key_identifier: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D) }
2730 }
2731
2732 #[inline]
2733 unsafe fn decode(
2734 &mut self,
2735 decoder: &mut fidl::encoding::Decoder<'_, D>,
2736 offset: usize,
2737 _depth: fidl::encoding::Depth,
2738 ) -> fidl::Result<()> {
2739 decoder.debug_check_bounds::<Self>(offset);
2740 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2741 unsafe {
2744 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
2745 }
2746 Ok(())
2747 }
2748 }
2749
2750 impl fidl::encoding::ValueTypeMarker for FscryptKeyIdentifierAndNonce {
2751 type Borrowed<'a> = &'a Self;
2752 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2753 value
2754 }
2755 }
2756
2757 unsafe impl fidl::encoding::TypeMarker for FscryptKeyIdentifierAndNonce {
2758 type Owned = Self;
2759
2760 #[inline(always)]
2761 fn inline_align(_context: fidl::encoding::Context) -> usize {
2762 1
2763 }
2764
2765 #[inline(always)]
2766 fn inline_size(_context: fidl::encoding::Context) -> usize {
2767 32
2768 }
2769 #[inline(always)]
2770 fn encode_is_copy() -> bool {
2771 true
2772 }
2773
2774 #[inline(always)]
2775 fn decode_is_copy() -> bool {
2776 true
2777 }
2778 }
2779
2780 unsafe impl<D: fidl::encoding::ResourceDialect>
2781 fidl::encoding::Encode<FscryptKeyIdentifierAndNonce, D> for &FscryptKeyIdentifierAndNonce
2782 {
2783 #[inline]
2784 unsafe fn encode(
2785 self,
2786 encoder: &mut fidl::encoding::Encoder<'_, D>,
2787 offset: usize,
2788 _depth: fidl::encoding::Depth,
2789 ) -> fidl::Result<()> {
2790 encoder.debug_check_bounds::<FscryptKeyIdentifierAndNonce>(offset);
2791 unsafe {
2792 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2794 (buf_ptr as *mut FscryptKeyIdentifierAndNonce)
2795 .write_unaligned((self as *const FscryptKeyIdentifierAndNonce).read());
2796 }
2799 Ok(())
2800 }
2801 }
2802 unsafe impl<
2803 D: fidl::encoding::ResourceDialect,
2804 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2805 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2806 > fidl::encoding::Encode<FscryptKeyIdentifierAndNonce, D> for (T0, T1)
2807 {
2808 #[inline]
2809 unsafe fn encode(
2810 self,
2811 encoder: &mut fidl::encoding::Encoder<'_, D>,
2812 offset: usize,
2813 depth: fidl::encoding::Depth,
2814 ) -> fidl::Result<()> {
2815 encoder.debug_check_bounds::<FscryptKeyIdentifierAndNonce>(offset);
2816 self.0.encode(encoder, offset + 0, depth)?;
2820 self.1.encode(encoder, offset + 16, depth)?;
2821 Ok(())
2822 }
2823 }
2824
2825 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2826 for FscryptKeyIdentifierAndNonce
2827 {
2828 #[inline(always)]
2829 fn new_empty() -> Self {
2830 Self {
2831 key_identifier: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2832 nonce: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2833 }
2834 }
2835
2836 #[inline]
2837 unsafe fn decode(
2838 &mut self,
2839 decoder: &mut fidl::encoding::Decoder<'_, D>,
2840 offset: usize,
2841 _depth: fidl::encoding::Depth,
2842 ) -> fidl::Result<()> {
2843 decoder.debug_check_bounds::<Self>(offset);
2844 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2845 unsafe {
2848 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2849 }
2850 Ok(())
2851 }
2852 }
2853
2854 impl fidl::encoding::ValueTypeMarker for FxfsKey {
2855 type Borrowed<'a> = &'a Self;
2856 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2857 value
2858 }
2859 }
2860
2861 unsafe impl fidl::encoding::TypeMarker for FxfsKey {
2862 type Owned = Self;
2863
2864 #[inline(always)]
2865 fn inline_align(_context: fidl::encoding::Context) -> usize {
2866 1
2867 }
2868
2869 #[inline(always)]
2870 fn inline_size(_context: fidl::encoding::Context) -> usize {
2871 64
2872 }
2873 #[inline(always)]
2874 fn encode_is_copy() -> bool {
2875 true
2876 }
2877
2878 #[inline(always)]
2879 fn decode_is_copy() -> bool {
2880 true
2881 }
2882 }
2883
2884 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<FxfsKey, D> for &FxfsKey {
2885 #[inline]
2886 unsafe fn encode(
2887 self,
2888 encoder: &mut fidl::encoding::Encoder<'_, D>,
2889 offset: usize,
2890 _depth: fidl::encoding::Depth,
2891 ) -> fidl::Result<()> {
2892 encoder.debug_check_bounds::<FxfsKey>(offset);
2893 unsafe {
2894 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2896 (buf_ptr as *mut FxfsKey).write_unaligned((self as *const FxfsKey).read());
2897 }
2900 Ok(())
2901 }
2902 }
2903 unsafe impl<
2904 D: fidl::encoding::ResourceDialect,
2905 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 16>, D>,
2906 T1: fidl::encoding::Encode<fidl::encoding::Array<u8, 48>, D>,
2907 > fidl::encoding::Encode<FxfsKey, D> for (T0, T1)
2908 {
2909 #[inline]
2910 unsafe fn encode(
2911 self,
2912 encoder: &mut fidl::encoding::Encoder<'_, D>,
2913 offset: usize,
2914 depth: fidl::encoding::Depth,
2915 ) -> fidl::Result<()> {
2916 encoder.debug_check_bounds::<FxfsKey>(offset);
2917 self.0.encode(encoder, offset + 0, depth)?;
2921 self.1.encode(encoder, offset + 16, depth)?;
2922 Ok(())
2923 }
2924 }
2925
2926 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for FxfsKey {
2927 #[inline(always)]
2928 fn new_empty() -> Self {
2929 Self {
2930 wrapping_key_id: fidl::new_empty!(fidl::encoding::Array<u8, 16>, D),
2931 wrapped_key: fidl::new_empty!(fidl::encoding::Array<u8, 48>, D),
2932 }
2933 }
2934
2935 #[inline]
2936 unsafe fn decode(
2937 &mut self,
2938 decoder: &mut fidl::encoding::Decoder<'_, D>,
2939 offset: usize,
2940 _depth: fidl::encoding::Depth,
2941 ) -> fidl::Result<()> {
2942 decoder.debug_check_bounds::<Self>(offset);
2943 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2944 unsafe {
2947 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 64);
2948 }
2949 Ok(())
2950 }
2951 }
2952
2953 impl fidl::encoding::ValueTypeMarker for ProjectIdClearForNodeRequest {
2954 type Borrowed<'a> = &'a Self;
2955 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2956 value
2957 }
2958 }
2959
2960 unsafe impl fidl::encoding::TypeMarker for ProjectIdClearForNodeRequest {
2961 type Owned = Self;
2962
2963 #[inline(always)]
2964 fn inline_align(_context: fidl::encoding::Context) -> usize {
2965 8
2966 }
2967
2968 #[inline(always)]
2969 fn inline_size(_context: fidl::encoding::Context) -> usize {
2970 8
2971 }
2972 #[inline(always)]
2973 fn encode_is_copy() -> bool {
2974 true
2975 }
2976
2977 #[inline(always)]
2978 fn decode_is_copy() -> bool {
2979 true
2980 }
2981 }
2982
2983 unsafe impl<D: fidl::encoding::ResourceDialect>
2984 fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for &ProjectIdClearForNodeRequest
2985 {
2986 #[inline]
2987 unsafe fn encode(
2988 self,
2989 encoder: &mut fidl::encoding::Encoder<'_, D>,
2990 offset: usize,
2991 _depth: fidl::encoding::Depth,
2992 ) -> fidl::Result<()> {
2993 encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
2994 unsafe {
2995 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2997 (buf_ptr as *mut ProjectIdClearForNodeRequest)
2998 .write_unaligned((self as *const ProjectIdClearForNodeRequest).read());
2999 }
3002 Ok(())
3003 }
3004 }
3005 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3006 fidl::encoding::Encode<ProjectIdClearForNodeRequest, D> for (T0,)
3007 {
3008 #[inline]
3009 unsafe fn encode(
3010 self,
3011 encoder: &mut fidl::encoding::Encoder<'_, D>,
3012 offset: usize,
3013 depth: fidl::encoding::Depth,
3014 ) -> fidl::Result<()> {
3015 encoder.debug_check_bounds::<ProjectIdClearForNodeRequest>(offset);
3016 self.0.encode(encoder, offset + 0, depth)?;
3020 Ok(())
3021 }
3022 }
3023
3024 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3025 for ProjectIdClearForNodeRequest
3026 {
3027 #[inline(always)]
3028 fn new_empty() -> Self {
3029 Self { node_id: fidl::new_empty!(u64, D) }
3030 }
3031
3032 #[inline]
3033 unsafe fn decode(
3034 &mut self,
3035 decoder: &mut fidl::encoding::Decoder<'_, D>,
3036 offset: usize,
3037 _depth: fidl::encoding::Depth,
3038 ) -> fidl::Result<()> {
3039 decoder.debug_check_bounds::<Self>(offset);
3040 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3041 unsafe {
3044 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3045 }
3046 Ok(())
3047 }
3048 }
3049
3050 impl fidl::encoding::ValueTypeMarker for ProjectIdClearRequest {
3051 type Borrowed<'a> = &'a Self;
3052 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3053 value
3054 }
3055 }
3056
3057 unsafe impl fidl::encoding::TypeMarker for ProjectIdClearRequest {
3058 type Owned = Self;
3059
3060 #[inline(always)]
3061 fn inline_align(_context: fidl::encoding::Context) -> usize {
3062 8
3063 }
3064
3065 #[inline(always)]
3066 fn inline_size(_context: fidl::encoding::Context) -> usize {
3067 8
3068 }
3069 #[inline(always)]
3070 fn encode_is_copy() -> bool {
3071 true
3072 }
3073
3074 #[inline(always)]
3075 fn decode_is_copy() -> bool {
3076 true
3077 }
3078 }
3079
3080 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdClearRequest, D>
3081 for &ProjectIdClearRequest
3082 {
3083 #[inline]
3084 unsafe fn encode(
3085 self,
3086 encoder: &mut fidl::encoding::Encoder<'_, D>,
3087 offset: usize,
3088 _depth: fidl::encoding::Depth,
3089 ) -> fidl::Result<()> {
3090 encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
3091 unsafe {
3092 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3094 (buf_ptr as *mut ProjectIdClearRequest)
3095 .write_unaligned((self as *const ProjectIdClearRequest).read());
3096 }
3099 Ok(())
3100 }
3101 }
3102 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3103 fidl::encoding::Encode<ProjectIdClearRequest, D> for (T0,)
3104 {
3105 #[inline]
3106 unsafe fn encode(
3107 self,
3108 encoder: &mut fidl::encoding::Encoder<'_, D>,
3109 offset: usize,
3110 depth: fidl::encoding::Depth,
3111 ) -> fidl::Result<()> {
3112 encoder.debug_check_bounds::<ProjectIdClearRequest>(offset);
3113 self.0.encode(encoder, offset + 0, depth)?;
3117 Ok(())
3118 }
3119 }
3120
3121 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdClearRequest {
3122 #[inline(always)]
3123 fn new_empty() -> Self {
3124 Self { project_id: fidl::new_empty!(u64, D) }
3125 }
3126
3127 #[inline]
3128 unsafe fn decode(
3129 &mut self,
3130 decoder: &mut fidl::encoding::Decoder<'_, D>,
3131 offset: usize,
3132 _depth: fidl::encoding::Depth,
3133 ) -> fidl::Result<()> {
3134 decoder.debug_check_bounds::<Self>(offset);
3135 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3136 unsafe {
3139 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3140 }
3141 Ok(())
3142 }
3143 }
3144
3145 impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeRequest {
3146 type Borrowed<'a> = &'a Self;
3147 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3148 value
3149 }
3150 }
3151
3152 unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeRequest {
3153 type Owned = Self;
3154
3155 #[inline(always)]
3156 fn inline_align(_context: fidl::encoding::Context) -> usize {
3157 8
3158 }
3159
3160 #[inline(always)]
3161 fn inline_size(_context: fidl::encoding::Context) -> usize {
3162 8
3163 }
3164 #[inline(always)]
3165 fn encode_is_copy() -> bool {
3166 true
3167 }
3168
3169 #[inline(always)]
3170 fn decode_is_copy() -> bool {
3171 true
3172 }
3173 }
3174
3175 unsafe impl<D: fidl::encoding::ResourceDialect>
3176 fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for &ProjectIdGetForNodeRequest
3177 {
3178 #[inline]
3179 unsafe fn encode(
3180 self,
3181 encoder: &mut fidl::encoding::Encoder<'_, D>,
3182 offset: usize,
3183 _depth: fidl::encoding::Depth,
3184 ) -> fidl::Result<()> {
3185 encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
3186 unsafe {
3187 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3189 (buf_ptr as *mut ProjectIdGetForNodeRequest)
3190 .write_unaligned((self as *const ProjectIdGetForNodeRequest).read());
3191 }
3194 Ok(())
3195 }
3196 }
3197 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3198 fidl::encoding::Encode<ProjectIdGetForNodeRequest, D> for (T0,)
3199 {
3200 #[inline]
3201 unsafe fn encode(
3202 self,
3203 encoder: &mut fidl::encoding::Encoder<'_, D>,
3204 offset: usize,
3205 depth: fidl::encoding::Depth,
3206 ) -> fidl::Result<()> {
3207 encoder.debug_check_bounds::<ProjectIdGetForNodeRequest>(offset);
3208 self.0.encode(encoder, offset + 0, depth)?;
3212 Ok(())
3213 }
3214 }
3215
3216 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3217 for ProjectIdGetForNodeRequest
3218 {
3219 #[inline(always)]
3220 fn new_empty() -> Self {
3221 Self { node_id: fidl::new_empty!(u64, D) }
3222 }
3223
3224 #[inline]
3225 unsafe fn decode(
3226 &mut self,
3227 decoder: &mut fidl::encoding::Decoder<'_, D>,
3228 offset: usize,
3229 _depth: fidl::encoding::Depth,
3230 ) -> fidl::Result<()> {
3231 decoder.debug_check_bounds::<Self>(offset);
3232 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3233 unsafe {
3236 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3237 }
3238 Ok(())
3239 }
3240 }
3241
3242 impl fidl::encoding::ValueTypeMarker for ProjectIdInfoRequest {
3243 type Borrowed<'a> = &'a Self;
3244 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3245 value
3246 }
3247 }
3248
3249 unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoRequest {
3250 type Owned = Self;
3251
3252 #[inline(always)]
3253 fn inline_align(_context: fidl::encoding::Context) -> usize {
3254 8
3255 }
3256
3257 #[inline(always)]
3258 fn inline_size(_context: fidl::encoding::Context) -> usize {
3259 8
3260 }
3261 #[inline(always)]
3262 fn encode_is_copy() -> bool {
3263 true
3264 }
3265
3266 #[inline(always)]
3267 fn decode_is_copy() -> bool {
3268 true
3269 }
3270 }
3271
3272 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoRequest, D>
3273 for &ProjectIdInfoRequest
3274 {
3275 #[inline]
3276 unsafe fn encode(
3277 self,
3278 encoder: &mut fidl::encoding::Encoder<'_, D>,
3279 offset: usize,
3280 _depth: fidl::encoding::Depth,
3281 ) -> fidl::Result<()> {
3282 encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
3283 unsafe {
3284 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3286 (buf_ptr as *mut ProjectIdInfoRequest)
3287 .write_unaligned((self as *const ProjectIdInfoRequest).read());
3288 }
3291 Ok(())
3292 }
3293 }
3294 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3295 fidl::encoding::Encode<ProjectIdInfoRequest, D> for (T0,)
3296 {
3297 #[inline]
3298 unsafe fn encode(
3299 self,
3300 encoder: &mut fidl::encoding::Encoder<'_, D>,
3301 offset: usize,
3302 depth: fidl::encoding::Depth,
3303 ) -> fidl::Result<()> {
3304 encoder.debug_check_bounds::<ProjectIdInfoRequest>(offset);
3305 self.0.encode(encoder, offset + 0, depth)?;
3309 Ok(())
3310 }
3311 }
3312
3313 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoRequest {
3314 #[inline(always)]
3315 fn new_empty() -> Self {
3316 Self { project_id: fidl::new_empty!(u64, D) }
3317 }
3318
3319 #[inline]
3320 unsafe fn decode(
3321 &mut self,
3322 decoder: &mut fidl::encoding::Decoder<'_, D>,
3323 offset: usize,
3324 _depth: fidl::encoding::Depth,
3325 ) -> fidl::Result<()> {
3326 decoder.debug_check_bounds::<Self>(offset);
3327 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3328 unsafe {
3331 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3332 }
3333 Ok(())
3334 }
3335 }
3336
3337 impl fidl::encoding::ValueTypeMarker for ProjectIdListRequest {
3338 type Borrowed<'a> = &'a Self;
3339 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3340 value
3341 }
3342 }
3343
3344 unsafe impl fidl::encoding::TypeMarker for ProjectIdListRequest {
3345 type Owned = Self;
3346
3347 #[inline(always)]
3348 fn inline_align(_context: fidl::encoding::Context) -> usize {
3349 8
3350 }
3351
3352 #[inline(always)]
3353 fn inline_size(_context: fidl::encoding::Context) -> usize {
3354 8
3355 }
3356 }
3357
3358 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListRequest, D>
3359 for &ProjectIdListRequest
3360 {
3361 #[inline]
3362 unsafe fn encode(
3363 self,
3364 encoder: &mut fidl::encoding::Encoder<'_, D>,
3365 offset: usize,
3366 _depth: fidl::encoding::Depth,
3367 ) -> fidl::Result<()> {
3368 encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
3369 fidl::encoding::Encode::<ProjectIdListRequest, D>::encode(
3371 (
3372 <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.token),
3373 ),
3374 encoder, offset, _depth
3375 )
3376 }
3377 }
3378 unsafe impl<
3379 D: fidl::encoding::ResourceDialect,
3380 T0: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
3381 > fidl::encoding::Encode<ProjectIdListRequest, D> for (T0,)
3382 {
3383 #[inline]
3384 unsafe fn encode(
3385 self,
3386 encoder: &mut fidl::encoding::Encoder<'_, D>,
3387 offset: usize,
3388 depth: fidl::encoding::Depth,
3389 ) -> fidl::Result<()> {
3390 encoder.debug_check_bounds::<ProjectIdListRequest>(offset);
3391 self.0.encode(encoder, offset + 0, depth)?;
3395 Ok(())
3396 }
3397 }
3398
3399 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListRequest {
3400 #[inline(always)]
3401 fn new_empty() -> Self {
3402 Self { token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D) }
3403 }
3404
3405 #[inline]
3406 unsafe fn decode(
3407 &mut self,
3408 decoder: &mut fidl::encoding::Decoder<'_, D>,
3409 offset: usize,
3410 _depth: fidl::encoding::Depth,
3411 ) -> fidl::Result<()> {
3412 decoder.debug_check_bounds::<Self>(offset);
3413 fidl::decode!(
3415 fidl::encoding::Boxed<ProjectIterToken>,
3416 D,
3417 &mut self.token,
3418 decoder,
3419 offset + 0,
3420 _depth
3421 )?;
3422 Ok(())
3423 }
3424 }
3425
3426 impl fidl::encoding::ValueTypeMarker for ProjectIdSetForNodeRequest {
3427 type Borrowed<'a> = &'a Self;
3428 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3429 value
3430 }
3431 }
3432
3433 unsafe impl fidl::encoding::TypeMarker for ProjectIdSetForNodeRequest {
3434 type Owned = Self;
3435
3436 #[inline(always)]
3437 fn inline_align(_context: fidl::encoding::Context) -> usize {
3438 8
3439 }
3440
3441 #[inline(always)]
3442 fn inline_size(_context: fidl::encoding::Context) -> usize {
3443 16
3444 }
3445 #[inline(always)]
3446 fn encode_is_copy() -> bool {
3447 true
3448 }
3449
3450 #[inline(always)]
3451 fn decode_is_copy() -> bool {
3452 true
3453 }
3454 }
3455
3456 unsafe impl<D: fidl::encoding::ResourceDialect>
3457 fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for &ProjectIdSetForNodeRequest
3458 {
3459 #[inline]
3460 unsafe fn encode(
3461 self,
3462 encoder: &mut fidl::encoding::Encoder<'_, D>,
3463 offset: usize,
3464 _depth: fidl::encoding::Depth,
3465 ) -> fidl::Result<()> {
3466 encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
3467 unsafe {
3468 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3470 (buf_ptr as *mut ProjectIdSetForNodeRequest)
3471 .write_unaligned((self as *const ProjectIdSetForNodeRequest).read());
3472 }
3475 Ok(())
3476 }
3477 }
3478 unsafe impl<
3479 D: fidl::encoding::ResourceDialect,
3480 T0: fidl::encoding::Encode<u64, D>,
3481 T1: fidl::encoding::Encode<u64, D>,
3482 > fidl::encoding::Encode<ProjectIdSetForNodeRequest, D> for (T0, T1)
3483 {
3484 #[inline]
3485 unsafe fn encode(
3486 self,
3487 encoder: &mut fidl::encoding::Encoder<'_, D>,
3488 offset: usize,
3489 depth: fidl::encoding::Depth,
3490 ) -> fidl::Result<()> {
3491 encoder.debug_check_bounds::<ProjectIdSetForNodeRequest>(offset);
3492 self.0.encode(encoder, offset + 0, depth)?;
3496 self.1.encode(encoder, offset + 8, depth)?;
3497 Ok(())
3498 }
3499 }
3500
3501 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3502 for ProjectIdSetForNodeRequest
3503 {
3504 #[inline(always)]
3505 fn new_empty() -> Self {
3506 Self { node_id: fidl::new_empty!(u64, D), project_id: fidl::new_empty!(u64, D) }
3507 }
3508
3509 #[inline]
3510 unsafe fn decode(
3511 &mut self,
3512 decoder: &mut fidl::encoding::Decoder<'_, D>,
3513 offset: usize,
3514 _depth: fidl::encoding::Depth,
3515 ) -> fidl::Result<()> {
3516 decoder.debug_check_bounds::<Self>(offset);
3517 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3518 unsafe {
3521 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 16);
3522 }
3523 Ok(())
3524 }
3525 }
3526
3527 impl fidl::encoding::ValueTypeMarker for ProjectIdSetLimitRequest {
3528 type Borrowed<'a> = &'a Self;
3529 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3530 value
3531 }
3532 }
3533
3534 unsafe impl fidl::encoding::TypeMarker for ProjectIdSetLimitRequest {
3535 type Owned = Self;
3536
3537 #[inline(always)]
3538 fn inline_align(_context: fidl::encoding::Context) -> usize {
3539 8
3540 }
3541
3542 #[inline(always)]
3543 fn inline_size(_context: fidl::encoding::Context) -> usize {
3544 24
3545 }
3546 #[inline(always)]
3547 fn encode_is_copy() -> bool {
3548 true
3549 }
3550
3551 #[inline(always)]
3552 fn decode_is_copy() -> bool {
3553 true
3554 }
3555 }
3556
3557 unsafe impl<D: fidl::encoding::ResourceDialect>
3558 fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for &ProjectIdSetLimitRequest
3559 {
3560 #[inline]
3561 unsafe fn encode(
3562 self,
3563 encoder: &mut fidl::encoding::Encoder<'_, D>,
3564 offset: usize,
3565 _depth: fidl::encoding::Depth,
3566 ) -> fidl::Result<()> {
3567 encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
3568 unsafe {
3569 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3571 (buf_ptr as *mut ProjectIdSetLimitRequest)
3572 .write_unaligned((self as *const ProjectIdSetLimitRequest).read());
3573 }
3576 Ok(())
3577 }
3578 }
3579 unsafe impl<
3580 D: fidl::encoding::ResourceDialect,
3581 T0: fidl::encoding::Encode<u64, D>,
3582 T1: fidl::encoding::Encode<u64, D>,
3583 T2: fidl::encoding::Encode<u64, D>,
3584 > fidl::encoding::Encode<ProjectIdSetLimitRequest, D> for (T0, T1, T2)
3585 {
3586 #[inline]
3587 unsafe fn encode(
3588 self,
3589 encoder: &mut fidl::encoding::Encoder<'_, D>,
3590 offset: usize,
3591 depth: fidl::encoding::Depth,
3592 ) -> fidl::Result<()> {
3593 encoder.debug_check_bounds::<ProjectIdSetLimitRequest>(offset);
3594 self.0.encode(encoder, offset + 0, depth)?;
3598 self.1.encode(encoder, offset + 8, depth)?;
3599 self.2.encode(encoder, offset + 16, depth)?;
3600 Ok(())
3601 }
3602 }
3603
3604 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3605 for ProjectIdSetLimitRequest
3606 {
3607 #[inline(always)]
3608 fn new_empty() -> Self {
3609 Self {
3610 project_id: fidl::new_empty!(u64, D),
3611 bytes: fidl::new_empty!(u64, D),
3612 nodes: fidl::new_empty!(u64, D),
3613 }
3614 }
3615
3616 #[inline]
3617 unsafe fn decode(
3618 &mut self,
3619 decoder: &mut fidl::encoding::Decoder<'_, D>,
3620 offset: usize,
3621 _depth: fidl::encoding::Depth,
3622 ) -> fidl::Result<()> {
3623 decoder.debug_check_bounds::<Self>(offset);
3624 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3625 unsafe {
3628 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 24);
3629 }
3630 Ok(())
3631 }
3632 }
3633
3634 impl fidl::encoding::ValueTypeMarker for ProjectIdGetForNodeResponse {
3635 type Borrowed<'a> = &'a Self;
3636 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3637 value
3638 }
3639 }
3640
3641 unsafe impl fidl::encoding::TypeMarker for ProjectIdGetForNodeResponse {
3642 type Owned = Self;
3643
3644 #[inline(always)]
3645 fn inline_align(_context: fidl::encoding::Context) -> usize {
3646 8
3647 }
3648
3649 #[inline(always)]
3650 fn inline_size(_context: fidl::encoding::Context) -> usize {
3651 8
3652 }
3653 #[inline(always)]
3654 fn encode_is_copy() -> bool {
3655 true
3656 }
3657
3658 #[inline(always)]
3659 fn decode_is_copy() -> bool {
3660 true
3661 }
3662 }
3663
3664 unsafe impl<D: fidl::encoding::ResourceDialect>
3665 fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for &ProjectIdGetForNodeResponse
3666 {
3667 #[inline]
3668 unsafe fn encode(
3669 self,
3670 encoder: &mut fidl::encoding::Encoder<'_, D>,
3671 offset: usize,
3672 _depth: fidl::encoding::Depth,
3673 ) -> fidl::Result<()> {
3674 encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
3675 unsafe {
3676 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3678 (buf_ptr as *mut ProjectIdGetForNodeResponse)
3679 .write_unaligned((self as *const ProjectIdGetForNodeResponse).read());
3680 }
3683 Ok(())
3684 }
3685 }
3686 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3687 fidl::encoding::Encode<ProjectIdGetForNodeResponse, D> for (T0,)
3688 {
3689 #[inline]
3690 unsafe fn encode(
3691 self,
3692 encoder: &mut fidl::encoding::Encoder<'_, D>,
3693 offset: usize,
3694 depth: fidl::encoding::Depth,
3695 ) -> fidl::Result<()> {
3696 encoder.debug_check_bounds::<ProjectIdGetForNodeResponse>(offset);
3697 self.0.encode(encoder, offset + 0, depth)?;
3701 Ok(())
3702 }
3703 }
3704
3705 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3706 for ProjectIdGetForNodeResponse
3707 {
3708 #[inline(always)]
3709 fn new_empty() -> Self {
3710 Self { project_id: fidl::new_empty!(u64, D) }
3711 }
3712
3713 #[inline]
3714 unsafe fn decode(
3715 &mut self,
3716 decoder: &mut fidl::encoding::Decoder<'_, D>,
3717 offset: usize,
3718 _depth: fidl::encoding::Depth,
3719 ) -> fidl::Result<()> {
3720 decoder.debug_check_bounds::<Self>(offset);
3721 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3722 unsafe {
3725 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
3726 }
3727 Ok(())
3728 }
3729 }
3730
3731 impl fidl::encoding::ValueTypeMarker for ProjectIdInfoResponse {
3732 type Borrowed<'a> = &'a Self;
3733 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3734 value
3735 }
3736 }
3737
3738 unsafe impl fidl::encoding::TypeMarker for ProjectIdInfoResponse {
3739 type Owned = Self;
3740
3741 #[inline(always)]
3742 fn inline_align(_context: fidl::encoding::Context) -> usize {
3743 8
3744 }
3745
3746 #[inline(always)]
3747 fn inline_size(_context: fidl::encoding::Context) -> usize {
3748 32
3749 }
3750 #[inline(always)]
3751 fn encode_is_copy() -> bool {
3752 true
3753 }
3754
3755 #[inline(always)]
3756 fn decode_is_copy() -> bool {
3757 true
3758 }
3759 }
3760
3761 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdInfoResponse, D>
3762 for &ProjectIdInfoResponse
3763 {
3764 #[inline]
3765 unsafe fn encode(
3766 self,
3767 encoder: &mut fidl::encoding::Encoder<'_, D>,
3768 offset: usize,
3769 _depth: fidl::encoding::Depth,
3770 ) -> fidl::Result<()> {
3771 encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
3772 unsafe {
3773 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3775 (buf_ptr as *mut ProjectIdInfoResponse)
3776 .write_unaligned((self as *const ProjectIdInfoResponse).read());
3777 }
3780 Ok(())
3781 }
3782 }
3783 unsafe impl<
3784 D: fidl::encoding::ResourceDialect,
3785 T0: fidl::encoding::Encode<BytesAndNodes, D>,
3786 T1: fidl::encoding::Encode<BytesAndNodes, D>,
3787 > fidl::encoding::Encode<ProjectIdInfoResponse, D> for (T0, T1)
3788 {
3789 #[inline]
3790 unsafe fn encode(
3791 self,
3792 encoder: &mut fidl::encoding::Encoder<'_, D>,
3793 offset: usize,
3794 depth: fidl::encoding::Depth,
3795 ) -> fidl::Result<()> {
3796 encoder.debug_check_bounds::<ProjectIdInfoResponse>(offset);
3797 self.0.encode(encoder, offset + 0, depth)?;
3801 self.1.encode(encoder, offset + 16, depth)?;
3802 Ok(())
3803 }
3804 }
3805
3806 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdInfoResponse {
3807 #[inline(always)]
3808 fn new_empty() -> Self {
3809 Self {
3810 limit: fidl::new_empty!(BytesAndNodes, D),
3811 usage: fidl::new_empty!(BytesAndNodes, D),
3812 }
3813 }
3814
3815 #[inline]
3816 unsafe fn decode(
3817 &mut self,
3818 decoder: &mut fidl::encoding::Decoder<'_, D>,
3819 offset: usize,
3820 _depth: fidl::encoding::Depth,
3821 ) -> fidl::Result<()> {
3822 decoder.debug_check_bounds::<Self>(offset);
3823 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
3824 unsafe {
3827 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
3828 }
3829 Ok(())
3830 }
3831 }
3832
3833 impl fidl::encoding::ValueTypeMarker for ProjectIdListResponse {
3834 type Borrowed<'a> = &'a Self;
3835 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3836 value
3837 }
3838 }
3839
3840 unsafe impl fidl::encoding::TypeMarker for ProjectIdListResponse {
3841 type Owned = Self;
3842
3843 #[inline(always)]
3844 fn inline_align(_context: fidl::encoding::Context) -> usize {
3845 8
3846 }
3847
3848 #[inline(always)]
3849 fn inline_size(_context: fidl::encoding::Context) -> usize {
3850 24
3851 }
3852 }
3853
3854 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIdListResponse, D>
3855 for &ProjectIdListResponse
3856 {
3857 #[inline]
3858 unsafe fn encode(
3859 self,
3860 encoder: &mut fidl::encoding::Encoder<'_, D>,
3861 offset: usize,
3862 _depth: fidl::encoding::Depth,
3863 ) -> fidl::Result<()> {
3864 encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
3865 fidl::encoding::Encode::<ProjectIdListResponse, D>::encode(
3867 (
3868 <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.entries),
3869 <fidl::encoding::Boxed<ProjectIterToken> as fidl::encoding::ValueTypeMarker>::borrow(&self.next_token),
3870 ),
3871 encoder, offset, _depth
3872 )
3873 }
3874 }
3875 unsafe impl<
3876 D: fidl::encoding::ResourceDialect,
3877 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
3878 T1: fidl::encoding::Encode<fidl::encoding::Boxed<ProjectIterToken>, D>,
3879 > fidl::encoding::Encode<ProjectIdListResponse, D> for (T0, T1)
3880 {
3881 #[inline]
3882 unsafe fn encode(
3883 self,
3884 encoder: &mut fidl::encoding::Encoder<'_, D>,
3885 offset: usize,
3886 depth: fidl::encoding::Depth,
3887 ) -> fidl::Result<()> {
3888 encoder.debug_check_bounds::<ProjectIdListResponse>(offset);
3889 self.0.encode(encoder, offset + 0, depth)?;
3893 self.1.encode(encoder, offset + 16, depth)?;
3894 Ok(())
3895 }
3896 }
3897
3898 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIdListResponse {
3899 #[inline(always)]
3900 fn new_empty() -> Self {
3901 Self {
3902 entries: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D),
3903 next_token: fidl::new_empty!(fidl::encoding::Boxed<ProjectIterToken>, D),
3904 }
3905 }
3906
3907 #[inline]
3908 unsafe fn decode(
3909 &mut self,
3910 decoder: &mut fidl::encoding::Decoder<'_, D>,
3911 offset: usize,
3912 _depth: fidl::encoding::Depth,
3913 ) -> fidl::Result<()> {
3914 decoder.debug_check_bounds::<Self>(offset);
3915 fidl::decode!(
3917 fidl::encoding::UnboundedVector<u64>,
3918 D,
3919 &mut self.entries,
3920 decoder,
3921 offset + 0,
3922 _depth
3923 )?;
3924 fidl::decode!(
3925 fidl::encoding::Boxed<ProjectIterToken>,
3926 D,
3927 &mut self.next_token,
3928 decoder,
3929 offset + 16,
3930 _depth
3931 )?;
3932 Ok(())
3933 }
3934 }
3935
3936 impl fidl::encoding::ValueTypeMarker for ProjectIterToken {
3937 type Borrowed<'a> = &'a Self;
3938 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3939 value
3940 }
3941 }
3942
3943 unsafe impl fidl::encoding::TypeMarker for ProjectIterToken {
3944 type Owned = Self;
3945
3946 #[inline(always)]
3947 fn inline_align(_context: fidl::encoding::Context) -> usize {
3948 8
3949 }
3950
3951 #[inline(always)]
3952 fn inline_size(_context: fidl::encoding::Context) -> usize {
3953 8
3954 }
3955 #[inline(always)]
3956 fn encode_is_copy() -> bool {
3957 true
3958 }
3959
3960 #[inline(always)]
3961 fn decode_is_copy() -> bool {
3962 true
3963 }
3964 }
3965
3966 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProjectIterToken, D>
3967 for &ProjectIterToken
3968 {
3969 #[inline]
3970 unsafe fn encode(
3971 self,
3972 encoder: &mut fidl::encoding::Encoder<'_, D>,
3973 offset: usize,
3974 _depth: fidl::encoding::Depth,
3975 ) -> fidl::Result<()> {
3976 encoder.debug_check_bounds::<ProjectIterToken>(offset);
3977 unsafe {
3978 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
3980 (buf_ptr as *mut ProjectIterToken)
3981 .write_unaligned((self as *const ProjectIterToken).read());
3982 }
3985 Ok(())
3986 }
3987 }
3988 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u64, D>>
3989 fidl::encoding::Encode<ProjectIterToken, D> for (T0,)
3990 {
3991 #[inline]
3992 unsafe fn encode(
3993 self,
3994 encoder: &mut fidl::encoding::Encoder<'_, D>,
3995 offset: usize,
3996 depth: fidl::encoding::Depth,
3997 ) -> fidl::Result<()> {
3998 encoder.debug_check_bounds::<ProjectIterToken>(offset);
3999 self.0.encode(encoder, offset + 0, depth)?;
4003 Ok(())
4004 }
4005 }
4006
4007 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProjectIterToken {
4008 #[inline(always)]
4009 fn new_empty() -> Self {
4010 Self { value: fidl::new_empty!(u64, D) }
4011 }
4012
4013 #[inline]
4014 unsafe fn decode(
4015 &mut self,
4016 decoder: &mut fidl::encoding::Decoder<'_, D>,
4017 offset: usize,
4018 _depth: fidl::encoding::Depth,
4019 ) -> fidl::Result<()> {
4020 decoder.debug_check_bounds::<Self>(offset);
4021 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
4022 unsafe {
4025 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
4026 }
4027 Ok(())
4028 }
4029 }
4030
4031 impl fidl::encoding::ValueTypeMarker for VolumeInstallerInstallRequest {
4032 type Borrowed<'a> = &'a Self;
4033 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4034 value
4035 }
4036 }
4037
4038 unsafe impl fidl::encoding::TypeMarker for VolumeInstallerInstallRequest {
4039 type Owned = Self;
4040
4041 #[inline(always)]
4042 fn inline_align(_context: fidl::encoding::Context) -> usize {
4043 8
4044 }
4045
4046 #[inline(always)]
4047 fn inline_size(_context: fidl::encoding::Context) -> usize {
4048 48
4049 }
4050 }
4051
4052 unsafe impl<D: fidl::encoding::ResourceDialect>
4053 fidl::encoding::Encode<VolumeInstallerInstallRequest, D>
4054 for &VolumeInstallerInstallRequest
4055 {
4056 #[inline]
4057 unsafe fn encode(
4058 self,
4059 encoder: &mut fidl::encoding::Encoder<'_, D>,
4060 offset: usize,
4061 _depth: fidl::encoding::Depth,
4062 ) -> fidl::Result<()> {
4063 encoder.debug_check_bounds::<VolumeInstallerInstallRequest>(offset);
4064 fidl::encoding::Encode::<VolumeInstallerInstallRequest, D>::encode(
4066 (
4067 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4068 &self.src,
4069 ),
4070 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4071 &self.image_file,
4072 ),
4073 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4074 &self.dst,
4075 ),
4076 ),
4077 encoder,
4078 offset,
4079 _depth,
4080 )
4081 }
4082 }
4083 unsafe impl<
4084 D: fidl::encoding::ResourceDialect,
4085 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4086 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4087 T2: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4088 > fidl::encoding::Encode<VolumeInstallerInstallRequest, D> for (T0, T1, T2)
4089 {
4090 #[inline]
4091 unsafe fn encode(
4092 self,
4093 encoder: &mut fidl::encoding::Encoder<'_, D>,
4094 offset: usize,
4095 depth: fidl::encoding::Depth,
4096 ) -> fidl::Result<()> {
4097 encoder.debug_check_bounds::<VolumeInstallerInstallRequest>(offset);
4098 self.0.encode(encoder, offset + 0, depth)?;
4102 self.1.encode(encoder, offset + 16, depth)?;
4103 self.2.encode(encoder, offset + 32, depth)?;
4104 Ok(())
4105 }
4106 }
4107
4108 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4109 for VolumeInstallerInstallRequest
4110 {
4111 #[inline(always)]
4112 fn new_empty() -> Self {
4113 Self {
4114 src: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4115 image_file: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4116 dst: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4117 }
4118 }
4119
4120 #[inline]
4121 unsafe fn decode(
4122 &mut self,
4123 decoder: &mut fidl::encoding::Decoder<'_, D>,
4124 offset: usize,
4125 _depth: fidl::encoding::Depth,
4126 ) -> fidl::Result<()> {
4127 decoder.debug_check_bounds::<Self>(offset);
4128 fidl::decode!(
4130 fidl::encoding::BoundedString<255>,
4131 D,
4132 &mut self.src,
4133 decoder,
4134 offset + 0,
4135 _depth
4136 )?;
4137 fidl::decode!(
4138 fidl::encoding::BoundedString<255>,
4139 D,
4140 &mut self.image_file,
4141 decoder,
4142 offset + 16,
4143 _depth
4144 )?;
4145 fidl::decode!(
4146 fidl::encoding::BoundedString<255>,
4147 D,
4148 &mut self.dst,
4149 decoder,
4150 offset + 32,
4151 _depth
4152 )?;
4153 Ok(())
4154 }
4155 }
4156
4157 impl CryptSettings {
4158 #[inline(always)]
4159 fn max_ordinal_present(&self) -> u64 {
4160 if let Some(_) = self.active_metadata_wrapping_key_id {
4161 return 2;
4162 }
4163 if let Some(_) = self.active_data_wrapping_key_id {
4164 return 1;
4165 }
4166 0
4167 }
4168 }
4169
4170 impl fidl::encoding::ValueTypeMarker for CryptSettings {
4171 type Borrowed<'a> = &'a Self;
4172 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4173 value
4174 }
4175 }
4176
4177 unsafe impl fidl::encoding::TypeMarker for CryptSettings {
4178 type Owned = Self;
4179
4180 #[inline(always)]
4181 fn inline_align(_context: fidl::encoding::Context) -> usize {
4182 8
4183 }
4184
4185 #[inline(always)]
4186 fn inline_size(_context: fidl::encoding::Context) -> usize {
4187 16
4188 }
4189 }
4190
4191 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CryptSettings, D>
4192 for &CryptSettings
4193 {
4194 unsafe fn encode(
4195 self,
4196 encoder: &mut fidl::encoding::Encoder<'_, D>,
4197 offset: usize,
4198 mut depth: fidl::encoding::Depth,
4199 ) -> fidl::Result<()> {
4200 encoder.debug_check_bounds::<CryptSettings>(offset);
4201 let max_ordinal: u64 = self.max_ordinal_present();
4203 encoder.write_num(max_ordinal, offset);
4204 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4205 if max_ordinal == 0 {
4207 return Ok(());
4208 }
4209 depth.increment()?;
4210 let envelope_size = 8;
4211 let bytes_len = max_ordinal as usize * envelope_size;
4212 #[allow(unused_variables)]
4213 let offset = encoder.out_of_line_offset(bytes_len);
4214 let mut _prev_end_offset: usize = 0;
4215 if 1 > max_ordinal {
4216 return Ok(());
4217 }
4218
4219 let cur_offset: usize = (1 - 1) * envelope_size;
4222
4223 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4225
4226 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
4231 self.active_data_wrapping_key_id.as_ref().map(
4232 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
4233 ),
4234 encoder,
4235 offset + cur_offset,
4236 depth,
4237 )?;
4238
4239 _prev_end_offset = cur_offset + envelope_size;
4240 if 2 > max_ordinal {
4241 return Ok(());
4242 }
4243
4244 let cur_offset: usize = (2 - 1) * envelope_size;
4247
4248 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4250
4251 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 16>, D>(
4256 self.active_metadata_wrapping_key_id.as_ref().map(
4257 <fidl::encoding::Array<u8, 16> as fidl::encoding::ValueTypeMarker>::borrow,
4258 ),
4259 encoder,
4260 offset + cur_offset,
4261 depth,
4262 )?;
4263
4264 _prev_end_offset = cur_offset + envelope_size;
4265
4266 Ok(())
4267 }
4268 }
4269
4270 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CryptSettings {
4271 #[inline(always)]
4272 fn new_empty() -> Self {
4273 Self::default()
4274 }
4275
4276 unsafe fn decode(
4277 &mut self,
4278 decoder: &mut fidl::encoding::Decoder<'_, D>,
4279 offset: usize,
4280 mut depth: fidl::encoding::Depth,
4281 ) -> fidl::Result<()> {
4282 decoder.debug_check_bounds::<Self>(offset);
4283 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4284 None => return Err(fidl::Error::NotNullable),
4285 Some(len) => len,
4286 };
4287 if len == 0 {
4289 return Ok(());
4290 };
4291 depth.increment()?;
4292 let envelope_size = 8;
4293 let bytes_len = len * envelope_size;
4294 let offset = decoder.out_of_line_offset(bytes_len)?;
4295 let mut _next_ordinal_to_read = 0;
4297 let mut next_offset = offset;
4298 let end_offset = offset + bytes_len;
4299 _next_ordinal_to_read += 1;
4300 if next_offset >= end_offset {
4301 return Ok(());
4302 }
4303
4304 while _next_ordinal_to_read < 1 {
4306 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4307 _next_ordinal_to_read += 1;
4308 next_offset += envelope_size;
4309 }
4310
4311 let next_out_of_line = decoder.next_out_of_line();
4312 let handles_before = decoder.remaining_handles();
4313 if let Some((inlined, num_bytes, num_handles)) =
4314 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4315 {
4316 let member_inline_size =
4317 <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
4318 decoder.context,
4319 );
4320 if inlined != (member_inline_size <= 4) {
4321 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4322 }
4323 let inner_offset;
4324 let mut inner_depth = depth.clone();
4325 if inlined {
4326 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4327 inner_offset = next_offset;
4328 } else {
4329 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4330 inner_depth.increment()?;
4331 }
4332 let val_ref = self
4333 .active_data_wrapping_key_id
4334 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
4335 fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
4336 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4337 {
4338 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4339 }
4340 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4341 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4342 }
4343 }
4344
4345 next_offset += envelope_size;
4346 _next_ordinal_to_read += 1;
4347 if next_offset >= end_offset {
4348 return Ok(());
4349 }
4350
4351 while _next_ordinal_to_read < 2 {
4353 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4354 _next_ordinal_to_read += 1;
4355 next_offset += envelope_size;
4356 }
4357
4358 let next_out_of_line = decoder.next_out_of_line();
4359 let handles_before = decoder.remaining_handles();
4360 if let Some((inlined, num_bytes, num_handles)) =
4361 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4362 {
4363 let member_inline_size =
4364 <fidl::encoding::Array<u8, 16> as fidl::encoding::TypeMarker>::inline_size(
4365 decoder.context,
4366 );
4367 if inlined != (member_inline_size <= 4) {
4368 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4369 }
4370 let inner_offset;
4371 let mut inner_depth = depth.clone();
4372 if inlined {
4373 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4374 inner_offset = next_offset;
4375 } else {
4376 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4377 inner_depth.increment()?;
4378 }
4379 let val_ref = self
4380 .active_metadata_wrapping_key_id
4381 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 16>, D));
4382 fidl::decode!(fidl::encoding::Array<u8, 16>, D, val_ref, decoder, inner_offset, inner_depth)?;
4383 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4384 {
4385 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4386 }
4387 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4388 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4389 }
4390 }
4391
4392 next_offset += envelope_size;
4393
4394 while next_offset < end_offset {
4396 _next_ordinal_to_read += 1;
4397 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4398 next_offset += envelope_size;
4399 }
4400
4401 Ok(())
4402 }
4403 }
4404
4405 impl fidl::encoding::ValueTypeMarker for ProfileIdentifier {
4406 type Borrowed<'a> = &'a Self;
4407 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4408 value
4409 }
4410 }
4411
4412 unsafe impl fidl::encoding::TypeMarker for ProfileIdentifier {
4413 type Owned = Self;
4414
4415 #[inline(always)]
4416 fn inline_align(_context: fidl::encoding::Context) -> usize {
4417 8
4418 }
4419
4420 #[inline(always)]
4421 fn inline_size(_context: fidl::encoding::Context) -> usize {
4422 16
4423 }
4424 }
4425
4426 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ProfileIdentifier, D>
4427 for &ProfileIdentifier
4428 {
4429 #[inline]
4430 unsafe fn encode(
4431 self,
4432 encoder: &mut fidl::encoding::Encoder<'_, D>,
4433 offset: usize,
4434 _depth: fidl::encoding::Depth,
4435 ) -> fidl::Result<()> {
4436 encoder.debug_check_bounds::<ProfileIdentifier>(offset);
4437 encoder.write_num::<u64>(self.ordinal(), offset);
4438 match self {
4439 ProfileIdentifier::ObjectId(ref val) => {
4440 fidl::encoding::encode_in_envelope::<u64, D>(
4441 <u64 as fidl::encoding::ValueTypeMarker>::borrow(val),
4442 encoder,
4443 offset + 8,
4444 _depth,
4445 )
4446 }
4447 ProfileIdentifier::BlobHash(ref val) => fidl::encoding::encode_in_envelope::<
4448 fidl::encoding::Array<u8, 32>,
4449 D,
4450 >(
4451 <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow(val),
4452 encoder,
4453 offset + 8,
4454 _depth,
4455 ),
4456 ProfileIdentifier::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4457 }
4458 }
4459 }
4460
4461 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ProfileIdentifier {
4462 #[inline(always)]
4463 fn new_empty() -> Self {
4464 Self::__SourceBreaking { unknown_ordinal: 0 }
4465 }
4466
4467 #[inline]
4468 unsafe fn decode(
4469 &mut self,
4470 decoder: &mut fidl::encoding::Decoder<'_, D>,
4471 offset: usize,
4472 mut depth: fidl::encoding::Depth,
4473 ) -> fidl::Result<()> {
4474 decoder.debug_check_bounds::<Self>(offset);
4475 #[allow(unused_variables)]
4476 let next_out_of_line = decoder.next_out_of_line();
4477 let handles_before = decoder.remaining_handles();
4478 let (ordinal, inlined, num_bytes, num_handles) =
4479 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4480
4481 let member_inline_size = match ordinal {
4482 1 => <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4483 2 => <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
4484 decoder.context,
4485 ),
4486 0 => return Err(fidl::Error::UnknownUnionTag),
4487 _ => num_bytes as usize,
4488 };
4489
4490 if inlined != (member_inline_size <= 4) {
4491 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4492 }
4493 let _inner_offset;
4494 if inlined {
4495 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4496 _inner_offset = offset + 8;
4497 } else {
4498 depth.increment()?;
4499 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4500 }
4501 match ordinal {
4502 1 => {
4503 #[allow(irrefutable_let_patterns)]
4504 if let ProfileIdentifier::ObjectId(_) = self {
4505 } else {
4507 *self = ProfileIdentifier::ObjectId(fidl::new_empty!(u64, D));
4509 }
4510 #[allow(irrefutable_let_patterns)]
4511 if let ProfileIdentifier::ObjectId(ref mut val) = self {
4512 fidl::decode!(u64, D, val, decoder, _inner_offset, depth)?;
4513 } else {
4514 unreachable!()
4515 }
4516 }
4517 2 => {
4518 #[allow(irrefutable_let_patterns)]
4519 if let ProfileIdentifier::BlobHash(_) = self {
4520 } else {
4522 *self = ProfileIdentifier::BlobHash(
4524 fidl::new_empty!(fidl::encoding::Array<u8, 32>, D),
4525 );
4526 }
4527 #[allow(irrefutable_let_patterns)]
4528 if let ProfileIdentifier::BlobHash(ref mut val) = self {
4529 fidl::decode!(fidl::encoding::Array<u8, 32>, D, val, decoder, _inner_offset, depth)?;
4530 } else {
4531 unreachable!()
4532 }
4533 }
4534 #[allow(deprecated)]
4535 ordinal => {
4536 for _ in 0..num_handles {
4537 decoder.drop_next_handle()?;
4538 }
4539 *self = ProfileIdentifier::__SourceBreaking { unknown_ordinal: ordinal };
4540 }
4541 }
4542 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4543 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4544 }
4545 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4546 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4547 }
4548 Ok(())
4549 }
4550 }
4551
4552 impl fidl::encoding::ValueTypeMarker for WrappedKey {
4553 type Borrowed<'a> = &'a Self;
4554 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4555 value
4556 }
4557 }
4558
4559 unsafe impl fidl::encoding::TypeMarker for WrappedKey {
4560 type Owned = Self;
4561
4562 #[inline(always)]
4563 fn inline_align(_context: fidl::encoding::Context) -> usize {
4564 8
4565 }
4566
4567 #[inline(always)]
4568 fn inline_size(_context: fidl::encoding::Context) -> usize {
4569 16
4570 }
4571 }
4572
4573 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<WrappedKey, D>
4574 for &WrappedKey
4575 {
4576 #[inline]
4577 unsafe fn encode(
4578 self,
4579 encoder: &mut fidl::encoding::Encoder<'_, D>,
4580 offset: usize,
4581 _depth: fidl::encoding::Depth,
4582 ) -> fidl::Result<()> {
4583 encoder.debug_check_bounds::<WrappedKey>(offset);
4584 encoder.write_num::<u64>(self.ordinal(), offset);
4585 match self {
4586 WrappedKey::Fxfs(ref val) => fidl::encoding::encode_in_envelope::<FxfsKey, D>(
4587 <FxfsKey as fidl::encoding::ValueTypeMarker>::borrow(val),
4588 encoder,
4589 offset + 8,
4590 _depth,
4591 ),
4592 WrappedKey::Zxcrypt(ref val) => fidl::encoding::encode_in_envelope::<
4593 fidl::encoding::Vector<u8, 132>,
4594 D,
4595 >(
4596 <fidl::encoding::Vector<u8, 132> as fidl::encoding::ValueTypeMarker>::borrow(
4597 val,
4598 ),
4599 encoder,
4600 offset + 8,
4601 _depth,
4602 ),
4603 WrappedKey::FscryptInoLblk32Dir(ref val) => fidl::encoding::encode_in_envelope::<
4604 FscryptKeyIdentifierAndNonce,
4605 D,
4606 >(
4607 <FscryptKeyIdentifierAndNonce as fidl::encoding::ValueTypeMarker>::borrow(val),
4608 encoder,
4609 offset + 8,
4610 _depth,
4611 ),
4612 WrappedKey::FscryptInoLblk32File(ref val) => {
4613 fidl::encoding::encode_in_envelope::<FscryptKeyIdentifier, D>(
4614 <FscryptKeyIdentifier as fidl::encoding::ValueTypeMarker>::borrow(val),
4615 encoder,
4616 offset + 8,
4617 _depth,
4618 )
4619 }
4620 WrappedKey::FscryptInoLblk64Dir(ref val) => fidl::encoding::encode_in_envelope::<
4621 FscryptKeyIdentifierAndNonce,
4622 D,
4623 >(
4624 <FscryptKeyIdentifierAndNonce as fidl::encoding::ValueTypeMarker>::borrow(val),
4625 encoder,
4626 offset + 8,
4627 _depth,
4628 ),
4629 WrappedKey::FscryptInoLblk64File(ref val) => {
4630 fidl::encoding::encode_in_envelope::<FscryptKeyIdentifier, D>(
4631 <FscryptKeyIdentifier as fidl::encoding::ValueTypeMarker>::borrow(val),
4632 encoder,
4633 offset + 8,
4634 _depth,
4635 )
4636 }
4637 WrappedKey::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
4638 }
4639 }
4640 }
4641
4642 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WrappedKey {
4643 #[inline(always)]
4644 fn new_empty() -> Self {
4645 Self::__SourceBreaking { unknown_ordinal: 0 }
4646 }
4647
4648 #[inline]
4649 unsafe fn decode(
4650 &mut self,
4651 decoder: &mut fidl::encoding::Decoder<'_, D>,
4652 offset: usize,
4653 mut depth: fidl::encoding::Depth,
4654 ) -> fidl::Result<()> {
4655 decoder.debug_check_bounds::<Self>(offset);
4656 #[allow(unused_variables)]
4657 let next_out_of_line = decoder.next_out_of_line();
4658 let handles_before = decoder.remaining_handles();
4659 let (ordinal, inlined, num_bytes, num_handles) =
4660 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
4661
4662 let member_inline_size = match ordinal {
4663 1 => <FxfsKey as fidl::encoding::TypeMarker>::inline_size(decoder.context),
4664 2 => <fidl::encoding::Vector<u8, 132> as fidl::encoding::TypeMarker>::inline_size(
4665 decoder.context,
4666 ),
4667 3 => <FscryptKeyIdentifierAndNonce as fidl::encoding::TypeMarker>::inline_size(
4668 decoder.context,
4669 ),
4670 4 => <FscryptKeyIdentifier as fidl::encoding::TypeMarker>::inline_size(
4671 decoder.context,
4672 ),
4673 5 => <FscryptKeyIdentifierAndNonce as fidl::encoding::TypeMarker>::inline_size(
4674 decoder.context,
4675 ),
4676 6 => <FscryptKeyIdentifier as fidl::encoding::TypeMarker>::inline_size(
4677 decoder.context,
4678 ),
4679 0 => return Err(fidl::Error::UnknownUnionTag),
4680 _ => num_bytes as usize,
4681 };
4682
4683 if inlined != (member_inline_size <= 4) {
4684 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4685 }
4686 let _inner_offset;
4687 if inlined {
4688 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
4689 _inner_offset = offset + 8;
4690 } else {
4691 depth.increment()?;
4692 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4693 }
4694 match ordinal {
4695 1 => {
4696 #[allow(irrefutable_let_patterns)]
4697 if let WrappedKey::Fxfs(_) = self {
4698 } else {
4700 *self = WrappedKey::Fxfs(fidl::new_empty!(FxfsKey, D));
4702 }
4703 #[allow(irrefutable_let_patterns)]
4704 if let WrappedKey::Fxfs(ref mut val) = self {
4705 fidl::decode!(FxfsKey, D, val, decoder, _inner_offset, depth)?;
4706 } else {
4707 unreachable!()
4708 }
4709 }
4710 2 => {
4711 #[allow(irrefutable_let_patterns)]
4712 if let WrappedKey::Zxcrypt(_) = self {
4713 } else {
4715 *self = WrappedKey::Zxcrypt(
4717 fidl::new_empty!(fidl::encoding::Vector<u8, 132>, D),
4718 );
4719 }
4720 #[allow(irrefutable_let_patterns)]
4721 if let WrappedKey::Zxcrypt(ref mut val) = self {
4722 fidl::decode!(fidl::encoding::Vector<u8, 132>, D, val, decoder, _inner_offset, depth)?;
4723 } else {
4724 unreachable!()
4725 }
4726 }
4727 3 => {
4728 #[allow(irrefutable_let_patterns)]
4729 if let WrappedKey::FscryptInoLblk32Dir(_) = self {
4730 } else {
4732 *self = WrappedKey::FscryptInoLblk32Dir(fidl::new_empty!(
4734 FscryptKeyIdentifierAndNonce,
4735 D
4736 ));
4737 }
4738 #[allow(irrefutable_let_patterns)]
4739 if let WrappedKey::FscryptInoLblk32Dir(ref mut val) = self {
4740 fidl::decode!(
4741 FscryptKeyIdentifierAndNonce,
4742 D,
4743 val,
4744 decoder,
4745 _inner_offset,
4746 depth
4747 )?;
4748 } else {
4749 unreachable!()
4750 }
4751 }
4752 4 => {
4753 #[allow(irrefutable_let_patterns)]
4754 if let WrappedKey::FscryptInoLblk32File(_) = self {
4755 } else {
4757 *self = WrappedKey::FscryptInoLblk32File(fidl::new_empty!(
4759 FscryptKeyIdentifier,
4760 D
4761 ));
4762 }
4763 #[allow(irrefutable_let_patterns)]
4764 if let WrappedKey::FscryptInoLblk32File(ref mut val) = self {
4765 fidl::decode!(FscryptKeyIdentifier, D, val, decoder, _inner_offset, depth)?;
4766 } else {
4767 unreachable!()
4768 }
4769 }
4770 5 => {
4771 #[allow(irrefutable_let_patterns)]
4772 if let WrappedKey::FscryptInoLblk64Dir(_) = self {
4773 } else {
4775 *self = WrappedKey::FscryptInoLblk64Dir(fidl::new_empty!(
4777 FscryptKeyIdentifierAndNonce,
4778 D
4779 ));
4780 }
4781 #[allow(irrefutable_let_patterns)]
4782 if let WrappedKey::FscryptInoLblk64Dir(ref mut val) = self {
4783 fidl::decode!(
4784 FscryptKeyIdentifierAndNonce,
4785 D,
4786 val,
4787 decoder,
4788 _inner_offset,
4789 depth
4790 )?;
4791 } else {
4792 unreachable!()
4793 }
4794 }
4795 6 => {
4796 #[allow(irrefutable_let_patterns)]
4797 if let WrappedKey::FscryptInoLblk64File(_) = self {
4798 } else {
4800 *self = WrappedKey::FscryptInoLblk64File(fidl::new_empty!(
4802 FscryptKeyIdentifier,
4803 D
4804 ));
4805 }
4806 #[allow(irrefutable_let_patterns)]
4807 if let WrappedKey::FscryptInoLblk64File(ref mut val) = self {
4808 fidl::decode!(FscryptKeyIdentifier, D, val, decoder, _inner_offset, depth)?;
4809 } else {
4810 unreachable!()
4811 }
4812 }
4813 #[allow(deprecated)]
4814 ordinal => {
4815 for _ in 0..num_handles {
4816 decoder.drop_next_handle()?;
4817 }
4818 *self = WrappedKey::__SourceBreaking { unknown_ordinal: ordinal };
4819 }
4820 }
4821 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
4822 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4823 }
4824 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4825 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4826 }
4827 Ok(())
4828 }
4829 }
4830}