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 boot_controller_ordinals {
1826 pub const NOTIFY: u64 = 0x55173ddd1d9ed8de;
1827}
1828
1829pub mod config_override_ordinals {
1830 pub const SET_STRUCTURED_CONFIG: u64 = 0x2c6a138832d2e0ee;
1831 pub const UNSET_STRUCTURED_CONFIG: u64 = 0x342ec7d2bef05552;
1832}
1833
1834pub mod crash_introspect_ordinals {
1835 pub const FIND_COMPONENT_BY_THREAD_KOID: u64 = 0x75d3ff081eca468d;
1836}
1837
1838pub mod instance_iterator_ordinals {
1839 pub const NEXT: u64 = 0x3a4e3d52432a52ee;
1840}
1841
1842pub mod lifecycle_controller_ordinals {
1843 pub const START_INSTANCE: u64 = 0x13fcb422876384bf;
1844 pub const START_INSTANCE_WITH_ARGS: u64 = 0xd3b467436223e9;
1845 pub const STOP_INSTANCE: u64 = 0x1362ba9d0e3caf36;
1846 pub const RESOLVE_INSTANCE: u64 = 0x426ab8dd53d8e737;
1847 pub const UNRESOLVE_INSTANCE: u64 = 0x18166a2aa798cb99;
1848 pub const CREATE_INSTANCE: u64 = 0x48d17ae777e4f9;
1849 pub const DESTROY_INSTANCE: u64 = 0x27640ae5889d7443;
1850}
1851
1852pub mod manifest_bytes_iterator_ordinals {
1853 pub const NEXT: u64 = 0x4be4659549b15500;
1854}
1855
1856pub mod realm_explorer_ordinals {}
1857
1858pub mod realm_query_ordinals {
1859 pub const GET_INSTANCE: u64 = 0x3496ca1e5a0c13a8;
1860 pub const GET_RESOLVED_DECLARATION: u64 = 0x31a493d284a0bc1f;
1861 pub const RESOLVE_DECLARATION: u64 = 0x1ab1adf2a87d962d;
1862 pub const GET_STRUCTURED_CONFIG: u64 = 0x16f88f6735bd204;
1863 pub const GET_ALL_INSTANCES: u64 = 0x7b5a8775d30cad47;
1864 pub const CONSTRUCT_NAMESPACE: u64 = 0x5ecb29c02c488eeb;
1865 pub const OPEN_DIRECTORY: u64 = 0x333d68f1deecec85;
1866 pub const CONNECT_TO_STORAGE_ADMIN: u64 = 0x7807e6b4f623ace;
1867 pub const OPEN_STORAGE_ADMIN: u64 = 0x54d6af83942b4069;
1868}
1869
1870pub mod route_validator_ordinals {
1871 pub const VALIDATE: u64 = 0x3360b96d5f86cdf4;
1872 pub const ROUTE: u64 = 0x51c9b268216d8239;
1873}
1874
1875pub mod storage_admin_ordinals {
1876 pub const OPEN_STORAGE: u64 = 0x6ceaa5904cfe4377;
1877 pub const LIST_STORAGE_IN_REALM: u64 = 0x764f6d1f083e8bfb;
1878 pub const OPEN_COMPONENT_STORAGE_BY_ID: u64 = 0x4802102cc55d5df1;
1879 pub const DELETE_COMPONENT_STORAGE: u64 = 0x1677c1cdfcdbf45a;
1880 pub const GET_STATUS: u64 = 0x7729e325a6c526c8;
1881 pub const DELETE_ALL_STORAGE_CONTENTS: u64 = 0x2ee980b4b2d24adb;
1882}
1883
1884pub mod storage_iterator_ordinals {
1885 pub const NEXT: u64 = 0x7a6b21f15fd01b72;
1886}
1887
1888pub mod system_controller_ordinals {
1889 pub const SHUTDOWN: u64 = 0x25f56c938344e549;
1890}
1891
1892mod internal {
1893 use super::*;
1894 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideError {
1895 type Owned = Self;
1896
1897 #[inline(always)]
1898 fn inline_align(_context: fidl::encoding::Context) -> usize {
1899 std::mem::align_of::<u32>()
1900 }
1901
1902 #[inline(always)]
1903 fn inline_size(_context: fidl::encoding::Context) -> usize {
1904 std::mem::size_of::<u32>()
1905 }
1906
1907 #[inline(always)]
1908 fn encode_is_copy() -> bool {
1909 false
1910 }
1911
1912 #[inline(always)]
1913 fn decode_is_copy() -> bool {
1914 false
1915 }
1916 }
1917
1918 impl fidl::encoding::ValueTypeMarker for ConfigOverrideError {
1919 type Borrowed<'a> = Self;
1920 #[inline(always)]
1921 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1922 *value
1923 }
1924 }
1925
1926 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1927 for ConfigOverrideError
1928 {
1929 #[inline]
1930 unsafe fn encode(
1931 self,
1932 encoder: &mut fidl::encoding::Encoder<'_, D>,
1933 offset: usize,
1934 _depth: fidl::encoding::Depth,
1935 ) -> fidl::Result<()> {
1936 encoder.debug_check_bounds::<Self>(offset);
1937 encoder.write_num(self.into_primitive(), offset);
1938 Ok(())
1939 }
1940 }
1941
1942 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ConfigOverrideError {
1943 #[inline(always)]
1944 fn new_empty() -> Self {
1945 Self::unknown()
1946 }
1947
1948 #[inline]
1949 unsafe fn decode(
1950 &mut self,
1951 decoder: &mut fidl::encoding::Decoder<'_, D>,
1952 offset: usize,
1953 _depth: fidl::encoding::Depth,
1954 ) -> fidl::Result<()> {
1955 decoder.debug_check_bounds::<Self>(offset);
1956 let prim = decoder.read_num::<u32>(offset);
1957
1958 *self = Self::from_primitive_allow_unknown(prim);
1959 Ok(())
1960 }
1961 }
1962 unsafe impl fidl::encoding::TypeMarker for ConnectToStorageAdminError {
1963 type Owned = Self;
1964
1965 #[inline(always)]
1966 fn inline_align(_context: fidl::encoding::Context) -> usize {
1967 std::mem::align_of::<u32>()
1968 }
1969
1970 #[inline(always)]
1971 fn inline_size(_context: fidl::encoding::Context) -> usize {
1972 std::mem::size_of::<u32>()
1973 }
1974
1975 #[inline(always)]
1976 fn encode_is_copy() -> bool {
1977 false
1978 }
1979
1980 #[inline(always)]
1981 fn decode_is_copy() -> bool {
1982 false
1983 }
1984 }
1985
1986 impl fidl::encoding::ValueTypeMarker for ConnectToStorageAdminError {
1987 type Borrowed<'a> = Self;
1988 #[inline(always)]
1989 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1990 *value
1991 }
1992 }
1993
1994 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1995 for ConnectToStorageAdminError
1996 {
1997 #[inline]
1998 unsafe fn encode(
1999 self,
2000 encoder: &mut fidl::encoding::Encoder<'_, D>,
2001 offset: usize,
2002 _depth: fidl::encoding::Depth,
2003 ) -> fidl::Result<()> {
2004 encoder.debug_check_bounds::<Self>(offset);
2005 encoder.write_num(self.into_primitive(), offset);
2006 Ok(())
2007 }
2008 }
2009
2010 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2011 for ConnectToStorageAdminError
2012 {
2013 #[inline(always)]
2014 fn new_empty() -> Self {
2015 Self::unknown()
2016 }
2017
2018 #[inline]
2019 unsafe fn decode(
2020 &mut self,
2021 decoder: &mut fidl::encoding::Decoder<'_, D>,
2022 offset: usize,
2023 _depth: fidl::encoding::Depth,
2024 ) -> fidl::Result<()> {
2025 decoder.debug_check_bounds::<Self>(offset);
2026 let prim = decoder.read_num::<u32>(offset);
2027
2028 *self = Self::from_primitive_allow_unknown(prim);
2029 Ok(())
2030 }
2031 }
2032 unsafe impl fidl::encoding::TypeMarker for ConstructNamespaceError {
2033 type Owned = Self;
2034
2035 #[inline(always)]
2036 fn inline_align(_context: fidl::encoding::Context) -> usize {
2037 std::mem::align_of::<u32>()
2038 }
2039
2040 #[inline(always)]
2041 fn inline_size(_context: fidl::encoding::Context) -> usize {
2042 std::mem::size_of::<u32>()
2043 }
2044
2045 #[inline(always)]
2046 fn encode_is_copy() -> bool {
2047 false
2048 }
2049
2050 #[inline(always)]
2051 fn decode_is_copy() -> bool {
2052 false
2053 }
2054 }
2055
2056 impl fidl::encoding::ValueTypeMarker for ConstructNamespaceError {
2057 type Borrowed<'a> = Self;
2058 #[inline(always)]
2059 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2060 *value
2061 }
2062 }
2063
2064 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2065 for ConstructNamespaceError
2066 {
2067 #[inline]
2068 unsafe fn encode(
2069 self,
2070 encoder: &mut fidl::encoding::Encoder<'_, D>,
2071 offset: usize,
2072 _depth: fidl::encoding::Depth,
2073 ) -> fidl::Result<()> {
2074 encoder.debug_check_bounds::<Self>(offset);
2075 encoder.write_num(self.into_primitive(), offset);
2076 Ok(())
2077 }
2078 }
2079
2080 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2081 for ConstructNamespaceError
2082 {
2083 #[inline(always)]
2084 fn new_empty() -> Self {
2085 Self::unknown()
2086 }
2087
2088 #[inline]
2089 unsafe fn decode(
2090 &mut self,
2091 decoder: &mut fidl::encoding::Decoder<'_, D>,
2092 offset: usize,
2093 _depth: fidl::encoding::Depth,
2094 ) -> fidl::Result<()> {
2095 decoder.debug_check_bounds::<Self>(offset);
2096 let prim = decoder.read_num::<u32>(offset);
2097
2098 *self = Self::from_primitive_allow_unknown(prim);
2099 Ok(())
2100 }
2101 }
2102 unsafe impl fidl::encoding::TypeMarker for CreateError {
2103 type Owned = Self;
2104
2105 #[inline(always)]
2106 fn inline_align(_context: fidl::encoding::Context) -> usize {
2107 std::mem::align_of::<u32>()
2108 }
2109
2110 #[inline(always)]
2111 fn inline_size(_context: fidl::encoding::Context) -> usize {
2112 std::mem::size_of::<u32>()
2113 }
2114
2115 #[inline(always)]
2116 fn encode_is_copy() -> bool {
2117 false
2118 }
2119
2120 #[inline(always)]
2121 fn decode_is_copy() -> bool {
2122 false
2123 }
2124 }
2125
2126 impl fidl::encoding::ValueTypeMarker for CreateError {
2127 type Borrowed<'a> = Self;
2128 #[inline(always)]
2129 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2130 *value
2131 }
2132 }
2133
2134 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CreateError {
2135 #[inline]
2136 unsafe fn encode(
2137 self,
2138 encoder: &mut fidl::encoding::Encoder<'_, D>,
2139 offset: usize,
2140 _depth: fidl::encoding::Depth,
2141 ) -> fidl::Result<()> {
2142 encoder.debug_check_bounds::<Self>(offset);
2143 encoder.write_num(self.into_primitive(), offset);
2144 Ok(())
2145 }
2146 }
2147
2148 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CreateError {
2149 #[inline(always)]
2150 fn new_empty() -> Self {
2151 Self::unknown()
2152 }
2153
2154 #[inline]
2155 unsafe fn decode(
2156 &mut self,
2157 decoder: &mut fidl::encoding::Decoder<'_, D>,
2158 offset: usize,
2159 _depth: fidl::encoding::Depth,
2160 ) -> fidl::Result<()> {
2161 decoder.debug_check_bounds::<Self>(offset);
2162 let prim = decoder.read_num::<u32>(offset);
2163
2164 *self = Self::from_primitive_allow_unknown(prim);
2165 Ok(())
2166 }
2167 }
2168 unsafe impl fidl::encoding::TypeMarker for DeclType {
2169 type Owned = Self;
2170
2171 #[inline(always)]
2172 fn inline_align(_context: fidl::encoding::Context) -> usize {
2173 std::mem::align_of::<u32>()
2174 }
2175
2176 #[inline(always)]
2177 fn inline_size(_context: fidl::encoding::Context) -> usize {
2178 std::mem::size_of::<u32>()
2179 }
2180
2181 #[inline(always)]
2182 fn encode_is_copy() -> bool {
2183 false
2184 }
2185
2186 #[inline(always)]
2187 fn decode_is_copy() -> bool {
2188 false
2189 }
2190 }
2191
2192 impl fidl::encoding::ValueTypeMarker for DeclType {
2193 type Borrowed<'a> = Self;
2194 #[inline(always)]
2195 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2196 *value
2197 }
2198 }
2199
2200 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeclType {
2201 #[inline]
2202 unsafe fn encode(
2203 self,
2204 encoder: &mut fidl::encoding::Encoder<'_, D>,
2205 offset: usize,
2206 _depth: fidl::encoding::Depth,
2207 ) -> fidl::Result<()> {
2208 encoder.debug_check_bounds::<Self>(offset);
2209 encoder.write_num(self.into_primitive(), offset);
2210 Ok(())
2211 }
2212 }
2213
2214 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeclType {
2215 #[inline(always)]
2216 fn new_empty() -> Self {
2217 Self::unknown()
2218 }
2219
2220 #[inline]
2221 unsafe fn decode(
2222 &mut self,
2223 decoder: &mut fidl::encoding::Decoder<'_, D>,
2224 offset: usize,
2225 _depth: fidl::encoding::Depth,
2226 ) -> fidl::Result<()> {
2227 decoder.debug_check_bounds::<Self>(offset);
2228 let prim = decoder.read_num::<u32>(offset);
2229
2230 *self = Self::from_primitive_allow_unknown(prim);
2231 Ok(())
2232 }
2233 }
2234 unsafe impl fidl::encoding::TypeMarker for DeletionError {
2235 type Owned = Self;
2236
2237 #[inline(always)]
2238 fn inline_align(_context: fidl::encoding::Context) -> usize {
2239 std::mem::align_of::<u32>()
2240 }
2241
2242 #[inline(always)]
2243 fn inline_size(_context: fidl::encoding::Context) -> usize {
2244 std::mem::size_of::<u32>()
2245 }
2246
2247 #[inline(always)]
2248 fn encode_is_copy() -> bool {
2249 true
2250 }
2251
2252 #[inline(always)]
2253 fn decode_is_copy() -> bool {
2254 false
2255 }
2256 }
2257
2258 impl fidl::encoding::ValueTypeMarker for DeletionError {
2259 type Borrowed<'a> = Self;
2260 #[inline(always)]
2261 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2262 *value
2263 }
2264 }
2265
2266 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DeletionError {
2267 #[inline]
2268 unsafe fn encode(
2269 self,
2270 encoder: &mut fidl::encoding::Encoder<'_, D>,
2271 offset: usize,
2272 _depth: fidl::encoding::Depth,
2273 ) -> fidl::Result<()> {
2274 encoder.debug_check_bounds::<Self>(offset);
2275 encoder.write_num(self.into_primitive(), offset);
2276 Ok(())
2277 }
2278 }
2279
2280 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DeletionError {
2281 #[inline(always)]
2282 fn new_empty() -> Self {
2283 Self::Connection
2284 }
2285
2286 #[inline]
2287 unsafe fn decode(
2288 &mut self,
2289 decoder: &mut fidl::encoding::Decoder<'_, D>,
2290 offset: usize,
2291 _depth: fidl::encoding::Depth,
2292 ) -> fidl::Result<()> {
2293 decoder.debug_check_bounds::<Self>(offset);
2294 let prim = decoder.read_num::<u32>(offset);
2295
2296 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
2297 Ok(())
2298 }
2299 }
2300 unsafe impl fidl::encoding::TypeMarker for DestroyError {
2301 type Owned = Self;
2302
2303 #[inline(always)]
2304 fn inline_align(_context: fidl::encoding::Context) -> usize {
2305 std::mem::align_of::<u32>()
2306 }
2307
2308 #[inline(always)]
2309 fn inline_size(_context: fidl::encoding::Context) -> usize {
2310 std::mem::size_of::<u32>()
2311 }
2312
2313 #[inline(always)]
2314 fn encode_is_copy() -> bool {
2315 false
2316 }
2317
2318 #[inline(always)]
2319 fn decode_is_copy() -> bool {
2320 false
2321 }
2322 }
2323
2324 impl fidl::encoding::ValueTypeMarker for DestroyError {
2325 type Borrowed<'a> = Self;
2326 #[inline(always)]
2327 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2328 *value
2329 }
2330 }
2331
2332 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for DestroyError {
2333 #[inline]
2334 unsafe fn encode(
2335 self,
2336 encoder: &mut fidl::encoding::Encoder<'_, D>,
2337 offset: usize,
2338 _depth: fidl::encoding::Depth,
2339 ) -> fidl::Result<()> {
2340 encoder.debug_check_bounds::<Self>(offset);
2341 encoder.write_num(self.into_primitive(), offset);
2342 Ok(())
2343 }
2344 }
2345
2346 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DestroyError {
2347 #[inline(always)]
2348 fn new_empty() -> Self {
2349 Self::unknown()
2350 }
2351
2352 #[inline]
2353 unsafe fn decode(
2354 &mut self,
2355 decoder: &mut fidl::encoding::Decoder<'_, D>,
2356 offset: usize,
2357 _depth: fidl::encoding::Depth,
2358 ) -> fidl::Result<()> {
2359 decoder.debug_check_bounds::<Self>(offset);
2360 let prim = decoder.read_num::<u32>(offset);
2361
2362 *self = Self::from_primitive_allow_unknown(prim);
2363 Ok(())
2364 }
2365 }
2366 unsafe impl fidl::encoding::TypeMarker for GetAllInstancesError {
2367 type Owned = Self;
2368
2369 #[inline(always)]
2370 fn inline_align(_context: fidl::encoding::Context) -> usize {
2371 std::mem::align_of::<u32>()
2372 }
2373
2374 #[inline(always)]
2375 fn inline_size(_context: fidl::encoding::Context) -> usize {
2376 std::mem::size_of::<u32>()
2377 }
2378
2379 #[inline(always)]
2380 fn encode_is_copy() -> bool {
2381 false
2382 }
2383
2384 #[inline(always)]
2385 fn decode_is_copy() -> bool {
2386 false
2387 }
2388 }
2389
2390 impl fidl::encoding::ValueTypeMarker for GetAllInstancesError {
2391 type Borrowed<'a> = Self;
2392 #[inline(always)]
2393 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2394 *value
2395 }
2396 }
2397
2398 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2399 for GetAllInstancesError
2400 {
2401 #[inline]
2402 unsafe fn encode(
2403 self,
2404 encoder: &mut fidl::encoding::Encoder<'_, D>,
2405 offset: usize,
2406 _depth: fidl::encoding::Depth,
2407 ) -> fidl::Result<()> {
2408 encoder.debug_check_bounds::<Self>(offset);
2409 encoder.write_num(self.into_primitive(), offset);
2410 Ok(())
2411 }
2412 }
2413
2414 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetAllInstancesError {
2415 #[inline(always)]
2416 fn new_empty() -> Self {
2417 Self::unknown()
2418 }
2419
2420 #[inline]
2421 unsafe fn decode(
2422 &mut self,
2423 decoder: &mut fidl::encoding::Decoder<'_, D>,
2424 offset: usize,
2425 _depth: fidl::encoding::Depth,
2426 ) -> fidl::Result<()> {
2427 decoder.debug_check_bounds::<Self>(offset);
2428 let prim = decoder.read_num::<u32>(offset);
2429
2430 *self = Self::from_primitive_allow_unknown(prim);
2431 Ok(())
2432 }
2433 }
2434 unsafe impl fidl::encoding::TypeMarker for GetDeclarationError {
2435 type Owned = Self;
2436
2437 #[inline(always)]
2438 fn inline_align(_context: fidl::encoding::Context) -> usize {
2439 std::mem::align_of::<u32>()
2440 }
2441
2442 #[inline(always)]
2443 fn inline_size(_context: fidl::encoding::Context) -> usize {
2444 std::mem::size_of::<u32>()
2445 }
2446
2447 #[inline(always)]
2448 fn encode_is_copy() -> bool {
2449 false
2450 }
2451
2452 #[inline(always)]
2453 fn decode_is_copy() -> bool {
2454 false
2455 }
2456 }
2457
2458 impl fidl::encoding::ValueTypeMarker for GetDeclarationError {
2459 type Borrowed<'a> = Self;
2460 #[inline(always)]
2461 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2462 *value
2463 }
2464 }
2465
2466 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2467 for GetDeclarationError
2468 {
2469 #[inline]
2470 unsafe fn encode(
2471 self,
2472 encoder: &mut fidl::encoding::Encoder<'_, D>,
2473 offset: usize,
2474 _depth: fidl::encoding::Depth,
2475 ) -> fidl::Result<()> {
2476 encoder.debug_check_bounds::<Self>(offset);
2477 encoder.write_num(self.into_primitive(), offset);
2478 Ok(())
2479 }
2480 }
2481
2482 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetDeclarationError {
2483 #[inline(always)]
2484 fn new_empty() -> Self {
2485 Self::unknown()
2486 }
2487
2488 #[inline]
2489 unsafe fn decode(
2490 &mut self,
2491 decoder: &mut fidl::encoding::Decoder<'_, D>,
2492 offset: usize,
2493 _depth: fidl::encoding::Depth,
2494 ) -> fidl::Result<()> {
2495 decoder.debug_check_bounds::<Self>(offset);
2496 let prim = decoder.read_num::<u32>(offset);
2497
2498 *self = Self::from_primitive_allow_unknown(prim);
2499 Ok(())
2500 }
2501 }
2502 unsafe impl fidl::encoding::TypeMarker for GetInstanceError {
2503 type Owned = Self;
2504
2505 #[inline(always)]
2506 fn inline_align(_context: fidl::encoding::Context) -> usize {
2507 std::mem::align_of::<u32>()
2508 }
2509
2510 #[inline(always)]
2511 fn inline_size(_context: fidl::encoding::Context) -> usize {
2512 std::mem::size_of::<u32>()
2513 }
2514
2515 #[inline(always)]
2516 fn encode_is_copy() -> bool {
2517 false
2518 }
2519
2520 #[inline(always)]
2521 fn decode_is_copy() -> bool {
2522 false
2523 }
2524 }
2525
2526 impl fidl::encoding::ValueTypeMarker for GetInstanceError {
2527 type Borrowed<'a> = Self;
2528 #[inline(always)]
2529 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2530 *value
2531 }
2532 }
2533
2534 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2535 for GetInstanceError
2536 {
2537 #[inline]
2538 unsafe fn encode(
2539 self,
2540 encoder: &mut fidl::encoding::Encoder<'_, D>,
2541 offset: usize,
2542 _depth: fidl::encoding::Depth,
2543 ) -> fidl::Result<()> {
2544 encoder.debug_check_bounds::<Self>(offset);
2545 encoder.write_num(self.into_primitive(), offset);
2546 Ok(())
2547 }
2548 }
2549
2550 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for GetInstanceError {
2551 #[inline(always)]
2552 fn new_empty() -> Self {
2553 Self::unknown()
2554 }
2555
2556 #[inline]
2557 unsafe fn decode(
2558 &mut self,
2559 decoder: &mut fidl::encoding::Decoder<'_, D>,
2560 offset: usize,
2561 _depth: fidl::encoding::Depth,
2562 ) -> fidl::Result<()> {
2563 decoder.debug_check_bounds::<Self>(offset);
2564 let prim = decoder.read_num::<u32>(offset);
2565
2566 *self = Self::from_primitive_allow_unknown(prim);
2567 Ok(())
2568 }
2569 }
2570 unsafe impl fidl::encoding::TypeMarker for GetStructuredConfigError {
2571 type Owned = Self;
2572
2573 #[inline(always)]
2574 fn inline_align(_context: fidl::encoding::Context) -> usize {
2575 std::mem::align_of::<u32>()
2576 }
2577
2578 #[inline(always)]
2579 fn inline_size(_context: fidl::encoding::Context) -> usize {
2580 std::mem::size_of::<u32>()
2581 }
2582
2583 #[inline(always)]
2584 fn encode_is_copy() -> bool {
2585 false
2586 }
2587
2588 #[inline(always)]
2589 fn decode_is_copy() -> bool {
2590 false
2591 }
2592 }
2593
2594 impl fidl::encoding::ValueTypeMarker for GetStructuredConfigError {
2595 type Borrowed<'a> = Self;
2596 #[inline(always)]
2597 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2598 *value
2599 }
2600 }
2601
2602 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2603 for GetStructuredConfigError
2604 {
2605 #[inline]
2606 unsafe fn encode(
2607 self,
2608 encoder: &mut fidl::encoding::Encoder<'_, D>,
2609 offset: usize,
2610 _depth: fidl::encoding::Depth,
2611 ) -> fidl::Result<()> {
2612 encoder.debug_check_bounds::<Self>(offset);
2613 encoder.write_num(self.into_primitive(), offset);
2614 Ok(())
2615 }
2616 }
2617
2618 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2619 for GetStructuredConfigError
2620 {
2621 #[inline(always)]
2622 fn new_empty() -> Self {
2623 Self::unknown()
2624 }
2625
2626 #[inline]
2627 unsafe fn decode(
2628 &mut self,
2629 decoder: &mut fidl::encoding::Decoder<'_, D>,
2630 offset: usize,
2631 _depth: fidl::encoding::Depth,
2632 ) -> fidl::Result<()> {
2633 decoder.debug_check_bounds::<Self>(offset);
2634 let prim = decoder.read_num::<u32>(offset);
2635
2636 *self = Self::from_primitive_allow_unknown(prim);
2637 Ok(())
2638 }
2639 }
2640 unsafe impl fidl::encoding::TypeMarker for OpenDirType {
2641 type Owned = Self;
2642
2643 #[inline(always)]
2644 fn inline_align(_context: fidl::encoding::Context) -> usize {
2645 std::mem::align_of::<u32>()
2646 }
2647
2648 #[inline(always)]
2649 fn inline_size(_context: fidl::encoding::Context) -> usize {
2650 std::mem::size_of::<u32>()
2651 }
2652
2653 #[inline(always)]
2654 fn encode_is_copy() -> bool {
2655 false
2656 }
2657
2658 #[inline(always)]
2659 fn decode_is_copy() -> bool {
2660 false
2661 }
2662 }
2663
2664 impl fidl::encoding::ValueTypeMarker for OpenDirType {
2665 type Borrowed<'a> = Self;
2666 #[inline(always)]
2667 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2668 *value
2669 }
2670 }
2671
2672 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenDirType {
2673 #[inline]
2674 unsafe fn encode(
2675 self,
2676 encoder: &mut fidl::encoding::Encoder<'_, D>,
2677 offset: usize,
2678 _depth: fidl::encoding::Depth,
2679 ) -> fidl::Result<()> {
2680 encoder.debug_check_bounds::<Self>(offset);
2681 encoder.write_num(self.into_primitive(), offset);
2682 Ok(())
2683 }
2684 }
2685
2686 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenDirType {
2687 #[inline(always)]
2688 fn new_empty() -> Self {
2689 Self::unknown()
2690 }
2691
2692 #[inline]
2693 unsafe fn decode(
2694 &mut self,
2695 decoder: &mut fidl::encoding::Decoder<'_, D>,
2696 offset: usize,
2697 _depth: fidl::encoding::Depth,
2698 ) -> fidl::Result<()> {
2699 decoder.debug_check_bounds::<Self>(offset);
2700 let prim = decoder.read_num::<u32>(offset);
2701
2702 *self = Self::from_primitive_allow_unknown(prim);
2703 Ok(())
2704 }
2705 }
2706 unsafe impl fidl::encoding::TypeMarker for OpenError {
2707 type Owned = Self;
2708
2709 #[inline(always)]
2710 fn inline_align(_context: fidl::encoding::Context) -> usize {
2711 std::mem::align_of::<u32>()
2712 }
2713
2714 #[inline(always)]
2715 fn inline_size(_context: fidl::encoding::Context) -> usize {
2716 std::mem::size_of::<u32>()
2717 }
2718
2719 #[inline(always)]
2720 fn encode_is_copy() -> bool {
2721 false
2722 }
2723
2724 #[inline(always)]
2725 fn decode_is_copy() -> bool {
2726 false
2727 }
2728 }
2729
2730 impl fidl::encoding::ValueTypeMarker for OpenError {
2731 type Borrowed<'a> = Self;
2732 #[inline(always)]
2733 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2734 *value
2735 }
2736 }
2737
2738 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for OpenError {
2739 #[inline]
2740 unsafe fn encode(
2741 self,
2742 encoder: &mut fidl::encoding::Encoder<'_, D>,
2743 offset: usize,
2744 _depth: fidl::encoding::Depth,
2745 ) -> fidl::Result<()> {
2746 encoder.debug_check_bounds::<Self>(offset);
2747 encoder.write_num(self.into_primitive(), offset);
2748 Ok(())
2749 }
2750 }
2751
2752 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for OpenError {
2753 #[inline(always)]
2754 fn new_empty() -> Self {
2755 Self::unknown()
2756 }
2757
2758 #[inline]
2759 unsafe fn decode(
2760 &mut self,
2761 decoder: &mut fidl::encoding::Decoder<'_, D>,
2762 offset: usize,
2763 _depth: fidl::encoding::Depth,
2764 ) -> fidl::Result<()> {
2765 decoder.debug_check_bounds::<Self>(offset);
2766 let prim = decoder.read_num::<u32>(offset);
2767
2768 *self = Self::from_primitive_allow_unknown(prim);
2769 Ok(())
2770 }
2771 }
2772 unsafe impl fidl::encoding::TypeMarker for RealmQueryError {
2773 type Owned = Self;
2774
2775 #[inline(always)]
2776 fn inline_align(_context: fidl::encoding::Context) -> usize {
2777 std::mem::align_of::<u32>()
2778 }
2779
2780 #[inline(always)]
2781 fn inline_size(_context: fidl::encoding::Context) -> usize {
2782 std::mem::size_of::<u32>()
2783 }
2784
2785 #[inline(always)]
2786 fn encode_is_copy() -> bool {
2787 false
2788 }
2789
2790 #[inline(always)]
2791 fn decode_is_copy() -> bool {
2792 false
2793 }
2794 }
2795
2796 impl fidl::encoding::ValueTypeMarker for RealmQueryError {
2797 type Borrowed<'a> = Self;
2798 #[inline(always)]
2799 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2800 *value
2801 }
2802 }
2803
2804 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
2805 for RealmQueryError
2806 {
2807 #[inline]
2808 unsafe fn encode(
2809 self,
2810 encoder: &mut fidl::encoding::Encoder<'_, D>,
2811 offset: usize,
2812 _depth: fidl::encoding::Depth,
2813 ) -> fidl::Result<()> {
2814 encoder.debug_check_bounds::<Self>(offset);
2815 encoder.write_num(self.into_primitive(), offset);
2816 Ok(())
2817 }
2818 }
2819
2820 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RealmQueryError {
2821 #[inline(always)]
2822 fn new_empty() -> Self {
2823 Self::unknown()
2824 }
2825
2826 #[inline]
2827 unsafe fn decode(
2828 &mut self,
2829 decoder: &mut fidl::encoding::Decoder<'_, D>,
2830 offset: usize,
2831 _depth: fidl::encoding::Depth,
2832 ) -> fidl::Result<()> {
2833 decoder.debug_check_bounds::<Self>(offset);
2834 let prim = decoder.read_num::<u32>(offset);
2835
2836 *self = Self::from_primitive_allow_unknown(prim);
2837 Ok(())
2838 }
2839 }
2840 unsafe impl fidl::encoding::TypeMarker for ResolveError {
2841 type Owned = Self;
2842
2843 #[inline(always)]
2844 fn inline_align(_context: fidl::encoding::Context) -> usize {
2845 std::mem::align_of::<u32>()
2846 }
2847
2848 #[inline(always)]
2849 fn inline_size(_context: fidl::encoding::Context) -> usize {
2850 std::mem::size_of::<u32>()
2851 }
2852
2853 #[inline(always)]
2854 fn encode_is_copy() -> bool {
2855 false
2856 }
2857
2858 #[inline(always)]
2859 fn decode_is_copy() -> bool {
2860 false
2861 }
2862 }
2863
2864 impl fidl::encoding::ValueTypeMarker for ResolveError {
2865 type Borrowed<'a> = Self;
2866 #[inline(always)]
2867 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2868 *value
2869 }
2870 }
2871
2872 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for ResolveError {
2873 #[inline]
2874 unsafe fn encode(
2875 self,
2876 encoder: &mut fidl::encoding::Encoder<'_, D>,
2877 offset: usize,
2878 _depth: fidl::encoding::Depth,
2879 ) -> fidl::Result<()> {
2880 encoder.debug_check_bounds::<Self>(offset);
2881 encoder.write_num(self.into_primitive(), offset);
2882 Ok(())
2883 }
2884 }
2885
2886 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolveError {
2887 #[inline(always)]
2888 fn new_empty() -> Self {
2889 Self::unknown()
2890 }
2891
2892 #[inline]
2893 unsafe fn decode(
2894 &mut self,
2895 decoder: &mut fidl::encoding::Decoder<'_, D>,
2896 offset: usize,
2897 _depth: fidl::encoding::Depth,
2898 ) -> fidl::Result<()> {
2899 decoder.debug_check_bounds::<Self>(offset);
2900 let prim = decoder.read_num::<u32>(offset);
2901
2902 *self = Self::from_primitive_allow_unknown(prim);
2903 Ok(())
2904 }
2905 }
2906 unsafe impl fidl::encoding::TypeMarker for RouteOutcome {
2907 type Owned = Self;
2908
2909 #[inline(always)]
2910 fn inline_align(_context: fidl::encoding::Context) -> usize {
2911 std::mem::align_of::<u32>()
2912 }
2913
2914 #[inline(always)]
2915 fn inline_size(_context: fidl::encoding::Context) -> usize {
2916 std::mem::size_of::<u32>()
2917 }
2918
2919 #[inline(always)]
2920 fn encode_is_copy() -> bool {
2921 false
2922 }
2923
2924 #[inline(always)]
2925 fn decode_is_copy() -> bool {
2926 false
2927 }
2928 }
2929
2930 impl fidl::encoding::ValueTypeMarker for RouteOutcome {
2931 type Borrowed<'a> = Self;
2932 #[inline(always)]
2933 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2934 *value
2935 }
2936 }
2937
2938 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for RouteOutcome {
2939 #[inline]
2940 unsafe fn encode(
2941 self,
2942 encoder: &mut fidl::encoding::Encoder<'_, D>,
2943 offset: usize,
2944 _depth: fidl::encoding::Depth,
2945 ) -> fidl::Result<()> {
2946 encoder.debug_check_bounds::<Self>(offset);
2947 encoder.write_num(self.into_primitive(), offset);
2948 Ok(())
2949 }
2950 }
2951
2952 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteOutcome {
2953 #[inline(always)]
2954 fn new_empty() -> Self {
2955 Self::unknown()
2956 }
2957
2958 #[inline]
2959 unsafe fn decode(
2960 &mut self,
2961 decoder: &mut fidl::encoding::Decoder<'_, D>,
2962 offset: usize,
2963 _depth: fidl::encoding::Depth,
2964 ) -> fidl::Result<()> {
2965 decoder.debug_check_bounds::<Self>(offset);
2966 let prim = decoder.read_num::<u32>(offset);
2967
2968 *self = Self::from_primitive_allow_unknown(prim);
2969 Ok(())
2970 }
2971 }
2972 unsafe impl fidl::encoding::TypeMarker for RouteValidatorError {
2973 type Owned = Self;
2974
2975 #[inline(always)]
2976 fn inline_align(_context: fidl::encoding::Context) -> usize {
2977 std::mem::align_of::<u32>()
2978 }
2979
2980 #[inline(always)]
2981 fn inline_size(_context: fidl::encoding::Context) -> usize {
2982 std::mem::size_of::<u32>()
2983 }
2984
2985 #[inline(always)]
2986 fn encode_is_copy() -> bool {
2987 false
2988 }
2989
2990 #[inline(always)]
2991 fn decode_is_copy() -> bool {
2992 false
2993 }
2994 }
2995
2996 impl fidl::encoding::ValueTypeMarker for RouteValidatorError {
2997 type Borrowed<'a> = Self;
2998 #[inline(always)]
2999 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3000 *value
3001 }
3002 }
3003
3004 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
3005 for RouteValidatorError
3006 {
3007 #[inline]
3008 unsafe fn encode(
3009 self,
3010 encoder: &mut fidl::encoding::Encoder<'_, D>,
3011 offset: usize,
3012 _depth: fidl::encoding::Depth,
3013 ) -> fidl::Result<()> {
3014 encoder.debug_check_bounds::<Self>(offset);
3015 encoder.write_num(self.into_primitive(), offset);
3016 Ok(())
3017 }
3018 }
3019
3020 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteValidatorError {
3021 #[inline(always)]
3022 fn new_empty() -> Self {
3023 Self::unknown()
3024 }
3025
3026 #[inline]
3027 unsafe fn decode(
3028 &mut self,
3029 decoder: &mut fidl::encoding::Decoder<'_, D>,
3030 offset: usize,
3031 _depth: fidl::encoding::Depth,
3032 ) -> fidl::Result<()> {
3033 decoder.debug_check_bounds::<Self>(offset);
3034 let prim = decoder.read_num::<u32>(offset);
3035
3036 *self = Self::from_primitive_allow_unknown(prim);
3037 Ok(())
3038 }
3039 }
3040 unsafe impl fidl::encoding::TypeMarker for StartError {
3041 type Owned = Self;
3042
3043 #[inline(always)]
3044 fn inline_align(_context: fidl::encoding::Context) -> usize {
3045 std::mem::align_of::<u32>()
3046 }
3047
3048 #[inline(always)]
3049 fn inline_size(_context: fidl::encoding::Context) -> usize {
3050 std::mem::size_of::<u32>()
3051 }
3052
3053 #[inline(always)]
3054 fn encode_is_copy() -> bool {
3055 false
3056 }
3057
3058 #[inline(always)]
3059 fn decode_is_copy() -> bool {
3060 false
3061 }
3062 }
3063
3064 impl fidl::encoding::ValueTypeMarker for StartError {
3065 type Borrowed<'a> = Self;
3066 #[inline(always)]
3067 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3068 *value
3069 }
3070 }
3071
3072 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StartError {
3073 #[inline]
3074 unsafe fn encode(
3075 self,
3076 encoder: &mut fidl::encoding::Encoder<'_, D>,
3077 offset: usize,
3078 _depth: fidl::encoding::Depth,
3079 ) -> fidl::Result<()> {
3080 encoder.debug_check_bounds::<Self>(offset);
3081 encoder.write_num(self.into_primitive(), offset);
3082 Ok(())
3083 }
3084 }
3085
3086 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StartError {
3087 #[inline(always)]
3088 fn new_empty() -> Self {
3089 Self::unknown()
3090 }
3091
3092 #[inline]
3093 unsafe fn decode(
3094 &mut self,
3095 decoder: &mut fidl::encoding::Decoder<'_, D>,
3096 offset: usize,
3097 _depth: fidl::encoding::Depth,
3098 ) -> fidl::Result<()> {
3099 decoder.debug_check_bounds::<Self>(offset);
3100 let prim = decoder.read_num::<u32>(offset);
3101
3102 *self = Self::from_primitive_allow_unknown(prim);
3103 Ok(())
3104 }
3105 }
3106 unsafe impl fidl::encoding::TypeMarker for StatusError {
3107 type Owned = Self;
3108
3109 #[inline(always)]
3110 fn inline_align(_context: fidl::encoding::Context) -> usize {
3111 std::mem::align_of::<u32>()
3112 }
3113
3114 #[inline(always)]
3115 fn inline_size(_context: fidl::encoding::Context) -> usize {
3116 std::mem::size_of::<u32>()
3117 }
3118
3119 #[inline(always)]
3120 fn encode_is_copy() -> bool {
3121 true
3122 }
3123
3124 #[inline(always)]
3125 fn decode_is_copy() -> bool {
3126 false
3127 }
3128 }
3129
3130 impl fidl::encoding::ValueTypeMarker for StatusError {
3131 type Borrowed<'a> = Self;
3132 #[inline(always)]
3133 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3134 *value
3135 }
3136 }
3137
3138 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StatusError {
3139 #[inline]
3140 unsafe fn encode(
3141 self,
3142 encoder: &mut fidl::encoding::Encoder<'_, D>,
3143 offset: usize,
3144 _depth: fidl::encoding::Depth,
3145 ) -> fidl::Result<()> {
3146 encoder.debug_check_bounds::<Self>(offset);
3147 encoder.write_num(self.into_primitive(), offset);
3148 Ok(())
3149 }
3150 }
3151
3152 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StatusError {
3153 #[inline(always)]
3154 fn new_empty() -> Self {
3155 Self::Provider
3156 }
3157
3158 #[inline]
3159 unsafe fn decode(
3160 &mut self,
3161 decoder: &mut fidl::encoding::Decoder<'_, D>,
3162 offset: usize,
3163 _depth: fidl::encoding::Depth,
3164 ) -> fidl::Result<()> {
3165 decoder.debug_check_bounds::<Self>(offset);
3166 let prim = decoder.read_num::<u32>(offset);
3167
3168 *self = Self::from_primitive(prim).ok_or(fidl::Error::InvalidEnumValue)?;
3169 Ok(())
3170 }
3171 }
3172 unsafe impl fidl::encoding::TypeMarker for StopError {
3173 type Owned = Self;
3174
3175 #[inline(always)]
3176 fn inline_align(_context: fidl::encoding::Context) -> usize {
3177 std::mem::align_of::<u32>()
3178 }
3179
3180 #[inline(always)]
3181 fn inline_size(_context: fidl::encoding::Context) -> usize {
3182 std::mem::size_of::<u32>()
3183 }
3184
3185 #[inline(always)]
3186 fn encode_is_copy() -> bool {
3187 false
3188 }
3189
3190 #[inline(always)]
3191 fn decode_is_copy() -> bool {
3192 false
3193 }
3194 }
3195
3196 impl fidl::encoding::ValueTypeMarker for StopError {
3197 type Borrowed<'a> = Self;
3198 #[inline(always)]
3199 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3200 *value
3201 }
3202 }
3203
3204 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for StopError {
3205 #[inline]
3206 unsafe fn encode(
3207 self,
3208 encoder: &mut fidl::encoding::Encoder<'_, D>,
3209 offset: usize,
3210 _depth: fidl::encoding::Depth,
3211 ) -> fidl::Result<()> {
3212 encoder.debug_check_bounds::<Self>(offset);
3213 encoder.write_num(self.into_primitive(), offset);
3214 Ok(())
3215 }
3216 }
3217
3218 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StopError {
3219 #[inline(always)]
3220 fn new_empty() -> Self {
3221 Self::unknown()
3222 }
3223
3224 #[inline]
3225 unsafe fn decode(
3226 &mut self,
3227 decoder: &mut fidl::encoding::Decoder<'_, D>,
3228 offset: usize,
3229 _depth: fidl::encoding::Depth,
3230 ) -> fidl::Result<()> {
3231 decoder.debug_check_bounds::<Self>(offset);
3232 let prim = decoder.read_num::<u32>(offset);
3233
3234 *self = Self::from_primitive_allow_unknown(prim);
3235 Ok(())
3236 }
3237 }
3238 unsafe impl fidl::encoding::TypeMarker for UnresolveError {
3239 type Owned = Self;
3240
3241 #[inline(always)]
3242 fn inline_align(_context: fidl::encoding::Context) -> usize {
3243 std::mem::align_of::<u32>()
3244 }
3245
3246 #[inline(always)]
3247 fn inline_size(_context: fidl::encoding::Context) -> usize {
3248 std::mem::size_of::<u32>()
3249 }
3250
3251 #[inline(always)]
3252 fn encode_is_copy() -> bool {
3253 false
3254 }
3255
3256 #[inline(always)]
3257 fn decode_is_copy() -> bool {
3258 false
3259 }
3260 }
3261
3262 impl fidl::encoding::ValueTypeMarker for UnresolveError {
3263 type Borrowed<'a> = Self;
3264 #[inline(always)]
3265 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3266 *value
3267 }
3268 }
3269
3270 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for UnresolveError {
3271 #[inline]
3272 unsafe fn encode(
3273 self,
3274 encoder: &mut fidl::encoding::Encoder<'_, D>,
3275 offset: usize,
3276 _depth: fidl::encoding::Depth,
3277 ) -> fidl::Result<()> {
3278 encoder.debug_check_bounds::<Self>(offset);
3279 encoder.write_num(self.into_primitive(), offset);
3280 Ok(())
3281 }
3282 }
3283
3284 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for UnresolveError {
3285 #[inline(always)]
3286 fn new_empty() -> Self {
3287 Self::unknown()
3288 }
3289
3290 #[inline]
3291 unsafe fn decode(
3292 &mut self,
3293 decoder: &mut fidl::encoding::Decoder<'_, D>,
3294 offset: usize,
3295 _depth: fidl::encoding::Depth,
3296 ) -> fidl::Result<()> {
3297 decoder.debug_check_bounds::<Self>(offset);
3298 let prim = decoder.read_num::<u32>(offset);
3299
3300 *self = Self::from_primitive_allow_unknown(prim);
3301 Ok(())
3302 }
3303 }
3304
3305 impl fidl::encoding::ValueTypeMarker for ConfigOverrideSetStructuredConfigRequest {
3306 type Borrowed<'a> = &'a Self;
3307 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3308 value
3309 }
3310 }
3311
3312 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideSetStructuredConfigRequest {
3313 type Owned = Self;
3314
3315 #[inline(always)]
3316 fn inline_align(_context: fidl::encoding::Context) -> usize {
3317 8
3318 }
3319
3320 #[inline(always)]
3321 fn inline_size(_context: fidl::encoding::Context) -> usize {
3322 32
3323 }
3324 }
3325
3326 unsafe impl<D: fidl::encoding::ResourceDialect>
3327 fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D>
3328 for &ConfigOverrideSetStructuredConfigRequest
3329 {
3330 #[inline]
3331 unsafe fn encode(
3332 self,
3333 encoder: &mut fidl::encoding::Encoder<'_, D>,
3334 offset: usize,
3335 _depth: fidl::encoding::Depth,
3336 ) -> fidl::Result<()> {
3337 encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3338 fidl::encoding::Encode::<ConfigOverrideSetStructuredConfigRequest, D>::encode(
3340 (
3341 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
3342 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl__common::ConfigOverride> as fidl::encoding::ValueTypeMarker>::borrow(&self.fields),
3343 ),
3344 encoder, offset, _depth
3345 )
3346 }
3347 }
3348 unsafe impl<
3349 D: fidl::encoding::ResourceDialect,
3350 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3351 T1: fidl::encoding::Encode<
3352 fidl::encoding::UnboundedVector<
3353 fidl_fuchsia_component_decl__common::ConfigOverride,
3354 >,
3355 D,
3356 >,
3357 > fidl::encoding::Encode<ConfigOverrideSetStructuredConfigRequest, D> for (T0, T1)
3358 {
3359 #[inline]
3360 unsafe fn encode(
3361 self,
3362 encoder: &mut fidl::encoding::Encoder<'_, D>,
3363 offset: usize,
3364 depth: fidl::encoding::Depth,
3365 ) -> fidl::Result<()> {
3366 encoder.debug_check_bounds::<ConfigOverrideSetStructuredConfigRequest>(offset);
3367 self.0.encode(encoder, offset + 0, depth)?;
3371 self.1.encode(encoder, offset + 16, depth)?;
3372 Ok(())
3373 }
3374 }
3375
3376 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3377 for ConfigOverrideSetStructuredConfigRequest
3378 {
3379 #[inline(always)]
3380 fn new_empty() -> Self {
3381 Self {
3382 moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3383 fields: fidl::new_empty!(
3384 fidl::encoding::UnboundedVector<
3385 fidl_fuchsia_component_decl__common::ConfigOverride,
3386 >,
3387 D
3388 ),
3389 }
3390 }
3391
3392 #[inline]
3393 unsafe fn decode(
3394 &mut self,
3395 decoder: &mut fidl::encoding::Decoder<'_, D>,
3396 offset: usize,
3397 _depth: fidl::encoding::Depth,
3398 ) -> fidl::Result<()> {
3399 decoder.debug_check_bounds::<Self>(offset);
3400 fidl::decode!(
3402 fidl::encoding::BoundedString<4096>,
3403 D,
3404 &mut self.moniker,
3405 decoder,
3406 offset + 0,
3407 _depth
3408 )?;
3409 fidl::decode!(
3410 fidl::encoding::UnboundedVector<
3411 fidl_fuchsia_component_decl__common::ConfigOverride,
3412 >,
3413 D,
3414 &mut self.fields,
3415 decoder,
3416 offset + 16,
3417 _depth
3418 )?;
3419 Ok(())
3420 }
3421 }
3422
3423 impl fidl::encoding::ValueTypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3424 type Borrowed<'a> = &'a Self;
3425 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3426 value
3427 }
3428 }
3429
3430 unsafe impl fidl::encoding::TypeMarker for ConfigOverrideUnsetStructuredConfigRequest {
3431 type Owned = Self;
3432
3433 #[inline(always)]
3434 fn inline_align(_context: fidl::encoding::Context) -> usize {
3435 8
3436 }
3437
3438 #[inline(always)]
3439 fn inline_size(_context: fidl::encoding::Context) -> usize {
3440 16
3441 }
3442 }
3443
3444 unsafe impl<D: fidl::encoding::ResourceDialect>
3445 fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D>
3446 for &ConfigOverrideUnsetStructuredConfigRequest
3447 {
3448 #[inline]
3449 unsafe fn encode(
3450 self,
3451 encoder: &mut fidl::encoding::Encoder<'_, D>,
3452 offset: usize,
3453 _depth: fidl::encoding::Depth,
3454 ) -> fidl::Result<()> {
3455 encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3456 fidl::encoding::Encode::<ConfigOverrideUnsetStructuredConfigRequest, D>::encode(
3458 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3459 &self.moniker,
3460 ),),
3461 encoder,
3462 offset,
3463 _depth,
3464 )
3465 }
3466 }
3467 unsafe impl<
3468 D: fidl::encoding::ResourceDialect,
3469 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3470 > fidl::encoding::Encode<ConfigOverrideUnsetStructuredConfigRequest, D> for (T0,)
3471 {
3472 #[inline]
3473 unsafe fn encode(
3474 self,
3475 encoder: &mut fidl::encoding::Encoder<'_, D>,
3476 offset: usize,
3477 depth: fidl::encoding::Depth,
3478 ) -> fidl::Result<()> {
3479 encoder.debug_check_bounds::<ConfigOverrideUnsetStructuredConfigRequest>(offset);
3480 self.0.encode(encoder, offset + 0, depth)?;
3484 Ok(())
3485 }
3486 }
3487
3488 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3489 for ConfigOverrideUnsetStructuredConfigRequest
3490 {
3491 #[inline(always)]
3492 fn new_empty() -> Self {
3493 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3494 }
3495
3496 #[inline]
3497 unsafe fn decode(
3498 &mut self,
3499 decoder: &mut fidl::encoding::Decoder<'_, D>,
3500 offset: usize,
3501 _depth: fidl::encoding::Depth,
3502 ) -> fidl::Result<()> {
3503 decoder.debug_check_bounds::<Self>(offset);
3504 fidl::decode!(
3506 fidl::encoding::BoundedString<4096>,
3507 D,
3508 &mut self.moniker,
3509 decoder,
3510 offset + 0,
3511 _depth
3512 )?;
3513 Ok(())
3514 }
3515 }
3516
3517 impl fidl::encoding::ValueTypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3518 type Borrowed<'a> = &'a Self;
3519 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3520 value
3521 }
3522 }
3523
3524 unsafe impl fidl::encoding::TypeMarker for CrashIntrospectFindComponentByThreadKoidResponse {
3525 type Owned = Self;
3526
3527 #[inline(always)]
3528 fn inline_align(_context: fidl::encoding::Context) -> usize {
3529 8
3530 }
3531
3532 #[inline(always)]
3533 fn inline_size(_context: fidl::encoding::Context) -> usize {
3534 16
3535 }
3536 }
3537
3538 unsafe impl<D: fidl::encoding::ResourceDialect>
3539 fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D>
3540 for &CrashIntrospectFindComponentByThreadKoidResponse
3541 {
3542 #[inline]
3543 unsafe fn encode(
3544 self,
3545 encoder: &mut fidl::encoding::Encoder<'_, D>,
3546 offset: usize,
3547 _depth: fidl::encoding::Depth,
3548 ) -> fidl::Result<()> {
3549 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3550 fidl::encoding::Encode::<CrashIntrospectFindComponentByThreadKoidResponse, D>::encode(
3552 (<ComponentCrashInfo as fidl::encoding::ValueTypeMarker>::borrow(&self.info),),
3553 encoder,
3554 offset,
3555 _depth,
3556 )
3557 }
3558 }
3559 unsafe impl<
3560 D: fidl::encoding::ResourceDialect,
3561 T0: fidl::encoding::Encode<ComponentCrashInfo, D>,
3562 > fidl::encoding::Encode<CrashIntrospectFindComponentByThreadKoidResponse, D> for (T0,)
3563 {
3564 #[inline]
3565 unsafe fn encode(
3566 self,
3567 encoder: &mut fidl::encoding::Encoder<'_, D>,
3568 offset: usize,
3569 depth: fidl::encoding::Depth,
3570 ) -> fidl::Result<()> {
3571 encoder.debug_check_bounds::<CrashIntrospectFindComponentByThreadKoidResponse>(offset);
3572 self.0.encode(encoder, offset + 0, depth)?;
3576 Ok(())
3577 }
3578 }
3579
3580 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3581 for CrashIntrospectFindComponentByThreadKoidResponse
3582 {
3583 #[inline(always)]
3584 fn new_empty() -> Self {
3585 Self { info: fidl::new_empty!(ComponentCrashInfo, D) }
3586 }
3587
3588 #[inline]
3589 unsafe fn decode(
3590 &mut self,
3591 decoder: &mut fidl::encoding::Decoder<'_, D>,
3592 offset: usize,
3593 _depth: fidl::encoding::Depth,
3594 ) -> fidl::Result<()> {
3595 decoder.debug_check_bounds::<Self>(offset);
3596 fidl::decode!(ComponentCrashInfo, D, &mut self.info, decoder, offset + 0, _depth)?;
3598 Ok(())
3599 }
3600 }
3601
3602 impl fidl::encoding::ValueTypeMarker for InstanceIteratorNextResponse {
3603 type Borrowed<'a> = &'a Self;
3604 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3605 value
3606 }
3607 }
3608
3609 unsafe impl fidl::encoding::TypeMarker for InstanceIteratorNextResponse {
3610 type Owned = Self;
3611
3612 #[inline(always)]
3613 fn inline_align(_context: fidl::encoding::Context) -> usize {
3614 8
3615 }
3616
3617 #[inline(always)]
3618 fn inline_size(_context: fidl::encoding::Context) -> usize {
3619 16
3620 }
3621 }
3622
3623 unsafe impl<D: fidl::encoding::ResourceDialect>
3624 fidl::encoding::Encode<InstanceIteratorNextResponse, D> for &InstanceIteratorNextResponse
3625 {
3626 #[inline]
3627 unsafe fn encode(
3628 self,
3629 encoder: &mut fidl::encoding::Encoder<'_, D>,
3630 offset: usize,
3631 _depth: fidl::encoding::Depth,
3632 ) -> fidl::Result<()> {
3633 encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3634 fidl::encoding::Encode::<InstanceIteratorNextResponse, D>::encode(
3636 (
3637 <fidl::encoding::UnboundedVector<Instance> as fidl::encoding::ValueTypeMarker>::borrow(&self.infos),
3638 ),
3639 encoder, offset, _depth
3640 )
3641 }
3642 }
3643 unsafe impl<
3644 D: fidl::encoding::ResourceDialect,
3645 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Instance>, D>,
3646 > fidl::encoding::Encode<InstanceIteratorNextResponse, D> for (T0,)
3647 {
3648 #[inline]
3649 unsafe fn encode(
3650 self,
3651 encoder: &mut fidl::encoding::Encoder<'_, D>,
3652 offset: usize,
3653 depth: fidl::encoding::Depth,
3654 ) -> fidl::Result<()> {
3655 encoder.debug_check_bounds::<InstanceIteratorNextResponse>(offset);
3656 self.0.encode(encoder, offset + 0, depth)?;
3660 Ok(())
3661 }
3662 }
3663
3664 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3665 for InstanceIteratorNextResponse
3666 {
3667 #[inline(always)]
3668 fn new_empty() -> Self {
3669 Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<Instance>, D) }
3670 }
3671
3672 #[inline]
3673 unsafe fn decode(
3674 &mut self,
3675 decoder: &mut fidl::encoding::Decoder<'_, D>,
3676 offset: usize,
3677 _depth: fidl::encoding::Depth,
3678 ) -> fidl::Result<()> {
3679 decoder.debug_check_bounds::<Self>(offset);
3680 fidl::decode!(
3682 fidl::encoding::UnboundedVector<Instance>,
3683 D,
3684 &mut self.infos,
3685 decoder,
3686 offset + 0,
3687 _depth
3688 )?;
3689 Ok(())
3690 }
3691 }
3692
3693 impl fidl::encoding::ValueTypeMarker for LifecycleControllerDestroyInstanceRequest {
3694 type Borrowed<'a> = &'a Self;
3695 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3696 value
3697 }
3698 }
3699
3700 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerDestroyInstanceRequest {
3701 type Owned = Self;
3702
3703 #[inline(always)]
3704 fn inline_align(_context: fidl::encoding::Context) -> usize {
3705 8
3706 }
3707
3708 #[inline(always)]
3709 fn inline_size(_context: fidl::encoding::Context) -> usize {
3710 48
3711 }
3712 }
3713
3714 unsafe impl<D: fidl::encoding::ResourceDialect>
3715 fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D>
3716 for &LifecycleControllerDestroyInstanceRequest
3717 {
3718 #[inline]
3719 unsafe fn encode(
3720 self,
3721 encoder: &mut fidl::encoding::Encoder<'_, D>,
3722 offset: usize,
3723 _depth: fidl::encoding::Depth,
3724 ) -> fidl::Result<()> {
3725 encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3726 fidl::encoding::Encode::<LifecycleControllerDestroyInstanceRequest, D>::encode(
3728 (
3729 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent_moniker),
3730 <fidl_fuchsia_component_decl__common::ChildRef as fidl::encoding::ValueTypeMarker>::borrow(&self.child),
3731 ),
3732 encoder, offset, _depth
3733 )
3734 }
3735 }
3736 unsafe impl<
3737 D: fidl::encoding::ResourceDialect,
3738 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3739 T1: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ChildRef, D>,
3740 > fidl::encoding::Encode<LifecycleControllerDestroyInstanceRequest, D> for (T0, T1)
3741 {
3742 #[inline]
3743 unsafe fn encode(
3744 self,
3745 encoder: &mut fidl::encoding::Encoder<'_, D>,
3746 offset: usize,
3747 depth: fidl::encoding::Depth,
3748 ) -> fidl::Result<()> {
3749 encoder.debug_check_bounds::<LifecycleControllerDestroyInstanceRequest>(offset);
3750 self.0.encode(encoder, offset + 0, depth)?;
3754 self.1.encode(encoder, offset + 16, depth)?;
3755 Ok(())
3756 }
3757 }
3758
3759 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3760 for LifecycleControllerDestroyInstanceRequest
3761 {
3762 #[inline(always)]
3763 fn new_empty() -> Self {
3764 Self {
3765 parent_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
3766 child: fidl::new_empty!(fidl_fuchsia_component_decl__common::ChildRef, D),
3767 }
3768 }
3769
3770 #[inline]
3771 unsafe fn decode(
3772 &mut self,
3773 decoder: &mut fidl::encoding::Decoder<'_, D>,
3774 offset: usize,
3775 _depth: fidl::encoding::Depth,
3776 ) -> fidl::Result<()> {
3777 decoder.debug_check_bounds::<Self>(offset);
3778 fidl::decode!(
3780 fidl::encoding::BoundedString<4096>,
3781 D,
3782 &mut self.parent_moniker,
3783 decoder,
3784 offset + 0,
3785 _depth
3786 )?;
3787 fidl::decode!(
3788 fidl_fuchsia_component_decl__common::ChildRef,
3789 D,
3790 &mut self.child,
3791 decoder,
3792 offset + 16,
3793 _depth
3794 )?;
3795 Ok(())
3796 }
3797 }
3798
3799 impl fidl::encoding::ValueTypeMarker for LifecycleControllerResolveInstanceRequest {
3800 type Borrowed<'a> = &'a Self;
3801 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3802 value
3803 }
3804 }
3805
3806 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerResolveInstanceRequest {
3807 type Owned = Self;
3808
3809 #[inline(always)]
3810 fn inline_align(_context: fidl::encoding::Context) -> usize {
3811 8
3812 }
3813
3814 #[inline(always)]
3815 fn inline_size(_context: fidl::encoding::Context) -> usize {
3816 16
3817 }
3818 }
3819
3820 unsafe impl<D: fidl::encoding::ResourceDialect>
3821 fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D>
3822 for &LifecycleControllerResolveInstanceRequest
3823 {
3824 #[inline]
3825 unsafe fn encode(
3826 self,
3827 encoder: &mut fidl::encoding::Encoder<'_, D>,
3828 offset: usize,
3829 _depth: fidl::encoding::Depth,
3830 ) -> fidl::Result<()> {
3831 encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3832 fidl::encoding::Encode::<LifecycleControllerResolveInstanceRequest, D>::encode(
3834 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3835 &self.moniker,
3836 ),),
3837 encoder,
3838 offset,
3839 _depth,
3840 )
3841 }
3842 }
3843 unsafe impl<
3844 D: fidl::encoding::ResourceDialect,
3845 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3846 > fidl::encoding::Encode<LifecycleControllerResolveInstanceRequest, D> for (T0,)
3847 {
3848 #[inline]
3849 unsafe fn encode(
3850 self,
3851 encoder: &mut fidl::encoding::Encoder<'_, D>,
3852 offset: usize,
3853 depth: fidl::encoding::Depth,
3854 ) -> fidl::Result<()> {
3855 encoder.debug_check_bounds::<LifecycleControllerResolveInstanceRequest>(offset);
3856 self.0.encode(encoder, offset + 0, depth)?;
3860 Ok(())
3861 }
3862 }
3863
3864 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3865 for LifecycleControllerResolveInstanceRequest
3866 {
3867 #[inline(always)]
3868 fn new_empty() -> Self {
3869 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3870 }
3871
3872 #[inline]
3873 unsafe fn decode(
3874 &mut self,
3875 decoder: &mut fidl::encoding::Decoder<'_, D>,
3876 offset: usize,
3877 _depth: fidl::encoding::Depth,
3878 ) -> fidl::Result<()> {
3879 decoder.debug_check_bounds::<Self>(offset);
3880 fidl::decode!(
3882 fidl::encoding::BoundedString<4096>,
3883 D,
3884 &mut self.moniker,
3885 decoder,
3886 offset + 0,
3887 _depth
3888 )?;
3889 Ok(())
3890 }
3891 }
3892
3893 impl fidl::encoding::ValueTypeMarker for LifecycleControllerStopInstanceRequest {
3894 type Borrowed<'a> = &'a Self;
3895 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3896 value
3897 }
3898 }
3899
3900 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerStopInstanceRequest {
3901 type Owned = Self;
3902
3903 #[inline(always)]
3904 fn inline_align(_context: fidl::encoding::Context) -> usize {
3905 8
3906 }
3907
3908 #[inline(always)]
3909 fn inline_size(_context: fidl::encoding::Context) -> usize {
3910 16
3911 }
3912 }
3913
3914 unsafe impl<D: fidl::encoding::ResourceDialect>
3915 fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D>
3916 for &LifecycleControllerStopInstanceRequest
3917 {
3918 #[inline]
3919 unsafe fn encode(
3920 self,
3921 encoder: &mut fidl::encoding::Encoder<'_, D>,
3922 offset: usize,
3923 _depth: fidl::encoding::Depth,
3924 ) -> fidl::Result<()> {
3925 encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3926 fidl::encoding::Encode::<LifecycleControllerStopInstanceRequest, D>::encode(
3928 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
3929 &self.moniker,
3930 ),),
3931 encoder,
3932 offset,
3933 _depth,
3934 )
3935 }
3936 }
3937 unsafe impl<
3938 D: fidl::encoding::ResourceDialect,
3939 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
3940 > fidl::encoding::Encode<LifecycleControllerStopInstanceRequest, D> for (T0,)
3941 {
3942 #[inline]
3943 unsafe fn encode(
3944 self,
3945 encoder: &mut fidl::encoding::Encoder<'_, D>,
3946 offset: usize,
3947 depth: fidl::encoding::Depth,
3948 ) -> fidl::Result<()> {
3949 encoder.debug_check_bounds::<LifecycleControllerStopInstanceRequest>(offset);
3950 self.0.encode(encoder, offset + 0, depth)?;
3954 Ok(())
3955 }
3956 }
3957
3958 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3959 for LifecycleControllerStopInstanceRequest
3960 {
3961 #[inline(always)]
3962 fn new_empty() -> Self {
3963 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
3964 }
3965
3966 #[inline]
3967 unsafe fn decode(
3968 &mut self,
3969 decoder: &mut fidl::encoding::Decoder<'_, D>,
3970 offset: usize,
3971 _depth: fidl::encoding::Depth,
3972 ) -> fidl::Result<()> {
3973 decoder.debug_check_bounds::<Self>(offset);
3974 fidl::decode!(
3976 fidl::encoding::BoundedString<4096>,
3977 D,
3978 &mut self.moniker,
3979 decoder,
3980 offset + 0,
3981 _depth
3982 )?;
3983 Ok(())
3984 }
3985 }
3986
3987 impl fidl::encoding::ValueTypeMarker for LifecycleControllerUnresolveInstanceRequest {
3988 type Borrowed<'a> = &'a Self;
3989 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3990 value
3991 }
3992 }
3993
3994 unsafe impl fidl::encoding::TypeMarker for LifecycleControllerUnresolveInstanceRequest {
3995 type Owned = Self;
3996
3997 #[inline(always)]
3998 fn inline_align(_context: fidl::encoding::Context) -> usize {
3999 8
4000 }
4001
4002 #[inline(always)]
4003 fn inline_size(_context: fidl::encoding::Context) -> usize {
4004 16
4005 }
4006 }
4007
4008 unsafe impl<D: fidl::encoding::ResourceDialect>
4009 fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D>
4010 for &LifecycleControllerUnresolveInstanceRequest
4011 {
4012 #[inline]
4013 unsafe fn encode(
4014 self,
4015 encoder: &mut fidl::encoding::Encoder<'_, D>,
4016 offset: usize,
4017 _depth: fidl::encoding::Depth,
4018 ) -> fidl::Result<()> {
4019 encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4020 fidl::encoding::Encode::<LifecycleControllerUnresolveInstanceRequest, D>::encode(
4022 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4023 &self.moniker,
4024 ),),
4025 encoder,
4026 offset,
4027 _depth,
4028 )
4029 }
4030 }
4031 unsafe impl<
4032 D: fidl::encoding::ResourceDialect,
4033 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4034 > fidl::encoding::Encode<LifecycleControllerUnresolveInstanceRequest, D> for (T0,)
4035 {
4036 #[inline]
4037 unsafe fn encode(
4038 self,
4039 encoder: &mut fidl::encoding::Encoder<'_, D>,
4040 offset: usize,
4041 depth: fidl::encoding::Depth,
4042 ) -> fidl::Result<()> {
4043 encoder.debug_check_bounds::<LifecycleControllerUnresolveInstanceRequest>(offset);
4044 self.0.encode(encoder, offset + 0, depth)?;
4048 Ok(())
4049 }
4050 }
4051
4052 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4053 for LifecycleControllerUnresolveInstanceRequest
4054 {
4055 #[inline(always)]
4056 fn new_empty() -> Self {
4057 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4058 }
4059
4060 #[inline]
4061 unsafe fn decode(
4062 &mut self,
4063 decoder: &mut fidl::encoding::Decoder<'_, D>,
4064 offset: usize,
4065 _depth: fidl::encoding::Depth,
4066 ) -> fidl::Result<()> {
4067 decoder.debug_check_bounds::<Self>(offset);
4068 fidl::decode!(
4070 fidl::encoding::BoundedString<4096>,
4071 D,
4072 &mut self.moniker,
4073 decoder,
4074 offset + 0,
4075 _depth
4076 )?;
4077 Ok(())
4078 }
4079 }
4080
4081 impl fidl::encoding::ValueTypeMarker for ManifestBytesIteratorNextResponse {
4082 type Borrowed<'a> = &'a Self;
4083 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4084 value
4085 }
4086 }
4087
4088 unsafe impl fidl::encoding::TypeMarker for ManifestBytesIteratorNextResponse {
4089 type Owned = Self;
4090
4091 #[inline(always)]
4092 fn inline_align(_context: fidl::encoding::Context) -> usize {
4093 8
4094 }
4095
4096 #[inline(always)]
4097 fn inline_size(_context: fidl::encoding::Context) -> usize {
4098 16
4099 }
4100 }
4101
4102 unsafe impl<D: fidl::encoding::ResourceDialect>
4103 fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D>
4104 for &ManifestBytesIteratorNextResponse
4105 {
4106 #[inline]
4107 unsafe fn encode(
4108 self,
4109 encoder: &mut fidl::encoding::Encoder<'_, D>,
4110 offset: usize,
4111 _depth: fidl::encoding::Depth,
4112 ) -> fidl::Result<()> {
4113 encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4114 fidl::encoding::Encode::<ManifestBytesIteratorNextResponse, D>::encode(
4116 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
4117 &self.infos,
4118 ),),
4119 encoder,
4120 offset,
4121 _depth,
4122 )
4123 }
4124 }
4125 unsafe impl<
4126 D: fidl::encoding::ResourceDialect,
4127 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
4128 > fidl::encoding::Encode<ManifestBytesIteratorNextResponse, D> for (T0,)
4129 {
4130 #[inline]
4131 unsafe fn encode(
4132 self,
4133 encoder: &mut fidl::encoding::Encoder<'_, D>,
4134 offset: usize,
4135 depth: fidl::encoding::Depth,
4136 ) -> fidl::Result<()> {
4137 encoder.debug_check_bounds::<ManifestBytesIteratorNextResponse>(offset);
4138 self.0.encode(encoder, offset + 0, depth)?;
4142 Ok(())
4143 }
4144 }
4145
4146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4147 for ManifestBytesIteratorNextResponse
4148 {
4149 #[inline(always)]
4150 fn new_empty() -> Self {
4151 Self { infos: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
4152 }
4153
4154 #[inline]
4155 unsafe fn decode(
4156 &mut self,
4157 decoder: &mut fidl::encoding::Decoder<'_, D>,
4158 offset: usize,
4159 _depth: fidl::encoding::Depth,
4160 ) -> fidl::Result<()> {
4161 decoder.debug_check_bounds::<Self>(offset);
4162 fidl::decode!(
4164 fidl::encoding::UnboundedVector<u8>,
4165 D,
4166 &mut self.infos,
4167 decoder,
4168 offset + 0,
4169 _depth
4170 )?;
4171 Ok(())
4172 }
4173 }
4174
4175 impl fidl::encoding::ValueTypeMarker for RealmQueryConstructNamespaceRequest {
4176 type Borrowed<'a> = &'a Self;
4177 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4178 value
4179 }
4180 }
4181
4182 unsafe impl fidl::encoding::TypeMarker for RealmQueryConstructNamespaceRequest {
4183 type Owned = Self;
4184
4185 #[inline(always)]
4186 fn inline_align(_context: fidl::encoding::Context) -> usize {
4187 8
4188 }
4189
4190 #[inline(always)]
4191 fn inline_size(_context: fidl::encoding::Context) -> usize {
4192 16
4193 }
4194 }
4195
4196 unsafe impl<D: fidl::encoding::ResourceDialect>
4197 fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D>
4198 for &RealmQueryConstructNamespaceRequest
4199 {
4200 #[inline]
4201 unsafe fn encode(
4202 self,
4203 encoder: &mut fidl::encoding::Encoder<'_, D>,
4204 offset: usize,
4205 _depth: fidl::encoding::Depth,
4206 ) -> fidl::Result<()> {
4207 encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4208 fidl::encoding::Encode::<RealmQueryConstructNamespaceRequest, D>::encode(
4210 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4211 &self.moniker,
4212 ),),
4213 encoder,
4214 offset,
4215 _depth,
4216 )
4217 }
4218 }
4219 unsafe impl<
4220 D: fidl::encoding::ResourceDialect,
4221 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4222 > fidl::encoding::Encode<RealmQueryConstructNamespaceRequest, D> for (T0,)
4223 {
4224 #[inline]
4225 unsafe fn encode(
4226 self,
4227 encoder: &mut fidl::encoding::Encoder<'_, D>,
4228 offset: usize,
4229 depth: fidl::encoding::Depth,
4230 ) -> fidl::Result<()> {
4231 encoder.debug_check_bounds::<RealmQueryConstructNamespaceRequest>(offset);
4232 self.0.encode(encoder, offset + 0, depth)?;
4236 Ok(())
4237 }
4238 }
4239
4240 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4241 for RealmQueryConstructNamespaceRequest
4242 {
4243 #[inline(always)]
4244 fn new_empty() -> Self {
4245 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4246 }
4247
4248 #[inline]
4249 unsafe fn decode(
4250 &mut self,
4251 decoder: &mut fidl::encoding::Decoder<'_, D>,
4252 offset: usize,
4253 _depth: fidl::encoding::Depth,
4254 ) -> fidl::Result<()> {
4255 decoder.debug_check_bounds::<Self>(offset);
4256 fidl::decode!(
4258 fidl::encoding::BoundedString<4096>,
4259 D,
4260 &mut self.moniker,
4261 decoder,
4262 offset + 0,
4263 _depth
4264 )?;
4265 Ok(())
4266 }
4267 }
4268
4269 impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceRequest {
4270 type Borrowed<'a> = &'a Self;
4271 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4272 value
4273 }
4274 }
4275
4276 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceRequest {
4277 type Owned = Self;
4278
4279 #[inline(always)]
4280 fn inline_align(_context: fidl::encoding::Context) -> usize {
4281 8
4282 }
4283
4284 #[inline(always)]
4285 fn inline_size(_context: fidl::encoding::Context) -> usize {
4286 16
4287 }
4288 }
4289
4290 unsafe impl<D: fidl::encoding::ResourceDialect>
4291 fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for &RealmQueryGetInstanceRequest
4292 {
4293 #[inline]
4294 unsafe fn encode(
4295 self,
4296 encoder: &mut fidl::encoding::Encoder<'_, D>,
4297 offset: usize,
4298 _depth: fidl::encoding::Depth,
4299 ) -> fidl::Result<()> {
4300 encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4301 fidl::encoding::Encode::<RealmQueryGetInstanceRequest, D>::encode(
4303 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4304 &self.moniker,
4305 ),),
4306 encoder,
4307 offset,
4308 _depth,
4309 )
4310 }
4311 }
4312 unsafe impl<
4313 D: fidl::encoding::ResourceDialect,
4314 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4315 > fidl::encoding::Encode<RealmQueryGetInstanceRequest, D> for (T0,)
4316 {
4317 #[inline]
4318 unsafe fn encode(
4319 self,
4320 encoder: &mut fidl::encoding::Encoder<'_, D>,
4321 offset: usize,
4322 depth: fidl::encoding::Depth,
4323 ) -> fidl::Result<()> {
4324 encoder.debug_check_bounds::<RealmQueryGetInstanceRequest>(offset);
4325 self.0.encode(encoder, offset + 0, depth)?;
4329 Ok(())
4330 }
4331 }
4332
4333 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4334 for RealmQueryGetInstanceRequest
4335 {
4336 #[inline(always)]
4337 fn new_empty() -> Self {
4338 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4339 }
4340
4341 #[inline]
4342 unsafe fn decode(
4343 &mut self,
4344 decoder: &mut fidl::encoding::Decoder<'_, D>,
4345 offset: usize,
4346 _depth: fidl::encoding::Depth,
4347 ) -> fidl::Result<()> {
4348 decoder.debug_check_bounds::<Self>(offset);
4349 fidl::decode!(
4351 fidl::encoding::BoundedString<4096>,
4352 D,
4353 &mut self.moniker,
4354 decoder,
4355 offset + 0,
4356 _depth
4357 )?;
4358 Ok(())
4359 }
4360 }
4361
4362 impl fidl::encoding::ValueTypeMarker for RealmQueryGetResolvedDeclarationRequest {
4363 type Borrowed<'a> = &'a Self;
4364 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4365 value
4366 }
4367 }
4368
4369 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetResolvedDeclarationRequest {
4370 type Owned = Self;
4371
4372 #[inline(always)]
4373 fn inline_align(_context: fidl::encoding::Context) -> usize {
4374 8
4375 }
4376
4377 #[inline(always)]
4378 fn inline_size(_context: fidl::encoding::Context) -> usize {
4379 16
4380 }
4381 }
4382
4383 unsafe impl<D: fidl::encoding::ResourceDialect>
4384 fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D>
4385 for &RealmQueryGetResolvedDeclarationRequest
4386 {
4387 #[inline]
4388 unsafe fn encode(
4389 self,
4390 encoder: &mut fidl::encoding::Encoder<'_, D>,
4391 offset: usize,
4392 _depth: fidl::encoding::Depth,
4393 ) -> fidl::Result<()> {
4394 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4395 fidl::encoding::Encode::<RealmQueryGetResolvedDeclarationRequest, D>::encode(
4397 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4398 &self.moniker,
4399 ),),
4400 encoder,
4401 offset,
4402 _depth,
4403 )
4404 }
4405 }
4406 unsafe impl<
4407 D: fidl::encoding::ResourceDialect,
4408 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4409 > fidl::encoding::Encode<RealmQueryGetResolvedDeclarationRequest, D> for (T0,)
4410 {
4411 #[inline]
4412 unsafe fn encode(
4413 self,
4414 encoder: &mut fidl::encoding::Encoder<'_, D>,
4415 offset: usize,
4416 depth: fidl::encoding::Depth,
4417 ) -> fidl::Result<()> {
4418 encoder.debug_check_bounds::<RealmQueryGetResolvedDeclarationRequest>(offset);
4419 self.0.encode(encoder, offset + 0, depth)?;
4423 Ok(())
4424 }
4425 }
4426
4427 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4428 for RealmQueryGetResolvedDeclarationRequest
4429 {
4430 #[inline(always)]
4431 fn new_empty() -> Self {
4432 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4433 }
4434
4435 #[inline]
4436 unsafe fn decode(
4437 &mut self,
4438 decoder: &mut fidl::encoding::Decoder<'_, D>,
4439 offset: usize,
4440 _depth: fidl::encoding::Depth,
4441 ) -> fidl::Result<()> {
4442 decoder.debug_check_bounds::<Self>(offset);
4443 fidl::decode!(
4445 fidl::encoding::BoundedString<4096>,
4446 D,
4447 &mut self.moniker,
4448 decoder,
4449 offset + 0,
4450 _depth
4451 )?;
4452 Ok(())
4453 }
4454 }
4455
4456 impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigRequest {
4457 type Borrowed<'a> = &'a Self;
4458 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4459 value
4460 }
4461 }
4462
4463 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigRequest {
4464 type Owned = Self;
4465
4466 #[inline(always)]
4467 fn inline_align(_context: fidl::encoding::Context) -> usize {
4468 8
4469 }
4470
4471 #[inline(always)]
4472 fn inline_size(_context: fidl::encoding::Context) -> usize {
4473 16
4474 }
4475 }
4476
4477 unsafe impl<D: fidl::encoding::ResourceDialect>
4478 fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D>
4479 for &RealmQueryGetStructuredConfigRequest
4480 {
4481 #[inline]
4482 unsafe fn encode(
4483 self,
4484 encoder: &mut fidl::encoding::Encoder<'_, D>,
4485 offset: usize,
4486 _depth: fidl::encoding::Depth,
4487 ) -> fidl::Result<()> {
4488 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4489 fidl::encoding::Encode::<RealmQueryGetStructuredConfigRequest, D>::encode(
4491 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
4492 &self.moniker,
4493 ),),
4494 encoder,
4495 offset,
4496 _depth,
4497 )
4498 }
4499 }
4500 unsafe impl<
4501 D: fidl::encoding::ResourceDialect,
4502 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4503 > fidl::encoding::Encode<RealmQueryGetStructuredConfigRequest, D> for (T0,)
4504 {
4505 #[inline]
4506 unsafe fn encode(
4507 self,
4508 encoder: &mut fidl::encoding::Encoder<'_, D>,
4509 offset: usize,
4510 depth: fidl::encoding::Depth,
4511 ) -> fidl::Result<()> {
4512 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigRequest>(offset);
4513 self.0.encode(encoder, offset + 0, depth)?;
4517 Ok(())
4518 }
4519 }
4520
4521 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4522 for RealmQueryGetStructuredConfigRequest
4523 {
4524 #[inline(always)]
4525 fn new_empty() -> Self {
4526 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
4527 }
4528
4529 #[inline]
4530 unsafe fn decode(
4531 &mut self,
4532 decoder: &mut fidl::encoding::Decoder<'_, D>,
4533 offset: usize,
4534 _depth: fidl::encoding::Depth,
4535 ) -> fidl::Result<()> {
4536 decoder.debug_check_bounds::<Self>(offset);
4537 fidl::decode!(
4539 fidl::encoding::BoundedString<4096>,
4540 D,
4541 &mut self.moniker,
4542 decoder,
4543 offset + 0,
4544 _depth
4545 )?;
4546 Ok(())
4547 }
4548 }
4549
4550 impl fidl::encoding::ValueTypeMarker for RealmQueryResolveDeclarationRequest {
4551 type Borrowed<'a> = &'a Self;
4552 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4553 value
4554 }
4555 }
4556
4557 unsafe impl fidl::encoding::TypeMarker for RealmQueryResolveDeclarationRequest {
4558 type Owned = Self;
4559
4560 #[inline(always)]
4561 fn inline_align(_context: fidl::encoding::Context) -> usize {
4562 8
4563 }
4564
4565 #[inline(always)]
4566 fn inline_size(_context: fidl::encoding::Context) -> usize {
4567 48
4568 }
4569 }
4570
4571 unsafe impl<D: fidl::encoding::ResourceDialect>
4572 fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D>
4573 for &RealmQueryResolveDeclarationRequest
4574 {
4575 #[inline]
4576 unsafe fn encode(
4577 self,
4578 encoder: &mut fidl::encoding::Encoder<'_, D>,
4579 offset: usize,
4580 _depth: fidl::encoding::Depth,
4581 ) -> fidl::Result<()> {
4582 encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4583 fidl::encoding::Encode::<RealmQueryResolveDeclarationRequest, D>::encode(
4585 (
4586 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.parent),
4587 <ChildLocation as fidl::encoding::ValueTypeMarker>::borrow(&self.child_location),
4588 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.url),
4589 ),
4590 encoder, offset, _depth
4591 )
4592 }
4593 }
4594 unsafe impl<
4595 D: fidl::encoding::ResourceDialect,
4596 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4597 T1: fidl::encoding::Encode<ChildLocation, D>,
4598 T2: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
4599 > fidl::encoding::Encode<RealmQueryResolveDeclarationRequest, D> for (T0, T1, T2)
4600 {
4601 #[inline]
4602 unsafe fn encode(
4603 self,
4604 encoder: &mut fidl::encoding::Encoder<'_, D>,
4605 offset: usize,
4606 depth: fidl::encoding::Depth,
4607 ) -> fidl::Result<()> {
4608 encoder.debug_check_bounds::<RealmQueryResolveDeclarationRequest>(offset);
4609 self.0.encode(encoder, offset + 0, depth)?;
4613 self.1.encode(encoder, offset + 16, depth)?;
4614 self.2.encode(encoder, offset + 32, depth)?;
4615 Ok(())
4616 }
4617 }
4618
4619 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4620 for RealmQueryResolveDeclarationRequest
4621 {
4622 #[inline(always)]
4623 fn new_empty() -> Self {
4624 Self {
4625 parent: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4626 child_location: fidl::new_empty!(ChildLocation, D),
4627 url: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
4628 }
4629 }
4630
4631 #[inline]
4632 unsafe fn decode(
4633 &mut self,
4634 decoder: &mut fidl::encoding::Decoder<'_, D>,
4635 offset: usize,
4636 _depth: fidl::encoding::Depth,
4637 ) -> fidl::Result<()> {
4638 decoder.debug_check_bounds::<Self>(offset);
4639 fidl::decode!(
4641 fidl::encoding::BoundedString<4096>,
4642 D,
4643 &mut self.parent,
4644 decoder,
4645 offset + 0,
4646 _depth
4647 )?;
4648 fidl::decode!(
4649 ChildLocation,
4650 D,
4651 &mut self.child_location,
4652 decoder,
4653 offset + 16,
4654 _depth
4655 )?;
4656 fidl::decode!(
4657 fidl::encoding::BoundedString<4096>,
4658 D,
4659 &mut self.url,
4660 decoder,
4661 offset + 32,
4662 _depth
4663 )?;
4664 Ok(())
4665 }
4666 }
4667
4668 impl fidl::encoding::ValueTypeMarker for RealmQueryGetInstanceResponse {
4669 type Borrowed<'a> = &'a Self;
4670 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4671 value
4672 }
4673 }
4674
4675 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetInstanceResponse {
4676 type Owned = Self;
4677
4678 #[inline(always)]
4679 fn inline_align(_context: fidl::encoding::Context) -> usize {
4680 8
4681 }
4682
4683 #[inline(always)]
4684 fn inline_size(_context: fidl::encoding::Context) -> usize {
4685 16
4686 }
4687 }
4688
4689 unsafe impl<D: fidl::encoding::ResourceDialect>
4690 fidl::encoding::Encode<RealmQueryGetInstanceResponse, D>
4691 for &RealmQueryGetInstanceResponse
4692 {
4693 #[inline]
4694 unsafe fn encode(
4695 self,
4696 encoder: &mut fidl::encoding::Encoder<'_, D>,
4697 offset: usize,
4698 _depth: fidl::encoding::Depth,
4699 ) -> fidl::Result<()> {
4700 encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4701 fidl::encoding::Encode::<RealmQueryGetInstanceResponse, D>::encode(
4703 (<Instance as fidl::encoding::ValueTypeMarker>::borrow(&self.instance),),
4704 encoder,
4705 offset,
4706 _depth,
4707 )
4708 }
4709 }
4710 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<Instance, D>>
4711 fidl::encoding::Encode<RealmQueryGetInstanceResponse, D> for (T0,)
4712 {
4713 #[inline]
4714 unsafe fn encode(
4715 self,
4716 encoder: &mut fidl::encoding::Encoder<'_, D>,
4717 offset: usize,
4718 depth: fidl::encoding::Depth,
4719 ) -> fidl::Result<()> {
4720 encoder.debug_check_bounds::<RealmQueryGetInstanceResponse>(offset);
4721 self.0.encode(encoder, offset + 0, depth)?;
4725 Ok(())
4726 }
4727 }
4728
4729 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4730 for RealmQueryGetInstanceResponse
4731 {
4732 #[inline(always)]
4733 fn new_empty() -> Self {
4734 Self { instance: fidl::new_empty!(Instance, D) }
4735 }
4736
4737 #[inline]
4738 unsafe fn decode(
4739 &mut self,
4740 decoder: &mut fidl::encoding::Decoder<'_, D>,
4741 offset: usize,
4742 _depth: fidl::encoding::Depth,
4743 ) -> fidl::Result<()> {
4744 decoder.debug_check_bounds::<Self>(offset);
4745 fidl::decode!(Instance, D, &mut self.instance, decoder, offset + 0, _depth)?;
4747 Ok(())
4748 }
4749 }
4750
4751 impl fidl::encoding::ValueTypeMarker for RealmQueryGetStructuredConfigResponse {
4752 type Borrowed<'a> = &'a Self;
4753 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4754 value
4755 }
4756 }
4757
4758 unsafe impl fidl::encoding::TypeMarker for RealmQueryGetStructuredConfigResponse {
4759 type Owned = Self;
4760
4761 #[inline(always)]
4762 fn inline_align(_context: fidl::encoding::Context) -> usize {
4763 8
4764 }
4765
4766 #[inline(always)]
4767 fn inline_size(_context: fidl::encoding::Context) -> usize {
4768 32
4769 }
4770 }
4771
4772 unsafe impl<D: fidl::encoding::ResourceDialect>
4773 fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D>
4774 for &RealmQueryGetStructuredConfigResponse
4775 {
4776 #[inline]
4777 unsafe fn encode(
4778 self,
4779 encoder: &mut fidl::encoding::Encoder<'_, D>,
4780 offset: usize,
4781 _depth: fidl::encoding::Depth,
4782 ) -> fidl::Result<()> {
4783 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4784 fidl::encoding::Encode::<RealmQueryGetStructuredConfigResponse, D>::encode(
4786 (
4787 <fidl_fuchsia_component_decl__common::ResolvedConfig as fidl::encoding::ValueTypeMarker>::borrow(&self.config),
4788 ),
4789 encoder, offset, _depth
4790 )
4791 }
4792 }
4793 unsafe impl<
4794 D: fidl::encoding::ResourceDialect,
4795 T0: fidl::encoding::Encode<fidl_fuchsia_component_decl__common::ResolvedConfig, D>,
4796 > fidl::encoding::Encode<RealmQueryGetStructuredConfigResponse, D> for (T0,)
4797 {
4798 #[inline]
4799 unsafe fn encode(
4800 self,
4801 encoder: &mut fidl::encoding::Encoder<'_, D>,
4802 offset: usize,
4803 depth: fidl::encoding::Depth,
4804 ) -> fidl::Result<()> {
4805 encoder.debug_check_bounds::<RealmQueryGetStructuredConfigResponse>(offset);
4806 self.0.encode(encoder, offset + 0, depth)?;
4810 Ok(())
4811 }
4812 }
4813
4814 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4815 for RealmQueryGetStructuredConfigResponse
4816 {
4817 #[inline(always)]
4818 fn new_empty() -> Self {
4819 Self {
4820 config: fidl::new_empty!(fidl_fuchsia_component_decl__common::ResolvedConfig, D),
4821 }
4822 }
4823
4824 #[inline]
4825 unsafe fn decode(
4826 &mut self,
4827 decoder: &mut fidl::encoding::Decoder<'_, D>,
4828 offset: usize,
4829 _depth: fidl::encoding::Depth,
4830 ) -> fidl::Result<()> {
4831 decoder.debug_check_bounds::<Self>(offset);
4832 fidl::decode!(
4834 fidl_fuchsia_component_decl__common::ResolvedConfig,
4835 D,
4836 &mut self.config,
4837 decoder,
4838 offset + 0,
4839 _depth
4840 )?;
4841 Ok(())
4842 }
4843 }
4844
4845 impl fidl::encoding::ValueTypeMarker for RouteTarget {
4846 type Borrowed<'a> = &'a Self;
4847 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4848 value
4849 }
4850 }
4851
4852 unsafe impl fidl::encoding::TypeMarker for RouteTarget {
4853 type Owned = Self;
4854
4855 #[inline(always)]
4856 fn inline_align(_context: fidl::encoding::Context) -> usize {
4857 8
4858 }
4859
4860 #[inline(always)]
4861 fn inline_size(_context: fidl::encoding::Context) -> usize {
4862 24
4863 }
4864 }
4865
4866 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteTarget, D>
4867 for &RouteTarget
4868 {
4869 #[inline]
4870 unsafe fn encode(
4871 self,
4872 encoder: &mut fidl::encoding::Encoder<'_, D>,
4873 offset: usize,
4874 _depth: fidl::encoding::Depth,
4875 ) -> fidl::Result<()> {
4876 encoder.debug_check_bounds::<RouteTarget>(offset);
4877 fidl::encoding::Encode::<RouteTarget, D>::encode(
4879 (
4880 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
4881 &self.name,
4882 ),
4883 <DeclType as fidl::encoding::ValueTypeMarker>::borrow(&self.decl_type),
4884 ),
4885 encoder,
4886 offset,
4887 _depth,
4888 )
4889 }
4890 }
4891 unsafe impl<
4892 D: fidl::encoding::ResourceDialect,
4893 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
4894 T1: fidl::encoding::Encode<DeclType, D>,
4895 > fidl::encoding::Encode<RouteTarget, D> for (T0, T1)
4896 {
4897 #[inline]
4898 unsafe fn encode(
4899 self,
4900 encoder: &mut fidl::encoding::Encoder<'_, D>,
4901 offset: usize,
4902 depth: fidl::encoding::Depth,
4903 ) -> fidl::Result<()> {
4904 encoder.debug_check_bounds::<RouteTarget>(offset);
4905 unsafe {
4908 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4909 (ptr as *mut u64).write_unaligned(0);
4910 }
4911 self.0.encode(encoder, offset + 0, depth)?;
4913 self.1.encode(encoder, offset + 16, depth)?;
4914 Ok(())
4915 }
4916 }
4917
4918 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteTarget {
4919 #[inline(always)]
4920 fn new_empty() -> Self {
4921 Self {
4922 name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D),
4923 decl_type: fidl::new_empty!(DeclType, D),
4924 }
4925 }
4926
4927 #[inline]
4928 unsafe fn decode(
4929 &mut self,
4930 decoder: &mut fidl::encoding::Decoder<'_, D>,
4931 offset: usize,
4932 _depth: fidl::encoding::Depth,
4933 ) -> fidl::Result<()> {
4934 decoder.debug_check_bounds::<Self>(offset);
4935 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4937 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4938 let mask = 0xffffffff00000000u64;
4939 let maskedval = padval & mask;
4940 if maskedval != 0 {
4941 return Err(fidl::Error::NonZeroPadding {
4942 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4943 });
4944 }
4945 fidl::decode!(
4946 fidl::encoding::BoundedString<255>,
4947 D,
4948 &mut self.name,
4949 decoder,
4950 offset + 0,
4951 _depth
4952 )?;
4953 fidl::decode!(DeclType, D, &mut self.decl_type, decoder, offset + 16, _depth)?;
4954 Ok(())
4955 }
4956 }
4957
4958 impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteRequest {
4959 type Borrowed<'a> = &'a Self;
4960 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4961 value
4962 }
4963 }
4964
4965 unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteRequest {
4966 type Owned = Self;
4967
4968 #[inline(always)]
4969 fn inline_align(_context: fidl::encoding::Context) -> usize {
4970 8
4971 }
4972
4973 #[inline(always)]
4974 fn inline_size(_context: fidl::encoding::Context) -> usize {
4975 32
4976 }
4977 }
4978
4979 unsafe impl<D: fidl::encoding::ResourceDialect>
4980 fidl::encoding::Encode<RouteValidatorRouteRequest, D> for &RouteValidatorRouteRequest
4981 {
4982 #[inline]
4983 unsafe fn encode(
4984 self,
4985 encoder: &mut fidl::encoding::Encoder<'_, D>,
4986 offset: usize,
4987 _depth: fidl::encoding::Depth,
4988 ) -> fidl::Result<()> {
4989 encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
4990 fidl::encoding::Encode::<RouteValidatorRouteRequest, D>::encode(
4992 (
4993 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.moniker),
4994 <fidl::encoding::UnboundedVector<RouteTarget> as fidl::encoding::ValueTypeMarker>::borrow(&self.targets),
4995 ),
4996 encoder, offset, _depth
4997 )
4998 }
4999 }
5000 unsafe impl<
5001 D: fidl::encoding::ResourceDialect,
5002 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5003 T1: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteTarget>, D>,
5004 > fidl::encoding::Encode<RouteValidatorRouteRequest, D> for (T0, T1)
5005 {
5006 #[inline]
5007 unsafe fn encode(
5008 self,
5009 encoder: &mut fidl::encoding::Encoder<'_, D>,
5010 offset: usize,
5011 depth: fidl::encoding::Depth,
5012 ) -> fidl::Result<()> {
5013 encoder.debug_check_bounds::<RouteValidatorRouteRequest>(offset);
5014 self.0.encode(encoder, offset + 0, depth)?;
5018 self.1.encode(encoder, offset + 16, depth)?;
5019 Ok(())
5020 }
5021 }
5022
5023 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5024 for RouteValidatorRouteRequest
5025 {
5026 #[inline(always)]
5027 fn new_empty() -> Self {
5028 Self {
5029 moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D),
5030 targets: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteTarget>, D),
5031 }
5032 }
5033
5034 #[inline]
5035 unsafe fn decode(
5036 &mut self,
5037 decoder: &mut fidl::encoding::Decoder<'_, D>,
5038 offset: usize,
5039 _depth: fidl::encoding::Depth,
5040 ) -> fidl::Result<()> {
5041 decoder.debug_check_bounds::<Self>(offset);
5042 fidl::decode!(
5044 fidl::encoding::BoundedString<4096>,
5045 D,
5046 &mut self.moniker,
5047 decoder,
5048 offset + 0,
5049 _depth
5050 )?;
5051 fidl::decode!(
5052 fidl::encoding::UnboundedVector<RouteTarget>,
5053 D,
5054 &mut self.targets,
5055 decoder,
5056 offset + 16,
5057 _depth
5058 )?;
5059 Ok(())
5060 }
5061 }
5062
5063 impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateRequest {
5064 type Borrowed<'a> = &'a Self;
5065 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5066 value
5067 }
5068 }
5069
5070 unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateRequest {
5071 type Owned = Self;
5072
5073 #[inline(always)]
5074 fn inline_align(_context: fidl::encoding::Context) -> usize {
5075 8
5076 }
5077
5078 #[inline(always)]
5079 fn inline_size(_context: fidl::encoding::Context) -> usize {
5080 16
5081 }
5082 }
5083
5084 unsafe impl<D: fidl::encoding::ResourceDialect>
5085 fidl::encoding::Encode<RouteValidatorValidateRequest, D>
5086 for &RouteValidatorValidateRequest
5087 {
5088 #[inline]
5089 unsafe fn encode(
5090 self,
5091 encoder: &mut fidl::encoding::Encoder<'_, D>,
5092 offset: usize,
5093 _depth: fidl::encoding::Depth,
5094 ) -> fidl::Result<()> {
5095 encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5096 fidl::encoding::Encode::<RouteValidatorValidateRequest, D>::encode(
5098 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5099 &self.moniker,
5100 ),),
5101 encoder,
5102 offset,
5103 _depth,
5104 )
5105 }
5106 }
5107 unsafe impl<
5108 D: fidl::encoding::ResourceDialect,
5109 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5110 > fidl::encoding::Encode<RouteValidatorValidateRequest, D> for (T0,)
5111 {
5112 #[inline]
5113 unsafe fn encode(
5114 self,
5115 encoder: &mut fidl::encoding::Encoder<'_, D>,
5116 offset: usize,
5117 depth: fidl::encoding::Depth,
5118 ) -> fidl::Result<()> {
5119 encoder.debug_check_bounds::<RouteValidatorValidateRequest>(offset);
5120 self.0.encode(encoder, offset + 0, depth)?;
5124 Ok(())
5125 }
5126 }
5127
5128 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5129 for RouteValidatorValidateRequest
5130 {
5131 #[inline(always)]
5132 fn new_empty() -> Self {
5133 Self { moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5134 }
5135
5136 #[inline]
5137 unsafe fn decode(
5138 &mut self,
5139 decoder: &mut fidl::encoding::Decoder<'_, D>,
5140 offset: usize,
5141 _depth: fidl::encoding::Depth,
5142 ) -> fidl::Result<()> {
5143 decoder.debug_check_bounds::<Self>(offset);
5144 fidl::decode!(
5146 fidl::encoding::BoundedString<4096>,
5147 D,
5148 &mut self.moniker,
5149 decoder,
5150 offset + 0,
5151 _depth
5152 )?;
5153 Ok(())
5154 }
5155 }
5156
5157 impl fidl::encoding::ValueTypeMarker for RouteValidatorRouteResponse {
5158 type Borrowed<'a> = &'a Self;
5159 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5160 value
5161 }
5162 }
5163
5164 unsafe impl fidl::encoding::TypeMarker for RouteValidatorRouteResponse {
5165 type Owned = Self;
5166
5167 #[inline(always)]
5168 fn inline_align(_context: fidl::encoding::Context) -> usize {
5169 8
5170 }
5171
5172 #[inline(always)]
5173 fn inline_size(_context: fidl::encoding::Context) -> usize {
5174 16
5175 }
5176 }
5177
5178 unsafe impl<D: fidl::encoding::ResourceDialect>
5179 fidl::encoding::Encode<RouteValidatorRouteResponse, D> for &RouteValidatorRouteResponse
5180 {
5181 #[inline]
5182 unsafe fn encode(
5183 self,
5184 encoder: &mut fidl::encoding::Encoder<'_, D>,
5185 offset: usize,
5186 _depth: fidl::encoding::Depth,
5187 ) -> fidl::Result<()> {
5188 encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5189 fidl::encoding::Encode::<RouteValidatorRouteResponse, D>::encode(
5191 (
5192 <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5193 ),
5194 encoder, offset, _depth
5195 )
5196 }
5197 }
5198 unsafe impl<
5199 D: fidl::encoding::ResourceDialect,
5200 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5201 > fidl::encoding::Encode<RouteValidatorRouteResponse, D> for (T0,)
5202 {
5203 #[inline]
5204 unsafe fn encode(
5205 self,
5206 encoder: &mut fidl::encoding::Encoder<'_, D>,
5207 offset: usize,
5208 depth: fidl::encoding::Depth,
5209 ) -> fidl::Result<()> {
5210 encoder.debug_check_bounds::<RouteValidatorRouteResponse>(offset);
5211 self.0.encode(encoder, offset + 0, depth)?;
5215 Ok(())
5216 }
5217 }
5218
5219 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5220 for RouteValidatorRouteResponse
5221 {
5222 #[inline(always)]
5223 fn new_empty() -> Self {
5224 Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5225 }
5226
5227 #[inline]
5228 unsafe fn decode(
5229 &mut self,
5230 decoder: &mut fidl::encoding::Decoder<'_, D>,
5231 offset: usize,
5232 _depth: fidl::encoding::Depth,
5233 ) -> fidl::Result<()> {
5234 decoder.debug_check_bounds::<Self>(offset);
5235 fidl::decode!(
5237 fidl::encoding::UnboundedVector<RouteReport>,
5238 D,
5239 &mut self.reports,
5240 decoder,
5241 offset + 0,
5242 _depth
5243 )?;
5244 Ok(())
5245 }
5246 }
5247
5248 impl fidl::encoding::ValueTypeMarker for RouteValidatorValidateResponse {
5249 type Borrowed<'a> = &'a Self;
5250 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5251 value
5252 }
5253 }
5254
5255 unsafe impl fidl::encoding::TypeMarker for RouteValidatorValidateResponse {
5256 type Owned = Self;
5257
5258 #[inline(always)]
5259 fn inline_align(_context: fidl::encoding::Context) -> usize {
5260 8
5261 }
5262
5263 #[inline(always)]
5264 fn inline_size(_context: fidl::encoding::Context) -> usize {
5265 16
5266 }
5267 }
5268
5269 unsafe impl<D: fidl::encoding::ResourceDialect>
5270 fidl::encoding::Encode<RouteValidatorValidateResponse, D>
5271 for &RouteValidatorValidateResponse
5272 {
5273 #[inline]
5274 unsafe fn encode(
5275 self,
5276 encoder: &mut fidl::encoding::Encoder<'_, D>,
5277 offset: usize,
5278 _depth: fidl::encoding::Depth,
5279 ) -> fidl::Result<()> {
5280 encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5281 fidl::encoding::Encode::<RouteValidatorValidateResponse, D>::encode(
5283 (
5284 <fidl::encoding::UnboundedVector<RouteReport> as fidl::encoding::ValueTypeMarker>::borrow(&self.reports),
5285 ),
5286 encoder, offset, _depth
5287 )
5288 }
5289 }
5290 unsafe impl<
5291 D: fidl::encoding::ResourceDialect,
5292 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<RouteReport>, D>,
5293 > fidl::encoding::Encode<RouteValidatorValidateResponse, D> for (T0,)
5294 {
5295 #[inline]
5296 unsafe fn encode(
5297 self,
5298 encoder: &mut fidl::encoding::Encoder<'_, D>,
5299 offset: usize,
5300 depth: fidl::encoding::Depth,
5301 ) -> fidl::Result<()> {
5302 encoder.debug_check_bounds::<RouteValidatorValidateResponse>(offset);
5303 self.0.encode(encoder, offset + 0, depth)?;
5307 Ok(())
5308 }
5309 }
5310
5311 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5312 for RouteValidatorValidateResponse
5313 {
5314 #[inline(always)]
5315 fn new_empty() -> Self {
5316 Self { reports: fidl::new_empty!(fidl::encoding::UnboundedVector<RouteReport>, D) }
5317 }
5318
5319 #[inline]
5320 unsafe fn decode(
5321 &mut self,
5322 decoder: &mut fidl::encoding::Decoder<'_, D>,
5323 offset: usize,
5324 _depth: fidl::encoding::Depth,
5325 ) -> fidl::Result<()> {
5326 decoder.debug_check_bounds::<Self>(offset);
5327 fidl::decode!(
5329 fidl::encoding::UnboundedVector<RouteReport>,
5330 D,
5331 &mut self.reports,
5332 decoder,
5333 offset + 0,
5334 _depth
5335 )?;
5336 Ok(())
5337 }
5338 }
5339
5340 impl fidl::encoding::ValueTypeMarker for StorageAdminDeleteComponentStorageRequest {
5341 type Borrowed<'a> = &'a Self;
5342 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5343 value
5344 }
5345 }
5346
5347 unsafe impl fidl::encoding::TypeMarker for StorageAdminDeleteComponentStorageRequest {
5348 type Owned = Self;
5349
5350 #[inline(always)]
5351 fn inline_align(_context: fidl::encoding::Context) -> usize {
5352 8
5353 }
5354
5355 #[inline(always)]
5356 fn inline_size(_context: fidl::encoding::Context) -> usize {
5357 16
5358 }
5359 }
5360
5361 unsafe impl<D: fidl::encoding::ResourceDialect>
5362 fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D>
5363 for &StorageAdminDeleteComponentStorageRequest
5364 {
5365 #[inline]
5366 unsafe fn encode(
5367 self,
5368 encoder: &mut fidl::encoding::Encoder<'_, D>,
5369 offset: usize,
5370 _depth: fidl::encoding::Depth,
5371 ) -> fidl::Result<()> {
5372 encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5373 fidl::encoding::Encode::<StorageAdminDeleteComponentStorageRequest, D>::encode(
5375 (<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(
5376 &self.relative_moniker,
5377 ),),
5378 encoder,
5379 offset,
5380 _depth,
5381 )
5382 }
5383 }
5384 unsafe impl<
5385 D: fidl::encoding::ResourceDialect,
5386 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<4096>, D>,
5387 > fidl::encoding::Encode<StorageAdminDeleteComponentStorageRequest, D> for (T0,)
5388 {
5389 #[inline]
5390 unsafe fn encode(
5391 self,
5392 encoder: &mut fidl::encoding::Encoder<'_, D>,
5393 offset: usize,
5394 depth: fidl::encoding::Depth,
5395 ) -> fidl::Result<()> {
5396 encoder.debug_check_bounds::<StorageAdminDeleteComponentStorageRequest>(offset);
5397 self.0.encode(encoder, offset + 0, depth)?;
5401 Ok(())
5402 }
5403 }
5404
5405 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5406 for StorageAdminDeleteComponentStorageRequest
5407 {
5408 #[inline(always)]
5409 fn new_empty() -> Self {
5410 Self { relative_moniker: fidl::new_empty!(fidl::encoding::BoundedString<4096>, D) }
5411 }
5412
5413 #[inline]
5414 unsafe fn decode(
5415 &mut self,
5416 decoder: &mut fidl::encoding::Decoder<'_, D>,
5417 offset: usize,
5418 _depth: fidl::encoding::Depth,
5419 ) -> fidl::Result<()> {
5420 decoder.debug_check_bounds::<Self>(offset);
5421 fidl::decode!(
5423 fidl::encoding::BoundedString<4096>,
5424 D,
5425 &mut self.relative_moniker,
5426 decoder,
5427 offset + 0,
5428 _depth
5429 )?;
5430 Ok(())
5431 }
5432 }
5433
5434 impl fidl::encoding::ValueTypeMarker for StorageIteratorNextResponse {
5435 type Borrowed<'a> = &'a Self;
5436 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5437 value
5438 }
5439 }
5440
5441 unsafe impl fidl::encoding::TypeMarker for StorageIteratorNextResponse {
5442 type Owned = Self;
5443
5444 #[inline(always)]
5445 fn inline_align(_context: fidl::encoding::Context) -> usize {
5446 8
5447 }
5448
5449 #[inline(always)]
5450 fn inline_size(_context: fidl::encoding::Context) -> usize {
5451 16
5452 }
5453 }
5454
5455 unsafe impl<D: fidl::encoding::ResourceDialect>
5456 fidl::encoding::Encode<StorageIteratorNextResponse, D> for &StorageIteratorNextResponse
5457 {
5458 #[inline]
5459 unsafe fn encode(
5460 self,
5461 encoder: &mut fidl::encoding::Encoder<'_, D>,
5462 offset: usize,
5463 _depth: fidl::encoding::Depth,
5464 ) -> fidl::Result<()> {
5465 encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5466 fidl::encoding::Encode::<StorageIteratorNextResponse, D>::encode(
5468 (
5469 <fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>> as fidl::encoding::ValueTypeMarker>::borrow(&self.relative_monikers),
5470 ),
5471 encoder, offset, _depth
5472 )
5473 }
5474 }
5475 unsafe impl<
5476 D: fidl::encoding::ResourceDialect,
5477 T0: fidl::encoding::Encode<
5478 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5479 D,
5480 >,
5481 > fidl::encoding::Encode<StorageIteratorNextResponse, D> for (T0,)
5482 {
5483 #[inline]
5484 unsafe fn encode(
5485 self,
5486 encoder: &mut fidl::encoding::Encoder<'_, D>,
5487 offset: usize,
5488 depth: fidl::encoding::Depth,
5489 ) -> fidl::Result<()> {
5490 encoder.debug_check_bounds::<StorageIteratorNextResponse>(offset);
5491 self.0.encode(encoder, offset + 0, depth)?;
5495 Ok(())
5496 }
5497 }
5498
5499 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5500 for StorageIteratorNextResponse
5501 {
5502 #[inline(always)]
5503 fn new_empty() -> Self {
5504 Self {
5505 relative_monikers: fidl::new_empty!(
5506 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5507 D
5508 ),
5509 }
5510 }
5511
5512 #[inline]
5513 unsafe fn decode(
5514 &mut self,
5515 decoder: &mut fidl::encoding::Decoder<'_, D>,
5516 offset: usize,
5517 _depth: fidl::encoding::Depth,
5518 ) -> fidl::Result<()> {
5519 decoder.debug_check_bounds::<Self>(offset);
5520 fidl::decode!(
5522 fidl::encoding::UnboundedVector<fidl::encoding::BoundedString<4096>>,
5523 D,
5524 &mut self.relative_monikers,
5525 decoder,
5526 offset + 0,
5527 _depth
5528 )?;
5529 Ok(())
5530 }
5531 }
5532
5533 impl ComponentCrashInfo {
5534 #[inline(always)]
5535 fn max_ordinal_present(&self) -> u64 {
5536 if let Some(_) = self.moniker {
5537 return 2;
5538 }
5539 if let Some(_) = self.url {
5540 return 1;
5541 }
5542 0
5543 }
5544 }
5545
5546 impl fidl::encoding::ValueTypeMarker for ComponentCrashInfo {
5547 type Borrowed<'a> = &'a Self;
5548 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5549 value
5550 }
5551 }
5552
5553 unsafe impl fidl::encoding::TypeMarker for ComponentCrashInfo {
5554 type Owned = Self;
5555
5556 #[inline(always)]
5557 fn inline_align(_context: fidl::encoding::Context) -> usize {
5558 8
5559 }
5560
5561 #[inline(always)]
5562 fn inline_size(_context: fidl::encoding::Context) -> usize {
5563 16
5564 }
5565 }
5566
5567 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ComponentCrashInfo, D>
5568 for &ComponentCrashInfo
5569 {
5570 unsafe fn encode(
5571 self,
5572 encoder: &mut fidl::encoding::Encoder<'_, D>,
5573 offset: usize,
5574 mut depth: fidl::encoding::Depth,
5575 ) -> fidl::Result<()> {
5576 encoder.debug_check_bounds::<ComponentCrashInfo>(offset);
5577 let max_ordinal: u64 = self.max_ordinal_present();
5579 encoder.write_num(max_ordinal, offset);
5580 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5581 if max_ordinal == 0 {
5583 return Ok(());
5584 }
5585 depth.increment()?;
5586 let envelope_size = 8;
5587 let bytes_len = max_ordinal as usize * envelope_size;
5588 #[allow(unused_variables)]
5589 let offset = encoder.out_of_line_offset(bytes_len);
5590 let mut _prev_end_offset: usize = 0;
5591 if 1 > max_ordinal {
5592 return Ok(());
5593 }
5594
5595 let cur_offset: usize = (1 - 1) * envelope_size;
5598
5599 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5601
5602 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5607 self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5608 encoder, offset + cur_offset, depth
5609 )?;
5610
5611 _prev_end_offset = cur_offset + envelope_size;
5612 if 2 > max_ordinal {
5613 return Ok(());
5614 }
5615
5616 let cur_offset: usize = (2 - 1) * envelope_size;
5619
5620 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5622
5623 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
5628 self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
5629 encoder, offset + cur_offset, depth
5630 )?;
5631
5632 _prev_end_offset = cur_offset + envelope_size;
5633
5634 Ok(())
5635 }
5636 }
5637
5638 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ComponentCrashInfo {
5639 #[inline(always)]
5640 fn new_empty() -> Self {
5641 Self::default()
5642 }
5643
5644 unsafe fn decode(
5645 &mut self,
5646 decoder: &mut fidl::encoding::Decoder<'_, D>,
5647 offset: usize,
5648 mut depth: fidl::encoding::Depth,
5649 ) -> fidl::Result<()> {
5650 decoder.debug_check_bounds::<Self>(offset);
5651 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5652 None => return Err(fidl::Error::NotNullable),
5653 Some(len) => len,
5654 };
5655 if len == 0 {
5657 return Ok(());
5658 };
5659 depth.increment()?;
5660 let envelope_size = 8;
5661 let bytes_len = len * envelope_size;
5662 let offset = decoder.out_of_line_offset(bytes_len)?;
5663 let mut _next_ordinal_to_read = 0;
5665 let mut next_offset = offset;
5666 let end_offset = offset + bytes_len;
5667 _next_ordinal_to_read += 1;
5668 if next_offset >= end_offset {
5669 return Ok(());
5670 }
5671
5672 while _next_ordinal_to_read < 1 {
5674 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5675 _next_ordinal_to_read += 1;
5676 next_offset += envelope_size;
5677 }
5678
5679 let next_out_of_line = decoder.next_out_of_line();
5680 let handles_before = decoder.remaining_handles();
5681 if let Some((inlined, num_bytes, num_handles)) =
5682 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5683 {
5684 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5685 if inlined != (member_inline_size <= 4) {
5686 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5687 }
5688 let inner_offset;
5689 let mut inner_depth = depth.clone();
5690 if inlined {
5691 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5692 inner_offset = next_offset;
5693 } else {
5694 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5695 inner_depth.increment()?;
5696 }
5697 let val_ref = self.url.get_or_insert_with(|| {
5698 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5699 });
5700 fidl::decode!(
5701 fidl::encoding::BoundedString<4096>,
5702 D,
5703 val_ref,
5704 decoder,
5705 inner_offset,
5706 inner_depth
5707 )?;
5708 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5709 {
5710 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5711 }
5712 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5713 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5714 }
5715 }
5716
5717 next_offset += envelope_size;
5718 _next_ordinal_to_read += 1;
5719 if next_offset >= end_offset {
5720 return Ok(());
5721 }
5722
5723 while _next_ordinal_to_read < 2 {
5725 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5726 _next_ordinal_to_read += 1;
5727 next_offset += envelope_size;
5728 }
5729
5730 let next_out_of_line = decoder.next_out_of_line();
5731 let handles_before = decoder.remaining_handles();
5732 if let Some((inlined, num_bytes, num_handles)) =
5733 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5734 {
5735 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
5736 if inlined != (member_inline_size <= 4) {
5737 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5738 }
5739 let inner_offset;
5740 let mut inner_depth = depth.clone();
5741 if inlined {
5742 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5743 inner_offset = next_offset;
5744 } else {
5745 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5746 inner_depth.increment()?;
5747 }
5748 let val_ref = self.moniker.get_or_insert_with(|| {
5749 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
5750 });
5751 fidl::decode!(
5752 fidl::encoding::BoundedString<4096>,
5753 D,
5754 val_ref,
5755 decoder,
5756 inner_offset,
5757 inner_depth
5758 )?;
5759 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5760 {
5761 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5762 }
5763 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5764 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5765 }
5766 }
5767
5768 next_offset += envelope_size;
5769
5770 while next_offset < end_offset {
5772 _next_ordinal_to_read += 1;
5773 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5774 next_offset += envelope_size;
5775 }
5776
5777 Ok(())
5778 }
5779 }
5780
5781 impl DictionaryEntry {
5782 #[inline(always)]
5783 fn max_ordinal_present(&self) -> u64 {
5784 if let Some(_) = self.name {
5785 return 1;
5786 }
5787 0
5788 }
5789 }
5790
5791 impl fidl::encoding::ValueTypeMarker for DictionaryEntry {
5792 type Borrowed<'a> = &'a Self;
5793 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5794 value
5795 }
5796 }
5797
5798 unsafe impl fidl::encoding::TypeMarker for DictionaryEntry {
5799 type Owned = Self;
5800
5801 #[inline(always)]
5802 fn inline_align(_context: fidl::encoding::Context) -> usize {
5803 8
5804 }
5805
5806 #[inline(always)]
5807 fn inline_size(_context: fidl::encoding::Context) -> usize {
5808 16
5809 }
5810 }
5811
5812 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<DictionaryEntry, D>
5813 for &DictionaryEntry
5814 {
5815 unsafe fn encode(
5816 self,
5817 encoder: &mut fidl::encoding::Encoder<'_, D>,
5818 offset: usize,
5819 mut depth: fidl::encoding::Depth,
5820 ) -> fidl::Result<()> {
5821 encoder.debug_check_bounds::<DictionaryEntry>(offset);
5822 let max_ordinal: u64 = self.max_ordinal_present();
5824 encoder.write_num(max_ordinal, offset);
5825 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
5826 if max_ordinal == 0 {
5828 return Ok(());
5829 }
5830 depth.increment()?;
5831 let envelope_size = 8;
5832 let bytes_len = max_ordinal as usize * envelope_size;
5833 #[allow(unused_variables)]
5834 let offset = encoder.out_of_line_offset(bytes_len);
5835 let mut _prev_end_offset: usize = 0;
5836 if 1 > max_ordinal {
5837 return Ok(());
5838 }
5839
5840 let cur_offset: usize = (1 - 1) * envelope_size;
5843
5844 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
5846
5847 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
5852 self.name.as_ref().map(
5853 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
5854 ),
5855 encoder,
5856 offset + cur_offset,
5857 depth,
5858 )?;
5859
5860 _prev_end_offset = cur_offset + envelope_size;
5861
5862 Ok(())
5863 }
5864 }
5865
5866 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for DictionaryEntry {
5867 #[inline(always)]
5868 fn new_empty() -> Self {
5869 Self::default()
5870 }
5871
5872 unsafe fn decode(
5873 &mut self,
5874 decoder: &mut fidl::encoding::Decoder<'_, D>,
5875 offset: usize,
5876 mut depth: fidl::encoding::Depth,
5877 ) -> fidl::Result<()> {
5878 decoder.debug_check_bounds::<Self>(offset);
5879 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
5880 None => return Err(fidl::Error::NotNullable),
5881 Some(len) => len,
5882 };
5883 if len == 0 {
5885 return Ok(());
5886 };
5887 depth.increment()?;
5888 let envelope_size = 8;
5889 let bytes_len = len * envelope_size;
5890 let offset = decoder.out_of_line_offset(bytes_len)?;
5891 let mut _next_ordinal_to_read = 0;
5893 let mut next_offset = offset;
5894 let end_offset = offset + bytes_len;
5895 _next_ordinal_to_read += 1;
5896 if next_offset >= end_offset {
5897 return Ok(());
5898 }
5899
5900 while _next_ordinal_to_read < 1 {
5902 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5903 _next_ordinal_to_read += 1;
5904 next_offset += envelope_size;
5905 }
5906
5907 let next_out_of_line = decoder.next_out_of_line();
5908 let handles_before = decoder.remaining_handles();
5909 if let Some((inlined, num_bytes, num_handles)) =
5910 fidl::encoding::decode_envelope_header(decoder, next_offset)?
5911 {
5912 let member_inline_size =
5913 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
5914 decoder.context,
5915 );
5916 if inlined != (member_inline_size <= 4) {
5917 return Err(fidl::Error::InvalidInlineBitInEnvelope);
5918 }
5919 let inner_offset;
5920 let mut inner_depth = depth.clone();
5921 if inlined {
5922 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
5923 inner_offset = next_offset;
5924 } else {
5925 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
5926 inner_depth.increment()?;
5927 }
5928 let val_ref = self
5929 .name
5930 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
5931 fidl::decode!(
5932 fidl::encoding::UnboundedString,
5933 D,
5934 val_ref,
5935 decoder,
5936 inner_offset,
5937 inner_depth
5938 )?;
5939 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
5940 {
5941 return Err(fidl::Error::InvalidNumBytesInEnvelope);
5942 }
5943 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
5944 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
5945 }
5946 }
5947
5948 next_offset += envelope_size;
5949
5950 while next_offset < end_offset {
5952 _next_ordinal_to_read += 1;
5953 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
5954 next_offset += envelope_size;
5955 }
5956
5957 Ok(())
5958 }
5959 }
5960
5961 impl ExecutionInfo {
5962 #[inline(always)]
5963 fn max_ordinal_present(&self) -> u64 {
5964 if let Some(_) = self.start_reason {
5965 return 1;
5966 }
5967 0
5968 }
5969 }
5970
5971 impl fidl::encoding::ValueTypeMarker for ExecutionInfo {
5972 type Borrowed<'a> = &'a Self;
5973 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5974 value
5975 }
5976 }
5977
5978 unsafe impl fidl::encoding::TypeMarker for ExecutionInfo {
5979 type Owned = Self;
5980
5981 #[inline(always)]
5982 fn inline_align(_context: fidl::encoding::Context) -> usize {
5983 8
5984 }
5985
5986 #[inline(always)]
5987 fn inline_size(_context: fidl::encoding::Context) -> usize {
5988 16
5989 }
5990 }
5991
5992 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ExecutionInfo, D>
5993 for &ExecutionInfo
5994 {
5995 unsafe fn encode(
5996 self,
5997 encoder: &mut fidl::encoding::Encoder<'_, D>,
5998 offset: usize,
5999 mut depth: fidl::encoding::Depth,
6000 ) -> fidl::Result<()> {
6001 encoder.debug_check_bounds::<ExecutionInfo>(offset);
6002 let max_ordinal: u64 = self.max_ordinal_present();
6004 encoder.write_num(max_ordinal, offset);
6005 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6006 if max_ordinal == 0 {
6008 return Ok(());
6009 }
6010 depth.increment()?;
6011 let envelope_size = 8;
6012 let bytes_len = max_ordinal as usize * envelope_size;
6013 #[allow(unused_variables)]
6014 let offset = encoder.out_of_line_offset(bytes_len);
6015 let mut _prev_end_offset: usize = 0;
6016 if 1 > max_ordinal {
6017 return Ok(());
6018 }
6019
6020 let cur_offset: usize = (1 - 1) * envelope_size;
6023
6024 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6026
6027 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<5000>, D>(
6032 self.start_reason.as_ref().map(<fidl::encoding::BoundedString<5000> as fidl::encoding::ValueTypeMarker>::borrow),
6033 encoder, offset + cur_offset, depth
6034 )?;
6035
6036 _prev_end_offset = cur_offset + envelope_size;
6037
6038 Ok(())
6039 }
6040 }
6041
6042 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ExecutionInfo {
6043 #[inline(always)]
6044 fn new_empty() -> Self {
6045 Self::default()
6046 }
6047
6048 unsafe fn decode(
6049 &mut self,
6050 decoder: &mut fidl::encoding::Decoder<'_, D>,
6051 offset: usize,
6052 mut depth: fidl::encoding::Depth,
6053 ) -> fidl::Result<()> {
6054 decoder.debug_check_bounds::<Self>(offset);
6055 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6056 None => return Err(fidl::Error::NotNullable),
6057 Some(len) => len,
6058 };
6059 if len == 0 {
6061 return Ok(());
6062 };
6063 depth.increment()?;
6064 let envelope_size = 8;
6065 let bytes_len = len * envelope_size;
6066 let offset = decoder.out_of_line_offset(bytes_len)?;
6067 let mut _next_ordinal_to_read = 0;
6069 let mut next_offset = offset;
6070 let end_offset = offset + bytes_len;
6071 _next_ordinal_to_read += 1;
6072 if next_offset >= end_offset {
6073 return Ok(());
6074 }
6075
6076 while _next_ordinal_to_read < 1 {
6078 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6079 _next_ordinal_to_read += 1;
6080 next_offset += envelope_size;
6081 }
6082
6083 let next_out_of_line = decoder.next_out_of_line();
6084 let handles_before = decoder.remaining_handles();
6085 if let Some((inlined, num_bytes, num_handles)) =
6086 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6087 {
6088 let member_inline_size = <fidl::encoding::BoundedString<5000> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6089 if inlined != (member_inline_size <= 4) {
6090 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6091 }
6092 let inner_offset;
6093 let mut inner_depth = depth.clone();
6094 if inlined {
6095 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6096 inner_offset = next_offset;
6097 } else {
6098 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6099 inner_depth.increment()?;
6100 }
6101 let val_ref = self.start_reason.get_or_insert_with(|| {
6102 fidl::new_empty!(fidl::encoding::BoundedString<5000>, D)
6103 });
6104 fidl::decode!(
6105 fidl::encoding::BoundedString<5000>,
6106 D,
6107 val_ref,
6108 decoder,
6109 inner_offset,
6110 inner_depth
6111 )?;
6112 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6113 {
6114 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6115 }
6116 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6117 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6118 }
6119 }
6120
6121 next_offset += envelope_size;
6122
6123 while next_offset < end_offset {
6125 _next_ordinal_to_read += 1;
6126 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6127 next_offset += envelope_size;
6128 }
6129
6130 Ok(())
6131 }
6132 }
6133
6134 impl Instance {
6135 #[inline(always)]
6136 fn max_ordinal_present(&self) -> u64 {
6137 if let Some(_) = self.environment {
6138 return 5;
6139 }
6140 if let Some(_) = self.resolved_info {
6141 return 4;
6142 }
6143 if let Some(_) = self.instance_id {
6144 return 3;
6145 }
6146 if let Some(_) = self.url {
6147 return 2;
6148 }
6149 if let Some(_) = self.moniker {
6150 return 1;
6151 }
6152 0
6153 }
6154 }
6155
6156 impl fidl::encoding::ValueTypeMarker for Instance {
6157 type Borrowed<'a> = &'a Self;
6158 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6159 value
6160 }
6161 }
6162
6163 unsafe impl fidl::encoding::TypeMarker for Instance {
6164 type Owned = Self;
6165
6166 #[inline(always)]
6167 fn inline_align(_context: fidl::encoding::Context) -> usize {
6168 8
6169 }
6170
6171 #[inline(always)]
6172 fn inline_size(_context: fidl::encoding::Context) -> usize {
6173 16
6174 }
6175 }
6176
6177 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Instance, D> for &Instance {
6178 unsafe fn encode(
6179 self,
6180 encoder: &mut fidl::encoding::Encoder<'_, D>,
6181 offset: usize,
6182 mut depth: fidl::encoding::Depth,
6183 ) -> fidl::Result<()> {
6184 encoder.debug_check_bounds::<Instance>(offset);
6185 let max_ordinal: u64 = self.max_ordinal_present();
6187 encoder.write_num(max_ordinal, offset);
6188 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6189 if max_ordinal == 0 {
6191 return Ok(());
6192 }
6193 depth.increment()?;
6194 let envelope_size = 8;
6195 let bytes_len = max_ordinal as usize * envelope_size;
6196 #[allow(unused_variables)]
6197 let offset = encoder.out_of_line_offset(bytes_len);
6198 let mut _prev_end_offset: usize = 0;
6199 if 1 > max_ordinal {
6200 return Ok(());
6201 }
6202
6203 let cur_offset: usize = (1 - 1) * envelope_size;
6206
6207 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6209
6210 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6215 self.moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6216 encoder, offset + cur_offset, depth
6217 )?;
6218
6219 _prev_end_offset = cur_offset + envelope_size;
6220 if 2 > max_ordinal {
6221 return Ok(());
6222 }
6223
6224 let cur_offset: usize = (2 - 1) * envelope_size;
6227
6228 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6230
6231 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6236 self.url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6237 encoder, offset + cur_offset, depth
6238 )?;
6239
6240 _prev_end_offset = cur_offset + envelope_size;
6241 if 3 > max_ordinal {
6242 return Ok(());
6243 }
6244
6245 let cur_offset: usize = (3 - 1) * envelope_size;
6248
6249 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6251
6252 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<64>, D>(
6257 self.instance_id.as_ref().map(
6258 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow,
6259 ),
6260 encoder,
6261 offset + cur_offset,
6262 depth,
6263 )?;
6264
6265 _prev_end_offset = cur_offset + envelope_size;
6266 if 4 > max_ordinal {
6267 return Ok(());
6268 }
6269
6270 let cur_offset: usize = (4 - 1) * envelope_size;
6273
6274 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6276
6277 fidl::encoding::encode_in_envelope_optional::<ResolvedInfo, D>(
6282 self.resolved_info
6283 .as_ref()
6284 .map(<ResolvedInfo as fidl::encoding::ValueTypeMarker>::borrow),
6285 encoder,
6286 offset + cur_offset,
6287 depth,
6288 )?;
6289
6290 _prev_end_offset = cur_offset + envelope_size;
6291 if 5 > max_ordinal {
6292 return Ok(());
6293 }
6294
6295 let cur_offset: usize = (5 - 1) * envelope_size;
6298
6299 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6301
6302 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6307 self.environment.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6308 encoder, offset + cur_offset, depth
6309 )?;
6310
6311 _prev_end_offset = cur_offset + envelope_size;
6312
6313 Ok(())
6314 }
6315 }
6316
6317 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Instance {
6318 #[inline(always)]
6319 fn new_empty() -> Self {
6320 Self::default()
6321 }
6322
6323 unsafe fn decode(
6324 &mut self,
6325 decoder: &mut fidl::encoding::Decoder<'_, D>,
6326 offset: usize,
6327 mut depth: fidl::encoding::Depth,
6328 ) -> fidl::Result<()> {
6329 decoder.debug_check_bounds::<Self>(offset);
6330 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6331 None => return Err(fidl::Error::NotNullable),
6332 Some(len) => len,
6333 };
6334 if len == 0 {
6336 return Ok(());
6337 };
6338 depth.increment()?;
6339 let envelope_size = 8;
6340 let bytes_len = len * envelope_size;
6341 let offset = decoder.out_of_line_offset(bytes_len)?;
6342 let mut _next_ordinal_to_read = 0;
6344 let mut next_offset = offset;
6345 let end_offset = offset + bytes_len;
6346 _next_ordinal_to_read += 1;
6347 if next_offset >= end_offset {
6348 return Ok(());
6349 }
6350
6351 while _next_ordinal_to_read < 1 {
6353 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6354 _next_ordinal_to_read += 1;
6355 next_offset += envelope_size;
6356 }
6357
6358 let next_out_of_line = decoder.next_out_of_line();
6359 let handles_before = decoder.remaining_handles();
6360 if let Some((inlined, num_bytes, num_handles)) =
6361 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6362 {
6363 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6364 if inlined != (member_inline_size <= 4) {
6365 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6366 }
6367 let inner_offset;
6368 let mut inner_depth = depth.clone();
6369 if inlined {
6370 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6371 inner_offset = next_offset;
6372 } else {
6373 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6374 inner_depth.increment()?;
6375 }
6376 let val_ref = self.moniker.get_or_insert_with(|| {
6377 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6378 });
6379 fidl::decode!(
6380 fidl::encoding::BoundedString<4096>,
6381 D,
6382 val_ref,
6383 decoder,
6384 inner_offset,
6385 inner_depth
6386 )?;
6387 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6388 {
6389 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6390 }
6391 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6392 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6393 }
6394 }
6395
6396 next_offset += envelope_size;
6397 _next_ordinal_to_read += 1;
6398 if next_offset >= end_offset {
6399 return Ok(());
6400 }
6401
6402 while _next_ordinal_to_read < 2 {
6404 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6405 _next_ordinal_to_read += 1;
6406 next_offset += envelope_size;
6407 }
6408
6409 let next_out_of_line = decoder.next_out_of_line();
6410 let handles_before = decoder.remaining_handles();
6411 if let Some((inlined, num_bytes, num_handles)) =
6412 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6413 {
6414 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6415 if inlined != (member_inline_size <= 4) {
6416 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6417 }
6418 let inner_offset;
6419 let mut inner_depth = depth.clone();
6420 if inlined {
6421 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6422 inner_offset = next_offset;
6423 } else {
6424 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6425 inner_depth.increment()?;
6426 }
6427 let val_ref = self.url.get_or_insert_with(|| {
6428 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6429 });
6430 fidl::decode!(
6431 fidl::encoding::BoundedString<4096>,
6432 D,
6433 val_ref,
6434 decoder,
6435 inner_offset,
6436 inner_depth
6437 )?;
6438 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6439 {
6440 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6441 }
6442 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6443 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6444 }
6445 }
6446
6447 next_offset += envelope_size;
6448 _next_ordinal_to_read += 1;
6449 if next_offset >= end_offset {
6450 return Ok(());
6451 }
6452
6453 while _next_ordinal_to_read < 3 {
6455 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6456 _next_ordinal_to_read += 1;
6457 next_offset += envelope_size;
6458 }
6459
6460 let next_out_of_line = decoder.next_out_of_line();
6461 let handles_before = decoder.remaining_handles();
6462 if let Some((inlined, num_bytes, num_handles)) =
6463 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6464 {
6465 let member_inline_size =
6466 <fidl::encoding::BoundedString<64> as fidl::encoding::TypeMarker>::inline_size(
6467 decoder.context,
6468 );
6469 if inlined != (member_inline_size <= 4) {
6470 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6471 }
6472 let inner_offset;
6473 let mut inner_depth = depth.clone();
6474 if inlined {
6475 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6476 inner_offset = next_offset;
6477 } else {
6478 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6479 inner_depth.increment()?;
6480 }
6481 let val_ref = self
6482 .instance_id
6483 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::BoundedString<64>, D));
6484 fidl::decode!(
6485 fidl::encoding::BoundedString<64>,
6486 D,
6487 val_ref,
6488 decoder,
6489 inner_offset,
6490 inner_depth
6491 )?;
6492 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6493 {
6494 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6495 }
6496 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6497 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6498 }
6499 }
6500
6501 next_offset += envelope_size;
6502 _next_ordinal_to_read += 1;
6503 if next_offset >= end_offset {
6504 return Ok(());
6505 }
6506
6507 while _next_ordinal_to_read < 4 {
6509 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6510 _next_ordinal_to_read += 1;
6511 next_offset += envelope_size;
6512 }
6513
6514 let next_out_of_line = decoder.next_out_of_line();
6515 let handles_before = decoder.remaining_handles();
6516 if let Some((inlined, num_bytes, num_handles)) =
6517 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6518 {
6519 let member_inline_size =
6520 <ResolvedInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6521 if inlined != (member_inline_size <= 4) {
6522 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6523 }
6524 let inner_offset;
6525 let mut inner_depth = depth.clone();
6526 if inlined {
6527 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6528 inner_offset = next_offset;
6529 } else {
6530 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6531 inner_depth.increment()?;
6532 }
6533 let val_ref =
6534 self.resolved_info.get_or_insert_with(|| fidl::new_empty!(ResolvedInfo, D));
6535 fidl::decode!(ResolvedInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6536 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6537 {
6538 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6539 }
6540 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6541 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6542 }
6543 }
6544
6545 next_offset += envelope_size;
6546 _next_ordinal_to_read += 1;
6547 if next_offset >= end_offset {
6548 return Ok(());
6549 }
6550
6551 while _next_ordinal_to_read < 5 {
6553 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6554 _next_ordinal_to_read += 1;
6555 next_offset += envelope_size;
6556 }
6557
6558 let next_out_of_line = decoder.next_out_of_line();
6559 let handles_before = decoder.remaining_handles();
6560 if let Some((inlined, num_bytes, num_handles)) =
6561 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6562 {
6563 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6564 if inlined != (member_inline_size <= 4) {
6565 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6566 }
6567 let inner_offset;
6568 let mut inner_depth = depth.clone();
6569 if inlined {
6570 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6571 inner_offset = next_offset;
6572 } else {
6573 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6574 inner_depth.increment()?;
6575 }
6576 let val_ref = self.environment.get_or_insert_with(|| {
6577 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6578 });
6579 fidl::decode!(
6580 fidl::encoding::BoundedString<4096>,
6581 D,
6582 val_ref,
6583 decoder,
6584 inner_offset,
6585 inner_depth
6586 )?;
6587 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6588 {
6589 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6590 }
6591 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6592 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6593 }
6594 }
6595
6596 next_offset += envelope_size;
6597
6598 while next_offset < end_offset {
6600 _next_ordinal_to_read += 1;
6601 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6602 next_offset += envelope_size;
6603 }
6604
6605 Ok(())
6606 }
6607 }
6608
6609 impl ResolvedInfo {
6610 #[inline(always)]
6611 fn max_ordinal_present(&self) -> u64 {
6612 if let Some(_) = self.execution_info {
6613 return 2;
6614 }
6615 if let Some(_) = self.resolved_url {
6616 return 1;
6617 }
6618 0
6619 }
6620 }
6621
6622 impl fidl::encoding::ValueTypeMarker for ResolvedInfo {
6623 type Borrowed<'a> = &'a Self;
6624 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6625 value
6626 }
6627 }
6628
6629 unsafe impl fidl::encoding::TypeMarker for ResolvedInfo {
6630 type Owned = Self;
6631
6632 #[inline(always)]
6633 fn inline_align(_context: fidl::encoding::Context) -> usize {
6634 8
6635 }
6636
6637 #[inline(always)]
6638 fn inline_size(_context: fidl::encoding::Context) -> usize {
6639 16
6640 }
6641 }
6642
6643 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ResolvedInfo, D>
6644 for &ResolvedInfo
6645 {
6646 unsafe fn encode(
6647 self,
6648 encoder: &mut fidl::encoding::Encoder<'_, D>,
6649 offset: usize,
6650 mut depth: fidl::encoding::Depth,
6651 ) -> fidl::Result<()> {
6652 encoder.debug_check_bounds::<ResolvedInfo>(offset);
6653 let max_ordinal: u64 = self.max_ordinal_present();
6655 encoder.write_num(max_ordinal, offset);
6656 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6657 if max_ordinal == 0 {
6659 return Ok(());
6660 }
6661 depth.increment()?;
6662 let envelope_size = 8;
6663 let bytes_len = max_ordinal as usize * envelope_size;
6664 #[allow(unused_variables)]
6665 let offset = encoder.out_of_line_offset(bytes_len);
6666 let mut _prev_end_offset: usize = 0;
6667 if 1 > max_ordinal {
6668 return Ok(());
6669 }
6670
6671 let cur_offset: usize = (1 - 1) * envelope_size;
6674
6675 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6677
6678 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, D>(
6683 self.resolved_url.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
6684 encoder, offset + cur_offset, depth
6685 )?;
6686
6687 _prev_end_offset = cur_offset + envelope_size;
6688 if 2 > max_ordinal {
6689 return Ok(());
6690 }
6691
6692 let cur_offset: usize = (2 - 1) * envelope_size;
6695
6696 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6698
6699 fidl::encoding::encode_in_envelope_optional::<ExecutionInfo, D>(
6704 self.execution_info
6705 .as_ref()
6706 .map(<ExecutionInfo as fidl::encoding::ValueTypeMarker>::borrow),
6707 encoder,
6708 offset + cur_offset,
6709 depth,
6710 )?;
6711
6712 _prev_end_offset = cur_offset + envelope_size;
6713
6714 Ok(())
6715 }
6716 }
6717
6718 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ResolvedInfo {
6719 #[inline(always)]
6720 fn new_empty() -> Self {
6721 Self::default()
6722 }
6723
6724 unsafe fn decode(
6725 &mut self,
6726 decoder: &mut fidl::encoding::Decoder<'_, D>,
6727 offset: usize,
6728 mut depth: fidl::encoding::Depth,
6729 ) -> fidl::Result<()> {
6730 decoder.debug_check_bounds::<Self>(offset);
6731 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6732 None => return Err(fidl::Error::NotNullable),
6733 Some(len) => len,
6734 };
6735 if len == 0 {
6737 return Ok(());
6738 };
6739 depth.increment()?;
6740 let envelope_size = 8;
6741 let bytes_len = len * envelope_size;
6742 let offset = decoder.out_of_line_offset(bytes_len)?;
6743 let mut _next_ordinal_to_read = 0;
6745 let mut next_offset = offset;
6746 let end_offset = offset + bytes_len;
6747 _next_ordinal_to_read += 1;
6748 if next_offset >= end_offset {
6749 return Ok(());
6750 }
6751
6752 while _next_ordinal_to_read < 1 {
6754 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6755 _next_ordinal_to_read += 1;
6756 next_offset += envelope_size;
6757 }
6758
6759 let next_out_of_line = decoder.next_out_of_line();
6760 let handles_before = decoder.remaining_handles();
6761 if let Some((inlined, num_bytes, num_handles)) =
6762 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6763 {
6764 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6765 if inlined != (member_inline_size <= 4) {
6766 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6767 }
6768 let inner_offset;
6769 let mut inner_depth = depth.clone();
6770 if inlined {
6771 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6772 inner_offset = next_offset;
6773 } else {
6774 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6775 inner_depth.increment()?;
6776 }
6777 let val_ref = self.resolved_url.get_or_insert_with(|| {
6778 fidl::new_empty!(fidl::encoding::BoundedString<4096>, D)
6779 });
6780 fidl::decode!(
6781 fidl::encoding::BoundedString<4096>,
6782 D,
6783 val_ref,
6784 decoder,
6785 inner_offset,
6786 inner_depth
6787 )?;
6788 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6789 {
6790 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6791 }
6792 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6793 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6794 }
6795 }
6796
6797 next_offset += envelope_size;
6798 _next_ordinal_to_read += 1;
6799 if next_offset >= end_offset {
6800 return Ok(());
6801 }
6802
6803 while _next_ordinal_to_read < 2 {
6805 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6806 _next_ordinal_to_read += 1;
6807 next_offset += envelope_size;
6808 }
6809
6810 let next_out_of_line = decoder.next_out_of_line();
6811 let handles_before = decoder.remaining_handles();
6812 if let Some((inlined, num_bytes, num_handles)) =
6813 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6814 {
6815 let member_inline_size =
6816 <ExecutionInfo as fidl::encoding::TypeMarker>::inline_size(decoder.context);
6817 if inlined != (member_inline_size <= 4) {
6818 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6819 }
6820 let inner_offset;
6821 let mut inner_depth = depth.clone();
6822 if inlined {
6823 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6824 inner_offset = next_offset;
6825 } else {
6826 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6827 inner_depth.increment()?;
6828 }
6829 let val_ref =
6830 self.execution_info.get_or_insert_with(|| fidl::new_empty!(ExecutionInfo, D));
6831 fidl::decode!(ExecutionInfo, D, val_ref, decoder, inner_offset, inner_depth)?;
6832 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
6833 {
6834 return Err(fidl::Error::InvalidNumBytesInEnvelope);
6835 }
6836 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
6837 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
6838 }
6839 }
6840
6841 next_offset += envelope_size;
6842
6843 while next_offset < end_offset {
6845 _next_ordinal_to_read += 1;
6846 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6847 next_offset += envelope_size;
6848 }
6849
6850 Ok(())
6851 }
6852 }
6853
6854 impl RouteError {
6855 #[inline(always)]
6856 fn max_ordinal_present(&self) -> u64 {
6857 if let Some(_) = self.summary {
6858 return 1;
6859 }
6860 0
6861 }
6862 }
6863
6864 impl fidl::encoding::ValueTypeMarker for RouteError {
6865 type Borrowed<'a> = &'a Self;
6866 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6867 value
6868 }
6869 }
6870
6871 unsafe impl fidl::encoding::TypeMarker for RouteError {
6872 type Owned = Self;
6873
6874 #[inline(always)]
6875 fn inline_align(_context: fidl::encoding::Context) -> usize {
6876 8
6877 }
6878
6879 #[inline(always)]
6880 fn inline_size(_context: fidl::encoding::Context) -> usize {
6881 16
6882 }
6883 }
6884
6885 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteError, D>
6886 for &RouteError
6887 {
6888 unsafe fn encode(
6889 self,
6890 encoder: &mut fidl::encoding::Encoder<'_, D>,
6891 offset: usize,
6892 mut depth: fidl::encoding::Depth,
6893 ) -> fidl::Result<()> {
6894 encoder.debug_check_bounds::<RouteError>(offset);
6895 let max_ordinal: u64 = self.max_ordinal_present();
6897 encoder.write_num(max_ordinal, offset);
6898 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
6899 if max_ordinal == 0 {
6901 return Ok(());
6902 }
6903 depth.increment()?;
6904 let envelope_size = 8;
6905 let bytes_len = max_ordinal as usize * envelope_size;
6906 #[allow(unused_variables)]
6907 let offset = encoder.out_of_line_offset(bytes_len);
6908 let mut _prev_end_offset: usize = 0;
6909 if 1 > max_ordinal {
6910 return Ok(());
6911 }
6912
6913 let cur_offset: usize = (1 - 1) * envelope_size;
6916
6917 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
6919
6920 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
6925 self.summary.as_ref().map(
6926 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
6927 ),
6928 encoder,
6929 offset + cur_offset,
6930 depth,
6931 )?;
6932
6933 _prev_end_offset = cur_offset + envelope_size;
6934
6935 Ok(())
6936 }
6937 }
6938
6939 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteError {
6940 #[inline(always)]
6941 fn new_empty() -> Self {
6942 Self::default()
6943 }
6944
6945 unsafe fn decode(
6946 &mut self,
6947 decoder: &mut fidl::encoding::Decoder<'_, D>,
6948 offset: usize,
6949 mut depth: fidl::encoding::Depth,
6950 ) -> fidl::Result<()> {
6951 decoder.debug_check_bounds::<Self>(offset);
6952 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
6953 None => return Err(fidl::Error::NotNullable),
6954 Some(len) => len,
6955 };
6956 if len == 0 {
6958 return Ok(());
6959 };
6960 depth.increment()?;
6961 let envelope_size = 8;
6962 let bytes_len = len * envelope_size;
6963 let offset = decoder.out_of_line_offset(bytes_len)?;
6964 let mut _next_ordinal_to_read = 0;
6966 let mut next_offset = offset;
6967 let end_offset = offset + bytes_len;
6968 _next_ordinal_to_read += 1;
6969 if next_offset >= end_offset {
6970 return Ok(());
6971 }
6972
6973 while _next_ordinal_to_read < 1 {
6975 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
6976 _next_ordinal_to_read += 1;
6977 next_offset += envelope_size;
6978 }
6979
6980 let next_out_of_line = decoder.next_out_of_line();
6981 let handles_before = decoder.remaining_handles();
6982 if let Some((inlined, num_bytes, num_handles)) =
6983 fidl::encoding::decode_envelope_header(decoder, next_offset)?
6984 {
6985 let member_inline_size =
6986 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
6987 decoder.context,
6988 );
6989 if inlined != (member_inline_size <= 4) {
6990 return Err(fidl::Error::InvalidInlineBitInEnvelope);
6991 }
6992 let inner_offset;
6993 let mut inner_depth = depth.clone();
6994 if inlined {
6995 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
6996 inner_offset = next_offset;
6997 } else {
6998 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
6999 inner_depth.increment()?;
7000 }
7001 let val_ref = self
7002 .summary
7003 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7004 fidl::decode!(
7005 fidl::encoding::UnboundedString,
7006 D,
7007 val_ref,
7008 decoder,
7009 inner_offset,
7010 inner_depth
7011 )?;
7012 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7013 {
7014 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7015 }
7016 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7017 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7018 }
7019 }
7020
7021 next_offset += envelope_size;
7022
7023 while next_offset < end_offset {
7025 _next_ordinal_to_read += 1;
7026 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7027 next_offset += envelope_size;
7028 }
7029
7030 Ok(())
7031 }
7032 }
7033
7034 impl RouteReport {
7035 #[inline(always)]
7036 fn max_ordinal_present(&self) -> u64 {
7037 if let Some(_) = self.dictionary_entries {
7038 return 8;
7039 }
7040 if let Some(_) = self.outcome {
7041 return 7;
7042 }
7043 if let Some(_) = self.availability {
7044 return 6;
7045 }
7046 if let Some(_) = self.service_instances {
7047 return 5;
7048 }
7049 if let Some(_) = self.source_moniker {
7050 return 4;
7051 }
7052 if let Some(_) = self.error {
7053 return 3;
7054 }
7055 if let Some(_) = self.decl_type {
7056 return 2;
7057 }
7058 if let Some(_) = self.capability {
7059 return 1;
7060 }
7061 0
7062 }
7063 }
7064
7065 impl fidl::encoding::ValueTypeMarker for RouteReport {
7066 type Borrowed<'a> = &'a Self;
7067 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7068 value
7069 }
7070 }
7071
7072 unsafe impl fidl::encoding::TypeMarker for RouteReport {
7073 type Owned = Self;
7074
7075 #[inline(always)]
7076 fn inline_align(_context: fidl::encoding::Context) -> usize {
7077 8
7078 }
7079
7080 #[inline(always)]
7081 fn inline_size(_context: fidl::encoding::Context) -> usize {
7082 16
7083 }
7084 }
7085
7086 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RouteReport, D>
7087 for &RouteReport
7088 {
7089 unsafe fn encode(
7090 self,
7091 encoder: &mut fidl::encoding::Encoder<'_, D>,
7092 offset: usize,
7093 mut depth: fidl::encoding::Depth,
7094 ) -> fidl::Result<()> {
7095 encoder.debug_check_bounds::<RouteReport>(offset);
7096 let max_ordinal: u64 = self.max_ordinal_present();
7098 encoder.write_num(max_ordinal, offset);
7099 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7100 if max_ordinal == 0 {
7102 return Ok(());
7103 }
7104 depth.increment()?;
7105 let envelope_size = 8;
7106 let bytes_len = max_ordinal as usize * envelope_size;
7107 #[allow(unused_variables)]
7108 let offset = encoder.out_of_line_offset(bytes_len);
7109 let mut _prev_end_offset: usize = 0;
7110 if 1 > max_ordinal {
7111 return Ok(());
7112 }
7113
7114 let cur_offset: usize = (1 - 1) * envelope_size;
7117
7118 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7120
7121 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7126 self.capability.as_ref().map(
7127 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7128 ),
7129 encoder,
7130 offset + cur_offset,
7131 depth,
7132 )?;
7133
7134 _prev_end_offset = cur_offset + envelope_size;
7135 if 2 > max_ordinal {
7136 return Ok(());
7137 }
7138
7139 let cur_offset: usize = (2 - 1) * envelope_size;
7142
7143 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7145
7146 fidl::encoding::encode_in_envelope_optional::<DeclType, D>(
7151 self.decl_type.as_ref().map(<DeclType as fidl::encoding::ValueTypeMarker>::borrow),
7152 encoder,
7153 offset + cur_offset,
7154 depth,
7155 )?;
7156
7157 _prev_end_offset = cur_offset + envelope_size;
7158 if 3 > max_ordinal {
7159 return Ok(());
7160 }
7161
7162 let cur_offset: usize = (3 - 1) * envelope_size;
7165
7166 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7168
7169 fidl::encoding::encode_in_envelope_optional::<RouteError, D>(
7174 self.error.as_ref().map(<RouteError as fidl::encoding::ValueTypeMarker>::borrow),
7175 encoder,
7176 offset + cur_offset,
7177 depth,
7178 )?;
7179
7180 _prev_end_offset = cur_offset + envelope_size;
7181 if 4 > max_ordinal {
7182 return Ok(());
7183 }
7184
7185 let cur_offset: usize = (4 - 1) * envelope_size;
7188
7189 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7191
7192 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7197 self.source_moniker.as_ref().map(
7198 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7199 ),
7200 encoder,
7201 offset + cur_offset,
7202 depth,
7203 )?;
7204
7205 _prev_end_offset = cur_offset + envelope_size;
7206 if 5 > max_ordinal {
7207 return Ok(());
7208 }
7209
7210 let cur_offset: usize = (5 - 1) * envelope_size;
7213
7214 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7216
7217 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<ServiceInstance>, D>(
7222 self.service_instances.as_ref().map(<fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::ValueTypeMarker>::borrow),
7223 encoder, offset + cur_offset, depth
7224 )?;
7225
7226 _prev_end_offset = cur_offset + envelope_size;
7227 if 6 > max_ordinal {
7228 return Ok(());
7229 }
7230
7231 let cur_offset: usize = (6 - 1) * envelope_size;
7234
7235 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7237
7238 fidl::encoding::encode_in_envelope_optional::<fidl_fuchsia_component_decl__common::Availability, D>(
7243 self.availability.as_ref().map(<fidl_fuchsia_component_decl__common::Availability as fidl::encoding::ValueTypeMarker>::borrow),
7244 encoder, offset + cur_offset, depth
7245 )?;
7246
7247 _prev_end_offset = cur_offset + envelope_size;
7248 if 7 > max_ordinal {
7249 return Ok(());
7250 }
7251
7252 let cur_offset: usize = (7 - 1) * envelope_size;
7255
7256 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7258
7259 fidl::encoding::encode_in_envelope_optional::<RouteOutcome, D>(
7264 self.outcome
7265 .as_ref()
7266 .map(<RouteOutcome as fidl::encoding::ValueTypeMarker>::borrow),
7267 encoder,
7268 offset + cur_offset,
7269 depth,
7270 )?;
7271
7272 _prev_end_offset = cur_offset + envelope_size;
7273 if 8 > max_ordinal {
7274 return Ok(());
7275 }
7276
7277 let cur_offset: usize = (8 - 1) * envelope_size;
7280
7281 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7283
7284 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<DictionaryEntry>, D>(
7289 self.dictionary_entries.as_ref().map(<fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::ValueTypeMarker>::borrow),
7290 encoder, offset + cur_offset, depth
7291 )?;
7292
7293 _prev_end_offset = cur_offset + envelope_size;
7294
7295 Ok(())
7296 }
7297 }
7298
7299 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RouteReport {
7300 #[inline(always)]
7301 fn new_empty() -> Self {
7302 Self::default()
7303 }
7304
7305 unsafe fn decode(
7306 &mut self,
7307 decoder: &mut fidl::encoding::Decoder<'_, D>,
7308 offset: usize,
7309 mut depth: fidl::encoding::Depth,
7310 ) -> fidl::Result<()> {
7311 decoder.debug_check_bounds::<Self>(offset);
7312 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7313 None => return Err(fidl::Error::NotNullable),
7314 Some(len) => len,
7315 };
7316 if len == 0 {
7318 return Ok(());
7319 };
7320 depth.increment()?;
7321 let envelope_size = 8;
7322 let bytes_len = len * envelope_size;
7323 let offset = decoder.out_of_line_offset(bytes_len)?;
7324 let mut _next_ordinal_to_read = 0;
7326 let mut next_offset = offset;
7327 let end_offset = offset + bytes_len;
7328 _next_ordinal_to_read += 1;
7329 if next_offset >= end_offset {
7330 return Ok(());
7331 }
7332
7333 while _next_ordinal_to_read < 1 {
7335 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7336 _next_ordinal_to_read += 1;
7337 next_offset += envelope_size;
7338 }
7339
7340 let next_out_of_line = decoder.next_out_of_line();
7341 let handles_before = decoder.remaining_handles();
7342 if let Some((inlined, num_bytes, num_handles)) =
7343 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7344 {
7345 let member_inline_size =
7346 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7347 decoder.context,
7348 );
7349 if inlined != (member_inline_size <= 4) {
7350 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7351 }
7352 let inner_offset;
7353 let mut inner_depth = depth.clone();
7354 if inlined {
7355 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7356 inner_offset = next_offset;
7357 } else {
7358 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7359 inner_depth.increment()?;
7360 }
7361 let val_ref = self
7362 .capability
7363 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7364 fidl::decode!(
7365 fidl::encoding::UnboundedString,
7366 D,
7367 val_ref,
7368 decoder,
7369 inner_offset,
7370 inner_depth
7371 )?;
7372 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7373 {
7374 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7375 }
7376 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7377 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7378 }
7379 }
7380
7381 next_offset += envelope_size;
7382 _next_ordinal_to_read += 1;
7383 if next_offset >= end_offset {
7384 return Ok(());
7385 }
7386
7387 while _next_ordinal_to_read < 2 {
7389 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7390 _next_ordinal_to_read += 1;
7391 next_offset += envelope_size;
7392 }
7393
7394 let next_out_of_line = decoder.next_out_of_line();
7395 let handles_before = decoder.remaining_handles();
7396 if let Some((inlined, num_bytes, num_handles)) =
7397 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7398 {
7399 let member_inline_size =
7400 <DeclType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7401 if inlined != (member_inline_size <= 4) {
7402 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7403 }
7404 let inner_offset;
7405 let mut inner_depth = depth.clone();
7406 if inlined {
7407 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7408 inner_offset = next_offset;
7409 } else {
7410 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7411 inner_depth.increment()?;
7412 }
7413 let val_ref = self.decl_type.get_or_insert_with(|| fidl::new_empty!(DeclType, D));
7414 fidl::decode!(DeclType, D, val_ref, decoder, inner_offset, inner_depth)?;
7415 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7416 {
7417 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7418 }
7419 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7420 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7421 }
7422 }
7423
7424 next_offset += envelope_size;
7425 _next_ordinal_to_read += 1;
7426 if next_offset >= end_offset {
7427 return Ok(());
7428 }
7429
7430 while _next_ordinal_to_read < 3 {
7432 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7433 _next_ordinal_to_read += 1;
7434 next_offset += envelope_size;
7435 }
7436
7437 let next_out_of_line = decoder.next_out_of_line();
7438 let handles_before = decoder.remaining_handles();
7439 if let Some((inlined, num_bytes, num_handles)) =
7440 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7441 {
7442 let member_inline_size =
7443 <RouteError as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7444 if inlined != (member_inline_size <= 4) {
7445 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7446 }
7447 let inner_offset;
7448 let mut inner_depth = depth.clone();
7449 if inlined {
7450 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7451 inner_offset = next_offset;
7452 } else {
7453 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7454 inner_depth.increment()?;
7455 }
7456 let val_ref = self.error.get_or_insert_with(|| fidl::new_empty!(RouteError, D));
7457 fidl::decode!(RouteError, D, val_ref, decoder, inner_offset, inner_depth)?;
7458 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7459 {
7460 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7461 }
7462 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7463 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7464 }
7465 }
7466
7467 next_offset += envelope_size;
7468 _next_ordinal_to_read += 1;
7469 if next_offset >= end_offset {
7470 return Ok(());
7471 }
7472
7473 while _next_ordinal_to_read < 4 {
7475 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7476 _next_ordinal_to_read += 1;
7477 next_offset += envelope_size;
7478 }
7479
7480 let next_out_of_line = decoder.next_out_of_line();
7481 let handles_before = decoder.remaining_handles();
7482 if let Some((inlined, num_bytes, num_handles)) =
7483 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7484 {
7485 let member_inline_size =
7486 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7487 decoder.context,
7488 );
7489 if inlined != (member_inline_size <= 4) {
7490 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7491 }
7492 let inner_offset;
7493 let mut inner_depth = depth.clone();
7494 if inlined {
7495 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7496 inner_offset = next_offset;
7497 } else {
7498 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7499 inner_depth.increment()?;
7500 }
7501 let val_ref = self
7502 .source_moniker
7503 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7504 fidl::decode!(
7505 fidl::encoding::UnboundedString,
7506 D,
7507 val_ref,
7508 decoder,
7509 inner_offset,
7510 inner_depth
7511 )?;
7512 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7513 {
7514 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7515 }
7516 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7517 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7518 }
7519 }
7520
7521 next_offset += envelope_size;
7522 _next_ordinal_to_read += 1;
7523 if next_offset >= end_offset {
7524 return Ok(());
7525 }
7526
7527 while _next_ordinal_to_read < 5 {
7529 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7530 _next_ordinal_to_read += 1;
7531 next_offset += envelope_size;
7532 }
7533
7534 let next_out_of_line = decoder.next_out_of_line();
7535 let handles_before = decoder.remaining_handles();
7536 if let Some((inlined, num_bytes, num_handles)) =
7537 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7538 {
7539 let member_inline_size = <fidl::encoding::UnboundedVector<ServiceInstance> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7540 if inlined != (member_inline_size <= 4) {
7541 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7542 }
7543 let inner_offset;
7544 let mut inner_depth = depth.clone();
7545 if inlined {
7546 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7547 inner_offset = next_offset;
7548 } else {
7549 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7550 inner_depth.increment()?;
7551 }
7552 let val_ref = self.service_instances.get_or_insert_with(|| {
7553 fidl::new_empty!(fidl::encoding::UnboundedVector<ServiceInstance>, D)
7554 });
7555 fidl::decode!(
7556 fidl::encoding::UnboundedVector<ServiceInstance>,
7557 D,
7558 val_ref,
7559 decoder,
7560 inner_offset,
7561 inner_depth
7562 )?;
7563 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7564 {
7565 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7566 }
7567 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7568 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7569 }
7570 }
7571
7572 next_offset += envelope_size;
7573 _next_ordinal_to_read += 1;
7574 if next_offset >= end_offset {
7575 return Ok(());
7576 }
7577
7578 while _next_ordinal_to_read < 6 {
7580 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7581 _next_ordinal_to_read += 1;
7582 next_offset += envelope_size;
7583 }
7584
7585 let next_out_of_line = decoder.next_out_of_line();
7586 let handles_before = decoder.remaining_handles();
7587 if let Some((inlined, num_bytes, num_handles)) =
7588 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7589 {
7590 let member_inline_size = <fidl_fuchsia_component_decl__common::Availability as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7591 if inlined != (member_inline_size <= 4) {
7592 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7593 }
7594 let inner_offset;
7595 let mut inner_depth = depth.clone();
7596 if inlined {
7597 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7598 inner_offset = next_offset;
7599 } else {
7600 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7601 inner_depth.increment()?;
7602 }
7603 let val_ref = self.availability.get_or_insert_with(|| {
7604 fidl::new_empty!(fidl_fuchsia_component_decl__common::Availability, D)
7605 });
7606 fidl::decode!(
7607 fidl_fuchsia_component_decl__common::Availability,
7608 D,
7609 val_ref,
7610 decoder,
7611 inner_offset,
7612 inner_depth
7613 )?;
7614 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7615 {
7616 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7617 }
7618 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7619 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7620 }
7621 }
7622
7623 next_offset += envelope_size;
7624 _next_ordinal_to_read += 1;
7625 if next_offset >= end_offset {
7626 return Ok(());
7627 }
7628
7629 while _next_ordinal_to_read < 7 {
7631 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7632 _next_ordinal_to_read += 1;
7633 next_offset += envelope_size;
7634 }
7635
7636 let next_out_of_line = decoder.next_out_of_line();
7637 let handles_before = decoder.remaining_handles();
7638 if let Some((inlined, num_bytes, num_handles)) =
7639 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7640 {
7641 let member_inline_size =
7642 <RouteOutcome as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7643 if inlined != (member_inline_size <= 4) {
7644 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7645 }
7646 let inner_offset;
7647 let mut inner_depth = depth.clone();
7648 if inlined {
7649 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7650 inner_offset = next_offset;
7651 } else {
7652 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7653 inner_depth.increment()?;
7654 }
7655 let val_ref = self.outcome.get_or_insert_with(|| fidl::new_empty!(RouteOutcome, D));
7656 fidl::decode!(RouteOutcome, D, val_ref, decoder, inner_offset, inner_depth)?;
7657 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7658 {
7659 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7660 }
7661 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7662 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7663 }
7664 }
7665
7666 next_offset += envelope_size;
7667 _next_ordinal_to_read += 1;
7668 if next_offset >= end_offset {
7669 return Ok(());
7670 }
7671
7672 while _next_ordinal_to_read < 8 {
7674 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7675 _next_ordinal_to_read += 1;
7676 next_offset += envelope_size;
7677 }
7678
7679 let next_out_of_line = decoder.next_out_of_line();
7680 let handles_before = decoder.remaining_handles();
7681 if let Some((inlined, num_bytes, num_handles)) =
7682 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7683 {
7684 let member_inline_size = <fidl::encoding::UnboundedVector<DictionaryEntry> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
7685 if inlined != (member_inline_size <= 4) {
7686 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7687 }
7688 let inner_offset;
7689 let mut inner_depth = depth.clone();
7690 if inlined {
7691 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7692 inner_offset = next_offset;
7693 } else {
7694 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7695 inner_depth.increment()?;
7696 }
7697 let val_ref = self.dictionary_entries.get_or_insert_with(|| {
7698 fidl::new_empty!(fidl::encoding::UnboundedVector<DictionaryEntry>, D)
7699 });
7700 fidl::decode!(
7701 fidl::encoding::UnboundedVector<DictionaryEntry>,
7702 D,
7703 val_ref,
7704 decoder,
7705 inner_offset,
7706 inner_depth
7707 )?;
7708 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7709 {
7710 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7711 }
7712 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7713 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7714 }
7715 }
7716
7717 next_offset += envelope_size;
7718
7719 while next_offset < end_offset {
7721 _next_ordinal_to_read += 1;
7722 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7723 next_offset += envelope_size;
7724 }
7725
7726 Ok(())
7727 }
7728 }
7729
7730 impl ServiceInstance {
7731 #[inline(always)]
7732 fn max_ordinal_present(&self) -> u64 {
7733 if let Some(_) = self.child_instance_name {
7734 return 3;
7735 }
7736 if let Some(_) = self.child_name {
7737 return 2;
7738 }
7739 if let Some(_) = self.instance_name {
7740 return 1;
7741 }
7742 0
7743 }
7744 }
7745
7746 impl fidl::encoding::ValueTypeMarker for ServiceInstance {
7747 type Borrowed<'a> = &'a Self;
7748 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7749 value
7750 }
7751 }
7752
7753 unsafe impl fidl::encoding::TypeMarker for ServiceInstance {
7754 type Owned = Self;
7755
7756 #[inline(always)]
7757 fn inline_align(_context: fidl::encoding::Context) -> usize {
7758 8
7759 }
7760
7761 #[inline(always)]
7762 fn inline_size(_context: fidl::encoding::Context) -> usize {
7763 16
7764 }
7765 }
7766
7767 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ServiceInstance, D>
7768 for &ServiceInstance
7769 {
7770 unsafe fn encode(
7771 self,
7772 encoder: &mut fidl::encoding::Encoder<'_, D>,
7773 offset: usize,
7774 mut depth: fidl::encoding::Depth,
7775 ) -> fidl::Result<()> {
7776 encoder.debug_check_bounds::<ServiceInstance>(offset);
7777 let max_ordinal: u64 = self.max_ordinal_present();
7779 encoder.write_num(max_ordinal, offset);
7780 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
7781 if max_ordinal == 0 {
7783 return Ok(());
7784 }
7785 depth.increment()?;
7786 let envelope_size = 8;
7787 let bytes_len = max_ordinal as usize * envelope_size;
7788 #[allow(unused_variables)]
7789 let offset = encoder.out_of_line_offset(bytes_len);
7790 let mut _prev_end_offset: usize = 0;
7791 if 1 > max_ordinal {
7792 return Ok(());
7793 }
7794
7795 let cur_offset: usize = (1 - 1) * envelope_size;
7798
7799 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7801
7802 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7807 self.instance_name.as_ref().map(
7808 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7809 ),
7810 encoder,
7811 offset + cur_offset,
7812 depth,
7813 )?;
7814
7815 _prev_end_offset = cur_offset + envelope_size;
7816 if 2 > max_ordinal {
7817 return Ok(());
7818 }
7819
7820 let cur_offset: usize = (2 - 1) * envelope_size;
7823
7824 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7826
7827 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7832 self.child_name.as_ref().map(
7833 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7834 ),
7835 encoder,
7836 offset + cur_offset,
7837 depth,
7838 )?;
7839
7840 _prev_end_offset = cur_offset + envelope_size;
7841 if 3 > max_ordinal {
7842 return Ok(());
7843 }
7844
7845 let cur_offset: usize = (3 - 1) * envelope_size;
7848
7849 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
7851
7852 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedString, D>(
7857 self.child_instance_name.as_ref().map(
7858 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow,
7859 ),
7860 encoder,
7861 offset + cur_offset,
7862 depth,
7863 )?;
7864
7865 _prev_end_offset = cur_offset + envelope_size;
7866
7867 Ok(())
7868 }
7869 }
7870
7871 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ServiceInstance {
7872 #[inline(always)]
7873 fn new_empty() -> Self {
7874 Self::default()
7875 }
7876
7877 unsafe fn decode(
7878 &mut self,
7879 decoder: &mut fidl::encoding::Decoder<'_, D>,
7880 offset: usize,
7881 mut depth: fidl::encoding::Depth,
7882 ) -> fidl::Result<()> {
7883 decoder.debug_check_bounds::<Self>(offset);
7884 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
7885 None => return Err(fidl::Error::NotNullable),
7886 Some(len) => len,
7887 };
7888 if len == 0 {
7890 return Ok(());
7891 };
7892 depth.increment()?;
7893 let envelope_size = 8;
7894 let bytes_len = len * envelope_size;
7895 let offset = decoder.out_of_line_offset(bytes_len)?;
7896 let mut _next_ordinal_to_read = 0;
7898 let mut next_offset = offset;
7899 let end_offset = offset + bytes_len;
7900 _next_ordinal_to_read += 1;
7901 if next_offset >= end_offset {
7902 return Ok(());
7903 }
7904
7905 while _next_ordinal_to_read < 1 {
7907 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7908 _next_ordinal_to_read += 1;
7909 next_offset += envelope_size;
7910 }
7911
7912 let next_out_of_line = decoder.next_out_of_line();
7913 let handles_before = decoder.remaining_handles();
7914 if let Some((inlined, num_bytes, num_handles)) =
7915 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7916 {
7917 let member_inline_size =
7918 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7919 decoder.context,
7920 );
7921 if inlined != (member_inline_size <= 4) {
7922 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7923 }
7924 let inner_offset;
7925 let mut inner_depth = depth.clone();
7926 if inlined {
7927 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7928 inner_offset = next_offset;
7929 } else {
7930 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7931 inner_depth.increment()?;
7932 }
7933 let val_ref = self
7934 .instance_name
7935 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7936 fidl::decode!(
7937 fidl::encoding::UnboundedString,
7938 D,
7939 val_ref,
7940 decoder,
7941 inner_offset,
7942 inner_depth
7943 )?;
7944 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7945 {
7946 return Err(fidl::Error::InvalidNumBytesInEnvelope);
7947 }
7948 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
7949 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
7950 }
7951 }
7952
7953 next_offset += envelope_size;
7954 _next_ordinal_to_read += 1;
7955 if next_offset >= end_offset {
7956 return Ok(());
7957 }
7958
7959 while _next_ordinal_to_read < 2 {
7961 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
7962 _next_ordinal_to_read += 1;
7963 next_offset += envelope_size;
7964 }
7965
7966 let next_out_of_line = decoder.next_out_of_line();
7967 let handles_before = decoder.remaining_handles();
7968 if let Some((inlined, num_bytes, num_handles)) =
7969 fidl::encoding::decode_envelope_header(decoder, next_offset)?
7970 {
7971 let member_inline_size =
7972 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
7973 decoder.context,
7974 );
7975 if inlined != (member_inline_size <= 4) {
7976 return Err(fidl::Error::InvalidInlineBitInEnvelope);
7977 }
7978 let inner_offset;
7979 let mut inner_depth = depth.clone();
7980 if inlined {
7981 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
7982 inner_offset = next_offset;
7983 } else {
7984 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
7985 inner_depth.increment()?;
7986 }
7987 let val_ref = self
7988 .child_name
7989 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
7990 fidl::decode!(
7991 fidl::encoding::UnboundedString,
7992 D,
7993 val_ref,
7994 decoder,
7995 inner_offset,
7996 inner_depth
7997 )?;
7998 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
7999 {
8000 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8001 }
8002 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8003 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8004 }
8005 }
8006
8007 next_offset += envelope_size;
8008 _next_ordinal_to_read += 1;
8009 if next_offset >= end_offset {
8010 return Ok(());
8011 }
8012
8013 while _next_ordinal_to_read < 3 {
8015 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8016 _next_ordinal_to_read += 1;
8017 next_offset += envelope_size;
8018 }
8019
8020 let next_out_of_line = decoder.next_out_of_line();
8021 let handles_before = decoder.remaining_handles();
8022 if let Some((inlined, num_bytes, num_handles)) =
8023 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8024 {
8025 let member_inline_size =
8026 <fidl::encoding::UnboundedString as fidl::encoding::TypeMarker>::inline_size(
8027 decoder.context,
8028 );
8029 if inlined != (member_inline_size <= 4) {
8030 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8031 }
8032 let inner_offset;
8033 let mut inner_depth = depth.clone();
8034 if inlined {
8035 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8036 inner_offset = next_offset;
8037 } else {
8038 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8039 inner_depth.increment()?;
8040 }
8041 let val_ref = self
8042 .child_instance_name
8043 .get_or_insert_with(|| fidl::new_empty!(fidl::encoding::UnboundedString, D));
8044 fidl::decode!(
8045 fidl::encoding::UnboundedString,
8046 D,
8047 val_ref,
8048 decoder,
8049 inner_offset,
8050 inner_depth
8051 )?;
8052 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8053 {
8054 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8055 }
8056 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8057 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8058 }
8059 }
8060
8061 next_offset += envelope_size;
8062
8063 while next_offset < end_offset {
8065 _next_ordinal_to_read += 1;
8066 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8067 next_offset += envelope_size;
8068 }
8069
8070 Ok(())
8071 }
8072 }
8073
8074 impl StorageStatus {
8075 #[inline(always)]
8076 fn max_ordinal_present(&self) -> u64 {
8077 if let Some(_) = self.used_size {
8078 return 2;
8079 }
8080 if let Some(_) = self.total_size {
8081 return 1;
8082 }
8083 0
8084 }
8085 }
8086
8087 impl fidl::encoding::ValueTypeMarker for StorageStatus {
8088 type Borrowed<'a> = &'a Self;
8089 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8090 value
8091 }
8092 }
8093
8094 unsafe impl fidl::encoding::TypeMarker for StorageStatus {
8095 type Owned = Self;
8096
8097 #[inline(always)]
8098 fn inline_align(_context: fidl::encoding::Context) -> usize {
8099 8
8100 }
8101
8102 #[inline(always)]
8103 fn inline_size(_context: fidl::encoding::Context) -> usize {
8104 16
8105 }
8106 }
8107
8108 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<StorageStatus, D>
8109 for &StorageStatus
8110 {
8111 unsafe fn encode(
8112 self,
8113 encoder: &mut fidl::encoding::Encoder<'_, D>,
8114 offset: usize,
8115 mut depth: fidl::encoding::Depth,
8116 ) -> fidl::Result<()> {
8117 encoder.debug_check_bounds::<StorageStatus>(offset);
8118 let max_ordinal: u64 = self.max_ordinal_present();
8120 encoder.write_num(max_ordinal, offset);
8121 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
8122 if max_ordinal == 0 {
8124 return Ok(());
8125 }
8126 depth.increment()?;
8127 let envelope_size = 8;
8128 let bytes_len = max_ordinal as usize * envelope_size;
8129 #[allow(unused_variables)]
8130 let offset = encoder.out_of_line_offset(bytes_len);
8131 let mut _prev_end_offset: usize = 0;
8132 if 1 > max_ordinal {
8133 return Ok(());
8134 }
8135
8136 let cur_offset: usize = (1 - 1) * envelope_size;
8139
8140 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8142
8143 fidl::encoding::encode_in_envelope_optional::<u64, D>(
8148 self.total_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8149 encoder,
8150 offset + cur_offset,
8151 depth,
8152 )?;
8153
8154 _prev_end_offset = cur_offset + envelope_size;
8155 if 2 > max_ordinal {
8156 return Ok(());
8157 }
8158
8159 let cur_offset: usize = (2 - 1) * envelope_size;
8162
8163 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
8165
8166 fidl::encoding::encode_in_envelope_optional::<u64, D>(
8171 self.used_size.as_ref().map(<u64 as fidl::encoding::ValueTypeMarker>::borrow),
8172 encoder,
8173 offset + cur_offset,
8174 depth,
8175 )?;
8176
8177 _prev_end_offset = cur_offset + envelope_size;
8178
8179 Ok(())
8180 }
8181 }
8182
8183 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for StorageStatus {
8184 #[inline(always)]
8185 fn new_empty() -> Self {
8186 Self::default()
8187 }
8188
8189 unsafe fn decode(
8190 &mut self,
8191 decoder: &mut fidl::encoding::Decoder<'_, D>,
8192 offset: usize,
8193 mut depth: fidl::encoding::Depth,
8194 ) -> fidl::Result<()> {
8195 decoder.debug_check_bounds::<Self>(offset);
8196 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
8197 None => return Err(fidl::Error::NotNullable),
8198 Some(len) => len,
8199 };
8200 if len == 0 {
8202 return Ok(());
8203 };
8204 depth.increment()?;
8205 let envelope_size = 8;
8206 let bytes_len = len * envelope_size;
8207 let offset = decoder.out_of_line_offset(bytes_len)?;
8208 let mut _next_ordinal_to_read = 0;
8210 let mut next_offset = offset;
8211 let end_offset = offset + bytes_len;
8212 _next_ordinal_to_read += 1;
8213 if next_offset >= end_offset {
8214 return Ok(());
8215 }
8216
8217 while _next_ordinal_to_read < 1 {
8219 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8220 _next_ordinal_to_read += 1;
8221 next_offset += envelope_size;
8222 }
8223
8224 let next_out_of_line = decoder.next_out_of_line();
8225 let handles_before = decoder.remaining_handles();
8226 if let Some((inlined, num_bytes, num_handles)) =
8227 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8228 {
8229 let member_inline_size =
8230 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8231 if inlined != (member_inline_size <= 4) {
8232 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8233 }
8234 let inner_offset;
8235 let mut inner_depth = depth.clone();
8236 if inlined {
8237 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8238 inner_offset = next_offset;
8239 } else {
8240 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8241 inner_depth.increment()?;
8242 }
8243 let val_ref = self.total_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8244 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8245 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8246 {
8247 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8248 }
8249 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8250 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8251 }
8252 }
8253
8254 next_offset += envelope_size;
8255 _next_ordinal_to_read += 1;
8256 if next_offset >= end_offset {
8257 return Ok(());
8258 }
8259
8260 while _next_ordinal_to_read < 2 {
8262 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8263 _next_ordinal_to_read += 1;
8264 next_offset += envelope_size;
8265 }
8266
8267 let next_out_of_line = decoder.next_out_of_line();
8268 let handles_before = decoder.remaining_handles();
8269 if let Some((inlined, num_bytes, num_handles)) =
8270 fidl::encoding::decode_envelope_header(decoder, next_offset)?
8271 {
8272 let member_inline_size =
8273 <u64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
8274 if inlined != (member_inline_size <= 4) {
8275 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8276 }
8277 let inner_offset;
8278 let mut inner_depth = depth.clone();
8279 if inlined {
8280 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
8281 inner_offset = next_offset;
8282 } else {
8283 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8284 inner_depth.increment()?;
8285 }
8286 let val_ref = self.used_size.get_or_insert_with(|| fidl::new_empty!(u64, D));
8287 fidl::decode!(u64, D, val_ref, decoder, inner_offset, inner_depth)?;
8288 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
8289 {
8290 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8291 }
8292 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8293 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8294 }
8295 }
8296
8297 next_offset += envelope_size;
8298
8299 while next_offset < end_offset {
8301 _next_ordinal_to_read += 1;
8302 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
8303 next_offset += envelope_size;
8304 }
8305
8306 Ok(())
8307 }
8308 }
8309
8310 impl fidl::encoding::ValueTypeMarker for ChildLocation {
8311 type Borrowed<'a> = &'a Self;
8312 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8313 value
8314 }
8315 }
8316
8317 unsafe impl fidl::encoding::TypeMarker for ChildLocation {
8318 type Owned = Self;
8319
8320 #[inline(always)]
8321 fn inline_align(_context: fidl::encoding::Context) -> usize {
8322 8
8323 }
8324
8325 #[inline(always)]
8326 fn inline_size(_context: fidl::encoding::Context) -> usize {
8327 16
8328 }
8329 }
8330
8331 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ChildLocation, D>
8332 for &ChildLocation
8333 {
8334 #[inline]
8335 unsafe fn encode(
8336 self,
8337 encoder: &mut fidl::encoding::Encoder<'_, D>,
8338 offset: usize,
8339 _depth: fidl::encoding::Depth,
8340 ) -> fidl::Result<()> {
8341 encoder.debug_check_bounds::<ChildLocation>(offset);
8342 encoder.write_num::<u64>(self.ordinal(), offset);
8343 match self {
8344 ChildLocation::Collection(ref val) => fidl::encoding::encode_in_envelope::<
8345 fidl::encoding::BoundedString<255>,
8346 D,
8347 >(
8348 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
8349 val,
8350 ),
8351 encoder,
8352 offset + 8,
8353 _depth,
8354 ),
8355 ChildLocation::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
8356 }
8357 }
8358 }
8359
8360 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ChildLocation {
8361 #[inline(always)]
8362 fn new_empty() -> Self {
8363 Self::__SourceBreaking { unknown_ordinal: 0 }
8364 }
8365
8366 #[inline]
8367 unsafe fn decode(
8368 &mut self,
8369 decoder: &mut fidl::encoding::Decoder<'_, D>,
8370 offset: usize,
8371 mut depth: fidl::encoding::Depth,
8372 ) -> fidl::Result<()> {
8373 decoder.debug_check_bounds::<Self>(offset);
8374 #[allow(unused_variables)]
8375 let next_out_of_line = decoder.next_out_of_line();
8376 let handles_before = decoder.remaining_handles();
8377 let (ordinal, inlined, num_bytes, num_handles) =
8378 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
8379
8380 let member_inline_size = match ordinal {
8381 1 => {
8382 <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
8383 decoder.context,
8384 )
8385 }
8386 0 => return Err(fidl::Error::UnknownUnionTag),
8387 _ => num_bytes as usize,
8388 };
8389
8390 if inlined != (member_inline_size <= 4) {
8391 return Err(fidl::Error::InvalidInlineBitInEnvelope);
8392 }
8393 let _inner_offset;
8394 if inlined {
8395 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
8396 _inner_offset = offset + 8;
8397 } else {
8398 depth.increment()?;
8399 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
8400 }
8401 match ordinal {
8402 1 => {
8403 #[allow(irrefutable_let_patterns)]
8404 if let ChildLocation::Collection(_) = self {
8405 } else {
8407 *self = ChildLocation::Collection(fidl::new_empty!(
8409 fidl::encoding::BoundedString<255>,
8410 D
8411 ));
8412 }
8413 #[allow(irrefutable_let_patterns)]
8414 if let ChildLocation::Collection(ref mut val) = self {
8415 fidl::decode!(
8416 fidl::encoding::BoundedString<255>,
8417 D,
8418 val,
8419 decoder,
8420 _inner_offset,
8421 depth
8422 )?;
8423 } else {
8424 unreachable!()
8425 }
8426 }
8427 #[allow(deprecated)]
8428 ordinal => {
8429 for _ in 0..num_handles {
8430 decoder.drop_next_handle()?;
8431 }
8432 *self = ChildLocation::__SourceBreaking { unknown_ordinal: ordinal };
8433 }
8434 }
8435 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
8436 return Err(fidl::Error::InvalidNumBytesInEnvelope);
8437 }
8438 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
8439 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
8440 }
8441 Ok(())
8442 }
8443 }
8444}