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
11pub const MAX_RESOLUTION_CONTEXT_SIZE: u32 = 8192;
18
19#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
21#[repr(u32)]
22pub enum BlobWrittenError {
23 NotWritten = 1,
25 UnopenedBlob = 2,
27}
28
29impl BlobWrittenError {
30 #[inline]
31 pub fn from_primitive(prim: u32) -> Option<Self> {
32 match prim {
33 1 => Some(Self::NotWritten),
34 2 => Some(Self::UnopenedBlob),
35 _ => None,
36 }
37 }
38
39 #[inline]
40 pub const fn into_primitive(self) -> u32 {
41 self as u32
42 }
43
44 #[deprecated = "Strict enums should not use `is_unknown`"]
45 #[inline]
46 pub fn is_unknown(&self) -> bool {
47 false
48 }
49}
50
51#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
53#[repr(u32)]
54pub enum GcProtection {
55 OpenPackageTracking = 1,
57 Retained = 2,
61}
62
63impl GcProtection {
64 #[inline]
65 pub fn from_primitive(prim: u32) -> Option<Self> {
66 match prim {
67 1 => Some(Self::OpenPackageTracking),
68 2 => Some(Self::Retained),
69 _ => None,
70 }
71 }
72
73 #[inline]
74 pub const fn into_primitive(self) -> u32 {
75 self as u32
76 }
77
78 #[deprecated = "Strict enums should not use `is_unknown`"]
79 #[inline]
80 pub fn is_unknown(&self) -> bool {
81 false
82 }
83}
84
85#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
86#[repr(u32)]
87pub enum GetInfoError {
88 UnknownUrl = 1,
90 Verification = 2,
92 NotAvailable = 3,
94}
95
96impl GetInfoError {
97 #[inline]
98 pub fn from_primitive(prim: u32) -> Option<Self> {
99 match prim {
100 1 => Some(Self::UnknownUrl),
101 2 => Some(Self::Verification),
102 3 => Some(Self::NotAvailable),
103 _ => None,
104 }
105 }
106
107 #[inline]
108 pub const fn into_primitive(self) -> u32 {
109 self as u32
110 }
111
112 #[deprecated = "Strict enums should not use `is_unknown`"]
113 #[inline]
114 pub fn is_unknown(&self) -> bool {
115 false
116 }
117}
118
119#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
121#[repr(u32)]
122pub enum GetSubpackageError {
123 SuperpackageClosed = 1,
125 DoesNotExist = 2,
127 Internal = 3,
129}
130
131impl GetSubpackageError {
132 #[inline]
133 pub fn from_primitive(prim: u32) -> Option<Self> {
134 match prim {
135 1 => Some(Self::SuperpackageClosed),
136 2 => Some(Self::DoesNotExist),
137 3 => Some(Self::Internal),
138 _ => None,
139 }
140 }
141
142 #[inline]
143 pub const fn into_primitive(self) -> u32 {
144 self as u32
145 }
146
147 #[deprecated = "Strict enums should not use `is_unknown`"]
148 #[inline]
149 pub fn is_unknown(&self) -> bool {
150 false
151 }
152}
153
154#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
156#[repr(u32)]
157pub enum OpenBlobError {
158 OutOfSpace = 1,
160 ConcurrentWrite = 2,
162 UnspecifiedIo = 3,
164 Internal = 4,
166}
167
168impl OpenBlobError {
169 #[inline]
170 pub fn from_primitive(prim: u32) -> Option<Self> {
171 match prim {
172 1 => Some(Self::OutOfSpace),
173 2 => Some(Self::ConcurrentWrite),
174 3 => Some(Self::UnspecifiedIo),
175 4 => Some(Self::Internal),
176 _ => None,
177 }
178 }
179
180 #[inline]
181 pub const fn into_primitive(self) -> u32 {
182 self as u32
183 }
184
185 #[deprecated = "Strict enums should not use `is_unknown`"]
186 #[inline]
187 pub fn is_unknown(&self) -> bool {
188 false
189 }
190}
191
192#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
194#[repr(u32)]
195pub enum RepositoryStorageType {
196 Ephemeral = 1,
199 Persistent = 2,
202}
203
204impl RepositoryStorageType {
205 #[inline]
206 pub fn from_primitive(prim: u32) -> Option<Self> {
207 match prim {
208 1 => Some(Self::Ephemeral),
209 2 => Some(Self::Persistent),
210 _ => None,
211 }
212 }
213
214 #[inline]
215 pub const fn into_primitive(self) -> u32 {
216 self as u32
217 }
218
219 #[deprecated = "Strict enums should not use `is_unknown`"]
220 #[inline]
221 pub fn is_unknown(&self) -> bool {
222 false
223 }
224}
225
226#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
228#[repr(i32)]
229pub enum ResolveError {
230 Internal = 1,
232 AccessDenied = 2,
234 Io = 3,
236 BlobNotFound = 4,
238 PackageNotFound = 5,
240 RepoNotFound = 6,
242 NoSpace = 7,
244 UnavailableBlob = 8,
246 UnavailableRepoMetadata = 9,
248 InvalidUrl = 10,
250 InvalidContext = 11,
252}
253
254impl ResolveError {
255 #[inline]
256 pub fn from_primitive(prim: i32) -> Option<Self> {
257 match prim {
258 1 => Some(Self::Internal),
259 2 => Some(Self::AccessDenied),
260 3 => Some(Self::Io),
261 4 => Some(Self::BlobNotFound),
262 5 => Some(Self::PackageNotFound),
263 6 => Some(Self::RepoNotFound),
264 7 => Some(Self::NoSpace),
265 8 => Some(Self::UnavailableBlob),
266 9 => Some(Self::UnavailableRepoMetadata),
267 10 => Some(Self::InvalidUrl),
268 11 => Some(Self::InvalidContext),
269 _ => None,
270 }
271 }
272
273 #[inline]
274 pub const fn into_primitive(self) -> i32 {
275 self as i32
276 }
277
278 #[deprecated = "Strict enums should not use `is_unknown`"]
279 #[inline]
280 pub fn is_unknown(&self) -> bool {
281 false
282 }
283}
284
285#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
287pub enum SetUpgradableUrlsError {
288 PartialSet,
293 Internal,
295 #[doc(hidden)]
296 __SourceBreaking { unknown_ordinal: u32 },
297}
298
299#[macro_export]
301macro_rules! SetUpgradableUrlsErrorUnknown {
302 () => {
303 _
304 };
305}
306
307impl SetUpgradableUrlsError {
308 #[inline]
309 pub fn from_primitive(prim: u32) -> Option<Self> {
310 match prim {
311 1 => Some(Self::PartialSet),
312 2 => Some(Self::Internal),
313 _ => None,
314 }
315 }
316
317 #[inline]
318 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
319 match prim {
320 1 => Self::PartialSet,
321 2 => Self::Internal,
322 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
323 }
324 }
325
326 #[inline]
327 pub fn unknown() -> Self {
328 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
329 }
330
331 #[inline]
332 pub const fn into_primitive(self) -> u32 {
333 match self {
334 Self::PartialSet => 1,
335 Self::Internal => 2,
336 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
337 }
338 }
339
340 #[inline]
341 pub fn is_unknown(&self) -> bool {
342 match self {
343 Self::__SourceBreaking { unknown_ordinal: _ } => true,
344 _ => false,
345 }
346 }
347}
348
349#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
350#[repr(u32)]
351pub enum WriteError {
352 UnknownUrl = 1,
354 Verification = 2,
356 Download = 3,
358 Storage = 4,
360}
361
362impl WriteError {
363 #[inline]
364 pub fn from_primitive(prim: u32) -> Option<Self> {
365 match prim {
366 1 => Some(Self::UnknownUrl),
367 2 => Some(Self::Verification),
368 3 => Some(Self::Download),
369 4 => Some(Self::Storage),
370 _ => None,
371 }
372 }
373
374 #[inline]
375 pub const fn into_primitive(self) -> u32 {
376 self as u32
377 }
378
379 #[deprecated = "Strict enums should not use `is_unknown`"]
380 #[inline]
381 pub fn is_unknown(&self) -> bool {
382 false
383 }
384}
385
386#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
389#[repr(C)]
390pub struct BlobId {
391 pub merkle_root: [u8; 32],
392}
393
394impl fidl::Persistable for BlobId {}
395
396#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
397pub struct BlobIdIteratorNextResponse {
398 pub blobs: Vec<BlobId>,
399}
400
401impl fidl::Persistable for BlobIdIteratorNextResponse {}
402
403#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
406#[repr(C)]
407pub struct BlobInfo {
408 pub blob_id: BlobId,
409 pub length: u64,
410}
411
412impl fidl::Persistable for BlobInfo {}
413
414#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
415pub struct BlobInfoIteratorNextResponse {
416 pub blobs: Vec<BlobInfo>,
417}
418
419impl fidl::Persistable for BlobInfoIteratorNextResponse {}
420
421#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
422pub struct CupGetInfoRequest {
423 pub url: PackageUrl,
425}
426
427impl fidl::Persistable for CupGetInfoRequest {}
428
429#[derive(Clone, Debug, PartialEq)]
430pub struct CupWriteRequest {
431 pub url: PackageUrl,
433 pub cup: CupData,
435}
436
437impl fidl::Persistable for CupWriteRequest {}
438
439#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
440pub struct CupGetInfoResponse {
441 pub version: String,
442 pub channel: String,
443}
444
445impl fidl::Persistable for CupGetInfoResponse {}
446
447#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
448#[repr(C)]
449pub struct NeededBlobsBlobWrittenRequest {
450 pub blob_id: BlobId,
451}
452
453impl fidl::Persistable for NeededBlobsBlobWrittenRequest {}
454
455#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
456#[repr(C)]
457pub struct NeededBlobsOpenBlobRequest {
458 pub blob_id: BlobId,
459}
460
461impl fidl::Persistable for NeededBlobsOpenBlobRequest {}
462
463#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
464pub struct PackageCacheSetUpgradableUrlsRequest {
465 pub pinned_urls: Vec<PackageUrl>,
466}
467
468impl fidl::Persistable for PackageCacheSetUpgradableUrlsRequest {}
469
470#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
472pub struct PackageIndexEntry {
473 pub package_url: PackageUrl,
474 pub meta_far_blob_id: BlobId,
475}
476
477impl fidl::Persistable for PackageIndexEntry {}
478
479#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
480pub struct PackageIndexIteratorNextResponse {
481 pub entries: Vec<PackageIndexEntry>,
482}
483
484impl fidl::Persistable for PackageIndexIteratorNextResponse {}
485
486#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
487pub struct PackageResolverGetHashRequest {
488 pub package_url: PackageUrl,
489}
490
491impl fidl::Persistable for PackageResolverGetHashRequest {}
492
493#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
494#[repr(C)]
495pub struct PackageResolverGetHashResponse {
496 pub meta_far_blob_id: BlobId,
497}
498
499impl fidl::Persistable for PackageResolverGetHashResponse {}
500
501#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
502pub struct PackageResolverResolveWithContextResponse {
503 pub resolved_context: ResolutionContext,
504}
505
506impl fidl::Persistable for PackageResolverResolveWithContextResponse {}
507
508#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
509pub struct PackageResolverResolveResponse {
510 pub resolved_context: ResolutionContext,
511}
512
513impl fidl::Persistable for PackageResolverResolveResponse {}
514
515#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
518pub struct PackageUrl {
519 pub url: String,
520}
521
522impl fidl::Persistable for PackageUrl {}
523
524#[derive(Clone, Debug, PartialEq)]
525pub struct RepositoryIteratorNextResponse {
526 pub repos: Vec<RepositoryConfig>,
527}
528
529impl fidl::Persistable for RepositoryIteratorNextResponse {}
530
531#[derive(Clone, Debug, PartialEq)]
532pub struct RepositoryManagerAddMirrorRequest {
533 pub repo_url: String,
534 pub mirror: MirrorConfig,
535}
536
537impl fidl::Persistable for RepositoryManagerAddMirrorRequest {}
538
539#[derive(Clone, Debug, PartialEq)]
540pub struct RepositoryManagerAddRequest {
541 pub repo: RepositoryConfig,
542}
543
544impl fidl::Persistable for RepositoryManagerAddRequest {}
545
546#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
547pub struct RepositoryManagerRemoveMirrorRequest {
548 pub repo_url: String,
549 pub mirror_url: String,
550}
551
552impl fidl::Persistable for RepositoryManagerRemoveMirrorRequest {}
553
554#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
555pub struct RepositoryManagerRemoveRequest {
556 pub repo_url: String,
557}
558
559impl fidl::Persistable for RepositoryManagerRemoveRequest {}
560
561#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
564pub struct RepositoryUrl {
565 pub url: String,
566}
567
568impl fidl::Persistable for RepositoryUrl {}
569
570#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
573pub struct ResolutionContext {
574 pub bytes: Vec<u8>,
575}
576
577impl fidl::Persistable for ResolutionContext {}
578
579#[derive(Clone, Debug, Default, PartialEq)]
580pub struct CupData {
581 pub request: Option<Vec<u8>>,
583 pub key_id: Option<u64>,
585 pub nonce: Option<[u8; 32]>,
587 pub response: Option<Vec<u8>>,
589 pub signature: Option<Vec<u8>>,
591 #[doc(hidden)]
592 pub __source_breaking: fidl::marker::SourceBreaking,
593}
594
595impl fidl::Persistable for CupData {}
596
597#[derive(Clone, Debug, Default, PartialEq)]
599pub struct MirrorConfig {
600 pub mirror_url: Option<String>,
602 pub subscribe: Option<bool>,
604 pub blob_mirror_url: Option<String>,
607 #[doc(hidden)]
608 pub __source_breaking: fidl::marker::SourceBreaking,
609}
610
611impl fidl::Persistable for MirrorConfig {}
612
613#[derive(Clone, Debug, Default, PartialEq)]
615pub struct RepositoryConfig {
616 pub repo_url: Option<String>,
620 pub root_keys: Option<Vec<RepositoryKeyConfig>>,
625 pub mirrors: Option<Vec<MirrorConfig>>,
627 pub root_version: Option<u32>,
640 pub root_threshold: Option<u32>,
644 pub use_local_mirror: Option<bool>,
647 pub storage_type: Option<RepositoryStorageType>,
650 #[doc(hidden)]
651 pub __source_breaking: fidl::marker::SourceBreaking,
652}
653
654impl fidl::Persistable for RepositoryConfig {}
655
656#[derive(Clone, Debug)]
660pub enum RepositoryKeyConfig {
661 Ed25519Key(Vec<u8>),
663 #[doc(hidden)]
664 __SourceBreaking { unknown_ordinal: u64 },
665}
666
667#[macro_export]
669macro_rules! RepositoryKeyConfigUnknown {
670 () => {
671 _
672 };
673}
674
675impl PartialEq for RepositoryKeyConfig {
677 fn eq(&self, other: &Self) -> bool {
678 match (self, other) {
679 (Self::Ed25519Key(x), Self::Ed25519Key(y)) => *x == *y,
680 _ => false,
681 }
682 }
683}
684
685impl RepositoryKeyConfig {
686 #[inline]
687 pub fn ordinal(&self) -> u64 {
688 match *self {
689 Self::Ed25519Key(_) => 1,
690 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
691 }
692 }
693
694 #[inline]
695 pub fn unknown_variant_for_testing() -> Self {
696 Self::__SourceBreaking { unknown_ordinal: 0 }
697 }
698
699 #[inline]
700 pub fn is_unknown(&self) -> bool {
701 match self {
702 Self::__SourceBreaking { .. } => true,
703 _ => false,
704 }
705 }
706}
707
708impl fidl::Persistable for RepositoryKeyConfig {}
709
710mod internal {
711 use super::*;
712 unsafe impl fidl::encoding::TypeMarker for BlobWrittenError {
713 type Owned = Self;
714
715 #[inline(always)]
716 fn inline_align(_context: fidl::encoding::Context) -> usize {
717 std::mem::align_of::<u32>()
718 }
719
720 #[inline(always)]
721 fn inline_size(_context: fidl::encoding::Context) -> usize {
722 std::mem::size_of::<u32>()
723 }
724
725 #[inline(always)]
726 fn encode_is_copy() -> bool {
727 true
728 }
729
730 #[inline(always)]
731 fn decode_is_copy() -> bool {
732 false
733 }
734 }
735
736 impl fidl::encoding::ValueTypeMarker for BlobWrittenError {
737 type Borrowed<'a> = Self;
738 #[inline(always)]
739 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
740 *value
741 }
742 }
743
744 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
745 for BlobWrittenError
746 {
747 #[inline]
748 unsafe fn encode(
749 self,
750 encoder: &mut fidl::encoding::Encoder<'_, D>,
751 offset: usize,
752 _depth: fidl::encoding::Depth,
753 ) -> fidl::Result<()> {
754 encoder.debug_check_bounds::<Self>(offset);
755 encoder.write_num(self.into_primitive(), offset);
756 Ok(())
757 }
758 }
759
760 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlobWrittenError {
761 #[inline(always)]
762 fn new_empty() -> Self {
763 Self::NotWritten
764 }
765
766 #[inline]
767 unsafe fn decode(
768 &mut self,
769 decoder: &mut fidl::encoding::Decoder<'_, D>,
770 offset: usize,
771 _depth: fidl::encoding::Depth,
772 ) -> fidl::Result<()> {
773 decoder.debug_check_bounds::<Self>(offset);
774 let prim = decoder.read_num::<u32>(offset);
775
776 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
777 Ok(())
778 }
779 }
780 unsafe impl fidl::encoding::TypeMarker for GcProtection {
781 type Owned = Self;
782
783 #[inline(always)]
784 fn inline_align(_context: fidl::encoding::Context) -> usize {
785 std::mem::align_of::<u32>()
786 }
787
788 #[inline(always)]
789 fn inline_size(_context: fidl::encoding::Context) -> usize {
790 std::mem::size_of::<u32>()
791 }
792
793 #[inline(always)]
794 fn encode_is_copy() -> bool {
795 true
796 }
797
798 #[inline(always)]
799 fn decode_is_copy() -> bool {
800 false
801 }
802 }
803
804 impl fidl::encoding::ValueTypeMarker for GcProtection {
805 type Borrowed<'a> = Self;
806 #[inline(always)]
807 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
808 *value
809 }
810 }
811
812 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GcProtection {
813 #[inline]
814 unsafe fn encode(
815 self,
816 encoder: &mut fidl::encoding::Encoder<'_, D>,
817 offset: usize,
818 _depth: fidl::encoding::Depth,
819 ) -> fidl::Result<()> {
820 encoder.debug_check_bounds::<Self>(offset);
821 encoder.write_num(self.into_primitive(), offset);
822 Ok(())
823 }
824 }
825
826 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GcProtection {
827 #[inline(always)]
828 fn new_empty() -> Self {
829 Self::OpenPackageTracking
830 }
831
832 #[inline]
833 unsafe fn decode(
834 &mut self,
835 decoder: &mut fidl::encoding::Decoder<'_, D>,
836 offset: usize,
837 _depth: fidl::encoding::Depth,
838 ) -> fidl::Result<()> {
839 decoder.debug_check_bounds::<Self>(offset);
840 let prim = decoder.read_num::<u32>(offset);
841
842 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
843 Ok(())
844 }
845 }
846 unsafe impl fidl::encoding::TypeMarker for GetInfoError {
847 type Owned = Self;
848
849 #[inline(always)]
850 fn inline_align(_context: fidl::encoding::Context) -> usize {
851 std::mem::align_of::<u32>()
852 }
853
854 #[inline(always)]
855 fn inline_size(_context: fidl::encoding::Context) -> usize {
856 std::mem::size_of::<u32>()
857 }
858
859 #[inline(always)]
860 fn encode_is_copy() -> bool {
861 true
862 }
863
864 #[inline(always)]
865 fn decode_is_copy() -> bool {
866 false
867 }
868 }
869
870 impl fidl::encoding::ValueTypeMarker for GetInfoError {
871 type Borrowed<'a> = Self;
872 #[inline(always)]
873 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
874 *value
875 }
876 }
877
878 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for GetInfoError {
879 #[inline]
880 unsafe fn encode(
881 self,
882 encoder: &mut fidl::encoding::Encoder<'_, D>,
883 offset: usize,
884 _depth: fidl::encoding::Depth,
885 ) -> fidl::Result<()> {
886 encoder.debug_check_bounds::<Self>(offset);
887 encoder.write_num(self.into_primitive(), offset);
888 Ok(())
889 }
890 }
891
892 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetInfoError {
893 #[inline(always)]
894 fn new_empty() -> Self {
895 Self::UnknownUrl
896 }
897
898 #[inline]
899 unsafe fn decode(
900 &mut self,
901 decoder: &mut fidl::encoding::Decoder<'_, D>,
902 offset: usize,
903 _depth: fidl::encoding::Depth,
904 ) -> fidl::Result<()> {
905 decoder.debug_check_bounds::<Self>(offset);
906 let prim = decoder.read_num::<u32>(offset);
907
908 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
909 Ok(())
910 }
911 }
912 unsafe impl fidl::encoding::TypeMarker for GetSubpackageError {
913 type Owned = Self;
914
915 #[inline(always)]
916 fn inline_align(_context: fidl::encoding::Context) -> usize {
917 std::mem::align_of::<u32>()
918 }
919
920 #[inline(always)]
921 fn inline_size(_context: fidl::encoding::Context) -> usize {
922 std::mem::size_of::<u32>()
923 }
924
925 #[inline(always)]
926 fn encode_is_copy() -> bool {
927 true
928 }
929
930 #[inline(always)]
931 fn decode_is_copy() -> bool {
932 false
933 }
934 }
935
936 impl fidl::encoding::ValueTypeMarker for GetSubpackageError {
937 type Borrowed<'a> = Self;
938 #[inline(always)]
939 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
940 *value
941 }
942 }
943
944 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
945 for GetSubpackageError
946 {
947 #[inline]
948 unsafe fn encode(
949 self,
950 encoder: &mut fidl::encoding::Encoder<'_, D>,
951 offset: usize,
952 _depth: fidl::encoding::Depth,
953 ) -> fidl::Result<()> {
954 encoder.debug_check_bounds::<Self>(offset);
955 encoder.write_num(self.into_primitive(), offset);
956 Ok(())
957 }
958 }
959
960 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetSubpackageError {
961 #[inline(always)]
962 fn new_empty() -> Self {
963 Self::SuperpackageClosed
964 }
965
966 #[inline]
967 unsafe fn decode(
968 &mut self,
969 decoder: &mut fidl::encoding::Decoder<'_, D>,
970 offset: usize,
971 _depth: fidl::encoding::Depth,
972 ) -> fidl::Result<()> {
973 decoder.debug_check_bounds::<Self>(offset);
974 let prim = decoder.read_num::<u32>(offset);
975
976 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
977 Ok(())
978 }
979 }
980 unsafe impl fidl::encoding::TypeMarker for OpenBlobError {
981 type Owned = Self;
982
983 #[inline(always)]
984 fn inline_align(_context: fidl::encoding::Context) -> usize {
985 std::mem::align_of::<u32>()
986 }
987
988 #[inline(always)]
989 fn inline_size(_context: fidl::encoding::Context) -> usize {
990 std::mem::size_of::<u32>()
991 }
992
993 #[inline(always)]
994 fn encode_is_copy() -> bool {
995 true
996 }
997
998 #[inline(always)]
999 fn decode_is_copy() -> bool {
1000 false
1001 }
1002 }
1003
1004 impl fidl::encoding::ValueTypeMarker for OpenBlobError {
1005 type Borrowed<'a> = Self;
1006 #[inline(always)]
1007 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1008 *value
1009 }
1010 }
1011
1012 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenBlobError {
1013 #[inline]
1014 unsafe fn encode(
1015 self,
1016 encoder: &mut fidl::encoding::Encoder<'_, D>,
1017 offset: usize,
1018 _depth: fidl::encoding::Depth,
1019 ) -> fidl::Result<()> {
1020 encoder.debug_check_bounds::<Self>(offset);
1021 encoder.write_num(self.into_primitive(), offset);
1022 Ok(())
1023 }
1024 }
1025
1026 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenBlobError {
1027 #[inline(always)]
1028 fn new_empty() -> Self {
1029 Self::OutOfSpace
1030 }
1031
1032 #[inline]
1033 unsafe fn decode(
1034 &mut self,
1035 decoder: &mut fidl::encoding::Decoder<'_, D>,
1036 offset: usize,
1037 _depth: fidl::encoding::Depth,
1038 ) -> fidl::Result<()> {
1039 decoder.debug_check_bounds::<Self>(offset);
1040 let prim = decoder.read_num::<u32>(offset);
1041
1042 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1043 Ok(())
1044 }
1045 }
1046 unsafe impl fidl::encoding::TypeMarker for RepositoryStorageType {
1047 type Owned = Self;
1048
1049 #[inline(always)]
1050 fn inline_align(_context: fidl::encoding::Context) -> usize {
1051 std::mem::align_of::<u32>()
1052 }
1053
1054 #[inline(always)]
1055 fn inline_size(_context: fidl::encoding::Context) -> usize {
1056 std::mem::size_of::<u32>()
1057 }
1058
1059 #[inline(always)]
1060 fn encode_is_copy() -> bool {
1061 true
1062 }
1063
1064 #[inline(always)]
1065 fn decode_is_copy() -> bool {
1066 false
1067 }
1068 }
1069
1070 impl fidl::encoding::ValueTypeMarker for RepositoryStorageType {
1071 type Borrowed<'a> = Self;
1072 #[inline(always)]
1073 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1074 *value
1075 }
1076 }
1077
1078 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1079 for RepositoryStorageType
1080 {
1081 #[inline]
1082 unsafe fn encode(
1083 self,
1084 encoder: &mut fidl::encoding::Encoder<'_, D>,
1085 offset: usize,
1086 _depth: fidl::encoding::Depth,
1087 ) -> fidl::Result<()> {
1088 encoder.debug_check_bounds::<Self>(offset);
1089 encoder.write_num(self.into_primitive(), offset);
1090 Ok(())
1091 }
1092 }
1093
1094 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RepositoryStorageType {
1095 #[inline(always)]
1096 fn new_empty() -> Self {
1097 Self::Ephemeral
1098 }
1099
1100 #[inline]
1101 unsafe fn decode(
1102 &mut self,
1103 decoder: &mut fidl::encoding::Decoder<'_, D>,
1104 offset: usize,
1105 _depth: fidl::encoding::Depth,
1106 ) -> fidl::Result<()> {
1107 decoder.debug_check_bounds::<Self>(offset);
1108 let prim = decoder.read_num::<u32>(offset);
1109
1110 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1111 Ok(())
1112 }
1113 }
1114 unsafe impl fidl::encoding::TypeMarker for ResolveError {
1115 type Owned = Self;
1116
1117 #[inline(always)]
1118 fn inline_align(_context: fidl::encoding::Context) -> usize {
1119 std::mem::align_of::<i32>()
1120 }
1121
1122 #[inline(always)]
1123 fn inline_size(_context: fidl::encoding::Context) -> usize {
1124 std::mem::size_of::<i32>()
1125 }
1126
1127 #[inline(always)]
1128 fn encode_is_copy() -> bool {
1129 true
1130 }
1131
1132 #[inline(always)]
1133 fn decode_is_copy() -> bool {
1134 false
1135 }
1136 }
1137
1138 impl fidl::encoding::ValueTypeMarker for ResolveError {
1139 type Borrowed<'a> = Self;
1140 #[inline(always)]
1141 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1142 *value
1143 }
1144 }
1145
1146 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ResolveError {
1147 #[inline]
1148 unsafe fn encode(
1149 self,
1150 encoder: &mut fidl::encoding::Encoder<'_, D>,
1151 offset: usize,
1152 _depth: fidl::encoding::Depth,
1153 ) -> fidl::Result<()> {
1154 encoder.debug_check_bounds::<Self>(offset);
1155 encoder.write_num(self.into_primitive(), offset);
1156 Ok(())
1157 }
1158 }
1159
1160 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolveError {
1161 #[inline(always)]
1162 fn new_empty() -> Self {
1163 Self::Internal
1164 }
1165
1166 #[inline]
1167 unsafe fn decode(
1168 &mut self,
1169 decoder: &mut fidl::encoding::Decoder<'_, D>,
1170 offset: usize,
1171 _depth: fidl::encoding::Depth,
1172 ) -> fidl::Result<()> {
1173 decoder.debug_check_bounds::<Self>(offset);
1174 let prim = decoder.read_num::<i32>(offset);
1175
1176 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1177 Ok(())
1178 }
1179 }
1180 unsafe impl fidl::encoding::TypeMarker for SetUpgradableUrlsError {
1181 type Owned = Self;
1182
1183 #[inline(always)]
1184 fn inline_align(_context: fidl::encoding::Context) -> usize {
1185 std::mem::align_of::<u32>()
1186 }
1187
1188 #[inline(always)]
1189 fn inline_size(_context: fidl::encoding::Context) -> usize {
1190 std::mem::size_of::<u32>()
1191 }
1192
1193 #[inline(always)]
1194 fn encode_is_copy() -> bool {
1195 false
1196 }
1197
1198 #[inline(always)]
1199 fn decode_is_copy() -> bool {
1200 false
1201 }
1202 }
1203
1204 impl fidl::encoding::ValueTypeMarker for SetUpgradableUrlsError {
1205 type Borrowed<'a> = Self;
1206 #[inline(always)]
1207 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1208 *value
1209 }
1210 }
1211
1212 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1213 for SetUpgradableUrlsError
1214 {
1215 #[inline]
1216 unsafe fn encode(
1217 self,
1218 encoder: &mut fidl::encoding::Encoder<'_, D>,
1219 offset: usize,
1220 _depth: fidl::encoding::Depth,
1221 ) -> fidl::Result<()> {
1222 encoder.debug_check_bounds::<Self>(offset);
1223 encoder.write_num(self.into_primitive(), offset);
1224 Ok(())
1225 }
1226 }
1227
1228 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1229 for SetUpgradableUrlsError
1230 {
1231 #[inline(always)]
1232 fn new_empty() -> Self {
1233 Self::unknown()
1234 }
1235
1236 #[inline]
1237 unsafe fn decode(
1238 &mut self,
1239 decoder: &mut fidl::encoding::Decoder<'_, D>,
1240 offset: usize,
1241 _depth: fidl::encoding::Depth,
1242 ) -> fidl::Result<()> {
1243 decoder.debug_check_bounds::<Self>(offset);
1244 let prim = decoder.read_num::<u32>(offset);
1245
1246 *self = Self::from_primitive_allow_unknown(prim);
1247 Ok(())
1248 }
1249 }
1250 unsafe impl fidl::encoding::TypeMarker for WriteError {
1251 type Owned = Self;
1252
1253 #[inline(always)]
1254 fn inline_align(_context: fidl::encoding::Context) -> usize {
1255 std::mem::align_of::<u32>()
1256 }
1257
1258 #[inline(always)]
1259 fn inline_size(_context: fidl::encoding::Context) -> usize {
1260 std::mem::size_of::<u32>()
1261 }
1262
1263 #[inline(always)]
1264 fn encode_is_copy() -> bool {
1265 true
1266 }
1267
1268 #[inline(always)]
1269 fn decode_is_copy() -> bool {
1270 false
1271 }
1272 }
1273
1274 impl fidl::encoding::ValueTypeMarker for WriteError {
1275 type Borrowed<'a> = Self;
1276 #[inline(always)]
1277 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1278 *value
1279 }
1280 }
1281
1282 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for WriteError {
1283 #[inline]
1284 unsafe fn encode(
1285 self,
1286 encoder: &mut fidl::encoding::Encoder<'_, D>,
1287 offset: usize,
1288 _depth: fidl::encoding::Depth,
1289 ) -> fidl::Result<()> {
1290 encoder.debug_check_bounds::<Self>(offset);
1291 encoder.write_num(self.into_primitive(), offset);
1292 Ok(())
1293 }
1294 }
1295
1296 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for WriteError {
1297 #[inline(always)]
1298 fn new_empty() -> Self {
1299 Self::UnknownUrl
1300 }
1301
1302 #[inline]
1303 unsafe fn decode(
1304 &mut self,
1305 decoder: &mut fidl::encoding::Decoder<'_, D>,
1306 offset: usize,
1307 _depth: fidl::encoding::Depth,
1308 ) -> fidl::Result<()> {
1309 decoder.debug_check_bounds::<Self>(offset);
1310 let prim = decoder.read_num::<u32>(offset);
1311
1312 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
1313 Ok(())
1314 }
1315 }
1316
1317 impl fidl::encoding::ValueTypeMarker for BlobId {
1318 type Borrowed<'a> = &'a Self;
1319 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1320 value
1321 }
1322 }
1323
1324 unsafe impl fidl::encoding::TypeMarker for BlobId {
1325 type Owned = Self;
1326
1327 #[inline(always)]
1328 fn inline_align(_context: fidl::encoding::Context) -> usize {
1329 1
1330 }
1331
1332 #[inline(always)]
1333 fn inline_size(_context: fidl::encoding::Context) -> usize {
1334 32
1335 }
1336 #[inline(always)]
1337 fn encode_is_copy() -> bool {
1338 true
1339 }
1340
1341 #[inline(always)]
1342 fn decode_is_copy() -> bool {
1343 true
1344 }
1345 }
1346
1347 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BlobId, D> for &BlobId {
1348 #[inline]
1349 unsafe fn encode(
1350 self,
1351 encoder: &mut fidl::encoding::Encoder<'_, D>,
1352 offset: usize,
1353 _depth: fidl::encoding::Depth,
1354 ) -> fidl::Result<()> {
1355 encoder.debug_check_bounds::<BlobId>(offset);
1356 unsafe {
1357 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1359 (buf_ptr as *mut BlobId).write_unaligned((self as *const BlobId).read());
1360 }
1363 Ok(())
1364 }
1365 }
1366 unsafe impl<
1367 D: fidl::encoding::ResourceDialect,
1368 T0: fidl::encoding::Encode<fidl::encoding::Array<u8, 32>, D>,
1369 > fidl::encoding::Encode<BlobId, D> for (T0,)
1370 {
1371 #[inline]
1372 unsafe fn encode(
1373 self,
1374 encoder: &mut fidl::encoding::Encoder<'_, D>,
1375 offset: usize,
1376 depth: fidl::encoding::Depth,
1377 ) -> fidl::Result<()> {
1378 encoder.debug_check_bounds::<BlobId>(offset);
1379 self.0.encode(encoder, offset + 0, depth)?;
1383 Ok(())
1384 }
1385 }
1386
1387 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlobId {
1388 #[inline(always)]
1389 fn new_empty() -> Self {
1390 Self { merkle_root: fidl::new_empty!(fidl::encoding::Array<u8, 32>, D) }
1391 }
1392
1393 #[inline]
1394 unsafe fn decode(
1395 &mut self,
1396 decoder: &mut fidl::encoding::Decoder<'_, D>,
1397 offset: usize,
1398 _depth: fidl::encoding::Depth,
1399 ) -> fidl::Result<()> {
1400 decoder.debug_check_bounds::<Self>(offset);
1401 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1402 unsafe {
1405 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
1406 }
1407 Ok(())
1408 }
1409 }
1410
1411 impl fidl::encoding::ValueTypeMarker for BlobIdIteratorNextResponse {
1412 type Borrowed<'a> = &'a Self;
1413 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1414 value
1415 }
1416 }
1417
1418 unsafe impl fidl::encoding::TypeMarker for BlobIdIteratorNextResponse {
1419 type Owned = Self;
1420
1421 #[inline(always)]
1422 fn inline_align(_context: fidl::encoding::Context) -> usize {
1423 8
1424 }
1425
1426 #[inline(always)]
1427 fn inline_size(_context: fidl::encoding::Context) -> usize {
1428 16
1429 }
1430 }
1431
1432 unsafe impl<D: fidl::encoding::ResourceDialect>
1433 fidl::encoding::Encode<BlobIdIteratorNextResponse, D> for &BlobIdIteratorNextResponse
1434 {
1435 #[inline]
1436 unsafe fn encode(
1437 self,
1438 encoder: &mut fidl::encoding::Encoder<'_, D>,
1439 offset: usize,
1440 _depth: fidl::encoding::Depth,
1441 ) -> fidl::Result<()> {
1442 encoder.debug_check_bounds::<BlobIdIteratorNextResponse>(offset);
1443 fidl::encoding::Encode::<BlobIdIteratorNextResponse, D>::encode(
1445 (
1446 <fidl::encoding::UnboundedVector<BlobId> as fidl::encoding::ValueTypeMarker>::borrow(&self.blobs),
1447 ),
1448 encoder, offset, _depth
1449 )
1450 }
1451 }
1452 unsafe impl<
1453 D: fidl::encoding::ResourceDialect,
1454 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<BlobId>, D>,
1455 > fidl::encoding::Encode<BlobIdIteratorNextResponse, D> for (T0,)
1456 {
1457 #[inline]
1458 unsafe fn encode(
1459 self,
1460 encoder: &mut fidl::encoding::Encoder<'_, D>,
1461 offset: usize,
1462 depth: fidl::encoding::Depth,
1463 ) -> fidl::Result<()> {
1464 encoder.debug_check_bounds::<BlobIdIteratorNextResponse>(offset);
1465 self.0.encode(encoder, offset + 0, depth)?;
1469 Ok(())
1470 }
1471 }
1472
1473 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1474 for BlobIdIteratorNextResponse
1475 {
1476 #[inline(always)]
1477 fn new_empty() -> Self {
1478 Self { blobs: fidl::new_empty!(fidl::encoding::UnboundedVector<BlobId>, D) }
1479 }
1480
1481 #[inline]
1482 unsafe fn decode(
1483 &mut self,
1484 decoder: &mut fidl::encoding::Decoder<'_, D>,
1485 offset: usize,
1486 _depth: fidl::encoding::Depth,
1487 ) -> fidl::Result<()> {
1488 decoder.debug_check_bounds::<Self>(offset);
1489 fidl::decode!(
1491 fidl::encoding::UnboundedVector<BlobId>,
1492 D,
1493 &mut self.blobs,
1494 decoder,
1495 offset + 0,
1496 _depth
1497 )?;
1498 Ok(())
1499 }
1500 }
1501
1502 impl fidl::encoding::ValueTypeMarker for BlobInfo {
1503 type Borrowed<'a> = &'a Self;
1504 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1505 value
1506 }
1507 }
1508
1509 unsafe impl fidl::encoding::TypeMarker for BlobInfo {
1510 type Owned = Self;
1511
1512 #[inline(always)]
1513 fn inline_align(_context: fidl::encoding::Context) -> usize {
1514 8
1515 }
1516
1517 #[inline(always)]
1518 fn inline_size(_context: fidl::encoding::Context) -> usize {
1519 40
1520 }
1521 #[inline(always)]
1522 fn encode_is_copy() -> bool {
1523 true
1524 }
1525
1526 #[inline(always)]
1527 fn decode_is_copy() -> bool {
1528 true
1529 }
1530 }
1531
1532 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BlobInfo, D> for &BlobInfo {
1533 #[inline]
1534 unsafe fn encode(
1535 self,
1536 encoder: &mut fidl::encoding::Encoder<'_, D>,
1537 offset: usize,
1538 _depth: fidl::encoding::Depth,
1539 ) -> fidl::Result<()> {
1540 encoder.debug_check_bounds::<BlobInfo>(offset);
1541 unsafe {
1542 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1544 (buf_ptr as *mut BlobInfo).write_unaligned((self as *const BlobInfo).read());
1545 }
1548 Ok(())
1549 }
1550 }
1551 unsafe impl<
1552 D: fidl::encoding::ResourceDialect,
1553 T0: fidl::encoding::Encode<BlobId, D>,
1554 T1: fidl::encoding::Encode<u64, D>,
1555 > fidl::encoding::Encode<BlobInfo, D> for (T0, T1)
1556 {
1557 #[inline]
1558 unsafe fn encode(
1559 self,
1560 encoder: &mut fidl::encoding::Encoder<'_, D>,
1561 offset: usize,
1562 depth: fidl::encoding::Depth,
1563 ) -> fidl::Result<()> {
1564 encoder.debug_check_bounds::<BlobInfo>(offset);
1565 self.0.encode(encoder, offset + 0, depth)?;
1569 self.1.encode(encoder, offset + 32, depth)?;
1570 Ok(())
1571 }
1572 }
1573
1574 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BlobInfo {
1575 #[inline(always)]
1576 fn new_empty() -> Self {
1577 Self { blob_id: fidl::new_empty!(BlobId, D), length: fidl::new_empty!(u64, D) }
1578 }
1579
1580 #[inline]
1581 unsafe fn decode(
1582 &mut self,
1583 decoder: &mut fidl::encoding::Decoder<'_, D>,
1584 offset: usize,
1585 _depth: fidl::encoding::Depth,
1586 ) -> fidl::Result<()> {
1587 decoder.debug_check_bounds::<Self>(offset);
1588 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1589 unsafe {
1592 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 40);
1593 }
1594 Ok(())
1595 }
1596 }
1597
1598 impl fidl::encoding::ValueTypeMarker for BlobInfoIteratorNextResponse {
1599 type Borrowed<'a> = &'a Self;
1600 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1601 value
1602 }
1603 }
1604
1605 unsafe impl fidl::encoding::TypeMarker for BlobInfoIteratorNextResponse {
1606 type Owned = Self;
1607
1608 #[inline(always)]
1609 fn inline_align(_context: fidl::encoding::Context) -> usize {
1610 8
1611 }
1612
1613 #[inline(always)]
1614 fn inline_size(_context: fidl::encoding::Context) -> usize {
1615 16
1616 }
1617 }
1618
1619 unsafe impl<D: fidl::encoding::ResourceDialect>
1620 fidl::encoding::Encode<BlobInfoIteratorNextResponse, D> for &BlobInfoIteratorNextResponse
1621 {
1622 #[inline]
1623 unsafe fn encode(
1624 self,
1625 encoder: &mut fidl::encoding::Encoder<'_, D>,
1626 offset: usize,
1627 _depth: fidl::encoding::Depth,
1628 ) -> fidl::Result<()> {
1629 encoder.debug_check_bounds::<BlobInfoIteratorNextResponse>(offset);
1630 fidl::encoding::Encode::<BlobInfoIteratorNextResponse, D>::encode(
1632 (
1633 <fidl::encoding::UnboundedVector<BlobInfo> as fidl::encoding::ValueTypeMarker>::borrow(&self.blobs),
1634 ),
1635 encoder, offset, _depth
1636 )
1637 }
1638 }
1639 unsafe impl<
1640 D: fidl::encoding::ResourceDialect,
1641 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<BlobInfo>, D>,
1642 > fidl::encoding::Encode<BlobInfoIteratorNextResponse, D> for (T0,)
1643 {
1644 #[inline]
1645 unsafe fn encode(
1646 self,
1647 encoder: &mut fidl::encoding::Encoder<'_, D>,
1648 offset: usize,
1649 depth: fidl::encoding::Depth,
1650 ) -> fidl::Result<()> {
1651 encoder.debug_check_bounds::<BlobInfoIteratorNextResponse>(offset);
1652 self.0.encode(encoder, offset + 0, depth)?;
1656 Ok(())
1657 }
1658 }
1659
1660 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1661 for BlobInfoIteratorNextResponse
1662 {
1663 #[inline(always)]
1664 fn new_empty() -> Self {
1665 Self { blobs: fidl::new_empty!(fidl::encoding::UnboundedVector<BlobInfo>, D) }
1666 }
1667
1668 #[inline]
1669 unsafe fn decode(
1670 &mut self,
1671 decoder: &mut fidl::encoding::Decoder<'_, D>,
1672 offset: usize,
1673 _depth: fidl::encoding::Depth,
1674 ) -> fidl::Result<()> {
1675 decoder.debug_check_bounds::<Self>(offset);
1676 fidl::decode!(
1678 fidl::encoding::UnboundedVector<BlobInfo>,
1679 D,
1680 &mut self.blobs,
1681 decoder,
1682 offset + 0,
1683 _depth
1684 )?;
1685 Ok(())
1686 }
1687 }
1688
1689 impl fidl::encoding::ValueTypeMarker for CupGetInfoRequest {
1690 type Borrowed<'a> = &'a Self;
1691 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1692 value
1693 }
1694 }
1695
1696 unsafe impl fidl::encoding::TypeMarker for CupGetInfoRequest {
1697 type Owned = Self;
1698
1699 #[inline(always)]
1700 fn inline_align(_context: fidl::encoding::Context) -> usize {
1701 8
1702 }
1703
1704 #[inline(always)]
1705 fn inline_size(_context: fidl::encoding::Context) -> usize {
1706 16
1707 }
1708 }
1709
1710 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CupGetInfoRequest, D>
1711 for &CupGetInfoRequest
1712 {
1713 #[inline]
1714 unsafe fn encode(
1715 self,
1716 encoder: &mut fidl::encoding::Encoder<'_, D>,
1717 offset: usize,
1718 _depth: fidl::encoding::Depth,
1719 ) -> fidl::Result<()> {
1720 encoder.debug_check_bounds::<CupGetInfoRequest>(offset);
1721 fidl::encoding::Encode::<CupGetInfoRequest, D>::encode(
1723 (<PackageUrl as fidl::encoding::ValueTypeMarker>::borrow(&self.url),),
1724 encoder,
1725 offset,
1726 _depth,
1727 )
1728 }
1729 }
1730 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PackageUrl, D>>
1731 fidl::encoding::Encode<CupGetInfoRequest, D> for (T0,)
1732 {
1733 #[inline]
1734 unsafe fn encode(
1735 self,
1736 encoder: &mut fidl::encoding::Encoder<'_, D>,
1737 offset: usize,
1738 depth: fidl::encoding::Depth,
1739 ) -> fidl::Result<()> {
1740 encoder.debug_check_bounds::<CupGetInfoRequest>(offset);
1741 self.0.encode(encoder, offset + 0, depth)?;
1745 Ok(())
1746 }
1747 }
1748
1749 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CupGetInfoRequest {
1750 #[inline(always)]
1751 fn new_empty() -> Self {
1752 Self { url: fidl::new_empty!(PackageUrl, D) }
1753 }
1754
1755 #[inline]
1756 unsafe fn decode(
1757 &mut self,
1758 decoder: &mut fidl::encoding::Decoder<'_, D>,
1759 offset: usize,
1760 _depth: fidl::encoding::Depth,
1761 ) -> fidl::Result<()> {
1762 decoder.debug_check_bounds::<Self>(offset);
1763 fidl::decode!(PackageUrl, D, &mut self.url, decoder, offset + 0, _depth)?;
1765 Ok(())
1766 }
1767 }
1768
1769 impl fidl::encoding::ValueTypeMarker for CupWriteRequest {
1770 type Borrowed<'a> = &'a Self;
1771 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1772 value
1773 }
1774 }
1775
1776 unsafe impl fidl::encoding::TypeMarker for CupWriteRequest {
1777 type Owned = Self;
1778
1779 #[inline(always)]
1780 fn inline_align(_context: fidl::encoding::Context) -> usize {
1781 8
1782 }
1783
1784 #[inline(always)]
1785 fn inline_size(_context: fidl::encoding::Context) -> usize {
1786 32
1787 }
1788 }
1789
1790 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CupWriteRequest, D>
1791 for &CupWriteRequest
1792 {
1793 #[inline]
1794 unsafe fn encode(
1795 self,
1796 encoder: &mut fidl::encoding::Encoder<'_, D>,
1797 offset: usize,
1798 _depth: fidl::encoding::Depth,
1799 ) -> fidl::Result<()> {
1800 encoder.debug_check_bounds::<CupWriteRequest>(offset);
1801 fidl::encoding::Encode::<CupWriteRequest, D>::encode(
1803 (
1804 <PackageUrl as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
1805 <CupData as fidl::encoding::ValueTypeMarker>::borrow(&self.cup),
1806 ),
1807 encoder,
1808 offset,
1809 _depth,
1810 )
1811 }
1812 }
1813 unsafe impl<
1814 D: fidl::encoding::ResourceDialect,
1815 T0: fidl::encoding::Encode<PackageUrl, D>,
1816 T1: fidl::encoding::Encode<CupData, D>,
1817 > fidl::encoding::Encode<CupWriteRequest, D> for (T0, T1)
1818 {
1819 #[inline]
1820 unsafe fn encode(
1821 self,
1822 encoder: &mut fidl::encoding::Encoder<'_, D>,
1823 offset: usize,
1824 depth: fidl::encoding::Depth,
1825 ) -> fidl::Result<()> {
1826 encoder.debug_check_bounds::<CupWriteRequest>(offset);
1827 self.0.encode(encoder, offset + 0, depth)?;
1831 self.1.encode(encoder, offset + 16, depth)?;
1832 Ok(())
1833 }
1834 }
1835
1836 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CupWriteRequest {
1837 #[inline(always)]
1838 fn new_empty() -> Self {
1839 Self { url: fidl::new_empty!(PackageUrl, D), cup: fidl::new_empty!(CupData, D) }
1840 }
1841
1842 #[inline]
1843 unsafe fn decode(
1844 &mut self,
1845 decoder: &mut fidl::encoding::Decoder<'_, D>,
1846 offset: usize,
1847 _depth: fidl::encoding::Depth,
1848 ) -> fidl::Result<()> {
1849 decoder.debug_check_bounds::<Self>(offset);
1850 fidl::decode!(PackageUrl, D, &mut self.url, decoder, offset + 0, _depth)?;
1852 fidl::decode!(CupData, D, &mut self.cup, decoder, offset + 16, _depth)?;
1853 Ok(())
1854 }
1855 }
1856
1857 impl fidl::encoding::ValueTypeMarker for CupGetInfoResponse {
1858 type Borrowed<'a> = &'a Self;
1859 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1860 value
1861 }
1862 }
1863
1864 unsafe impl fidl::encoding::TypeMarker for CupGetInfoResponse {
1865 type Owned = Self;
1866
1867 #[inline(always)]
1868 fn inline_align(_context: fidl::encoding::Context) -> usize {
1869 8
1870 }
1871
1872 #[inline(always)]
1873 fn inline_size(_context: fidl::encoding::Context) -> usize {
1874 32
1875 }
1876 }
1877
1878 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CupGetInfoResponse, D>
1879 for &CupGetInfoResponse
1880 {
1881 #[inline]
1882 unsafe fn encode(
1883 self,
1884 encoder: &mut fidl::encoding::Encoder<'_, D>,
1885 offset: usize,
1886 _depth: fidl::encoding::Depth,
1887 ) -> fidl::Result<()> {
1888 encoder.debug_check_bounds::<CupGetInfoResponse>(offset);
1889 fidl::encoding::Encode::<CupGetInfoResponse, D>::encode(
1891 (
1892 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
1893 &self.version,
1894 ),
1895 <fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(
1896 &self.channel,
1897 ),
1898 ),
1899 encoder,
1900 offset,
1901 _depth,
1902 )
1903 }
1904 }
1905 unsafe impl<
1906 D: fidl::encoding::ResourceDialect,
1907 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
1908 T1: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
1909 > fidl::encoding::Encode<CupGetInfoResponse, D> for (T0, T1)
1910 {
1911 #[inline]
1912 unsafe fn encode(
1913 self,
1914 encoder: &mut fidl::encoding::Encoder<'_, D>,
1915 offset: usize,
1916 depth: fidl::encoding::Depth,
1917 ) -> fidl::Result<()> {
1918 encoder.debug_check_bounds::<CupGetInfoResponse>(offset);
1919 self.0.encode(encoder, offset + 0, depth)?;
1923 self.1.encode(encoder, offset + 16, depth)?;
1924 Ok(())
1925 }
1926 }
1927
1928 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CupGetInfoResponse {
1929 #[inline(always)]
1930 fn new_empty() -> Self {
1931 Self {
1932 version: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
1933 channel: fidl::new_empty!(fidl::encoding::BoundedString<128>, D),
1934 }
1935 }
1936
1937 #[inline]
1938 unsafe fn decode(
1939 &mut self,
1940 decoder: &mut fidl::encoding::Decoder<'_, D>,
1941 offset: usize,
1942 _depth: fidl::encoding::Depth,
1943 ) -> fidl::Result<()> {
1944 decoder.debug_check_bounds::<Self>(offset);
1945 fidl::decode!(
1947 fidl::encoding::BoundedString<64>,
1948 D,
1949 &mut self.version,
1950 decoder,
1951 offset + 0,
1952 _depth
1953 )?;
1954 fidl::decode!(
1955 fidl::encoding::BoundedString<128>,
1956 D,
1957 &mut self.channel,
1958 decoder,
1959 offset + 16,
1960 _depth
1961 )?;
1962 Ok(())
1963 }
1964 }
1965
1966 impl fidl::encoding::ValueTypeMarker for NeededBlobsBlobWrittenRequest {
1967 type Borrowed<'a> = &'a Self;
1968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1969 value
1970 }
1971 }
1972
1973 unsafe impl fidl::encoding::TypeMarker for NeededBlobsBlobWrittenRequest {
1974 type Owned = Self;
1975
1976 #[inline(always)]
1977 fn inline_align(_context: fidl::encoding::Context) -> usize {
1978 1
1979 }
1980
1981 #[inline(always)]
1982 fn inline_size(_context: fidl::encoding::Context) -> usize {
1983 32
1984 }
1985 #[inline(always)]
1986 fn encode_is_copy() -> bool {
1987 true
1988 }
1989
1990 #[inline(always)]
1991 fn decode_is_copy() -> bool {
1992 true
1993 }
1994 }
1995
1996 unsafe impl<D: fidl::encoding::ResourceDialect>
1997 fidl::encoding::Encode<NeededBlobsBlobWrittenRequest, D>
1998 for &NeededBlobsBlobWrittenRequest
1999 {
2000 #[inline]
2001 unsafe fn encode(
2002 self,
2003 encoder: &mut fidl::encoding::Encoder<'_, D>,
2004 offset: usize,
2005 _depth: fidl::encoding::Depth,
2006 ) -> fidl::Result<()> {
2007 encoder.debug_check_bounds::<NeededBlobsBlobWrittenRequest>(offset);
2008 unsafe {
2009 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2011 (buf_ptr as *mut NeededBlobsBlobWrittenRequest)
2012 .write_unaligned((self as *const NeededBlobsBlobWrittenRequest).read());
2013 }
2016 Ok(())
2017 }
2018 }
2019 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<BlobId, D>>
2020 fidl::encoding::Encode<NeededBlobsBlobWrittenRequest, D> for (T0,)
2021 {
2022 #[inline]
2023 unsafe fn encode(
2024 self,
2025 encoder: &mut fidl::encoding::Encoder<'_, D>,
2026 offset: usize,
2027 depth: fidl::encoding::Depth,
2028 ) -> fidl::Result<()> {
2029 encoder.debug_check_bounds::<NeededBlobsBlobWrittenRequest>(offset);
2030 self.0.encode(encoder, offset + 0, depth)?;
2034 Ok(())
2035 }
2036 }
2037
2038 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2039 for NeededBlobsBlobWrittenRequest
2040 {
2041 #[inline(always)]
2042 fn new_empty() -> Self {
2043 Self { blob_id: fidl::new_empty!(BlobId, D) }
2044 }
2045
2046 #[inline]
2047 unsafe fn decode(
2048 &mut self,
2049 decoder: &mut fidl::encoding::Decoder<'_, D>,
2050 offset: usize,
2051 _depth: fidl::encoding::Depth,
2052 ) -> fidl::Result<()> {
2053 decoder.debug_check_bounds::<Self>(offset);
2054 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2055 unsafe {
2058 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2059 }
2060 Ok(())
2061 }
2062 }
2063
2064 impl fidl::encoding::ValueTypeMarker for NeededBlobsOpenBlobRequest {
2065 type Borrowed<'a> = &'a Self;
2066 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2067 value
2068 }
2069 }
2070
2071 unsafe impl fidl::encoding::TypeMarker for NeededBlobsOpenBlobRequest {
2072 type Owned = Self;
2073
2074 #[inline(always)]
2075 fn inline_align(_context: fidl::encoding::Context) -> usize {
2076 1
2077 }
2078
2079 #[inline(always)]
2080 fn inline_size(_context: fidl::encoding::Context) -> usize {
2081 32
2082 }
2083 #[inline(always)]
2084 fn encode_is_copy() -> bool {
2085 true
2086 }
2087
2088 #[inline(always)]
2089 fn decode_is_copy() -> bool {
2090 true
2091 }
2092 }
2093
2094 unsafe impl<D: fidl::encoding::ResourceDialect>
2095 fidl::encoding::Encode<NeededBlobsOpenBlobRequest, D> for &NeededBlobsOpenBlobRequest
2096 {
2097 #[inline]
2098 unsafe fn encode(
2099 self,
2100 encoder: &mut fidl::encoding::Encoder<'_, D>,
2101 offset: usize,
2102 _depth: fidl::encoding::Depth,
2103 ) -> fidl::Result<()> {
2104 encoder.debug_check_bounds::<NeededBlobsOpenBlobRequest>(offset);
2105 unsafe {
2106 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2108 (buf_ptr as *mut NeededBlobsOpenBlobRequest)
2109 .write_unaligned((self as *const NeededBlobsOpenBlobRequest).read());
2110 }
2113 Ok(())
2114 }
2115 }
2116 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<BlobId, D>>
2117 fidl::encoding::Encode<NeededBlobsOpenBlobRequest, D> for (T0,)
2118 {
2119 #[inline]
2120 unsafe fn encode(
2121 self,
2122 encoder: &mut fidl::encoding::Encoder<'_, D>,
2123 offset: usize,
2124 depth: fidl::encoding::Depth,
2125 ) -> fidl::Result<()> {
2126 encoder.debug_check_bounds::<NeededBlobsOpenBlobRequest>(offset);
2127 self.0.encode(encoder, offset + 0, depth)?;
2131 Ok(())
2132 }
2133 }
2134
2135 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2136 for NeededBlobsOpenBlobRequest
2137 {
2138 #[inline(always)]
2139 fn new_empty() -> Self {
2140 Self { blob_id: fidl::new_empty!(BlobId, D) }
2141 }
2142
2143 #[inline]
2144 unsafe fn decode(
2145 &mut self,
2146 decoder: &mut fidl::encoding::Decoder<'_, D>,
2147 offset: usize,
2148 _depth: fidl::encoding::Depth,
2149 ) -> fidl::Result<()> {
2150 decoder.debug_check_bounds::<Self>(offset);
2151 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2152 unsafe {
2155 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2156 }
2157 Ok(())
2158 }
2159 }
2160
2161 impl fidl::encoding::ValueTypeMarker for PackageCacheSetUpgradableUrlsRequest {
2162 type Borrowed<'a> = &'a Self;
2163 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2164 value
2165 }
2166 }
2167
2168 unsafe impl fidl::encoding::TypeMarker for PackageCacheSetUpgradableUrlsRequest {
2169 type Owned = Self;
2170
2171 #[inline(always)]
2172 fn inline_align(_context: fidl::encoding::Context) -> usize {
2173 8
2174 }
2175
2176 #[inline(always)]
2177 fn inline_size(_context: fidl::encoding::Context) -> usize {
2178 16
2179 }
2180 }
2181
2182 unsafe impl<D: fidl::encoding::ResourceDialect>
2183 fidl::encoding::Encode<PackageCacheSetUpgradableUrlsRequest, D>
2184 for &PackageCacheSetUpgradableUrlsRequest
2185 {
2186 #[inline]
2187 unsafe fn encode(
2188 self,
2189 encoder: &mut fidl::encoding::Encoder<'_, D>,
2190 offset: usize,
2191 _depth: fidl::encoding::Depth,
2192 ) -> fidl::Result<()> {
2193 encoder.debug_check_bounds::<PackageCacheSetUpgradableUrlsRequest>(offset);
2194 fidl::encoding::Encode::<PackageCacheSetUpgradableUrlsRequest, D>::encode(
2196 (
2197 <fidl::encoding::UnboundedVector<PackageUrl> as fidl::encoding::ValueTypeMarker>::borrow(&self.pinned_urls),
2198 ),
2199 encoder, offset, _depth
2200 )
2201 }
2202 }
2203 unsafe impl<
2204 D: fidl::encoding::ResourceDialect,
2205 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<PackageUrl>, D>,
2206 > fidl::encoding::Encode<PackageCacheSetUpgradableUrlsRequest, D> for (T0,)
2207 {
2208 #[inline]
2209 unsafe fn encode(
2210 self,
2211 encoder: &mut fidl::encoding::Encoder<'_, D>,
2212 offset: usize,
2213 depth: fidl::encoding::Depth,
2214 ) -> fidl::Result<()> {
2215 encoder.debug_check_bounds::<PackageCacheSetUpgradableUrlsRequest>(offset);
2216 self.0.encode(encoder, offset + 0, depth)?;
2220 Ok(())
2221 }
2222 }
2223
2224 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2225 for PackageCacheSetUpgradableUrlsRequest
2226 {
2227 #[inline(always)]
2228 fn new_empty() -> Self {
2229 Self { pinned_urls: fidl::new_empty!(fidl::encoding::UnboundedVector<PackageUrl>, D) }
2230 }
2231
2232 #[inline]
2233 unsafe fn decode(
2234 &mut self,
2235 decoder: &mut fidl::encoding::Decoder<'_, D>,
2236 offset: usize,
2237 _depth: fidl::encoding::Depth,
2238 ) -> fidl::Result<()> {
2239 decoder.debug_check_bounds::<Self>(offset);
2240 fidl::decode!(
2242 fidl::encoding::UnboundedVector<PackageUrl>,
2243 D,
2244 &mut self.pinned_urls,
2245 decoder,
2246 offset + 0,
2247 _depth
2248 )?;
2249 Ok(())
2250 }
2251 }
2252
2253 impl fidl::encoding::ValueTypeMarker for PackageIndexEntry {
2254 type Borrowed<'a> = &'a Self;
2255 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2256 value
2257 }
2258 }
2259
2260 unsafe impl fidl::encoding::TypeMarker for PackageIndexEntry {
2261 type Owned = Self;
2262
2263 #[inline(always)]
2264 fn inline_align(_context: fidl::encoding::Context) -> usize {
2265 8
2266 }
2267
2268 #[inline(always)]
2269 fn inline_size(_context: fidl::encoding::Context) -> usize {
2270 48
2271 }
2272 }
2273
2274 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PackageIndexEntry, D>
2275 for &PackageIndexEntry
2276 {
2277 #[inline]
2278 unsafe fn encode(
2279 self,
2280 encoder: &mut fidl::encoding::Encoder<'_, D>,
2281 offset: usize,
2282 _depth: fidl::encoding::Depth,
2283 ) -> fidl::Result<()> {
2284 encoder.debug_check_bounds::<PackageIndexEntry>(offset);
2285 fidl::encoding::Encode::<PackageIndexEntry, D>::encode(
2287 (
2288 <PackageUrl as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),
2289 <BlobId as fidl::encoding::ValueTypeMarker>::borrow(&self.meta_far_blob_id),
2290 ),
2291 encoder,
2292 offset,
2293 _depth,
2294 )
2295 }
2296 }
2297 unsafe impl<
2298 D: fidl::encoding::ResourceDialect,
2299 T0: fidl::encoding::Encode<PackageUrl, D>,
2300 T1: fidl::encoding::Encode<BlobId, D>,
2301 > fidl::encoding::Encode<PackageIndexEntry, D> for (T0, T1)
2302 {
2303 #[inline]
2304 unsafe fn encode(
2305 self,
2306 encoder: &mut fidl::encoding::Encoder<'_, D>,
2307 offset: usize,
2308 depth: fidl::encoding::Depth,
2309 ) -> fidl::Result<()> {
2310 encoder.debug_check_bounds::<PackageIndexEntry>(offset);
2311 self.0.encode(encoder, offset + 0, depth)?;
2315 self.1.encode(encoder, offset + 16, depth)?;
2316 Ok(())
2317 }
2318 }
2319
2320 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PackageIndexEntry {
2321 #[inline(always)]
2322 fn new_empty() -> Self {
2323 Self {
2324 package_url: fidl::new_empty!(PackageUrl, D),
2325 meta_far_blob_id: fidl::new_empty!(BlobId, D),
2326 }
2327 }
2328
2329 #[inline]
2330 unsafe fn decode(
2331 &mut self,
2332 decoder: &mut fidl::encoding::Decoder<'_, D>,
2333 offset: usize,
2334 _depth: fidl::encoding::Depth,
2335 ) -> fidl::Result<()> {
2336 decoder.debug_check_bounds::<Self>(offset);
2337 fidl::decode!(PackageUrl, D, &mut self.package_url, decoder, offset + 0, _depth)?;
2339 fidl::decode!(BlobId, D, &mut self.meta_far_blob_id, decoder, offset + 16, _depth)?;
2340 Ok(())
2341 }
2342 }
2343
2344 impl fidl::encoding::ValueTypeMarker for PackageIndexIteratorNextResponse {
2345 type Borrowed<'a> = &'a Self;
2346 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2347 value
2348 }
2349 }
2350
2351 unsafe impl fidl::encoding::TypeMarker for PackageIndexIteratorNextResponse {
2352 type Owned = Self;
2353
2354 #[inline(always)]
2355 fn inline_align(_context: fidl::encoding::Context) -> usize {
2356 8
2357 }
2358
2359 #[inline(always)]
2360 fn inline_size(_context: fidl::encoding::Context) -> usize {
2361 16
2362 }
2363 }
2364
2365 unsafe impl<D: fidl::encoding::ResourceDialect>
2366 fidl::encoding::Encode<PackageIndexIteratorNextResponse, D>
2367 for &PackageIndexIteratorNextResponse
2368 {
2369 #[inline]
2370 unsafe fn encode(
2371 self,
2372 encoder: &mut fidl::encoding::Encoder<'_, D>,
2373 offset: usize,
2374 _depth: fidl::encoding::Depth,
2375 ) -> fidl::Result<()> {
2376 encoder.debug_check_bounds::<PackageIndexIteratorNextResponse>(offset);
2377 fidl::encoding::Encode::<PackageIndexIteratorNextResponse, D>::encode(
2379 (
2380 <fidl::encoding::UnboundedVector<PackageIndexEntry> as fidl::encoding::ValueTypeMarker>::borrow(&self.entries),
2381 ),
2382 encoder, offset, _depth
2383 )
2384 }
2385 }
2386 unsafe impl<
2387 D: fidl::encoding::ResourceDialect,
2388 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<PackageIndexEntry>, D>,
2389 > fidl::encoding::Encode<PackageIndexIteratorNextResponse, D> for (T0,)
2390 {
2391 #[inline]
2392 unsafe fn encode(
2393 self,
2394 encoder: &mut fidl::encoding::Encoder<'_, D>,
2395 offset: usize,
2396 depth: fidl::encoding::Depth,
2397 ) -> fidl::Result<()> {
2398 encoder.debug_check_bounds::<PackageIndexIteratorNextResponse>(offset);
2399 self.0.encode(encoder, offset + 0, depth)?;
2403 Ok(())
2404 }
2405 }
2406
2407 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2408 for PackageIndexIteratorNextResponse
2409 {
2410 #[inline(always)]
2411 fn new_empty() -> Self {
2412 Self {
2413 entries: fidl::new_empty!(fidl::encoding::UnboundedVector<PackageIndexEntry>, D),
2414 }
2415 }
2416
2417 #[inline]
2418 unsafe fn decode(
2419 &mut self,
2420 decoder: &mut fidl::encoding::Decoder<'_, D>,
2421 offset: usize,
2422 _depth: fidl::encoding::Depth,
2423 ) -> fidl::Result<()> {
2424 decoder.debug_check_bounds::<Self>(offset);
2425 fidl::decode!(
2427 fidl::encoding::UnboundedVector<PackageIndexEntry>,
2428 D,
2429 &mut self.entries,
2430 decoder,
2431 offset + 0,
2432 _depth
2433 )?;
2434 Ok(())
2435 }
2436 }
2437
2438 impl fidl::encoding::ValueTypeMarker for PackageResolverGetHashRequest {
2439 type Borrowed<'a> = &'a Self;
2440 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2441 value
2442 }
2443 }
2444
2445 unsafe impl fidl::encoding::TypeMarker for PackageResolverGetHashRequest {
2446 type Owned = Self;
2447
2448 #[inline(always)]
2449 fn inline_align(_context: fidl::encoding::Context) -> usize {
2450 8
2451 }
2452
2453 #[inline(always)]
2454 fn inline_size(_context: fidl::encoding::Context) -> usize {
2455 16
2456 }
2457 }
2458
2459 unsafe impl<D: fidl::encoding::ResourceDialect>
2460 fidl::encoding::Encode<PackageResolverGetHashRequest, D>
2461 for &PackageResolverGetHashRequest
2462 {
2463 #[inline]
2464 unsafe fn encode(
2465 self,
2466 encoder: &mut fidl::encoding::Encoder<'_, D>,
2467 offset: usize,
2468 _depth: fidl::encoding::Depth,
2469 ) -> fidl::Result<()> {
2470 encoder.debug_check_bounds::<PackageResolverGetHashRequest>(offset);
2471 fidl::encoding::Encode::<PackageResolverGetHashRequest, D>::encode(
2473 (<PackageUrl as fidl::encoding::ValueTypeMarker>::borrow(&self.package_url),),
2474 encoder,
2475 offset,
2476 _depth,
2477 )
2478 }
2479 }
2480 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<PackageUrl, D>>
2481 fidl::encoding::Encode<PackageResolverGetHashRequest, D> for (T0,)
2482 {
2483 #[inline]
2484 unsafe fn encode(
2485 self,
2486 encoder: &mut fidl::encoding::Encoder<'_, D>,
2487 offset: usize,
2488 depth: fidl::encoding::Depth,
2489 ) -> fidl::Result<()> {
2490 encoder.debug_check_bounds::<PackageResolverGetHashRequest>(offset);
2491 self.0.encode(encoder, offset + 0, depth)?;
2495 Ok(())
2496 }
2497 }
2498
2499 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2500 for PackageResolverGetHashRequest
2501 {
2502 #[inline(always)]
2503 fn new_empty() -> Self {
2504 Self { package_url: fidl::new_empty!(PackageUrl, D) }
2505 }
2506
2507 #[inline]
2508 unsafe fn decode(
2509 &mut self,
2510 decoder: &mut fidl::encoding::Decoder<'_, D>,
2511 offset: usize,
2512 _depth: fidl::encoding::Depth,
2513 ) -> fidl::Result<()> {
2514 decoder.debug_check_bounds::<Self>(offset);
2515 fidl::decode!(PackageUrl, D, &mut self.package_url, decoder, offset + 0, _depth)?;
2517 Ok(())
2518 }
2519 }
2520
2521 impl fidl::encoding::ValueTypeMarker for PackageResolverGetHashResponse {
2522 type Borrowed<'a> = &'a Self;
2523 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2524 value
2525 }
2526 }
2527
2528 unsafe impl fidl::encoding::TypeMarker for PackageResolverGetHashResponse {
2529 type Owned = Self;
2530
2531 #[inline(always)]
2532 fn inline_align(_context: fidl::encoding::Context) -> usize {
2533 1
2534 }
2535
2536 #[inline(always)]
2537 fn inline_size(_context: fidl::encoding::Context) -> usize {
2538 32
2539 }
2540 #[inline(always)]
2541 fn encode_is_copy() -> bool {
2542 true
2543 }
2544
2545 #[inline(always)]
2546 fn decode_is_copy() -> bool {
2547 true
2548 }
2549 }
2550
2551 unsafe impl<D: fidl::encoding::ResourceDialect>
2552 fidl::encoding::Encode<PackageResolverGetHashResponse, D>
2553 for &PackageResolverGetHashResponse
2554 {
2555 #[inline]
2556 unsafe fn encode(
2557 self,
2558 encoder: &mut fidl::encoding::Encoder<'_, D>,
2559 offset: usize,
2560 _depth: fidl::encoding::Depth,
2561 ) -> fidl::Result<()> {
2562 encoder.debug_check_bounds::<PackageResolverGetHashResponse>(offset);
2563 unsafe {
2564 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
2566 (buf_ptr as *mut PackageResolverGetHashResponse)
2567 .write_unaligned((self as *const PackageResolverGetHashResponse).read());
2568 }
2571 Ok(())
2572 }
2573 }
2574 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<BlobId, D>>
2575 fidl::encoding::Encode<PackageResolverGetHashResponse, D> for (T0,)
2576 {
2577 #[inline]
2578 unsafe fn encode(
2579 self,
2580 encoder: &mut fidl::encoding::Encoder<'_, D>,
2581 offset: usize,
2582 depth: fidl::encoding::Depth,
2583 ) -> fidl::Result<()> {
2584 encoder.debug_check_bounds::<PackageResolverGetHashResponse>(offset);
2585 self.0.encode(encoder, offset + 0, depth)?;
2589 Ok(())
2590 }
2591 }
2592
2593 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2594 for PackageResolverGetHashResponse
2595 {
2596 #[inline(always)]
2597 fn new_empty() -> Self {
2598 Self { meta_far_blob_id: fidl::new_empty!(BlobId, D) }
2599 }
2600
2601 #[inline]
2602 unsafe fn decode(
2603 &mut self,
2604 decoder: &mut fidl::encoding::Decoder<'_, D>,
2605 offset: usize,
2606 _depth: fidl::encoding::Depth,
2607 ) -> fidl::Result<()> {
2608 decoder.debug_check_bounds::<Self>(offset);
2609 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
2610 unsafe {
2613 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 32);
2614 }
2615 Ok(())
2616 }
2617 }
2618
2619 impl fidl::encoding::ValueTypeMarker for PackageResolverResolveWithContextResponse {
2620 type Borrowed<'a> = &'a Self;
2621 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2622 value
2623 }
2624 }
2625
2626 unsafe impl fidl::encoding::TypeMarker for PackageResolverResolveWithContextResponse {
2627 type Owned = Self;
2628
2629 #[inline(always)]
2630 fn inline_align(_context: fidl::encoding::Context) -> usize {
2631 8
2632 }
2633
2634 #[inline(always)]
2635 fn inline_size(_context: fidl::encoding::Context) -> usize {
2636 16
2637 }
2638 }
2639
2640 unsafe impl<D: fidl::encoding::ResourceDialect>
2641 fidl::encoding::Encode<PackageResolverResolveWithContextResponse, D>
2642 for &PackageResolverResolveWithContextResponse
2643 {
2644 #[inline]
2645 unsafe fn encode(
2646 self,
2647 encoder: &mut fidl::encoding::Encoder<'_, D>,
2648 offset: usize,
2649 _depth: fidl::encoding::Depth,
2650 ) -> fidl::Result<()> {
2651 encoder.debug_check_bounds::<PackageResolverResolveWithContextResponse>(offset);
2652 fidl::encoding::Encode::<PackageResolverResolveWithContextResponse, D>::encode(
2654 (<ResolutionContext as fidl::encoding::ValueTypeMarker>::borrow(
2655 &self.resolved_context,
2656 ),),
2657 encoder,
2658 offset,
2659 _depth,
2660 )
2661 }
2662 }
2663 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ResolutionContext, D>>
2664 fidl::encoding::Encode<PackageResolverResolveWithContextResponse, D> for (T0,)
2665 {
2666 #[inline]
2667 unsafe fn encode(
2668 self,
2669 encoder: &mut fidl::encoding::Encoder<'_, D>,
2670 offset: usize,
2671 depth: fidl::encoding::Depth,
2672 ) -> fidl::Result<()> {
2673 encoder.debug_check_bounds::<PackageResolverResolveWithContextResponse>(offset);
2674 self.0.encode(encoder, offset + 0, depth)?;
2678 Ok(())
2679 }
2680 }
2681
2682 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2683 for PackageResolverResolveWithContextResponse
2684 {
2685 #[inline(always)]
2686 fn new_empty() -> Self {
2687 Self { resolved_context: fidl::new_empty!(ResolutionContext, D) }
2688 }
2689
2690 #[inline]
2691 unsafe fn decode(
2692 &mut self,
2693 decoder: &mut fidl::encoding::Decoder<'_, D>,
2694 offset: usize,
2695 _depth: fidl::encoding::Depth,
2696 ) -> fidl::Result<()> {
2697 decoder.debug_check_bounds::<Self>(offset);
2698 fidl::decode!(
2700 ResolutionContext,
2701 D,
2702 &mut self.resolved_context,
2703 decoder,
2704 offset + 0,
2705 _depth
2706 )?;
2707 Ok(())
2708 }
2709 }
2710
2711 impl fidl::encoding::ValueTypeMarker for PackageResolverResolveResponse {
2712 type Borrowed<'a> = &'a Self;
2713 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2714 value
2715 }
2716 }
2717
2718 unsafe impl fidl::encoding::TypeMarker for PackageResolverResolveResponse {
2719 type Owned = Self;
2720
2721 #[inline(always)]
2722 fn inline_align(_context: fidl::encoding::Context) -> usize {
2723 8
2724 }
2725
2726 #[inline(always)]
2727 fn inline_size(_context: fidl::encoding::Context) -> usize {
2728 16
2729 }
2730 }
2731
2732 unsafe impl<D: fidl::encoding::ResourceDialect>
2733 fidl::encoding::Encode<PackageResolverResolveResponse, D>
2734 for &PackageResolverResolveResponse
2735 {
2736 #[inline]
2737 unsafe fn encode(
2738 self,
2739 encoder: &mut fidl::encoding::Encoder<'_, D>,
2740 offset: usize,
2741 _depth: fidl::encoding::Depth,
2742 ) -> fidl::Result<()> {
2743 encoder.debug_check_bounds::<PackageResolverResolveResponse>(offset);
2744 fidl::encoding::Encode::<PackageResolverResolveResponse, D>::encode(
2746 (<ResolutionContext as fidl::encoding::ValueTypeMarker>::borrow(
2747 &self.resolved_context,
2748 ),),
2749 encoder,
2750 offset,
2751 _depth,
2752 )
2753 }
2754 }
2755 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<ResolutionContext, D>>
2756 fidl::encoding::Encode<PackageResolverResolveResponse, D> for (T0,)
2757 {
2758 #[inline]
2759 unsafe fn encode(
2760 self,
2761 encoder: &mut fidl::encoding::Encoder<'_, D>,
2762 offset: usize,
2763 depth: fidl::encoding::Depth,
2764 ) -> fidl::Result<()> {
2765 encoder.debug_check_bounds::<PackageResolverResolveResponse>(offset);
2766 self.0.encode(encoder, offset + 0, depth)?;
2770 Ok(())
2771 }
2772 }
2773
2774 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2775 for PackageResolverResolveResponse
2776 {
2777 #[inline(always)]
2778 fn new_empty() -> Self {
2779 Self { resolved_context: fidl::new_empty!(ResolutionContext, D) }
2780 }
2781
2782 #[inline]
2783 unsafe fn decode(
2784 &mut self,
2785 decoder: &mut fidl::encoding::Decoder<'_, D>,
2786 offset: usize,
2787 _depth: fidl::encoding::Depth,
2788 ) -> fidl::Result<()> {
2789 decoder.debug_check_bounds::<Self>(offset);
2790 fidl::decode!(
2792 ResolutionContext,
2793 D,
2794 &mut self.resolved_context,
2795 decoder,
2796 offset + 0,
2797 _depth
2798 )?;
2799 Ok(())
2800 }
2801 }
2802
2803 impl fidl::encoding::ValueTypeMarker for PackageUrl {
2804 type Borrowed<'a> = &'a Self;
2805 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2806 value
2807 }
2808 }
2809
2810 unsafe impl fidl::encoding::TypeMarker for PackageUrl {
2811 type Owned = Self;
2812
2813 #[inline(always)]
2814 fn inline_align(_context: fidl::encoding::Context) -> usize {
2815 8
2816 }
2817
2818 #[inline(always)]
2819 fn inline_size(_context: fidl::encoding::Context) -> usize {
2820 16
2821 }
2822 }
2823
2824 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<PackageUrl, D>
2825 for &PackageUrl
2826 {
2827 #[inline]
2828 unsafe fn encode(
2829 self,
2830 encoder: &mut fidl::encoding::Encoder<'_, D>,
2831 offset: usize,
2832 _depth: fidl::encoding::Depth,
2833 ) -> fidl::Result<()> {
2834 encoder.debug_check_bounds::<PackageUrl>(offset);
2835 fidl::encoding::Encode::<PackageUrl, D>::encode(
2837 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
2838 &self.url,
2839 ),),
2840 encoder,
2841 offset,
2842 _depth,
2843 )
2844 }
2845 }
2846 unsafe impl<
2847 D: fidl::encoding::ResourceDialect,
2848 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
2849 > fidl::encoding::Encode<PackageUrl, D> for (T0,)
2850 {
2851 #[inline]
2852 unsafe fn encode(
2853 self,
2854 encoder: &mut fidl::encoding::Encoder<'_, D>,
2855 offset: usize,
2856 depth: fidl::encoding::Depth,
2857 ) -> fidl::Result<()> {
2858 encoder.debug_check_bounds::<PackageUrl>(offset);
2859 self.0.encode(encoder, offset + 0, depth)?;
2863 Ok(())
2864 }
2865 }
2866
2867 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for PackageUrl {
2868 #[inline(always)]
2869 fn new_empty() -> Self {
2870 Self { url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
2871 }
2872
2873 #[inline]
2874 unsafe fn decode(
2875 &mut self,
2876 decoder: &mut fidl::encoding::Decoder<'_, D>,
2877 offset: usize,
2878 _depth: fidl::encoding::Depth,
2879 ) -> fidl::Result<()> {
2880 decoder.debug_check_bounds::<Self>(offset);
2881 fidl::decode!(
2883 fidl::encoding::BoundedString<4096>,
2884 D,
2885 &mut self.url,
2886 decoder,
2887 offset + 0,
2888 _depth
2889 )?;
2890 Ok(())
2891 }
2892 }
2893
2894 impl fidl::encoding::ValueTypeMarker for RepositoryIteratorNextResponse {
2895 type Borrowed<'a> = &'a Self;
2896 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2897 value
2898 }
2899 }
2900
2901 unsafe impl fidl::encoding::TypeMarker for RepositoryIteratorNextResponse {
2902 type Owned = Self;
2903
2904 #[inline(always)]
2905 fn inline_align(_context: fidl::encoding::Context) -> usize {
2906 8
2907 }
2908
2909 #[inline(always)]
2910 fn inline_size(_context: fidl::encoding::Context) -> usize {
2911 16
2912 }
2913 }
2914
2915 unsafe impl<D: fidl::encoding::ResourceDialect>
2916 fidl::encoding::Encode<RepositoryIteratorNextResponse, D>
2917 for &RepositoryIteratorNextResponse
2918 {
2919 #[inline]
2920 unsafe fn encode(
2921 self,
2922 encoder: &mut fidl::encoding::Encoder<'_, D>,
2923 offset: usize,
2924 _depth: fidl::encoding::Depth,
2925 ) -> fidl::Result<()> {
2926 encoder.debug_check_bounds::<RepositoryIteratorNextResponse>(offset);
2927 fidl::encoding::Encode::<RepositoryIteratorNextResponse, D>::encode(
2929 (
2930 <fidl::encoding::UnboundedVector<RepositoryConfig> as fidl::encoding::ValueTypeMarker>::borrow(&self.repos),
2931 ),
2932 encoder, offset, _depth
2933 )
2934 }
2935 }
2936 unsafe impl<
2937 D: fidl::encoding::ResourceDialect,
2938 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RepositoryConfig>, D>,
2939 > fidl::encoding::Encode<RepositoryIteratorNextResponse, D> for (T0,)
2940 {
2941 #[inline]
2942 unsafe fn encode(
2943 self,
2944 encoder: &mut fidl::encoding::Encoder<'_, D>,
2945 offset: usize,
2946 depth: fidl::encoding::Depth,
2947 ) -> fidl::Result<()> {
2948 encoder.debug_check_bounds::<RepositoryIteratorNextResponse>(offset);
2949 self.0.encode(encoder, offset + 0, depth)?;
2953 Ok(())
2954 }
2955 }
2956
2957 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2958 for RepositoryIteratorNextResponse
2959 {
2960 #[inline(always)]
2961 fn new_empty() -> Self {
2962 Self { repos: fidl::new_empty!(fidl::encoding::UnboundedVector<RepositoryConfig>, D) }
2963 }
2964
2965 #[inline]
2966 unsafe fn decode(
2967 &mut self,
2968 decoder: &mut fidl::encoding::Decoder<'_, D>,
2969 offset: usize,
2970 _depth: fidl::encoding::Depth,
2971 ) -> fidl::Result<()> {
2972 decoder.debug_check_bounds::<Self>(offset);
2973 fidl::decode!(
2975 fidl::encoding::UnboundedVector<RepositoryConfig>,
2976 D,
2977 &mut self.repos,
2978 decoder,
2979 offset + 0,
2980 _depth
2981 )?;
2982 Ok(())
2983 }
2984 }
2985
2986 impl fidl::encoding::ValueTypeMarker for RepositoryManagerAddMirrorRequest {
2987 type Borrowed<'a> = &'a Self;
2988 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2989 value
2990 }
2991 }
2992
2993 unsafe impl fidl::encoding::TypeMarker for RepositoryManagerAddMirrorRequest {
2994 type Owned = Self;
2995
2996 #[inline(always)]
2997 fn inline_align(_context: fidl::encoding::Context) -> usize {
2998 8
2999 }
3000
3001 #[inline(always)]
3002 fn inline_size(_context: fidl::encoding::Context) -> usize {
3003 32
3004 }
3005 }
3006
3007 unsafe impl<D: fidl::encoding::ResourceDialect>
3008 fidl::encoding::Encode<RepositoryManagerAddMirrorRequest, D>
3009 for &RepositoryManagerAddMirrorRequest
3010 {
3011 #[inline]
3012 unsafe fn encode(
3013 self,
3014 encoder: &mut fidl::encoding::Encoder<'_, D>,
3015 offset: usize,
3016 _depth: fidl::encoding::Depth,
3017 ) -> fidl::Result<()> {
3018 encoder.debug_check_bounds::<RepositoryManagerAddMirrorRequest>(offset);
3019 fidl::encoding::Encode::<RepositoryManagerAddMirrorRequest, D>::encode(
3021 (
3022 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3023 &self.repo_url,
3024 ),
3025 <MirrorConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.mirror),
3026 ),
3027 encoder,
3028 offset,
3029 _depth,
3030 )
3031 }
3032 }
3033 unsafe impl<
3034 D: fidl::encoding::ResourceDialect,
3035 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3036 T1: fidl::encoding::Encode<MirrorConfig, D>,
3037 > fidl::encoding::Encode<RepositoryManagerAddMirrorRequest, D> for (T0, T1)
3038 {
3039 #[inline]
3040 unsafe fn encode(
3041 self,
3042 encoder: &mut fidl::encoding::Encoder<'_, D>,
3043 offset: usize,
3044 depth: fidl::encoding::Depth,
3045 ) -> fidl::Result<()> {
3046 encoder.debug_check_bounds::<RepositoryManagerAddMirrorRequest>(offset);
3047 self.0.encode(encoder, offset + 0, depth)?;
3051 self.1.encode(encoder, offset + 16, depth)?;
3052 Ok(())
3053 }
3054 }
3055
3056 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3057 for RepositoryManagerAddMirrorRequest
3058 {
3059 #[inline(always)]
3060 fn new_empty() -> Self {
3061 Self {
3062 repo_url: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3063 mirror: fidl::new_empty!(MirrorConfig, D),
3064 }
3065 }
3066
3067 #[inline]
3068 unsafe fn decode(
3069 &mut self,
3070 decoder: &mut fidl::encoding::Decoder<'_, D>,
3071 offset: usize,
3072 _depth: fidl::encoding::Depth,
3073 ) -> fidl::Result<()> {
3074 decoder.debug_check_bounds::<Self>(offset);
3075 fidl::decode!(
3077 fidl::encoding::UnboundedString,
3078 D,
3079 &mut self.repo_url,
3080 decoder,
3081 offset + 0,
3082 _depth
3083 )?;
3084 fidl::decode!(MirrorConfig, D, &mut self.mirror, decoder, offset + 16, _depth)?;
3085 Ok(())
3086 }
3087 }
3088
3089 impl fidl::encoding::ValueTypeMarker for RepositoryManagerAddRequest {
3090 type Borrowed<'a> = &'a Self;
3091 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3092 value
3093 }
3094 }
3095
3096 unsafe impl fidl::encoding::TypeMarker for RepositoryManagerAddRequest {
3097 type Owned = Self;
3098
3099 #[inline(always)]
3100 fn inline_align(_context: fidl::encoding::Context) -> usize {
3101 8
3102 }
3103
3104 #[inline(always)]
3105 fn inline_size(_context: fidl::encoding::Context) -> usize {
3106 16
3107 }
3108 }
3109
3110 unsafe impl<D: fidl::encoding::ResourceDialect>
3111 fidl::encoding::Encode<RepositoryManagerAddRequest, D> for &RepositoryManagerAddRequest
3112 {
3113 #[inline]
3114 unsafe fn encode(
3115 self,
3116 encoder: &mut fidl::encoding::Encoder<'_, D>,
3117 offset: usize,
3118 _depth: fidl::encoding::Depth,
3119 ) -> fidl::Result<()> {
3120 encoder.debug_check_bounds::<RepositoryManagerAddRequest>(offset);
3121 fidl::encoding::Encode::<RepositoryManagerAddRequest, D>::encode(
3123 (<RepositoryConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.repo),),
3124 encoder,
3125 offset,
3126 _depth,
3127 )
3128 }
3129 }
3130 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<RepositoryConfig, D>>
3131 fidl::encoding::Encode<RepositoryManagerAddRequest, D> for (T0,)
3132 {
3133 #[inline]
3134 unsafe fn encode(
3135 self,
3136 encoder: &mut fidl::encoding::Encoder<'_, D>,
3137 offset: usize,
3138 depth: fidl::encoding::Depth,
3139 ) -> fidl::Result<()> {
3140 encoder.debug_check_bounds::<RepositoryManagerAddRequest>(offset);
3141 self.0.encode(encoder, offset + 0, depth)?;
3145 Ok(())
3146 }
3147 }
3148
3149 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3150 for RepositoryManagerAddRequest
3151 {
3152 #[inline(always)]
3153 fn new_empty() -> Self {
3154 Self { repo: fidl::new_empty!(RepositoryConfig, D) }
3155 }
3156
3157 #[inline]
3158 unsafe fn decode(
3159 &mut self,
3160 decoder: &mut fidl::encoding::Decoder<'_, D>,
3161 offset: usize,
3162 _depth: fidl::encoding::Depth,
3163 ) -> fidl::Result<()> {
3164 decoder.debug_check_bounds::<Self>(offset);
3165 fidl::decode!(RepositoryConfig, D, &mut self.repo, decoder, offset + 0, _depth)?;
3167 Ok(())
3168 }
3169 }
3170
3171 impl fidl::encoding::ValueTypeMarker for RepositoryManagerRemoveMirrorRequest {
3172 type Borrowed<'a> = &'a Self;
3173 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3174 value
3175 }
3176 }
3177
3178 unsafe impl fidl::encoding::TypeMarker for RepositoryManagerRemoveMirrorRequest {
3179 type Owned = Self;
3180
3181 #[inline(always)]
3182 fn inline_align(_context: fidl::encoding::Context) -> usize {
3183 8
3184 }
3185
3186 #[inline(always)]
3187 fn inline_size(_context: fidl::encoding::Context) -> usize {
3188 32
3189 }
3190 }
3191
3192 unsafe impl<D: fidl::encoding::ResourceDialect>
3193 fidl::encoding::Encode<RepositoryManagerRemoveMirrorRequest, D>
3194 for &RepositoryManagerRemoveMirrorRequest
3195 {
3196 #[inline]
3197 unsafe fn encode(
3198 self,
3199 encoder: &mut fidl::encoding::Encoder<'_, D>,
3200 offset: usize,
3201 _depth: fidl::encoding::Depth,
3202 ) -> fidl::Result<()> {
3203 encoder.debug_check_bounds::<RepositoryManagerRemoveMirrorRequest>(offset);
3204 fidl::encoding::Encode::<RepositoryManagerRemoveMirrorRequest, D>::encode(
3206 (
3207 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3208 &self.repo_url,
3209 ),
3210 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3211 &self.mirror_url,
3212 ),
3213 ),
3214 encoder,
3215 offset,
3216 _depth,
3217 )
3218 }
3219 }
3220 unsafe impl<
3221 D: fidl::encoding::ResourceDialect,
3222 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3223 T1: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3224 > fidl::encoding::Encode<RepositoryManagerRemoveMirrorRequest, D> for (T0, T1)
3225 {
3226 #[inline]
3227 unsafe fn encode(
3228 self,
3229 encoder: &mut fidl::encoding::Encoder<'_, D>,
3230 offset: usize,
3231 depth: fidl::encoding::Depth,
3232 ) -> fidl::Result<()> {
3233 encoder.debug_check_bounds::<RepositoryManagerRemoveMirrorRequest>(offset);
3234 self.0.encode(encoder, offset + 0, depth)?;
3238 self.1.encode(encoder, offset + 16, depth)?;
3239 Ok(())
3240 }
3241 }
3242
3243 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3244 for RepositoryManagerRemoveMirrorRequest
3245 {
3246 #[inline(always)]
3247 fn new_empty() -> Self {
3248 Self {
3249 repo_url: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3250 mirror_url: fidl::new_empty!(fidl::encoding::UnboundedString, D),
3251 }
3252 }
3253
3254 #[inline]
3255 unsafe fn decode(
3256 &mut self,
3257 decoder: &mut fidl::encoding::Decoder<'_, D>,
3258 offset: usize,
3259 _depth: fidl::encoding::Depth,
3260 ) -> fidl::Result<()> {
3261 decoder.debug_check_bounds::<Self>(offset);
3262 fidl::decode!(
3264 fidl::encoding::UnboundedString,
3265 D,
3266 &mut self.repo_url,
3267 decoder,
3268 offset + 0,
3269 _depth
3270 )?;
3271 fidl::decode!(
3272 fidl::encoding::UnboundedString,
3273 D,
3274 &mut self.mirror_url,
3275 decoder,
3276 offset + 16,
3277 _depth
3278 )?;
3279 Ok(())
3280 }
3281 }
3282
3283 impl fidl::encoding::ValueTypeMarker for RepositoryManagerRemoveRequest {
3284 type Borrowed<'a> = &'a Self;
3285 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3286 value
3287 }
3288 }
3289
3290 unsafe impl fidl::encoding::TypeMarker for RepositoryManagerRemoveRequest {
3291 type Owned = Self;
3292
3293 #[inline(always)]
3294 fn inline_align(_context: fidl::encoding::Context) -> usize {
3295 8
3296 }
3297
3298 #[inline(always)]
3299 fn inline_size(_context: fidl::encoding::Context) -> usize {
3300 16
3301 }
3302 }
3303
3304 unsafe impl<D: fidl::encoding::ResourceDialect>
3305 fidl::encoding::Encode<RepositoryManagerRemoveRequest, D>
3306 for &RepositoryManagerRemoveRequest
3307 {
3308 #[inline]
3309 unsafe fn encode(
3310 self,
3311 encoder: &mut fidl::encoding::Encoder<'_, D>,
3312 offset: usize,
3313 _depth: fidl::encoding::Depth,
3314 ) -> fidl::Result<()> {
3315 encoder.debug_check_bounds::<RepositoryManagerRemoveRequest>(offset);
3316 fidl::encoding::Encode::<RepositoryManagerRemoveRequest, D>::encode(
3318 (<fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(
3319 &self.repo_url,
3320 ),),
3321 encoder,
3322 offset,
3323 _depth,
3324 )
3325 }
3326 }
3327 unsafe impl<
3328 D: fidl::encoding::ResourceDialect,
3329 T0: fidl::encoding::Encode<fidl::encoding::UnboundedString, D>,
3330 > fidl::encoding::Encode<RepositoryManagerRemoveRequest, D> for (T0,)
3331 {
3332 #[inline]
3333 unsafe fn encode(
3334 self,
3335 encoder: &mut fidl::encoding::Encoder<'_, D>,
3336 offset: usize,
3337 depth: fidl::encoding::Depth,
3338 ) -> fidl::Result<()> {
3339 encoder.debug_check_bounds::<RepositoryManagerRemoveRequest>(offset);
3340 self.0.encode(encoder, offset + 0, depth)?;
3344 Ok(())
3345 }
3346 }
3347
3348 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3349 for RepositoryManagerRemoveRequest
3350 {
3351 #[inline(always)]
3352 fn new_empty() -> Self {
3353 Self { repo_url: fidl::new_empty!(fidl::encoding::UnboundedString, D) }
3354 }
3355
3356 #[inline]
3357 unsafe fn decode(
3358 &mut self,
3359 decoder: &mut fidl::encoding::Decoder<'_, D>,
3360 offset: usize,
3361 _depth: fidl::encoding::Depth,
3362 ) -> fidl::Result<()> {
3363 decoder.debug_check_bounds::<Self>(offset);
3364 fidl::decode!(
3366 fidl::encoding::UnboundedString,
3367 D,
3368 &mut self.repo_url,
3369 decoder,
3370 offset + 0,
3371 _depth
3372 )?;
3373 Ok(())
3374 }
3375 }
3376
3377 impl fidl::encoding::ValueTypeMarker for RepositoryUrl {
3378 type Borrowed<'a> = &'a Self;
3379 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3380 value
3381 }
3382 }
3383
3384 unsafe impl fidl::encoding::TypeMarker for RepositoryUrl {
3385 type Owned = Self;
3386
3387 #[inline(always)]
3388 fn inline_align(_context: fidl::encoding::Context) -> usize {
3389 8
3390 }
3391
3392 #[inline(always)]
3393 fn inline_size(_context: fidl::encoding::Context) -> usize {
3394 16
3395 }
3396 }
3397
3398 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RepositoryUrl, D>
3399 for &RepositoryUrl
3400 {
3401 #[inline]
3402 unsafe fn encode(
3403 self,
3404 encoder: &mut fidl::encoding::Encoder<'_, D>,
3405 offset: usize,
3406 _depth: fidl::encoding::Depth,
3407 ) -> fidl::Result<()> {
3408 encoder.debug_check_bounds::<RepositoryUrl>(offset);
3409 fidl::encoding::Encode::<RepositoryUrl, D>::encode(
3411 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3412 &self.url,
3413 ),),
3414 encoder,
3415 offset,
3416 _depth,
3417 )
3418 }
3419 }
3420 unsafe impl<
3421 D: fidl::encoding::ResourceDialect,
3422 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3423 > fidl::encoding::Encode<RepositoryUrl, D> for (T0,)
3424 {
3425 #[inline]
3426 unsafe fn encode(
3427 self,
3428 encoder: &mut fidl::encoding::Encoder<'_, D>,
3429 offset: usize,
3430 depth: fidl::encoding::Depth,
3431 ) -> fidl::Result<()> {
3432 encoder.debug_check_bounds::<RepositoryUrl>(offset);
3433 self.0.encode(encoder, offset + 0, depth)?;
3437 Ok(())
3438 }
3439 }
3440
3441 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RepositoryUrl {
3442 #[inline(always)]
3443 fn new_empty() -> Self {
3444 Self { url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3445 }
3446
3447 #[inline]
3448 unsafe fn decode(
3449 &mut self,
3450 decoder: &mut fidl::encoding::Decoder<'_, D>,
3451 offset: usize,
3452 _depth: fidl::encoding::Depth,
3453 ) -> fidl::Result<()> {
3454 decoder.debug_check_bounds::<Self>(offset);
3455 fidl::decode!(
3457 fidl::encoding::BoundedString<4096>,
3458 D,
3459 &mut self.url,
3460 decoder,
3461 offset + 0,
3462 _depth
3463 )?;
3464 Ok(())
3465 }
3466 }
3467
3468 impl fidl::encoding::ValueTypeMarker for ResolutionContext {
3469 type Borrowed<'a> = &'a Self;
3470 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3471 value
3472 }
3473 }
3474
3475 unsafe impl fidl::encoding::TypeMarker for ResolutionContext {
3476 type Owned = Self;
3477
3478 #[inline(always)]
3479 fn inline_align(_context: fidl::encoding::Context) -> usize {
3480 8
3481 }
3482
3483 #[inline(always)]
3484 fn inline_size(_context: fidl::encoding::Context) -> usize {
3485 16
3486 }
3487 }
3488
3489 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResolutionContext, D>
3490 for &ResolutionContext
3491 {
3492 #[inline]
3493 unsafe fn encode(
3494 self,
3495 encoder: &mut fidl::encoding::Encoder<'_, D>,
3496 offset: usize,
3497 _depth: fidl::encoding::Depth,
3498 ) -> fidl::Result<()> {
3499 encoder.debug_check_bounds::<ResolutionContext>(offset);
3500 fidl::encoding::Encode::<ResolutionContext, D>::encode(
3502 (<fidl::encoding::Vector<u8, 8192> as fidl::encoding::ValueTypeMarker>::borrow(
3503 &self.bytes,
3504 ),),
3505 encoder,
3506 offset,
3507 _depth,
3508 )
3509 }
3510 }
3511 unsafe impl<
3512 D: fidl::encoding::ResourceDialect,
3513 T0: fidl::encoding::Encode<fidl::encoding::Vector<u8, 8192>, D>,
3514 > fidl::encoding::Encode<ResolutionContext, D> for (T0,)
3515 {
3516 #[inline]
3517 unsafe fn encode(
3518 self,
3519 encoder: &mut fidl::encoding::Encoder<'_, D>,
3520 offset: usize,
3521 depth: fidl::encoding::Depth,
3522 ) -> fidl::Result<()> {
3523 encoder.debug_check_bounds::<ResolutionContext>(offset);
3524 self.0.encode(encoder, offset + 0, depth)?;
3528 Ok(())
3529 }
3530 }
3531
3532 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolutionContext {
3533 #[inline(always)]
3534 fn new_empty() -> Self {
3535 Self { bytes: fidl::new_empty!(fidl::encoding::Vector<u8, 8192>, D) }
3536 }
3537
3538 #[inline]
3539 unsafe fn decode(
3540 &mut self,
3541 decoder: &mut fidl::encoding::Decoder<'_, D>,
3542 offset: usize,
3543 _depth: fidl::encoding::Depth,
3544 ) -> fidl::Result<()> {
3545 decoder.debug_check_bounds::<Self>(offset);
3546 fidl::decode!(fidl::encoding::Vector<u8, 8192>, D, &mut self.bytes, decoder, offset + 0, _depth)?;
3548 Ok(())
3549 }
3550 }
3551
3552 impl CupData {
3553 #[inline(always)]
3554 fn max_ordinal_present(&self) -> u64 {
3555 if let Some(_) = self.signature {
3556 return 5;
3557 }
3558 if let Some(_) = self.response {
3559 return 4;
3560 }
3561 if let Some(_) = self.nonce {
3562 return 3;
3563 }
3564 if let Some(_) = self.key_id {
3565 return 2;
3566 }
3567 if let Some(_) = self.request {
3568 return 1;
3569 }
3570 0
3571 }
3572 }
3573
3574 impl fidl::encoding::ValueTypeMarker for CupData {
3575 type Borrowed<'a> = &'a Self;
3576 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3577 value
3578 }
3579 }
3580
3581 unsafe impl fidl::encoding::TypeMarker for CupData {
3582 type Owned = Self;
3583
3584 #[inline(always)]
3585 fn inline_align(_context: fidl::encoding::Context) -> usize {
3586 8
3587 }
3588
3589 #[inline(always)]
3590 fn inline_size(_context: fidl::encoding::Context) -> usize {
3591 16
3592 }
3593 }
3594
3595 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CupData, D> for &CupData {
3596 unsafe fn encode(
3597 self,
3598 encoder: &mut fidl::encoding::Encoder<'_, D>,
3599 offset: usize,
3600 mut depth: fidl::encoding::Depth,
3601 ) -> fidl::Result<()> {
3602 encoder.debug_check_bounds::<CupData>(offset);
3603 let max_ordinal: u64 = self.max_ordinal_present();
3605 encoder.write_num(max_ordinal, offset);
3606 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3607 if max_ordinal == 0 {
3609 return Ok(());
3610 }
3611 depth.increment()?;
3612 let envelope_size = 8;
3613 let bytes_len = max_ordinal as usize * envelope_size;
3614 #[allow(unused_variables)]
3615 let offset = encoder.out_of_line_offset(bytes_len);
3616 let mut _prev_end_offset: usize = 0;
3617 if 1 > max_ordinal {
3618 return Ok(());
3619 }
3620
3621 let cur_offset: usize = (1 - 1) * envelope_size;
3624
3625 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3627
3628 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 65536>, D>(
3633 self.request.as_ref().map(
3634 <fidl::encoding::Vector<u8, 65536> as fidl::encoding::ValueTypeMarker>::borrow,
3635 ),
3636 encoder,
3637 offset + cur_offset,
3638 depth,
3639 )?;
3640
3641 _prev_end_offset = cur_offset + envelope_size;
3642 if 2 > max_ordinal {
3643 return Ok(());
3644 }
3645
3646 let cur_offset: usize = (2 - 1) * envelope_size;
3649
3650 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3652
3653 fidl::encoding::encode_in_envelope_optional::<u64, D>(
3658 self.key_id.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
3659 encoder,
3660 offset + cur_offset,
3661 depth,
3662 )?;
3663
3664 _prev_end_offset = cur_offset + envelope_size;
3665 if 3 > max_ordinal {
3666 return Ok(());
3667 }
3668
3669 let cur_offset: usize = (3 - 1) * envelope_size;
3672
3673 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3675
3676 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Array<u8, 32>, D>(
3681 self.nonce.as_ref().map(
3682 <fidl::encoding::Array<u8, 32> as fidl::encoding::ValueTypeMarker>::borrow,
3683 ),
3684 encoder,
3685 offset + cur_offset,
3686 depth,
3687 )?;
3688
3689 _prev_end_offset = cur_offset + envelope_size;
3690 if 4 > max_ordinal {
3691 return Ok(());
3692 }
3693
3694 let cur_offset: usize = (4 - 1) * envelope_size;
3697
3698 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3700
3701 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 65536>, D>(
3706 self.response.as_ref().map(
3707 <fidl::encoding::Vector<u8, 65536> as fidl::encoding::ValueTypeMarker>::borrow,
3708 ),
3709 encoder,
3710 offset + cur_offset,
3711 depth,
3712 )?;
3713
3714 _prev_end_offset = cur_offset + envelope_size;
3715 if 5 > max_ordinal {
3716 return Ok(());
3717 }
3718
3719 let cur_offset: usize = (5 - 1) * envelope_size;
3722
3723 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3725
3726 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<u8, 72>, D>(
3731 self.signature.as_ref().map(
3732 <fidl::encoding::Vector<u8, 72> as fidl::encoding::ValueTypeMarker>::borrow,
3733 ),
3734 encoder,
3735 offset + cur_offset,
3736 depth,
3737 )?;
3738
3739 _prev_end_offset = cur_offset + envelope_size;
3740
3741 Ok(())
3742 }
3743 }
3744
3745 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CupData {
3746 #[inline(always)]
3747 fn new_empty() -> Self {
3748 Self::default()
3749 }
3750
3751 unsafe fn decode(
3752 &mut self,
3753 decoder: &mut fidl::encoding::Decoder<'_, D>,
3754 offset: usize,
3755 mut depth: fidl::encoding::Depth,
3756 ) -> fidl::Result<()> {
3757 decoder.debug_check_bounds::<Self>(offset);
3758 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3759 None => return Err(fidl::Error::NotNullable),
3760 Some(len) => len,
3761 };
3762 if len == 0 {
3764 return Ok(());
3765 };
3766 depth.increment()?;
3767 let envelope_size = 8;
3768 let bytes_len = len * envelope_size;
3769 let offset = decoder.out_of_line_offset(bytes_len)?;
3770 let mut _next_ordinal_to_read = 0;
3772 let mut next_offset = offset;
3773 let end_offset = offset + bytes_len;
3774 _next_ordinal_to_read += 1;
3775 if next_offset >= end_offset {
3776 return Ok(());
3777 }
3778
3779 while _next_ordinal_to_read < 1 {
3781 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3782 _next_ordinal_to_read += 1;
3783 next_offset += envelope_size;
3784 }
3785
3786 let next_out_of_line = decoder.next_out_of_line();
3787 let handles_before = decoder.remaining_handles();
3788 if let Some((inlined, num_bytes, num_handles)) =
3789 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3790 {
3791 let member_inline_size =
3792 <fidl::encoding::Vector<u8, 65536> as fidl::encoding::TypeMarker>::inline_size(
3793 decoder.context,
3794 );
3795 if inlined != (member_inline_size <= 4) {
3796 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3797 }
3798 let inner_offset;
3799 let mut inner_depth = depth.clone();
3800 if inlined {
3801 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3802 inner_offset = next_offset;
3803 } else {
3804 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3805 inner_depth.increment()?;
3806 }
3807 let val_ref = self
3808 .request
3809 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 65536>, D));
3810 fidl::decode!(fidl::encoding::Vector<u8, 65536>, D, val_ref, decoder, inner_offset, inner_depth)?;
3811 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3812 {
3813 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3814 }
3815 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3816 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3817 }
3818 }
3819
3820 next_offset += envelope_size;
3821 _next_ordinal_to_read += 1;
3822 if next_offset >= end_offset {
3823 return Ok(());
3824 }
3825
3826 while _next_ordinal_to_read < 2 {
3828 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3829 _next_ordinal_to_read += 1;
3830 next_offset += envelope_size;
3831 }
3832
3833 let next_out_of_line = decoder.next_out_of_line();
3834 let handles_before = decoder.remaining_handles();
3835 if let Some((inlined, num_bytes, num_handles)) =
3836 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3837 {
3838 let member_inline_size =
3839 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3840 if inlined != (member_inline_size <= 4) {
3841 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3842 }
3843 let inner_offset;
3844 let mut inner_depth = depth.clone();
3845 if inlined {
3846 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3847 inner_offset = next_offset;
3848 } else {
3849 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3850 inner_depth.increment()?;
3851 }
3852 let val_ref = self.key_id.get_or_insert_with(|| fidl::new_empty!(u64, D));
3853 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
3854 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3855 {
3856 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3857 }
3858 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3859 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3860 }
3861 }
3862
3863 next_offset += envelope_size;
3864 _next_ordinal_to_read += 1;
3865 if next_offset >= end_offset {
3866 return Ok(());
3867 }
3868
3869 while _next_ordinal_to_read < 3 {
3871 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3872 _next_ordinal_to_read += 1;
3873 next_offset += envelope_size;
3874 }
3875
3876 let next_out_of_line = decoder.next_out_of_line();
3877 let handles_before = decoder.remaining_handles();
3878 if let Some((inlined, num_bytes, num_handles)) =
3879 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3880 {
3881 let member_inline_size =
3882 <fidl::encoding::Array<u8, 32> as fidl::encoding::TypeMarker>::inline_size(
3883 decoder.context,
3884 );
3885 if inlined != (member_inline_size <= 4) {
3886 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3887 }
3888 let inner_offset;
3889 let mut inner_depth = depth.clone();
3890 if inlined {
3891 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3892 inner_offset = next_offset;
3893 } else {
3894 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3895 inner_depth.increment()?;
3896 }
3897 let val_ref = self
3898 .nonce
3899 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Array<u8, 32>, D));
3900 fidl::decode!(fidl::encoding::Array<u8, 32>, D, val_ref, decoder, inner_offset, inner_depth)?;
3901 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3902 {
3903 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3904 }
3905 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3906 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3907 }
3908 }
3909
3910 next_offset += envelope_size;
3911 _next_ordinal_to_read += 1;
3912 if next_offset >= end_offset {
3913 return Ok(());
3914 }
3915
3916 while _next_ordinal_to_read < 4 {
3918 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3919 _next_ordinal_to_read += 1;
3920 next_offset += envelope_size;
3921 }
3922
3923 let next_out_of_line = decoder.next_out_of_line();
3924 let handles_before = decoder.remaining_handles();
3925 if let Some((inlined, num_bytes, num_handles)) =
3926 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3927 {
3928 let member_inline_size =
3929 <fidl::encoding::Vector<u8, 65536> as fidl::encoding::TypeMarker>::inline_size(
3930 decoder.context,
3931 );
3932 if inlined != (member_inline_size <= 4) {
3933 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3934 }
3935 let inner_offset;
3936 let mut inner_depth = depth.clone();
3937 if inlined {
3938 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3939 inner_offset = next_offset;
3940 } else {
3941 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3942 inner_depth.increment()?;
3943 }
3944 let val_ref = self
3945 .response
3946 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 65536>, D));
3947 fidl::decode!(fidl::encoding::Vector<u8, 65536>, D, val_ref, decoder, inner_offset, inner_depth)?;
3948 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3949 {
3950 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3951 }
3952 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3953 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3954 }
3955 }
3956
3957 next_offset += envelope_size;
3958 _next_ordinal_to_read += 1;
3959 if next_offset >= end_offset {
3960 return Ok(());
3961 }
3962
3963 while _next_ordinal_to_read < 5 {
3965 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3966 _next_ordinal_to_read += 1;
3967 next_offset += envelope_size;
3968 }
3969
3970 let next_out_of_line = decoder.next_out_of_line();
3971 let handles_before = decoder.remaining_handles();
3972 if let Some((inlined, num_bytes, num_handles)) =
3973 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3974 {
3975 let member_inline_size =
3976 <fidl::encoding::Vector<u8, 72> as fidl::encoding::TypeMarker>::inline_size(
3977 decoder.context,
3978 );
3979 if inlined != (member_inline_size <= 4) {
3980 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3981 }
3982 let inner_offset;
3983 let mut inner_depth = depth.clone();
3984 if inlined {
3985 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3986 inner_offset = next_offset;
3987 } else {
3988 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3989 inner_depth.increment()?;
3990 }
3991 let val_ref = self
3992 .signature
3993 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<u8, 72>, D));
3994 fidl::decode!(fidl::encoding::Vector<u8, 72>, D, val_ref, decoder, inner_offset, inner_depth)?;
3995 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3996 {
3997 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3998 }
3999 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4000 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4001 }
4002 }
4003
4004 next_offset += envelope_size;
4005
4006 while next_offset < end_offset {
4008 _next_ordinal_to_read += 1;
4009 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4010 next_offset += envelope_size;
4011 }
4012
4013 Ok(())
4014 }
4015 }
4016
4017 impl MirrorConfig {
4018 #[inline(always)]
4019 fn max_ordinal_present(&self) -> u64 {
4020 if let Some(_) = self.blob_mirror_url {
4021 return 4;
4022 }
4023 if let Some(_) = self.subscribe {
4024 return 2;
4025 }
4026 if let Some(_) = self.mirror_url {
4027 return 1;
4028 }
4029 0
4030 }
4031 }
4032
4033 impl fidl::encoding::ValueTypeMarker for MirrorConfig {
4034 type Borrowed<'a> = &'a Self;
4035 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4036 value
4037 }
4038 }
4039
4040 unsafe impl fidl::encoding::TypeMarker for MirrorConfig {
4041 type Owned = Self;
4042
4043 #[inline(always)]
4044 fn inline_align(_context: fidl::encoding::Context) -> usize {
4045 8
4046 }
4047
4048 #[inline(always)]
4049 fn inline_size(_context: fidl::encoding::Context) -> usize {
4050 16
4051 }
4052 }
4053
4054 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<MirrorConfig, D>
4055 for &MirrorConfig
4056 {
4057 unsafe fn encode(
4058 self,
4059 encoder: &mut fidl::encoding::Encoder<'_, D>,
4060 offset: usize,
4061 mut depth: fidl::encoding::Depth,
4062 ) -> fidl::Result<()> {
4063 encoder.debug_check_bounds::<MirrorConfig>(offset);
4064 let max_ordinal: u64 = self.max_ordinal_present();
4066 encoder.write_num(max_ordinal, offset);
4067 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4068 if max_ordinal == 0 {
4070 return Ok(());
4071 }
4072 depth.increment()?;
4073 let envelope_size = 8;
4074 let bytes_len = max_ordinal as usize * envelope_size;
4075 #[allow(unused_variables)]
4076 let offset = encoder.out_of_line_offset(bytes_len);
4077 let mut _prev_end_offset: usize = 0;
4078 if 1 > max_ordinal {
4079 return Ok(());
4080 }
4081
4082 let cur_offset: usize = (1 - 1) * envelope_size;
4085
4086 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4088
4089 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
4094 self.mirror_url.as_ref().map(
4095 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
4096 ),
4097 encoder,
4098 offset + cur_offset,
4099 depth,
4100 )?;
4101
4102 _prev_end_offset = cur_offset + envelope_size;
4103 if 2 > max_ordinal {
4104 return Ok(());
4105 }
4106
4107 let cur_offset: usize = (2 - 1) * envelope_size;
4110
4111 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4113
4114 fidl::encoding::encode_in_envelope_optional::<bool, D>(
4119 self.subscribe.as_ref().map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
4120 encoder,
4121 offset + cur_offset,
4122 depth,
4123 )?;
4124
4125 _prev_end_offset = cur_offset + envelope_size;
4126 if 4 > max_ordinal {
4127 return Ok(());
4128 }
4129
4130 let cur_offset: usize = (4 - 1) * envelope_size;
4133
4134 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4136
4137 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
4142 self.blob_mirror_url.as_ref().map(
4143 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
4144 ),
4145 encoder,
4146 offset + cur_offset,
4147 depth,
4148 )?;
4149
4150 _prev_end_offset = cur_offset + envelope_size;
4151
4152 Ok(())
4153 }
4154 }
4155
4156 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for MirrorConfig {
4157 #[inline(always)]
4158 fn new_empty() -> Self {
4159 Self::default()
4160 }
4161
4162 unsafe fn decode(
4163 &mut self,
4164 decoder: &mut fidl::encoding::Decoder<'_, D>,
4165 offset: usize,
4166 mut depth: fidl::encoding::Depth,
4167 ) -> fidl::Result<()> {
4168 decoder.debug_check_bounds::<Self>(offset);
4169 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4170 None => return Err(fidl::Error::NotNullable),
4171 Some(len) => len,
4172 };
4173 if len == 0 {
4175 return Ok(());
4176 };
4177 depth.increment()?;
4178 let envelope_size = 8;
4179 let bytes_len = len * envelope_size;
4180 let offset = decoder.out_of_line_offset(bytes_len)?;
4181 let mut _next_ordinal_to_read = 0;
4183 let mut next_offset = offset;
4184 let end_offset = offset + bytes_len;
4185 _next_ordinal_to_read += 1;
4186 if next_offset >= end_offset {
4187 return Ok(());
4188 }
4189
4190 while _next_ordinal_to_read < 1 {
4192 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4193 _next_ordinal_to_read += 1;
4194 next_offset += envelope_size;
4195 }
4196
4197 let next_out_of_line = decoder.next_out_of_line();
4198 let handles_before = decoder.remaining_handles();
4199 if let Some((inlined, num_bytes, num_handles)) =
4200 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4201 {
4202 let member_inline_size =
4203 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4204 decoder.context,
4205 );
4206 if inlined != (member_inline_size <= 4) {
4207 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4208 }
4209 let inner_offset;
4210 let mut inner_depth = depth.clone();
4211 if inlined {
4212 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4213 inner_offset = next_offset;
4214 } else {
4215 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4216 inner_depth.increment()?;
4217 }
4218 let val_ref = self
4219 .mirror_url
4220 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4221 fidl::decode!(
4222 fidl::encoding::UnboundedString,
4223 D,
4224 val_ref,
4225 decoder,
4226 inner_offset,
4227 inner_depth
4228 )?;
4229 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4230 {
4231 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4232 }
4233 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4234 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4235 }
4236 }
4237
4238 next_offset += envelope_size;
4239 _next_ordinal_to_read += 1;
4240 if next_offset >= end_offset {
4241 return Ok(());
4242 }
4243
4244 while _next_ordinal_to_read < 2 {
4246 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4247 _next_ordinal_to_read += 1;
4248 next_offset += envelope_size;
4249 }
4250
4251 let next_out_of_line = decoder.next_out_of_line();
4252 let handles_before = decoder.remaining_handles();
4253 if let Some((inlined, num_bytes, num_handles)) =
4254 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4255 {
4256 let member_inline_size =
4257 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4258 if inlined != (member_inline_size <= 4) {
4259 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4260 }
4261 let inner_offset;
4262 let mut inner_depth = depth.clone();
4263 if inlined {
4264 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4265 inner_offset = next_offset;
4266 } else {
4267 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4268 inner_depth.increment()?;
4269 }
4270 let val_ref = self.subscribe.get_or_insert_with(|| fidl::new_empty!(bool, D));
4271 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
4272 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4273 {
4274 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4275 }
4276 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4277 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4278 }
4279 }
4280
4281 next_offset += envelope_size;
4282 _next_ordinal_to_read += 1;
4283 if next_offset >= end_offset {
4284 return Ok(());
4285 }
4286
4287 while _next_ordinal_to_read < 4 {
4289 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4290 _next_ordinal_to_read += 1;
4291 next_offset += envelope_size;
4292 }
4293
4294 let next_out_of_line = decoder.next_out_of_line();
4295 let handles_before = decoder.remaining_handles();
4296 if let Some((inlined, num_bytes, num_handles)) =
4297 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4298 {
4299 let member_inline_size =
4300 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4301 decoder.context,
4302 );
4303 if inlined != (member_inline_size <= 4) {
4304 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4305 }
4306 let inner_offset;
4307 let mut inner_depth = depth.clone();
4308 if inlined {
4309 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4310 inner_offset = next_offset;
4311 } else {
4312 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4313 inner_depth.increment()?;
4314 }
4315 let val_ref = self
4316 .blob_mirror_url
4317 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4318 fidl::decode!(
4319 fidl::encoding::UnboundedString,
4320 D,
4321 val_ref,
4322 decoder,
4323 inner_offset,
4324 inner_depth
4325 )?;
4326 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4327 {
4328 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4329 }
4330 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4331 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4332 }
4333 }
4334
4335 next_offset += envelope_size;
4336
4337 while next_offset < end_offset {
4339 _next_ordinal_to_read += 1;
4340 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4341 next_offset += envelope_size;
4342 }
4343
4344 Ok(())
4345 }
4346 }
4347
4348 impl RepositoryConfig {
4349 #[inline(always)]
4350 fn max_ordinal_present(&self) -> u64 {
4351 if let Some(_) = self.storage_type {
4352 return 8;
4353 }
4354 if let Some(_) = self.use_local_mirror {
4355 return 7;
4356 }
4357 if let Some(_) = self.root_threshold {
4358 return 6;
4359 }
4360 if let Some(_) = self.root_version {
4361 return 5;
4362 }
4363 if let Some(_) = self.mirrors {
4364 return 3;
4365 }
4366 if let Some(_) = self.root_keys {
4367 return 2;
4368 }
4369 if let Some(_) = self.repo_url {
4370 return 1;
4371 }
4372 0
4373 }
4374 }
4375
4376 impl fidl::encoding::ValueTypeMarker for RepositoryConfig {
4377 type Borrowed<'a> = &'a Self;
4378 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4379 value
4380 }
4381 }
4382
4383 unsafe impl fidl::encoding::TypeMarker for RepositoryConfig {
4384 type Owned = Self;
4385
4386 #[inline(always)]
4387 fn inline_align(_context: fidl::encoding::Context) -> usize {
4388 8
4389 }
4390
4391 #[inline(always)]
4392 fn inline_size(_context: fidl::encoding::Context) -> usize {
4393 16
4394 }
4395 }
4396
4397 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RepositoryConfig, D>
4398 for &RepositoryConfig
4399 {
4400 unsafe fn encode(
4401 self,
4402 encoder: &mut fidl::encoding::Encoder<'_, D>,
4403 offset: usize,
4404 mut depth: fidl::encoding::Depth,
4405 ) -> fidl::Result<()> {
4406 encoder.debug_check_bounds::<RepositoryConfig>(offset);
4407 let max_ordinal: u64 = self.max_ordinal_present();
4409 encoder.write_num(max_ordinal, offset);
4410 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4411 if max_ordinal == 0 {
4413 return Ok(());
4414 }
4415 depth.increment()?;
4416 let envelope_size = 8;
4417 let bytes_len = max_ordinal as usize * envelope_size;
4418 #[allow(unused_variables)]
4419 let offset = encoder.out_of_line_offset(bytes_len);
4420 let mut _prev_end_offset: usize = 0;
4421 if 1 > max_ordinal {
4422 return Ok(());
4423 }
4424
4425 let cur_offset: usize = (1 - 1) * envelope_size;
4428
4429 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4431
4432 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
4437 self.repo_url.as_ref().map(
4438 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
4439 ),
4440 encoder,
4441 offset + cur_offset,
4442 depth,
4443 )?;
4444
4445 _prev_end_offset = cur_offset + envelope_size;
4446 if 2 > max_ordinal {
4447 return Ok(());
4448 }
4449
4450 let cur_offset: usize = (2 - 1) * envelope_size;
4453
4454 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4456
4457 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<RepositoryKeyConfig>, D>(
4462 self.root_keys.as_ref().map(<fidl::encoding::UnboundedVector<RepositoryKeyConfig> as fidl::encoding::ValueTypeMarker>::borrow),
4463 encoder, offset + cur_offset, depth
4464 )?;
4465
4466 _prev_end_offset = cur_offset + envelope_size;
4467 if 3 > max_ordinal {
4468 return Ok(());
4469 }
4470
4471 let cur_offset: usize = (3 - 1) * envelope_size;
4474
4475 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4477
4478 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<MirrorConfig>, D>(
4483 self.mirrors.as_ref().map(<fidl::encoding::UnboundedVector<MirrorConfig> as fidl::encoding::ValueTypeMarker>::borrow),
4484 encoder, offset + cur_offset, depth
4485 )?;
4486
4487 _prev_end_offset = cur_offset + envelope_size;
4488 if 5 > max_ordinal {
4489 return Ok(());
4490 }
4491
4492 let cur_offset: usize = (5 - 1) * envelope_size;
4495
4496 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4498
4499 fidl::encoding::encode_in_envelope_optional::<u32, D>(
4504 self.root_version.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4505 encoder,
4506 offset + cur_offset,
4507 depth,
4508 )?;
4509
4510 _prev_end_offset = cur_offset + envelope_size;
4511 if 6 > max_ordinal {
4512 return Ok(());
4513 }
4514
4515 let cur_offset: usize = (6 - 1) * envelope_size;
4518
4519 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4521
4522 fidl::encoding::encode_in_envelope_optional::<u32, D>(
4527 self.root_threshold.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4528 encoder,
4529 offset + cur_offset,
4530 depth,
4531 )?;
4532
4533 _prev_end_offset = cur_offset + envelope_size;
4534 if 7 > max_ordinal {
4535 return Ok(());
4536 }
4537
4538 let cur_offset: usize = (7 - 1) * envelope_size;
4541
4542 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4544
4545 fidl::encoding::encode_in_envelope_optional::<bool, D>(
4550 self.use_local_mirror
4551 .as_ref()
4552 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
4553 encoder,
4554 offset + cur_offset,
4555 depth,
4556 )?;
4557
4558 _prev_end_offset = cur_offset + envelope_size;
4559 if 8 > max_ordinal {
4560 return Ok(());
4561 }
4562
4563 let cur_offset: usize = (8 - 1) * envelope_size;
4566
4567 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4569
4570 fidl::encoding::encode_in_envelope_optional::<RepositoryStorageType, D>(
4575 self.storage_type
4576 .as_ref()
4577 .map(<RepositoryStorageType as fidl::encoding::ValueTypeMarker>::borrow),
4578 encoder,
4579 offset + cur_offset,
4580 depth,
4581 )?;
4582
4583 _prev_end_offset = cur_offset + envelope_size;
4584
4585 Ok(())
4586 }
4587 }
4588
4589 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RepositoryConfig {
4590 #[inline(always)]
4591 fn new_empty() -> Self {
4592 Self::default()
4593 }
4594
4595 unsafe fn decode(
4596 &mut self,
4597 decoder: &mut fidl::encoding::Decoder<'_, D>,
4598 offset: usize,
4599 mut depth: fidl::encoding::Depth,
4600 ) -> fidl::Result<()> {
4601 decoder.debug_check_bounds::<Self>(offset);
4602 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4603 None => return Err(fidl::Error::NotNullable),
4604 Some(len) => len,
4605 };
4606 if len == 0 {
4608 return Ok(());
4609 };
4610 depth.increment()?;
4611 let envelope_size = 8;
4612 let bytes_len = len * envelope_size;
4613 let offset = decoder.out_of_line_offset(bytes_len)?;
4614 let mut _next_ordinal_to_read = 0;
4616 let mut next_offset = offset;
4617 let end_offset = offset + bytes_len;
4618 _next_ordinal_to_read += 1;
4619 if next_offset >= end_offset {
4620 return Ok(());
4621 }
4622
4623 while _next_ordinal_to_read < 1 {
4625 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4626 _next_ordinal_to_read += 1;
4627 next_offset += envelope_size;
4628 }
4629
4630 let next_out_of_line = decoder.next_out_of_line();
4631 let handles_before = decoder.remaining_handles();
4632 if let Some((inlined, num_bytes, num_handles)) =
4633 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4634 {
4635 let member_inline_size =
4636 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
4637 decoder.context,
4638 );
4639 if inlined != (member_inline_size <= 4) {
4640 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4641 }
4642 let inner_offset;
4643 let mut inner_depth = depth.clone();
4644 if inlined {
4645 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4646 inner_offset = next_offset;
4647 } else {
4648 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4649 inner_depth.increment()?;
4650 }
4651 let val_ref = self
4652 .repo_url
4653 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
4654 fidl::decode!(
4655 fidl::encoding::UnboundedString,
4656 D,
4657 val_ref,
4658 decoder,
4659 inner_offset,
4660 inner_depth
4661 )?;
4662 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4663 {
4664 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4665 }
4666 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4667 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4668 }
4669 }
4670
4671 next_offset += envelope_size;
4672 _next_ordinal_to_read += 1;
4673 if next_offset >= end_offset {
4674 return Ok(());
4675 }
4676
4677 while _next_ordinal_to_read < 2 {
4679 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4680 _next_ordinal_to_read += 1;
4681 next_offset += envelope_size;
4682 }
4683
4684 let next_out_of_line = decoder.next_out_of_line();
4685 let handles_before = decoder.remaining_handles();
4686 if let Some((inlined, num_bytes, num_handles)) =
4687 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4688 {
4689 let member_inline_size = <fidl::encoding::UnboundedVector<RepositoryKeyConfig> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4690 if inlined != (member_inline_size <= 4) {
4691 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4692 }
4693 let inner_offset;
4694 let mut inner_depth = depth.clone();
4695 if inlined {
4696 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4697 inner_offset = next_offset;
4698 } else {
4699 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4700 inner_depth.increment()?;
4701 }
4702 let val_ref = self.root_keys.get_or_insert_with(|| {
4703 fidl::new_empty!(fidl::encoding::UnboundedVector<RepositoryKeyConfig>, D)
4704 });
4705 fidl::decode!(
4706 fidl::encoding::UnboundedVector<RepositoryKeyConfig>,
4707 D,
4708 val_ref,
4709 decoder,
4710 inner_offset,
4711 inner_depth
4712 )?;
4713 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4714 {
4715 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4716 }
4717 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4718 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4719 }
4720 }
4721
4722 next_offset += envelope_size;
4723 _next_ordinal_to_read += 1;
4724 if next_offset >= end_offset {
4725 return Ok(());
4726 }
4727
4728 while _next_ordinal_to_read < 3 {
4730 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4731 _next_ordinal_to_read += 1;
4732 next_offset += envelope_size;
4733 }
4734
4735 let next_out_of_line = decoder.next_out_of_line();
4736 let handles_before = decoder.remaining_handles();
4737 if let Some((inlined, num_bytes, num_handles)) =
4738 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4739 {
4740 let member_inline_size = <fidl::encoding::UnboundedVector<MirrorConfig> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4741 if inlined != (member_inline_size <= 4) {
4742 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4743 }
4744 let inner_offset;
4745 let mut inner_depth = depth.clone();
4746 if inlined {
4747 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4748 inner_offset = next_offset;
4749 } else {
4750 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4751 inner_depth.increment()?;
4752 }
4753 let val_ref = self.mirrors.get_or_insert_with(|| {
4754 fidl::new_empty!(fidl::encoding::UnboundedVector<MirrorConfig>, D)
4755 });
4756 fidl::decode!(
4757 fidl::encoding::UnboundedVector<MirrorConfig>,
4758 D,
4759 val_ref,
4760 decoder,
4761 inner_offset,
4762 inner_depth
4763 )?;
4764 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4765 {
4766 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4767 }
4768 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4769 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4770 }
4771 }
4772
4773 next_offset += envelope_size;
4774 _next_ordinal_to_read += 1;
4775 if next_offset >= end_offset {
4776 return Ok(());
4777 }
4778
4779 while _next_ordinal_to_read < 5 {
4781 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4782 _next_ordinal_to_read += 1;
4783 next_offset += envelope_size;
4784 }
4785
4786 let next_out_of_line = decoder.next_out_of_line();
4787 let handles_before = decoder.remaining_handles();
4788 if let Some((inlined, num_bytes, num_handles)) =
4789 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4790 {
4791 let member_inline_size =
4792 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4793 if inlined != (member_inline_size <= 4) {
4794 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4795 }
4796 let inner_offset;
4797 let mut inner_depth = depth.clone();
4798 if inlined {
4799 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4800 inner_offset = next_offset;
4801 } else {
4802 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4803 inner_depth.increment()?;
4804 }
4805 let val_ref = self.root_version.get_or_insert_with(|| fidl::new_empty!(u32, D));
4806 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4807 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4808 {
4809 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4810 }
4811 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4812 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4813 }
4814 }
4815
4816 next_offset += envelope_size;
4817 _next_ordinal_to_read += 1;
4818 if next_offset >= end_offset {
4819 return Ok(());
4820 }
4821
4822 while _next_ordinal_to_read < 6 {
4824 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4825 _next_ordinal_to_read += 1;
4826 next_offset += envelope_size;
4827 }
4828
4829 let next_out_of_line = decoder.next_out_of_line();
4830 let handles_before = decoder.remaining_handles();
4831 if let Some((inlined, num_bytes, num_handles)) =
4832 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4833 {
4834 let member_inline_size =
4835 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4836 if inlined != (member_inline_size <= 4) {
4837 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4838 }
4839 let inner_offset;
4840 let mut inner_depth = depth.clone();
4841 if inlined {
4842 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4843 inner_offset = next_offset;
4844 } else {
4845 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4846 inner_depth.increment()?;
4847 }
4848 let val_ref = self.root_threshold.get_or_insert_with(|| fidl::new_empty!(u32, D));
4849 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4850 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4851 {
4852 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4853 }
4854 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4855 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4856 }
4857 }
4858
4859 next_offset += envelope_size;
4860 _next_ordinal_to_read += 1;
4861 if next_offset >= end_offset {
4862 return Ok(());
4863 }
4864
4865 while _next_ordinal_to_read < 7 {
4867 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4868 _next_ordinal_to_read += 1;
4869 next_offset += envelope_size;
4870 }
4871
4872 let next_out_of_line = decoder.next_out_of_line();
4873 let handles_before = decoder.remaining_handles();
4874 if let Some((inlined, num_bytes, num_handles)) =
4875 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4876 {
4877 let member_inline_size =
4878 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4879 if inlined != (member_inline_size <= 4) {
4880 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4881 }
4882 let inner_offset;
4883 let mut inner_depth = depth.clone();
4884 if inlined {
4885 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4886 inner_offset = next_offset;
4887 } else {
4888 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4889 inner_depth.increment()?;
4890 }
4891 let val_ref =
4892 self.use_local_mirror.get_or_insert_with(|| fidl::new_empty!(bool, D));
4893 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
4894 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4895 {
4896 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4897 }
4898 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4899 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4900 }
4901 }
4902
4903 next_offset += envelope_size;
4904 _next_ordinal_to_read += 1;
4905 if next_offset >= end_offset {
4906 return Ok(());
4907 }
4908
4909 while _next_ordinal_to_read < 8 {
4911 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4912 _next_ordinal_to_read += 1;
4913 next_offset += envelope_size;
4914 }
4915
4916 let next_out_of_line = decoder.next_out_of_line();
4917 let handles_before = decoder.remaining_handles();
4918 if let Some((inlined, num_bytes, num_handles)) =
4919 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4920 {
4921 let member_inline_size =
4922 <RepositoryStorageType as fidl::encoding::TypeMarker>::inline_size(
4923 decoder.context,
4924 );
4925 if inlined != (member_inline_size <= 4) {
4926 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4927 }
4928 let inner_offset;
4929 let mut inner_depth = depth.clone();
4930 if inlined {
4931 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4932 inner_offset = next_offset;
4933 } else {
4934 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4935 inner_depth.increment()?;
4936 }
4937 let val_ref = self
4938 .storage_type
4939 .get_or_insert_with(|| fidl::new_empty!(RepositoryStorageType, D));
4940 fidl::decode!(
4941 RepositoryStorageType,
4942 D,
4943 val_ref,
4944 decoder,
4945 inner_offset,
4946 inner_depth
4947 )?;
4948 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4949 {
4950 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4951 }
4952 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4953 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4954 }
4955 }
4956
4957 next_offset += envelope_size;
4958
4959 while next_offset < end_offset {
4961 _next_ordinal_to_read += 1;
4962 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4963 next_offset += envelope_size;
4964 }
4965
4966 Ok(())
4967 }
4968 }
4969
4970 impl fidl::encoding::ValueTypeMarker for RepositoryKeyConfig {
4971 type Borrowed<'a> = &'a Self;
4972 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4973 value
4974 }
4975 }
4976
4977 unsafe impl fidl::encoding::TypeMarker for RepositoryKeyConfig {
4978 type Owned = Self;
4979
4980 #[inline(always)]
4981 fn inline_align(_context: fidl::encoding::Context) -> usize {
4982 8
4983 }
4984
4985 #[inline(always)]
4986 fn inline_size(_context: fidl::encoding::Context) -> usize {
4987 16
4988 }
4989 }
4990
4991 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RepositoryKeyConfig, D>
4992 for &RepositoryKeyConfig
4993 {
4994 #[inline]
4995 unsafe fn encode(
4996 self,
4997 encoder: &mut fidl::encoding::Encoder<'_, D>,
4998 offset: usize,
4999 _depth: fidl::encoding::Depth,
5000 ) -> fidl::Result<()> {
5001 encoder.debug_check_bounds::<RepositoryKeyConfig>(offset);
5002 encoder.write_num::<u64>(self.ordinal(), offset);
5003 match self {
5004 RepositoryKeyConfig::Ed25519Key(ref val) => {
5005 fidl::encoding::encode_in_envelope::<fidl::encoding::UnboundedVector<u8>, D>(
5006 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(val),
5007 encoder, offset + 8, _depth
5008 )
5009 }
5010 RepositoryKeyConfig::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
5011 }
5012 }
5013 }
5014
5015 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RepositoryKeyConfig {
5016 #[inline(always)]
5017 fn new_empty() -> Self {
5018 Self::__SourceBreaking { unknown_ordinal: 0 }
5019 }
5020
5021 #[inline]
5022 unsafe fn decode(
5023 &mut self,
5024 decoder: &mut fidl::encoding::Decoder<'_, D>,
5025 offset: usize,
5026 mut depth: fidl::encoding::Depth,
5027 ) -> fidl::Result<()> {
5028 decoder.debug_check_bounds::<Self>(offset);
5029 #[allow(unused_variables)]
5030 let next_out_of_line = decoder.next_out_of_line();
5031 let handles_before = decoder.remaining_handles();
5032 let (ordinal, inlined, num_bytes, num_handles) =
5033 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
5034
5035 let member_inline_size = match ordinal {
5036 1 => {
5037 <fidl::encoding::UnboundedVector<u8> as fidl::encoding::TypeMarker>::inline_size(
5038 decoder.context,
5039 )
5040 }
5041 0 => return Err(fidl::Error::UnknownUnionTag),
5042 _ => num_bytes as usize,
5043 };
5044
5045 if inlined != (member_inline_size <= 4) {
5046 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5047 }
5048 let _inner_offset;
5049 if inlined {
5050 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
5051 _inner_offset = offset + 8;
5052 } else {
5053 depth.increment()?;
5054 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5055 }
5056 match ordinal {
5057 1 => {
5058 #[allow(irrefutable_let_patterns)]
5059 if let RepositoryKeyConfig::Ed25519Key(_) = self {
5060 } else {
5062 *self = RepositoryKeyConfig::Ed25519Key(fidl::new_empty!(
5064 fidl::encoding::UnboundedVector<u8>,
5065 D
5066 ));
5067 }
5068 #[allow(irrefutable_let_patterns)]
5069 if let RepositoryKeyConfig::Ed25519Key(ref mut val) = self {
5070 fidl::decode!(
5071 fidl::encoding::UnboundedVector<u8>,
5072 D,
5073 val,
5074 decoder,
5075 _inner_offset,
5076 depth
5077 )?;
5078 } else {
5079 unreachable!()
5080 }
5081 }
5082 #[allow(deprecated)]
5083 ordinal => {
5084 for _ in 0..num_handles {
5085 decoder.drop_next_handle()?;
5086 }
5087 *self = RepositoryKeyConfig::__SourceBreaking { unknown_ordinal: ordinal };
5088 }
5089 }
5090 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
5091 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5092 }
5093 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5094 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5095 }
5096 Ok(())
5097 }
5098 }
5099}