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_INSTANCE_ID_LENGTH: u32 = 64;
15
16pub const MAX_START_REASON: u32 = 5000;
20
21pub const MAX_STORAGE_ID_LENGTH: u32 = 64;
25
26#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
28pub enum ConfigOverrideError {
29 InstanceNotFound,
31 BadMoniker,
33 InstanceNotResolved,
35 NoConfig,
37 KeyNotFound,
39 #[doc(hidden)]
40 __SourceBreaking { unknown_ordinal: u32 },
41}
42
43#[macro_export]
45macro_rules! ConfigOverrideErrorUnknown {
46 () => {
47 _
48 };
49}
50
51impl ConfigOverrideError {
52 #[inline]
53 pub fn from_primitive(prim: u32) -> Option<Self> {
54 match prim {
55 1 => Some(Self::InstanceNotFound),
56 2 => Some(Self::BadMoniker),
57 3 => Some(Self::InstanceNotResolved),
58 4 => Some(Self::NoConfig),
59 5 => Some(Self::KeyNotFound),
60 _ => None,
61 }
62 }
63
64 #[inline]
65 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
66 match prim {
67 1 => Self::InstanceNotFound,
68 2 => Self::BadMoniker,
69 3 => Self::InstanceNotResolved,
70 4 => Self::NoConfig,
71 5 => Self::KeyNotFound,
72 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
73 }
74 }
75
76 #[inline]
77 pub fn unknown() -> Self {
78 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
79 }
80
81 #[inline]
82 pub const fn into_primitive(self) -> u32 {
83 match self {
84 Self::InstanceNotFound => 1,
85 Self::BadMoniker => 2,
86 Self::InstanceNotResolved => 3,
87 Self::NoConfig => 4,
88 Self::KeyNotFound => 5,
89 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
90 }
91 }
92
93 #[inline]
94 pub fn is_unknown(&self) -> bool {
95 match self {
96 Self::__SourceBreaking { unknown_ordinal: _ } => true,
97 _ => false,
98 }
99 }
100}
101
102#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
104pub enum ConnectToStorageAdminError {
105 InstanceNotFound,
107 BadMoniker,
109 StorageNotFound,
111 InstanceNotResolved,
113 BadCapability,
115 #[doc(hidden)]
116 __SourceBreaking { unknown_ordinal: u32 },
117}
118
119#[macro_export]
121macro_rules! ConnectToStorageAdminErrorUnknown {
122 () => {
123 _
124 };
125}
126
127impl ConnectToStorageAdminError {
128 #[inline]
129 pub fn from_primitive(prim: u32) -> Option<Self> {
130 match prim {
131 1 => Some(Self::InstanceNotFound),
132 2 => Some(Self::BadMoniker),
133 3 => Some(Self::StorageNotFound),
134 4 => Some(Self::InstanceNotResolved),
135 5 => Some(Self::BadCapability),
136 _ => None,
137 }
138 }
139
140 #[inline]
141 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
142 match prim {
143 1 => Self::InstanceNotFound,
144 2 => Self::BadMoniker,
145 3 => Self::StorageNotFound,
146 4 => Self::InstanceNotResolved,
147 5 => Self::BadCapability,
148 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
149 }
150 }
151
152 #[inline]
153 pub fn unknown() -> Self {
154 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
155 }
156
157 #[inline]
158 pub const fn into_primitive(self) -> u32 {
159 match self {
160 Self::InstanceNotFound => 1,
161 Self::BadMoniker => 2,
162 Self::StorageNotFound => 3,
163 Self::InstanceNotResolved => 4,
164 Self::BadCapability => 5,
165 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
166 }
167 }
168
169 #[inline]
170 pub fn is_unknown(&self) -> bool {
171 match self {
172 Self::__SourceBreaking { unknown_ordinal: _ } => true,
173 _ => false,
174 }
175 }
176}
177
178#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
180pub enum ConstructNamespaceError {
181 InstanceNotFound,
183 BadMoniker,
185 InstanceNotResolved,
187 #[doc(hidden)]
188 __SourceBreaking { unknown_ordinal: u32 },
189}
190
191#[macro_export]
193macro_rules! ConstructNamespaceErrorUnknown {
194 () => {
195 _
196 };
197}
198
199impl ConstructNamespaceError {
200 #[inline]
201 pub fn from_primitive(prim: u32) -> Option<Self> {
202 match prim {
203 1 => Some(Self::InstanceNotFound),
204 2 => Some(Self::BadMoniker),
205 3 => Some(Self::InstanceNotResolved),
206 _ => None,
207 }
208 }
209
210 #[inline]
211 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
212 match prim {
213 1 => Self::InstanceNotFound,
214 2 => Self::BadMoniker,
215 3 => Self::InstanceNotResolved,
216 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
217 }
218 }
219
220 #[inline]
221 pub fn unknown() -> Self {
222 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
223 }
224
225 #[inline]
226 pub const fn into_primitive(self) -> u32 {
227 match self {
228 Self::InstanceNotFound => 1,
229 Self::BadMoniker => 2,
230 Self::InstanceNotResolved => 3,
231 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
232 }
233 }
234
235 #[inline]
236 pub fn is_unknown(&self) -> bool {
237 match self {
238 Self::__SourceBreaking { unknown_ordinal: _ } => true,
239 _ => false,
240 }
241 }
242}
243
244#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
245pub enum CreateError {
246 Internal,
247 InstanceNotFound,
248 InstanceAlreadyExists,
249 BadMoniker,
250 BadChildDecl,
251 CollectionNotFound,
252 BadDynamicOffer,
253 DynamicOffersForbidden,
254 NumberedHandlesForbidden,
255 #[doc(hidden)]
256 __SourceBreaking {
257 unknown_ordinal: u32,
258 },
259}
260
261#[macro_export]
263macro_rules! CreateErrorUnknown {
264 () => {
265 _
266 };
267}
268
269impl CreateError {
270 #[inline]
271 pub fn from_primitive(prim: u32) -> Option<Self> {
272 match prim {
273 1 => Some(Self::Internal),
274 2 => Some(Self::InstanceNotFound),
275 3 => Some(Self::InstanceAlreadyExists),
276 4 => Some(Self::BadMoniker),
277 5 => Some(Self::BadChildDecl),
278 6 => Some(Self::CollectionNotFound),
279 7 => Some(Self::BadDynamicOffer),
280 8 => Some(Self::DynamicOffersForbidden),
281 10 => Some(Self::NumberedHandlesForbidden),
282 _ => None,
283 }
284 }
285
286 #[inline]
287 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
288 match prim {
289 1 => Self::Internal,
290 2 => Self::InstanceNotFound,
291 3 => Self::InstanceAlreadyExists,
292 4 => Self::BadMoniker,
293 5 => Self::BadChildDecl,
294 6 => Self::CollectionNotFound,
295 7 => Self::BadDynamicOffer,
296 8 => Self::DynamicOffersForbidden,
297 10 => Self::NumberedHandlesForbidden,
298 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
299 }
300 }
301
302 #[inline]
303 pub fn unknown() -> Self {
304 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
305 }
306
307 #[inline]
308 pub const fn into_primitive(self) -> u32 {
309 match self {
310 Self::Internal => 1,
311 Self::InstanceNotFound => 2,
312 Self::InstanceAlreadyExists => 3,
313 Self::BadMoniker => 4,
314 Self::BadChildDecl => 5,
315 Self::CollectionNotFound => 6,
316 Self::BadDynamicOffer => 7,
317 Self::DynamicOffersForbidden => 8,
318 Self::NumberedHandlesForbidden => 10,
319 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
320 }
321 }
322
323 #[inline]
324 pub fn is_unknown(&self) -> bool {
325 match self {
326 Self::__SourceBreaking { unknown_ordinal: _ } => true,
327 _ => false,
328 }
329 }
330}
331
332#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
333pub enum DeclType {
334 Use,
337 Expose,
339 Any,
342 #[doc(hidden)]
343 __SourceBreaking { unknown_ordinal: u32 },
344}
345
346#[macro_export]
348macro_rules! DeclTypeUnknown {
349 () => {
350 _
351 };
352}
353
354impl DeclType {
355 #[inline]
356 pub fn from_primitive(prim: u32) -> Option<Self> {
357 match prim {
358 1 => Some(Self::Use),
359 2 => Some(Self::Expose),
360 3 => Some(Self::Any),
361 _ => None,
362 }
363 }
364
365 #[inline]
366 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
367 match prim {
368 1 => Self::Use,
369 2 => Self::Expose,
370 3 => Self::Any,
371 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
372 }
373 }
374
375 #[inline]
376 pub fn unknown() -> Self {
377 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
378 }
379
380 #[inline]
381 pub const fn into_primitive(self) -> u32 {
382 match self {
383 Self::Use => 1,
384 Self::Expose => 2,
385 Self::Any => 3,
386 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
387 }
388 }
389
390 #[inline]
391 pub fn is_unknown(&self) -> bool {
392 match self {
393 Self::__SourceBreaking { unknown_ordinal: _ } => true,
394 _ => false,
395 }
396 }
397}
398
399#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
400#[repr(u32)]
401pub enum DeletionError {
402 Connection = 1,
404 Protocol = 2,
407 NoneAvailable = 3,
409 Unsupported = 4,
411}
412
413impl DeletionError {
414 #[inline]
415 pub fn from_primitive(prim: u32) -> Option<Self> {
416 match prim {
417 1 => Some(Self::Connection),
418 2 => Some(Self::Protocol),
419 3 => Some(Self::NoneAvailable),
420 4 => Some(Self::Unsupported),
421 _ => None,
422 }
423 }
424
425 #[inline]
426 pub const fn into_primitive(self) -> u32 {
427 self as u32
428 }
429}
430
431#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
432pub enum DestroyError {
433 Internal,
434 InstanceNotFound,
435 BadMoniker,
436 BadChildRef,
437 InstanceNotResolved,
438 #[doc(hidden)]
439 __SourceBreaking {
440 unknown_ordinal: u32,
441 },
442}
443
444#[macro_export]
446macro_rules! DestroyErrorUnknown {
447 () => {
448 _
449 };
450}
451
452impl DestroyError {
453 #[inline]
454 pub fn from_primitive(prim: u32) -> Option<Self> {
455 match prim {
456 1 => Some(Self::Internal),
457 2 => Some(Self::InstanceNotFound),
458 3 => Some(Self::BadMoniker),
459 4 => Some(Self::BadChildRef),
460 5 => Some(Self::InstanceNotResolved),
461 _ => None,
462 }
463 }
464
465 #[inline]
466 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
467 match prim {
468 1 => Self::Internal,
469 2 => Self::InstanceNotFound,
470 3 => Self::BadMoniker,
471 4 => Self::BadChildRef,
472 5 => Self::InstanceNotResolved,
473 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
474 }
475 }
476
477 #[inline]
478 pub fn unknown() -> Self {
479 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
480 }
481
482 #[inline]
483 pub const fn into_primitive(self) -> u32 {
484 match self {
485 Self::Internal => 1,
486 Self::InstanceNotFound => 2,
487 Self::BadMoniker => 3,
488 Self::BadChildRef => 4,
489 Self::InstanceNotResolved => 5,
490 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
491 }
492 }
493
494 #[inline]
495 pub fn is_unknown(&self) -> bool {
496 match self {
497 Self::__SourceBreaking { unknown_ordinal: _ } => true,
498 _ => false,
499 }
500 }
501}
502
503#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
505pub enum GetAllInstancesError {
506 InstanceNotFound,
508 #[doc(hidden)]
509 __SourceBreaking { unknown_ordinal: u32 },
510}
511
512#[macro_export]
514macro_rules! GetAllInstancesErrorUnknown {
515 () => {
516 _
517 };
518}
519
520impl GetAllInstancesError {
521 #[inline]
522 pub fn from_primitive(prim: u32) -> Option<Self> {
523 match prim {
524 1 => Some(Self::InstanceNotFound),
525 _ => None,
526 }
527 }
528
529 #[inline]
530 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
531 match prim {
532 1 => Self::InstanceNotFound,
533 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
534 }
535 }
536
537 #[inline]
538 pub fn unknown() -> Self {
539 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
540 }
541
542 #[inline]
543 pub const fn into_primitive(self) -> u32 {
544 match self {
545 Self::InstanceNotFound => 1,
546 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
547 }
548 }
549
550 #[inline]
551 pub fn is_unknown(&self) -> bool {
552 match self {
553 Self::__SourceBreaking { unknown_ordinal: _ } => true,
554 _ => false,
555 }
556 }
557}
558
559#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
561pub enum GetDeclarationError {
562 InstanceNotFound,
564 BadMoniker,
566 InstanceNotResolved,
568 EncodeFailed,
570 BadChildLocation,
572 BadUrl,
574 #[doc(hidden)]
575 __SourceBreaking { unknown_ordinal: u32 },
576}
577
578#[macro_export]
580macro_rules! GetDeclarationErrorUnknown {
581 () => {
582 _
583 };
584}
585
586impl GetDeclarationError {
587 #[inline]
588 pub fn from_primitive(prim: u32) -> Option<Self> {
589 match prim {
590 1 => Some(Self::InstanceNotFound),
591 2 => Some(Self::BadMoniker),
592 3 => Some(Self::InstanceNotResolved),
593 4 => Some(Self::EncodeFailed),
594 5 => Some(Self::BadChildLocation),
595 6 => Some(Self::BadUrl),
596 _ => None,
597 }
598 }
599
600 #[inline]
601 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
602 match prim {
603 1 => Self::InstanceNotFound,
604 2 => Self::BadMoniker,
605 3 => Self::InstanceNotResolved,
606 4 => Self::EncodeFailed,
607 5 => Self::BadChildLocation,
608 6 => Self::BadUrl,
609 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
610 }
611 }
612
613 #[inline]
614 pub fn unknown() -> Self {
615 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
616 }
617
618 #[inline]
619 pub const fn into_primitive(self) -> u32 {
620 match self {
621 Self::InstanceNotFound => 1,
622 Self::BadMoniker => 2,
623 Self::InstanceNotResolved => 3,
624 Self::EncodeFailed => 4,
625 Self::BadChildLocation => 5,
626 Self::BadUrl => 6,
627 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
628 }
629 }
630
631 #[inline]
632 pub fn is_unknown(&self) -> bool {
633 match self {
634 Self::__SourceBreaking { unknown_ordinal: _ } => true,
635 _ => false,
636 }
637 }
638}
639
640#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
642pub enum GetInstanceError {
643 InstanceNotFound,
645 BadMoniker,
647 #[doc(hidden)]
648 __SourceBreaking { unknown_ordinal: u32 },
649}
650
651#[macro_export]
653macro_rules! GetInstanceErrorUnknown {
654 () => {
655 _
656 };
657}
658
659impl GetInstanceError {
660 #[inline]
661 pub fn from_primitive(prim: u32) -> Option<Self> {
662 match prim {
663 1 => Some(Self::InstanceNotFound),
664 2 => Some(Self::BadMoniker),
665 _ => None,
666 }
667 }
668
669 #[inline]
670 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
671 match prim {
672 1 => Self::InstanceNotFound,
673 2 => Self::BadMoniker,
674 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
675 }
676 }
677
678 #[inline]
679 pub fn unknown() -> Self {
680 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
681 }
682
683 #[inline]
684 pub const fn into_primitive(self) -> u32 {
685 match self {
686 Self::InstanceNotFound => 1,
687 Self::BadMoniker => 2,
688 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
689 }
690 }
691
692 #[inline]
693 pub fn is_unknown(&self) -> bool {
694 match self {
695 Self::__SourceBreaking { unknown_ordinal: _ } => true,
696 _ => false,
697 }
698 }
699}
700
701#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
703pub enum GetStructuredConfigError {
704 InstanceNotFound,
706 BadMoniker,
708 InstanceNotResolved,
710 NoConfig,
712 #[doc(hidden)]
713 __SourceBreaking { unknown_ordinal: u32 },
714}
715
716#[macro_export]
718macro_rules! GetStructuredConfigErrorUnknown {
719 () => {
720 _
721 };
722}
723
724impl GetStructuredConfigError {
725 #[inline]
726 pub fn from_primitive(prim: u32) -> Option<Self> {
727 match prim {
728 1 => Some(Self::InstanceNotFound),
729 2 => Some(Self::BadMoniker),
730 3 => Some(Self::InstanceNotResolved),
731 4 => Some(Self::NoConfig),
732 _ => None,
733 }
734 }
735
736 #[inline]
737 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
738 match prim {
739 1 => Self::InstanceNotFound,
740 2 => Self::BadMoniker,
741 3 => Self::InstanceNotResolved,
742 4 => Self::NoConfig,
743 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
744 }
745 }
746
747 #[inline]
748 pub fn unknown() -> Self {
749 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
750 }
751
752 #[inline]
753 pub const fn into_primitive(self) -> u32 {
754 match self {
755 Self::InstanceNotFound => 1,
756 Self::BadMoniker => 2,
757 Self::InstanceNotResolved => 3,
758 Self::NoConfig => 4,
759 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
760 }
761 }
762
763 #[inline]
764 pub fn is_unknown(&self) -> bool {
765 match self {
766 Self::__SourceBreaking { unknown_ordinal: _ } => true,
767 _ => false,
768 }
769 }
770}
771
772#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
774pub enum OpenDirType {
775 OutgoingDir,
777 RuntimeDir,
779 PackageDir,
781 ExposedDir,
783 NamespaceDir,
785 #[doc(hidden)]
786 __SourceBreaking { unknown_ordinal: u32 },
787}
788
789#[macro_export]
791macro_rules! OpenDirTypeUnknown {
792 () => {
793 _
794 };
795}
796
797impl OpenDirType {
798 #[inline]
799 pub fn from_primitive(prim: u32) -> Option<Self> {
800 match prim {
801 1 => Some(Self::OutgoingDir),
802 2 => Some(Self::RuntimeDir),
803 3 => Some(Self::PackageDir),
804 4 => Some(Self::ExposedDir),
805 5 => Some(Self::NamespaceDir),
806 _ => None,
807 }
808 }
809
810 #[inline]
811 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
812 match prim {
813 1 => Self::OutgoingDir,
814 2 => Self::RuntimeDir,
815 3 => Self::PackageDir,
816 4 => Self::ExposedDir,
817 5 => Self::NamespaceDir,
818 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
819 }
820 }
821
822 #[inline]
823 pub fn unknown() -> Self {
824 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
825 }
826
827 #[inline]
828 pub const fn into_primitive(self) -> u32 {
829 match self {
830 Self::OutgoingDir => 1,
831 Self::RuntimeDir => 2,
832 Self::PackageDir => 3,
833 Self::ExposedDir => 4,
834 Self::NamespaceDir => 5,
835 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
836 }
837 }
838
839 #[inline]
840 pub fn is_unknown(&self) -> bool {
841 match self {
842 Self::__SourceBreaking { unknown_ordinal: _ } => true,
843 _ => false,
844 }
845 }
846}
847
848#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
850pub enum OpenError {
851 InstanceNotFound,
853 BadMoniker,
855 InstanceNotResolved,
857 InstanceNotRunning,
862 FidlError,
864 NoSuchDir,
866 BadDirType,
868 InstanceDestroyed,
870 #[doc(hidden)]
871 __SourceBreaking { unknown_ordinal: u32 },
872}
873
874#[macro_export]
876macro_rules! OpenErrorUnknown {
877 () => {
878 _
879 };
880}
881
882impl OpenError {
883 #[inline]
884 pub fn from_primitive(prim: u32) -> Option<Self> {
885 match prim {
886 1 => Some(Self::InstanceNotFound),
887 2 => Some(Self::BadMoniker),
888 3 => Some(Self::InstanceNotResolved),
889 4 => Some(Self::InstanceNotRunning),
890 5 => Some(Self::FidlError),
891 6 => Some(Self::NoSuchDir),
892 7 => Some(Self::BadDirType),
893 10 => Some(Self::InstanceDestroyed),
894 _ => None,
895 }
896 }
897
898 #[inline]
899 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
900 match prim {
901 1 => Self::InstanceNotFound,
902 2 => Self::BadMoniker,
903 3 => Self::InstanceNotResolved,
904 4 => Self::InstanceNotRunning,
905 5 => Self::FidlError,
906 6 => Self::NoSuchDir,
907 7 => Self::BadDirType,
908 10 => Self::InstanceDestroyed,
909 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
910 }
911 }
912
913 #[inline]
914 pub fn unknown() -> Self {
915 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
916 }
917
918 #[inline]
919 pub const fn into_primitive(self) -> u32 {
920 match self {
921 Self::InstanceNotFound => 1,
922 Self::BadMoniker => 2,
923 Self::InstanceNotResolved => 3,
924 Self::InstanceNotRunning => 4,
925 Self::FidlError => 5,
926 Self::NoSuchDir => 6,
927 Self::BadDirType => 7,
928 Self::InstanceDestroyed => 10,
929 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
930 }
931 }
932
933 #[inline]
934 pub fn is_unknown(&self) -> bool {
935 match self {
936 Self::__SourceBreaking { unknown_ordinal: _ } => true,
937 _ => false,
938 }
939 }
940}
941
942#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
944pub enum RealmQueryError {
945 InstanceNotFound,
947 BadMoniker,
949 #[doc(hidden)]
950 __SourceBreaking { unknown_ordinal: u32 },
951}
952
953#[macro_export]
955macro_rules! RealmQueryErrorUnknown {
956 () => {
957 _
958 };
959}
960
961impl RealmQueryError {
962 #[inline]
963 pub fn from_primitive(prim: u32) -> Option<Self> {
964 match prim {
965 1 => Some(Self::InstanceNotFound),
966 2 => Some(Self::BadMoniker),
967 _ => None,
968 }
969 }
970
971 #[inline]
972 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
973 match prim {
974 1 => Self::InstanceNotFound,
975 2 => Self::BadMoniker,
976 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
977 }
978 }
979
980 #[inline]
981 pub fn unknown() -> Self {
982 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
983 }
984
985 #[inline]
986 pub const fn into_primitive(self) -> u32 {
987 match self {
988 Self::InstanceNotFound => 1,
989 Self::BadMoniker => 2,
990 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
991 }
992 }
993
994 #[inline]
995 pub fn is_unknown(&self) -> bool {
996 match self {
997 Self::__SourceBreaking { unknown_ordinal: _ } => true,
998 _ => false,
999 }
1000 }
1001}
1002
1003#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1004pub enum ResolveError {
1005 Internal,
1006 InstanceNotFound,
1007 BadMoniker,
1008 PackageNotFound,
1009 ManifestNotFound,
1010 PolicyError,
1011 #[doc(hidden)]
1012 __SourceBreaking {
1013 unknown_ordinal: u32,
1014 },
1015}
1016
1017#[macro_export]
1019macro_rules! ResolveErrorUnknown {
1020 () => {
1021 _
1022 };
1023}
1024
1025impl ResolveError {
1026 #[inline]
1027 pub fn from_primitive(prim: u32) -> Option<Self> {
1028 match prim {
1029 1 => Some(Self::Internal),
1030 2 => Some(Self::InstanceNotFound),
1031 3 => Some(Self::BadMoniker),
1032 4 => Some(Self::PackageNotFound),
1033 5 => Some(Self::ManifestNotFound),
1034 6 => Some(Self::PolicyError),
1035 _ => None,
1036 }
1037 }
1038
1039 #[inline]
1040 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1041 match prim {
1042 1 => Self::Internal,
1043 2 => Self::InstanceNotFound,
1044 3 => Self::BadMoniker,
1045 4 => Self::PackageNotFound,
1046 5 => Self::ManifestNotFound,
1047 6 => Self::PolicyError,
1048 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1049 }
1050 }
1051
1052 #[inline]
1053 pub fn unknown() -> Self {
1054 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1055 }
1056
1057 #[inline]
1058 pub const fn into_primitive(self) -> u32 {
1059 match self {
1060 Self::Internal => 1,
1061 Self::InstanceNotFound => 2,
1062 Self::BadMoniker => 3,
1063 Self::PackageNotFound => 4,
1064 Self::ManifestNotFound => 5,
1065 Self::PolicyError => 6,
1066 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1067 }
1068 }
1069
1070 #[inline]
1071 pub fn is_unknown(&self) -> bool {
1072 match self {
1073 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1074 _ => false,
1075 }
1076 }
1077}
1078
1079#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1080pub enum RouteOutcome {
1081 Success,
1083 Void,
1086 Failed,
1088 #[doc(hidden)]
1089 __SourceBreaking { unknown_ordinal: u32 },
1090}
1091
1092#[macro_export]
1094macro_rules! RouteOutcomeUnknown {
1095 () => {
1096 _
1097 };
1098}
1099
1100impl RouteOutcome {
1101 #[inline]
1102 pub fn from_primitive(prim: u32) -> Option<Self> {
1103 match prim {
1104 1 => Some(Self::Success),
1105 2 => Some(Self::Void),
1106 3 => Some(Self::Failed),
1107 _ => None,
1108 }
1109 }
1110
1111 #[inline]
1112 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1113 match prim {
1114 1 => Self::Success,
1115 2 => Self::Void,
1116 3 => Self::Failed,
1117 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1118 }
1119 }
1120
1121 #[inline]
1122 pub fn unknown() -> Self {
1123 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1124 }
1125
1126 #[inline]
1127 pub const fn into_primitive(self) -> u32 {
1128 match self {
1129 Self::Success => 1,
1130 Self::Void => 2,
1131 Self::Failed => 3,
1132 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1133 }
1134 }
1135
1136 #[inline]
1137 pub fn is_unknown(&self) -> bool {
1138 match self {
1139 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1140 _ => false,
1141 }
1142 }
1143}
1144
1145#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1147pub enum RouteValidatorError {
1148 Internal,
1150 InvalidArguments,
1152 InstanceNotFound,
1154 InstanceNotResolved,
1156 #[doc(hidden)]
1157 __SourceBreaking { unknown_ordinal: u32 },
1158}
1159
1160#[macro_export]
1162macro_rules! RouteValidatorErrorUnknown {
1163 () => {
1164 _
1165 };
1166}
1167
1168impl RouteValidatorError {
1169 #[inline]
1170 pub fn from_primitive(prim: u32) -> Option<Self> {
1171 match prim {
1172 1 => Some(Self::Internal),
1173 2 => Some(Self::InvalidArguments),
1174 3 => Some(Self::InstanceNotFound),
1175 4 => Some(Self::InstanceNotResolved),
1176 _ => None,
1177 }
1178 }
1179
1180 #[inline]
1181 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1182 match prim {
1183 1 => Self::Internal,
1184 2 => Self::InvalidArguments,
1185 3 => Self::InstanceNotFound,
1186 4 => Self::InstanceNotResolved,
1187 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1188 }
1189 }
1190
1191 #[inline]
1192 pub fn unknown() -> Self {
1193 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1194 }
1195
1196 #[inline]
1197 pub const fn into_primitive(self) -> u32 {
1198 match self {
1199 Self::Internal => 1,
1200 Self::InvalidArguments => 2,
1201 Self::InstanceNotFound => 3,
1202 Self::InstanceNotResolved => 4,
1203 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1204 }
1205 }
1206
1207 #[inline]
1208 pub fn is_unknown(&self) -> bool {
1209 match self {
1210 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1211 _ => false,
1212 }
1213 }
1214}
1215
1216#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1217pub enum StartError {
1218 Internal,
1219 InstanceNotFound,
1220 BadMoniker,
1221 PackageNotFound,
1222 ManifestNotFound,
1223 PolicyError,
1224 InvalidArguments,
1225 #[doc(hidden)]
1226 __SourceBreaking {
1227 unknown_ordinal: u32,
1228 },
1229}
1230
1231#[macro_export]
1233macro_rules! StartErrorUnknown {
1234 () => {
1235 _
1236 };
1237}
1238
1239impl StartError {
1240 #[inline]
1241 pub fn from_primitive(prim: u32) -> Option<Self> {
1242 match prim {
1243 1 => Some(Self::Internal),
1244 2 => Some(Self::InstanceNotFound),
1245 3 => Some(Self::BadMoniker),
1246 4 => Some(Self::PackageNotFound),
1247 5 => Some(Self::ManifestNotFound),
1248 6 => Some(Self::PolicyError),
1249 7 => Some(Self::InvalidArguments),
1250 _ => None,
1251 }
1252 }
1253
1254 #[inline]
1255 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1256 match prim {
1257 1 => Self::Internal,
1258 2 => Self::InstanceNotFound,
1259 3 => Self::BadMoniker,
1260 4 => Self::PackageNotFound,
1261 5 => Self::ManifestNotFound,
1262 6 => Self::PolicyError,
1263 7 => Self::InvalidArguments,
1264 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1265 }
1266 }
1267
1268 #[inline]
1269 pub fn unknown() -> Self {
1270 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1271 }
1272
1273 #[inline]
1274 pub const fn into_primitive(self) -> u32 {
1275 match self {
1276 Self::Internal => 1,
1277 Self::InstanceNotFound => 2,
1278 Self::BadMoniker => 3,
1279 Self::PackageNotFound => 4,
1280 Self::ManifestNotFound => 5,
1281 Self::PolicyError => 6,
1282 Self::InvalidArguments => 7,
1283 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1284 }
1285 }
1286
1287 #[inline]
1288 pub fn is_unknown(&self) -> bool {
1289 match self {
1290 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1291 _ => false,
1292 }
1293 }
1294}
1295
1296#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1297#[repr(u32)]
1298pub enum StatusError {
1299 Provider = 1,
1302 ResponseInvalid = 2,
1304 StatusUnknown = 3,
1307 Unsupported = 4,
1309}
1310
1311impl StatusError {
1312 #[inline]
1313 pub fn from_primitive(prim: u32) -> Option<Self> {
1314 match prim {
1315 1 => Some(Self::Provider),
1316 2 => Some(Self::ResponseInvalid),
1317 3 => Some(Self::StatusUnknown),
1318 4 => Some(Self::Unsupported),
1319 _ => None,
1320 }
1321 }
1322
1323 #[inline]
1324 pub const fn into_primitive(self) -> u32 {
1325 self as u32
1326 }
1327}
1328
1329#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1330pub enum StopError {
1331 Internal,
1332 InstanceNotFound,
1333 BadMoniker,
1334 #[doc(hidden)]
1335 __SourceBreaking {
1336 unknown_ordinal: u32,
1337 },
1338}
1339
1340#[macro_export]
1342macro_rules! StopErrorUnknown {
1343 () => {
1344 _
1345 };
1346}
1347
1348impl StopError {
1349 #[inline]
1350 pub fn from_primitive(prim: u32) -> Option<Self> {
1351 match prim {
1352 1 => Some(Self::Internal),
1353 2 => Some(Self::InstanceNotFound),
1354 3 => Some(Self::BadMoniker),
1355 _ => None,
1356 }
1357 }
1358
1359 #[inline]
1360 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1361 match prim {
1362 1 => Self::Internal,
1363 2 => Self::InstanceNotFound,
1364 3 => Self::BadMoniker,
1365 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1366 }
1367 }
1368
1369 #[inline]
1370 pub fn unknown() -> Self {
1371 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1372 }
1373
1374 #[inline]
1375 pub const fn into_primitive(self) -> u32 {
1376 match self {
1377 Self::Internal => 1,
1378 Self::InstanceNotFound => 2,
1379 Self::BadMoniker => 3,
1380 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1381 }
1382 }
1383
1384 #[inline]
1385 pub fn is_unknown(&self) -> bool {
1386 match self {
1387 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1388 _ => false,
1389 }
1390 }
1391}
1392
1393#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
1394pub enum UnresolveError {
1395 Internal,
1396 InstanceNotFound,
1397 BadMoniker,
1398 #[doc(hidden)]
1399 __SourceBreaking {
1400 unknown_ordinal: u32,
1401 },
1402}
1403
1404#[macro_export]
1406macro_rules! UnresolveErrorUnknown {
1407 () => {
1408 _
1409 };
1410}
1411
1412impl UnresolveError {
1413 #[inline]
1414 pub fn from_primitive(prim: u32) -> Option<Self> {
1415 match prim {
1416 1 => Some(Self::Internal),
1417 2 => Some(Self::InstanceNotFound),
1418 3 => Some(Self::BadMoniker),
1419 _ => None,
1420 }
1421 }
1422
1423 #[inline]
1424 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
1425 match prim {
1426 1 => Self::Internal,
1427 2 => Self::InstanceNotFound,
1428 3 => Self::BadMoniker,
1429 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
1430 }
1431 }
1432
1433 #[inline]
1434 pub fn unknown() -> Self {
1435 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
1436 }
1437
1438 #[inline]
1439 pub const fn into_primitive(self) -> u32 {
1440 match self {
1441 Self::Internal => 1,
1442 Self::InstanceNotFound => 2,
1443 Self::BadMoniker => 3,
1444 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1445 }
1446 }
1447
1448 #[inline]
1449 pub fn is_unknown(&self) -> bool {
1450 match self {
1451 Self::__SourceBreaking { unknown_ordinal: _ } => true,
1452 _ => false,
1453 }
1454 }
1455}
1456
1457#[derive(Clone, Debug, PartialEq)]
1458pub struct ConfigOverrideSetStructuredConfigRequest {
1459 pub moniker: String,
1463 pub fields: Vec<fidl_fuchsia_component_decl__common::ConfigOverride>,
1464}
1465
1466impl fidl::Persistable for ConfigOverrideSetStructuredConfigRequest {}
1467
1468#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1469pub struct ConfigOverrideUnsetStructuredConfigRequest {
1470 pub moniker: String,
1474}
1475
1476impl fidl::Persistable for ConfigOverrideUnsetStructuredConfigRequest {}
1477
1478#[derive(Clone, Debug, PartialEq)]
1479pub struct CrashIntrospectFindComponentByThreadKoidResponse {
1480 pub info: ComponentCrashInfo,
1481}
1482
1483impl fidl::Persistable for CrashIntrospectFindComponentByThreadKoidResponse {}
1484
1485#[derive(Clone, Debug, PartialEq)]
1486pub struct InstanceIteratorNextResponse {
1487 pub infos: Vec<Instance>,
1488}
1489
1490impl fidl::Persistable for InstanceIteratorNextResponse {}
1491
1492#[derive(Clone, Debug, PartialEq)]
1493pub struct LifecycleControllerDestroyInstanceRequest {
1494 pub parent_moniker: String,
1495 pub child: fidl_fuchsia_component_decl__common::ChildRef,
1496}
1497
1498impl fidl::Persistable for LifecycleControllerDestroyInstanceRequest {}
1499
1500#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1501pub struct LifecycleControllerResolveInstanceRequest {
1502 pub moniker: String,
1503}
1504
1505impl fidl::Persistable for LifecycleControllerResolveInstanceRequest {}
1506
1507#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1508pub struct LifecycleControllerStopInstanceRequest {
1509 pub moniker: String,
1510}
1511
1512impl fidl::Persistable for LifecycleControllerStopInstanceRequest {}
1513
1514#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1515pub struct LifecycleControllerUnresolveInstanceRequest {
1516 pub moniker: String,
1517}
1518
1519impl fidl::Persistable for LifecycleControllerUnresolveInstanceRequest {}
1520
1521#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1522pub struct ManifestBytesIteratorNextResponse {
1523 pub infos: Vec<u8>,
1524}
1525
1526impl fidl::Persistable for ManifestBytesIteratorNextResponse {}
1527
1528#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1529pub struct RealmQueryConstructNamespaceRequest {
1530 pub moniker: String,
1531}
1532
1533impl fidl::Persistable for RealmQueryConstructNamespaceRequest {}
1534
1535#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1536pub struct RealmQueryGetInstanceRequest {
1537 pub moniker: String,
1538}
1539
1540impl fidl::Persistable for RealmQueryGetInstanceRequest {}
1541
1542#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1543pub struct RealmQueryGetResolvedDeclarationRequest {
1544 pub moniker: String,
1545}
1546
1547impl fidl::Persistable for RealmQueryGetResolvedDeclarationRequest {}
1548
1549#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1550pub struct RealmQueryGetStructuredConfigRequest {
1551 pub moniker: String,
1552}
1553
1554impl fidl::Persistable for RealmQueryGetStructuredConfigRequest {}
1555
1556#[derive(Clone, Debug, PartialEq)]
1557pub struct RealmQueryResolveDeclarationRequest {
1558 pub parent: String,
1559 pub child_location: ChildLocation,
1560 pub url: String,
1561}
1562
1563impl fidl::Persistable for RealmQueryResolveDeclarationRequest {}
1564
1565#[derive(Clone, Debug, PartialEq)]
1566pub struct RealmQueryGetInstanceResponse {
1567 pub instance: Instance,
1568}
1569
1570impl fidl::Persistable for RealmQueryGetInstanceResponse {}
1571
1572#[derive(Clone, Debug, PartialEq)]
1573pub struct RealmQueryGetStructuredConfigResponse {
1574 pub config: fidl_fuchsia_component_decl__common::ResolvedConfig,
1575}
1576
1577impl fidl::Persistable for RealmQueryGetStructuredConfigResponse {}
1578
1579#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1581pub struct RouteTarget {
1582 pub name: String,
1585 pub decl_type: DeclType,
1588}
1589
1590impl fidl::Persistable for RouteTarget {}
1591
1592#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1593pub struct RouteValidatorRouteRequest {
1594 pub moniker: String,
1596 pub targets: Vec<RouteTarget>,
1598}
1599
1600impl fidl::Persistable for RouteValidatorRouteRequest {}
1601
1602#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1603pub struct RouteValidatorValidateRequest {
1604 pub moniker: String,
1605}
1606
1607impl fidl::Persistable for RouteValidatorValidateRequest {}
1608
1609#[derive(Clone, Debug, PartialEq)]
1610pub struct RouteValidatorRouteResponse {
1611 pub reports: Vec<RouteReport>,
1612}
1613
1614impl fidl::Persistable for RouteValidatorRouteResponse {}
1615
1616#[derive(Clone, Debug, PartialEq)]
1617pub struct RouteValidatorValidateResponse {
1618 pub reports: Vec<RouteReport>,
1619}
1620
1621impl fidl::Persistable for RouteValidatorValidateResponse {}
1622
1623#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1624pub struct StorageAdminDeleteComponentStorageRequest {
1625 pub relative_moniker: String,
1626}
1627
1628impl fidl::Persistable for StorageAdminDeleteComponentStorageRequest {}
1629
1630#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1631pub struct StorageIteratorNextResponse {
1632 pub relative_monikers: Vec<String>,
1633}
1634
1635impl fidl::Persistable for StorageIteratorNextResponse {}
1636
1637#[derive(Clone, Debug, Default, PartialEq)]
1639pub struct ComponentCrashInfo {
1640 pub url: Option<String>,
1641 pub moniker: Option<String>,
1642 #[doc(hidden)]
1643 pub __source_breaking: fidl::marker::SourceBreaking,
1644}
1645
1646impl fidl::Persistable for ComponentCrashInfo {}
1647
1648#[derive(Clone, Debug, Default, PartialEq)]
1650pub struct DictionaryEntry {
1651 pub name: Option<String>,
1653 #[doc(hidden)]
1654 pub __source_breaking: fidl::marker::SourceBreaking,
1655}
1656
1657impl fidl::Persistable for DictionaryEntry {}
1658
1659#[derive(Clone, Debug, Default, PartialEq)]
1661pub struct ExecutionInfo {
1662 pub start_reason: Option<String>,
1664 #[doc(hidden)]
1665 pub __source_breaking: fidl::marker::SourceBreaking,
1666}
1667
1668impl fidl::Persistable for ExecutionInfo {}
1669
1670#[derive(Clone, Debug, Default, PartialEq)]
1676pub struct Instance {
1677 pub moniker: Option<String>,
1679 pub url: Option<String>,
1681 pub instance_id: Option<String>,
1683 pub resolved_info: Option<ResolvedInfo>,
1686 pub environment: Option<String>,
1688 #[doc(hidden)]
1689 pub __source_breaking: fidl::marker::SourceBreaking,
1690}
1691
1692impl fidl::Persistable for Instance {}
1693
1694#[derive(Clone, Debug, Default, PartialEq)]
1696pub struct ResolvedInfo {
1697 pub resolved_url: Option<String>,
1699 pub execution_info: Option<ExecutionInfo>,
1702 #[doc(hidden)]
1703 pub __source_breaking: fidl::marker::SourceBreaking,
1704}
1705
1706impl fidl::Persistable for ResolvedInfo {}
1707
1708#[derive(Clone, Debug, Default, PartialEq)]
1710pub struct RouteError {
1711 pub summary: Option<String>,
1713 #[doc(hidden)]
1714 pub __source_breaking: fidl::marker::SourceBreaking,
1715}
1716
1717impl fidl::Persistable for RouteError {}
1718
1719#[derive(Clone, Debug, Default, PartialEq)]
1721pub struct RouteReport {
1722 pub capability: Option<String>,
1724 pub decl_type: Option<DeclType>,
1726 pub error: Option<RouteError>,
1729 pub source_moniker: Option<String>,
1731 pub service_instances: Option<Vec<ServiceInstance>>,
1733 pub availability: Option<fidl_fuchsia_component_decl__common::Availability>,
1735 pub outcome: Option<RouteOutcome>,
1737 pub dictionary_entries: Option<Vec<DictionaryEntry>>,
1739 #[doc(hidden)]
1740 pub __source_breaking: fidl::marker::SourceBreaking,
1741}
1742
1743impl fidl::Persistable for RouteReport {}
1744
1745#[derive(Clone, Debug, Default, PartialEq)]
1747pub struct ServiceInstance {
1748 pub instance_name: Option<String>,
1750 pub child_name: Option<String>,
1753 pub child_instance_name: Option<String>,
1755 #[doc(hidden)]
1756 pub __source_breaking: fidl::marker::SourceBreaking,
1757}
1758
1759impl fidl::Persistable for ServiceInstance {}
1760
1761#[derive(Clone, Debug, Default, PartialEq)]
1763pub struct StorageStatus {
1764 pub total_size: Option<u64>,
1765 pub used_size: Option<u64>,
1766 #[doc(hidden)]
1767 pub __source_breaking: fidl::marker::SourceBreaking,
1768}
1769
1770impl fidl::Persistable for StorageStatus {}
1771
1772#[derive(Clone, Debug)]
1774pub enum ChildLocation {
1775 Collection(String),
1776 #[doc(hidden)]
1777 __SourceBreaking {
1778 unknown_ordinal: u64,
1779 },
1780}
1781
1782#[macro_export]
1784macro_rules! ChildLocationUnknown {
1785 () => {
1786 _
1787 };
1788}
1789
1790impl PartialEq for ChildLocation {
1792 fn eq(&self, other: &Self) -> bool {
1793 match (self, other) {
1794 (Self::Collection(x), Self::Collection(y)) => *x == *y,
1795 _ => false,
1796 }
1797 }
1798}
1799
1800impl ChildLocation {
1801 #[inline]
1802 pub fn ordinal(&self) -> u64 {
1803 match *self {
1804 Self::Collection(_) => 1,
1805 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1806 }
1807 }
1808
1809 #[inline]
1810 pub fn unknown_variant_for_testing() -> Self {
1811 Self::__SourceBreaking { unknown_ordinal: 0 }
1812 }
1813
1814 #[inline]
1815 pub fn is_unknown(&self) -> bool {
1816 match self {
1817 Self::__SourceBreaking { .. } => true,
1818 _ => false,
1819 }
1820 }
1821}
1822
1823impl fidl::Persistable for ChildLocation {}
1824
1825pub mod config_override_ordinals {
1826 pub const SET_STRUCTURED_CONFIG: u64 = 0x2c6a138832d2e0ee;
1827 pub const UNSET_STRUCTURED_CONFIG: u64 = 0x342ec7d2bef05552;
1828}
1829
1830pub mod crash_introspect_ordinals {
1831 pub const FIND_COMPONENT_BY_THREAD_KOID: u64 = 0x75d3ff081eca468d;
1832}
1833
1834pub mod instance_iterator_ordinals {
1835 pub const NEXT: u64 = 0x3a4e3d52432a52ee;
1836}
1837
1838pub mod lifecycle_controller_ordinals {
1839 pub const START_INSTANCE: u64 = 0x13fcb422876384bf;
1840 pub const START_INSTANCE_WITH_ARGS: u64 = 0xd3b467436223e9;
1841 pub const STOP_INSTANCE: u64 = 0x1362ba9d0e3caf36;
1842 pub const RESOLVE_INSTANCE: u64 = 0x426ab8dd53d8e737;
1843 pub const UNRESOLVE_INSTANCE: u64 = 0x18166a2aa798cb99;
1844 pub const CREATE_INSTANCE: u64 = 0x48d17ae777e4f9;
1845 pub const DESTROY_INSTANCE: u64 = 0x27640ae5889d7443;
1846}
1847
1848pub mod manifest_bytes_iterator_ordinals {
1849 pub const NEXT: u64 = 0x4be4659549b15500;
1850}
1851
1852pub mod realm_explorer_ordinals {}
1853
1854pub mod realm_query_ordinals {
1855 pub const GET_INSTANCE: u64 = 0x3496ca1e5a0c13a8;
1856 pub const GET_RESOLVED_DECLARATION: u64 = 0x31a493d284a0bc1f;
1857 pub const RESOLVE_DECLARATION: u64 = 0x1ab1adf2a87d962d;
1858 pub const GET_STRUCTURED_CONFIG: u64 = 0x16f88f6735bd204;
1859 pub const GET_ALL_INSTANCES: u64 = 0x7b5a8775d30cad47;
1860 pub const CONSTRUCT_NAMESPACE: u64 = 0x5ecb29c02c488eeb;
1861 pub const OPEN_DIRECTORY: u64 = 0x333d68f1deecec85;
1862 pub const CONNECT_TO_STORAGE_ADMIN: u64 = 0x7807e6b4f623ace;
1863}
1864
1865pub mod route_validator_ordinals {
1866 pub const VALIDATE: u64 = 0x3360b96d5f86cdf4;
1867 pub const ROUTE: u64 = 0x51c9b268216d8239;
1868}
1869
1870pub mod storage_admin_ordinals {
1871 pub const OPEN_STORAGE: u64 = 0x6ceaa5904cfe4377;
1872 pub const LIST_STORAGE_IN_REALM: u64 = 0x764f6d1f083e8bfb;
1873 pub const OPEN_COMPONENT_STORAGE_BY_ID: u64 = 0x4802102cc55d5df1;
1874 pub const DELETE_COMPONENT_STORAGE: u64 = 0x1677c1cdfcdbf45a;
1875 pub const GET_STATUS: u64 = 0x7729e325a6c526c8;
1876 pub const DELETE_ALL_STORAGE_CONTENTS: u64 = 0x2ee980b4b2d24adb;
1877}
1878
1879pub mod storage_iterator_ordinals {
1880 pub const NEXT: u64 = 0x7a6b21f15fd01b72;
1881}
1882
1883pub mod system_controller_ordinals {
1884 pub const SHUTDOWN: u64 = 0x25f56c938344e549;
1885}
1886
1887mod internal {
1888 use super::*;
1889 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideError {
1890 type Owned = Self;
1891
1892 #[inline(always)]
1893 fn inline_align(_context: fidl::encoding::Context) -> usize {
1894 std::mem::align_of::<u32>()
1895 }
1896
1897 #[inline(always)]
1898 fn inline_size(_context: fidl::encoding::Context) -> usize {
1899 std::mem::size_of::<u32>()
1900 }
1901
1902 #[inline(always)]
1903 fn encode_is_copy() -> bool {
1904 false
1905 }
1906
1907 #[inline(always)]
1908 fn decode_is_copy() -> bool {
1909 false
1910 }
1911 }
1912
1913 impl fidl::encoding::ValueTypeMarker for ConfigOverrideError {
1914 type Borrowed<'a> = Self;
1915 #[inline(always)]
1916 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1917 *value
1918 }
1919 }
1920
1921 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1922 for ConfigOverrideError
1923 {
1924 #[inline]
1925 unsafe fn encode(
1926 self,
1927 encoder: &mut fidl::encoding::Encoder<'_, D>,
1928 offset: usize,
1929 _depth: fidl::encoding::Depth,
1930 ) -> fidl::Result<()> {
1931 encoder.debug_check_bounds::<Self>(offset);
1932 encoder.write_num(self.into_primitive(), offset);
1933 Ok(())
1934 }
1935 }
1936
1937 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigOverrideError {
1938 #[inline(always)]
1939 fn new_empty() -> Self {
1940 Self::unknown()
1941 }
1942
1943 #[inline]
1944 unsafe fn decode(
1945 &mut self,
1946 decoder: &mut fidl::encoding::Decoder<'_, D>,
1947 offset: usize,
1948 _depth: fidl::encoding::Depth,
1949 ) -> fidl::Result<()> {
1950 decoder.debug_check_bounds::<Self>(offset);
1951 let prim = decoder.read_num::<u32>(offset);
1952
1953 *self = Self::from_primitive_allow_unknown(prim);
1954 Ok(())
1955 }
1956 }
1957 unsafe impl fidl::encoding::TypeMarker for ConnectToStorageAdminError {
1958 type Owned = Self;
1959
1960 #[inline(always)]
1961 fn inline_align(_context: fidl::encoding::Context) -> usize {
1962 std::mem::align_of::<u32>()
1963 }
1964
1965 #[inline(always)]
1966 fn inline_size(_context: fidl::encoding::Context) -> usize {
1967 std::mem::size_of::<u32>()
1968 }
1969
1970 #[inline(always)]
1971 fn encode_is_copy() -> bool {
1972 false
1973 }
1974
1975 #[inline(always)]
1976 fn decode_is_copy() -> bool {
1977 false
1978 }
1979 }
1980
1981 impl fidl::encoding::ValueTypeMarker for ConnectToStorageAdminError {
1982 type Borrowed<'a> = Self;
1983 #[inline(always)]
1984 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1985 *value
1986 }
1987 }
1988
1989 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1990 for ConnectToStorageAdminError
1991 {
1992 #[inline]
1993 unsafe fn encode(
1994 self,
1995 encoder: &mut fidl::encoding::Encoder<'_, D>,
1996 offset: usize,
1997 _depth: fidl::encoding::Depth,
1998 ) -> fidl::Result<()> {
1999 encoder.debug_check_bounds::<Self>(offset);
2000 encoder.write_num(self.into_primitive(), offset);
2001 Ok(())
2002 }
2003 }
2004
2005 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2006 for ConnectToStorageAdminError
2007 {
2008 #[inline(always)]
2009 fn new_empty() -> Self {
2010 Self::unknown()
2011 }
2012
2013 #[inline]
2014 unsafe fn decode(
2015 &mut self,
2016 decoder: &mut fidl::encoding::Decoder<'_, D>,
2017 offset: usize,
2018 _depth: fidl::encoding::Depth,
2019 ) -> fidl::Result<()> {
2020 decoder.debug_check_bounds::<Self>(offset);
2021 let prim = decoder.read_num::<u32>(offset);
2022
2023 *self = Self::from_primitive_allow_unknown(prim);
2024 Ok(())
2025 }
2026 }
2027 unsafe impl fidl::encoding::TypeMarker for ConstructNamespaceError {
2028 type Owned = Self;
2029
2030 #[inline(always)]
2031 fn inline_align(_context: fidl::encoding::Context) -> usize {
2032 std::mem::align_of::<u32>()
2033 }
2034
2035 #[inline(always)]
2036 fn inline_size(_context: fidl::encoding::Context) -> usize {
2037 std::mem::size_of::<u32>()
2038 }
2039
2040 #[inline(always)]
2041 fn encode_is_copy() -> bool {
2042 false
2043 }
2044
2045 #[inline(always)]
2046 fn decode_is_copy() -> bool {
2047 false
2048 }
2049 }
2050
2051 impl fidl::encoding::ValueTypeMarker for ConstructNamespaceError {
2052 type Borrowed<'a> = Self;
2053 #[inline(always)]
2054 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2055 *value
2056 }
2057 }
2058
2059 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2060 for ConstructNamespaceError
2061 {
2062 #[inline]
2063 unsafe fn encode(
2064 self,
2065 encoder: &mut fidl::encoding::Encoder<'_, D>,
2066 offset: usize,
2067 _depth: fidl::encoding::Depth,
2068 ) -> fidl::Result<()> {
2069 encoder.debug_check_bounds::<Self>(offset);
2070 encoder.write_num(self.into_primitive(), offset);
2071 Ok(())
2072 }
2073 }
2074
2075 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2076 for ConstructNamespaceError
2077 {
2078 #[inline(always)]
2079 fn new_empty() -> Self {
2080 Self::unknown()
2081 }
2082
2083 #[inline]
2084 unsafe fn decode(
2085 &mut self,
2086 decoder: &mut fidl::encoding::Decoder<'_, D>,
2087 offset: usize,
2088 _depth: fidl::encoding::Depth,
2089 ) -> fidl::Result<()> {
2090 decoder.debug_check_bounds::<Self>(offset);
2091 let prim = decoder.read_num::<u32>(offset);
2092
2093 *self = Self::from_primitive_allow_unknown(prim);
2094 Ok(())
2095 }
2096 }
2097 unsafe impl fidl::encoding::TypeMarker for CreateError {
2098 type Owned = Self;
2099
2100 #[inline(always)]
2101 fn inline_align(_context: fidl::encoding::Context) -> usize {
2102 std::mem::align_of::<u32>()
2103 }
2104
2105 #[inline(always)]
2106 fn inline_size(_context: fidl::encoding::Context) -> usize {
2107 std::mem::size_of::<u32>()
2108 }
2109
2110 #[inline(always)]
2111 fn encode_is_copy() -> bool {
2112 false
2113 }
2114
2115 #[inline(always)]
2116 fn decode_is_copy() -> bool {
2117 false
2118 }
2119 }
2120
2121 impl fidl::encoding::ValueTypeMarker for CreateError {
2122 type Borrowed<'a> = Self;
2123 #[inline(always)]
2124 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2125 *value
2126 }
2127 }
2128
2129 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
2130 #[inline]
2131 unsafe fn encode(
2132 self,
2133 encoder: &mut fidl::encoding::Encoder<'_, D>,
2134 offset: usize,
2135 _depth: fidl::encoding::Depth,
2136 ) -> fidl::Result<()> {
2137 encoder.debug_check_bounds::<Self>(offset);
2138 encoder.write_num(self.into_primitive(), offset);
2139 Ok(())
2140 }
2141 }
2142
2143 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
2144 #[inline(always)]
2145 fn new_empty() -> Self {
2146 Self::unknown()
2147 }
2148
2149 #[inline]
2150 unsafe fn decode(
2151 &mut self,
2152 decoder: &mut fidl::encoding::Decoder<'_, D>,
2153 offset: usize,
2154 _depth: fidl::encoding::Depth,
2155 ) -> fidl::Result<()> {
2156 decoder.debug_check_bounds::<Self>(offset);
2157 let prim = decoder.read_num::<u32>(offset);
2158
2159 *self = Self::from_primitive_allow_unknown(prim);
2160 Ok(())
2161 }
2162 }
2163 unsafe impl fidl::encoding::TypeMarker for DeclType {
2164 type Owned = Self;
2165
2166 #[inline(always)]
2167 fn inline_align(_context: fidl::encoding::Context) -> usize {
2168 std::mem::align_of::<u32>()
2169 }
2170
2171 #[inline(always)]
2172 fn inline_size(_context: fidl::encoding::Context) -> usize {
2173 std::mem::size_of::<u32>()
2174 }
2175
2176 #[inline(always)]
2177 fn encode_is_copy() -> bool {
2178 false
2179 }
2180
2181 #[inline(always)]
2182 fn decode_is_copy() -> bool {
2183 false
2184 }
2185 }
2186
2187 impl fidl::encoding::ValueTypeMarker for DeclType {
2188 type Borrowed<'a> = Self;
2189 #[inline(always)]
2190 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2191 *value
2192 }
2193 }
2194
2195 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeclType {
2196 #[inline]
2197 unsafe fn encode(
2198 self,
2199 encoder: &mut fidl::encoding::Encoder<'_, D>,
2200 offset: usize,
2201 _depth: fidl::encoding::Depth,
2202 ) -> fidl::Result<()> {
2203 encoder.debug_check_bounds::<Self>(offset);
2204 encoder.write_num(self.into_primitive(), offset);
2205 Ok(())
2206 }
2207 }
2208
2209 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeclType {
2210 #[inline(always)]
2211 fn new_empty() -> Self {
2212 Self::unknown()
2213 }
2214
2215 #[inline]
2216 unsafe fn decode(
2217 &mut self,
2218 decoder: &mut fidl::encoding::Decoder<'_, D>,
2219 offset: usize,
2220 _depth: fidl::encoding::Depth,
2221 ) -> fidl::Result<()> {
2222 decoder.debug_check_bounds::<Self>(offset);
2223 let prim = decoder.read_num::<u32>(offset);
2224
2225 *self = Self::from_primitive_allow_unknown(prim);
2226 Ok(())
2227 }
2228 }
2229 unsafe impl fidl::encoding::TypeMarker for DeletionError {
2230 type Owned = Self;
2231
2232 #[inline(always)]
2233 fn inline_align(_context: fidl::encoding::Context) -> usize {
2234 std::mem::align_of::<u32>()
2235 }
2236
2237 #[inline(always)]
2238 fn inline_size(_context: fidl::encoding::Context) -> usize {
2239 std::mem::size_of::<u32>()
2240 }
2241
2242 #[inline(always)]
2243 fn encode_is_copy() -> bool {
2244 true
2245 }
2246
2247 #[inline(always)]
2248 fn decode_is_copy() -> bool {
2249 false
2250 }
2251 }
2252
2253 impl fidl::encoding::ValueTypeMarker for DeletionError {
2254 type Borrowed<'a> = Self;
2255 #[inline(always)]
2256 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2257 *value
2258 }
2259 }
2260
2261 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeletionError {
2262 #[inline]
2263 unsafe fn encode(
2264 self,
2265 encoder: &mut fidl::encoding::Encoder<'_, D>,
2266 offset: usize,
2267 _depth: fidl::encoding::Depth,
2268 ) -> fidl::Result<()> {
2269 encoder.debug_check_bounds::<Self>(offset);
2270 encoder.write_num(self.into_primitive(), offset);
2271 Ok(())
2272 }
2273 }
2274
2275 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeletionError {
2276 #[inline(always)]
2277 fn new_empty() -> Self {
2278 Self::Connection
2279 }
2280
2281 #[inline]
2282 unsafe fn decode(
2283 &mut self,
2284 decoder: &mut fidl::encoding::Decoder<'_, D>,
2285 offset: usize,
2286 _depth: fidl::encoding::Depth,
2287 ) -> fidl::Result<()> {
2288 decoder.debug_check_bounds::<Self>(offset);
2289 let prim = decoder.read_num::<u32>(offset);
2290
2291 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2292 Ok(())
2293 }
2294 }
2295 unsafe impl fidl::encoding::TypeMarker for DestroyError {
2296 type Owned = Self;
2297
2298 #[inline(always)]
2299 fn inline_align(_context: fidl::encoding::Context) -> usize {
2300 std::mem::align_of::<u32>()
2301 }
2302
2303 #[inline(always)]
2304 fn inline_size(_context: fidl::encoding::Context) -> usize {
2305 std::mem::size_of::<u32>()
2306 }
2307
2308 #[inline(always)]
2309 fn encode_is_copy() -> bool {
2310 false
2311 }
2312
2313 #[inline(always)]
2314 fn decode_is_copy() -> bool {
2315 false
2316 }
2317 }
2318
2319 impl fidl::encoding::ValueTypeMarker for DestroyError {
2320 type Borrowed<'a> = Self;
2321 #[inline(always)]
2322 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2323 *value
2324 }
2325 }
2326
2327 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DestroyError {
2328 #[inline]
2329 unsafe fn encode(
2330 self,
2331 encoder: &mut fidl::encoding::Encoder<'_, D>,
2332 offset: usize,
2333 _depth: fidl::encoding::Depth,
2334 ) -> fidl::Result<()> {
2335 encoder.debug_check_bounds::<Self>(offset);
2336 encoder.write_num(self.into_primitive(), offset);
2337 Ok(())
2338 }
2339 }
2340
2341 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyError {
2342 #[inline(always)]
2343 fn new_empty() -> Self {
2344 Self::unknown()
2345 }
2346
2347 #[inline]
2348 unsafe fn decode(
2349 &mut self,
2350 decoder: &mut fidl::encoding::Decoder<'_, D>,
2351 offset: usize,
2352 _depth: fidl::encoding::Depth,
2353 ) -> fidl::Result<()> {
2354 decoder.debug_check_bounds::<Self>(offset);
2355 let prim = decoder.read_num::<u32>(offset);
2356
2357 *self = Self::from_primitive_allow_unknown(prim);
2358 Ok(())
2359 }
2360 }
2361 unsafe impl fidl::encoding::TypeMarker for GetAllInstancesError {
2362 type Owned = Self;
2363
2364 #[inline(always)]
2365 fn inline_align(_context: fidl::encoding::Context) -> usize {
2366 std::mem::align_of::<u32>()
2367 }
2368
2369 #[inline(always)]
2370 fn inline_size(_context: fidl::encoding::Context) -> usize {
2371 std::mem::size_of::<u32>()
2372 }
2373
2374 #[inline(always)]
2375 fn encode_is_copy() -> bool {
2376 false
2377 }
2378
2379 #[inline(always)]
2380 fn decode_is_copy() -> bool {
2381 false
2382 }
2383 }
2384
2385 impl fidl::encoding::ValueTypeMarker for GetAllInstancesError {
2386 type Borrowed<'a> = Self;
2387 #[inline(always)]
2388 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2389 *value
2390 }
2391 }
2392
2393 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2394 for GetAllInstancesError
2395 {
2396 #[inline]
2397 unsafe fn encode(
2398 self,
2399 encoder: &mut fidl::encoding::Encoder<'_, D>,
2400 offset: usize,
2401 _depth: fidl::encoding::Depth,
2402 ) -> fidl::Result<()> {
2403 encoder.debug_check_bounds::<Self>(offset);
2404 encoder.write_num(self.into_primitive(), offset);
2405 Ok(())
2406 }
2407 }
2408
2409 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetAllInstancesError {
2410 #[inline(always)]
2411 fn new_empty() -> Self {
2412 Self::unknown()
2413 }
2414
2415 #[inline]
2416 unsafe fn decode(
2417 &mut self,
2418 decoder: &mut fidl::encoding::Decoder<'_, D>,
2419 offset: usize,
2420 _depth: fidl::encoding::Depth,
2421 ) -> fidl::Result<()> {
2422 decoder.debug_check_bounds::<Self>(offset);
2423 let prim = decoder.read_num::<u32>(offset);
2424
2425 *self = Self::from_primitive_allow_unknown(prim);
2426 Ok(())
2427 }
2428 }
2429 unsafe impl fidl::encoding::TypeMarker for GetDeclarationError {
2430 type Owned = Self;
2431
2432 #[inline(always)]
2433 fn inline_align(_context: fidl::encoding::Context) -> usize {
2434 std::mem::align_of::<u32>()
2435 }
2436
2437 #[inline(always)]
2438 fn inline_size(_context: fidl::encoding::Context) -> usize {
2439 std::mem::size_of::<u32>()
2440 }
2441
2442 #[inline(always)]
2443 fn encode_is_copy() -> bool {
2444 false
2445 }
2446
2447 #[inline(always)]
2448 fn decode_is_copy() -> bool {
2449 false
2450 }
2451 }
2452
2453 impl fidl::encoding::ValueTypeMarker for GetDeclarationError {
2454 type Borrowed<'a> = Self;
2455 #[inline(always)]
2456 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2457 *value
2458 }
2459 }
2460
2461 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2462 for GetDeclarationError
2463 {
2464 #[inline]
2465 unsafe fn encode(
2466 self,
2467 encoder: &mut fidl::encoding::Encoder<'_, D>,
2468 offset: usize,
2469 _depth: fidl::encoding::Depth,
2470 ) -> fidl::Result<()> {
2471 encoder.debug_check_bounds::<Self>(offset);
2472 encoder.write_num(self.into_primitive(), offset);
2473 Ok(())
2474 }
2475 }
2476
2477 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetDeclarationError {
2478 #[inline(always)]
2479 fn new_empty() -> Self {
2480 Self::unknown()
2481 }
2482
2483 #[inline]
2484 unsafe fn decode(
2485 &mut self,
2486 decoder: &mut fidl::encoding::Decoder<'_, D>,
2487 offset: usize,
2488 _depth: fidl::encoding::Depth,
2489 ) -> fidl::Result<()> {
2490 decoder.debug_check_bounds::<Self>(offset);
2491 let prim = decoder.read_num::<u32>(offset);
2492
2493 *self = Self::from_primitive_allow_unknown(prim);
2494 Ok(())
2495 }
2496 }
2497 unsafe impl fidl::encoding::TypeMarker for GetInstanceError {
2498 type Owned = Self;
2499
2500 #[inline(always)]
2501 fn inline_align(_context: fidl::encoding::Context) -> usize {
2502 std::mem::align_of::<u32>()
2503 }
2504
2505 #[inline(always)]
2506 fn inline_size(_context: fidl::encoding::Context) -> usize {
2507 std::mem::size_of::<u32>()
2508 }
2509
2510 #[inline(always)]
2511 fn encode_is_copy() -> bool {
2512 false
2513 }
2514
2515 #[inline(always)]
2516 fn decode_is_copy() -> bool {
2517 false
2518 }
2519 }
2520
2521 impl fidl::encoding::ValueTypeMarker for GetInstanceError {
2522 type Borrowed<'a> = Self;
2523 #[inline(always)]
2524 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2525 *value
2526 }
2527 }
2528
2529 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2530 for GetInstanceError
2531 {
2532 #[inline]
2533 unsafe fn encode(
2534 self,
2535 encoder: &mut fidl::encoding::Encoder<'_, D>,
2536 offset: usize,
2537 _depth: fidl::encoding::Depth,
2538 ) -> fidl::Result<()> {
2539 encoder.debug_check_bounds::<Self>(offset);
2540 encoder.write_num(self.into_primitive(), offset);
2541 Ok(())
2542 }
2543 }
2544
2545 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetInstanceError {
2546 #[inline(always)]
2547 fn new_empty() -> Self {
2548 Self::unknown()
2549 }
2550
2551 #[inline]
2552 unsafe fn decode(
2553 &mut self,
2554 decoder: &mut fidl::encoding::Decoder<'_, D>,
2555 offset: usize,
2556 _depth: fidl::encoding::Depth,
2557 ) -> fidl::Result<()> {
2558 decoder.debug_check_bounds::<Self>(offset);
2559 let prim = decoder.read_num::<u32>(offset);
2560
2561 *self = Self::from_primitive_allow_unknown(prim);
2562 Ok(())
2563 }
2564 }
2565 unsafe impl fidl::encoding::TypeMarker for GetStructuredConfigError {
2566 type Owned = Self;
2567
2568 #[inline(always)]
2569 fn inline_align(_context: fidl::encoding::Context) -> usize {
2570 std::mem::align_of::<u32>()
2571 }
2572
2573 #[inline(always)]
2574 fn inline_size(_context: fidl::encoding::Context) -> usize {
2575 std::mem::size_of::<u32>()
2576 }
2577
2578 #[inline(always)]
2579 fn encode_is_copy() -> bool {
2580 false
2581 }
2582
2583 #[inline(always)]
2584 fn decode_is_copy() -> bool {
2585 false
2586 }
2587 }
2588
2589 impl fidl::encoding::ValueTypeMarker for GetStructuredConfigError {
2590 type Borrowed<'a> = Self;
2591 #[inline(always)]
2592 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2593 *value
2594 }
2595 }
2596
2597 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2598 for GetStructuredConfigError
2599 {
2600 #[inline]
2601 unsafe fn encode(
2602 self,
2603 encoder: &mut fidl::encoding::Encoder<'_, D>,
2604 offset: usize,
2605 _depth: fidl::encoding::Depth,
2606 ) -> fidl::Result<()> {
2607 encoder.debug_check_bounds::<Self>(offset);
2608 encoder.write_num(self.into_primitive(), offset);
2609 Ok(())
2610 }
2611 }
2612
2613 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2614 for GetStructuredConfigError
2615 {
2616 #[inline(always)]
2617 fn new_empty() -> Self {
2618 Self::unknown()
2619 }
2620
2621 #[inline]
2622 unsafe fn decode(
2623 &mut self,
2624 decoder: &mut fidl::encoding::Decoder<'_, D>,
2625 offset: usize,
2626 _depth: fidl::encoding::Depth,
2627 ) -> fidl::Result<()> {
2628 decoder.debug_check_bounds::<Self>(offset);
2629 let prim = decoder.read_num::<u32>(offset);
2630
2631 *self = Self::from_primitive_allow_unknown(prim);
2632 Ok(())
2633 }
2634 }
2635 unsafe impl fidl::encoding::TypeMarker for OpenDirType {
2636 type Owned = Self;
2637
2638 #[inline(always)]
2639 fn inline_align(_context: fidl::encoding::Context) -> usize {
2640 std::mem::align_of::<u32>()
2641 }
2642
2643 #[inline(always)]
2644 fn inline_size(_context: fidl::encoding::Context) -> usize {
2645 std::mem::size_of::<u32>()
2646 }
2647
2648 #[inline(always)]
2649 fn encode_is_copy() -> bool {
2650 false
2651 }
2652
2653 #[inline(always)]
2654 fn decode_is_copy() -> bool {
2655 false
2656 }
2657 }
2658
2659 impl fidl::encoding::ValueTypeMarker for OpenDirType {
2660 type Borrowed<'a> = Self;
2661 #[inline(always)]
2662 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2663 *value
2664 }
2665 }
2666
2667 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenDirType {
2668 #[inline]
2669 unsafe fn encode(
2670 self,
2671 encoder: &mut fidl::encoding::Encoder<'_, D>,
2672 offset: usize,
2673 _depth: fidl::encoding::Depth,
2674 ) -> fidl::Result<()> {
2675 encoder.debug_check_bounds::<Self>(offset);
2676 encoder.write_num(self.into_primitive(), offset);
2677 Ok(())
2678 }
2679 }
2680
2681 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenDirType {
2682 #[inline(always)]
2683 fn new_empty() -> Self {
2684 Self::unknown()
2685 }
2686
2687 #[inline]
2688 unsafe fn decode(
2689 &mut self,
2690 decoder: &mut fidl::encoding::Decoder<'_, D>,
2691 offset: usize,
2692 _depth: fidl::encoding::Depth,
2693 ) -> fidl::Result<()> {
2694 decoder.debug_check_bounds::<Self>(offset);
2695 let prim = decoder.read_num::<u32>(offset);
2696
2697 *self = Self::from_primitive_allow_unknown(prim);
2698 Ok(())
2699 }
2700 }
2701 unsafe impl fidl::encoding::TypeMarker for OpenError {
2702 type Owned = Self;
2703
2704 #[inline(always)]
2705 fn inline_align(_context: fidl::encoding::Context) -> usize {
2706 std::mem::align_of::<u32>()
2707 }
2708
2709 #[inline(always)]
2710 fn inline_size(_context: fidl::encoding::Context) -> usize {
2711 std::mem::size_of::<u32>()
2712 }
2713
2714 #[inline(always)]
2715 fn encode_is_copy() -> bool {
2716 false
2717 }
2718
2719 #[inline(always)]
2720 fn decode_is_copy() -> bool {
2721 false
2722 }
2723 }
2724
2725 impl fidl::encoding::ValueTypeMarker for OpenError {
2726 type Borrowed<'a> = Self;
2727 #[inline(always)]
2728 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2729 *value
2730 }
2731 }
2732
2733 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenError {
2734 #[inline]
2735 unsafe fn encode(
2736 self,
2737 encoder: &mut fidl::encoding::Encoder<'_, D>,
2738 offset: usize,
2739 _depth: fidl::encoding::Depth,
2740 ) -> fidl::Result<()> {
2741 encoder.debug_check_bounds::<Self>(offset);
2742 encoder.write_num(self.into_primitive(), offset);
2743 Ok(())
2744 }
2745 }
2746
2747 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenError {
2748 #[inline(always)]
2749 fn new_empty() -> Self {
2750 Self::unknown()
2751 }
2752
2753 #[inline]
2754 unsafe fn decode(
2755 &mut self,
2756 decoder: &mut fidl::encoding::Decoder<'_, D>,
2757 offset: usize,
2758 _depth: fidl::encoding::Depth,
2759 ) -> fidl::Result<()> {
2760 decoder.debug_check_bounds::<Self>(offset);
2761 let prim = decoder.read_num::<u32>(offset);
2762
2763 *self = Self::from_primitive_allow_unknown(prim);
2764 Ok(())
2765 }
2766 }
2767 unsafe impl fidl::encoding::TypeMarker for RealmQueryError {
2768 type Owned = Self;
2769
2770 #[inline(always)]
2771 fn inline_align(_context: fidl::encoding::Context) -> usize {
2772 std::mem::align_of::<u32>()
2773 }
2774
2775 #[inline(always)]
2776 fn inline_size(_context: fidl::encoding::Context) -> usize {
2777 std::mem::size_of::<u32>()
2778 }
2779
2780 #[inline(always)]
2781 fn encode_is_copy() -> bool {
2782 false
2783 }
2784
2785 #[inline(always)]
2786 fn decode_is_copy() -> bool {
2787 false
2788 }
2789 }
2790
2791 impl fidl::encoding::ValueTypeMarker for RealmQueryError {
2792 type Borrowed<'a> = Self;
2793 #[inline(always)]
2794 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2795 *value
2796 }
2797 }
2798
2799 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2800 for RealmQueryError
2801 {
2802 #[inline]
2803 unsafe fn encode(
2804 self,
2805 encoder: &mut fidl::encoding::Encoder<'_, D>,
2806 offset: usize,
2807 _depth: fidl::encoding::Depth,
2808 ) -> fidl::Result<()> {
2809 encoder.debug_check_bounds::<Self>(offset);
2810 encoder.write_num(self.into_primitive(), offset);
2811 Ok(())
2812 }
2813 }
2814
2815 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RealmQueryError {
2816 #[inline(always)]
2817 fn new_empty() -> Self {
2818 Self::unknown()
2819 }
2820
2821 #[inline]
2822 unsafe fn decode(
2823 &mut self,
2824 decoder: &mut fidl::encoding::Decoder<'_, D>,
2825 offset: usize,
2826 _depth: fidl::encoding::Depth,
2827 ) -> fidl::Result<()> {
2828 decoder.debug_check_bounds::<Self>(offset);
2829 let prim = decoder.read_num::<u32>(offset);
2830
2831 *self = Self::from_primitive_allow_unknown(prim);
2832 Ok(())
2833 }
2834 }
2835 unsafe impl fidl::encoding::TypeMarker for ResolveError {
2836 type Owned = Self;
2837
2838 #[inline(always)]
2839 fn inline_align(_context: fidl::encoding::Context) -> usize {
2840 std::mem::align_of::<u32>()
2841 }
2842
2843 #[inline(always)]
2844 fn inline_size(_context: fidl::encoding::Context) -> usize {
2845 std::mem::size_of::<u32>()
2846 }
2847
2848 #[inline(always)]
2849 fn encode_is_copy() -> bool {
2850 false
2851 }
2852
2853 #[inline(always)]
2854 fn decode_is_copy() -> bool {
2855 false
2856 }
2857 }
2858
2859 impl fidl::encoding::ValueTypeMarker for ResolveError {
2860 type Borrowed<'a> = Self;
2861 #[inline(always)]
2862 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2863 *value
2864 }
2865 }
2866
2867 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ResolveError {
2868 #[inline]
2869 unsafe fn encode(
2870 self,
2871 encoder: &mut fidl::encoding::Encoder<'_, D>,
2872 offset: usize,
2873 _depth: fidl::encoding::Depth,
2874 ) -> fidl::Result<()> {
2875 encoder.debug_check_bounds::<Self>(offset);
2876 encoder.write_num(self.into_primitive(), offset);
2877 Ok(())
2878 }
2879 }
2880
2881 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolveError {
2882 #[inline(always)]
2883 fn new_empty() -> Self {
2884 Self::unknown()
2885 }
2886
2887 #[inline]
2888 unsafe fn decode(
2889 &mut self,
2890 decoder: &mut fidl::encoding::Decoder<'_, D>,
2891 offset: usize,
2892 _depth: fidl::encoding::Depth,
2893 ) -> fidl::Result<()> {
2894 decoder.debug_check_bounds::<Self>(offset);
2895 let prim = decoder.read_num::<u32>(offset);
2896
2897 *self = Self::from_primitive_allow_unknown(prim);
2898 Ok(())
2899 }
2900 }
2901 unsafe impl fidl::encoding::TypeMarker for RouteOutcome {
2902 type Owned = Self;
2903
2904 #[inline(always)]
2905 fn inline_align(_context: fidl::encoding::Context) -> usize {
2906 std::mem::align_of::<u32>()
2907 }
2908
2909 #[inline(always)]
2910 fn inline_size(_context: fidl::encoding::Context) -> usize {
2911 std::mem::size_of::<u32>()
2912 }
2913
2914 #[inline(always)]
2915 fn encode_is_copy() -> bool {
2916 false
2917 }
2918
2919 #[inline(always)]
2920 fn decode_is_copy() -> bool {
2921 false
2922 }
2923 }
2924
2925 impl fidl::encoding::ValueTypeMarker for RouteOutcome {
2926 type Borrowed<'a> = Self;
2927 #[inline(always)]
2928 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2929 *value
2930 }
2931 }
2932
2933 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RouteOutcome {
2934 #[inline]
2935 unsafe fn encode(
2936 self,
2937 encoder: &mut fidl::encoding::Encoder<'_, D>,
2938 offset: usize,
2939 _depth: fidl::encoding::Depth,
2940 ) -> fidl::Result<()> {
2941 encoder.debug_check_bounds::<Self>(offset);
2942 encoder.write_num(self.into_primitive(), offset);
2943 Ok(())
2944 }
2945 }
2946
2947 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteOutcome {
2948 #[inline(always)]
2949 fn new_empty() -> Self {
2950 Self::unknown()
2951 }
2952
2953 #[inline]
2954 unsafe fn decode(
2955 &mut self,
2956 decoder: &mut fidl::encoding::Decoder<'_, D>,
2957 offset: usize,
2958 _depth: fidl::encoding::Depth,
2959 ) -> fidl::Result<()> {
2960 decoder.debug_check_bounds::<Self>(offset);
2961 let prim = decoder.read_num::<u32>(offset);
2962
2963 *self = Self::from_primitive_allow_unknown(prim);
2964 Ok(())
2965 }
2966 }
2967 unsafe impl fidl::encoding::TypeMarker for RouteValidatorError {
2968 type Owned = Self;
2969
2970 #[inline(always)]
2971 fn inline_align(_context: fidl::encoding::Context) -> usize {
2972 std::mem::align_of::<u32>()
2973 }
2974
2975 #[inline(always)]
2976 fn inline_size(_context: fidl::encoding::Context) -> usize {
2977 std::mem::size_of::<u32>()
2978 }
2979
2980 #[inline(always)]
2981 fn encode_is_copy() -> bool {
2982 false
2983 }
2984
2985 #[inline(always)]
2986 fn decode_is_copy() -> bool {
2987 false
2988 }
2989 }
2990
2991 impl fidl::encoding::ValueTypeMarker for RouteValidatorError {
2992 type Borrowed<'a> = Self;
2993 #[inline(always)]
2994 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2995 *value
2996 }
2997 }
2998
2999 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3000 for RouteValidatorError
3001 {
3002 #[inline]
3003 unsafe fn encode(
3004 self,
3005 encoder: &mut fidl::encoding::Encoder<'_, D>,
3006 offset: usize,
3007 _depth: fidl::encoding::Depth,
3008 ) -> fidl::Result<()> {
3009 encoder.debug_check_bounds::<Self>(offset);
3010 encoder.write_num(self.into_primitive(), offset);
3011 Ok(())
3012 }
3013 }
3014
3015 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteValidatorError {
3016 #[inline(always)]
3017 fn new_empty() -> Self {
3018 Self::unknown()
3019 }
3020
3021 #[inline]
3022 unsafe fn decode(
3023 &mut self,
3024 decoder: &mut fidl::encoding::Decoder<'_, D>,
3025 offset: usize,
3026 _depth: fidl::encoding::Depth,
3027 ) -> fidl::Result<()> {
3028 decoder.debug_check_bounds::<Self>(offset);
3029 let prim = decoder.read_num::<u32>(offset);
3030
3031 *self = Self::from_primitive_allow_unknown(prim);
3032 Ok(())
3033 }
3034 }
3035 unsafe impl fidl::encoding::TypeMarker for StartError {
3036 type Owned = Self;
3037
3038 #[inline(always)]
3039 fn inline_align(_context: fidl::encoding::Context) -> usize {
3040 std::mem::align_of::<u32>()
3041 }
3042
3043 #[inline(always)]
3044 fn inline_size(_context: fidl::encoding::Context) -> usize {
3045 std::mem::size_of::<u32>()
3046 }
3047
3048 #[inline(always)]
3049 fn encode_is_copy() -> bool {
3050 false
3051 }
3052
3053 #[inline(always)]
3054 fn decode_is_copy() -> bool {
3055 false
3056 }
3057 }
3058
3059 impl fidl::encoding::ValueTypeMarker for StartError {
3060 type Borrowed<'a> = Self;
3061 #[inline(always)]
3062 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3063 *value
3064 }
3065 }
3066
3067 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
3068 #[inline]
3069 unsafe fn encode(
3070 self,
3071 encoder: &mut fidl::encoding::Encoder<'_, D>,
3072 offset: usize,
3073 _depth: fidl::encoding::Depth,
3074 ) -> fidl::Result<()> {
3075 encoder.debug_check_bounds::<Self>(offset);
3076 encoder.write_num(self.into_primitive(), offset);
3077 Ok(())
3078 }
3079 }
3080
3081 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
3082 #[inline(always)]
3083 fn new_empty() -> Self {
3084 Self::unknown()
3085 }
3086
3087 #[inline]
3088 unsafe fn decode(
3089 &mut self,
3090 decoder: &mut fidl::encoding::Decoder<'_, D>,
3091 offset: usize,
3092 _depth: fidl::encoding::Depth,
3093 ) -> fidl::Result<()> {
3094 decoder.debug_check_bounds::<Self>(offset);
3095 let prim = decoder.read_num::<u32>(offset);
3096
3097 *self = Self::from_primitive_allow_unknown(prim);
3098 Ok(())
3099 }
3100 }
3101 unsafe impl fidl::encoding::TypeMarker for StatusError {
3102 type Owned = Self;
3103
3104 #[inline(always)]
3105 fn inline_align(_context: fidl::encoding::Context) -> usize {
3106 std::mem::align_of::<u32>()
3107 }
3108
3109 #[inline(always)]
3110 fn inline_size(_context: fidl::encoding::Context) -> usize {
3111 std::mem::size_of::<u32>()
3112 }
3113
3114 #[inline(always)]
3115 fn encode_is_copy() -> bool {
3116 true
3117 }
3118
3119 #[inline(always)]
3120 fn decode_is_copy() -> bool {
3121 false
3122 }
3123 }
3124
3125 impl fidl::encoding::ValueTypeMarker for StatusError {
3126 type Borrowed<'a> = Self;
3127 #[inline(always)]
3128 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3129 *value
3130 }
3131 }
3132
3133 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StatusError {
3134 #[inline]
3135 unsafe fn encode(
3136 self,
3137 encoder: &mut fidl::encoding::Encoder<'_, D>,
3138 offset: usize,
3139 _depth: fidl::encoding::Depth,
3140 ) -> fidl::Result<()> {
3141 encoder.debug_check_bounds::<Self>(offset);
3142 encoder.write_num(self.into_primitive(), offset);
3143 Ok(())
3144 }
3145 }
3146
3147 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StatusError {
3148 #[inline(always)]
3149 fn new_empty() -> Self {
3150 Self::Provider
3151 }
3152
3153 #[inline]
3154 unsafe fn decode(
3155 &mut self,
3156 decoder: &mut fidl::encoding::Decoder<'_, D>,
3157 offset: usize,
3158 _depth: fidl::encoding::Depth,
3159 ) -> fidl::Result<()> {
3160 decoder.debug_check_bounds::<Self>(offset);
3161 let prim = decoder.read_num::<u32>(offset);
3162
3163 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3164 Ok(())
3165 }
3166 }
3167 unsafe impl fidl::encoding::TypeMarker for StopError {
3168 type Owned = Self;
3169
3170 #[inline(always)]
3171 fn inline_align(_context: fidl::encoding::Context) -> usize {
3172 std::mem::align_of::<u32>()
3173 }
3174
3175 #[inline(always)]
3176 fn inline_size(_context: fidl::encoding::Context) -> usize {
3177 std::mem::size_of::<u32>()
3178 }
3179
3180 #[inline(always)]
3181 fn encode_is_copy() -> bool {
3182 false
3183 }
3184
3185 #[inline(always)]
3186 fn decode_is_copy() -> bool {
3187 false
3188 }
3189 }
3190
3191 impl fidl::encoding::ValueTypeMarker for StopError {
3192 type Borrowed<'a> = Self;
3193 #[inline(always)]
3194 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3195 *value
3196 }
3197 }
3198
3199 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopError {
3200 #[inline]
3201 unsafe fn encode(
3202 self,
3203 encoder: &mut fidl::encoding::Encoder<'_, D>,
3204 offset: usize,
3205 _depth: fidl::encoding::Depth,
3206 ) -> fidl::Result<()> {
3207 encoder.debug_check_bounds::<Self>(offset);
3208 encoder.write_num(self.into_primitive(), offset);
3209 Ok(())
3210 }
3211 }
3212
3213 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopError {
3214 #[inline(always)]
3215 fn new_empty() -> Self {
3216 Self::unknown()
3217 }
3218
3219 #[inline]
3220 unsafe fn decode(
3221 &mut self,
3222 decoder: &mut fidl::encoding::Decoder<'_, D>,
3223 offset: usize,
3224 _depth: fidl::encoding::Depth,
3225 ) -> fidl::Result<()> {
3226 decoder.debug_check_bounds::<Self>(offset);
3227 let prim = decoder.read_num::<u32>(offset);
3228
3229 *self = Self::from_primitive_allow_unknown(prim);
3230 Ok(())
3231 }
3232 }
3233 unsafe impl fidl::encoding::TypeMarker for UnresolveError {
3234 type Owned = Self;
3235
3236 #[inline(always)]
3237 fn inline_align(_context: fidl::encoding::Context) -> usize {
3238 std::mem::align_of::<u32>()
3239 }
3240
3241 #[inline(always)]
3242 fn inline_size(_context: fidl::encoding::Context) -> usize {
3243 std::mem::size_of::<u32>()
3244 }
3245
3246 #[inline(always)]
3247 fn encode_is_copy() -> bool {
3248 false
3249 }
3250
3251 #[inline(always)]
3252 fn decode_is_copy() -> bool {
3253 false
3254 }
3255 }
3256
3257 impl fidl::encoding::ValueTypeMarker for UnresolveError {
3258 type Borrowed<'a> = Self;
3259 #[inline(always)]
3260 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3261 *value
3262 }
3263 }
3264
3265 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnresolveError {
3266 #[inline]
3267 unsafe fn encode(
3268 self,
3269 encoder: &mut fidl::encoding::Encoder<'_, D>,
3270 offset: usize,
3271 _depth: fidl::encoding::Depth,
3272 ) -> fidl::Result<()> {
3273 encoder.debug_check_bounds::<Self>(offset);
3274 encoder.write_num(self.into_primitive(), offset);
3275 Ok(())
3276 }
3277 }
3278
3279 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnresolveError {
3280 #[inline(always)]
3281 fn new_empty() -> Self {
3282 Self::unknown()
3283 }
3284
3285 #[inline]
3286 unsafe fn decode(
3287 &mut self,
3288 decoder: &mut fidl::encoding::Decoder<'_, D>,
3289 offset: usize,
3290 _depth: fidl::encoding::Depth,
3291 ) -> fidl::Result<()> {
3292 decoder.debug_check_bounds::<Self>(offset);
3293 let prim = decoder.read_num::<u32>(offset);
3294
3295 *self = Self::from_primitive_allow_unknown(prim);
3296 Ok(())
3297 }
3298 }
3299
3300 impl fidl::encoding::ValueTypeMarker for ConfigOverrideSetStructuredConfigRequest {
3301 type Borrowed<'a> = &'a Self;
3302 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3303 value
3304 }
3305 }
3306
3307 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideSetStructuredConfigRequest {
3308 type Owned = Self;
3309
3310 #[inline(always)]
3311 fn inline_align(_context: fidl::encoding::Context) -> usize {
3312 8
3313 }
3314
3315 #[inline(always)]
3316 fn inline_size(_context: fidl::encoding::Context) -> usize {
3317 32
3318 }
3319 }
3320
3321 unsafe impl<D: fidl::encoding::ResourceDialect>
3322 fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D>
3323 for &ConfigOverrideSetStructuredConfigRequest
3324 {
3325 #[inline]
3326 unsafe fn encode(
3327 self,
3328 encoder: &mut fidl::encoding::Encoder<'_, D>,
3329 offset: usize,
3330 _depth: fidl::encoding::Depth,
3331 ) -> fidl::Result<()> {
3332 encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3333 fidl::encoding::Encode::<ConfigOverrideSetStructuredConfigRequest, D>::encode(
3335 (
3336 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
3337 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl__common::ConfigOverride> as fidl::encoding::ValueTypeMarker>::borrow(&self.fields),
3338 ),
3339 encoder, offset, _depth
3340 )
3341 }
3342 }
3343 unsafe impl<
3344 D: fidl::encoding::ResourceDialect,
3345 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3346 T1: fidl::encoding::Encode<
3347 fidl::encoding::UnboundedVector<
3348 fidl_fuchsia_component_decl__common::ConfigOverride,
3349 >,
3350 D,
3351 >,
3352 > fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D> for (T0, T1)
3353 {
3354 #[inline]
3355 unsafe fn encode(
3356 self,
3357 encoder: &mut fidl::encoding::Encoder<'_, D>,
3358 offset: usize,
3359 depth: fidl::encoding::Depth,
3360 ) -> fidl::Result<()> {
3361 encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3362 self.0.encode(encoder, offset + 0, depth)?;
3366 self.1.encode(encoder, offset + 16, depth)?;
3367 Ok(())
3368 }
3369 }
3370
3371 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3372 for ConfigOverrideSetStructuredConfigRequest
3373 {
3374 #[inline(always)]
3375 fn new_empty() -> Self {
3376 Self {
3377 moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3378 fields: fidl::new_empty!(
3379 fidl::encoding::UnboundedVector<
3380 fidl_fuchsia_component_decl__common::ConfigOverride,
3381 >,
3382 D
3383 ),
3384 }
3385 }
3386
3387 #[inline]
3388 unsafe fn decode(
3389 &mut self,
3390 decoder: &mut fidl::encoding::Decoder<'_, D>,
3391 offset: usize,
3392 _depth: fidl::encoding::Depth,
3393 ) -> fidl::Result<()> {
3394 decoder.debug_check_bounds::<Self>(offset);
3395 fidl::decode!(
3397 fidl::encoding::BoundedString<4096>,
3398 D,
3399 &mut self.moniker,
3400 decoder,
3401 offset + 0,
3402 _depth
3403 )?;
3404 fidl::decode!(
3405 fidl::encoding::UnboundedVector<
3406 fidl_fuchsia_component_decl__common::ConfigOverride,
3407 >,
3408 D,
3409 &mut self.fields,
3410 decoder,
3411 offset + 16,
3412 _depth
3413 )?;
3414 Ok(())
3415 }
3416 }
3417
3418 impl fidl::encoding::ValueTypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3419 type Borrowed<'a> = &'a Self;
3420 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3421 value
3422 }
3423 }
3424
3425 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3426 type Owned = Self;
3427
3428 #[inline(always)]
3429 fn inline_align(_context: fidl::encoding::Context) -> usize {
3430 8
3431 }
3432
3433 #[inline(always)]
3434 fn inline_size(_context: fidl::encoding::Context) -> usize {
3435 16
3436 }
3437 }
3438
3439 unsafe impl<D: fidl::encoding::ResourceDialect>
3440 fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D>
3441 for &ConfigOverrideUnsetStructuredConfigRequest
3442 {
3443 #[inline]
3444 unsafe fn encode(
3445 self,
3446 encoder: &mut fidl::encoding::Encoder<'_, D>,
3447 offset: usize,
3448 _depth: fidl::encoding::Depth,
3449 ) -> fidl::Result<()> {
3450 encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3451 fidl::encoding::Encode::<ConfigOverrideUnsetStructuredConfigRequest, D>::encode(
3453 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3454 &self.moniker,
3455 ),),
3456 encoder,
3457 offset,
3458 _depth,
3459 )
3460 }
3461 }
3462 unsafe impl<
3463 D: fidl::encoding::ResourceDialect,
3464 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3465 > fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D> for (T0,)
3466 {
3467 #[inline]
3468 unsafe fn encode(
3469 self,
3470 encoder: &mut fidl::encoding::Encoder<'_, D>,
3471 offset: usize,
3472 depth: fidl::encoding::Depth,
3473 ) -> fidl::Result<()> {
3474 encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3475 self.0.encode(encoder, offset + 0, depth)?;
3479 Ok(())
3480 }
3481 }
3482
3483 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3484 for ConfigOverrideUnsetStructuredConfigRequest
3485 {
3486 #[inline(always)]
3487 fn new_empty() -> Self {
3488 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3489 }
3490
3491 #[inline]
3492 unsafe fn decode(
3493 &mut self,
3494 decoder: &mut fidl::encoding::Decoder<'_, D>,
3495 offset: usize,
3496 _depth: fidl::encoding::Depth,
3497 ) -> fidl::Result<()> {
3498 decoder.debug_check_bounds::<Self>(offset);
3499 fidl::decode!(
3501 fidl::encoding::BoundedString<4096>,
3502 D,
3503 &mut self.moniker,
3504 decoder,
3505 offset + 0,
3506 _depth
3507 )?;
3508 Ok(())
3509 }
3510 }
3511
3512 impl fidl::encoding::ValueTypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3513 type Borrowed<'a> = &'a Self;
3514 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3515 value
3516 }
3517 }
3518
3519 unsafe impl fidl::encoding::TypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3520 type Owned = Self;
3521
3522 #[inline(always)]
3523 fn inline_align(_context: fidl::encoding::Context) -> usize {
3524 8
3525 }
3526
3527 #[inline(always)]
3528 fn inline_size(_context: fidl::encoding::Context) -> usize {
3529 16
3530 }
3531 }
3532
3533 unsafe impl<D: fidl::encoding::ResourceDialect>
3534 fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D>
3535 for &CrashIntrospectFindComponentByThreadKoidResponse
3536 {
3537 #[inline]
3538 unsafe fn encode(
3539 self,
3540 encoder: &mut fidl::encoding::Encoder<'_, D>,
3541 offset: usize,
3542 _depth: fidl::encoding::Depth,
3543 ) -> fidl::Result<()> {
3544 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3545 fidl::encoding::Encode::<CrashIntrospectFindComponentByThreadKoidResponse, D>::encode(
3547 (<ComponentCrashInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3548 encoder,
3549 offset,
3550 _depth,
3551 )
3552 }
3553 }
3554 unsafe impl<
3555 D: fidl::encoding::ResourceDialect,
3556 T0: fidl::encoding::Encode<ComponentCrashInfo, D>,
3557 > fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D> for (T0,)
3558 {
3559 #[inline]
3560 unsafe fn encode(
3561 self,
3562 encoder: &mut fidl::encoding::Encoder<'_, D>,
3563 offset: usize,
3564 depth: fidl::encoding::Depth,
3565 ) -> fidl::Result<()> {
3566 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3567 self.0.encode(encoder, offset + 0, depth)?;
3571 Ok(())
3572 }
3573 }
3574
3575 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3576 for CrashIntrospectFindComponentByThreadKoidResponse
3577 {
3578 #[inline(always)]
3579 fn new_empty() -> Self {
3580 Self { info: fidl::new_empty!(ComponentCrashInfo, D) }
3581 }
3582
3583 #[inline]
3584 unsafe fn decode(
3585 &mut self,
3586 decoder: &mut fidl::encoding::Decoder<'_, D>,
3587 offset: usize,
3588 _depth: fidl::encoding::Depth,
3589 ) -> fidl::Result<()> {
3590 decoder.debug_check_bounds::<Self>(offset);
3591 fidl::decode!(ComponentCrashInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3593 Ok(())
3594 }
3595 }
3596
3597 impl fidl::encoding::ValueTypeMarker for InstanceIteratorNextResponse {
3598 type Borrowed<'a> = &'a Self;
3599 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3600 value
3601 }
3602 }
3603
3604 unsafe impl fidl::encoding::TypeMarker for InstanceIteratorNextResponse {
3605 type Owned = Self;
3606
3607 #[inline(always)]
3608 fn inline_align(_context: fidl::encoding::Context) -> usize {
3609 8
3610 }
3611
3612 #[inline(always)]
3613 fn inline_size(_context: fidl::encoding::Context) -> usize {
3614 16
3615 }
3616 }
3617
3618 unsafe impl<D: fidl::encoding::ResourceDialect>
3619 fidl::encoding::Encode<InstanceIteratorNextResponse, D> for &InstanceIteratorNextResponse
3620 {
3621 #[inline]
3622 unsafe fn encode(
3623 self,
3624 encoder: &mut fidl::encoding::Encoder<'_, D>,
3625 offset: usize,
3626 _depth: fidl::encoding::Depth,
3627 ) -> fidl::Result<()> {
3628 encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3629 fidl::encoding::Encode::<InstanceIteratorNextResponse, D>::encode(
3631 (
3632 <fidl::encoding::UnboundedVector<Instance> as fidl::encoding::ValueTypeMarker>::borrow(&self.infos),
3633 ),
3634 encoder, offset, _depth
3635 )
3636 }
3637 }
3638 unsafe impl<
3639 D: fidl::encoding::ResourceDialect,
3640 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Instance>, D>,
3641 > fidl::encoding::Encode<InstanceIteratorNextResponse, D> for (T0,)
3642 {
3643 #[inline]
3644 unsafe fn encode(
3645 self,
3646 encoder: &mut fidl::encoding::Encoder<'_, D>,
3647 offset: usize,
3648 depth: fidl::encoding::Depth,
3649 ) -> fidl::Result<()> {
3650 encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3651 self.0.encode(encoder, offset + 0, depth)?;
3655 Ok(())
3656 }
3657 }
3658
3659 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3660 for InstanceIteratorNextResponse
3661 {
3662 #[inline(always)]
3663 fn new_empty() -> Self {
3664 Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<Instance>, D) }
3665 }
3666
3667 #[inline]
3668 unsafe fn decode(
3669 &mut self,
3670 decoder: &mut fidl::encoding::Decoder<'_, D>,
3671 offset: usize,
3672 _depth: fidl::encoding::Depth,
3673 ) -> fidl::Result<()> {
3674 decoder.debug_check_bounds::<Self>(offset);
3675 fidl::decode!(
3677 fidl::encoding::UnboundedVector<Instance>,
3678 D,
3679 &mut self.infos,
3680 decoder,
3681 offset + 0,
3682 _depth
3683 )?;
3684 Ok(())
3685 }
3686 }
3687
3688 impl fidl::encoding::ValueTypeMarker for LifecycleControllerDestroyInstanceRequest {
3689 type Borrowed<'a> = &'a Self;
3690 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3691 value
3692 }
3693 }
3694
3695 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerDestroyInstanceRequest {
3696 type Owned = Self;
3697
3698 #[inline(always)]
3699 fn inline_align(_context: fidl::encoding::Context) -> usize {
3700 8
3701 }
3702
3703 #[inline(always)]
3704 fn inline_size(_context: fidl::encoding::Context) -> usize {
3705 48
3706 }
3707 }
3708
3709 unsafe impl<D: fidl::encoding::ResourceDialect>
3710 fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D>
3711 for &LifecycleControllerDestroyInstanceRequest
3712 {
3713 #[inline]
3714 unsafe fn encode(
3715 self,
3716 encoder: &mut fidl::encoding::Encoder<'_, D>,
3717 offset: usize,
3718 _depth: fidl::encoding::Depth,
3719 ) -> fidl::Result<()> {
3720 encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3721 fidl::encoding::Encode::<LifecycleControllerDestroyInstanceRequest, D>::encode(
3723 (
3724 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_moniker),
3725 <fidl_fuchsia_component_decl__common::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
3726 ),
3727 encoder, offset, _depth
3728 )
3729 }
3730 }
3731 unsafe impl<
3732 D: fidl::encoding::ResourceDialect,
3733 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3734 T1: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ChildRef, D>,
3735 > fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D> for (T0, T1)
3736 {
3737 #[inline]
3738 unsafe fn encode(
3739 self,
3740 encoder: &mut fidl::encoding::Encoder<'_, D>,
3741 offset: usize,
3742 depth: fidl::encoding::Depth,
3743 ) -> fidl::Result<()> {
3744 encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3745 self.0.encode(encoder, offset + 0, depth)?;
3749 self.1.encode(encoder, offset + 16, depth)?;
3750 Ok(())
3751 }
3752 }
3753
3754 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3755 for LifecycleControllerDestroyInstanceRequest
3756 {
3757 #[inline(always)]
3758 fn new_empty() -> Self {
3759 Self {
3760 parent_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3761 child: fidl::new_empty!(fidl_fuchsia_component_decl__common::ChildRef, D),
3762 }
3763 }
3764
3765 #[inline]
3766 unsafe fn decode(
3767 &mut self,
3768 decoder: &mut fidl::encoding::Decoder<'_, D>,
3769 offset: usize,
3770 _depth: fidl::encoding::Depth,
3771 ) -> fidl::Result<()> {
3772 decoder.debug_check_bounds::<Self>(offset);
3773 fidl::decode!(
3775 fidl::encoding::BoundedString<4096>,
3776 D,
3777 &mut self.parent_moniker,
3778 decoder,
3779 offset + 0,
3780 _depth
3781 )?;
3782 fidl::decode!(
3783 fidl_fuchsia_component_decl__common::ChildRef,
3784 D,
3785 &mut self.child,
3786 decoder,
3787 offset + 16,
3788 _depth
3789 )?;
3790 Ok(())
3791 }
3792 }
3793
3794 impl fidl::encoding::ValueTypeMarker for LifecycleControllerResolveInstanceRequest {
3795 type Borrowed<'a> = &'a Self;
3796 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3797 value
3798 }
3799 }
3800
3801 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerResolveInstanceRequest {
3802 type Owned = Self;
3803
3804 #[inline(always)]
3805 fn inline_align(_context: fidl::encoding::Context) -> usize {
3806 8
3807 }
3808
3809 #[inline(always)]
3810 fn inline_size(_context: fidl::encoding::Context) -> usize {
3811 16
3812 }
3813 }
3814
3815 unsafe impl<D: fidl::encoding::ResourceDialect>
3816 fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D>
3817 for &LifecycleControllerResolveInstanceRequest
3818 {
3819 #[inline]
3820 unsafe fn encode(
3821 self,
3822 encoder: &mut fidl::encoding::Encoder<'_, D>,
3823 offset: usize,
3824 _depth: fidl::encoding::Depth,
3825 ) -> fidl::Result<()> {
3826 encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3827 fidl::encoding::Encode::<LifecycleControllerResolveInstanceRequest, D>::encode(
3829 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3830 &self.moniker,
3831 ),),
3832 encoder,
3833 offset,
3834 _depth,
3835 )
3836 }
3837 }
3838 unsafe impl<
3839 D: fidl::encoding::ResourceDialect,
3840 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3841 > fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D> for (T0,)
3842 {
3843 #[inline]
3844 unsafe fn encode(
3845 self,
3846 encoder: &mut fidl::encoding::Encoder<'_, D>,
3847 offset: usize,
3848 depth: fidl::encoding::Depth,
3849 ) -> fidl::Result<()> {
3850 encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3851 self.0.encode(encoder, offset + 0, depth)?;
3855 Ok(())
3856 }
3857 }
3858
3859 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3860 for LifecycleControllerResolveInstanceRequest
3861 {
3862 #[inline(always)]
3863 fn new_empty() -> Self {
3864 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3865 }
3866
3867 #[inline]
3868 unsafe fn decode(
3869 &mut self,
3870 decoder: &mut fidl::encoding::Decoder<'_, D>,
3871 offset: usize,
3872 _depth: fidl::encoding::Depth,
3873 ) -> fidl::Result<()> {
3874 decoder.debug_check_bounds::<Self>(offset);
3875 fidl::decode!(
3877 fidl::encoding::BoundedString<4096>,
3878 D,
3879 &mut self.moniker,
3880 decoder,
3881 offset + 0,
3882 _depth
3883 )?;
3884 Ok(())
3885 }
3886 }
3887
3888 impl fidl::encoding::ValueTypeMarker for LifecycleControllerStopInstanceRequest {
3889 type Borrowed<'a> = &'a Self;
3890 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3891 value
3892 }
3893 }
3894
3895 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStopInstanceRequest {
3896 type Owned = Self;
3897
3898 #[inline(always)]
3899 fn inline_align(_context: fidl::encoding::Context) -> usize {
3900 8
3901 }
3902
3903 #[inline(always)]
3904 fn inline_size(_context: fidl::encoding::Context) -> usize {
3905 16
3906 }
3907 }
3908
3909 unsafe impl<D: fidl::encoding::ResourceDialect>
3910 fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D>
3911 for &LifecycleControllerStopInstanceRequest
3912 {
3913 #[inline]
3914 unsafe fn encode(
3915 self,
3916 encoder: &mut fidl::encoding::Encoder<'_, D>,
3917 offset: usize,
3918 _depth: fidl::encoding::Depth,
3919 ) -> fidl::Result<()> {
3920 encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3921 fidl::encoding::Encode::<LifecycleControllerStopInstanceRequest, D>::encode(
3923 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3924 &self.moniker,
3925 ),),
3926 encoder,
3927 offset,
3928 _depth,
3929 )
3930 }
3931 }
3932 unsafe impl<
3933 D: fidl::encoding::ResourceDialect,
3934 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3935 > fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D> for (T0,)
3936 {
3937 #[inline]
3938 unsafe fn encode(
3939 self,
3940 encoder: &mut fidl::encoding::Encoder<'_, D>,
3941 offset: usize,
3942 depth: fidl::encoding::Depth,
3943 ) -> fidl::Result<()> {
3944 encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3945 self.0.encode(encoder, offset + 0, depth)?;
3949 Ok(())
3950 }
3951 }
3952
3953 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3954 for LifecycleControllerStopInstanceRequest
3955 {
3956 #[inline(always)]
3957 fn new_empty() -> Self {
3958 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3959 }
3960
3961 #[inline]
3962 unsafe fn decode(
3963 &mut self,
3964 decoder: &mut fidl::encoding::Decoder<'_, D>,
3965 offset: usize,
3966 _depth: fidl::encoding::Depth,
3967 ) -> fidl::Result<()> {
3968 decoder.debug_check_bounds::<Self>(offset);
3969 fidl::decode!(
3971 fidl::encoding::BoundedString<4096>,
3972 D,
3973 &mut self.moniker,
3974 decoder,
3975 offset + 0,
3976 _depth
3977 )?;
3978 Ok(())
3979 }
3980 }
3981
3982 impl fidl::encoding::ValueTypeMarker for LifecycleControllerUnresolveInstanceRequest {
3983 type Borrowed<'a> = &'a Self;
3984 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3985 value
3986 }
3987 }
3988
3989 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerUnresolveInstanceRequest {
3990 type Owned = Self;
3991
3992 #[inline(always)]
3993 fn inline_align(_context: fidl::encoding::Context) -> usize {
3994 8
3995 }
3996
3997 #[inline(always)]
3998 fn inline_size(_context: fidl::encoding::Context) -> usize {
3999 16
4000 }
4001 }
4002
4003 unsafe impl<D: fidl::encoding::ResourceDialect>
4004 fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D>
4005 for &LifecycleControllerUnresolveInstanceRequest
4006 {
4007 #[inline]
4008 unsafe fn encode(
4009 self,
4010 encoder: &mut fidl::encoding::Encoder<'_, D>,
4011 offset: usize,
4012 _depth: fidl::encoding::Depth,
4013 ) -> fidl::Result<()> {
4014 encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4015 fidl::encoding::Encode::<LifecycleControllerUnresolveInstanceRequest, D>::encode(
4017 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4018 &self.moniker,
4019 ),),
4020 encoder,
4021 offset,
4022 _depth,
4023 )
4024 }
4025 }
4026 unsafe impl<
4027 D: fidl::encoding::ResourceDialect,
4028 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4029 > fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D> for (T0,)
4030 {
4031 #[inline]
4032 unsafe fn encode(
4033 self,
4034 encoder: &mut fidl::encoding::Encoder<'_, D>,
4035 offset: usize,
4036 depth: fidl::encoding::Depth,
4037 ) -> fidl::Result<()> {
4038 encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4039 self.0.encode(encoder, offset + 0, depth)?;
4043 Ok(())
4044 }
4045 }
4046
4047 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4048 for LifecycleControllerUnresolveInstanceRequest
4049 {
4050 #[inline(always)]
4051 fn new_empty() -> Self {
4052 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4053 }
4054
4055 #[inline]
4056 unsafe fn decode(
4057 &mut self,
4058 decoder: &mut fidl::encoding::Decoder<'_, D>,
4059 offset: usize,
4060 _depth: fidl::encoding::Depth,
4061 ) -> fidl::Result<()> {
4062 decoder.debug_check_bounds::<Self>(offset);
4063 fidl::decode!(
4065 fidl::encoding::BoundedString<4096>,
4066 D,
4067 &mut self.moniker,
4068 decoder,
4069 offset + 0,
4070 _depth
4071 )?;
4072 Ok(())
4073 }
4074 }
4075
4076 impl fidl::encoding::ValueTypeMarker for ManifestBytesIteratorNextResponse {
4077 type Borrowed<'a> = &'a Self;
4078 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4079 value
4080 }
4081 }
4082
4083 unsafe impl fidl::encoding::TypeMarker for ManifestBytesIteratorNextResponse {
4084 type Owned = Self;
4085
4086 #[inline(always)]
4087 fn inline_align(_context: fidl::encoding::Context) -> usize {
4088 8
4089 }
4090
4091 #[inline(always)]
4092 fn inline_size(_context: fidl::encoding::Context) -> usize {
4093 16
4094 }
4095 }
4096
4097 unsafe impl<D: fidl::encoding::ResourceDialect>
4098 fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D>
4099 for &ManifestBytesIteratorNextResponse
4100 {
4101 #[inline]
4102 unsafe fn encode(
4103 self,
4104 encoder: &mut fidl::encoding::Encoder<'_, D>,
4105 offset: usize,
4106 _depth: fidl::encoding::Depth,
4107 ) -> fidl::Result<()> {
4108 encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4109 fidl::encoding::Encode::<ManifestBytesIteratorNextResponse, D>::encode(
4111 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
4112 &self.infos,
4113 ),),
4114 encoder,
4115 offset,
4116 _depth,
4117 )
4118 }
4119 }
4120 unsafe impl<
4121 D: fidl::encoding::ResourceDialect,
4122 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4123 > fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D> for (T0,)
4124 {
4125 #[inline]
4126 unsafe fn encode(
4127 self,
4128 encoder: &mut fidl::encoding::Encoder<'_, D>,
4129 offset: usize,
4130 depth: fidl::encoding::Depth,
4131 ) -> fidl::Result<()> {
4132 encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4133 self.0.encode(encoder, offset + 0, depth)?;
4137 Ok(())
4138 }
4139 }
4140
4141 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4142 for ManifestBytesIteratorNextResponse
4143 {
4144 #[inline(always)]
4145 fn new_empty() -> Self {
4146 Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
4147 }
4148
4149 #[inline]
4150 unsafe fn decode(
4151 &mut self,
4152 decoder: &mut fidl::encoding::Decoder<'_, D>,
4153 offset: usize,
4154 _depth: fidl::encoding::Depth,
4155 ) -> fidl::Result<()> {
4156 decoder.debug_check_bounds::<Self>(offset);
4157 fidl::decode!(
4159 fidl::encoding::UnboundedVector<u8>,
4160 D,
4161 &mut self.infos,
4162 decoder,
4163 offset + 0,
4164 _depth
4165 )?;
4166 Ok(())
4167 }
4168 }
4169
4170 impl fidl::encoding::ValueTypeMarker for RealmQueryConstructNamespaceRequest {
4171 type Borrowed<'a> = &'a Self;
4172 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4173 value
4174 }
4175 }
4176
4177 unsafe impl fidl::encoding::TypeMarker for RealmQueryConstructNamespaceRequest {
4178 type Owned = Self;
4179
4180 #[inline(always)]
4181 fn inline_align(_context: fidl::encoding::Context) -> usize {
4182 8
4183 }
4184
4185 #[inline(always)]
4186 fn inline_size(_context: fidl::encoding::Context) -> usize {
4187 16
4188 }
4189 }
4190
4191 unsafe impl<D: fidl::encoding::ResourceDialect>
4192 fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D>
4193 for &RealmQueryConstructNamespaceRequest
4194 {
4195 #[inline]
4196 unsafe fn encode(
4197 self,
4198 encoder: &mut fidl::encoding::Encoder<'_, D>,
4199 offset: usize,
4200 _depth: fidl::encoding::Depth,
4201 ) -> fidl::Result<()> {
4202 encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4203 fidl::encoding::Encode::<RealmQueryConstructNamespaceRequest, D>::encode(
4205 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4206 &self.moniker,
4207 ),),
4208 encoder,
4209 offset,
4210 _depth,
4211 )
4212 }
4213 }
4214 unsafe impl<
4215 D: fidl::encoding::ResourceDialect,
4216 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4217 > fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D> for (T0,)
4218 {
4219 #[inline]
4220 unsafe fn encode(
4221 self,
4222 encoder: &mut fidl::encoding::Encoder<'_, D>,
4223 offset: usize,
4224 depth: fidl::encoding::Depth,
4225 ) -> fidl::Result<()> {
4226 encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4227 self.0.encode(encoder, offset + 0, depth)?;
4231 Ok(())
4232 }
4233 }
4234
4235 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4236 for RealmQueryConstructNamespaceRequest
4237 {
4238 #[inline(always)]
4239 fn new_empty() -> Self {
4240 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4241 }
4242
4243 #[inline]
4244 unsafe fn decode(
4245 &mut self,
4246 decoder: &mut fidl::encoding::Decoder<'_, D>,
4247 offset: usize,
4248 _depth: fidl::encoding::Depth,
4249 ) -> fidl::Result<()> {
4250 decoder.debug_check_bounds::<Self>(offset);
4251 fidl::decode!(
4253 fidl::encoding::BoundedString<4096>,
4254 D,
4255 &mut self.moniker,
4256 decoder,
4257 offset + 0,
4258 _depth
4259 )?;
4260 Ok(())
4261 }
4262 }
4263
4264 impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceRequest {
4265 type Borrowed<'a> = &'a Self;
4266 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4267 value
4268 }
4269 }
4270
4271 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceRequest {
4272 type Owned = Self;
4273
4274 #[inline(always)]
4275 fn inline_align(_context: fidl::encoding::Context) -> usize {
4276 8
4277 }
4278
4279 #[inline(always)]
4280 fn inline_size(_context: fidl::encoding::Context) -> usize {
4281 16
4282 }
4283 }
4284
4285 unsafe impl<D: fidl::encoding::ResourceDialect>
4286 fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for &RealmQueryGetInstanceRequest
4287 {
4288 #[inline]
4289 unsafe fn encode(
4290 self,
4291 encoder: &mut fidl::encoding::Encoder<'_, D>,
4292 offset: usize,
4293 _depth: fidl::encoding::Depth,
4294 ) -> fidl::Result<()> {
4295 encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4296 fidl::encoding::Encode::<RealmQueryGetInstanceRequest, D>::encode(
4298 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4299 &self.moniker,
4300 ),),
4301 encoder,
4302 offset,
4303 _depth,
4304 )
4305 }
4306 }
4307 unsafe impl<
4308 D: fidl::encoding::ResourceDialect,
4309 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4310 > fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for (T0,)
4311 {
4312 #[inline]
4313 unsafe fn encode(
4314 self,
4315 encoder: &mut fidl::encoding::Encoder<'_, D>,
4316 offset: usize,
4317 depth: fidl::encoding::Depth,
4318 ) -> fidl::Result<()> {
4319 encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4320 self.0.encode(encoder, offset + 0, depth)?;
4324 Ok(())
4325 }
4326 }
4327
4328 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4329 for RealmQueryGetInstanceRequest
4330 {
4331 #[inline(always)]
4332 fn new_empty() -> Self {
4333 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4334 }
4335
4336 #[inline]
4337 unsafe fn decode(
4338 &mut self,
4339 decoder: &mut fidl::encoding::Decoder<'_, D>,
4340 offset: usize,
4341 _depth: fidl::encoding::Depth,
4342 ) -> fidl::Result<()> {
4343 decoder.debug_check_bounds::<Self>(offset);
4344 fidl::decode!(
4346 fidl::encoding::BoundedString<4096>,
4347 D,
4348 &mut self.moniker,
4349 decoder,
4350 offset + 0,
4351 _depth
4352 )?;
4353 Ok(())
4354 }
4355 }
4356
4357 impl fidl::encoding::ValueTypeMarker for RealmQueryGetResolvedDeclarationRequest {
4358 type Borrowed<'a> = &'a Self;
4359 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4360 value
4361 }
4362 }
4363
4364 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetResolvedDeclarationRequest {
4365 type Owned = Self;
4366
4367 #[inline(always)]
4368 fn inline_align(_context: fidl::encoding::Context) -> usize {
4369 8
4370 }
4371
4372 #[inline(always)]
4373 fn inline_size(_context: fidl::encoding::Context) -> usize {
4374 16
4375 }
4376 }
4377
4378 unsafe impl<D: fidl::encoding::ResourceDialect>
4379 fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D>
4380 for &RealmQueryGetResolvedDeclarationRequest
4381 {
4382 #[inline]
4383 unsafe fn encode(
4384 self,
4385 encoder: &mut fidl::encoding::Encoder<'_, D>,
4386 offset: usize,
4387 _depth: fidl::encoding::Depth,
4388 ) -> fidl::Result<()> {
4389 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4390 fidl::encoding::Encode::<RealmQueryGetResolvedDeclarationRequest, D>::encode(
4392 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4393 &self.moniker,
4394 ),),
4395 encoder,
4396 offset,
4397 _depth,
4398 )
4399 }
4400 }
4401 unsafe impl<
4402 D: fidl::encoding::ResourceDialect,
4403 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4404 > fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D> for (T0,)
4405 {
4406 #[inline]
4407 unsafe fn encode(
4408 self,
4409 encoder: &mut fidl::encoding::Encoder<'_, D>,
4410 offset: usize,
4411 depth: fidl::encoding::Depth,
4412 ) -> fidl::Result<()> {
4413 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4414 self.0.encode(encoder, offset + 0, depth)?;
4418 Ok(())
4419 }
4420 }
4421
4422 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4423 for RealmQueryGetResolvedDeclarationRequest
4424 {
4425 #[inline(always)]
4426 fn new_empty() -> Self {
4427 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4428 }
4429
4430 #[inline]
4431 unsafe fn decode(
4432 &mut self,
4433 decoder: &mut fidl::encoding::Decoder<'_, D>,
4434 offset: usize,
4435 _depth: fidl::encoding::Depth,
4436 ) -> fidl::Result<()> {
4437 decoder.debug_check_bounds::<Self>(offset);
4438 fidl::decode!(
4440 fidl::encoding::BoundedString<4096>,
4441 D,
4442 &mut self.moniker,
4443 decoder,
4444 offset + 0,
4445 _depth
4446 )?;
4447 Ok(())
4448 }
4449 }
4450
4451 impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigRequest {
4452 type Borrowed<'a> = &'a Self;
4453 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4454 value
4455 }
4456 }
4457
4458 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigRequest {
4459 type Owned = Self;
4460
4461 #[inline(always)]
4462 fn inline_align(_context: fidl::encoding::Context) -> usize {
4463 8
4464 }
4465
4466 #[inline(always)]
4467 fn inline_size(_context: fidl::encoding::Context) -> usize {
4468 16
4469 }
4470 }
4471
4472 unsafe impl<D: fidl::encoding::ResourceDialect>
4473 fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D>
4474 for &RealmQueryGetStructuredConfigRequest
4475 {
4476 #[inline]
4477 unsafe fn encode(
4478 self,
4479 encoder: &mut fidl::encoding::Encoder<'_, D>,
4480 offset: usize,
4481 _depth: fidl::encoding::Depth,
4482 ) -> fidl::Result<()> {
4483 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4484 fidl::encoding::Encode::<RealmQueryGetStructuredConfigRequest, D>::encode(
4486 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4487 &self.moniker,
4488 ),),
4489 encoder,
4490 offset,
4491 _depth,
4492 )
4493 }
4494 }
4495 unsafe impl<
4496 D: fidl::encoding::ResourceDialect,
4497 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4498 > fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D> for (T0,)
4499 {
4500 #[inline]
4501 unsafe fn encode(
4502 self,
4503 encoder: &mut fidl::encoding::Encoder<'_, D>,
4504 offset: usize,
4505 depth: fidl::encoding::Depth,
4506 ) -> fidl::Result<()> {
4507 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4508 self.0.encode(encoder, offset + 0, depth)?;
4512 Ok(())
4513 }
4514 }
4515
4516 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4517 for RealmQueryGetStructuredConfigRequest
4518 {
4519 #[inline(always)]
4520 fn new_empty() -> Self {
4521 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4522 }
4523
4524 #[inline]
4525 unsafe fn decode(
4526 &mut self,
4527 decoder: &mut fidl::encoding::Decoder<'_, D>,
4528 offset: usize,
4529 _depth: fidl::encoding::Depth,
4530 ) -> fidl::Result<()> {
4531 decoder.debug_check_bounds::<Self>(offset);
4532 fidl::decode!(
4534 fidl::encoding::BoundedString<4096>,
4535 D,
4536 &mut self.moniker,
4537 decoder,
4538 offset + 0,
4539 _depth
4540 )?;
4541 Ok(())
4542 }
4543 }
4544
4545 impl fidl::encoding::ValueTypeMarker for RealmQueryResolveDeclarationRequest {
4546 type Borrowed<'a> = &'a Self;
4547 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4548 value
4549 }
4550 }
4551
4552 unsafe impl fidl::encoding::TypeMarker for RealmQueryResolveDeclarationRequest {
4553 type Owned = Self;
4554
4555 #[inline(always)]
4556 fn inline_align(_context: fidl::encoding::Context) -> usize {
4557 8
4558 }
4559
4560 #[inline(always)]
4561 fn inline_size(_context: fidl::encoding::Context) -> usize {
4562 48
4563 }
4564 }
4565
4566 unsafe impl<D: fidl::encoding::ResourceDialect>
4567 fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D>
4568 for &RealmQueryResolveDeclarationRequest
4569 {
4570 #[inline]
4571 unsafe fn encode(
4572 self,
4573 encoder: &mut fidl::encoding::Encoder<'_, D>,
4574 offset: usize,
4575 _depth: fidl::encoding::Depth,
4576 ) -> fidl::Result<()> {
4577 encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4578 fidl::encoding::Encode::<RealmQueryResolveDeclarationRequest, D>::encode(
4580 (
4581 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
4582 <ChildLocation as fidl::encoding::ValueTypeMarker>::borrow(&self.child_location),
4583 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
4584 ),
4585 encoder, offset, _depth
4586 )
4587 }
4588 }
4589 unsafe impl<
4590 D: fidl::encoding::ResourceDialect,
4591 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4592 T1: fidl::encoding::Encode<ChildLocation, D>,
4593 T2: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4594 > fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D> for (T0, T1, T2)
4595 {
4596 #[inline]
4597 unsafe fn encode(
4598 self,
4599 encoder: &mut fidl::encoding::Encoder<'_, D>,
4600 offset: usize,
4601 depth: fidl::encoding::Depth,
4602 ) -> fidl::Result<()> {
4603 encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4604 self.0.encode(encoder, offset + 0, depth)?;
4608 self.1.encode(encoder, offset + 16, depth)?;
4609 self.2.encode(encoder, offset + 32, depth)?;
4610 Ok(())
4611 }
4612 }
4613
4614 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4615 for RealmQueryResolveDeclarationRequest
4616 {
4617 #[inline(always)]
4618 fn new_empty() -> Self {
4619 Self {
4620 parent: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4621 child_location: fidl::new_empty!(ChildLocation, D),
4622 url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4623 }
4624 }
4625
4626 #[inline]
4627 unsafe fn decode(
4628 &mut self,
4629 decoder: &mut fidl::encoding::Decoder<'_, D>,
4630 offset: usize,
4631 _depth: fidl::encoding::Depth,
4632 ) -> fidl::Result<()> {
4633 decoder.debug_check_bounds::<Self>(offset);
4634 fidl::decode!(
4636 fidl::encoding::BoundedString<4096>,
4637 D,
4638 &mut self.parent,
4639 decoder,
4640 offset + 0,
4641 _depth
4642 )?;
4643 fidl::decode!(
4644 ChildLocation,
4645 D,
4646 &mut self.child_location,
4647 decoder,
4648 offset + 16,
4649 _depth
4650 )?;
4651 fidl::decode!(
4652 fidl::encoding::BoundedString<4096>,
4653 D,
4654 &mut self.url,
4655 decoder,
4656 offset + 32,
4657 _depth
4658 )?;
4659 Ok(())
4660 }
4661 }
4662
4663 impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceResponse {
4664 type Borrowed<'a> = &'a Self;
4665 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4666 value
4667 }
4668 }
4669
4670 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceResponse {
4671 type Owned = Self;
4672
4673 #[inline(always)]
4674 fn inline_align(_context: fidl::encoding::Context) -> usize {
4675 8
4676 }
4677
4678 #[inline(always)]
4679 fn inline_size(_context: fidl::encoding::Context) -> usize {
4680 16
4681 }
4682 }
4683
4684 unsafe impl<D: fidl::encoding::ResourceDialect>
4685 fidl::encoding::Encode<RealmQueryGetInstanceResponse, D>
4686 for &RealmQueryGetInstanceResponse
4687 {
4688 #[inline]
4689 unsafe fn encode(
4690 self,
4691 encoder: &mut fidl::encoding::Encoder<'_, D>,
4692 offset: usize,
4693 _depth: fidl::encoding::Depth,
4694 ) -> fidl::Result<()> {
4695 encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4696 fidl::encoding::Encode::<RealmQueryGetInstanceResponse, D>::encode(
4698 (<Instance as fidl::encoding::ValueTypeMarker>::borrow(&self.instance),),
4699 encoder,
4700 offset,
4701 _depth,
4702 )
4703 }
4704 }
4705 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Instance, D>>
4706 fidl::encoding::Encode<RealmQueryGetInstanceResponse, D> for (T0,)
4707 {
4708 #[inline]
4709 unsafe fn encode(
4710 self,
4711 encoder: &mut fidl::encoding::Encoder<'_, D>,
4712 offset: usize,
4713 depth: fidl::encoding::Depth,
4714 ) -> fidl::Result<()> {
4715 encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4716 self.0.encode(encoder, offset + 0, depth)?;
4720 Ok(())
4721 }
4722 }
4723
4724 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4725 for RealmQueryGetInstanceResponse
4726 {
4727 #[inline(always)]
4728 fn new_empty() -> Self {
4729 Self { instance: fidl::new_empty!(Instance, D) }
4730 }
4731
4732 #[inline]
4733 unsafe fn decode(
4734 &mut self,
4735 decoder: &mut fidl::encoding::Decoder<'_, D>,
4736 offset: usize,
4737 _depth: fidl::encoding::Depth,
4738 ) -> fidl::Result<()> {
4739 decoder.debug_check_bounds::<Self>(offset);
4740 fidl::decode!(Instance, D, &mut self.instance, decoder, offset + 0, _depth)?;
4742 Ok(())
4743 }
4744 }
4745
4746 impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigResponse {
4747 type Borrowed<'a> = &'a Self;
4748 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4749 value
4750 }
4751 }
4752
4753 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigResponse {
4754 type Owned = Self;
4755
4756 #[inline(always)]
4757 fn inline_align(_context: fidl::encoding::Context) -> usize {
4758 8
4759 }
4760
4761 #[inline(always)]
4762 fn inline_size(_context: fidl::encoding::Context) -> usize {
4763 32
4764 }
4765 }
4766
4767 unsafe impl<D: fidl::encoding::ResourceDialect>
4768 fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D>
4769 for &RealmQueryGetStructuredConfigResponse
4770 {
4771 #[inline]
4772 unsafe fn encode(
4773 self,
4774 encoder: &mut fidl::encoding::Encoder<'_, D>,
4775 offset: usize,
4776 _depth: fidl::encoding::Depth,
4777 ) -> fidl::Result<()> {
4778 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4779 fidl::encoding::Encode::<RealmQueryGetStructuredConfigResponse, D>::encode(
4781 (
4782 <fidl_fuchsia_component_decl__common::ResolvedConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
4783 ),
4784 encoder, offset, _depth
4785 )
4786 }
4787 }
4788 unsafe impl<
4789 D: fidl::encoding::ResourceDialect,
4790 T0: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ResolvedConfig, D>,
4791 > fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D> for (T0,)
4792 {
4793 #[inline]
4794 unsafe fn encode(
4795 self,
4796 encoder: &mut fidl::encoding::Encoder<'_, D>,
4797 offset: usize,
4798 depth: fidl::encoding::Depth,
4799 ) -> fidl::Result<()> {
4800 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4801 self.0.encode(encoder, offset + 0, depth)?;
4805 Ok(())
4806 }
4807 }
4808
4809 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4810 for RealmQueryGetStructuredConfigResponse
4811 {
4812 #[inline(always)]
4813 fn new_empty() -> Self {
4814 Self {
4815 config: fidl::new_empty!(fidl_fuchsia_component_decl__common::ResolvedConfig, D),
4816 }
4817 }
4818
4819 #[inline]
4820 unsafe fn decode(
4821 &mut self,
4822 decoder: &mut fidl::encoding::Decoder<'_, D>,
4823 offset: usize,
4824 _depth: fidl::encoding::Depth,
4825 ) -> fidl::Result<()> {
4826 decoder.debug_check_bounds::<Self>(offset);
4827 fidl::decode!(
4829 fidl_fuchsia_component_decl__common::ResolvedConfig,
4830 D,
4831 &mut self.config,
4832 decoder,
4833 offset + 0,
4834 _depth
4835 )?;
4836 Ok(())
4837 }
4838 }
4839
4840 impl fidl::encoding::ValueTypeMarker for RouteTarget {
4841 type Borrowed<'a> = &'a Self;
4842 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4843 value
4844 }
4845 }
4846
4847 unsafe impl fidl::encoding::TypeMarker for RouteTarget {
4848 type Owned = Self;
4849
4850 #[inline(always)]
4851 fn inline_align(_context: fidl::encoding::Context) -> usize {
4852 8
4853 }
4854
4855 #[inline(always)]
4856 fn inline_size(_context: fidl::encoding::Context) -> usize {
4857 24
4858 }
4859 }
4860
4861 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteTarget, D>
4862 for &RouteTarget
4863 {
4864 #[inline]
4865 unsafe fn encode(
4866 self,
4867 encoder: &mut fidl::encoding::Encoder<'_, D>,
4868 offset: usize,
4869 _depth: fidl::encoding::Depth,
4870 ) -> fidl::Result<()> {
4871 encoder.debug_check_bounds::<RouteTarget>(offset);
4872 fidl::encoding::Encode::<RouteTarget, D>::encode(
4874 (
4875 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4876 &self.name,
4877 ),
4878 <DeclType as fidl::encoding::ValueTypeMarker>::borrow(&self.decl_type),
4879 ),
4880 encoder,
4881 offset,
4882 _depth,
4883 )
4884 }
4885 }
4886 unsafe impl<
4887 D: fidl::encoding::ResourceDialect,
4888 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4889 T1: fidl::encoding::Encode<DeclType, D>,
4890 > fidl::encoding::Encode<RouteTarget, D> for (T0, T1)
4891 {
4892 #[inline]
4893 unsafe fn encode(
4894 self,
4895 encoder: &mut fidl::encoding::Encoder<'_, D>,
4896 offset: usize,
4897 depth: fidl::encoding::Depth,
4898 ) -> fidl::Result<()> {
4899 encoder.debug_check_bounds::<RouteTarget>(offset);
4900 unsafe {
4903 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4904 (ptr as *mut u64).write_unaligned(0);
4905 }
4906 self.0.encode(encoder, offset + 0, depth)?;
4908 self.1.encode(encoder, offset + 16, depth)?;
4909 Ok(())
4910 }
4911 }
4912
4913 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteTarget {
4914 #[inline(always)]
4915 fn new_empty() -> Self {
4916 Self {
4917 name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4918 decl_type: fidl::new_empty!(DeclType, D),
4919 }
4920 }
4921
4922 #[inline]
4923 unsafe fn decode(
4924 &mut self,
4925 decoder: &mut fidl::encoding::Decoder<'_, D>,
4926 offset: usize,
4927 _depth: fidl::encoding::Depth,
4928 ) -> fidl::Result<()> {
4929 decoder.debug_check_bounds::<Self>(offset);
4930 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4932 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4933 let mask = 0xffffffff00000000u64;
4934 let maskedval = padval & mask;
4935 if maskedval != 0 {
4936 return Err(fidl::Error::NonZeroPadding {
4937 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4938 });
4939 }
4940 fidl::decode!(
4941 fidl::encoding::BoundedString<255>,
4942 D,
4943 &mut self.name,
4944 decoder,
4945 offset + 0,
4946 _depth
4947 )?;
4948 fidl::decode!(DeclType, D, &mut self.decl_type, decoder, offset + 16, _depth)?;
4949 Ok(())
4950 }
4951 }
4952
4953 impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteRequest {
4954 type Borrowed<'a> = &'a Self;
4955 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4956 value
4957 }
4958 }
4959
4960 unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteRequest {
4961 type Owned = Self;
4962
4963 #[inline(always)]
4964 fn inline_align(_context: fidl::encoding::Context) -> usize {
4965 8
4966 }
4967
4968 #[inline(always)]
4969 fn inline_size(_context: fidl::encoding::Context) -> usize {
4970 32
4971 }
4972 }
4973
4974 unsafe impl<D: fidl::encoding::ResourceDialect>
4975 fidl::encoding::Encode<RouteValidatorRouteRequest, D> for &RouteValidatorRouteRequest
4976 {
4977 #[inline]
4978 unsafe fn encode(
4979 self,
4980 encoder: &mut fidl::encoding::Encoder<'_, D>,
4981 offset: usize,
4982 _depth: fidl::encoding::Depth,
4983 ) -> fidl::Result<()> {
4984 encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
4985 fidl::encoding::Encode::<RouteValidatorRouteRequest, D>::encode(
4987 (
4988 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
4989 <fidl::encoding::UnboundedVector<RouteTarget> as fidl::encoding::ValueTypeMarker>::borrow(&self.targets),
4990 ),
4991 encoder, offset, _depth
4992 )
4993 }
4994 }
4995 unsafe impl<
4996 D: fidl::encoding::ResourceDialect,
4997 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4998 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteTarget>, D>,
4999 > fidl::encoding::Encode<RouteValidatorRouteRequest, D> for (T0, T1)
5000 {
5001 #[inline]
5002 unsafe fn encode(
5003 self,
5004 encoder: &mut fidl::encoding::Encoder<'_, D>,
5005 offset: usize,
5006 depth: fidl::encoding::Depth,
5007 ) -> fidl::Result<()> {
5008 encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
5009 self.0.encode(encoder, offset + 0, depth)?;
5013 self.1.encode(encoder, offset + 16, depth)?;
5014 Ok(())
5015 }
5016 }
5017
5018 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5019 for RouteValidatorRouteRequest
5020 {
5021 #[inline(always)]
5022 fn new_empty() -> Self {
5023 Self {
5024 moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
5025 targets: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteTarget>, D),
5026 }
5027 }
5028
5029 #[inline]
5030 unsafe fn decode(
5031 &mut self,
5032 decoder: &mut fidl::encoding::Decoder<'_, D>,
5033 offset: usize,
5034 _depth: fidl::encoding::Depth,
5035 ) -> fidl::Result<()> {
5036 decoder.debug_check_bounds::<Self>(offset);
5037 fidl::decode!(
5039 fidl::encoding::BoundedString<4096>,
5040 D,
5041 &mut self.moniker,
5042 decoder,
5043 offset + 0,
5044 _depth
5045 )?;
5046 fidl::decode!(
5047 fidl::encoding::UnboundedVector<RouteTarget>,
5048 D,
5049 &mut self.targets,
5050 decoder,
5051 offset + 16,
5052 _depth
5053 )?;
5054 Ok(())
5055 }
5056 }
5057
5058 impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateRequest {
5059 type Borrowed<'a> = &'a Self;
5060 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5061 value
5062 }
5063 }
5064
5065 unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateRequest {
5066 type Owned = Self;
5067
5068 #[inline(always)]
5069 fn inline_align(_context: fidl::encoding::Context) -> usize {
5070 8
5071 }
5072
5073 #[inline(always)]
5074 fn inline_size(_context: fidl::encoding::Context) -> usize {
5075 16
5076 }
5077 }
5078
5079 unsafe impl<D: fidl::encoding::ResourceDialect>
5080 fidl::encoding::Encode<RouteValidatorValidateRequest, D>
5081 for &RouteValidatorValidateRequest
5082 {
5083 #[inline]
5084 unsafe fn encode(
5085 self,
5086 encoder: &mut fidl::encoding::Encoder<'_, D>,
5087 offset: usize,
5088 _depth: fidl::encoding::Depth,
5089 ) -> fidl::Result<()> {
5090 encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5091 fidl::encoding::Encode::<RouteValidatorValidateRequest, D>::encode(
5093 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5094 &self.moniker,
5095 ),),
5096 encoder,
5097 offset,
5098 _depth,
5099 )
5100 }
5101 }
5102 unsafe impl<
5103 D: fidl::encoding::ResourceDialect,
5104 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5105 > fidl::encoding::Encode<RouteValidatorValidateRequest, D> for (T0,)
5106 {
5107 #[inline]
5108 unsafe fn encode(
5109 self,
5110 encoder: &mut fidl::encoding::Encoder<'_, D>,
5111 offset: usize,
5112 depth: fidl::encoding::Depth,
5113 ) -> fidl::Result<()> {
5114 encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5115 self.0.encode(encoder, offset + 0, depth)?;
5119 Ok(())
5120 }
5121 }
5122
5123 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5124 for RouteValidatorValidateRequest
5125 {
5126 #[inline(always)]
5127 fn new_empty() -> Self {
5128 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5129 }
5130
5131 #[inline]
5132 unsafe fn decode(
5133 &mut self,
5134 decoder: &mut fidl::encoding::Decoder<'_, D>,
5135 offset: usize,
5136 _depth: fidl::encoding::Depth,
5137 ) -> fidl::Result<()> {
5138 decoder.debug_check_bounds::<Self>(offset);
5139 fidl::decode!(
5141 fidl::encoding::BoundedString<4096>,
5142 D,
5143 &mut self.moniker,
5144 decoder,
5145 offset + 0,
5146 _depth
5147 )?;
5148 Ok(())
5149 }
5150 }
5151
5152 impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteResponse {
5153 type Borrowed<'a> = &'a Self;
5154 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5155 value
5156 }
5157 }
5158
5159 unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteResponse {
5160 type Owned = Self;
5161
5162 #[inline(always)]
5163 fn inline_align(_context: fidl::encoding::Context) -> usize {
5164 8
5165 }
5166
5167 #[inline(always)]
5168 fn inline_size(_context: fidl::encoding::Context) -> usize {
5169 16
5170 }
5171 }
5172
5173 unsafe impl<D: fidl::encoding::ResourceDialect>
5174 fidl::encoding::Encode<RouteValidatorRouteResponse, D> for &RouteValidatorRouteResponse
5175 {
5176 #[inline]
5177 unsafe fn encode(
5178 self,
5179 encoder: &mut fidl::encoding::Encoder<'_, D>,
5180 offset: usize,
5181 _depth: fidl::encoding::Depth,
5182 ) -> fidl::Result<()> {
5183 encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5184 fidl::encoding::Encode::<RouteValidatorRouteResponse, D>::encode(
5186 (
5187 <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5188 ),
5189 encoder, offset, _depth
5190 )
5191 }
5192 }
5193 unsafe impl<
5194 D: fidl::encoding::ResourceDialect,
5195 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5196 > fidl::encoding::Encode<RouteValidatorRouteResponse, D> for (T0,)
5197 {
5198 #[inline]
5199 unsafe fn encode(
5200 self,
5201 encoder: &mut fidl::encoding::Encoder<'_, D>,
5202 offset: usize,
5203 depth: fidl::encoding::Depth,
5204 ) -> fidl::Result<()> {
5205 encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5206 self.0.encode(encoder, offset + 0, depth)?;
5210 Ok(())
5211 }
5212 }
5213
5214 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5215 for RouteValidatorRouteResponse
5216 {
5217 #[inline(always)]
5218 fn new_empty() -> Self {
5219 Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5220 }
5221
5222 #[inline]
5223 unsafe fn decode(
5224 &mut self,
5225 decoder: &mut fidl::encoding::Decoder<'_, D>,
5226 offset: usize,
5227 _depth: fidl::encoding::Depth,
5228 ) -> fidl::Result<()> {
5229 decoder.debug_check_bounds::<Self>(offset);
5230 fidl::decode!(
5232 fidl::encoding::UnboundedVector<RouteReport>,
5233 D,
5234 &mut self.reports,
5235 decoder,
5236 offset + 0,
5237 _depth
5238 )?;
5239 Ok(())
5240 }
5241 }
5242
5243 impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateResponse {
5244 type Borrowed<'a> = &'a Self;
5245 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5246 value
5247 }
5248 }
5249
5250 unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateResponse {
5251 type Owned = Self;
5252
5253 #[inline(always)]
5254 fn inline_align(_context: fidl::encoding::Context) -> usize {
5255 8
5256 }
5257
5258 #[inline(always)]
5259 fn inline_size(_context: fidl::encoding::Context) -> usize {
5260 16
5261 }
5262 }
5263
5264 unsafe impl<D: fidl::encoding::ResourceDialect>
5265 fidl::encoding::Encode<RouteValidatorValidateResponse, D>
5266 for &RouteValidatorValidateResponse
5267 {
5268 #[inline]
5269 unsafe fn encode(
5270 self,
5271 encoder: &mut fidl::encoding::Encoder<'_, D>,
5272 offset: usize,
5273 _depth: fidl::encoding::Depth,
5274 ) -> fidl::Result<()> {
5275 encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5276 fidl::encoding::Encode::<RouteValidatorValidateResponse, D>::encode(
5278 (
5279 <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5280 ),
5281 encoder, offset, _depth
5282 )
5283 }
5284 }
5285 unsafe impl<
5286 D: fidl::encoding::ResourceDialect,
5287 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5288 > fidl::encoding::Encode<RouteValidatorValidateResponse, D> for (T0,)
5289 {
5290 #[inline]
5291 unsafe fn encode(
5292 self,
5293 encoder: &mut fidl::encoding::Encoder<'_, D>,
5294 offset: usize,
5295 depth: fidl::encoding::Depth,
5296 ) -> fidl::Result<()> {
5297 encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5298 self.0.encode(encoder, offset + 0, depth)?;
5302 Ok(())
5303 }
5304 }
5305
5306 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5307 for RouteValidatorValidateResponse
5308 {
5309 #[inline(always)]
5310 fn new_empty() -> Self {
5311 Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5312 }
5313
5314 #[inline]
5315 unsafe fn decode(
5316 &mut self,
5317 decoder: &mut fidl::encoding::Decoder<'_, D>,
5318 offset: usize,
5319 _depth: fidl::encoding::Depth,
5320 ) -> fidl::Result<()> {
5321 decoder.debug_check_bounds::<Self>(offset);
5322 fidl::decode!(
5324 fidl::encoding::UnboundedVector<RouteReport>,
5325 D,
5326 &mut self.reports,
5327 decoder,
5328 offset + 0,
5329 _depth
5330 )?;
5331 Ok(())
5332 }
5333 }
5334
5335 impl fidl::encoding::ValueTypeMarker for StorageAdminDeleteComponentStorageRequest {
5336 type Borrowed<'a> = &'a Self;
5337 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5338 value
5339 }
5340 }
5341
5342 unsafe impl fidl::encoding::TypeMarker for StorageAdminDeleteComponentStorageRequest {
5343 type Owned = Self;
5344
5345 #[inline(always)]
5346 fn inline_align(_context: fidl::encoding::Context) -> usize {
5347 8
5348 }
5349
5350 #[inline(always)]
5351 fn inline_size(_context: fidl::encoding::Context) -> usize {
5352 16
5353 }
5354 }
5355
5356 unsafe impl<D: fidl::encoding::ResourceDialect>
5357 fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D>
5358 for &StorageAdminDeleteComponentStorageRequest
5359 {
5360 #[inline]
5361 unsafe fn encode(
5362 self,
5363 encoder: &mut fidl::encoding::Encoder<'_, D>,
5364 offset: usize,
5365 _depth: fidl::encoding::Depth,
5366 ) -> fidl::Result<()> {
5367 encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5368 fidl::encoding::Encode::<StorageAdminDeleteComponentStorageRequest, D>::encode(
5370 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5371 &self.relative_moniker,
5372 ),),
5373 encoder,
5374 offset,
5375 _depth,
5376 )
5377 }
5378 }
5379 unsafe impl<
5380 D: fidl::encoding::ResourceDialect,
5381 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5382 > fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D> for (T0,)
5383 {
5384 #[inline]
5385 unsafe fn encode(
5386 self,
5387 encoder: &mut fidl::encoding::Encoder<'_, D>,
5388 offset: usize,
5389 depth: fidl::encoding::Depth,
5390 ) -> fidl::Result<()> {
5391 encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5392 self.0.encode(encoder, offset + 0, depth)?;
5396 Ok(())
5397 }
5398 }
5399
5400 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5401 for StorageAdminDeleteComponentStorageRequest
5402 {
5403 #[inline(always)]
5404 fn new_empty() -> Self {
5405 Self { relative_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5406 }
5407
5408 #[inline]
5409 unsafe fn decode(
5410 &mut self,
5411 decoder: &mut fidl::encoding::Decoder<'_, D>,
5412 offset: usize,
5413 _depth: fidl::encoding::Depth,
5414 ) -> fidl::Result<()> {
5415 decoder.debug_check_bounds::<Self>(offset);
5416 fidl::decode!(
5418 fidl::encoding::BoundedString<4096>,
5419 D,
5420 &mut self.relative_moniker,
5421 decoder,
5422 offset + 0,
5423 _depth
5424 )?;
5425 Ok(())
5426 }
5427 }
5428
5429 impl fidl::encoding::ValueTypeMarker for StorageIteratorNextResponse {
5430 type Borrowed<'a> = &'a Self;
5431 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5432 value
5433 }
5434 }
5435
5436 unsafe impl fidl::encoding::TypeMarker for StorageIteratorNextResponse {
5437 type Owned = Self;
5438
5439 #[inline(always)]
5440 fn inline_align(_context: fidl::encoding::Context) -> usize {
5441 8
5442 }
5443
5444 #[inline(always)]
5445 fn inline_size(_context: fidl::encoding::Context) -> usize {
5446 16
5447 }
5448 }
5449
5450 unsafe impl<D: fidl::encoding::ResourceDialect>
5451 fidl::encoding::Encode<StorageIteratorNextResponse, D> for &StorageIteratorNextResponse
5452 {
5453 #[inline]
5454 unsafe fn encode(
5455 self,
5456 encoder: &mut fidl::encoding::Encoder<'_, D>,
5457 offset: usize,
5458 _depth: fidl::encoding::Depth,
5459 ) -> fidl::Result<()> {
5460 encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5461 fidl::encoding::Encode::<StorageIteratorNextResponse, D>::encode(
5463 (
5464 <fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_monikers),
5465 ),
5466 encoder, offset, _depth
5467 )
5468 }
5469 }
5470 unsafe impl<
5471 D: fidl::encoding::ResourceDialect,
5472 T0: fidl::encoding::Encode<
5473 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5474 D,
5475 >,
5476 > fidl::encoding::Encode<StorageIteratorNextResponse, D> for (T0,)
5477 {
5478 #[inline]
5479 unsafe fn encode(
5480 self,
5481 encoder: &mut fidl::encoding::Encoder<'_, D>,
5482 offset: usize,
5483 depth: fidl::encoding::Depth,
5484 ) -> fidl::Result<()> {
5485 encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5486 self.0.encode(encoder, offset + 0, depth)?;
5490 Ok(())
5491 }
5492 }
5493
5494 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5495 for StorageIteratorNextResponse
5496 {
5497 #[inline(always)]
5498 fn new_empty() -> Self {
5499 Self {
5500 relative_monikers: fidl::new_empty!(
5501 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5502 D
5503 ),
5504 }
5505 }
5506
5507 #[inline]
5508 unsafe fn decode(
5509 &mut self,
5510 decoder: &mut fidl::encoding::Decoder<'_, D>,
5511 offset: usize,
5512 _depth: fidl::encoding::Depth,
5513 ) -> fidl::Result<()> {
5514 decoder.debug_check_bounds::<Self>(offset);
5515 fidl::decode!(
5517 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5518 D,
5519 &mut self.relative_monikers,
5520 decoder,
5521 offset + 0,
5522 _depth
5523 )?;
5524 Ok(())
5525 }
5526 }
5527
5528 impl ComponentCrashInfo {
5529 #[inline(always)]
5530 fn max_ordinal_present(&self) -> u64 {
5531 if let Some(_) = self.moniker {
5532 return 2;
5533 }
5534 if let Some(_) = self.url {
5535 return 1;
5536 }
5537 0
5538 }
5539 }
5540
5541 impl fidl::encoding::ValueTypeMarker for ComponentCrashInfo {
5542 type Borrowed<'a> = &'a Self;
5543 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5544 value
5545 }
5546 }
5547
5548 unsafe impl fidl::encoding::TypeMarker for ComponentCrashInfo {
5549 type Owned = Self;
5550
5551 #[inline(always)]
5552 fn inline_align(_context: fidl::encoding::Context) -> usize {
5553 8
5554 }
5555
5556 #[inline(always)]
5557 fn inline_size(_context: fidl::encoding::Context) -> usize {
5558 16
5559 }
5560 }
5561
5562 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ComponentCrashInfo, D>
5563 for &ComponentCrashInfo
5564 {
5565 unsafe fn encode(
5566 self,
5567 encoder: &mut fidl::encoding::Encoder<'_, D>,
5568 offset: usize,
5569 mut depth: fidl::encoding::Depth,
5570 ) -> fidl::Result<()> {
5571 encoder.debug_check_bounds::<ComponentCrashInfo>(offset);
5572 let max_ordinal: u64 = self.max_ordinal_present();
5574 encoder.write_num(max_ordinal, offset);
5575 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5576 if max_ordinal == 0 {
5578 return Ok(());
5579 }
5580 depth.increment()?;
5581 let envelope_size = 8;
5582 let bytes_len = max_ordinal as usize * envelope_size;
5583 #[allow(unused_variables)]
5584 let offset = encoder.out_of_line_offset(bytes_len);
5585 let mut _prev_end_offset: usize = 0;
5586 if 1 > max_ordinal {
5587 return Ok(());
5588 }
5589
5590 let cur_offset: usize = (1 - 1) * envelope_size;
5593
5594 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5596
5597 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5602 self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5603 encoder, offset + cur_offset, depth
5604 )?;
5605
5606 _prev_end_offset = cur_offset + envelope_size;
5607 if 2 > max_ordinal {
5608 return Ok(());
5609 }
5610
5611 let cur_offset: usize = (2 - 1) * envelope_size;
5614
5615 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5617
5618 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5623 self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5624 encoder, offset + cur_offset, depth
5625 )?;
5626
5627 _prev_end_offset = cur_offset + envelope_size;
5628
5629 Ok(())
5630 }
5631 }
5632
5633 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ComponentCrashInfo {
5634 #[inline(always)]
5635 fn new_empty() -> Self {
5636 Self::default()
5637 }
5638
5639 unsafe fn decode(
5640 &mut self,
5641 decoder: &mut fidl::encoding::Decoder<'_, D>,
5642 offset: usize,
5643 mut depth: fidl::encoding::Depth,
5644 ) -> fidl::Result<()> {
5645 decoder.debug_check_bounds::<Self>(offset);
5646 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5647 None => return Err(fidl::Error::NotNullable),
5648 Some(len) => len,
5649 };
5650 if len == 0 {
5652 return Ok(());
5653 };
5654 depth.increment()?;
5655 let envelope_size = 8;
5656 let bytes_len = len * envelope_size;
5657 let offset = decoder.out_of_line_offset(bytes_len)?;
5658 let mut _next_ordinal_to_read = 0;
5660 let mut next_offset = offset;
5661 let end_offset = offset + bytes_len;
5662 _next_ordinal_to_read += 1;
5663 if next_offset >= end_offset {
5664 return Ok(());
5665 }
5666
5667 while _next_ordinal_to_read < 1 {
5669 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5670 _next_ordinal_to_read += 1;
5671 next_offset += envelope_size;
5672 }
5673
5674 let next_out_of_line = decoder.next_out_of_line();
5675 let handles_before = decoder.remaining_handles();
5676 if let Some((inlined, num_bytes, num_handles)) =
5677 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5678 {
5679 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5680 if inlined != (member_inline_size <= 4) {
5681 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5682 }
5683 let inner_offset;
5684 let mut inner_depth = depth.clone();
5685 if inlined {
5686 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5687 inner_offset = next_offset;
5688 } else {
5689 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5690 inner_depth.increment()?;
5691 }
5692 let val_ref = self.url.get_or_insert_with(|| {
5693 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5694 });
5695 fidl::decode!(
5696 fidl::encoding::BoundedString<4096>,
5697 D,
5698 val_ref,
5699 decoder,
5700 inner_offset,
5701 inner_depth
5702 )?;
5703 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5704 {
5705 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5706 }
5707 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5708 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5709 }
5710 }
5711
5712 next_offset += envelope_size;
5713 _next_ordinal_to_read += 1;
5714 if next_offset >= end_offset {
5715 return Ok(());
5716 }
5717
5718 while _next_ordinal_to_read < 2 {
5720 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5721 _next_ordinal_to_read += 1;
5722 next_offset += envelope_size;
5723 }
5724
5725 let next_out_of_line = decoder.next_out_of_line();
5726 let handles_before = decoder.remaining_handles();
5727 if let Some((inlined, num_bytes, num_handles)) =
5728 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5729 {
5730 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5731 if inlined != (member_inline_size <= 4) {
5732 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5733 }
5734 let inner_offset;
5735 let mut inner_depth = depth.clone();
5736 if inlined {
5737 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5738 inner_offset = next_offset;
5739 } else {
5740 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5741 inner_depth.increment()?;
5742 }
5743 let val_ref = self.moniker.get_or_insert_with(|| {
5744 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5745 });
5746 fidl::decode!(
5747 fidl::encoding::BoundedString<4096>,
5748 D,
5749 val_ref,
5750 decoder,
5751 inner_offset,
5752 inner_depth
5753 )?;
5754 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5755 {
5756 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5757 }
5758 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5759 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5760 }
5761 }
5762
5763 next_offset += envelope_size;
5764
5765 while next_offset < end_offset {
5767 _next_ordinal_to_read += 1;
5768 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5769 next_offset += envelope_size;
5770 }
5771
5772 Ok(())
5773 }
5774 }
5775
5776 impl DictionaryEntry {
5777 #[inline(always)]
5778 fn max_ordinal_present(&self) -> u64 {
5779 if let Some(_) = self.name {
5780 return 1;
5781 }
5782 0
5783 }
5784 }
5785
5786 impl fidl::encoding::ValueTypeMarker for DictionaryEntry {
5787 type Borrowed<'a> = &'a Self;
5788 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5789 value
5790 }
5791 }
5792
5793 unsafe impl fidl::encoding::TypeMarker for DictionaryEntry {
5794 type Owned = Self;
5795
5796 #[inline(always)]
5797 fn inline_align(_context: fidl::encoding::Context) -> usize {
5798 8
5799 }
5800
5801 #[inline(always)]
5802 fn inline_size(_context: fidl::encoding::Context) -> usize {
5803 16
5804 }
5805 }
5806
5807 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DictionaryEntry, D>
5808 for &DictionaryEntry
5809 {
5810 unsafe fn encode(
5811 self,
5812 encoder: &mut fidl::encoding::Encoder<'_, D>,
5813 offset: usize,
5814 mut depth: fidl::encoding::Depth,
5815 ) -> fidl::Result<()> {
5816 encoder.debug_check_bounds::<DictionaryEntry>(offset);
5817 let max_ordinal: u64 = self.max_ordinal_present();
5819 encoder.write_num(max_ordinal, offset);
5820 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5821 if max_ordinal == 0 {
5823 return Ok(());
5824 }
5825 depth.increment()?;
5826 let envelope_size = 8;
5827 let bytes_len = max_ordinal as usize * envelope_size;
5828 #[allow(unused_variables)]
5829 let offset = encoder.out_of_line_offset(bytes_len);
5830 let mut _prev_end_offset: usize = 0;
5831 if 1 > max_ordinal {
5832 return Ok(());
5833 }
5834
5835 let cur_offset: usize = (1 - 1) * envelope_size;
5838
5839 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5841
5842 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
5847 self.name.as_ref().map(
5848 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
5849 ),
5850 encoder,
5851 offset + cur_offset,
5852 depth,
5853 )?;
5854
5855 _prev_end_offset = cur_offset + envelope_size;
5856
5857 Ok(())
5858 }
5859 }
5860
5861 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DictionaryEntry {
5862 #[inline(always)]
5863 fn new_empty() -> Self {
5864 Self::default()
5865 }
5866
5867 unsafe fn decode(
5868 &mut self,
5869 decoder: &mut fidl::encoding::Decoder<'_, D>,
5870 offset: usize,
5871 mut depth: fidl::encoding::Depth,
5872 ) -> fidl::Result<()> {
5873 decoder.debug_check_bounds::<Self>(offset);
5874 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5875 None => return Err(fidl::Error::NotNullable),
5876 Some(len) => len,
5877 };
5878 if len == 0 {
5880 return Ok(());
5881 };
5882 depth.increment()?;
5883 let envelope_size = 8;
5884 let bytes_len = len * envelope_size;
5885 let offset = decoder.out_of_line_offset(bytes_len)?;
5886 let mut _next_ordinal_to_read = 0;
5888 let mut next_offset = offset;
5889 let end_offset = offset + bytes_len;
5890 _next_ordinal_to_read += 1;
5891 if next_offset >= end_offset {
5892 return Ok(());
5893 }
5894
5895 while _next_ordinal_to_read < 1 {
5897 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5898 _next_ordinal_to_read += 1;
5899 next_offset += envelope_size;
5900 }
5901
5902 let next_out_of_line = decoder.next_out_of_line();
5903 let handles_before = decoder.remaining_handles();
5904 if let Some((inlined, num_bytes, num_handles)) =
5905 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5906 {
5907 let member_inline_size =
5908 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5909 decoder.context,
5910 );
5911 if inlined != (member_inline_size <= 4) {
5912 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5913 }
5914 let inner_offset;
5915 let mut inner_depth = depth.clone();
5916 if inlined {
5917 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5918 inner_offset = next_offset;
5919 } else {
5920 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5921 inner_depth.increment()?;
5922 }
5923 let val_ref = self
5924 .name
5925 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
5926 fidl::decode!(
5927 fidl::encoding::UnboundedString,
5928 D,
5929 val_ref,
5930 decoder,
5931 inner_offset,
5932 inner_depth
5933 )?;
5934 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5935 {
5936 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5937 }
5938 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5939 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5940 }
5941 }
5942
5943 next_offset += envelope_size;
5944
5945 while next_offset < end_offset {
5947 _next_ordinal_to_read += 1;
5948 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5949 next_offset += envelope_size;
5950 }
5951
5952 Ok(())
5953 }
5954 }
5955
5956 impl ExecutionInfo {
5957 #[inline(always)]
5958 fn max_ordinal_present(&self) -> u64 {
5959 if let Some(_) = self.start_reason {
5960 return 1;
5961 }
5962 0
5963 }
5964 }
5965
5966 impl fidl::encoding::ValueTypeMarker for ExecutionInfo {
5967 type Borrowed<'a> = &'a Self;
5968 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5969 value
5970 }
5971 }
5972
5973 unsafe impl fidl::encoding::TypeMarker for ExecutionInfo {
5974 type Owned = Self;
5975
5976 #[inline(always)]
5977 fn inline_align(_context: fidl::encoding::Context) -> usize {
5978 8
5979 }
5980
5981 #[inline(always)]
5982 fn inline_size(_context: fidl::encoding::Context) -> usize {
5983 16
5984 }
5985 }
5986
5987 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ExecutionInfo, D>
5988 for &ExecutionInfo
5989 {
5990 unsafe fn encode(
5991 self,
5992 encoder: &mut fidl::encoding::Encoder<'_, D>,
5993 offset: usize,
5994 mut depth: fidl::encoding::Depth,
5995 ) -> fidl::Result<()> {
5996 encoder.debug_check_bounds::<ExecutionInfo>(offset);
5997 let max_ordinal: u64 = self.max_ordinal_present();
5999 encoder.write_num(max_ordinal, offset);
6000 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6001 if max_ordinal == 0 {
6003 return Ok(());
6004 }
6005 depth.increment()?;
6006 let envelope_size = 8;
6007 let bytes_len = max_ordinal as usize * envelope_size;
6008 #[allow(unused_variables)]
6009 let offset = encoder.out_of_line_offset(bytes_len);
6010 let mut _prev_end_offset: usize = 0;
6011 if 1 > max_ordinal {
6012 return Ok(());
6013 }
6014
6015 let cur_offset: usize = (1 - 1) * envelope_size;
6018
6019 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6021
6022 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<5000>, D>(
6027 self.start_reason.as_ref().map(<fidl::encoding::BoundedString<5000> as fidl::encoding::ValueTypeMarker>::borrow),
6028 encoder, offset + cur_offset, depth
6029 )?;
6030
6031 _prev_end_offset = cur_offset + envelope_size;
6032
6033 Ok(())
6034 }
6035 }
6036
6037 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExecutionInfo {
6038 #[inline(always)]
6039 fn new_empty() -> Self {
6040 Self::default()
6041 }
6042
6043 unsafe fn decode(
6044 &mut self,
6045 decoder: &mut fidl::encoding::Decoder<'_, D>,
6046 offset: usize,
6047 mut depth: fidl::encoding::Depth,
6048 ) -> fidl::Result<()> {
6049 decoder.debug_check_bounds::<Self>(offset);
6050 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6051 None => return Err(fidl::Error::NotNullable),
6052 Some(len) => len,
6053 };
6054 if len == 0 {
6056 return Ok(());
6057 };
6058 depth.increment()?;
6059 let envelope_size = 8;
6060 let bytes_len = len * envelope_size;
6061 let offset = decoder.out_of_line_offset(bytes_len)?;
6062 let mut _next_ordinal_to_read = 0;
6064 let mut next_offset = offset;
6065 let end_offset = offset + bytes_len;
6066 _next_ordinal_to_read += 1;
6067 if next_offset >= end_offset {
6068 return Ok(());
6069 }
6070
6071 while _next_ordinal_to_read < 1 {
6073 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6074 _next_ordinal_to_read += 1;
6075 next_offset += envelope_size;
6076 }
6077
6078 let next_out_of_line = decoder.next_out_of_line();
6079 let handles_before = decoder.remaining_handles();
6080 if let Some((inlined, num_bytes, num_handles)) =
6081 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6082 {
6083 let member_inline_size = <fidl::encoding::BoundedString<5000> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6084 if inlined != (member_inline_size <= 4) {
6085 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6086 }
6087 let inner_offset;
6088 let mut inner_depth = depth.clone();
6089 if inlined {
6090 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6091 inner_offset = next_offset;
6092 } else {
6093 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6094 inner_depth.increment()?;
6095 }
6096 let val_ref = self.start_reason.get_or_insert_with(|| {
6097 fidl::new_empty!(fidl::encoding::BoundedString<5000>, D)
6098 });
6099 fidl::decode!(
6100 fidl::encoding::BoundedString<5000>,
6101 D,
6102 val_ref,
6103 decoder,
6104 inner_offset,
6105 inner_depth
6106 )?;
6107 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6108 {
6109 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6110 }
6111 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6112 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6113 }
6114 }
6115
6116 next_offset += envelope_size;
6117
6118 while next_offset < end_offset {
6120 _next_ordinal_to_read += 1;
6121 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6122 next_offset += envelope_size;
6123 }
6124
6125 Ok(())
6126 }
6127 }
6128
6129 impl Instance {
6130 #[inline(always)]
6131 fn max_ordinal_present(&self) -> u64 {
6132 if let Some(_) = self.environment {
6133 return 5;
6134 }
6135 if let Some(_) = self.resolved_info {
6136 return 4;
6137 }
6138 if let Some(_) = self.instance_id {
6139 return 3;
6140 }
6141 if let Some(_) = self.url {
6142 return 2;
6143 }
6144 if let Some(_) = self.moniker {
6145 return 1;
6146 }
6147 0
6148 }
6149 }
6150
6151 impl fidl::encoding::ValueTypeMarker for Instance {
6152 type Borrowed<'a> = &'a Self;
6153 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6154 value
6155 }
6156 }
6157
6158 unsafe impl fidl::encoding::TypeMarker for Instance {
6159 type Owned = Self;
6160
6161 #[inline(always)]
6162 fn inline_align(_context: fidl::encoding::Context) -> usize {
6163 8
6164 }
6165
6166 #[inline(always)]
6167 fn inline_size(_context: fidl::encoding::Context) -> usize {
6168 16
6169 }
6170 }
6171
6172 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Instance, D> for &Instance {
6173 unsafe fn encode(
6174 self,
6175 encoder: &mut fidl::encoding::Encoder<'_, D>,
6176 offset: usize,
6177 mut depth: fidl::encoding::Depth,
6178 ) -> fidl::Result<()> {
6179 encoder.debug_check_bounds::<Instance>(offset);
6180 let max_ordinal: u64 = self.max_ordinal_present();
6182 encoder.write_num(max_ordinal, offset);
6183 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6184 if max_ordinal == 0 {
6186 return Ok(());
6187 }
6188 depth.increment()?;
6189 let envelope_size = 8;
6190 let bytes_len = max_ordinal as usize * envelope_size;
6191 #[allow(unused_variables)]
6192 let offset = encoder.out_of_line_offset(bytes_len);
6193 let mut _prev_end_offset: usize = 0;
6194 if 1 > max_ordinal {
6195 return Ok(());
6196 }
6197
6198 let cur_offset: usize = (1 - 1) * envelope_size;
6201
6202 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6204
6205 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6210 self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6211 encoder, offset + cur_offset, depth
6212 )?;
6213
6214 _prev_end_offset = cur_offset + envelope_size;
6215 if 2 > max_ordinal {
6216 return Ok(());
6217 }
6218
6219 let cur_offset: usize = (2 - 1) * envelope_size;
6222
6223 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6225
6226 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6231 self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6232 encoder, offset + cur_offset, depth
6233 )?;
6234
6235 _prev_end_offset = cur_offset + envelope_size;
6236 if 3 > max_ordinal {
6237 return Ok(());
6238 }
6239
6240 let cur_offset: usize = (3 - 1) * envelope_size;
6243
6244 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6246
6247 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<64>, D>(
6252 self.instance_id.as_ref().map(
6253 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow,
6254 ),
6255 encoder,
6256 offset + cur_offset,
6257 depth,
6258 )?;
6259
6260 _prev_end_offset = cur_offset + envelope_size;
6261 if 4 > max_ordinal {
6262 return Ok(());
6263 }
6264
6265 let cur_offset: usize = (4 - 1) * envelope_size;
6268
6269 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6271
6272 fidl::encoding::encode_in_envelope_optional::<ResolvedInfo, D>(
6277 self.resolved_info
6278 .as_ref()
6279 .map(<ResolvedInfo as fidl::encoding::ValueTypeMarker>::borrow),
6280 encoder,
6281 offset + cur_offset,
6282 depth,
6283 )?;
6284
6285 _prev_end_offset = cur_offset + envelope_size;
6286 if 5 > max_ordinal {
6287 return Ok(());
6288 }
6289
6290 let cur_offset: usize = (5 - 1) * envelope_size;
6293
6294 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6296
6297 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6302 self.environment.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6303 encoder, offset + cur_offset, depth
6304 )?;
6305
6306 _prev_end_offset = cur_offset + envelope_size;
6307
6308 Ok(())
6309 }
6310 }
6311
6312 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Instance {
6313 #[inline(always)]
6314 fn new_empty() -> Self {
6315 Self::default()
6316 }
6317
6318 unsafe fn decode(
6319 &mut self,
6320 decoder: &mut fidl::encoding::Decoder<'_, D>,
6321 offset: usize,
6322 mut depth: fidl::encoding::Depth,
6323 ) -> fidl::Result<()> {
6324 decoder.debug_check_bounds::<Self>(offset);
6325 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6326 None => return Err(fidl::Error::NotNullable),
6327 Some(len) => len,
6328 };
6329 if len == 0 {
6331 return Ok(());
6332 };
6333 depth.increment()?;
6334 let envelope_size = 8;
6335 let bytes_len = len * envelope_size;
6336 let offset = decoder.out_of_line_offset(bytes_len)?;
6337 let mut _next_ordinal_to_read = 0;
6339 let mut next_offset = offset;
6340 let end_offset = offset + bytes_len;
6341 _next_ordinal_to_read += 1;
6342 if next_offset >= end_offset {
6343 return Ok(());
6344 }
6345
6346 while _next_ordinal_to_read < 1 {
6348 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6349 _next_ordinal_to_read += 1;
6350 next_offset += envelope_size;
6351 }
6352
6353 let next_out_of_line = decoder.next_out_of_line();
6354 let handles_before = decoder.remaining_handles();
6355 if let Some((inlined, num_bytes, num_handles)) =
6356 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6357 {
6358 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6359 if inlined != (member_inline_size <= 4) {
6360 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6361 }
6362 let inner_offset;
6363 let mut inner_depth = depth.clone();
6364 if inlined {
6365 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6366 inner_offset = next_offset;
6367 } else {
6368 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6369 inner_depth.increment()?;
6370 }
6371 let val_ref = self.moniker.get_or_insert_with(|| {
6372 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6373 });
6374 fidl::decode!(
6375 fidl::encoding::BoundedString<4096>,
6376 D,
6377 val_ref,
6378 decoder,
6379 inner_offset,
6380 inner_depth
6381 )?;
6382 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6383 {
6384 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6385 }
6386 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6387 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6388 }
6389 }
6390
6391 next_offset += envelope_size;
6392 _next_ordinal_to_read += 1;
6393 if next_offset >= end_offset {
6394 return Ok(());
6395 }
6396
6397 while _next_ordinal_to_read < 2 {
6399 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6400 _next_ordinal_to_read += 1;
6401 next_offset += envelope_size;
6402 }
6403
6404 let next_out_of_line = decoder.next_out_of_line();
6405 let handles_before = decoder.remaining_handles();
6406 if let Some((inlined, num_bytes, num_handles)) =
6407 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6408 {
6409 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6410 if inlined != (member_inline_size <= 4) {
6411 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6412 }
6413 let inner_offset;
6414 let mut inner_depth = depth.clone();
6415 if inlined {
6416 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6417 inner_offset = next_offset;
6418 } else {
6419 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6420 inner_depth.increment()?;
6421 }
6422 let val_ref = self.url.get_or_insert_with(|| {
6423 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6424 });
6425 fidl::decode!(
6426 fidl::encoding::BoundedString<4096>,
6427 D,
6428 val_ref,
6429 decoder,
6430 inner_offset,
6431 inner_depth
6432 )?;
6433 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6434 {
6435 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6436 }
6437 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6438 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6439 }
6440 }
6441
6442 next_offset += envelope_size;
6443 _next_ordinal_to_read += 1;
6444 if next_offset >= end_offset {
6445 return Ok(());
6446 }
6447
6448 while _next_ordinal_to_read < 3 {
6450 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6451 _next_ordinal_to_read += 1;
6452 next_offset += envelope_size;
6453 }
6454
6455 let next_out_of_line = decoder.next_out_of_line();
6456 let handles_before = decoder.remaining_handles();
6457 if let Some((inlined, num_bytes, num_handles)) =
6458 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6459 {
6460 let member_inline_size =
6461 <fidl::encoding::BoundedString<64> as fidl::encoding::TypeMarker>::inline_size(
6462 decoder.context,
6463 );
6464 if inlined != (member_inline_size <= 4) {
6465 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6466 }
6467 let inner_offset;
6468 let mut inner_depth = depth.clone();
6469 if inlined {
6470 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6471 inner_offset = next_offset;
6472 } else {
6473 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6474 inner_depth.increment()?;
6475 }
6476 let val_ref = self
6477 .instance_id
6478 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<64>, D));
6479 fidl::decode!(
6480 fidl::encoding::BoundedString<64>,
6481 D,
6482 val_ref,
6483 decoder,
6484 inner_offset,
6485 inner_depth
6486 )?;
6487 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6488 {
6489 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6490 }
6491 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6492 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6493 }
6494 }
6495
6496 next_offset += envelope_size;
6497 _next_ordinal_to_read += 1;
6498 if next_offset >= end_offset {
6499 return Ok(());
6500 }
6501
6502 while _next_ordinal_to_read < 4 {
6504 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6505 _next_ordinal_to_read += 1;
6506 next_offset += envelope_size;
6507 }
6508
6509 let next_out_of_line = decoder.next_out_of_line();
6510 let handles_before = decoder.remaining_handles();
6511 if let Some((inlined, num_bytes, num_handles)) =
6512 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6513 {
6514 let member_inline_size =
6515 <ResolvedInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6516 if inlined != (member_inline_size <= 4) {
6517 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6518 }
6519 let inner_offset;
6520 let mut inner_depth = depth.clone();
6521 if inlined {
6522 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6523 inner_offset = next_offset;
6524 } else {
6525 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6526 inner_depth.increment()?;
6527 }
6528 let val_ref =
6529 self.resolved_info.get_or_insert_with(|| fidl::new_empty!(ResolvedInfo, D));
6530 fidl::decode!(ResolvedInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6531 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6532 {
6533 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6534 }
6535 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6536 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6537 }
6538 }
6539
6540 next_offset += envelope_size;
6541 _next_ordinal_to_read += 1;
6542 if next_offset >= end_offset {
6543 return Ok(());
6544 }
6545
6546 while _next_ordinal_to_read < 5 {
6548 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6549 _next_ordinal_to_read += 1;
6550 next_offset += envelope_size;
6551 }
6552
6553 let next_out_of_line = decoder.next_out_of_line();
6554 let handles_before = decoder.remaining_handles();
6555 if let Some((inlined, num_bytes, num_handles)) =
6556 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6557 {
6558 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6559 if inlined != (member_inline_size <= 4) {
6560 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6561 }
6562 let inner_offset;
6563 let mut inner_depth = depth.clone();
6564 if inlined {
6565 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6566 inner_offset = next_offset;
6567 } else {
6568 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6569 inner_depth.increment()?;
6570 }
6571 let val_ref = self.environment.get_or_insert_with(|| {
6572 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6573 });
6574 fidl::decode!(
6575 fidl::encoding::BoundedString<4096>,
6576 D,
6577 val_ref,
6578 decoder,
6579 inner_offset,
6580 inner_depth
6581 )?;
6582 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6583 {
6584 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6585 }
6586 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6587 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6588 }
6589 }
6590
6591 next_offset += envelope_size;
6592
6593 while next_offset < end_offset {
6595 _next_ordinal_to_read += 1;
6596 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6597 next_offset += envelope_size;
6598 }
6599
6600 Ok(())
6601 }
6602 }
6603
6604 impl ResolvedInfo {
6605 #[inline(always)]
6606 fn max_ordinal_present(&self) -> u64 {
6607 if let Some(_) = self.execution_info {
6608 return 2;
6609 }
6610 if let Some(_) = self.resolved_url {
6611 return 1;
6612 }
6613 0
6614 }
6615 }
6616
6617 impl fidl::encoding::ValueTypeMarker for ResolvedInfo {
6618 type Borrowed<'a> = &'a Self;
6619 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6620 value
6621 }
6622 }
6623
6624 unsafe impl fidl::encoding::TypeMarker for ResolvedInfo {
6625 type Owned = Self;
6626
6627 #[inline(always)]
6628 fn inline_align(_context: fidl::encoding::Context) -> usize {
6629 8
6630 }
6631
6632 #[inline(always)]
6633 fn inline_size(_context: fidl::encoding::Context) -> usize {
6634 16
6635 }
6636 }
6637
6638 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResolvedInfo, D>
6639 for &ResolvedInfo
6640 {
6641 unsafe fn encode(
6642 self,
6643 encoder: &mut fidl::encoding::Encoder<'_, D>,
6644 offset: usize,
6645 mut depth: fidl::encoding::Depth,
6646 ) -> fidl::Result<()> {
6647 encoder.debug_check_bounds::<ResolvedInfo>(offset);
6648 let max_ordinal: u64 = self.max_ordinal_present();
6650 encoder.write_num(max_ordinal, offset);
6651 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6652 if max_ordinal == 0 {
6654 return Ok(());
6655 }
6656 depth.increment()?;
6657 let envelope_size = 8;
6658 let bytes_len = max_ordinal as usize * envelope_size;
6659 #[allow(unused_variables)]
6660 let offset = encoder.out_of_line_offset(bytes_len);
6661 let mut _prev_end_offset: usize = 0;
6662 if 1 > max_ordinal {
6663 return Ok(());
6664 }
6665
6666 let cur_offset: usize = (1 - 1) * envelope_size;
6669
6670 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6672
6673 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6678 self.resolved_url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6679 encoder, offset + cur_offset, depth
6680 )?;
6681
6682 _prev_end_offset = cur_offset + envelope_size;
6683 if 2 > max_ordinal {
6684 return Ok(());
6685 }
6686
6687 let cur_offset: usize = (2 - 1) * envelope_size;
6690
6691 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6693
6694 fidl::encoding::encode_in_envelope_optional::<ExecutionInfo, D>(
6699 self.execution_info
6700 .as_ref()
6701 .map(<ExecutionInfo as fidl::encoding::ValueTypeMarker>::borrow),
6702 encoder,
6703 offset + cur_offset,
6704 depth,
6705 )?;
6706
6707 _prev_end_offset = cur_offset + envelope_size;
6708
6709 Ok(())
6710 }
6711 }
6712
6713 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolvedInfo {
6714 #[inline(always)]
6715 fn new_empty() -> Self {
6716 Self::default()
6717 }
6718
6719 unsafe fn decode(
6720 &mut self,
6721 decoder: &mut fidl::encoding::Decoder<'_, D>,
6722 offset: usize,
6723 mut depth: fidl::encoding::Depth,
6724 ) -> fidl::Result<()> {
6725 decoder.debug_check_bounds::<Self>(offset);
6726 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6727 None => return Err(fidl::Error::NotNullable),
6728 Some(len) => len,
6729 };
6730 if len == 0 {
6732 return Ok(());
6733 };
6734 depth.increment()?;
6735 let envelope_size = 8;
6736 let bytes_len = len * envelope_size;
6737 let offset = decoder.out_of_line_offset(bytes_len)?;
6738 let mut _next_ordinal_to_read = 0;
6740 let mut next_offset = offset;
6741 let end_offset = offset + bytes_len;
6742 _next_ordinal_to_read += 1;
6743 if next_offset >= end_offset {
6744 return Ok(());
6745 }
6746
6747 while _next_ordinal_to_read < 1 {
6749 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6750 _next_ordinal_to_read += 1;
6751 next_offset += envelope_size;
6752 }
6753
6754 let next_out_of_line = decoder.next_out_of_line();
6755 let handles_before = decoder.remaining_handles();
6756 if let Some((inlined, num_bytes, num_handles)) =
6757 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6758 {
6759 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6760 if inlined != (member_inline_size <= 4) {
6761 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6762 }
6763 let inner_offset;
6764 let mut inner_depth = depth.clone();
6765 if inlined {
6766 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6767 inner_offset = next_offset;
6768 } else {
6769 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6770 inner_depth.increment()?;
6771 }
6772 let val_ref = self.resolved_url.get_or_insert_with(|| {
6773 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6774 });
6775 fidl::decode!(
6776 fidl::encoding::BoundedString<4096>,
6777 D,
6778 val_ref,
6779 decoder,
6780 inner_offset,
6781 inner_depth
6782 )?;
6783 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6784 {
6785 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6786 }
6787 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6788 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6789 }
6790 }
6791
6792 next_offset += envelope_size;
6793 _next_ordinal_to_read += 1;
6794 if next_offset >= end_offset {
6795 return Ok(());
6796 }
6797
6798 while _next_ordinal_to_read < 2 {
6800 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6801 _next_ordinal_to_read += 1;
6802 next_offset += envelope_size;
6803 }
6804
6805 let next_out_of_line = decoder.next_out_of_line();
6806 let handles_before = decoder.remaining_handles();
6807 if let Some((inlined, num_bytes, num_handles)) =
6808 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6809 {
6810 let member_inline_size =
6811 <ExecutionInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6812 if inlined != (member_inline_size <= 4) {
6813 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6814 }
6815 let inner_offset;
6816 let mut inner_depth = depth.clone();
6817 if inlined {
6818 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6819 inner_offset = next_offset;
6820 } else {
6821 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6822 inner_depth.increment()?;
6823 }
6824 let val_ref =
6825 self.execution_info.get_or_insert_with(|| fidl::new_empty!(ExecutionInfo, D));
6826 fidl::decode!(ExecutionInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6827 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6828 {
6829 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6830 }
6831 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6832 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6833 }
6834 }
6835
6836 next_offset += envelope_size;
6837
6838 while next_offset < end_offset {
6840 _next_ordinal_to_read += 1;
6841 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6842 next_offset += envelope_size;
6843 }
6844
6845 Ok(())
6846 }
6847 }
6848
6849 impl RouteError {
6850 #[inline(always)]
6851 fn max_ordinal_present(&self) -> u64 {
6852 if let Some(_) = self.summary {
6853 return 1;
6854 }
6855 0
6856 }
6857 }
6858
6859 impl fidl::encoding::ValueTypeMarker for RouteError {
6860 type Borrowed<'a> = &'a Self;
6861 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6862 value
6863 }
6864 }
6865
6866 unsafe impl fidl::encoding::TypeMarker for RouteError {
6867 type Owned = Self;
6868
6869 #[inline(always)]
6870 fn inline_align(_context: fidl::encoding::Context) -> usize {
6871 8
6872 }
6873
6874 #[inline(always)]
6875 fn inline_size(_context: fidl::encoding::Context) -> usize {
6876 16
6877 }
6878 }
6879
6880 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteError, D>
6881 for &RouteError
6882 {
6883 unsafe fn encode(
6884 self,
6885 encoder: &mut fidl::encoding::Encoder<'_, D>,
6886 offset: usize,
6887 mut depth: fidl::encoding::Depth,
6888 ) -> fidl::Result<()> {
6889 encoder.debug_check_bounds::<RouteError>(offset);
6890 let max_ordinal: u64 = self.max_ordinal_present();
6892 encoder.write_num(max_ordinal, offset);
6893 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6894 if max_ordinal == 0 {
6896 return Ok(());
6897 }
6898 depth.increment()?;
6899 let envelope_size = 8;
6900 let bytes_len = max_ordinal as usize * envelope_size;
6901 #[allow(unused_variables)]
6902 let offset = encoder.out_of_line_offset(bytes_len);
6903 let mut _prev_end_offset: usize = 0;
6904 if 1 > max_ordinal {
6905 return Ok(());
6906 }
6907
6908 let cur_offset: usize = (1 - 1) * envelope_size;
6911
6912 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6914
6915 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
6920 self.summary.as_ref().map(
6921 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
6922 ),
6923 encoder,
6924 offset + cur_offset,
6925 depth,
6926 )?;
6927
6928 _prev_end_offset = cur_offset + envelope_size;
6929
6930 Ok(())
6931 }
6932 }
6933
6934 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteError {
6935 #[inline(always)]
6936 fn new_empty() -> Self {
6937 Self::default()
6938 }
6939
6940 unsafe fn decode(
6941 &mut self,
6942 decoder: &mut fidl::encoding::Decoder<'_, D>,
6943 offset: usize,
6944 mut depth: fidl::encoding::Depth,
6945 ) -> fidl::Result<()> {
6946 decoder.debug_check_bounds::<Self>(offset);
6947 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6948 None => return Err(fidl::Error::NotNullable),
6949 Some(len) => len,
6950 };
6951 if len == 0 {
6953 return Ok(());
6954 };
6955 depth.increment()?;
6956 let envelope_size = 8;
6957 let bytes_len = len * envelope_size;
6958 let offset = decoder.out_of_line_offset(bytes_len)?;
6959 let mut _next_ordinal_to_read = 0;
6961 let mut next_offset = offset;
6962 let end_offset = offset + bytes_len;
6963 _next_ordinal_to_read += 1;
6964 if next_offset >= end_offset {
6965 return Ok(());
6966 }
6967
6968 while _next_ordinal_to_read < 1 {
6970 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6971 _next_ordinal_to_read += 1;
6972 next_offset += envelope_size;
6973 }
6974
6975 let next_out_of_line = decoder.next_out_of_line();
6976 let handles_before = decoder.remaining_handles();
6977 if let Some((inlined, num_bytes, num_handles)) =
6978 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6979 {
6980 let member_inline_size =
6981 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
6982 decoder.context,
6983 );
6984 if inlined != (member_inline_size <= 4) {
6985 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6986 }
6987 let inner_offset;
6988 let mut inner_depth = depth.clone();
6989 if inlined {
6990 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6991 inner_offset = next_offset;
6992 } else {
6993 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6994 inner_depth.increment()?;
6995 }
6996 let val_ref = self
6997 .summary
6998 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
6999 fidl::decode!(
7000 fidl::encoding::UnboundedString,
7001 D,
7002 val_ref,
7003 decoder,
7004 inner_offset,
7005 inner_depth
7006 )?;
7007 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7008 {
7009 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7010 }
7011 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7012 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7013 }
7014 }
7015
7016 next_offset += envelope_size;
7017
7018 while next_offset < end_offset {
7020 _next_ordinal_to_read += 1;
7021 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7022 next_offset += envelope_size;
7023 }
7024
7025 Ok(())
7026 }
7027 }
7028
7029 impl RouteReport {
7030 #[inline(always)]
7031 fn max_ordinal_present(&self) -> u64 {
7032 if let Some(_) = self.dictionary_entries {
7033 return 8;
7034 }
7035 if let Some(_) = self.outcome {
7036 return 7;
7037 }
7038 if let Some(_) = self.availability {
7039 return 6;
7040 }
7041 if let Some(_) = self.service_instances {
7042 return 5;
7043 }
7044 if let Some(_) = self.source_moniker {
7045 return 4;
7046 }
7047 if let Some(_) = self.error {
7048 return 3;
7049 }
7050 if let Some(_) = self.decl_type {
7051 return 2;
7052 }
7053 if let Some(_) = self.capability {
7054 return 1;
7055 }
7056 0
7057 }
7058 }
7059
7060 impl fidl::encoding::ValueTypeMarker for RouteReport {
7061 type Borrowed<'a> = &'a Self;
7062 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7063 value
7064 }
7065 }
7066
7067 unsafe impl fidl::encoding::TypeMarker for RouteReport {
7068 type Owned = Self;
7069
7070 #[inline(always)]
7071 fn inline_align(_context: fidl::encoding::Context) -> usize {
7072 8
7073 }
7074
7075 #[inline(always)]
7076 fn inline_size(_context: fidl::encoding::Context) -> usize {
7077 16
7078 }
7079 }
7080
7081 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteReport, D>
7082 for &RouteReport
7083 {
7084 unsafe fn encode(
7085 self,
7086 encoder: &mut fidl::encoding::Encoder<'_, D>,
7087 offset: usize,
7088 mut depth: fidl::encoding::Depth,
7089 ) -> fidl::Result<()> {
7090 encoder.debug_check_bounds::<RouteReport>(offset);
7091 let max_ordinal: u64 = self.max_ordinal_present();
7093 encoder.write_num(max_ordinal, offset);
7094 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7095 if max_ordinal == 0 {
7097 return Ok(());
7098 }
7099 depth.increment()?;
7100 let envelope_size = 8;
7101 let bytes_len = max_ordinal as usize * envelope_size;
7102 #[allow(unused_variables)]
7103 let offset = encoder.out_of_line_offset(bytes_len);
7104 let mut _prev_end_offset: usize = 0;
7105 if 1 > max_ordinal {
7106 return Ok(());
7107 }
7108
7109 let cur_offset: usize = (1 - 1) * envelope_size;
7112
7113 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7115
7116 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7121 self.capability.as_ref().map(
7122 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7123 ),
7124 encoder,
7125 offset + cur_offset,
7126 depth,
7127 )?;
7128
7129 _prev_end_offset = cur_offset + envelope_size;
7130 if 2 > max_ordinal {
7131 return Ok(());
7132 }
7133
7134 let cur_offset: usize = (2 - 1) * envelope_size;
7137
7138 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7140
7141 fidl::encoding::encode_in_envelope_optional::<DeclType, D>(
7146 self.decl_type.as_ref().map(<DeclType as fidl::encoding::ValueTypeMarker>::borrow),
7147 encoder,
7148 offset + cur_offset,
7149 depth,
7150 )?;
7151
7152 _prev_end_offset = cur_offset + envelope_size;
7153 if 3 > max_ordinal {
7154 return Ok(());
7155 }
7156
7157 let cur_offset: usize = (3 - 1) * envelope_size;
7160
7161 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7163
7164 fidl::encoding::encode_in_envelope_optional::<RouteError, D>(
7169 self.error.as_ref().map(<RouteError as fidl::encoding::ValueTypeMarker>::borrow),
7170 encoder,
7171 offset + cur_offset,
7172 depth,
7173 )?;
7174
7175 _prev_end_offset = cur_offset + envelope_size;
7176 if 4 > max_ordinal {
7177 return Ok(());
7178 }
7179
7180 let cur_offset: usize = (4 - 1) * envelope_size;
7183
7184 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7186
7187 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7192 self.source_moniker.as_ref().map(
7193 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7194 ),
7195 encoder,
7196 offset + cur_offset,
7197 depth,
7198 )?;
7199
7200 _prev_end_offset = cur_offset + envelope_size;
7201 if 5 > max_ordinal {
7202 return Ok(());
7203 }
7204
7205 let cur_offset: usize = (5 - 1) * envelope_size;
7208
7209 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7211
7212 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<ServiceInstance>, D>(
7217 self.service_instances.as_ref().map(<fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::ValueTypeMarker>::borrow),
7218 encoder, offset + cur_offset, depth
7219 )?;
7220
7221 _prev_end_offset = cur_offset + envelope_size;
7222 if 6 > max_ordinal {
7223 return Ok(());
7224 }
7225
7226 let cur_offset: usize = (6 - 1) * envelope_size;
7229
7230 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7232
7233 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_component_decl__common::Availability, D>(
7238 self.availability.as_ref().map(<fidl_fuchsia_component_decl__common::Availability as fidl::encoding::ValueTypeMarker>::borrow),
7239 encoder, offset + cur_offset, depth
7240 )?;
7241
7242 _prev_end_offset = cur_offset + envelope_size;
7243 if 7 > max_ordinal {
7244 return Ok(());
7245 }
7246
7247 let cur_offset: usize = (7 - 1) * envelope_size;
7250
7251 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7253
7254 fidl::encoding::encode_in_envelope_optional::<RouteOutcome, D>(
7259 self.outcome
7260 .as_ref()
7261 .map(<RouteOutcome as fidl::encoding::ValueTypeMarker>::borrow),
7262 encoder,
7263 offset + cur_offset,
7264 depth,
7265 )?;
7266
7267 _prev_end_offset = cur_offset + envelope_size;
7268 if 8 > max_ordinal {
7269 return Ok(());
7270 }
7271
7272 let cur_offset: usize = (8 - 1) * envelope_size;
7275
7276 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7278
7279 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<DictionaryEntry>, D>(
7284 self.dictionary_entries.as_ref().map(<fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::ValueTypeMarker>::borrow),
7285 encoder, offset + cur_offset, depth
7286 )?;
7287
7288 _prev_end_offset = cur_offset + envelope_size;
7289
7290 Ok(())
7291 }
7292 }
7293
7294 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteReport {
7295 #[inline(always)]
7296 fn new_empty() -> Self {
7297 Self::default()
7298 }
7299
7300 unsafe fn decode(
7301 &mut self,
7302 decoder: &mut fidl::encoding::Decoder<'_, D>,
7303 offset: usize,
7304 mut depth: fidl::encoding::Depth,
7305 ) -> fidl::Result<()> {
7306 decoder.debug_check_bounds::<Self>(offset);
7307 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7308 None => return Err(fidl::Error::NotNullable),
7309 Some(len) => len,
7310 };
7311 if len == 0 {
7313 return Ok(());
7314 };
7315 depth.increment()?;
7316 let envelope_size = 8;
7317 let bytes_len = len * envelope_size;
7318 let offset = decoder.out_of_line_offset(bytes_len)?;
7319 let mut _next_ordinal_to_read = 0;
7321 let mut next_offset = offset;
7322 let end_offset = offset + bytes_len;
7323 _next_ordinal_to_read += 1;
7324 if next_offset >= end_offset {
7325 return Ok(());
7326 }
7327
7328 while _next_ordinal_to_read < 1 {
7330 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7331 _next_ordinal_to_read += 1;
7332 next_offset += envelope_size;
7333 }
7334
7335 let next_out_of_line = decoder.next_out_of_line();
7336 let handles_before = decoder.remaining_handles();
7337 if let Some((inlined, num_bytes, num_handles)) =
7338 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7339 {
7340 let member_inline_size =
7341 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7342 decoder.context,
7343 );
7344 if inlined != (member_inline_size <= 4) {
7345 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7346 }
7347 let inner_offset;
7348 let mut inner_depth = depth.clone();
7349 if inlined {
7350 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7351 inner_offset = next_offset;
7352 } else {
7353 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7354 inner_depth.increment()?;
7355 }
7356 let val_ref = self
7357 .capability
7358 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7359 fidl::decode!(
7360 fidl::encoding::UnboundedString,
7361 D,
7362 val_ref,
7363 decoder,
7364 inner_offset,
7365 inner_depth
7366 )?;
7367 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7368 {
7369 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7370 }
7371 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7372 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7373 }
7374 }
7375
7376 next_offset += envelope_size;
7377 _next_ordinal_to_read += 1;
7378 if next_offset >= end_offset {
7379 return Ok(());
7380 }
7381
7382 while _next_ordinal_to_read < 2 {
7384 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7385 _next_ordinal_to_read += 1;
7386 next_offset += envelope_size;
7387 }
7388
7389 let next_out_of_line = decoder.next_out_of_line();
7390 let handles_before = decoder.remaining_handles();
7391 if let Some((inlined, num_bytes, num_handles)) =
7392 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7393 {
7394 let member_inline_size =
7395 <DeclType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7396 if inlined != (member_inline_size <= 4) {
7397 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7398 }
7399 let inner_offset;
7400 let mut inner_depth = depth.clone();
7401 if inlined {
7402 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7403 inner_offset = next_offset;
7404 } else {
7405 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7406 inner_depth.increment()?;
7407 }
7408 let val_ref = self.decl_type.get_or_insert_with(|| fidl::new_empty!(DeclType, D));
7409 fidl::decode!(DeclType, D, val_ref, decoder, inner_offset, inner_depth)?;
7410 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7411 {
7412 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7413 }
7414 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7415 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7416 }
7417 }
7418
7419 next_offset += envelope_size;
7420 _next_ordinal_to_read += 1;
7421 if next_offset >= end_offset {
7422 return Ok(());
7423 }
7424
7425 while _next_ordinal_to_read < 3 {
7427 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7428 _next_ordinal_to_read += 1;
7429 next_offset += envelope_size;
7430 }
7431
7432 let next_out_of_line = decoder.next_out_of_line();
7433 let handles_before = decoder.remaining_handles();
7434 if let Some((inlined, num_bytes, num_handles)) =
7435 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7436 {
7437 let member_inline_size =
7438 <RouteError as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7439 if inlined != (member_inline_size <= 4) {
7440 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7441 }
7442 let inner_offset;
7443 let mut inner_depth = depth.clone();
7444 if inlined {
7445 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7446 inner_offset = next_offset;
7447 } else {
7448 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7449 inner_depth.increment()?;
7450 }
7451 let val_ref = self.error.get_or_insert_with(|| fidl::new_empty!(RouteError, D));
7452 fidl::decode!(RouteError, D, val_ref, decoder, inner_offset, inner_depth)?;
7453 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7454 {
7455 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7456 }
7457 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7458 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7459 }
7460 }
7461
7462 next_offset += envelope_size;
7463 _next_ordinal_to_read += 1;
7464 if next_offset >= end_offset {
7465 return Ok(());
7466 }
7467
7468 while _next_ordinal_to_read < 4 {
7470 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7471 _next_ordinal_to_read += 1;
7472 next_offset += envelope_size;
7473 }
7474
7475 let next_out_of_line = decoder.next_out_of_line();
7476 let handles_before = decoder.remaining_handles();
7477 if let Some((inlined, num_bytes, num_handles)) =
7478 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7479 {
7480 let member_inline_size =
7481 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7482 decoder.context,
7483 );
7484 if inlined != (member_inline_size <= 4) {
7485 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7486 }
7487 let inner_offset;
7488 let mut inner_depth = depth.clone();
7489 if inlined {
7490 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7491 inner_offset = next_offset;
7492 } else {
7493 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7494 inner_depth.increment()?;
7495 }
7496 let val_ref = self
7497 .source_moniker
7498 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7499 fidl::decode!(
7500 fidl::encoding::UnboundedString,
7501 D,
7502 val_ref,
7503 decoder,
7504 inner_offset,
7505 inner_depth
7506 )?;
7507 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7508 {
7509 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7510 }
7511 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7512 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7513 }
7514 }
7515
7516 next_offset += envelope_size;
7517 _next_ordinal_to_read += 1;
7518 if next_offset >= end_offset {
7519 return Ok(());
7520 }
7521
7522 while _next_ordinal_to_read < 5 {
7524 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7525 _next_ordinal_to_read += 1;
7526 next_offset += envelope_size;
7527 }
7528
7529 let next_out_of_line = decoder.next_out_of_line();
7530 let handles_before = decoder.remaining_handles();
7531 if let Some((inlined, num_bytes, num_handles)) =
7532 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7533 {
7534 let member_inline_size = <fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7535 if inlined != (member_inline_size <= 4) {
7536 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7537 }
7538 let inner_offset;
7539 let mut inner_depth = depth.clone();
7540 if inlined {
7541 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7542 inner_offset = next_offset;
7543 } else {
7544 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7545 inner_depth.increment()?;
7546 }
7547 let val_ref = self.service_instances.get_or_insert_with(|| {
7548 fidl::new_empty!(fidl::encoding::UnboundedVector<ServiceInstance>, D)
7549 });
7550 fidl::decode!(
7551 fidl::encoding::UnboundedVector<ServiceInstance>,
7552 D,
7553 val_ref,
7554 decoder,
7555 inner_offset,
7556 inner_depth
7557 )?;
7558 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7559 {
7560 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7561 }
7562 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7563 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7564 }
7565 }
7566
7567 next_offset += envelope_size;
7568 _next_ordinal_to_read += 1;
7569 if next_offset >= end_offset {
7570 return Ok(());
7571 }
7572
7573 while _next_ordinal_to_read < 6 {
7575 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7576 _next_ordinal_to_read += 1;
7577 next_offset += envelope_size;
7578 }
7579
7580 let next_out_of_line = decoder.next_out_of_line();
7581 let handles_before = decoder.remaining_handles();
7582 if let Some((inlined, num_bytes, num_handles)) =
7583 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7584 {
7585 let member_inline_size = <fidl_fuchsia_component_decl__common::Availability as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7586 if inlined != (member_inline_size <= 4) {
7587 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7588 }
7589 let inner_offset;
7590 let mut inner_depth = depth.clone();
7591 if inlined {
7592 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7593 inner_offset = next_offset;
7594 } else {
7595 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7596 inner_depth.increment()?;
7597 }
7598 let val_ref = self.availability.get_or_insert_with(|| {
7599 fidl::new_empty!(fidl_fuchsia_component_decl__common::Availability, D)
7600 });
7601 fidl::decode!(
7602 fidl_fuchsia_component_decl__common::Availability,
7603 D,
7604 val_ref,
7605 decoder,
7606 inner_offset,
7607 inner_depth
7608 )?;
7609 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7610 {
7611 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7612 }
7613 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7614 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7615 }
7616 }
7617
7618 next_offset += envelope_size;
7619 _next_ordinal_to_read += 1;
7620 if next_offset >= end_offset {
7621 return Ok(());
7622 }
7623
7624 while _next_ordinal_to_read < 7 {
7626 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7627 _next_ordinal_to_read += 1;
7628 next_offset += envelope_size;
7629 }
7630
7631 let next_out_of_line = decoder.next_out_of_line();
7632 let handles_before = decoder.remaining_handles();
7633 if let Some((inlined, num_bytes, num_handles)) =
7634 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7635 {
7636 let member_inline_size =
7637 <RouteOutcome as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7638 if inlined != (member_inline_size <= 4) {
7639 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7640 }
7641 let inner_offset;
7642 let mut inner_depth = depth.clone();
7643 if inlined {
7644 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7645 inner_offset = next_offset;
7646 } else {
7647 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7648 inner_depth.increment()?;
7649 }
7650 let val_ref = self.outcome.get_or_insert_with(|| fidl::new_empty!(RouteOutcome, D));
7651 fidl::decode!(RouteOutcome, D, val_ref, decoder, inner_offset, inner_depth)?;
7652 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7653 {
7654 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7655 }
7656 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7657 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7658 }
7659 }
7660
7661 next_offset += envelope_size;
7662 _next_ordinal_to_read += 1;
7663 if next_offset >= end_offset {
7664 return Ok(());
7665 }
7666
7667 while _next_ordinal_to_read < 8 {
7669 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7670 _next_ordinal_to_read += 1;
7671 next_offset += envelope_size;
7672 }
7673
7674 let next_out_of_line = decoder.next_out_of_line();
7675 let handles_before = decoder.remaining_handles();
7676 if let Some((inlined, num_bytes, num_handles)) =
7677 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7678 {
7679 let member_inline_size = <fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7680 if inlined != (member_inline_size <= 4) {
7681 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7682 }
7683 let inner_offset;
7684 let mut inner_depth = depth.clone();
7685 if inlined {
7686 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7687 inner_offset = next_offset;
7688 } else {
7689 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7690 inner_depth.increment()?;
7691 }
7692 let val_ref = self.dictionary_entries.get_or_insert_with(|| {
7693 fidl::new_empty!(fidl::encoding::UnboundedVector<DictionaryEntry>, D)
7694 });
7695 fidl::decode!(
7696 fidl::encoding::UnboundedVector<DictionaryEntry>,
7697 D,
7698 val_ref,
7699 decoder,
7700 inner_offset,
7701 inner_depth
7702 )?;
7703 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7704 {
7705 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7706 }
7707 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7708 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7709 }
7710 }
7711
7712 next_offset += envelope_size;
7713
7714 while next_offset < end_offset {
7716 _next_ordinal_to_read += 1;
7717 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7718 next_offset += envelope_size;
7719 }
7720
7721 Ok(())
7722 }
7723 }
7724
7725 impl ServiceInstance {
7726 #[inline(always)]
7727 fn max_ordinal_present(&self) -> u64 {
7728 if let Some(_) = self.child_instance_name {
7729 return 3;
7730 }
7731 if let Some(_) = self.child_name {
7732 return 2;
7733 }
7734 if let Some(_) = self.instance_name {
7735 return 1;
7736 }
7737 0
7738 }
7739 }
7740
7741 impl fidl::encoding::ValueTypeMarker for ServiceInstance {
7742 type Borrowed<'a> = &'a Self;
7743 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7744 value
7745 }
7746 }
7747
7748 unsafe impl fidl::encoding::TypeMarker for ServiceInstance {
7749 type Owned = Self;
7750
7751 #[inline(always)]
7752 fn inline_align(_context: fidl::encoding::Context) -> usize {
7753 8
7754 }
7755
7756 #[inline(always)]
7757 fn inline_size(_context: fidl::encoding::Context) -> usize {
7758 16
7759 }
7760 }
7761
7762 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServiceInstance, D>
7763 for &ServiceInstance
7764 {
7765 unsafe fn encode(
7766 self,
7767 encoder: &mut fidl::encoding::Encoder<'_, D>,
7768 offset: usize,
7769 mut depth: fidl::encoding::Depth,
7770 ) -> fidl::Result<()> {
7771 encoder.debug_check_bounds::<ServiceInstance>(offset);
7772 let max_ordinal: u64 = self.max_ordinal_present();
7774 encoder.write_num(max_ordinal, offset);
7775 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7776 if max_ordinal == 0 {
7778 return Ok(());
7779 }
7780 depth.increment()?;
7781 let envelope_size = 8;
7782 let bytes_len = max_ordinal as usize * envelope_size;
7783 #[allow(unused_variables)]
7784 let offset = encoder.out_of_line_offset(bytes_len);
7785 let mut _prev_end_offset: usize = 0;
7786 if 1 > max_ordinal {
7787 return Ok(());
7788 }
7789
7790 let cur_offset: usize = (1 - 1) * envelope_size;
7793
7794 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7796
7797 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7802 self.instance_name.as_ref().map(
7803 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7804 ),
7805 encoder,
7806 offset + cur_offset,
7807 depth,
7808 )?;
7809
7810 _prev_end_offset = cur_offset + envelope_size;
7811 if 2 > max_ordinal {
7812 return Ok(());
7813 }
7814
7815 let cur_offset: usize = (2 - 1) * envelope_size;
7818
7819 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7821
7822 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7827 self.child_name.as_ref().map(
7828 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7829 ),
7830 encoder,
7831 offset + cur_offset,
7832 depth,
7833 )?;
7834
7835 _prev_end_offset = cur_offset + envelope_size;
7836 if 3 > max_ordinal {
7837 return Ok(());
7838 }
7839
7840 let cur_offset: usize = (3 - 1) * envelope_size;
7843
7844 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7846
7847 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7852 self.child_instance_name.as_ref().map(
7853 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7854 ),
7855 encoder,
7856 offset + cur_offset,
7857 depth,
7858 )?;
7859
7860 _prev_end_offset = cur_offset + envelope_size;
7861
7862 Ok(())
7863 }
7864 }
7865
7866 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServiceInstance {
7867 #[inline(always)]
7868 fn new_empty() -> Self {
7869 Self::default()
7870 }
7871
7872 unsafe fn decode(
7873 &mut self,
7874 decoder: &mut fidl::encoding::Decoder<'_, D>,
7875 offset: usize,
7876 mut depth: fidl::encoding::Depth,
7877 ) -> fidl::Result<()> {
7878 decoder.debug_check_bounds::<Self>(offset);
7879 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7880 None => return Err(fidl::Error::NotNullable),
7881 Some(len) => len,
7882 };
7883 if len == 0 {
7885 return Ok(());
7886 };
7887 depth.increment()?;
7888 let envelope_size = 8;
7889 let bytes_len = len * envelope_size;
7890 let offset = decoder.out_of_line_offset(bytes_len)?;
7891 let mut _next_ordinal_to_read = 0;
7893 let mut next_offset = offset;
7894 let end_offset = offset + bytes_len;
7895 _next_ordinal_to_read += 1;
7896 if next_offset >= end_offset {
7897 return Ok(());
7898 }
7899
7900 while _next_ordinal_to_read < 1 {
7902 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7903 _next_ordinal_to_read += 1;
7904 next_offset += envelope_size;
7905 }
7906
7907 let next_out_of_line = decoder.next_out_of_line();
7908 let handles_before = decoder.remaining_handles();
7909 if let Some((inlined, num_bytes, num_handles)) =
7910 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7911 {
7912 let member_inline_size =
7913 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7914 decoder.context,
7915 );
7916 if inlined != (member_inline_size <= 4) {
7917 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7918 }
7919 let inner_offset;
7920 let mut inner_depth = depth.clone();
7921 if inlined {
7922 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7923 inner_offset = next_offset;
7924 } else {
7925 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7926 inner_depth.increment()?;
7927 }
7928 let val_ref = self
7929 .instance_name
7930 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7931 fidl::decode!(
7932 fidl::encoding::UnboundedString,
7933 D,
7934 val_ref,
7935 decoder,
7936 inner_offset,
7937 inner_depth
7938 )?;
7939 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7940 {
7941 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7942 }
7943 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7944 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7945 }
7946 }
7947
7948 next_offset += envelope_size;
7949 _next_ordinal_to_read += 1;
7950 if next_offset >= end_offset {
7951 return Ok(());
7952 }
7953
7954 while _next_ordinal_to_read < 2 {
7956 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7957 _next_ordinal_to_read += 1;
7958 next_offset += envelope_size;
7959 }
7960
7961 let next_out_of_line = decoder.next_out_of_line();
7962 let handles_before = decoder.remaining_handles();
7963 if let Some((inlined, num_bytes, num_handles)) =
7964 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7965 {
7966 let member_inline_size =
7967 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7968 decoder.context,
7969 );
7970 if inlined != (member_inline_size <= 4) {
7971 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7972 }
7973 let inner_offset;
7974 let mut inner_depth = depth.clone();
7975 if inlined {
7976 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7977 inner_offset = next_offset;
7978 } else {
7979 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7980 inner_depth.increment()?;
7981 }
7982 let val_ref = self
7983 .child_name
7984 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7985 fidl::decode!(
7986 fidl::encoding::UnboundedString,
7987 D,
7988 val_ref,
7989 decoder,
7990 inner_offset,
7991 inner_depth
7992 )?;
7993 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7994 {
7995 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7996 }
7997 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7998 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7999 }
8000 }
8001
8002 next_offset += envelope_size;
8003 _next_ordinal_to_read += 1;
8004 if next_offset >= end_offset {
8005 return Ok(());
8006 }
8007
8008 while _next_ordinal_to_read < 3 {
8010 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8011 _next_ordinal_to_read += 1;
8012 next_offset += envelope_size;
8013 }
8014
8015 let next_out_of_line = decoder.next_out_of_line();
8016 let handles_before = decoder.remaining_handles();
8017 if let Some((inlined, num_bytes, num_handles)) =
8018 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8019 {
8020 let member_inline_size =
8021 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8022 decoder.context,
8023 );
8024 if inlined != (member_inline_size <= 4) {
8025 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8026 }
8027 let inner_offset;
8028 let mut inner_depth = depth.clone();
8029 if inlined {
8030 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8031 inner_offset = next_offset;
8032 } else {
8033 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8034 inner_depth.increment()?;
8035 }
8036 let val_ref = self
8037 .child_instance_name
8038 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8039 fidl::decode!(
8040 fidl::encoding::UnboundedString,
8041 D,
8042 val_ref,
8043 decoder,
8044 inner_offset,
8045 inner_depth
8046 )?;
8047 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8048 {
8049 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8050 }
8051 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8052 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8053 }
8054 }
8055
8056 next_offset += envelope_size;
8057
8058 while next_offset < end_offset {
8060 _next_ordinal_to_read += 1;
8061 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8062 next_offset += envelope_size;
8063 }
8064
8065 Ok(())
8066 }
8067 }
8068
8069 impl StorageStatus {
8070 #[inline(always)]
8071 fn max_ordinal_present(&self) -> u64 {
8072 if let Some(_) = self.used_size {
8073 return 2;
8074 }
8075 if let Some(_) = self.total_size {
8076 return 1;
8077 }
8078 0
8079 }
8080 }
8081
8082 impl fidl::encoding::ValueTypeMarker for StorageStatus {
8083 type Borrowed<'a> = &'a Self;
8084 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8085 value
8086 }
8087 }
8088
8089 unsafe impl fidl::encoding::TypeMarker for StorageStatus {
8090 type Owned = Self;
8091
8092 #[inline(always)]
8093 fn inline_align(_context: fidl::encoding::Context) -> usize {
8094 8
8095 }
8096
8097 #[inline(always)]
8098 fn inline_size(_context: fidl::encoding::Context) -> usize {
8099 16
8100 }
8101 }
8102
8103 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StorageStatus, D>
8104 for &StorageStatus
8105 {
8106 unsafe fn encode(
8107 self,
8108 encoder: &mut fidl::encoding::Encoder<'_, D>,
8109 offset: usize,
8110 mut depth: fidl::encoding::Depth,
8111 ) -> fidl::Result<()> {
8112 encoder.debug_check_bounds::<StorageStatus>(offset);
8113 let max_ordinal: u64 = self.max_ordinal_present();
8115 encoder.write_num(max_ordinal, offset);
8116 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8117 if max_ordinal == 0 {
8119 return Ok(());
8120 }
8121 depth.increment()?;
8122 let envelope_size = 8;
8123 let bytes_len = max_ordinal as usize * envelope_size;
8124 #[allow(unused_variables)]
8125 let offset = encoder.out_of_line_offset(bytes_len);
8126 let mut _prev_end_offset: usize = 0;
8127 if 1 > max_ordinal {
8128 return Ok(());
8129 }
8130
8131 let cur_offset: usize = (1 - 1) * envelope_size;
8134
8135 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8137
8138 fidl::encoding::encode_in_envelope_optional::<u64, D>(
8143 self.total_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8144 encoder,
8145 offset + cur_offset,
8146 depth,
8147 )?;
8148
8149 _prev_end_offset = cur_offset + envelope_size;
8150 if 2 > max_ordinal {
8151 return Ok(());
8152 }
8153
8154 let cur_offset: usize = (2 - 1) * envelope_size;
8157
8158 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8160
8161 fidl::encoding::encode_in_envelope_optional::<u64, D>(
8166 self.used_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8167 encoder,
8168 offset + cur_offset,
8169 depth,
8170 )?;
8171
8172 _prev_end_offset = cur_offset + envelope_size;
8173
8174 Ok(())
8175 }
8176 }
8177
8178 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StorageStatus {
8179 #[inline(always)]
8180 fn new_empty() -> Self {
8181 Self::default()
8182 }
8183
8184 unsafe fn decode(
8185 &mut self,
8186 decoder: &mut fidl::encoding::Decoder<'_, D>,
8187 offset: usize,
8188 mut depth: fidl::encoding::Depth,
8189 ) -> fidl::Result<()> {
8190 decoder.debug_check_bounds::<Self>(offset);
8191 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8192 None => return Err(fidl::Error::NotNullable),
8193 Some(len) => len,
8194 };
8195 if len == 0 {
8197 return Ok(());
8198 };
8199 depth.increment()?;
8200 let envelope_size = 8;
8201 let bytes_len = len * envelope_size;
8202 let offset = decoder.out_of_line_offset(bytes_len)?;
8203 let mut _next_ordinal_to_read = 0;
8205 let mut next_offset = offset;
8206 let end_offset = offset + bytes_len;
8207 _next_ordinal_to_read += 1;
8208 if next_offset >= end_offset {
8209 return Ok(());
8210 }
8211
8212 while _next_ordinal_to_read < 1 {
8214 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8215 _next_ordinal_to_read += 1;
8216 next_offset += envelope_size;
8217 }
8218
8219 let next_out_of_line = decoder.next_out_of_line();
8220 let handles_before = decoder.remaining_handles();
8221 if let Some((inlined, num_bytes, num_handles)) =
8222 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8223 {
8224 let member_inline_size =
8225 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8226 if inlined != (member_inline_size <= 4) {
8227 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8228 }
8229 let inner_offset;
8230 let mut inner_depth = depth.clone();
8231 if inlined {
8232 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8233 inner_offset = next_offset;
8234 } else {
8235 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8236 inner_depth.increment()?;
8237 }
8238 let val_ref = self.total_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8239 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8240 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8241 {
8242 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8243 }
8244 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8245 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8246 }
8247 }
8248
8249 next_offset += envelope_size;
8250 _next_ordinal_to_read += 1;
8251 if next_offset >= end_offset {
8252 return Ok(());
8253 }
8254
8255 while _next_ordinal_to_read < 2 {
8257 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8258 _next_ordinal_to_read += 1;
8259 next_offset += envelope_size;
8260 }
8261
8262 let next_out_of_line = decoder.next_out_of_line();
8263 let handles_before = decoder.remaining_handles();
8264 if let Some((inlined, num_bytes, num_handles)) =
8265 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8266 {
8267 let member_inline_size =
8268 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8269 if inlined != (member_inline_size <= 4) {
8270 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8271 }
8272 let inner_offset;
8273 let mut inner_depth = depth.clone();
8274 if inlined {
8275 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8276 inner_offset = next_offset;
8277 } else {
8278 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8279 inner_depth.increment()?;
8280 }
8281 let val_ref = self.used_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8282 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8283 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8284 {
8285 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8286 }
8287 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8288 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8289 }
8290 }
8291
8292 next_offset += envelope_size;
8293
8294 while next_offset < end_offset {
8296 _next_ordinal_to_read += 1;
8297 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8298 next_offset += envelope_size;
8299 }
8300
8301 Ok(())
8302 }
8303 }
8304
8305 impl fidl::encoding::ValueTypeMarker for ChildLocation {
8306 type Borrowed<'a> = &'a Self;
8307 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8308 value
8309 }
8310 }
8311
8312 unsafe impl fidl::encoding::TypeMarker for ChildLocation {
8313 type Owned = Self;
8314
8315 #[inline(always)]
8316 fn inline_align(_context: fidl::encoding::Context) -> usize {
8317 8
8318 }
8319
8320 #[inline(always)]
8321 fn inline_size(_context: fidl::encoding::Context) -> usize {
8322 16
8323 }
8324 }
8325
8326 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ChildLocation, D>
8327 for &ChildLocation
8328 {
8329 #[inline]
8330 unsafe fn encode(
8331 self,
8332 encoder: &mut fidl::encoding::Encoder<'_, D>,
8333 offset: usize,
8334 _depth: fidl::encoding::Depth,
8335 ) -> fidl::Result<()> {
8336 encoder.debug_check_bounds::<ChildLocation>(offset);
8337 encoder.write_num::<u64>(self.ordinal(), offset);
8338 match self {
8339 ChildLocation::Collection(ref val) => fidl::encoding::encode_in_envelope::<
8340 fidl::encoding::BoundedString<255>,
8341 D,
8342 >(
8343 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
8344 val,
8345 ),
8346 encoder,
8347 offset + 8,
8348 _depth,
8349 ),
8350 ChildLocation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
8351 }
8352 }
8353 }
8354
8355 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ChildLocation {
8356 #[inline(always)]
8357 fn new_empty() -> Self {
8358 Self::__SourceBreaking { unknown_ordinal: 0 }
8359 }
8360
8361 #[inline]
8362 unsafe fn decode(
8363 &mut self,
8364 decoder: &mut fidl::encoding::Decoder<'_, D>,
8365 offset: usize,
8366 mut depth: fidl::encoding::Depth,
8367 ) -> fidl::Result<()> {
8368 decoder.debug_check_bounds::<Self>(offset);
8369 #[allow(unused_variables)]
8370 let next_out_of_line = decoder.next_out_of_line();
8371 let handles_before = decoder.remaining_handles();
8372 let (ordinal, inlined, num_bytes, num_handles) =
8373 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
8374
8375 let member_inline_size = match ordinal {
8376 1 => {
8377 <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
8378 decoder.context,
8379 )
8380 }
8381 0 => return Err(fidl::Error::UnknownUnionTag),
8382 _ => num_bytes as usize,
8383 };
8384
8385 if inlined != (member_inline_size <= 4) {
8386 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8387 }
8388 let _inner_offset;
8389 if inlined {
8390 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
8391 _inner_offset = offset + 8;
8392 } else {
8393 depth.increment()?;
8394 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8395 }
8396 match ordinal {
8397 1 => {
8398 #[allow(irrefutable_let_patterns)]
8399 if let ChildLocation::Collection(_) = self {
8400 } else {
8402 *self = ChildLocation::Collection(fidl::new_empty!(
8404 fidl::encoding::BoundedString<255>,
8405 D
8406 ));
8407 }
8408 #[allow(irrefutable_let_patterns)]
8409 if let ChildLocation::Collection(ref mut val) = self {
8410 fidl::decode!(
8411 fidl::encoding::BoundedString<255>,
8412 D,
8413 val,
8414 decoder,
8415 _inner_offset,
8416 depth
8417 )?;
8418 } else {
8419 unreachable!()
8420 }
8421 }
8422 #[allow(deprecated)]
8423 ordinal => {
8424 for _ in 0..num_handles {
8425 decoder.drop_next_handle()?;
8426 }
8427 *self = ChildLocation::__SourceBreaking { unknown_ordinal: ordinal };
8428 }
8429 }
8430 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
8431 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8432 }
8433 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8434 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8435 }
8436 Ok(())
8437 }
8438 }
8439}