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