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