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