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 type CaseName = String;
13
14pub type TestCaseId = u32;
16
17pub type TestCaseName = String;
19
20pub const MAX_ARGUMENTS: u64 = fidl_fuchsia_io::MAX_PATH_LENGTH as u64;
21
22pub const MAX_ARGUMENT_LENGTH: u64 = 1024;
23
24pub const MAX_DEBUG_DATAS_PER_GET: u64 = 1024;
25
26pub const MAX_EVENTS_PER_WATCH: u64 = 1024;
27
28pub const MAX_FILTERS: u64 = 1024;
29
30pub const MAX_FILTER_LENGTH: u64 = fidl_fuchsia_component::MAX_MONIKER_LENGTH as u64;
31
32pub const MAX_OFFERS: u64 = 1024;
33
34pub const MAX_TEST_CASES_PER_GET: u64 = 1024;
35
36pub const MAX_TEST_COLLECTION_NAME_LENGTH: u64 = fidl_fuchsia_io::MAX_NAME_LENGTH as u64;
37
38#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
40pub enum CaseStatus {
41 Passed,
43 Failed,
45 TimedOut,
47 Skipped,
49 Error,
51 #[doc(hidden)]
52 __SourceBreaking { unknown_ordinal: u32 },
53}
54
55#[macro_export]
57macro_rules! CaseStatusUnknown {
58 () => {
59 _
60 };
61}
62
63impl CaseStatus {
64 #[inline]
65 pub fn from_primitive(prim: u32) -> Option<Self> {
66 match prim {
67 0 => Some(Self::Passed),
68 1 => Some(Self::Failed),
69 2 => Some(Self::TimedOut),
70 3 => Some(Self::Skipped),
71 4 => Some(Self::Error),
72 _ => None,
73 }
74 }
75
76 #[inline]
77 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
78 match prim {
79 0 => Self::Passed,
80 1 => Self::Failed,
81 2 => Self::TimedOut,
82 3 => Self::Skipped,
83 4 => Self::Error,
84 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
85 }
86 }
87
88 #[inline]
89 pub fn unknown() -> Self {
90 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
91 }
92
93 #[inline]
94 pub const fn into_primitive(self) -> u32 {
95 match self {
96 Self::Passed => 0,
97 Self::Failed => 1,
98 Self::TimedOut => 2,
99 Self::Skipped => 3,
100 Self::Error => 4,
101 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
102 }
103 }
104
105 #[inline]
106 pub fn is_unknown(&self) -> bool {
107 match self {
108 Self::__SourceBreaking { unknown_ordinal: _ } => true,
109 _ => false,
110 }
111 }
112}
113
114#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
116pub enum LaunchError {
117 ResourceUnavailable,
119 InstanceCannotResolve,
121 InvalidArgs,
123 FailedToConnectToTestSuite,
126 CaseEnumeration,
128 InternalError,
131 NoMatchingCases,
135 InvalidManifest,
137 #[doc(hidden)]
138 __SourceBreaking { unknown_ordinal: u32 },
139}
140
141#[macro_export]
143macro_rules! LaunchErrorUnknown {
144 () => {
145 _
146 };
147}
148
149impl LaunchError {
150 #[inline]
151 pub fn from_primitive(prim: u32) -> Option<Self> {
152 match prim {
153 1 => Some(Self::ResourceUnavailable),
154 2 => Some(Self::InstanceCannotResolve),
155 3 => Some(Self::InvalidArgs),
156 4 => Some(Self::FailedToConnectToTestSuite),
157 5 => Some(Self::CaseEnumeration),
158 6 => Some(Self::InternalError),
159 7 => Some(Self::NoMatchingCases),
160 8 => Some(Self::InvalidManifest),
161 _ => None,
162 }
163 }
164
165 #[inline]
166 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
167 match prim {
168 1 => Self::ResourceUnavailable,
169 2 => Self::InstanceCannotResolve,
170 3 => Self::InvalidArgs,
171 4 => Self::FailedToConnectToTestSuite,
172 5 => Self::CaseEnumeration,
173 6 => Self::InternalError,
174 7 => Self::NoMatchingCases,
175 8 => Self::InvalidManifest,
176 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
177 }
178 }
179
180 #[inline]
181 pub fn unknown() -> Self {
182 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
183 }
184
185 #[inline]
186 pub const fn into_primitive(self) -> u32 {
187 match self {
188 Self::ResourceUnavailable => 1,
189 Self::InstanceCannotResolve => 2,
190 Self::InvalidArgs => 3,
191 Self::FailedToConnectToTestSuite => 4,
192 Self::CaseEnumeration => 5,
193 Self::InternalError => 6,
194 Self::NoMatchingCases => 7,
195 Self::InvalidManifest => 8,
196 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
197 }
198 }
199
200 #[inline]
201 pub fn is_unknown(&self) -> bool {
202 match self {
203 Self::__SourceBreaking { unknown_ordinal: _ } => true,
204 _ => false,
205 }
206 }
207}
208
209#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
211pub enum LogsIteratorOption {
212 BatchIterator,
213 ArchiveIterator,
214 SocketBatchIterator,
215 #[doc(hidden)]
216 __SourceBreaking {
217 unknown_ordinal: u32,
218 },
219}
220
221#[macro_export]
223macro_rules! LogsIteratorOptionUnknown {
224 () => {
225 _
226 };
227}
228
229impl LogsIteratorOption {
230 #[inline]
231 pub fn from_primitive(prim: u32) -> Option<Self> {
232 match prim {
233 0 => Some(Self::BatchIterator),
234 1 => Some(Self::ArchiveIterator),
235 2 => Some(Self::SocketBatchIterator),
236 _ => None,
237 }
238 }
239
240 #[inline]
241 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
242 match prim {
243 0 => Self::BatchIterator,
244 1 => Self::ArchiveIterator,
245 2 => Self::SocketBatchIterator,
246 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
247 }
248 }
249
250 #[inline]
251 pub fn unknown() -> Self {
252 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
253 }
254
255 #[inline]
256 pub const fn into_primitive(self) -> u32 {
257 match self {
258 Self::BatchIterator => 0,
259 Self::ArchiveIterator => 1,
260 Self::SocketBatchIterator => 2,
261 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
262 }
263 }
264
265 #[inline]
266 pub fn is_unknown(&self) -> bool {
267 match self {
268 Self::__SourceBreaking { unknown_ordinal: _ } => true,
269 _ => false,
270 }
271 }
272}
273
274#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
276pub enum LogsIteratorType {
277 Batch,
282 Socket,
286 #[doc(hidden)]
287 __SourceBreaking { unknown_ordinal: u32 },
288}
289
290#[macro_export]
292macro_rules! LogsIteratorTypeUnknown {
293 () => {
294 _
295 };
296}
297
298impl LogsIteratorType {
299 #[inline]
300 pub fn from_primitive(prim: u32) -> Option<Self> {
301 match prim {
302 1 => Some(Self::Batch),
303 2 => Some(Self::Socket),
304 _ => None,
305 }
306 }
307
308 #[inline]
309 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
310 match prim {
311 1 => Self::Batch,
312 2 => Self::Socket,
313 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
314 }
315 }
316
317 #[inline]
318 pub fn unknown() -> Self {
319 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
320 }
321
322 #[inline]
323 pub const fn into_primitive(self) -> u32 {
324 match self {
325 Self::Batch => 1,
326 Self::Socket => 2,
327 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
328 }
329 }
330
331 #[inline]
332 pub fn is_unknown(&self) -> bool {
333 match self {
334 Self::__SourceBreaking { unknown_ordinal: _ } => true,
335 _ => false,
336 }
337 }
338}
339
340#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
342pub enum SuiteResult {
343 Finished,
345 Failed,
348 DidNotFinish,
351 TimedOut,
353 Stopped,
355 InternalError,
356 #[doc(hidden)]
357 __SourceBreaking {
358 unknown_ordinal: u32,
359 },
360}
361
362#[macro_export]
364macro_rules! SuiteResultUnknown {
365 () => {
366 _
367 };
368}
369
370impl SuiteResult {
371 #[inline]
372 pub fn from_primitive(prim: u32) -> Option<Self> {
373 match prim {
374 1 => Some(Self::Finished),
375 2 => Some(Self::Failed),
376 3 => Some(Self::DidNotFinish),
377 4 => Some(Self::TimedOut),
378 5 => Some(Self::Stopped),
379 6 => Some(Self::InternalError),
380 _ => None,
381 }
382 }
383
384 #[inline]
385 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
386 match prim {
387 1 => Self::Finished,
388 2 => Self::Failed,
389 3 => Self::DidNotFinish,
390 4 => Self::TimedOut,
391 5 => Self::Stopped,
392 6 => Self::InternalError,
393 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
394 }
395 }
396
397 #[inline]
398 pub fn unknown() -> Self {
399 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
400 }
401
402 #[inline]
403 pub const fn into_primitive(self) -> u32 {
404 match self {
405 Self::Finished => 1,
406 Self::Failed => 2,
407 Self::DidNotFinish => 3,
408 Self::TimedOut => 4,
409 Self::Stopped => 5,
410 Self::InternalError => 6,
411 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
412 }
413 }
414
415 #[inline]
416 pub fn is_unknown(&self) -> bool {
417 match self {
418 Self::__SourceBreaking { unknown_ordinal: _ } => true,
419 _ => false,
420 }
421 }
422}
423
424#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
429pub enum SuiteStatus {
430 Passed,
432 Failed,
434 DidNotFinish,
437 TimedOut,
439 Stopped,
441 InternalError,
442 #[doc(hidden)]
443 __SourceBreaking {
444 unknown_ordinal: u32,
445 },
446}
447
448#[macro_export]
450macro_rules! SuiteStatusUnknown {
451 () => {
452 _
453 };
454}
455
456impl SuiteStatus {
457 #[inline]
458 pub fn from_primitive(prim: u32) -> Option<Self> {
459 match prim {
460 0 => Some(Self::Passed),
461 1 => Some(Self::Failed),
462 3 => Some(Self::DidNotFinish),
463 4 => Some(Self::TimedOut),
464 5 => Some(Self::Stopped),
465 6 => Some(Self::InternalError),
466 _ => None,
467 }
468 }
469
470 #[inline]
471 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
472 match prim {
473 0 => Self::Passed,
474 1 => Self::Failed,
475 3 => Self::DidNotFinish,
476 4 => Self::TimedOut,
477 5 => Self::Stopped,
478 6 => Self::InternalError,
479 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
480 }
481 }
482
483 #[inline]
484 pub fn unknown() -> Self {
485 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
486 }
487
488 #[inline]
489 pub const fn into_primitive(self) -> u32 {
490 match self {
491 Self::Passed => 0,
492 Self::Failed => 1,
493 Self::DidNotFinish => 3,
494 Self::TimedOut => 4,
495 Self::Stopped => 5,
496 Self::InternalError => 6,
497 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
498 }
499 }
500
501 #[inline]
502 pub fn is_unknown(&self) -> bool {
503 match self {
504 Self::__SourceBreaking { unknown_ordinal: _ } => true,
505 _ => false,
506 }
507 }
508}
509
510#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
512pub enum TestCaseResult {
513 Skipped,
515 Passed,
517 Failed,
519 TimedOut,
521 Error,
523 #[doc(hidden)]
524 __SourceBreaking { unknown_ordinal: u32 },
525}
526
527#[macro_export]
529macro_rules! TestCaseResultUnknown {
530 () => {
531 _
532 };
533}
534
535impl TestCaseResult {
536 #[inline]
537 pub fn from_primitive(prim: u32) -> Option<Self> {
538 match prim {
539 1 => Some(Self::Skipped),
540 2 => Some(Self::Passed),
541 3 => Some(Self::Failed),
542 4 => Some(Self::TimedOut),
543 5 => Some(Self::Error),
544 _ => None,
545 }
546 }
547
548 #[inline]
549 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
550 match prim {
551 1 => Self::Skipped,
552 2 => Self::Passed,
553 3 => Self::Failed,
554 4 => Self::TimedOut,
555 5 => Self::Error,
556 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
557 }
558 }
559
560 #[inline]
561 pub fn unknown() -> Self {
562 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
563 }
564
565 #[inline]
566 pub const fn into_primitive(self) -> u32 {
567 match self {
568 Self::Skipped => 1,
569 Self::Passed => 2,
570 Self::Failed => 3,
571 Self::TimedOut => 4,
572 Self::Error => 5,
573 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
574 }
575 }
576
577 #[inline]
578 pub fn is_unknown(&self) -> bool {
579 match self {
580 Self::__SourceBreaking { unknown_ordinal: _ } => true,
581 _ => false,
582 }
583 }
584}
585
586#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
587#[repr(C)]
588pub struct CaseFinished {
589 pub identifier: u32,
590}
591
592impl fidl::Persistable for CaseFinished {}
593
594#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
595pub struct CaseFound {
596 pub test_case_name: String,
598 pub identifier: u32,
600}
601
602impl fidl::Persistable for CaseFound {}
603
604#[derive(Clone, Debug, PartialEq)]
605pub struct CaseIteratorGetNextResponse {
606 pub cases: Vec<Case>,
607}
608
609impl fidl::Persistable for CaseIteratorGetNextResponse {}
610
611#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
612#[repr(C)]
613pub struct CaseStarted {
614 pub identifier: u32,
615}
616
617impl fidl::Persistable for CaseStarted {}
618
619#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
620pub struct CaseStopped {
621 pub identifier: u32,
622 pub status: CaseStatus,
623}
624
625impl fidl::Persistable for CaseStopped {}
626
627#[derive(Clone, Debug, PartialEq)]
628pub struct RunBuilderWithSchedulingOptionsRequest {
629 pub options: SchedulingOptions,
630}
631
632impl fidl::Persistable for RunBuilderWithSchedulingOptionsRequest {}
633
634#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
635pub struct RunStarted;
636
637impl fidl::Persistable for RunStarted {}
638
639#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
640pub struct RunStopped;
641
642impl fidl::Persistable for RunStopped {}
643
644#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
645pub struct SuiteStarted;
646
647impl fidl::Persistable for SuiteStarted {}
648
649#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
650pub struct SuiteStopped {
651 pub status: SuiteStatus,
652}
653
654impl fidl::Persistable for SuiteStopped {}
655
656#[derive(Clone, Debug, PartialEq)]
657pub struct TestCaseIteratorGetNextResponse {
658 pub test_cases: Vec<TestCase>,
659}
660
661impl fidl::Persistable for TestCaseIteratorGetNextResponse {}
662
663#[derive(Clone, Debug, Default, PartialEq)]
665pub struct Case {
666 pub name: Option<String>,
668 #[doc(hidden)]
669 pub __source_breaking: fidl::marker::SourceBreaking,
670}
671
672impl fidl::Persistable for Case {}
673
674#[derive(Clone, Debug, Default, PartialEq)]
676pub struct RunOptions {
677 pub run_disabled_tests: Option<bool>,
680 pub parallel: Option<u16>,
684 pub arguments: Option<Vec<String>>,
687 pub timeout: Option<i64>,
689 pub case_filters_to_run: Option<Vec<String>>,
711 pub log_iterator: Option<LogsIteratorOption>,
714 pub log_interest: Option<Vec<fidl_fuchsia_diagnostics::LogInterestSelector>>,
716 pub break_on_failure: Option<bool>,
721 pub no_exception_channel: Option<bool>,
725 #[doc(hidden)]
726 pub __source_breaking: fidl::marker::SourceBreaking,
727}
728
729impl fidl::Persistable for RunOptions {}
730
731#[derive(Clone, Debug, Default, PartialEq)]
733pub struct SchedulingOptions {
734 pub max_parallel_suites: Option<u16>,
737 pub accumulate_debug_data: Option<bool>,
741 #[doc(hidden)]
742 pub __source_breaking: fidl::marker::SourceBreaking,
743}
744
745impl fidl::Persistable for SchedulingOptions {}
746
747#[derive(Clone, Debug, Default, PartialEq)]
749pub struct SuiteStartedEventDetails {
750 #[doc(hidden)]
751 pub __source_breaking: fidl::marker::SourceBreaking,
752}
753
754impl fidl::Persistable for SuiteStartedEventDetails {}
755
756#[derive(Clone, Debug, Default, PartialEq)]
758pub struct SuiteStoppedEventDetails {
759 pub result: Option<SuiteResult>,
761 #[doc(hidden)]
762 pub __source_breaking: fidl::marker::SourceBreaking,
763}
764
765impl fidl::Persistable for SuiteStoppedEventDetails {}
766
767#[derive(Clone, Debug, Default, PartialEq)]
769pub struct TestCase {
770 pub name: Option<String>,
772 #[doc(hidden)]
773 pub __source_breaking: fidl::marker::SourceBreaking,
774}
775
776impl fidl::Persistable for TestCase {}
777
778#[derive(Clone, Debug, Default, PartialEq)]
780pub struct TestCaseFinishedEventDetails {
781 pub test_case_id: Option<u32>,
784 #[doc(hidden)]
785 pub __source_breaking: fidl::marker::SourceBreaking,
786}
787
788impl fidl::Persistable for TestCaseFinishedEventDetails {}
789
790#[derive(Clone, Debug, Default, PartialEq)]
792pub struct TestCaseFoundEventDetails {
793 pub test_case_name: Option<String>,
795 pub test_case_id: Option<u32>,
798 #[doc(hidden)]
799 pub __source_breaking: fidl::marker::SourceBreaking,
800}
801
802impl fidl::Persistable for TestCaseFoundEventDetails {}
803
804#[derive(Clone, Debug, Default, PartialEq)]
806pub struct TestCaseStartedEventDetails {
807 pub test_case_id: Option<u32>,
810 #[doc(hidden)]
811 pub __source_breaking: fidl::marker::SourceBreaking,
812}
813
814impl fidl::Persistable for TestCaseStartedEventDetails {}
815
816#[derive(Clone, Debug, Default, PartialEq)]
818pub struct TestCaseStoppedEventDetails {
819 pub test_case_id: Option<u32>,
822 pub result: Option<TestCaseResult>,
824 #[doc(hidden)]
825 pub __source_breaking: fidl::marker::SourceBreaking,
826}
827
828impl fidl::Persistable for TestCaseStoppedEventDetails {}
829
830mod internal {
831 use super::*;
832 unsafe impl fidl::encoding::TypeMarker for CaseStatus {
833 type Owned = Self;
834
835 #[inline(always)]
836 fn inline_align(_context: fidl::encoding::Context) -> usize {
837 std::mem::align_of::<u32>()
838 }
839
840 #[inline(always)]
841 fn inline_size(_context: fidl::encoding::Context) -> usize {
842 std::mem::size_of::<u32>()
843 }
844
845 #[inline(always)]
846 fn encode_is_copy() -> bool {
847 false
848 }
849
850 #[inline(always)]
851 fn decode_is_copy() -> bool {
852 false
853 }
854 }
855
856 impl fidl::encoding::ValueTypeMarker for CaseStatus {
857 type Borrowed<'a> = Self;
858 #[inline(always)]
859 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
860 *value
861 }
862 }
863
864 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CaseStatus {
865 #[inline]
866 unsafe fn encode(
867 self,
868 encoder: &mut fidl::encoding::Encoder<'_, D>,
869 offset: usize,
870 _depth: fidl::encoding::Depth,
871 ) -> fidl::Result<()> {
872 encoder.debug_check_bounds::<Self>(offset);
873 encoder.write_num(self.into_primitive(), offset);
874 Ok(())
875 }
876 }
877
878 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStatus {
879 #[inline(always)]
880 fn new_empty() -> Self {
881 Self::unknown()
882 }
883
884 #[inline]
885 unsafe fn decode(
886 &mut self,
887 decoder: &mut fidl::encoding::Decoder<'_, D>,
888 offset: usize,
889 _depth: fidl::encoding::Depth,
890 ) -> fidl::Result<()> {
891 decoder.debug_check_bounds::<Self>(offset);
892 let prim = decoder.read_num::<u32>(offset);
893
894 *self = Self::from_primitive_allow_unknown(prim);
895 Ok(())
896 }
897 }
898 unsafe impl fidl::encoding::TypeMarker for LaunchError {
899 type Owned = Self;
900
901 #[inline(always)]
902 fn inline_align(_context: fidl::encoding::Context) -> usize {
903 std::mem::align_of::<u32>()
904 }
905
906 #[inline(always)]
907 fn inline_size(_context: fidl::encoding::Context) -> usize {
908 std::mem::size_of::<u32>()
909 }
910
911 #[inline(always)]
912 fn encode_is_copy() -> bool {
913 false
914 }
915
916 #[inline(always)]
917 fn decode_is_copy() -> bool {
918 false
919 }
920 }
921
922 impl fidl::encoding::ValueTypeMarker for LaunchError {
923 type Borrowed<'a> = Self;
924 #[inline(always)]
925 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
926 *value
927 }
928 }
929
930 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for LaunchError {
931 #[inline]
932 unsafe fn encode(
933 self,
934 encoder: &mut fidl::encoding::Encoder<'_, D>,
935 offset: usize,
936 _depth: fidl::encoding::Depth,
937 ) -> fidl::Result<()> {
938 encoder.debug_check_bounds::<Self>(offset);
939 encoder.write_num(self.into_primitive(), offset);
940 Ok(())
941 }
942 }
943
944 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LaunchError {
945 #[inline(always)]
946 fn new_empty() -> Self {
947 Self::unknown()
948 }
949
950 #[inline]
951 unsafe fn decode(
952 &mut self,
953 decoder: &mut fidl::encoding::Decoder<'_, D>,
954 offset: usize,
955 _depth: fidl::encoding::Depth,
956 ) -> fidl::Result<()> {
957 decoder.debug_check_bounds::<Self>(offset);
958 let prim = decoder.read_num::<u32>(offset);
959
960 *self = Self::from_primitive_allow_unknown(prim);
961 Ok(())
962 }
963 }
964 unsafe impl fidl::encoding::TypeMarker for LogsIteratorOption {
965 type Owned = Self;
966
967 #[inline(always)]
968 fn inline_align(_context: fidl::encoding::Context) -> usize {
969 std::mem::align_of::<u32>()
970 }
971
972 #[inline(always)]
973 fn inline_size(_context: fidl::encoding::Context) -> usize {
974 std::mem::size_of::<u32>()
975 }
976
977 #[inline(always)]
978 fn encode_is_copy() -> bool {
979 false
980 }
981
982 #[inline(always)]
983 fn decode_is_copy() -> bool {
984 false
985 }
986 }
987
988 impl fidl::encoding::ValueTypeMarker for LogsIteratorOption {
989 type Borrowed<'a> = Self;
990 #[inline(always)]
991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
992 *value
993 }
994 }
995
996 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
997 for LogsIteratorOption
998 {
999 #[inline]
1000 unsafe fn encode(
1001 self,
1002 encoder: &mut fidl::encoding::Encoder<'_, D>,
1003 offset: usize,
1004 _depth: fidl::encoding::Depth,
1005 ) -> fidl::Result<()> {
1006 encoder.debug_check_bounds::<Self>(offset);
1007 encoder.write_num(self.into_primitive(), offset);
1008 Ok(())
1009 }
1010 }
1011
1012 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorOption {
1013 #[inline(always)]
1014 fn new_empty() -> Self {
1015 Self::unknown()
1016 }
1017
1018 #[inline]
1019 unsafe fn decode(
1020 &mut self,
1021 decoder: &mut fidl::encoding::Decoder<'_, D>,
1022 offset: usize,
1023 _depth: fidl::encoding::Depth,
1024 ) -> fidl::Result<()> {
1025 decoder.debug_check_bounds::<Self>(offset);
1026 let prim = decoder.read_num::<u32>(offset);
1027
1028 *self = Self::from_primitive_allow_unknown(prim);
1029 Ok(())
1030 }
1031 }
1032 unsafe impl fidl::encoding::TypeMarker for LogsIteratorType {
1033 type Owned = Self;
1034
1035 #[inline(always)]
1036 fn inline_align(_context: fidl::encoding::Context) -> usize {
1037 std::mem::align_of::<u32>()
1038 }
1039
1040 #[inline(always)]
1041 fn inline_size(_context: fidl::encoding::Context) -> usize {
1042 std::mem::size_of::<u32>()
1043 }
1044
1045 #[inline(always)]
1046 fn encode_is_copy() -> bool {
1047 false
1048 }
1049
1050 #[inline(always)]
1051 fn decode_is_copy() -> bool {
1052 false
1053 }
1054 }
1055
1056 impl fidl::encoding::ValueTypeMarker for LogsIteratorType {
1057 type Borrowed<'a> = Self;
1058 #[inline(always)]
1059 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1060 *value
1061 }
1062 }
1063
1064 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1065 for LogsIteratorType
1066 {
1067 #[inline]
1068 unsafe fn encode(
1069 self,
1070 encoder: &mut fidl::encoding::Encoder<'_, D>,
1071 offset: usize,
1072 _depth: fidl::encoding::Depth,
1073 ) -> fidl::Result<()> {
1074 encoder.debug_check_bounds::<Self>(offset);
1075 encoder.write_num(self.into_primitive(), offset);
1076 Ok(())
1077 }
1078 }
1079
1080 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorType {
1081 #[inline(always)]
1082 fn new_empty() -> Self {
1083 Self::unknown()
1084 }
1085
1086 #[inline]
1087 unsafe fn decode(
1088 &mut self,
1089 decoder: &mut fidl::encoding::Decoder<'_, D>,
1090 offset: usize,
1091 _depth: fidl::encoding::Depth,
1092 ) -> fidl::Result<()> {
1093 decoder.debug_check_bounds::<Self>(offset);
1094 let prim = decoder.read_num::<u32>(offset);
1095
1096 *self = Self::from_primitive_allow_unknown(prim);
1097 Ok(())
1098 }
1099 }
1100 unsafe impl fidl::encoding::TypeMarker for SuiteResult {
1101 type Owned = Self;
1102
1103 #[inline(always)]
1104 fn inline_align(_context: fidl::encoding::Context) -> usize {
1105 std::mem::align_of::<u32>()
1106 }
1107
1108 #[inline(always)]
1109 fn inline_size(_context: fidl::encoding::Context) -> usize {
1110 std::mem::size_of::<u32>()
1111 }
1112
1113 #[inline(always)]
1114 fn encode_is_copy() -> bool {
1115 false
1116 }
1117
1118 #[inline(always)]
1119 fn decode_is_copy() -> bool {
1120 false
1121 }
1122 }
1123
1124 impl fidl::encoding::ValueTypeMarker for SuiteResult {
1125 type Borrowed<'a> = Self;
1126 #[inline(always)]
1127 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1128 *value
1129 }
1130 }
1131
1132 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteResult {
1133 #[inline]
1134 unsafe fn encode(
1135 self,
1136 encoder: &mut fidl::encoding::Encoder<'_, D>,
1137 offset: usize,
1138 _depth: fidl::encoding::Depth,
1139 ) -> fidl::Result<()> {
1140 encoder.debug_check_bounds::<Self>(offset);
1141 encoder.write_num(self.into_primitive(), offset);
1142 Ok(())
1143 }
1144 }
1145
1146 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteResult {
1147 #[inline(always)]
1148 fn new_empty() -> Self {
1149 Self::unknown()
1150 }
1151
1152 #[inline]
1153 unsafe fn decode(
1154 &mut self,
1155 decoder: &mut fidl::encoding::Decoder<'_, D>,
1156 offset: usize,
1157 _depth: fidl::encoding::Depth,
1158 ) -> fidl::Result<()> {
1159 decoder.debug_check_bounds::<Self>(offset);
1160 let prim = decoder.read_num::<u32>(offset);
1161
1162 *self = Self::from_primitive_allow_unknown(prim);
1163 Ok(())
1164 }
1165 }
1166 unsafe impl fidl::encoding::TypeMarker for SuiteStatus {
1167 type Owned = Self;
1168
1169 #[inline(always)]
1170 fn inline_align(_context: fidl::encoding::Context) -> usize {
1171 std::mem::align_of::<u32>()
1172 }
1173
1174 #[inline(always)]
1175 fn inline_size(_context: fidl::encoding::Context) -> usize {
1176 std::mem::size_of::<u32>()
1177 }
1178
1179 #[inline(always)]
1180 fn encode_is_copy() -> bool {
1181 false
1182 }
1183
1184 #[inline(always)]
1185 fn decode_is_copy() -> bool {
1186 false
1187 }
1188 }
1189
1190 impl fidl::encoding::ValueTypeMarker for SuiteStatus {
1191 type Borrowed<'a> = Self;
1192 #[inline(always)]
1193 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1194 *value
1195 }
1196 }
1197
1198 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteStatus {
1199 #[inline]
1200 unsafe fn encode(
1201 self,
1202 encoder: &mut fidl::encoding::Encoder<'_, D>,
1203 offset: usize,
1204 _depth: fidl::encoding::Depth,
1205 ) -> fidl::Result<()> {
1206 encoder.debug_check_bounds::<Self>(offset);
1207 encoder.write_num(self.into_primitive(), offset);
1208 Ok(())
1209 }
1210 }
1211
1212 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStatus {
1213 #[inline(always)]
1214 fn new_empty() -> Self {
1215 Self::unknown()
1216 }
1217
1218 #[inline]
1219 unsafe fn decode(
1220 &mut self,
1221 decoder: &mut fidl::encoding::Decoder<'_, D>,
1222 offset: usize,
1223 _depth: fidl::encoding::Depth,
1224 ) -> fidl::Result<()> {
1225 decoder.debug_check_bounds::<Self>(offset);
1226 let prim = decoder.read_num::<u32>(offset);
1227
1228 *self = Self::from_primitive_allow_unknown(prim);
1229 Ok(())
1230 }
1231 }
1232 unsafe impl fidl::encoding::TypeMarker for TestCaseResult {
1233 type Owned = Self;
1234
1235 #[inline(always)]
1236 fn inline_align(_context: fidl::encoding::Context) -> usize {
1237 std::mem::align_of::<u32>()
1238 }
1239
1240 #[inline(always)]
1241 fn inline_size(_context: fidl::encoding::Context) -> usize {
1242 std::mem::size_of::<u32>()
1243 }
1244
1245 #[inline(always)]
1246 fn encode_is_copy() -> bool {
1247 false
1248 }
1249
1250 #[inline(always)]
1251 fn decode_is_copy() -> bool {
1252 false
1253 }
1254 }
1255
1256 impl fidl::encoding::ValueTypeMarker for TestCaseResult {
1257 type Borrowed<'a> = Self;
1258 #[inline(always)]
1259 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1260 *value
1261 }
1262 }
1263
1264 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TestCaseResult {
1265 #[inline]
1266 unsafe fn encode(
1267 self,
1268 encoder: &mut fidl::encoding::Encoder<'_, D>,
1269 offset: usize,
1270 _depth: fidl::encoding::Depth,
1271 ) -> fidl::Result<()> {
1272 encoder.debug_check_bounds::<Self>(offset);
1273 encoder.write_num(self.into_primitive(), offset);
1274 Ok(())
1275 }
1276 }
1277
1278 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCaseResult {
1279 #[inline(always)]
1280 fn new_empty() -> Self {
1281 Self::unknown()
1282 }
1283
1284 #[inline]
1285 unsafe fn decode(
1286 &mut self,
1287 decoder: &mut fidl::encoding::Decoder<'_, D>,
1288 offset: usize,
1289 _depth: fidl::encoding::Depth,
1290 ) -> fidl::Result<()> {
1291 decoder.debug_check_bounds::<Self>(offset);
1292 let prim = decoder.read_num::<u32>(offset);
1293
1294 *self = Self::from_primitive_allow_unknown(prim);
1295 Ok(())
1296 }
1297 }
1298
1299 impl fidl::encoding::ValueTypeMarker for CaseFinished {
1300 type Borrowed<'a> = &'a Self;
1301 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1302 value
1303 }
1304 }
1305
1306 unsafe impl fidl::encoding::TypeMarker for CaseFinished {
1307 type Owned = Self;
1308
1309 #[inline(always)]
1310 fn inline_align(_context: fidl::encoding::Context) -> usize {
1311 4
1312 }
1313
1314 #[inline(always)]
1315 fn inline_size(_context: fidl::encoding::Context) -> usize {
1316 4
1317 }
1318 #[inline(always)]
1319 fn encode_is_copy() -> bool {
1320 true
1321 }
1322
1323 #[inline(always)]
1324 fn decode_is_copy() -> bool {
1325 true
1326 }
1327 }
1328
1329 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFinished, D>
1330 for &CaseFinished
1331 {
1332 #[inline]
1333 unsafe fn encode(
1334 self,
1335 encoder: &mut fidl::encoding::Encoder<'_, D>,
1336 offset: usize,
1337 _depth: fidl::encoding::Depth,
1338 ) -> fidl::Result<()> {
1339 encoder.debug_check_bounds::<CaseFinished>(offset);
1340 unsafe {
1341 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1343 (buf_ptr as *mut CaseFinished)
1344 .write_unaligned((self as *const CaseFinished).read());
1345 }
1348 Ok(())
1349 }
1350 }
1351 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1352 fidl::encoding::Encode<CaseFinished, D> for (T0,)
1353 {
1354 #[inline]
1355 unsafe fn encode(
1356 self,
1357 encoder: &mut fidl::encoding::Encoder<'_, D>,
1358 offset: usize,
1359 depth: fidl::encoding::Depth,
1360 ) -> fidl::Result<()> {
1361 encoder.debug_check_bounds::<CaseFinished>(offset);
1362 self.0.encode(encoder, offset + 0, depth)?;
1366 Ok(())
1367 }
1368 }
1369
1370 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFinished {
1371 #[inline(always)]
1372 fn new_empty() -> Self {
1373 Self { identifier: fidl::new_empty!(u32, D) }
1374 }
1375
1376 #[inline]
1377 unsafe fn decode(
1378 &mut self,
1379 decoder: &mut fidl::encoding::Decoder<'_, D>,
1380 offset: usize,
1381 _depth: fidl::encoding::Depth,
1382 ) -> fidl::Result<()> {
1383 decoder.debug_check_bounds::<Self>(offset);
1384 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1385 unsafe {
1388 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1389 }
1390 Ok(())
1391 }
1392 }
1393
1394 impl fidl::encoding::ValueTypeMarker for CaseFound {
1395 type Borrowed<'a> = &'a Self;
1396 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1397 value
1398 }
1399 }
1400
1401 unsafe impl fidl::encoding::TypeMarker for CaseFound {
1402 type Owned = Self;
1403
1404 #[inline(always)]
1405 fn inline_align(_context: fidl::encoding::Context) -> usize {
1406 8
1407 }
1408
1409 #[inline(always)]
1410 fn inline_size(_context: fidl::encoding::Context) -> usize {
1411 24
1412 }
1413 }
1414
1415 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFound, D>
1416 for &CaseFound
1417 {
1418 #[inline]
1419 unsafe fn encode(
1420 self,
1421 encoder: &mut fidl::encoding::Encoder<'_, D>,
1422 offset: usize,
1423 _depth: fidl::encoding::Depth,
1424 ) -> fidl::Result<()> {
1425 encoder.debug_check_bounds::<CaseFound>(offset);
1426 fidl::encoding::Encode::<CaseFound, D>::encode(
1428 (
1429 <fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_case_name),
1430 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
1431 ),
1432 encoder, offset, _depth
1433 )
1434 }
1435 }
1436 unsafe impl<
1437 D: fidl::encoding::ResourceDialect,
1438 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2048>, D>,
1439 T1: fidl::encoding::Encode<u32, D>,
1440 > fidl::encoding::Encode<CaseFound, D> for (T0, T1)
1441 {
1442 #[inline]
1443 unsafe fn encode(
1444 self,
1445 encoder: &mut fidl::encoding::Encoder<'_, D>,
1446 offset: usize,
1447 depth: fidl::encoding::Depth,
1448 ) -> fidl::Result<()> {
1449 encoder.debug_check_bounds::<CaseFound>(offset);
1450 unsafe {
1453 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1454 (ptr as *mut u64).write_unaligned(0);
1455 }
1456 self.0.encode(encoder, offset + 0, depth)?;
1458 self.1.encode(encoder, offset + 16, depth)?;
1459 Ok(())
1460 }
1461 }
1462
1463 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFound {
1464 #[inline(always)]
1465 fn new_empty() -> Self {
1466 Self {
1467 test_case_name: fidl::new_empty!(fidl::encoding::BoundedString<2048>, D),
1468 identifier: fidl::new_empty!(u32, D),
1469 }
1470 }
1471
1472 #[inline]
1473 unsafe fn decode(
1474 &mut self,
1475 decoder: &mut fidl::encoding::Decoder<'_, D>,
1476 offset: usize,
1477 _depth: fidl::encoding::Depth,
1478 ) -> fidl::Result<()> {
1479 decoder.debug_check_bounds::<Self>(offset);
1480 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1482 let padval = unsafe { (ptr as *const u64).read_unaligned() };
1483 let mask = 0xffffffff00000000u64;
1484 let maskedval = padval & mask;
1485 if maskedval != 0 {
1486 return Err(fidl::Error::NonZeroPadding {
1487 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1488 });
1489 }
1490 fidl::decode!(
1491 fidl::encoding::BoundedString<2048>,
1492 D,
1493 &mut self.test_case_name,
1494 decoder,
1495 offset + 0,
1496 _depth
1497 )?;
1498 fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 16, _depth)?;
1499 Ok(())
1500 }
1501 }
1502
1503 impl fidl::encoding::ValueTypeMarker for CaseIteratorGetNextResponse {
1504 type Borrowed<'a> = &'a Self;
1505 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1506 value
1507 }
1508 }
1509
1510 unsafe impl fidl::encoding::TypeMarker for CaseIteratorGetNextResponse {
1511 type Owned = Self;
1512
1513 #[inline(always)]
1514 fn inline_align(_context: fidl::encoding::Context) -> usize {
1515 8
1516 }
1517
1518 #[inline(always)]
1519 fn inline_size(_context: fidl::encoding::Context) -> usize {
1520 16
1521 }
1522 }
1523
1524 unsafe impl<D: fidl::encoding::ResourceDialect>
1525 fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for &CaseIteratorGetNextResponse
1526 {
1527 #[inline]
1528 unsafe fn encode(
1529 self,
1530 encoder: &mut fidl::encoding::Encoder<'_, D>,
1531 offset: usize,
1532 _depth: fidl::encoding::Depth,
1533 ) -> fidl::Result<()> {
1534 encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
1535 fidl::encoding::Encode::<CaseIteratorGetNextResponse, D>::encode(
1537 (
1538 <fidl::encoding::UnboundedVector<Case> as fidl::encoding::ValueTypeMarker>::borrow(&self.cases),
1539 ),
1540 encoder, offset, _depth
1541 )
1542 }
1543 }
1544 unsafe impl<
1545 D: fidl::encoding::ResourceDialect,
1546 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Case>, D>,
1547 > fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for (T0,)
1548 {
1549 #[inline]
1550 unsafe fn encode(
1551 self,
1552 encoder: &mut fidl::encoding::Encoder<'_, D>,
1553 offset: usize,
1554 depth: fidl::encoding::Depth,
1555 ) -> fidl::Result<()> {
1556 encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
1557 self.0.encode(encoder, offset + 0, depth)?;
1561 Ok(())
1562 }
1563 }
1564
1565 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1566 for CaseIteratorGetNextResponse
1567 {
1568 #[inline(always)]
1569 fn new_empty() -> Self {
1570 Self { cases: fidl::new_empty!(fidl::encoding::UnboundedVector<Case>, D) }
1571 }
1572
1573 #[inline]
1574 unsafe fn decode(
1575 &mut self,
1576 decoder: &mut fidl::encoding::Decoder<'_, D>,
1577 offset: usize,
1578 _depth: fidl::encoding::Depth,
1579 ) -> fidl::Result<()> {
1580 decoder.debug_check_bounds::<Self>(offset);
1581 fidl::decode!(
1583 fidl::encoding::UnboundedVector<Case>,
1584 D,
1585 &mut self.cases,
1586 decoder,
1587 offset + 0,
1588 _depth
1589 )?;
1590 Ok(())
1591 }
1592 }
1593
1594 impl fidl::encoding::ValueTypeMarker for CaseStarted {
1595 type Borrowed<'a> = &'a Self;
1596 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1597 value
1598 }
1599 }
1600
1601 unsafe impl fidl::encoding::TypeMarker for CaseStarted {
1602 type Owned = Self;
1603
1604 #[inline(always)]
1605 fn inline_align(_context: fidl::encoding::Context) -> usize {
1606 4
1607 }
1608
1609 #[inline(always)]
1610 fn inline_size(_context: fidl::encoding::Context) -> usize {
1611 4
1612 }
1613 #[inline(always)]
1614 fn encode_is_copy() -> bool {
1615 true
1616 }
1617
1618 #[inline(always)]
1619 fn decode_is_copy() -> bool {
1620 true
1621 }
1622 }
1623
1624 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStarted, D>
1625 for &CaseStarted
1626 {
1627 #[inline]
1628 unsafe fn encode(
1629 self,
1630 encoder: &mut fidl::encoding::Encoder<'_, D>,
1631 offset: usize,
1632 _depth: fidl::encoding::Depth,
1633 ) -> fidl::Result<()> {
1634 encoder.debug_check_bounds::<CaseStarted>(offset);
1635 unsafe {
1636 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1638 (buf_ptr as *mut CaseStarted).write_unaligned((self as *const CaseStarted).read());
1639 }
1642 Ok(())
1643 }
1644 }
1645 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1646 fidl::encoding::Encode<CaseStarted, D> for (T0,)
1647 {
1648 #[inline]
1649 unsafe fn encode(
1650 self,
1651 encoder: &mut fidl::encoding::Encoder<'_, D>,
1652 offset: usize,
1653 depth: fidl::encoding::Depth,
1654 ) -> fidl::Result<()> {
1655 encoder.debug_check_bounds::<CaseStarted>(offset);
1656 self.0.encode(encoder, offset + 0, depth)?;
1660 Ok(())
1661 }
1662 }
1663
1664 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStarted {
1665 #[inline(always)]
1666 fn new_empty() -> Self {
1667 Self { identifier: fidl::new_empty!(u32, D) }
1668 }
1669
1670 #[inline]
1671 unsafe fn decode(
1672 &mut self,
1673 decoder: &mut fidl::encoding::Decoder<'_, D>,
1674 offset: usize,
1675 _depth: fidl::encoding::Depth,
1676 ) -> fidl::Result<()> {
1677 decoder.debug_check_bounds::<Self>(offset);
1678 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1679 unsafe {
1682 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1683 }
1684 Ok(())
1685 }
1686 }
1687
1688 impl fidl::encoding::ValueTypeMarker for CaseStopped {
1689 type Borrowed<'a> = &'a Self;
1690 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1691 value
1692 }
1693 }
1694
1695 unsafe impl fidl::encoding::TypeMarker for CaseStopped {
1696 type Owned = Self;
1697
1698 #[inline(always)]
1699 fn inline_align(_context: fidl::encoding::Context) -> usize {
1700 4
1701 }
1702
1703 #[inline(always)]
1704 fn inline_size(_context: fidl::encoding::Context) -> usize {
1705 8
1706 }
1707 }
1708
1709 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStopped, D>
1710 for &CaseStopped
1711 {
1712 #[inline]
1713 unsafe fn encode(
1714 self,
1715 encoder: &mut fidl::encoding::Encoder<'_, D>,
1716 offset: usize,
1717 _depth: fidl::encoding::Depth,
1718 ) -> fidl::Result<()> {
1719 encoder.debug_check_bounds::<CaseStopped>(offset);
1720 fidl::encoding::Encode::<CaseStopped, D>::encode(
1722 (
1723 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
1724 <CaseStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
1725 ),
1726 encoder,
1727 offset,
1728 _depth,
1729 )
1730 }
1731 }
1732 unsafe impl<
1733 D: fidl::encoding::ResourceDialect,
1734 T0: fidl::encoding::Encode<u32, D>,
1735 T1: fidl::encoding::Encode<CaseStatus, D>,
1736 > fidl::encoding::Encode<CaseStopped, D> for (T0, T1)
1737 {
1738 #[inline]
1739 unsafe fn encode(
1740 self,
1741 encoder: &mut fidl::encoding::Encoder<'_, D>,
1742 offset: usize,
1743 depth: fidl::encoding::Depth,
1744 ) -> fidl::Result<()> {
1745 encoder.debug_check_bounds::<CaseStopped>(offset);
1746 self.0.encode(encoder, offset + 0, depth)?;
1750 self.1.encode(encoder, offset + 4, depth)?;
1751 Ok(())
1752 }
1753 }
1754
1755 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStopped {
1756 #[inline(always)]
1757 fn new_empty() -> Self {
1758 Self { identifier: fidl::new_empty!(u32, D), status: fidl::new_empty!(CaseStatus, D) }
1759 }
1760
1761 #[inline]
1762 unsafe fn decode(
1763 &mut self,
1764 decoder: &mut fidl::encoding::Decoder<'_, D>,
1765 offset: usize,
1766 _depth: fidl::encoding::Depth,
1767 ) -> fidl::Result<()> {
1768 decoder.debug_check_bounds::<Self>(offset);
1769 fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 0, _depth)?;
1771 fidl::decode!(CaseStatus, D, &mut self.status, decoder, offset + 4, _depth)?;
1772 Ok(())
1773 }
1774 }
1775
1776 impl fidl::encoding::ValueTypeMarker for RunBuilderWithSchedulingOptionsRequest {
1777 type Borrowed<'a> = &'a Self;
1778 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1779 value
1780 }
1781 }
1782
1783 unsafe impl fidl::encoding::TypeMarker for RunBuilderWithSchedulingOptionsRequest {
1784 type Owned = Self;
1785
1786 #[inline(always)]
1787 fn inline_align(_context: fidl::encoding::Context) -> usize {
1788 8
1789 }
1790
1791 #[inline(always)]
1792 fn inline_size(_context: fidl::encoding::Context) -> usize {
1793 16
1794 }
1795 }
1796
1797 unsafe impl<D: fidl::encoding::ResourceDialect>
1798 fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D>
1799 for &RunBuilderWithSchedulingOptionsRequest
1800 {
1801 #[inline]
1802 unsafe fn encode(
1803 self,
1804 encoder: &mut fidl::encoding::Encoder<'_, D>,
1805 offset: usize,
1806 _depth: fidl::encoding::Depth,
1807 ) -> fidl::Result<()> {
1808 encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
1809 fidl::encoding::Encode::<RunBuilderWithSchedulingOptionsRequest, D>::encode(
1811 (<SchedulingOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
1812 encoder,
1813 offset,
1814 _depth,
1815 )
1816 }
1817 }
1818 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SchedulingOptions, D>>
1819 fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D> for (T0,)
1820 {
1821 #[inline]
1822 unsafe fn encode(
1823 self,
1824 encoder: &mut fidl::encoding::Encoder<'_, D>,
1825 offset: usize,
1826 depth: fidl::encoding::Depth,
1827 ) -> fidl::Result<()> {
1828 encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
1829 self.0.encode(encoder, offset + 0, depth)?;
1833 Ok(())
1834 }
1835 }
1836
1837 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1838 for RunBuilderWithSchedulingOptionsRequest
1839 {
1840 #[inline(always)]
1841 fn new_empty() -> Self {
1842 Self { options: fidl::new_empty!(SchedulingOptions, D) }
1843 }
1844
1845 #[inline]
1846 unsafe fn decode(
1847 &mut self,
1848 decoder: &mut fidl::encoding::Decoder<'_, D>,
1849 offset: usize,
1850 _depth: fidl::encoding::Depth,
1851 ) -> fidl::Result<()> {
1852 decoder.debug_check_bounds::<Self>(offset);
1853 fidl::decode!(SchedulingOptions, D, &mut self.options, decoder, offset + 0, _depth)?;
1855 Ok(())
1856 }
1857 }
1858
1859 impl fidl::encoding::ValueTypeMarker for RunStarted {
1860 type Borrowed<'a> = &'a Self;
1861 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1862 value
1863 }
1864 }
1865
1866 unsafe impl fidl::encoding::TypeMarker for RunStarted {
1867 type Owned = Self;
1868
1869 #[inline(always)]
1870 fn inline_align(_context: fidl::encoding::Context) -> usize {
1871 1
1872 }
1873
1874 #[inline(always)]
1875 fn inline_size(_context: fidl::encoding::Context) -> usize {
1876 1
1877 }
1878 }
1879
1880 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStarted, D>
1881 for &RunStarted
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::<RunStarted>(offset);
1891 encoder.write_num(0u8, offset);
1892 Ok(())
1893 }
1894 }
1895
1896 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStarted {
1897 #[inline(always)]
1898 fn new_empty() -> Self {
1899 Self
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 match decoder.read_num::<u8>(offset) {
1911 0 => Ok(()),
1912 _ => Err(fidl::Error::Invalid),
1913 }
1914 }
1915 }
1916
1917 impl fidl::encoding::ValueTypeMarker for RunStopped {
1918 type Borrowed<'a> = &'a Self;
1919 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1920 value
1921 }
1922 }
1923
1924 unsafe impl fidl::encoding::TypeMarker for RunStopped {
1925 type Owned = Self;
1926
1927 #[inline(always)]
1928 fn inline_align(_context: fidl::encoding::Context) -> usize {
1929 1
1930 }
1931
1932 #[inline(always)]
1933 fn inline_size(_context: fidl::encoding::Context) -> usize {
1934 1
1935 }
1936 }
1937
1938 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStopped, D>
1939 for &RunStopped
1940 {
1941 #[inline]
1942 unsafe fn encode(
1943 self,
1944 encoder: &mut fidl::encoding::Encoder<'_, D>,
1945 offset: usize,
1946 _depth: fidl::encoding::Depth,
1947 ) -> fidl::Result<()> {
1948 encoder.debug_check_bounds::<RunStopped>(offset);
1949 encoder.write_num(0u8, offset);
1950 Ok(())
1951 }
1952 }
1953
1954 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStopped {
1955 #[inline(always)]
1956 fn new_empty() -> Self {
1957 Self
1958 }
1959
1960 #[inline]
1961 unsafe fn decode(
1962 &mut self,
1963 decoder: &mut fidl::encoding::Decoder<'_, D>,
1964 offset: usize,
1965 _depth: fidl::encoding::Depth,
1966 ) -> fidl::Result<()> {
1967 decoder.debug_check_bounds::<Self>(offset);
1968 match decoder.read_num::<u8>(offset) {
1969 0 => Ok(()),
1970 _ => Err(fidl::Error::Invalid),
1971 }
1972 }
1973 }
1974
1975 impl fidl::encoding::ValueTypeMarker for SuiteStarted {
1976 type Borrowed<'a> = &'a Self;
1977 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1978 value
1979 }
1980 }
1981
1982 unsafe impl fidl::encoding::TypeMarker for SuiteStarted {
1983 type Owned = Self;
1984
1985 #[inline(always)]
1986 fn inline_align(_context: fidl::encoding::Context) -> usize {
1987 1
1988 }
1989
1990 #[inline(always)]
1991 fn inline_size(_context: fidl::encoding::Context) -> usize {
1992 1
1993 }
1994 }
1995
1996 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStarted, D>
1997 for &SuiteStarted
1998 {
1999 #[inline]
2000 unsafe fn encode(
2001 self,
2002 encoder: &mut fidl::encoding::Encoder<'_, D>,
2003 offset: usize,
2004 _depth: fidl::encoding::Depth,
2005 ) -> fidl::Result<()> {
2006 encoder.debug_check_bounds::<SuiteStarted>(offset);
2007 encoder.write_num(0u8, offset);
2008 Ok(())
2009 }
2010 }
2011
2012 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStarted {
2013 #[inline(always)]
2014 fn new_empty() -> Self {
2015 Self
2016 }
2017
2018 #[inline]
2019 unsafe fn decode(
2020 &mut self,
2021 decoder: &mut fidl::encoding::Decoder<'_, D>,
2022 offset: usize,
2023 _depth: fidl::encoding::Depth,
2024 ) -> fidl::Result<()> {
2025 decoder.debug_check_bounds::<Self>(offset);
2026 match decoder.read_num::<u8>(offset) {
2027 0 => Ok(()),
2028 _ => Err(fidl::Error::Invalid),
2029 }
2030 }
2031 }
2032
2033 impl fidl::encoding::ValueTypeMarker for SuiteStopped {
2034 type Borrowed<'a> = &'a Self;
2035 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2036 value
2037 }
2038 }
2039
2040 unsafe impl fidl::encoding::TypeMarker for SuiteStopped {
2041 type Owned = Self;
2042
2043 #[inline(always)]
2044 fn inline_align(_context: fidl::encoding::Context) -> usize {
2045 4
2046 }
2047
2048 #[inline(always)]
2049 fn inline_size(_context: fidl::encoding::Context) -> usize {
2050 4
2051 }
2052 }
2053
2054 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStopped, D>
2055 for &SuiteStopped
2056 {
2057 #[inline]
2058 unsafe fn encode(
2059 self,
2060 encoder: &mut fidl::encoding::Encoder<'_, D>,
2061 offset: usize,
2062 _depth: fidl::encoding::Depth,
2063 ) -> fidl::Result<()> {
2064 encoder.debug_check_bounds::<SuiteStopped>(offset);
2065 fidl::encoding::Encode::<SuiteStopped, D>::encode(
2067 (<SuiteStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
2068 encoder,
2069 offset,
2070 _depth,
2071 )
2072 }
2073 }
2074 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SuiteStatus, D>>
2075 fidl::encoding::Encode<SuiteStopped, D> for (T0,)
2076 {
2077 #[inline]
2078 unsafe fn encode(
2079 self,
2080 encoder: &mut fidl::encoding::Encoder<'_, D>,
2081 offset: usize,
2082 depth: fidl::encoding::Depth,
2083 ) -> fidl::Result<()> {
2084 encoder.debug_check_bounds::<SuiteStopped>(offset);
2085 self.0.encode(encoder, offset + 0, depth)?;
2089 Ok(())
2090 }
2091 }
2092
2093 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStopped {
2094 #[inline(always)]
2095 fn new_empty() -> Self {
2096 Self { status: fidl::new_empty!(SuiteStatus, D) }
2097 }
2098
2099 #[inline]
2100 unsafe fn decode(
2101 &mut self,
2102 decoder: &mut fidl::encoding::Decoder<'_, D>,
2103 offset: usize,
2104 _depth: fidl::encoding::Depth,
2105 ) -> fidl::Result<()> {
2106 decoder.debug_check_bounds::<Self>(offset);
2107 fidl::decode!(SuiteStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
2109 Ok(())
2110 }
2111 }
2112
2113 impl fidl::encoding::ValueTypeMarker for TestCaseIteratorGetNextResponse {
2114 type Borrowed<'a> = &'a Self;
2115 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2116 value
2117 }
2118 }
2119
2120 unsafe impl fidl::encoding::TypeMarker for TestCaseIteratorGetNextResponse {
2121 type Owned = Self;
2122
2123 #[inline(always)]
2124 fn inline_align(_context: fidl::encoding::Context) -> usize {
2125 8
2126 }
2127
2128 #[inline(always)]
2129 fn inline_size(_context: fidl::encoding::Context) -> usize {
2130 16
2131 }
2132 }
2133
2134 unsafe impl<D: fidl::encoding::ResourceDialect>
2135 fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D>
2136 for &TestCaseIteratorGetNextResponse
2137 {
2138 #[inline]
2139 unsafe fn encode(
2140 self,
2141 encoder: &mut fidl::encoding::Encoder<'_, D>,
2142 offset: usize,
2143 _depth: fidl::encoding::Depth,
2144 ) -> fidl::Result<()> {
2145 encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2146 fidl::encoding::Encode::<TestCaseIteratorGetNextResponse, D>::encode(
2148 (
2149 <fidl::encoding::Vector<TestCase, 1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_cases),
2150 ),
2151 encoder, offset, _depth
2152 )
2153 }
2154 }
2155 unsafe impl<
2156 D: fidl::encoding::ResourceDialect,
2157 T0: fidl::encoding::Encode<fidl::encoding::Vector<TestCase, 1024>, D>,
2158 > fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D> for (T0,)
2159 {
2160 #[inline]
2161 unsafe fn encode(
2162 self,
2163 encoder: &mut fidl::encoding::Encoder<'_, D>,
2164 offset: usize,
2165 depth: fidl::encoding::Depth,
2166 ) -> fidl::Result<()> {
2167 encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2168 self.0.encode(encoder, offset + 0, depth)?;
2172 Ok(())
2173 }
2174 }
2175
2176 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2177 for TestCaseIteratorGetNextResponse
2178 {
2179 #[inline(always)]
2180 fn new_empty() -> Self {
2181 Self { test_cases: fidl::new_empty!(fidl::encoding::Vector<TestCase, 1024>, D) }
2182 }
2183
2184 #[inline]
2185 unsafe fn decode(
2186 &mut self,
2187 decoder: &mut fidl::encoding::Decoder<'_, D>,
2188 offset: usize,
2189 _depth: fidl::encoding::Depth,
2190 ) -> fidl::Result<()> {
2191 decoder.debug_check_bounds::<Self>(offset);
2192 fidl::decode!(fidl::encoding::Vector<TestCase, 1024>, D, &mut self.test_cases, decoder, offset + 0, _depth)?;
2194 Ok(())
2195 }
2196 }
2197
2198 impl Case {
2199 #[inline(always)]
2200 fn max_ordinal_present(&self) -> u64 {
2201 if let Some(_) = self.name {
2202 return 1;
2203 }
2204 0
2205 }
2206 }
2207
2208 impl fidl::encoding::ValueTypeMarker for Case {
2209 type Borrowed<'a> = &'a Self;
2210 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2211 value
2212 }
2213 }
2214
2215 unsafe impl fidl::encoding::TypeMarker for Case {
2216 type Owned = Self;
2217
2218 #[inline(always)]
2219 fn inline_align(_context: fidl::encoding::Context) -> usize {
2220 8
2221 }
2222
2223 #[inline(always)]
2224 fn inline_size(_context: fidl::encoding::Context) -> usize {
2225 16
2226 }
2227 }
2228
2229 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Case, D> for &Case {
2230 unsafe fn encode(
2231 self,
2232 encoder: &mut fidl::encoding::Encoder<'_, D>,
2233 offset: usize,
2234 mut depth: fidl::encoding::Depth,
2235 ) -> fidl::Result<()> {
2236 encoder.debug_check_bounds::<Case>(offset);
2237 let max_ordinal: u64 = self.max_ordinal_present();
2239 encoder.write_num(max_ordinal, offset);
2240 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2241 if max_ordinal == 0 {
2243 return Ok(());
2244 }
2245 depth.increment()?;
2246 let envelope_size = 8;
2247 let bytes_len = max_ordinal as usize * envelope_size;
2248 #[allow(unused_variables)]
2249 let offset = encoder.out_of_line_offset(bytes_len);
2250 let mut _prev_end_offset: usize = 0;
2251 if 1 > max_ordinal {
2252 return Ok(());
2253 }
2254
2255 let cur_offset: usize = (1 - 1) * envelope_size;
2258
2259 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2261
2262 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
2267 self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
2268 encoder, offset + cur_offset, depth
2269 )?;
2270
2271 _prev_end_offset = cur_offset + envelope_size;
2272
2273 Ok(())
2274 }
2275 }
2276
2277 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Case {
2278 #[inline(always)]
2279 fn new_empty() -> Self {
2280 Self::default()
2281 }
2282
2283 unsafe fn decode(
2284 &mut self,
2285 decoder: &mut fidl::encoding::Decoder<'_, D>,
2286 offset: usize,
2287 mut depth: fidl::encoding::Depth,
2288 ) -> fidl::Result<()> {
2289 decoder.debug_check_bounds::<Self>(offset);
2290 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2291 None => return Err(fidl::Error::NotNullable),
2292 Some(len) => len,
2293 };
2294 if len == 0 {
2296 return Ok(());
2297 };
2298 depth.increment()?;
2299 let envelope_size = 8;
2300 let bytes_len = len * envelope_size;
2301 let offset = decoder.out_of_line_offset(bytes_len)?;
2302 let mut _next_ordinal_to_read = 0;
2304 let mut next_offset = offset;
2305 let end_offset = offset + bytes_len;
2306 _next_ordinal_to_read += 1;
2307 if next_offset >= end_offset {
2308 return Ok(());
2309 }
2310
2311 while _next_ordinal_to_read < 1 {
2313 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2314 _next_ordinal_to_read += 1;
2315 next_offset += envelope_size;
2316 }
2317
2318 let next_out_of_line = decoder.next_out_of_line();
2319 let handles_before = decoder.remaining_handles();
2320 if let Some((inlined, num_bytes, num_handles)) =
2321 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2322 {
2323 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2324 if inlined != (member_inline_size <= 4) {
2325 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2326 }
2327 let inner_offset;
2328 let mut inner_depth = depth.clone();
2329 if inlined {
2330 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2331 inner_offset = next_offset;
2332 } else {
2333 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2334 inner_depth.increment()?;
2335 }
2336 let val_ref = self.name.get_or_insert_with(|| {
2337 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
2338 });
2339 fidl::decode!(
2340 fidl::encoding::BoundedString<2048>,
2341 D,
2342 val_ref,
2343 decoder,
2344 inner_offset,
2345 inner_depth
2346 )?;
2347 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2348 {
2349 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2350 }
2351 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2352 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2353 }
2354 }
2355
2356 next_offset += envelope_size;
2357
2358 while next_offset < end_offset {
2360 _next_ordinal_to_read += 1;
2361 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2362 next_offset += envelope_size;
2363 }
2364
2365 Ok(())
2366 }
2367 }
2368
2369 impl RunOptions {
2370 #[inline(always)]
2371 fn max_ordinal_present(&self) -> u64 {
2372 if let Some(_) = self.no_exception_channel {
2373 return 9;
2374 }
2375 if let Some(_) = self.break_on_failure {
2376 return 8;
2377 }
2378 if let Some(_) = self.log_interest {
2379 return 7;
2380 }
2381 if let Some(_) = self.log_iterator {
2382 return 6;
2383 }
2384 if let Some(_) = self.case_filters_to_run {
2385 return 5;
2386 }
2387 if let Some(_) = self.timeout {
2388 return 4;
2389 }
2390 if let Some(_) = self.arguments {
2391 return 3;
2392 }
2393 if let Some(_) = self.parallel {
2394 return 2;
2395 }
2396 if let Some(_) = self.run_disabled_tests {
2397 return 1;
2398 }
2399 0
2400 }
2401 }
2402
2403 impl fidl::encoding::ValueTypeMarker for RunOptions {
2404 type Borrowed<'a> = &'a Self;
2405 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2406 value
2407 }
2408 }
2409
2410 unsafe impl fidl::encoding::TypeMarker for RunOptions {
2411 type Owned = Self;
2412
2413 #[inline(always)]
2414 fn inline_align(_context: fidl::encoding::Context) -> usize {
2415 8
2416 }
2417
2418 #[inline(always)]
2419 fn inline_size(_context: fidl::encoding::Context) -> usize {
2420 16
2421 }
2422 }
2423
2424 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunOptions, D>
2425 for &RunOptions
2426 {
2427 unsafe fn encode(
2428 self,
2429 encoder: &mut fidl::encoding::Encoder<'_, D>,
2430 offset: usize,
2431 mut depth: fidl::encoding::Depth,
2432 ) -> fidl::Result<()> {
2433 encoder.debug_check_bounds::<RunOptions>(offset);
2434 let max_ordinal: u64 = self.max_ordinal_present();
2436 encoder.write_num(max_ordinal, offset);
2437 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2438 if max_ordinal == 0 {
2440 return Ok(());
2441 }
2442 depth.increment()?;
2443 let envelope_size = 8;
2444 let bytes_len = max_ordinal as usize * envelope_size;
2445 #[allow(unused_variables)]
2446 let offset = encoder.out_of_line_offset(bytes_len);
2447 let mut _prev_end_offset: usize = 0;
2448 if 1 > max_ordinal {
2449 return Ok(());
2450 }
2451
2452 let cur_offset: usize = (1 - 1) * envelope_size;
2455
2456 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2458
2459 fidl::encoding::encode_in_envelope_optional::<bool, D>(
2464 self.run_disabled_tests
2465 .as_ref()
2466 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2467 encoder,
2468 offset + cur_offset,
2469 depth,
2470 )?;
2471
2472 _prev_end_offset = cur_offset + envelope_size;
2473 if 2 > max_ordinal {
2474 return Ok(());
2475 }
2476
2477 let cur_offset: usize = (2 - 1) * envelope_size;
2480
2481 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2483
2484 fidl::encoding::encode_in_envelope_optional::<u16, D>(
2489 self.parallel.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
2490 encoder,
2491 offset + cur_offset,
2492 depth,
2493 )?;
2494
2495 _prev_end_offset = cur_offset + envelope_size;
2496 if 3 > max_ordinal {
2497 return Ok(());
2498 }
2499
2500 let cur_offset: usize = (3 - 1) * envelope_size;
2503
2504 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2506
2507 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2512 self.arguments.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2513 encoder, offset + cur_offset, depth
2514 )?;
2515
2516 _prev_end_offset = cur_offset + envelope_size;
2517 if 4 > max_ordinal {
2518 return Ok(());
2519 }
2520
2521 let cur_offset: usize = (4 - 1) * envelope_size;
2524
2525 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2527
2528 fidl::encoding::encode_in_envelope_optional::<i64, D>(
2533 self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2534 encoder,
2535 offset + cur_offset,
2536 depth,
2537 )?;
2538
2539 _prev_end_offset = cur_offset + envelope_size;
2540 if 5 > max_ordinal {
2541 return Ok(());
2542 }
2543
2544 let cur_offset: usize = (5 - 1) * envelope_size;
2547
2548 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2550
2551 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2556 self.case_filters_to_run.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2557 encoder, offset + cur_offset, depth
2558 )?;
2559
2560 _prev_end_offset = cur_offset + envelope_size;
2561 if 6 > max_ordinal {
2562 return Ok(());
2563 }
2564
2565 let cur_offset: usize = (6 - 1) * envelope_size;
2568
2569 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2571
2572 fidl::encoding::encode_in_envelope_optional::<LogsIteratorOption, D>(
2577 self.log_iterator
2578 .as_ref()
2579 .map(<LogsIteratorOption as fidl::encoding::ValueTypeMarker>::borrow),
2580 encoder,
2581 offset + cur_offset,
2582 depth,
2583 )?;
2584
2585 _prev_end_offset = cur_offset + envelope_size;
2586 if 7 > max_ordinal {
2587 return Ok(());
2588 }
2589
2590 let cur_offset: usize = (7 - 1) * envelope_size;
2593
2594 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2596
2597 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D>(
2602 self.log_interest.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64> as fidl::encoding::ValueTypeMarker>::borrow),
2603 encoder, offset + cur_offset, depth
2604 )?;
2605
2606 _prev_end_offset = cur_offset + envelope_size;
2607 if 8 > max_ordinal {
2608 return Ok(());
2609 }
2610
2611 let cur_offset: usize = (8 - 1) * envelope_size;
2614
2615 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2617
2618 fidl::encoding::encode_in_envelope_optional::<bool, D>(
2623 self.break_on_failure
2624 .as_ref()
2625 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2626 encoder,
2627 offset + cur_offset,
2628 depth,
2629 )?;
2630
2631 _prev_end_offset = cur_offset + envelope_size;
2632 if 9 > max_ordinal {
2633 return Ok(());
2634 }
2635
2636 let cur_offset: usize = (9 - 1) * envelope_size;
2639
2640 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2642
2643 fidl::encoding::encode_in_envelope_optional::<bool, D>(
2648 self.no_exception_channel
2649 .as_ref()
2650 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2651 encoder,
2652 offset + cur_offset,
2653 depth,
2654 )?;
2655
2656 _prev_end_offset = cur_offset + envelope_size;
2657
2658 Ok(())
2659 }
2660 }
2661
2662 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunOptions {
2663 #[inline(always)]
2664 fn new_empty() -> Self {
2665 Self::default()
2666 }
2667
2668 unsafe fn decode(
2669 &mut self,
2670 decoder: &mut fidl::encoding::Decoder<'_, D>,
2671 offset: usize,
2672 mut depth: fidl::encoding::Depth,
2673 ) -> fidl::Result<()> {
2674 decoder.debug_check_bounds::<Self>(offset);
2675 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2676 None => return Err(fidl::Error::NotNullable),
2677 Some(len) => len,
2678 };
2679 if len == 0 {
2681 return Ok(());
2682 };
2683 depth.increment()?;
2684 let envelope_size = 8;
2685 let bytes_len = len * envelope_size;
2686 let offset = decoder.out_of_line_offset(bytes_len)?;
2687 let mut _next_ordinal_to_read = 0;
2689 let mut next_offset = offset;
2690 let end_offset = offset + bytes_len;
2691 _next_ordinal_to_read += 1;
2692 if next_offset >= end_offset {
2693 return Ok(());
2694 }
2695
2696 while _next_ordinal_to_read < 1 {
2698 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2699 _next_ordinal_to_read += 1;
2700 next_offset += envelope_size;
2701 }
2702
2703 let next_out_of_line = decoder.next_out_of_line();
2704 let handles_before = decoder.remaining_handles();
2705 if let Some((inlined, num_bytes, num_handles)) =
2706 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2707 {
2708 let member_inline_size =
2709 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2710 if inlined != (member_inline_size <= 4) {
2711 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2712 }
2713 let inner_offset;
2714 let mut inner_depth = depth.clone();
2715 if inlined {
2716 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2717 inner_offset = next_offset;
2718 } else {
2719 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2720 inner_depth.increment()?;
2721 }
2722 let val_ref =
2723 self.run_disabled_tests.get_or_insert_with(|| fidl::new_empty!(bool, D));
2724 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2725 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2726 {
2727 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2728 }
2729 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2730 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2731 }
2732 }
2733
2734 next_offset += envelope_size;
2735 _next_ordinal_to_read += 1;
2736 if next_offset >= end_offset {
2737 return Ok(());
2738 }
2739
2740 while _next_ordinal_to_read < 2 {
2742 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2743 _next_ordinal_to_read += 1;
2744 next_offset += envelope_size;
2745 }
2746
2747 let next_out_of_line = decoder.next_out_of_line();
2748 let handles_before = decoder.remaining_handles();
2749 if let Some((inlined, num_bytes, num_handles)) =
2750 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2751 {
2752 let member_inline_size =
2753 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2754 if inlined != (member_inline_size <= 4) {
2755 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2756 }
2757 let inner_offset;
2758 let mut inner_depth = depth.clone();
2759 if inlined {
2760 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2761 inner_offset = next_offset;
2762 } else {
2763 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2764 inner_depth.increment()?;
2765 }
2766 let val_ref = self.parallel.get_or_insert_with(|| fidl::new_empty!(u16, D));
2767 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
2768 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2769 {
2770 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2771 }
2772 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2773 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2774 }
2775 }
2776
2777 next_offset += envelope_size;
2778 _next_ordinal_to_read += 1;
2779 if next_offset >= end_offset {
2780 return Ok(());
2781 }
2782
2783 while _next_ordinal_to_read < 3 {
2785 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2786 _next_ordinal_to_read += 1;
2787 next_offset += envelope_size;
2788 }
2789
2790 let next_out_of_line = decoder.next_out_of_line();
2791 let handles_before = decoder.remaining_handles();
2792 if let Some((inlined, num_bytes, num_handles)) =
2793 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2794 {
2795 let member_inline_size = <fidl::encoding::UnboundedVector<
2796 fidl::encoding::UnboundedString,
2797 > as fidl::encoding::TypeMarker>::inline_size(
2798 decoder.context
2799 );
2800 if inlined != (member_inline_size <= 4) {
2801 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2802 }
2803 let inner_offset;
2804 let mut inner_depth = depth.clone();
2805 if inlined {
2806 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2807 inner_offset = next_offset;
2808 } else {
2809 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2810 inner_depth.increment()?;
2811 }
2812 let val_ref = self.arguments.get_or_insert_with(|| {
2813 fidl::new_empty!(
2814 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2815 D
2816 )
2817 });
2818 fidl::decode!(
2819 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2820 D,
2821 val_ref,
2822 decoder,
2823 inner_offset,
2824 inner_depth
2825 )?;
2826 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2827 {
2828 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2829 }
2830 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2831 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2832 }
2833 }
2834
2835 next_offset += envelope_size;
2836 _next_ordinal_to_read += 1;
2837 if next_offset >= end_offset {
2838 return Ok(());
2839 }
2840
2841 while _next_ordinal_to_read < 4 {
2843 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2844 _next_ordinal_to_read += 1;
2845 next_offset += envelope_size;
2846 }
2847
2848 let next_out_of_line = decoder.next_out_of_line();
2849 let handles_before = decoder.remaining_handles();
2850 if let Some((inlined, num_bytes, num_handles)) =
2851 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2852 {
2853 let member_inline_size =
2854 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2855 if inlined != (member_inline_size <= 4) {
2856 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2857 }
2858 let inner_offset;
2859 let mut inner_depth = depth.clone();
2860 if inlined {
2861 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2862 inner_offset = next_offset;
2863 } else {
2864 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2865 inner_depth.increment()?;
2866 }
2867 let val_ref = self.timeout.get_or_insert_with(|| fidl::new_empty!(i64, D));
2868 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2869 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2870 {
2871 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2872 }
2873 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2874 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2875 }
2876 }
2877
2878 next_offset += envelope_size;
2879 _next_ordinal_to_read += 1;
2880 if next_offset >= end_offset {
2881 return Ok(());
2882 }
2883
2884 while _next_ordinal_to_read < 5 {
2886 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2887 _next_ordinal_to_read += 1;
2888 next_offset += envelope_size;
2889 }
2890
2891 let next_out_of_line = decoder.next_out_of_line();
2892 let handles_before = decoder.remaining_handles();
2893 if let Some((inlined, num_bytes, num_handles)) =
2894 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2895 {
2896 let member_inline_size = <fidl::encoding::UnboundedVector<
2897 fidl::encoding::UnboundedString,
2898 > as fidl::encoding::TypeMarker>::inline_size(
2899 decoder.context
2900 );
2901 if inlined != (member_inline_size <= 4) {
2902 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2903 }
2904 let inner_offset;
2905 let mut inner_depth = depth.clone();
2906 if inlined {
2907 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2908 inner_offset = next_offset;
2909 } else {
2910 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2911 inner_depth.increment()?;
2912 }
2913 let val_ref = self.case_filters_to_run.get_or_insert_with(|| {
2914 fidl::new_empty!(
2915 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2916 D
2917 )
2918 });
2919 fidl::decode!(
2920 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2921 D,
2922 val_ref,
2923 decoder,
2924 inner_offset,
2925 inner_depth
2926 )?;
2927 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2928 {
2929 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2930 }
2931 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2932 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2933 }
2934 }
2935
2936 next_offset += envelope_size;
2937 _next_ordinal_to_read += 1;
2938 if next_offset >= end_offset {
2939 return Ok(());
2940 }
2941
2942 while _next_ordinal_to_read < 6 {
2944 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2945 _next_ordinal_to_read += 1;
2946 next_offset += envelope_size;
2947 }
2948
2949 let next_out_of_line = decoder.next_out_of_line();
2950 let handles_before = decoder.remaining_handles();
2951 if let Some((inlined, num_bytes, num_handles)) =
2952 fidl::encoding::decode_envelope_header(decoder, next_offset)?
2953 {
2954 let member_inline_size =
2955 <LogsIteratorOption as fidl::encoding::TypeMarker>::inline_size(
2956 decoder.context,
2957 );
2958 if inlined != (member_inline_size <= 4) {
2959 return Err(fidl::Error::InvalidInlineBitInEnvelope);
2960 }
2961 let inner_offset;
2962 let mut inner_depth = depth.clone();
2963 if inlined {
2964 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2965 inner_offset = next_offset;
2966 } else {
2967 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2968 inner_depth.increment()?;
2969 }
2970 let val_ref = self
2971 .log_iterator
2972 .get_or_insert_with(|| fidl::new_empty!(LogsIteratorOption, D));
2973 fidl::decode!(LogsIteratorOption, D, val_ref, decoder, inner_offset, inner_depth)?;
2974 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2975 {
2976 return Err(fidl::Error::InvalidNumBytesInEnvelope);
2977 }
2978 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2979 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2980 }
2981 }
2982
2983 next_offset += envelope_size;
2984 _next_ordinal_to_read += 1;
2985 if next_offset >= end_offset {
2986 return Ok(());
2987 }
2988
2989 while _next_ordinal_to_read < 7 {
2991 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2992 _next_ordinal_to_read += 1;
2993 next_offset += envelope_size;
2994 }
2995
2996 let next_out_of_line = decoder.next_out_of_line();
2997 let handles_before = decoder.remaining_handles();
2998 if let Some((inlined, num_bytes, num_handles)) =
2999 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3000 {
3001 let member_inline_size = <fidl::encoding::Vector<
3002 fidl_fuchsia_diagnostics::LogInterestSelector,
3003 64,
3004 > as fidl::encoding::TypeMarker>::inline_size(
3005 decoder.context
3006 );
3007 if inlined != (member_inline_size <= 4) {
3008 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3009 }
3010 let inner_offset;
3011 let mut inner_depth = depth.clone();
3012 if inlined {
3013 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3014 inner_offset = next_offset;
3015 } else {
3016 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3017 inner_depth.increment()?;
3018 }
3019 let val_ref =
3020 self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D));
3021 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
3022 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3023 {
3024 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3025 }
3026 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3027 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3028 }
3029 }
3030
3031 next_offset += envelope_size;
3032 _next_ordinal_to_read += 1;
3033 if next_offset >= end_offset {
3034 return Ok(());
3035 }
3036
3037 while _next_ordinal_to_read < 8 {
3039 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3040 _next_ordinal_to_read += 1;
3041 next_offset += envelope_size;
3042 }
3043
3044 let next_out_of_line = decoder.next_out_of_line();
3045 let handles_before = decoder.remaining_handles();
3046 if let Some((inlined, num_bytes, num_handles)) =
3047 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3048 {
3049 let member_inline_size =
3050 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3051 if inlined != (member_inline_size <= 4) {
3052 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3053 }
3054 let inner_offset;
3055 let mut inner_depth = depth.clone();
3056 if inlined {
3057 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3058 inner_offset = next_offset;
3059 } else {
3060 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3061 inner_depth.increment()?;
3062 }
3063 let val_ref =
3064 self.break_on_failure.get_or_insert_with(|| fidl::new_empty!(bool, D));
3065 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3066 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3067 {
3068 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3069 }
3070 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3071 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3072 }
3073 }
3074
3075 next_offset += envelope_size;
3076 _next_ordinal_to_read += 1;
3077 if next_offset >= end_offset {
3078 return Ok(());
3079 }
3080
3081 while _next_ordinal_to_read < 9 {
3083 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3084 _next_ordinal_to_read += 1;
3085 next_offset += envelope_size;
3086 }
3087
3088 let next_out_of_line = decoder.next_out_of_line();
3089 let handles_before = decoder.remaining_handles();
3090 if let Some((inlined, num_bytes, num_handles)) =
3091 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3092 {
3093 let member_inline_size =
3094 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3095 if inlined != (member_inline_size <= 4) {
3096 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3097 }
3098 let inner_offset;
3099 let mut inner_depth = depth.clone();
3100 if inlined {
3101 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3102 inner_offset = next_offset;
3103 } else {
3104 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3105 inner_depth.increment()?;
3106 }
3107 let val_ref =
3108 self.no_exception_channel.get_or_insert_with(|| fidl::new_empty!(bool, D));
3109 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3110 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3111 {
3112 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3113 }
3114 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3115 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3116 }
3117 }
3118
3119 next_offset += envelope_size;
3120
3121 while next_offset < end_offset {
3123 _next_ordinal_to_read += 1;
3124 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3125 next_offset += envelope_size;
3126 }
3127
3128 Ok(())
3129 }
3130 }
3131
3132 impl SchedulingOptions {
3133 #[inline(always)]
3134 fn max_ordinal_present(&self) -> u64 {
3135 if let Some(_) = self.accumulate_debug_data {
3136 return 2;
3137 }
3138 if let Some(_) = self.max_parallel_suites {
3139 return 1;
3140 }
3141 0
3142 }
3143 }
3144
3145 impl fidl::encoding::ValueTypeMarker for SchedulingOptions {
3146 type Borrowed<'a> = &'a Self;
3147 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3148 value
3149 }
3150 }
3151
3152 unsafe impl fidl::encoding::TypeMarker for SchedulingOptions {
3153 type Owned = Self;
3154
3155 #[inline(always)]
3156 fn inline_align(_context: fidl::encoding::Context) -> usize {
3157 8
3158 }
3159
3160 #[inline(always)]
3161 fn inline_size(_context: fidl::encoding::Context) -> usize {
3162 16
3163 }
3164 }
3165
3166 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SchedulingOptions, D>
3167 for &SchedulingOptions
3168 {
3169 unsafe fn encode(
3170 self,
3171 encoder: &mut fidl::encoding::Encoder<'_, D>,
3172 offset: usize,
3173 mut depth: fidl::encoding::Depth,
3174 ) -> fidl::Result<()> {
3175 encoder.debug_check_bounds::<SchedulingOptions>(offset);
3176 let max_ordinal: u64 = self.max_ordinal_present();
3178 encoder.write_num(max_ordinal, offset);
3179 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3180 if max_ordinal == 0 {
3182 return Ok(());
3183 }
3184 depth.increment()?;
3185 let envelope_size = 8;
3186 let bytes_len = max_ordinal as usize * envelope_size;
3187 #[allow(unused_variables)]
3188 let offset = encoder.out_of_line_offset(bytes_len);
3189 let mut _prev_end_offset: usize = 0;
3190 if 1 > max_ordinal {
3191 return Ok(());
3192 }
3193
3194 let cur_offset: usize = (1 - 1) * envelope_size;
3197
3198 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3200
3201 fidl::encoding::encode_in_envelope_optional::<u16, D>(
3206 self.max_parallel_suites
3207 .as_ref()
3208 .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
3209 encoder,
3210 offset + cur_offset,
3211 depth,
3212 )?;
3213
3214 _prev_end_offset = cur_offset + envelope_size;
3215 if 2 > max_ordinal {
3216 return Ok(());
3217 }
3218
3219 let cur_offset: usize = (2 - 1) * envelope_size;
3222
3223 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3225
3226 fidl::encoding::encode_in_envelope_optional::<bool, D>(
3231 self.accumulate_debug_data
3232 .as_ref()
3233 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3234 encoder,
3235 offset + cur_offset,
3236 depth,
3237 )?;
3238
3239 _prev_end_offset = cur_offset + envelope_size;
3240
3241 Ok(())
3242 }
3243 }
3244
3245 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SchedulingOptions {
3246 #[inline(always)]
3247 fn new_empty() -> Self {
3248 Self::default()
3249 }
3250
3251 unsafe fn decode(
3252 &mut self,
3253 decoder: &mut fidl::encoding::Decoder<'_, D>,
3254 offset: usize,
3255 mut depth: fidl::encoding::Depth,
3256 ) -> fidl::Result<()> {
3257 decoder.debug_check_bounds::<Self>(offset);
3258 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3259 None => return Err(fidl::Error::NotNullable),
3260 Some(len) => len,
3261 };
3262 if len == 0 {
3264 return Ok(());
3265 };
3266 depth.increment()?;
3267 let envelope_size = 8;
3268 let bytes_len = len * envelope_size;
3269 let offset = decoder.out_of_line_offset(bytes_len)?;
3270 let mut _next_ordinal_to_read = 0;
3272 let mut next_offset = offset;
3273 let end_offset = offset + bytes_len;
3274 _next_ordinal_to_read += 1;
3275 if next_offset >= end_offset {
3276 return Ok(());
3277 }
3278
3279 while _next_ordinal_to_read < 1 {
3281 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3282 _next_ordinal_to_read += 1;
3283 next_offset += envelope_size;
3284 }
3285
3286 let next_out_of_line = decoder.next_out_of_line();
3287 let handles_before = decoder.remaining_handles();
3288 if let Some((inlined, num_bytes, num_handles)) =
3289 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3290 {
3291 let member_inline_size =
3292 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3293 if inlined != (member_inline_size <= 4) {
3294 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3295 }
3296 let inner_offset;
3297 let mut inner_depth = depth.clone();
3298 if inlined {
3299 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3300 inner_offset = next_offset;
3301 } else {
3302 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3303 inner_depth.increment()?;
3304 }
3305 let val_ref =
3306 self.max_parallel_suites.get_or_insert_with(|| fidl::new_empty!(u16, D));
3307 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
3308 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3309 {
3310 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3311 }
3312 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3313 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3314 }
3315 }
3316
3317 next_offset += envelope_size;
3318 _next_ordinal_to_read += 1;
3319 if next_offset >= end_offset {
3320 return Ok(());
3321 }
3322
3323 while _next_ordinal_to_read < 2 {
3325 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3326 _next_ordinal_to_read += 1;
3327 next_offset += envelope_size;
3328 }
3329
3330 let next_out_of_line = decoder.next_out_of_line();
3331 let handles_before = decoder.remaining_handles();
3332 if let Some((inlined, num_bytes, num_handles)) =
3333 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3334 {
3335 let member_inline_size =
3336 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3337 if inlined != (member_inline_size <= 4) {
3338 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3339 }
3340 let inner_offset;
3341 let mut inner_depth = depth.clone();
3342 if inlined {
3343 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3344 inner_offset = next_offset;
3345 } else {
3346 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3347 inner_depth.increment()?;
3348 }
3349 let val_ref =
3350 self.accumulate_debug_data.get_or_insert_with(|| fidl::new_empty!(bool, D));
3351 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3352 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3353 {
3354 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3355 }
3356 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3357 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3358 }
3359 }
3360
3361 next_offset += envelope_size;
3362
3363 while next_offset < end_offset {
3365 _next_ordinal_to_read += 1;
3366 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3367 next_offset += envelope_size;
3368 }
3369
3370 Ok(())
3371 }
3372 }
3373
3374 impl SuiteStartedEventDetails {
3375 #[inline(always)]
3376 fn max_ordinal_present(&self) -> u64 {
3377 0
3378 }
3379 }
3380
3381 impl fidl::encoding::ValueTypeMarker for SuiteStartedEventDetails {
3382 type Borrowed<'a> = &'a Self;
3383 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3384 value
3385 }
3386 }
3387
3388 unsafe impl fidl::encoding::TypeMarker for SuiteStartedEventDetails {
3389 type Owned = Self;
3390
3391 #[inline(always)]
3392 fn inline_align(_context: fidl::encoding::Context) -> usize {
3393 8
3394 }
3395
3396 #[inline(always)]
3397 fn inline_size(_context: fidl::encoding::Context) -> usize {
3398 16
3399 }
3400 }
3401
3402 unsafe impl<D: fidl::encoding::ResourceDialect>
3403 fidl::encoding::Encode<SuiteStartedEventDetails, D> for &SuiteStartedEventDetails
3404 {
3405 unsafe fn encode(
3406 self,
3407 encoder: &mut fidl::encoding::Encoder<'_, D>,
3408 offset: usize,
3409 mut depth: fidl::encoding::Depth,
3410 ) -> fidl::Result<()> {
3411 encoder.debug_check_bounds::<SuiteStartedEventDetails>(offset);
3412 let max_ordinal: u64 = self.max_ordinal_present();
3414 encoder.write_num(max_ordinal, offset);
3415 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3416 if max_ordinal == 0 {
3418 return Ok(());
3419 }
3420 depth.increment()?;
3421 let envelope_size = 8;
3422 let bytes_len = max_ordinal as usize * envelope_size;
3423 #[allow(unused_variables)]
3424 let offset = encoder.out_of_line_offset(bytes_len);
3425 let mut _prev_end_offset: usize = 0;
3426
3427 Ok(())
3428 }
3429 }
3430
3431 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3432 for SuiteStartedEventDetails
3433 {
3434 #[inline(always)]
3435 fn new_empty() -> Self {
3436 Self::default()
3437 }
3438
3439 unsafe fn decode(
3440 &mut self,
3441 decoder: &mut fidl::encoding::Decoder<'_, D>,
3442 offset: usize,
3443 mut depth: fidl::encoding::Depth,
3444 ) -> fidl::Result<()> {
3445 decoder.debug_check_bounds::<Self>(offset);
3446 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3447 None => return Err(fidl::Error::NotNullable),
3448 Some(len) => len,
3449 };
3450 if len == 0 {
3452 return Ok(());
3453 };
3454 depth.increment()?;
3455 let envelope_size = 8;
3456 let bytes_len = len * envelope_size;
3457 let offset = decoder.out_of_line_offset(bytes_len)?;
3458 let mut _next_ordinal_to_read = 0;
3460 let mut next_offset = offset;
3461 let end_offset = offset + bytes_len;
3462
3463 while next_offset < end_offset {
3465 _next_ordinal_to_read += 1;
3466 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3467 next_offset += envelope_size;
3468 }
3469
3470 Ok(())
3471 }
3472 }
3473
3474 impl SuiteStoppedEventDetails {
3475 #[inline(always)]
3476 fn max_ordinal_present(&self) -> u64 {
3477 if let Some(_) = self.result {
3478 return 1;
3479 }
3480 0
3481 }
3482 }
3483
3484 impl fidl::encoding::ValueTypeMarker for SuiteStoppedEventDetails {
3485 type Borrowed<'a> = &'a Self;
3486 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3487 value
3488 }
3489 }
3490
3491 unsafe impl fidl::encoding::TypeMarker for SuiteStoppedEventDetails {
3492 type Owned = Self;
3493
3494 #[inline(always)]
3495 fn inline_align(_context: fidl::encoding::Context) -> usize {
3496 8
3497 }
3498
3499 #[inline(always)]
3500 fn inline_size(_context: fidl::encoding::Context) -> usize {
3501 16
3502 }
3503 }
3504
3505 unsafe impl<D: fidl::encoding::ResourceDialect>
3506 fidl::encoding::Encode<SuiteStoppedEventDetails, D> for &SuiteStoppedEventDetails
3507 {
3508 unsafe fn encode(
3509 self,
3510 encoder: &mut fidl::encoding::Encoder<'_, D>,
3511 offset: usize,
3512 mut depth: fidl::encoding::Depth,
3513 ) -> fidl::Result<()> {
3514 encoder.debug_check_bounds::<SuiteStoppedEventDetails>(offset);
3515 let max_ordinal: u64 = self.max_ordinal_present();
3517 encoder.write_num(max_ordinal, offset);
3518 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3519 if max_ordinal == 0 {
3521 return Ok(());
3522 }
3523 depth.increment()?;
3524 let envelope_size = 8;
3525 let bytes_len = max_ordinal as usize * envelope_size;
3526 #[allow(unused_variables)]
3527 let offset = encoder.out_of_line_offset(bytes_len);
3528 let mut _prev_end_offset: usize = 0;
3529 if 1 > max_ordinal {
3530 return Ok(());
3531 }
3532
3533 let cur_offset: usize = (1 - 1) * envelope_size;
3536
3537 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3539
3540 fidl::encoding::encode_in_envelope_optional::<SuiteResult, D>(
3545 self.result.as_ref().map(<SuiteResult as fidl::encoding::ValueTypeMarker>::borrow),
3546 encoder,
3547 offset + cur_offset,
3548 depth,
3549 )?;
3550
3551 _prev_end_offset = cur_offset + envelope_size;
3552
3553 Ok(())
3554 }
3555 }
3556
3557 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3558 for SuiteStoppedEventDetails
3559 {
3560 #[inline(always)]
3561 fn new_empty() -> Self {
3562 Self::default()
3563 }
3564
3565 unsafe fn decode(
3566 &mut self,
3567 decoder: &mut fidl::encoding::Decoder<'_, D>,
3568 offset: usize,
3569 mut depth: fidl::encoding::Depth,
3570 ) -> fidl::Result<()> {
3571 decoder.debug_check_bounds::<Self>(offset);
3572 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3573 None => return Err(fidl::Error::NotNullable),
3574 Some(len) => len,
3575 };
3576 if len == 0 {
3578 return Ok(());
3579 };
3580 depth.increment()?;
3581 let envelope_size = 8;
3582 let bytes_len = len * envelope_size;
3583 let offset = decoder.out_of_line_offset(bytes_len)?;
3584 let mut _next_ordinal_to_read = 0;
3586 let mut next_offset = offset;
3587 let end_offset = offset + bytes_len;
3588 _next_ordinal_to_read += 1;
3589 if next_offset >= end_offset {
3590 return Ok(());
3591 }
3592
3593 while _next_ordinal_to_read < 1 {
3595 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3596 _next_ordinal_to_read += 1;
3597 next_offset += envelope_size;
3598 }
3599
3600 let next_out_of_line = decoder.next_out_of_line();
3601 let handles_before = decoder.remaining_handles();
3602 if let Some((inlined, num_bytes, num_handles)) =
3603 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3604 {
3605 let member_inline_size =
3606 <SuiteResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3607 if inlined != (member_inline_size <= 4) {
3608 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3609 }
3610 let inner_offset;
3611 let mut inner_depth = depth.clone();
3612 if inlined {
3613 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3614 inner_offset = next_offset;
3615 } else {
3616 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3617 inner_depth.increment()?;
3618 }
3619 let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(SuiteResult, D));
3620 fidl::decode!(SuiteResult, D, val_ref, decoder, inner_offset, inner_depth)?;
3621 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3622 {
3623 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3624 }
3625 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3626 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3627 }
3628 }
3629
3630 next_offset += envelope_size;
3631
3632 while next_offset < end_offset {
3634 _next_ordinal_to_read += 1;
3635 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3636 next_offset += envelope_size;
3637 }
3638
3639 Ok(())
3640 }
3641 }
3642
3643 impl TestCase {
3644 #[inline(always)]
3645 fn max_ordinal_present(&self) -> u64 {
3646 if let Some(_) = self.name {
3647 return 1;
3648 }
3649 0
3650 }
3651 }
3652
3653 impl fidl::encoding::ValueTypeMarker for TestCase {
3654 type Borrowed<'a> = &'a Self;
3655 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3656 value
3657 }
3658 }
3659
3660 unsafe impl fidl::encoding::TypeMarker for TestCase {
3661 type Owned = Self;
3662
3663 #[inline(always)]
3664 fn inline_align(_context: fidl::encoding::Context) -> usize {
3665 8
3666 }
3667
3668 #[inline(always)]
3669 fn inline_size(_context: fidl::encoding::Context) -> usize {
3670 16
3671 }
3672 }
3673
3674 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestCase, D> for &TestCase {
3675 unsafe fn encode(
3676 self,
3677 encoder: &mut fidl::encoding::Encoder<'_, D>,
3678 offset: usize,
3679 mut depth: fidl::encoding::Depth,
3680 ) -> fidl::Result<()> {
3681 encoder.debug_check_bounds::<TestCase>(offset);
3682 let max_ordinal: u64 = self.max_ordinal_present();
3684 encoder.write_num(max_ordinal, offset);
3685 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3686 if max_ordinal == 0 {
3688 return Ok(());
3689 }
3690 depth.increment()?;
3691 let envelope_size = 8;
3692 let bytes_len = max_ordinal as usize * envelope_size;
3693 #[allow(unused_variables)]
3694 let offset = encoder.out_of_line_offset(bytes_len);
3695 let mut _prev_end_offset: usize = 0;
3696 if 1 > max_ordinal {
3697 return Ok(());
3698 }
3699
3700 let cur_offset: usize = (1 - 1) * envelope_size;
3703
3704 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3706
3707 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
3712 self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
3713 encoder, offset + cur_offset, depth
3714 )?;
3715
3716 _prev_end_offset = cur_offset + envelope_size;
3717
3718 Ok(())
3719 }
3720 }
3721
3722 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCase {
3723 #[inline(always)]
3724 fn new_empty() -> Self {
3725 Self::default()
3726 }
3727
3728 unsafe fn decode(
3729 &mut self,
3730 decoder: &mut fidl::encoding::Decoder<'_, D>,
3731 offset: usize,
3732 mut depth: fidl::encoding::Depth,
3733 ) -> fidl::Result<()> {
3734 decoder.debug_check_bounds::<Self>(offset);
3735 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3736 None => return Err(fidl::Error::NotNullable),
3737 Some(len) => len,
3738 };
3739 if len == 0 {
3741 return Ok(());
3742 };
3743 depth.increment()?;
3744 let envelope_size = 8;
3745 let bytes_len = len * envelope_size;
3746 let offset = decoder.out_of_line_offset(bytes_len)?;
3747 let mut _next_ordinal_to_read = 0;
3749 let mut next_offset = offset;
3750 let end_offset = offset + bytes_len;
3751 _next_ordinal_to_read += 1;
3752 if next_offset >= end_offset {
3753 return Ok(());
3754 }
3755
3756 while _next_ordinal_to_read < 1 {
3758 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3759 _next_ordinal_to_read += 1;
3760 next_offset += envelope_size;
3761 }
3762
3763 let next_out_of_line = decoder.next_out_of_line();
3764 let handles_before = decoder.remaining_handles();
3765 if let Some((inlined, num_bytes, num_handles)) =
3766 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3767 {
3768 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3769 if inlined != (member_inline_size <= 4) {
3770 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3771 }
3772 let inner_offset;
3773 let mut inner_depth = depth.clone();
3774 if inlined {
3775 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3776 inner_offset = next_offset;
3777 } else {
3778 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3779 inner_depth.increment()?;
3780 }
3781 let val_ref = self.name.get_or_insert_with(|| {
3782 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
3783 });
3784 fidl::decode!(
3785 fidl::encoding::BoundedString<2048>,
3786 D,
3787 val_ref,
3788 decoder,
3789 inner_offset,
3790 inner_depth
3791 )?;
3792 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3793 {
3794 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3795 }
3796 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3797 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3798 }
3799 }
3800
3801 next_offset += envelope_size;
3802
3803 while next_offset < end_offset {
3805 _next_ordinal_to_read += 1;
3806 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3807 next_offset += envelope_size;
3808 }
3809
3810 Ok(())
3811 }
3812 }
3813
3814 impl TestCaseFinishedEventDetails {
3815 #[inline(always)]
3816 fn max_ordinal_present(&self) -> u64 {
3817 if let Some(_) = self.test_case_id {
3818 return 1;
3819 }
3820 0
3821 }
3822 }
3823
3824 impl fidl::encoding::ValueTypeMarker for TestCaseFinishedEventDetails {
3825 type Borrowed<'a> = &'a Self;
3826 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3827 value
3828 }
3829 }
3830
3831 unsafe impl fidl::encoding::TypeMarker for TestCaseFinishedEventDetails {
3832 type Owned = Self;
3833
3834 #[inline(always)]
3835 fn inline_align(_context: fidl::encoding::Context) -> usize {
3836 8
3837 }
3838
3839 #[inline(always)]
3840 fn inline_size(_context: fidl::encoding::Context) -> usize {
3841 16
3842 }
3843 }
3844
3845 unsafe impl<D: fidl::encoding::ResourceDialect>
3846 fidl::encoding::Encode<TestCaseFinishedEventDetails, D> for &TestCaseFinishedEventDetails
3847 {
3848 unsafe fn encode(
3849 self,
3850 encoder: &mut fidl::encoding::Encoder<'_, D>,
3851 offset: usize,
3852 mut depth: fidl::encoding::Depth,
3853 ) -> fidl::Result<()> {
3854 encoder.debug_check_bounds::<TestCaseFinishedEventDetails>(offset);
3855 let max_ordinal: u64 = self.max_ordinal_present();
3857 encoder.write_num(max_ordinal, offset);
3858 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3859 if max_ordinal == 0 {
3861 return Ok(());
3862 }
3863 depth.increment()?;
3864 let envelope_size = 8;
3865 let bytes_len = max_ordinal as usize * envelope_size;
3866 #[allow(unused_variables)]
3867 let offset = encoder.out_of_line_offset(bytes_len);
3868 let mut _prev_end_offset: usize = 0;
3869 if 1 > max_ordinal {
3870 return Ok(());
3871 }
3872
3873 let cur_offset: usize = (1 - 1) * envelope_size;
3876
3877 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3879
3880 fidl::encoding::encode_in_envelope_optional::<u32, D>(
3885 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3886 encoder,
3887 offset + cur_offset,
3888 depth,
3889 )?;
3890
3891 _prev_end_offset = cur_offset + envelope_size;
3892
3893 Ok(())
3894 }
3895 }
3896
3897 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3898 for TestCaseFinishedEventDetails
3899 {
3900 #[inline(always)]
3901 fn new_empty() -> Self {
3902 Self::default()
3903 }
3904
3905 unsafe fn decode(
3906 &mut self,
3907 decoder: &mut fidl::encoding::Decoder<'_, D>,
3908 offset: usize,
3909 mut depth: fidl::encoding::Depth,
3910 ) -> fidl::Result<()> {
3911 decoder.debug_check_bounds::<Self>(offset);
3912 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3913 None => return Err(fidl::Error::NotNullable),
3914 Some(len) => len,
3915 };
3916 if len == 0 {
3918 return Ok(());
3919 };
3920 depth.increment()?;
3921 let envelope_size = 8;
3922 let bytes_len = len * envelope_size;
3923 let offset = decoder.out_of_line_offset(bytes_len)?;
3924 let mut _next_ordinal_to_read = 0;
3926 let mut next_offset = offset;
3927 let end_offset = offset + bytes_len;
3928 _next_ordinal_to_read += 1;
3929 if next_offset >= end_offset {
3930 return Ok(());
3931 }
3932
3933 while _next_ordinal_to_read < 1 {
3935 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3936 _next_ordinal_to_read += 1;
3937 next_offset += envelope_size;
3938 }
3939
3940 let next_out_of_line = decoder.next_out_of_line();
3941 let handles_before = decoder.remaining_handles();
3942 if let Some((inlined, num_bytes, num_handles)) =
3943 fidl::encoding::decode_envelope_header(decoder, next_offset)?
3944 {
3945 let member_inline_size =
3946 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3947 if inlined != (member_inline_size <= 4) {
3948 return Err(fidl::Error::InvalidInlineBitInEnvelope);
3949 }
3950 let inner_offset;
3951 let mut inner_depth = depth.clone();
3952 if inlined {
3953 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3954 inner_offset = next_offset;
3955 } else {
3956 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3957 inner_depth.increment()?;
3958 }
3959 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
3960 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
3961 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3962 {
3963 return Err(fidl::Error::InvalidNumBytesInEnvelope);
3964 }
3965 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3966 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3967 }
3968 }
3969
3970 next_offset += envelope_size;
3971
3972 while next_offset < end_offset {
3974 _next_ordinal_to_read += 1;
3975 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3976 next_offset += envelope_size;
3977 }
3978
3979 Ok(())
3980 }
3981 }
3982
3983 impl TestCaseFoundEventDetails {
3984 #[inline(always)]
3985 fn max_ordinal_present(&self) -> u64 {
3986 if let Some(_) = self.test_case_id {
3987 return 2;
3988 }
3989 if let Some(_) = self.test_case_name {
3990 return 1;
3991 }
3992 0
3993 }
3994 }
3995
3996 impl fidl::encoding::ValueTypeMarker for TestCaseFoundEventDetails {
3997 type Borrowed<'a> = &'a Self;
3998 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3999 value
4000 }
4001 }
4002
4003 unsafe impl fidl::encoding::TypeMarker for TestCaseFoundEventDetails {
4004 type Owned = Self;
4005
4006 #[inline(always)]
4007 fn inline_align(_context: fidl::encoding::Context) -> usize {
4008 8
4009 }
4010
4011 #[inline(always)]
4012 fn inline_size(_context: fidl::encoding::Context) -> usize {
4013 16
4014 }
4015 }
4016
4017 unsafe impl<D: fidl::encoding::ResourceDialect>
4018 fidl::encoding::Encode<TestCaseFoundEventDetails, D> for &TestCaseFoundEventDetails
4019 {
4020 unsafe fn encode(
4021 self,
4022 encoder: &mut fidl::encoding::Encoder<'_, D>,
4023 offset: usize,
4024 mut depth: fidl::encoding::Depth,
4025 ) -> fidl::Result<()> {
4026 encoder.debug_check_bounds::<TestCaseFoundEventDetails>(offset);
4027 let max_ordinal: u64 = self.max_ordinal_present();
4029 encoder.write_num(max_ordinal, offset);
4030 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4031 if max_ordinal == 0 {
4033 return Ok(());
4034 }
4035 depth.increment()?;
4036 let envelope_size = 8;
4037 let bytes_len = max_ordinal as usize * envelope_size;
4038 #[allow(unused_variables)]
4039 let offset = encoder.out_of_line_offset(bytes_len);
4040 let mut _prev_end_offset: usize = 0;
4041 if 1 > max_ordinal {
4042 return Ok(());
4043 }
4044
4045 let cur_offset: usize = (1 - 1) * envelope_size;
4048
4049 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4051
4052 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
4057 self.test_case_name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
4058 encoder, offset + cur_offset, depth
4059 )?;
4060
4061 _prev_end_offset = cur_offset + envelope_size;
4062 if 2 > max_ordinal {
4063 return Ok(());
4064 }
4065
4066 let cur_offset: usize = (2 - 1) * envelope_size;
4069
4070 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4072
4073 fidl::encoding::encode_in_envelope_optional::<u32, D>(
4078 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4079 encoder,
4080 offset + cur_offset,
4081 depth,
4082 )?;
4083
4084 _prev_end_offset = cur_offset + envelope_size;
4085
4086 Ok(())
4087 }
4088 }
4089
4090 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4091 for TestCaseFoundEventDetails
4092 {
4093 #[inline(always)]
4094 fn new_empty() -> Self {
4095 Self::default()
4096 }
4097
4098 unsafe fn decode(
4099 &mut self,
4100 decoder: &mut fidl::encoding::Decoder<'_, D>,
4101 offset: usize,
4102 mut depth: fidl::encoding::Depth,
4103 ) -> fidl::Result<()> {
4104 decoder.debug_check_bounds::<Self>(offset);
4105 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4106 None => return Err(fidl::Error::NotNullable),
4107 Some(len) => len,
4108 };
4109 if len == 0 {
4111 return Ok(());
4112 };
4113 depth.increment()?;
4114 let envelope_size = 8;
4115 let bytes_len = len * envelope_size;
4116 let offset = decoder.out_of_line_offset(bytes_len)?;
4117 let mut _next_ordinal_to_read = 0;
4119 let mut next_offset = offset;
4120 let end_offset = offset + bytes_len;
4121 _next_ordinal_to_read += 1;
4122 if next_offset >= end_offset {
4123 return Ok(());
4124 }
4125
4126 while _next_ordinal_to_read < 1 {
4128 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4129 _next_ordinal_to_read += 1;
4130 next_offset += envelope_size;
4131 }
4132
4133 let next_out_of_line = decoder.next_out_of_line();
4134 let handles_before = decoder.remaining_handles();
4135 if let Some((inlined, num_bytes, num_handles)) =
4136 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4137 {
4138 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4139 if inlined != (member_inline_size <= 4) {
4140 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4141 }
4142 let inner_offset;
4143 let mut inner_depth = depth.clone();
4144 if inlined {
4145 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4146 inner_offset = next_offset;
4147 } else {
4148 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4149 inner_depth.increment()?;
4150 }
4151 let val_ref = self.test_case_name.get_or_insert_with(|| {
4152 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
4153 });
4154 fidl::decode!(
4155 fidl::encoding::BoundedString<2048>,
4156 D,
4157 val_ref,
4158 decoder,
4159 inner_offset,
4160 inner_depth
4161 )?;
4162 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4163 {
4164 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4165 }
4166 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4167 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4168 }
4169 }
4170
4171 next_offset += envelope_size;
4172 _next_ordinal_to_read += 1;
4173 if next_offset >= end_offset {
4174 return Ok(());
4175 }
4176
4177 while _next_ordinal_to_read < 2 {
4179 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4180 _next_ordinal_to_read += 1;
4181 next_offset += envelope_size;
4182 }
4183
4184 let next_out_of_line = decoder.next_out_of_line();
4185 let handles_before = decoder.remaining_handles();
4186 if let Some((inlined, num_bytes, num_handles)) =
4187 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4188 {
4189 let member_inline_size =
4190 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4191 if inlined != (member_inline_size <= 4) {
4192 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4193 }
4194 let inner_offset;
4195 let mut inner_depth = depth.clone();
4196 if inlined {
4197 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4198 inner_offset = next_offset;
4199 } else {
4200 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4201 inner_depth.increment()?;
4202 }
4203 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4204 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4205 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4206 {
4207 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4208 }
4209 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4210 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4211 }
4212 }
4213
4214 next_offset += envelope_size;
4215
4216 while next_offset < end_offset {
4218 _next_ordinal_to_read += 1;
4219 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4220 next_offset += envelope_size;
4221 }
4222
4223 Ok(())
4224 }
4225 }
4226
4227 impl TestCaseStartedEventDetails {
4228 #[inline(always)]
4229 fn max_ordinal_present(&self) -> u64 {
4230 if let Some(_) = self.test_case_id {
4231 return 1;
4232 }
4233 0
4234 }
4235 }
4236
4237 impl fidl::encoding::ValueTypeMarker for TestCaseStartedEventDetails {
4238 type Borrowed<'a> = &'a Self;
4239 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4240 value
4241 }
4242 }
4243
4244 unsafe impl fidl::encoding::TypeMarker for TestCaseStartedEventDetails {
4245 type Owned = Self;
4246
4247 #[inline(always)]
4248 fn inline_align(_context: fidl::encoding::Context) -> usize {
4249 8
4250 }
4251
4252 #[inline(always)]
4253 fn inline_size(_context: fidl::encoding::Context) -> usize {
4254 16
4255 }
4256 }
4257
4258 unsafe impl<D: fidl::encoding::ResourceDialect>
4259 fidl::encoding::Encode<TestCaseStartedEventDetails, D> for &TestCaseStartedEventDetails
4260 {
4261 unsafe fn encode(
4262 self,
4263 encoder: &mut fidl::encoding::Encoder<'_, D>,
4264 offset: usize,
4265 mut depth: fidl::encoding::Depth,
4266 ) -> fidl::Result<()> {
4267 encoder.debug_check_bounds::<TestCaseStartedEventDetails>(offset);
4268 let max_ordinal: u64 = self.max_ordinal_present();
4270 encoder.write_num(max_ordinal, offset);
4271 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4272 if max_ordinal == 0 {
4274 return Ok(());
4275 }
4276 depth.increment()?;
4277 let envelope_size = 8;
4278 let bytes_len = max_ordinal as usize * envelope_size;
4279 #[allow(unused_variables)]
4280 let offset = encoder.out_of_line_offset(bytes_len);
4281 let mut _prev_end_offset: usize = 0;
4282 if 1 > max_ordinal {
4283 return Ok(());
4284 }
4285
4286 let cur_offset: usize = (1 - 1) * envelope_size;
4289
4290 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4292
4293 fidl::encoding::encode_in_envelope_optional::<u32, D>(
4298 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4299 encoder,
4300 offset + cur_offset,
4301 depth,
4302 )?;
4303
4304 _prev_end_offset = cur_offset + envelope_size;
4305
4306 Ok(())
4307 }
4308 }
4309
4310 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4311 for TestCaseStartedEventDetails
4312 {
4313 #[inline(always)]
4314 fn new_empty() -> Self {
4315 Self::default()
4316 }
4317
4318 unsafe fn decode(
4319 &mut self,
4320 decoder: &mut fidl::encoding::Decoder<'_, D>,
4321 offset: usize,
4322 mut depth: fidl::encoding::Depth,
4323 ) -> fidl::Result<()> {
4324 decoder.debug_check_bounds::<Self>(offset);
4325 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4326 None => return Err(fidl::Error::NotNullable),
4327 Some(len) => len,
4328 };
4329 if len == 0 {
4331 return Ok(());
4332 };
4333 depth.increment()?;
4334 let envelope_size = 8;
4335 let bytes_len = len * envelope_size;
4336 let offset = decoder.out_of_line_offset(bytes_len)?;
4337 let mut _next_ordinal_to_read = 0;
4339 let mut next_offset = offset;
4340 let end_offset = offset + bytes_len;
4341 _next_ordinal_to_read += 1;
4342 if next_offset >= end_offset {
4343 return Ok(());
4344 }
4345
4346 while _next_ordinal_to_read < 1 {
4348 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4349 _next_ordinal_to_read += 1;
4350 next_offset += envelope_size;
4351 }
4352
4353 let next_out_of_line = decoder.next_out_of_line();
4354 let handles_before = decoder.remaining_handles();
4355 if let Some((inlined, num_bytes, num_handles)) =
4356 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4357 {
4358 let member_inline_size =
4359 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4360 if inlined != (member_inline_size <= 4) {
4361 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4362 }
4363 let inner_offset;
4364 let mut inner_depth = depth.clone();
4365 if inlined {
4366 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4367 inner_offset = next_offset;
4368 } else {
4369 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4370 inner_depth.increment()?;
4371 }
4372 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4373 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4374 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4375 {
4376 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4377 }
4378 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4379 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4380 }
4381 }
4382
4383 next_offset += envelope_size;
4384
4385 while next_offset < end_offset {
4387 _next_ordinal_to_read += 1;
4388 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4389 next_offset += envelope_size;
4390 }
4391
4392 Ok(())
4393 }
4394 }
4395
4396 impl TestCaseStoppedEventDetails {
4397 #[inline(always)]
4398 fn max_ordinal_present(&self) -> u64 {
4399 if let Some(_) = self.result {
4400 return 2;
4401 }
4402 if let Some(_) = self.test_case_id {
4403 return 1;
4404 }
4405 0
4406 }
4407 }
4408
4409 impl fidl::encoding::ValueTypeMarker for TestCaseStoppedEventDetails {
4410 type Borrowed<'a> = &'a Self;
4411 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4412 value
4413 }
4414 }
4415
4416 unsafe impl fidl::encoding::TypeMarker for TestCaseStoppedEventDetails {
4417 type Owned = Self;
4418
4419 #[inline(always)]
4420 fn inline_align(_context: fidl::encoding::Context) -> usize {
4421 8
4422 }
4423
4424 #[inline(always)]
4425 fn inline_size(_context: fidl::encoding::Context) -> usize {
4426 16
4427 }
4428 }
4429
4430 unsafe impl<D: fidl::encoding::ResourceDialect>
4431 fidl::encoding::Encode<TestCaseStoppedEventDetails, D> for &TestCaseStoppedEventDetails
4432 {
4433 unsafe fn encode(
4434 self,
4435 encoder: &mut fidl::encoding::Encoder<'_, D>,
4436 offset: usize,
4437 mut depth: fidl::encoding::Depth,
4438 ) -> fidl::Result<()> {
4439 encoder.debug_check_bounds::<TestCaseStoppedEventDetails>(offset);
4440 let max_ordinal: u64 = self.max_ordinal_present();
4442 encoder.write_num(max_ordinal, offset);
4443 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4444 if max_ordinal == 0 {
4446 return Ok(());
4447 }
4448 depth.increment()?;
4449 let envelope_size = 8;
4450 let bytes_len = max_ordinal as usize * envelope_size;
4451 #[allow(unused_variables)]
4452 let offset = encoder.out_of_line_offset(bytes_len);
4453 let mut _prev_end_offset: usize = 0;
4454 if 1 > max_ordinal {
4455 return Ok(());
4456 }
4457
4458 let cur_offset: usize = (1 - 1) * envelope_size;
4461
4462 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4464
4465 fidl::encoding::encode_in_envelope_optional::<u32, D>(
4470 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4471 encoder,
4472 offset + cur_offset,
4473 depth,
4474 )?;
4475
4476 _prev_end_offset = cur_offset + envelope_size;
4477 if 2 > max_ordinal {
4478 return Ok(());
4479 }
4480
4481 let cur_offset: usize = (2 - 1) * envelope_size;
4484
4485 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4487
4488 fidl::encoding::encode_in_envelope_optional::<TestCaseResult, D>(
4493 self.result
4494 .as_ref()
4495 .map(<TestCaseResult as fidl::encoding::ValueTypeMarker>::borrow),
4496 encoder,
4497 offset + cur_offset,
4498 depth,
4499 )?;
4500
4501 _prev_end_offset = cur_offset + envelope_size;
4502
4503 Ok(())
4504 }
4505 }
4506
4507 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4508 for TestCaseStoppedEventDetails
4509 {
4510 #[inline(always)]
4511 fn new_empty() -> Self {
4512 Self::default()
4513 }
4514
4515 unsafe fn decode(
4516 &mut self,
4517 decoder: &mut fidl::encoding::Decoder<'_, D>,
4518 offset: usize,
4519 mut depth: fidl::encoding::Depth,
4520 ) -> fidl::Result<()> {
4521 decoder.debug_check_bounds::<Self>(offset);
4522 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4523 None => return Err(fidl::Error::NotNullable),
4524 Some(len) => len,
4525 };
4526 if len == 0 {
4528 return Ok(());
4529 };
4530 depth.increment()?;
4531 let envelope_size = 8;
4532 let bytes_len = len * envelope_size;
4533 let offset = decoder.out_of_line_offset(bytes_len)?;
4534 let mut _next_ordinal_to_read = 0;
4536 let mut next_offset = offset;
4537 let end_offset = offset + bytes_len;
4538 _next_ordinal_to_read += 1;
4539 if next_offset >= end_offset {
4540 return Ok(());
4541 }
4542
4543 while _next_ordinal_to_read < 1 {
4545 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4546 _next_ordinal_to_read += 1;
4547 next_offset += envelope_size;
4548 }
4549
4550 let next_out_of_line = decoder.next_out_of_line();
4551 let handles_before = decoder.remaining_handles();
4552 if let Some((inlined, num_bytes, num_handles)) =
4553 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4554 {
4555 let member_inline_size =
4556 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4557 if inlined != (member_inline_size <= 4) {
4558 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4559 }
4560 let inner_offset;
4561 let mut inner_depth = depth.clone();
4562 if inlined {
4563 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4564 inner_offset = next_offset;
4565 } else {
4566 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4567 inner_depth.increment()?;
4568 }
4569 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4570 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4571 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4572 {
4573 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4574 }
4575 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4576 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4577 }
4578 }
4579
4580 next_offset += envelope_size;
4581 _next_ordinal_to_read += 1;
4582 if next_offset >= end_offset {
4583 return Ok(());
4584 }
4585
4586 while _next_ordinal_to_read < 2 {
4588 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4589 _next_ordinal_to_read += 1;
4590 next_offset += envelope_size;
4591 }
4592
4593 let next_out_of_line = decoder.next_out_of_line();
4594 let handles_before = decoder.remaining_handles();
4595 if let Some((inlined, num_bytes, num_handles)) =
4596 fidl::encoding::decode_envelope_header(decoder, next_offset)?
4597 {
4598 let member_inline_size =
4599 <TestCaseResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4600 if inlined != (member_inline_size <= 4) {
4601 return Err(fidl::Error::InvalidInlineBitInEnvelope);
4602 }
4603 let inner_offset;
4604 let mut inner_depth = depth.clone();
4605 if inlined {
4606 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4607 inner_offset = next_offset;
4608 } else {
4609 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4610 inner_depth.increment()?;
4611 }
4612 let val_ref =
4613 self.result.get_or_insert_with(|| fidl::new_empty!(TestCaseResult, D));
4614 fidl::decode!(TestCaseResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4615 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4616 {
4617 return Err(fidl::Error::InvalidNumBytesInEnvelope);
4618 }
4619 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4620 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4621 }
4622 }
4623
4624 next_offset += envelope_size;
4625
4626 while next_offset < end_offset {
4628 _next_ordinal_to_read += 1;
4629 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4630 next_offset += envelope_size;
4631 }
4632
4633 Ok(())
4634 }
4635 }
4636}