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