fidl_fuchsia_test_manager__common/
fidl_fuchsia_test_manager__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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
11/// Human-readable name for a test case.
12pub type CaseName = String;
13
14/// Test case identifier. Unique in a suite run.
15pub type TestCaseId = u32;
16
17/// Human-readable name for a test case.
18pub type TestCaseName = String;
19
20pub const MAX_ARGUMENTS: u64 = fidl_fuchsia_io__common::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__common::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__common::MAX_NAME_LENGTH as u64;
37
38/// Represent status of a test case run execution.
39#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
40pub enum CaseStatus {
41    /// The test case passed.
42    Passed,
43    /// Test case failed.
44    Failed,
45    /// Test case timed out.
46    TimedOut,
47    /// Test case was skipped.
48    Skipped,
49    /// Suite implementation did not return status.
50    Error,
51    #[doc(hidden)]
52    __SourceBreaking { unknown_ordinal: u32 },
53}
54
55/// Pattern that matches an unknown `CaseStatus` member.
56#[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/// Error for `LaunchSuite` call.
115#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
116pub enum LaunchError {
117    /// There were insufficient resources to perform the operation.
118    ResourceUnavailable,
119    /// Cannot resolve `test_suite_url`.
120    InstanceCannotResolve,
121    /// Invalid argument(s) passed.
122    InvalidArgs,
123    /// Failed to connect to the `fuchsia.test.TestSuite` that the test should
124    /// expose.
125    FailedToConnectToTestSuite,
126    /// Failed to enumerate tests.
127    CaseEnumeration,
128    /// Some internal error occurred. Something wrong with test manager setup.
129    /// Check logs and report bug.
130    InternalError,
131    /// No test cases matched the specified test filters. This error is only
132    /// returned when a test filter is specified. In the case of a test suite
133    /// with no test cases, the suite will pass.
134    NoMatchingCases,
135    /// Test manifest is invalid.
136    InvalidManifest,
137    #[doc(hidden)]
138    __SourceBreaking { unknown_ordinal: u32 },
139}
140
141/// Pattern that matches an unknown `LaunchError` member.
142#[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/// Option which specifies which kind of iterator the client supports
210#[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/// Pattern that matches an unknown `LogsIteratorOption` member.
222#[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/// Enumeration of alternative log iteration mechanisms.
275#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
276pub enum LogsIteratorType {
277    /// Indicates use of `fuchsia.diagnostics.BatchIterator`. This iterator type employs
278    /// VMOs, which yields the best performance locally but cannot be used remotely (e.g.
279    /// from the host). When this type is selected, artifacts of type `log` will have values
280    /// that use the `batch` variant of the `Syslog` union.
281    Batch,
282    /// Indicates the use of a socket as described in `fuchsia.diagnostics.host.ArchiveAccessor`.
283    /// can be used remote (e.g. from the host). When this type is selected. artifacts of type
284    /// `log` will have values that use the `stream` variant of the `Syslog` union.
285    Socket,
286    #[doc(hidden)]
287    __SourceBreaking { unknown_ordinal: u32 },
288}
289
290/// Pattern that matches an unknown `LogsIteratorType` member.
291#[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/// Represents the result of a suite run.
341#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
342pub enum SuiteResult {
343    /// The suite finished normally, with all test case results being either `SKIPPED` or `PASSED`.
344    Finished,
345    /// The suite finished normally, with some test case results being neither `SKIPPED` nor
346    /// `PASSED`.
347    Failed,
348    /// Suite implementation crashed, did not send `Finish` event, or did not report
349    /// test case result for one or more test cases.
350    DidNotFinish,
351    /// The overall suite run timed out .
352    TimedOut,
353    /// The suite run was stopped.
354    Stopped,
355    InternalError,
356    #[doc(hidden)]
357    __SourceBreaking {
358        unknown_ordinal: u32,
359    },
360}
361
362/// Pattern that matches an unknown `SuiteResult` member.
363#[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/// Represents status of a suite run. This ordering is the explicit ordering of
425/// preference, from lowest priority to highest priority.
426/// for example, if all Cases PASSED except one that FAILED, the status for the
427/// whole suite will be FAILED.
428#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
429pub enum SuiteStatus {
430    /// All tests cases passed/skipped.
431    Passed,
432    /// At least one test case in the suite failed.
433    Failed,
434    /// Suite implementation crashed, did not send `Finish` event, or did not report
435    /// test case status for one or more test cases.
436    DidNotFinish,
437    /// At least one test case in the suite timed out.
438    TimedOut,
439    /// The test suite was stopped.
440    Stopped,
441    InternalError,
442    #[doc(hidden)]
443    __SourceBreaking {
444        unknown_ordinal: u32,
445    },
446}
447
448/// Pattern that matches an unknown `SuiteStatus` member.
449#[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/// Represent the result of a test case run.
511#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
512pub enum TestCaseResult {
513    /// Test case was skipped.
514    Skipped,
515    /// The test case passed.
516    Passed,
517    /// Test case failed.
518    Failed,
519    /// Test case timed out.
520    TimedOut,
521    /// Suite implementation did not return a result for the test case.
522    Error,
523    #[doc(hidden)]
524    __SourceBreaking { unknown_ordinal: u32 },
525}
526
527/// Pattern that matches an unknown `TestCaseResult` member.
528#[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    /// Name of this test case.
597    pub test_case_name: String,
598    /// Used to identify this test case in subsequent payloads
599    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/// Description of an enumerated test case.
664#[derive(Clone, Debug, Default, PartialEq)]
665pub struct Case {
666    /// Name of the test case.
667    pub name: Option<String>,
668    #[doc(hidden)]
669    pub __source_breaking: fidl::marker::SourceBreaking,
670}
671
672impl fidl::Persistable for Case {}
673
674/// Optional additional instructions for executing a test suite.
675#[derive(Clone, Debug, Default, PartialEq)]
676pub struct RunOptions {
677    /// If set to true, test cases that have been disabled by the test author
678    /// will nonetheless be executed. Defaults to false.
679    pub run_disabled_tests: Option<bool>,
680    /// Defines maximum number of test cases to run simultaneously.
681    /// If unspecified, the default behavior is chosen by the `Suite`
682    /// implementation.
683    pub parallel: Option<u16>,
684    /// Optional arguments to pass to the test.
685    /// Test runners will decide how to pass these arguments to tests.
686    pub arguments: Option<Vec<String>>,
687    /// Timeout in seconds for the entire suite.
688    pub timeout: Option<i64>,
689    /// glob case filter. This filter will match based on glob pattern
690    /// [https://en.wikipedia.org/wiki/Glob_(programming)].
691    /// Only test cases matching at least one pattern will be run. In
692    /// addition, negative filters may be specified by prepending '-'. When
693    /// negative filters are specified, test cases matching the negative filter
694    /// are excluded.
695    /// The behavior of combinations of these filters is as follows:
696    ///  * When no filters are specified, all test cases are run.
697    ///  * When only positive filters are specified, test cases that match at
698    ///    least one filter are run.
699    ///  * When only negative filters are specified, test cases that match none
700    ///    of the filters are run.
701    ///  * When both positive and negative filters are specified, test cases
702    ///    that match at least one positive filter, but do not match any
703    ///    negative filters, are run.
704    ///
705    /// For example, given that a suite has the test cases `Foo.Test1`,
706    /// `Foo.Test2`, `Bar.Test1`, and `Bar.Test2`:
707    ///  * The filters `["Foo.*"]` will execute `Foo.Test1` and `Foo.Test2`.
708    ///  * The filters `["-Foo.*"]` will execute `Bar.Test1` and `Bar.Test2`.
709    ///  * The filters `["Foo.*", "-*.Test1"]` will execute `Foo.Test2`.
710    pub case_filters_to_run: Option<Vec<String>>,
711    /// Defines what kind of log iterator the client supports. Default value is
712    /// Batch iterator.
713    pub log_iterator: Option<LogsIteratorOption>,
714    /// Configures the minimum severity for the components under test.
715    pub log_interest: Option<Vec<fidl_fuchsia_diagnostics__common::LogInterestSelector>>,
716    /// If true, the test runner should halt (if supported) the test suite when
717    /// a failure is encountered such that a debugger may attach to the process
718    /// in the future. Test runners may safely ignore this if they do not
719    /// support stopping running test suites.
720    pub break_on_failure: Option<bool>,
721    /// If true, indicates the test creates an exception channel. In this case, the test manager
722    /// will refrain from creating its own exception channels to avoid conflicts. Default value
723    /// is false.
724    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/// Optional instructions for how to execute and schedule suites in the test run.
732#[derive(Clone, Debug, Default, PartialEq)]
733pub struct SchedulingOptions {
734    /// The maximum number of hermetic test suites to run in parallel. If unspecified,
735    /// chosen by the server side.
736    pub max_parallel_suites: Option<u16>,
737    /// If set to true, debug data collected for this run will be accumulated
738    /// with debug data collected in previous runs with this flag set true.
739    /// Defaults to false.
740    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/// Details for `suite_started` events.
748#[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/// Details for `suite_stopped` events.
757#[derive(Clone, Debug, Default, PartialEq)]
758pub struct SuiteStoppedEventDetails {
759    /// The suite result. This field will always be provided.
760    pub result: Option<SuiteResult>,
761    #[doc(hidden)]
762    pub __source_breaking: fidl::marker::SourceBreaking,
763}
764
765impl fidl::Persistable for SuiteStoppedEventDetails {}
766
767/// Description of an enumerated test case.
768#[derive(Clone, Debug, Default, PartialEq)]
769pub struct TestCase {
770    /// Name of the test case.
771    pub name: Option<String>,
772    #[doc(hidden)]
773    pub __source_breaking: fidl::marker::SourceBreaking,
774}
775
776impl fidl::Persistable for TestCase {}
777
778/// Details for `test_case_finished` events.
779#[derive(Clone, Debug, Default, PartialEq)]
780pub struct TestCaseFinishedEventDetails {
781    /// The test case to which this event pertains. This event will be preceeded by a
782    /// 'test_case found' event with a matching id. This field will always be provided.
783    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/// Details for `test_case_found` events.
791#[derive(Clone, Debug, Default, PartialEq)]
792pub struct TestCaseFoundEventDetails {
793    /// Name of the test case that was found. This field will always be provided.
794    pub test_case_name: Option<String>,
795    /// Identifies this test case in subsequent events. This field will always be provided
796    /// and is unique for a given `SuiteController`.
797    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/// Details for `test_case_started` events.
805#[derive(Clone, Debug, Default, PartialEq)]
806pub struct TestCaseStartedEventDetails {
807    /// The test case to which this event pertains. This event will be preceeded by a
808    /// 'test_case found' event with a matching id. This field will always be provided.
809    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/// Details for `test_case_stopped` events.
817#[derive(Clone, Debug, Default, PartialEq)]
818pub struct TestCaseStoppedEventDetails {
819    /// The test case to which this event pertains. This event will be preceeded by a
820    /// 'test_case found' event with a matching id. This field will always be provided.
821    pub test_case_id: Option<u32>,
822    /// The test case result. This field will always be provided.
823    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                // Copy the object into the buffer.
1342                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                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1346                // done second because the memcpy will write garbage to these bytes.
1347            }
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            // Zero out padding regions. There's no need to apply masks
1363            // because the unmasked parts will be overwritten by fields.
1364            // Write the fields.
1365            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            // Verify that padding bytes are zero.
1386            // Copy from the buffer into the object.
1387            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            // Delegate to tuple encoding.
1427            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            // Zero out padding regions. There's no need to apply masks
1451            // because the unmasked parts will be overwritten by fields.
1452            unsafe {
1453                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1454                (ptr as *mut u64).write_unaligned(0);
1455            }
1456            // Write the fields.
1457            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            // Verify that padding bytes are zero.
1481            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            // Delegate to tuple encoding.
1536            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            // Zero out padding regions. There's no need to apply masks
1558            // because the unmasked parts will be overwritten by fields.
1559            // Write the fields.
1560            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            // Verify that padding bytes are zero.
1582            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                // Copy the object into the buffer.
1637                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1638                (buf_ptr as *mut CaseStarted).write_unaligned((self as *const CaseStarted).read());
1639                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1640                // done second because the memcpy will write garbage to these bytes.
1641            }
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            // Zero out padding regions. There's no need to apply masks
1657            // because the unmasked parts will be overwritten by fields.
1658            // Write the fields.
1659            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            // Verify that padding bytes are zero.
1680            // Copy from the buffer into the object.
1681            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            // Delegate to tuple encoding.
1721            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            // Zero out padding regions. There's no need to apply masks
1747            // because the unmasked parts will be overwritten by fields.
1748            // Write the fields.
1749            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            // Verify that padding bytes are zero.
1770            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            // Delegate to tuple encoding.
1810            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            // Zero out padding regions. There's no need to apply masks
1830            // because the unmasked parts will be overwritten by fields.
1831            // Write the fields.
1832            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            // Verify that padding bytes are zero.
1854            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            // Delegate to tuple encoding.
2066            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            // Zero out padding regions. There's no need to apply masks
2086            // because the unmasked parts will be overwritten by fields.
2087            // Write the fields.
2088            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            // Verify that padding bytes are zero.
2108            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            // Delegate to tuple encoding.
2147            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            // Zero out padding regions. There's no need to apply masks
2169            // because the unmasked parts will be overwritten by fields.
2170            // Write the fields.
2171            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            // Verify that padding bytes are zero.
2193            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            // Vector header
2238            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            // Calling encoder.out_of_line_offset(0) is not allowed.
2242            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2256            // are envelope_size bytes.
2257            let cur_offset: usize = (1 - 1) * envelope_size;
2258
2259            // Zero reserved fields.
2260            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2261
2262            // Safety:
2263            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2264            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2265            //   envelope_size bytes, there is always sufficient room.
2266            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            // Calling decoder.out_of_line_offset(0) is not allowed.
2295            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            // Decode the envelope for each type.
2303            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            // Decode unknown envelopes for gaps in ordinals.
2312            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            // Decode the remaining unknown envelopes.
2359            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            // Vector header
2435            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            // Calling encoder.out_of_line_offset(0) is not allowed.
2439            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2453            // are envelope_size bytes.
2454            let cur_offset: usize = (1 - 1) * envelope_size;
2455
2456            // Zero reserved fields.
2457            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2458
2459            // Safety:
2460            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2461            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2462            //   envelope_size bytes, there is always sufficient room.
2463            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2478            // are envelope_size bytes.
2479            let cur_offset: usize = (2 - 1) * envelope_size;
2480
2481            // Zero reserved fields.
2482            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2483
2484            // Safety:
2485            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2486            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2487            //   envelope_size bytes, there is always sufficient room.
2488            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2501            // are envelope_size bytes.
2502            let cur_offset: usize = (3 - 1) * envelope_size;
2503
2504            // Zero reserved fields.
2505            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2506
2507            // Safety:
2508            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2509            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2510            //   envelope_size bytes, there is always sufficient room.
2511            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2522            // are envelope_size bytes.
2523            let cur_offset: usize = (4 - 1) * envelope_size;
2524
2525            // Zero reserved fields.
2526            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2527
2528            // Safety:
2529            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2530            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2531            //   envelope_size bytes, there is always sufficient room.
2532            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2545            // are envelope_size bytes.
2546            let cur_offset: usize = (5 - 1) * envelope_size;
2547
2548            // Zero reserved fields.
2549            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2550
2551            // Safety:
2552            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2553            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2554            //   envelope_size bytes, there is always sufficient room.
2555            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2566            // are envelope_size bytes.
2567            let cur_offset: usize = (6 - 1) * envelope_size;
2568
2569            // Zero reserved fields.
2570            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2571
2572            // Safety:
2573            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2574            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2575            //   envelope_size bytes, there is always sufficient room.
2576            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            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2591            // are envelope_size bytes.
2592            let cur_offset: usize = (7 - 1) * envelope_size;
2593
2594            // Zero reserved fields.
2595            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2596
2597            // Safety:
2598            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2599            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2600            //   envelope_size bytes, there is always sufficient room.
2601            fidl::encoding::encode_in_envelope_optional::<
2602                fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>,
2603                D,
2604            >(
2605                self.log_interest.as_ref().map(
2606                    <fidl::encoding::Vector<
2607                        fidl_fuchsia_diagnostics__common::LogInterestSelector,
2608                        64,
2609                    > as fidl::encoding::ValueTypeMarker>::borrow,
2610                ),
2611                encoder,
2612                offset + cur_offset,
2613                depth,
2614            )?;
2615
2616            _prev_end_offset = cur_offset + envelope_size;
2617            if 8 > max_ordinal {
2618                return Ok(());
2619            }
2620
2621            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2622            // are envelope_size bytes.
2623            let cur_offset: usize = (8 - 1) * envelope_size;
2624
2625            // Zero reserved fields.
2626            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2627
2628            // Safety:
2629            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2630            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2631            //   envelope_size bytes, there is always sufficient room.
2632            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2633                self.break_on_failure
2634                    .as_ref()
2635                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2636                encoder,
2637                offset + cur_offset,
2638                depth,
2639            )?;
2640
2641            _prev_end_offset = cur_offset + envelope_size;
2642            if 9 > max_ordinal {
2643                return Ok(());
2644            }
2645
2646            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2647            // are envelope_size bytes.
2648            let cur_offset: usize = (9 - 1) * envelope_size;
2649
2650            // Zero reserved fields.
2651            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2652
2653            // Safety:
2654            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2655            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2656            //   envelope_size bytes, there is always sufficient room.
2657            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2658                self.no_exception_channel
2659                    .as_ref()
2660                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2661                encoder,
2662                offset + cur_offset,
2663                depth,
2664            )?;
2665
2666            _prev_end_offset = cur_offset + envelope_size;
2667
2668            Ok(())
2669        }
2670    }
2671
2672    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunOptions {
2673        #[inline(always)]
2674        fn new_empty() -> Self {
2675            Self::default()
2676        }
2677
2678        unsafe fn decode(
2679            &mut self,
2680            decoder: &mut fidl::encoding::Decoder<'_, D>,
2681            offset: usize,
2682            mut depth: fidl::encoding::Depth,
2683        ) -> fidl::Result<()> {
2684            decoder.debug_check_bounds::<Self>(offset);
2685            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2686                None => return Err(fidl::Error::NotNullable),
2687                Some(len) => len,
2688            };
2689            // Calling decoder.out_of_line_offset(0) is not allowed.
2690            if len == 0 {
2691                return Ok(());
2692            };
2693            depth.increment()?;
2694            let envelope_size = 8;
2695            let bytes_len = len * envelope_size;
2696            let offset = decoder.out_of_line_offset(bytes_len)?;
2697            // Decode the envelope for each type.
2698            let mut _next_ordinal_to_read = 0;
2699            let mut next_offset = offset;
2700            let end_offset = offset + bytes_len;
2701            _next_ordinal_to_read += 1;
2702            if next_offset >= end_offset {
2703                return Ok(());
2704            }
2705
2706            // Decode unknown envelopes for gaps in ordinals.
2707            while _next_ordinal_to_read < 1 {
2708                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2709                _next_ordinal_to_read += 1;
2710                next_offset += envelope_size;
2711            }
2712
2713            let next_out_of_line = decoder.next_out_of_line();
2714            let handles_before = decoder.remaining_handles();
2715            if let Some((inlined, num_bytes, num_handles)) =
2716                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2717            {
2718                let member_inline_size =
2719                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2720                if inlined != (member_inline_size <= 4) {
2721                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2722                }
2723                let inner_offset;
2724                let mut inner_depth = depth.clone();
2725                if inlined {
2726                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2727                    inner_offset = next_offset;
2728                } else {
2729                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2730                    inner_depth.increment()?;
2731                }
2732                let val_ref =
2733                    self.run_disabled_tests.get_or_insert_with(|| fidl::new_empty!(bool, D));
2734                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2735                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2736                {
2737                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2738                }
2739                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2740                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2741                }
2742            }
2743
2744            next_offset += envelope_size;
2745            _next_ordinal_to_read += 1;
2746            if next_offset >= end_offset {
2747                return Ok(());
2748            }
2749
2750            // Decode unknown envelopes for gaps in ordinals.
2751            while _next_ordinal_to_read < 2 {
2752                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2753                _next_ordinal_to_read += 1;
2754                next_offset += envelope_size;
2755            }
2756
2757            let next_out_of_line = decoder.next_out_of_line();
2758            let handles_before = decoder.remaining_handles();
2759            if let Some((inlined, num_bytes, num_handles)) =
2760                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2761            {
2762                let member_inline_size =
2763                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2764                if inlined != (member_inline_size <= 4) {
2765                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2766                }
2767                let inner_offset;
2768                let mut inner_depth = depth.clone();
2769                if inlined {
2770                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2771                    inner_offset = next_offset;
2772                } else {
2773                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2774                    inner_depth.increment()?;
2775                }
2776                let val_ref = self.parallel.get_or_insert_with(|| fidl::new_empty!(u16, D));
2777                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
2778                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2779                {
2780                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2781                }
2782                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2783                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2784                }
2785            }
2786
2787            next_offset += envelope_size;
2788            _next_ordinal_to_read += 1;
2789            if next_offset >= end_offset {
2790                return Ok(());
2791            }
2792
2793            // Decode unknown envelopes for gaps in ordinals.
2794            while _next_ordinal_to_read < 3 {
2795                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2796                _next_ordinal_to_read += 1;
2797                next_offset += envelope_size;
2798            }
2799
2800            let next_out_of_line = decoder.next_out_of_line();
2801            let handles_before = decoder.remaining_handles();
2802            if let Some((inlined, num_bytes, num_handles)) =
2803                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2804            {
2805                let member_inline_size = <fidl::encoding::UnboundedVector<
2806                    fidl::encoding::UnboundedString,
2807                > as fidl::encoding::TypeMarker>::inline_size(
2808                    decoder.context
2809                );
2810                if inlined != (member_inline_size <= 4) {
2811                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2812                }
2813                let inner_offset;
2814                let mut inner_depth = depth.clone();
2815                if inlined {
2816                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2817                    inner_offset = next_offset;
2818                } else {
2819                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2820                    inner_depth.increment()?;
2821                }
2822                let val_ref = self.arguments.get_or_insert_with(|| {
2823                    fidl::new_empty!(
2824                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2825                        D
2826                    )
2827                });
2828                fidl::decode!(
2829                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2830                    D,
2831                    val_ref,
2832                    decoder,
2833                    inner_offset,
2834                    inner_depth
2835                )?;
2836                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2837                {
2838                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2839                }
2840                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2841                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2842                }
2843            }
2844
2845            next_offset += envelope_size;
2846            _next_ordinal_to_read += 1;
2847            if next_offset >= end_offset {
2848                return Ok(());
2849            }
2850
2851            // Decode unknown envelopes for gaps in ordinals.
2852            while _next_ordinal_to_read < 4 {
2853                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2854                _next_ordinal_to_read += 1;
2855                next_offset += envelope_size;
2856            }
2857
2858            let next_out_of_line = decoder.next_out_of_line();
2859            let handles_before = decoder.remaining_handles();
2860            if let Some((inlined, num_bytes, num_handles)) =
2861                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2862            {
2863                let member_inline_size =
2864                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2865                if inlined != (member_inline_size <= 4) {
2866                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2867                }
2868                let inner_offset;
2869                let mut inner_depth = depth.clone();
2870                if inlined {
2871                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2872                    inner_offset = next_offset;
2873                } else {
2874                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2875                    inner_depth.increment()?;
2876                }
2877                let val_ref = self.timeout.get_or_insert_with(|| fidl::new_empty!(i64, D));
2878                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2879                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2880                {
2881                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2882                }
2883                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2884                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2885                }
2886            }
2887
2888            next_offset += envelope_size;
2889            _next_ordinal_to_read += 1;
2890            if next_offset >= end_offset {
2891                return Ok(());
2892            }
2893
2894            // Decode unknown envelopes for gaps in ordinals.
2895            while _next_ordinal_to_read < 5 {
2896                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2897                _next_ordinal_to_read += 1;
2898                next_offset += envelope_size;
2899            }
2900
2901            let next_out_of_line = decoder.next_out_of_line();
2902            let handles_before = decoder.remaining_handles();
2903            if let Some((inlined, num_bytes, num_handles)) =
2904                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2905            {
2906                let member_inline_size = <fidl::encoding::UnboundedVector<
2907                    fidl::encoding::UnboundedString,
2908                > as fidl::encoding::TypeMarker>::inline_size(
2909                    decoder.context
2910                );
2911                if inlined != (member_inline_size <= 4) {
2912                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2913                }
2914                let inner_offset;
2915                let mut inner_depth = depth.clone();
2916                if inlined {
2917                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2918                    inner_offset = next_offset;
2919                } else {
2920                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2921                    inner_depth.increment()?;
2922                }
2923                let val_ref = self.case_filters_to_run.get_or_insert_with(|| {
2924                    fidl::new_empty!(
2925                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2926                        D
2927                    )
2928                });
2929                fidl::decode!(
2930                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2931                    D,
2932                    val_ref,
2933                    decoder,
2934                    inner_offset,
2935                    inner_depth
2936                )?;
2937                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2938                {
2939                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2940                }
2941                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2942                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2943                }
2944            }
2945
2946            next_offset += envelope_size;
2947            _next_ordinal_to_read += 1;
2948            if next_offset >= end_offset {
2949                return Ok(());
2950            }
2951
2952            // Decode unknown envelopes for gaps in ordinals.
2953            while _next_ordinal_to_read < 6 {
2954                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2955                _next_ordinal_to_read += 1;
2956                next_offset += envelope_size;
2957            }
2958
2959            let next_out_of_line = decoder.next_out_of_line();
2960            let handles_before = decoder.remaining_handles();
2961            if let Some((inlined, num_bytes, num_handles)) =
2962                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2963            {
2964                let member_inline_size =
2965                    <LogsIteratorOption as fidl::encoding::TypeMarker>::inline_size(
2966                        decoder.context,
2967                    );
2968                if inlined != (member_inline_size <= 4) {
2969                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2970                }
2971                let inner_offset;
2972                let mut inner_depth = depth.clone();
2973                if inlined {
2974                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2975                    inner_offset = next_offset;
2976                } else {
2977                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2978                    inner_depth.increment()?;
2979                }
2980                let val_ref = self
2981                    .log_iterator
2982                    .get_or_insert_with(|| fidl::new_empty!(LogsIteratorOption, D));
2983                fidl::decode!(LogsIteratorOption, D, val_ref, decoder, inner_offset, inner_depth)?;
2984                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2985                {
2986                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2987                }
2988                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2989                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2990                }
2991            }
2992
2993            next_offset += envelope_size;
2994            _next_ordinal_to_read += 1;
2995            if next_offset >= end_offset {
2996                return Ok(());
2997            }
2998
2999            // Decode unknown envelopes for gaps in ordinals.
3000            while _next_ordinal_to_read < 7 {
3001                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3002                _next_ordinal_to_read += 1;
3003                next_offset += envelope_size;
3004            }
3005
3006            let next_out_of_line = decoder.next_out_of_line();
3007            let handles_before = decoder.remaining_handles();
3008            if let Some((inlined, num_bytes, num_handles)) =
3009                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3010            {
3011                let member_inline_size = <fidl::encoding::Vector<
3012                    fidl_fuchsia_diagnostics__common::LogInterestSelector,
3013                    64,
3014                > as fidl::encoding::TypeMarker>::inline_size(
3015                    decoder.context
3016                );
3017                if inlined != (member_inline_size <= 4) {
3018                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3019                }
3020                let inner_offset;
3021                let mut inner_depth = depth.clone();
3022                if inlined {
3023                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3024                    inner_offset = next_offset;
3025                } else {
3026                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3027                    inner_depth.increment()?;
3028                }
3029                let val_ref =
3030                self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D));
3031                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
3032                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3033                {
3034                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3035                }
3036                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3037                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3038                }
3039            }
3040
3041            next_offset += envelope_size;
3042            _next_ordinal_to_read += 1;
3043            if next_offset >= end_offset {
3044                return Ok(());
3045            }
3046
3047            // Decode unknown envelopes for gaps in ordinals.
3048            while _next_ordinal_to_read < 8 {
3049                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3050                _next_ordinal_to_read += 1;
3051                next_offset += envelope_size;
3052            }
3053
3054            let next_out_of_line = decoder.next_out_of_line();
3055            let handles_before = decoder.remaining_handles();
3056            if let Some((inlined, num_bytes, num_handles)) =
3057                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3058            {
3059                let member_inline_size =
3060                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3061                if inlined != (member_inline_size <= 4) {
3062                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3063                }
3064                let inner_offset;
3065                let mut inner_depth = depth.clone();
3066                if inlined {
3067                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3068                    inner_offset = next_offset;
3069                } else {
3070                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3071                    inner_depth.increment()?;
3072                }
3073                let val_ref =
3074                    self.break_on_failure.get_or_insert_with(|| fidl::new_empty!(bool, D));
3075                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3076                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3077                {
3078                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3079                }
3080                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3081                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3082                }
3083            }
3084
3085            next_offset += envelope_size;
3086            _next_ordinal_to_read += 1;
3087            if next_offset >= end_offset {
3088                return Ok(());
3089            }
3090
3091            // Decode unknown envelopes for gaps in ordinals.
3092            while _next_ordinal_to_read < 9 {
3093                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3094                _next_ordinal_to_read += 1;
3095                next_offset += envelope_size;
3096            }
3097
3098            let next_out_of_line = decoder.next_out_of_line();
3099            let handles_before = decoder.remaining_handles();
3100            if let Some((inlined, num_bytes, num_handles)) =
3101                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3102            {
3103                let member_inline_size =
3104                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3105                if inlined != (member_inline_size <= 4) {
3106                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3107                }
3108                let inner_offset;
3109                let mut inner_depth = depth.clone();
3110                if inlined {
3111                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3112                    inner_offset = next_offset;
3113                } else {
3114                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3115                    inner_depth.increment()?;
3116                }
3117                let val_ref =
3118                    self.no_exception_channel.get_or_insert_with(|| fidl::new_empty!(bool, D));
3119                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3120                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3121                {
3122                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3123                }
3124                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3125                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3126                }
3127            }
3128
3129            next_offset += envelope_size;
3130
3131            // Decode the remaining unknown envelopes.
3132            while next_offset < end_offset {
3133                _next_ordinal_to_read += 1;
3134                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3135                next_offset += envelope_size;
3136            }
3137
3138            Ok(())
3139        }
3140    }
3141
3142    impl SchedulingOptions {
3143        #[inline(always)]
3144        fn max_ordinal_present(&self) -> u64 {
3145            if let Some(_) = self.accumulate_debug_data {
3146                return 2;
3147            }
3148            if let Some(_) = self.max_parallel_suites {
3149                return 1;
3150            }
3151            0
3152        }
3153    }
3154
3155    impl fidl::encoding::ValueTypeMarker for SchedulingOptions {
3156        type Borrowed<'a> = &'a Self;
3157        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3158            value
3159        }
3160    }
3161
3162    unsafe impl fidl::encoding::TypeMarker for SchedulingOptions {
3163        type Owned = Self;
3164
3165        #[inline(always)]
3166        fn inline_align(_context: fidl::encoding::Context) -> usize {
3167            8
3168        }
3169
3170        #[inline(always)]
3171        fn inline_size(_context: fidl::encoding::Context) -> usize {
3172            16
3173        }
3174    }
3175
3176    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SchedulingOptions, D>
3177        for &SchedulingOptions
3178    {
3179        unsafe fn encode(
3180            self,
3181            encoder: &mut fidl::encoding::Encoder<'_, D>,
3182            offset: usize,
3183            mut depth: fidl::encoding::Depth,
3184        ) -> fidl::Result<()> {
3185            encoder.debug_check_bounds::<SchedulingOptions>(offset);
3186            // Vector header
3187            let max_ordinal: u64 = self.max_ordinal_present();
3188            encoder.write_num(max_ordinal, offset);
3189            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3190            // Calling encoder.out_of_line_offset(0) is not allowed.
3191            if max_ordinal == 0 {
3192                return Ok(());
3193            }
3194            depth.increment()?;
3195            let envelope_size = 8;
3196            let bytes_len = max_ordinal as usize * envelope_size;
3197            #[allow(unused_variables)]
3198            let offset = encoder.out_of_line_offset(bytes_len);
3199            let mut _prev_end_offset: usize = 0;
3200            if 1 > max_ordinal {
3201                return Ok(());
3202            }
3203
3204            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3205            // are envelope_size bytes.
3206            let cur_offset: usize = (1 - 1) * envelope_size;
3207
3208            // Zero reserved fields.
3209            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3210
3211            // Safety:
3212            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3213            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3214            //   envelope_size bytes, there is always sufficient room.
3215            fidl::encoding::encode_in_envelope_optional::<u16, D>(
3216                self.max_parallel_suites
3217                    .as_ref()
3218                    .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
3219                encoder,
3220                offset + cur_offset,
3221                depth,
3222            )?;
3223
3224            _prev_end_offset = cur_offset + envelope_size;
3225            if 2 > max_ordinal {
3226                return Ok(());
3227            }
3228
3229            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3230            // are envelope_size bytes.
3231            let cur_offset: usize = (2 - 1) * envelope_size;
3232
3233            // Zero reserved fields.
3234            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3235
3236            // Safety:
3237            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3238            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3239            //   envelope_size bytes, there is always sufficient room.
3240            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3241                self.accumulate_debug_data
3242                    .as_ref()
3243                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3244                encoder,
3245                offset + cur_offset,
3246                depth,
3247            )?;
3248
3249            _prev_end_offset = cur_offset + envelope_size;
3250
3251            Ok(())
3252        }
3253    }
3254
3255    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SchedulingOptions {
3256        #[inline(always)]
3257        fn new_empty() -> Self {
3258            Self::default()
3259        }
3260
3261        unsafe fn decode(
3262            &mut self,
3263            decoder: &mut fidl::encoding::Decoder<'_, D>,
3264            offset: usize,
3265            mut depth: fidl::encoding::Depth,
3266        ) -> fidl::Result<()> {
3267            decoder.debug_check_bounds::<Self>(offset);
3268            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3269                None => return Err(fidl::Error::NotNullable),
3270                Some(len) => len,
3271            };
3272            // Calling decoder.out_of_line_offset(0) is not allowed.
3273            if len == 0 {
3274                return Ok(());
3275            };
3276            depth.increment()?;
3277            let envelope_size = 8;
3278            let bytes_len = len * envelope_size;
3279            let offset = decoder.out_of_line_offset(bytes_len)?;
3280            // Decode the envelope for each type.
3281            let mut _next_ordinal_to_read = 0;
3282            let mut next_offset = offset;
3283            let end_offset = offset + bytes_len;
3284            _next_ordinal_to_read += 1;
3285            if next_offset >= end_offset {
3286                return Ok(());
3287            }
3288
3289            // Decode unknown envelopes for gaps in ordinals.
3290            while _next_ordinal_to_read < 1 {
3291                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3292                _next_ordinal_to_read += 1;
3293                next_offset += envelope_size;
3294            }
3295
3296            let next_out_of_line = decoder.next_out_of_line();
3297            let handles_before = decoder.remaining_handles();
3298            if let Some((inlined, num_bytes, num_handles)) =
3299                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3300            {
3301                let member_inline_size =
3302                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3303                if inlined != (member_inline_size <= 4) {
3304                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3305                }
3306                let inner_offset;
3307                let mut inner_depth = depth.clone();
3308                if inlined {
3309                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3310                    inner_offset = next_offset;
3311                } else {
3312                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3313                    inner_depth.increment()?;
3314                }
3315                let val_ref =
3316                    self.max_parallel_suites.get_or_insert_with(|| fidl::new_empty!(u16, D));
3317                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
3318                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3319                {
3320                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3321                }
3322                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3323                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3324                }
3325            }
3326
3327            next_offset += envelope_size;
3328            _next_ordinal_to_read += 1;
3329            if next_offset >= end_offset {
3330                return Ok(());
3331            }
3332
3333            // Decode unknown envelopes for gaps in ordinals.
3334            while _next_ordinal_to_read < 2 {
3335                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3336                _next_ordinal_to_read += 1;
3337                next_offset += envelope_size;
3338            }
3339
3340            let next_out_of_line = decoder.next_out_of_line();
3341            let handles_before = decoder.remaining_handles();
3342            if let Some((inlined, num_bytes, num_handles)) =
3343                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3344            {
3345                let member_inline_size =
3346                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3347                if inlined != (member_inline_size <= 4) {
3348                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3349                }
3350                let inner_offset;
3351                let mut inner_depth = depth.clone();
3352                if inlined {
3353                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3354                    inner_offset = next_offset;
3355                } else {
3356                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3357                    inner_depth.increment()?;
3358                }
3359                let val_ref =
3360                    self.accumulate_debug_data.get_or_insert_with(|| fidl::new_empty!(bool, D));
3361                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3362                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3363                {
3364                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3365                }
3366                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3367                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3368                }
3369            }
3370
3371            next_offset += envelope_size;
3372
3373            // Decode the remaining unknown envelopes.
3374            while next_offset < end_offset {
3375                _next_ordinal_to_read += 1;
3376                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3377                next_offset += envelope_size;
3378            }
3379
3380            Ok(())
3381        }
3382    }
3383
3384    impl SuiteStartedEventDetails {
3385        #[inline(always)]
3386        fn max_ordinal_present(&self) -> u64 {
3387            0
3388        }
3389    }
3390
3391    impl fidl::encoding::ValueTypeMarker for SuiteStartedEventDetails {
3392        type Borrowed<'a> = &'a Self;
3393        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3394            value
3395        }
3396    }
3397
3398    unsafe impl fidl::encoding::TypeMarker for SuiteStartedEventDetails {
3399        type Owned = Self;
3400
3401        #[inline(always)]
3402        fn inline_align(_context: fidl::encoding::Context) -> usize {
3403            8
3404        }
3405
3406        #[inline(always)]
3407        fn inline_size(_context: fidl::encoding::Context) -> usize {
3408            16
3409        }
3410    }
3411
3412    unsafe impl<D: fidl::encoding::ResourceDialect>
3413        fidl::encoding::Encode<SuiteStartedEventDetails, D> for &SuiteStartedEventDetails
3414    {
3415        unsafe fn encode(
3416            self,
3417            encoder: &mut fidl::encoding::Encoder<'_, D>,
3418            offset: usize,
3419            mut depth: fidl::encoding::Depth,
3420        ) -> fidl::Result<()> {
3421            encoder.debug_check_bounds::<SuiteStartedEventDetails>(offset);
3422            // Vector header
3423            let max_ordinal: u64 = self.max_ordinal_present();
3424            encoder.write_num(max_ordinal, offset);
3425            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3426            // Calling encoder.out_of_line_offset(0) is not allowed.
3427            if max_ordinal == 0 {
3428                return Ok(());
3429            }
3430            depth.increment()?;
3431            let envelope_size = 8;
3432            let bytes_len = max_ordinal as usize * envelope_size;
3433            #[allow(unused_variables)]
3434            let offset = encoder.out_of_line_offset(bytes_len);
3435            let mut _prev_end_offset: usize = 0;
3436
3437            Ok(())
3438        }
3439    }
3440
3441    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3442        for SuiteStartedEventDetails
3443    {
3444        #[inline(always)]
3445        fn new_empty() -> Self {
3446            Self::default()
3447        }
3448
3449        unsafe fn decode(
3450            &mut self,
3451            decoder: &mut fidl::encoding::Decoder<'_, D>,
3452            offset: usize,
3453            mut depth: fidl::encoding::Depth,
3454        ) -> fidl::Result<()> {
3455            decoder.debug_check_bounds::<Self>(offset);
3456            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3457                None => return Err(fidl::Error::NotNullable),
3458                Some(len) => len,
3459            };
3460            // Calling decoder.out_of_line_offset(0) is not allowed.
3461            if len == 0 {
3462                return Ok(());
3463            };
3464            depth.increment()?;
3465            let envelope_size = 8;
3466            let bytes_len = len * envelope_size;
3467            let offset = decoder.out_of_line_offset(bytes_len)?;
3468            // Decode the envelope for each type.
3469            let mut _next_ordinal_to_read = 0;
3470            let mut next_offset = offset;
3471            let end_offset = offset + bytes_len;
3472
3473            // Decode the remaining unknown envelopes.
3474            while next_offset < end_offset {
3475                _next_ordinal_to_read += 1;
3476                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3477                next_offset += envelope_size;
3478            }
3479
3480            Ok(())
3481        }
3482    }
3483
3484    impl SuiteStoppedEventDetails {
3485        #[inline(always)]
3486        fn max_ordinal_present(&self) -> u64 {
3487            if let Some(_) = self.result {
3488                return 1;
3489            }
3490            0
3491        }
3492    }
3493
3494    impl fidl::encoding::ValueTypeMarker for SuiteStoppedEventDetails {
3495        type Borrowed<'a> = &'a Self;
3496        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3497            value
3498        }
3499    }
3500
3501    unsafe impl fidl::encoding::TypeMarker for SuiteStoppedEventDetails {
3502        type Owned = Self;
3503
3504        #[inline(always)]
3505        fn inline_align(_context: fidl::encoding::Context) -> usize {
3506            8
3507        }
3508
3509        #[inline(always)]
3510        fn inline_size(_context: fidl::encoding::Context) -> usize {
3511            16
3512        }
3513    }
3514
3515    unsafe impl<D: fidl::encoding::ResourceDialect>
3516        fidl::encoding::Encode<SuiteStoppedEventDetails, D> for &SuiteStoppedEventDetails
3517    {
3518        unsafe fn encode(
3519            self,
3520            encoder: &mut fidl::encoding::Encoder<'_, D>,
3521            offset: usize,
3522            mut depth: fidl::encoding::Depth,
3523        ) -> fidl::Result<()> {
3524            encoder.debug_check_bounds::<SuiteStoppedEventDetails>(offset);
3525            // Vector header
3526            let max_ordinal: u64 = self.max_ordinal_present();
3527            encoder.write_num(max_ordinal, offset);
3528            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3529            // Calling encoder.out_of_line_offset(0) is not allowed.
3530            if max_ordinal == 0 {
3531                return Ok(());
3532            }
3533            depth.increment()?;
3534            let envelope_size = 8;
3535            let bytes_len = max_ordinal as usize * envelope_size;
3536            #[allow(unused_variables)]
3537            let offset = encoder.out_of_line_offset(bytes_len);
3538            let mut _prev_end_offset: usize = 0;
3539            if 1 > max_ordinal {
3540                return Ok(());
3541            }
3542
3543            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3544            // are envelope_size bytes.
3545            let cur_offset: usize = (1 - 1) * envelope_size;
3546
3547            // Zero reserved fields.
3548            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3549
3550            // Safety:
3551            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3552            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3553            //   envelope_size bytes, there is always sufficient room.
3554            fidl::encoding::encode_in_envelope_optional::<SuiteResult, D>(
3555                self.result.as_ref().map(<SuiteResult as fidl::encoding::ValueTypeMarker>::borrow),
3556                encoder,
3557                offset + cur_offset,
3558                depth,
3559            )?;
3560
3561            _prev_end_offset = cur_offset + envelope_size;
3562
3563            Ok(())
3564        }
3565    }
3566
3567    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3568        for SuiteStoppedEventDetails
3569    {
3570        #[inline(always)]
3571        fn new_empty() -> Self {
3572            Self::default()
3573        }
3574
3575        unsafe fn decode(
3576            &mut self,
3577            decoder: &mut fidl::encoding::Decoder<'_, D>,
3578            offset: usize,
3579            mut depth: fidl::encoding::Depth,
3580        ) -> fidl::Result<()> {
3581            decoder.debug_check_bounds::<Self>(offset);
3582            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3583                None => return Err(fidl::Error::NotNullable),
3584                Some(len) => len,
3585            };
3586            // Calling decoder.out_of_line_offset(0) is not allowed.
3587            if len == 0 {
3588                return Ok(());
3589            };
3590            depth.increment()?;
3591            let envelope_size = 8;
3592            let bytes_len = len * envelope_size;
3593            let offset = decoder.out_of_line_offset(bytes_len)?;
3594            // Decode the envelope for each type.
3595            let mut _next_ordinal_to_read = 0;
3596            let mut next_offset = offset;
3597            let end_offset = offset + bytes_len;
3598            _next_ordinal_to_read += 1;
3599            if next_offset >= end_offset {
3600                return Ok(());
3601            }
3602
3603            // Decode unknown envelopes for gaps in ordinals.
3604            while _next_ordinal_to_read < 1 {
3605                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3606                _next_ordinal_to_read += 1;
3607                next_offset += envelope_size;
3608            }
3609
3610            let next_out_of_line = decoder.next_out_of_line();
3611            let handles_before = decoder.remaining_handles();
3612            if let Some((inlined, num_bytes, num_handles)) =
3613                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3614            {
3615                let member_inline_size =
3616                    <SuiteResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3617                if inlined != (member_inline_size <= 4) {
3618                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3619                }
3620                let inner_offset;
3621                let mut inner_depth = depth.clone();
3622                if inlined {
3623                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3624                    inner_offset = next_offset;
3625                } else {
3626                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3627                    inner_depth.increment()?;
3628                }
3629                let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(SuiteResult, D));
3630                fidl::decode!(SuiteResult, D, val_ref, decoder, inner_offset, inner_depth)?;
3631                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3632                {
3633                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3634                }
3635                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3636                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3637                }
3638            }
3639
3640            next_offset += envelope_size;
3641
3642            // Decode the remaining unknown envelopes.
3643            while next_offset < end_offset {
3644                _next_ordinal_to_read += 1;
3645                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3646                next_offset += envelope_size;
3647            }
3648
3649            Ok(())
3650        }
3651    }
3652
3653    impl TestCase {
3654        #[inline(always)]
3655        fn max_ordinal_present(&self) -> u64 {
3656            if let Some(_) = self.name {
3657                return 1;
3658            }
3659            0
3660        }
3661    }
3662
3663    impl fidl::encoding::ValueTypeMarker for TestCase {
3664        type Borrowed<'a> = &'a Self;
3665        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3666            value
3667        }
3668    }
3669
3670    unsafe impl fidl::encoding::TypeMarker for TestCase {
3671        type Owned = Self;
3672
3673        #[inline(always)]
3674        fn inline_align(_context: fidl::encoding::Context) -> usize {
3675            8
3676        }
3677
3678        #[inline(always)]
3679        fn inline_size(_context: fidl::encoding::Context) -> usize {
3680            16
3681        }
3682    }
3683
3684    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestCase, D> for &TestCase {
3685        unsafe fn encode(
3686            self,
3687            encoder: &mut fidl::encoding::Encoder<'_, D>,
3688            offset: usize,
3689            mut depth: fidl::encoding::Depth,
3690        ) -> fidl::Result<()> {
3691            encoder.debug_check_bounds::<TestCase>(offset);
3692            // Vector header
3693            let max_ordinal: u64 = self.max_ordinal_present();
3694            encoder.write_num(max_ordinal, offset);
3695            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3696            // Calling encoder.out_of_line_offset(0) is not allowed.
3697            if max_ordinal == 0 {
3698                return Ok(());
3699            }
3700            depth.increment()?;
3701            let envelope_size = 8;
3702            let bytes_len = max_ordinal as usize * envelope_size;
3703            #[allow(unused_variables)]
3704            let offset = encoder.out_of_line_offset(bytes_len);
3705            let mut _prev_end_offset: usize = 0;
3706            if 1 > max_ordinal {
3707                return Ok(());
3708            }
3709
3710            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3711            // are envelope_size bytes.
3712            let cur_offset: usize = (1 - 1) * envelope_size;
3713
3714            // Zero reserved fields.
3715            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3716
3717            // Safety:
3718            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3719            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3720            //   envelope_size bytes, there is always sufficient room.
3721            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
3722            self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
3723            encoder, offset + cur_offset, depth
3724        )?;
3725
3726            _prev_end_offset = cur_offset + envelope_size;
3727
3728            Ok(())
3729        }
3730    }
3731
3732    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCase {
3733        #[inline(always)]
3734        fn new_empty() -> Self {
3735            Self::default()
3736        }
3737
3738        unsafe fn decode(
3739            &mut self,
3740            decoder: &mut fidl::encoding::Decoder<'_, D>,
3741            offset: usize,
3742            mut depth: fidl::encoding::Depth,
3743        ) -> fidl::Result<()> {
3744            decoder.debug_check_bounds::<Self>(offset);
3745            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3746                None => return Err(fidl::Error::NotNullable),
3747                Some(len) => len,
3748            };
3749            // Calling decoder.out_of_line_offset(0) is not allowed.
3750            if len == 0 {
3751                return Ok(());
3752            };
3753            depth.increment()?;
3754            let envelope_size = 8;
3755            let bytes_len = len * envelope_size;
3756            let offset = decoder.out_of_line_offset(bytes_len)?;
3757            // Decode the envelope for each type.
3758            let mut _next_ordinal_to_read = 0;
3759            let mut next_offset = offset;
3760            let end_offset = offset + bytes_len;
3761            _next_ordinal_to_read += 1;
3762            if next_offset >= end_offset {
3763                return Ok(());
3764            }
3765
3766            // Decode unknown envelopes for gaps in ordinals.
3767            while _next_ordinal_to_read < 1 {
3768                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3769                _next_ordinal_to_read += 1;
3770                next_offset += envelope_size;
3771            }
3772
3773            let next_out_of_line = decoder.next_out_of_line();
3774            let handles_before = decoder.remaining_handles();
3775            if let Some((inlined, num_bytes, num_handles)) =
3776                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3777            {
3778                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3779                if inlined != (member_inline_size <= 4) {
3780                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3781                }
3782                let inner_offset;
3783                let mut inner_depth = depth.clone();
3784                if inlined {
3785                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3786                    inner_offset = next_offset;
3787                } else {
3788                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3789                    inner_depth.increment()?;
3790                }
3791                let val_ref = self.name.get_or_insert_with(|| {
3792                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
3793                });
3794                fidl::decode!(
3795                    fidl::encoding::BoundedString<2048>,
3796                    D,
3797                    val_ref,
3798                    decoder,
3799                    inner_offset,
3800                    inner_depth
3801                )?;
3802                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3803                {
3804                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3805                }
3806                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3807                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3808                }
3809            }
3810
3811            next_offset += envelope_size;
3812
3813            // Decode the remaining unknown envelopes.
3814            while next_offset < end_offset {
3815                _next_ordinal_to_read += 1;
3816                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3817                next_offset += envelope_size;
3818            }
3819
3820            Ok(())
3821        }
3822    }
3823
3824    impl TestCaseFinishedEventDetails {
3825        #[inline(always)]
3826        fn max_ordinal_present(&self) -> u64 {
3827            if let Some(_) = self.test_case_id {
3828                return 1;
3829            }
3830            0
3831        }
3832    }
3833
3834    impl fidl::encoding::ValueTypeMarker for TestCaseFinishedEventDetails {
3835        type Borrowed<'a> = &'a Self;
3836        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3837            value
3838        }
3839    }
3840
3841    unsafe impl fidl::encoding::TypeMarker for TestCaseFinishedEventDetails {
3842        type Owned = Self;
3843
3844        #[inline(always)]
3845        fn inline_align(_context: fidl::encoding::Context) -> usize {
3846            8
3847        }
3848
3849        #[inline(always)]
3850        fn inline_size(_context: fidl::encoding::Context) -> usize {
3851            16
3852        }
3853    }
3854
3855    unsafe impl<D: fidl::encoding::ResourceDialect>
3856        fidl::encoding::Encode<TestCaseFinishedEventDetails, D> for &TestCaseFinishedEventDetails
3857    {
3858        unsafe fn encode(
3859            self,
3860            encoder: &mut fidl::encoding::Encoder<'_, D>,
3861            offset: usize,
3862            mut depth: fidl::encoding::Depth,
3863        ) -> fidl::Result<()> {
3864            encoder.debug_check_bounds::<TestCaseFinishedEventDetails>(offset);
3865            // Vector header
3866            let max_ordinal: u64 = self.max_ordinal_present();
3867            encoder.write_num(max_ordinal, offset);
3868            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3869            // Calling encoder.out_of_line_offset(0) is not allowed.
3870            if max_ordinal == 0 {
3871                return Ok(());
3872            }
3873            depth.increment()?;
3874            let envelope_size = 8;
3875            let bytes_len = max_ordinal as usize * envelope_size;
3876            #[allow(unused_variables)]
3877            let offset = encoder.out_of_line_offset(bytes_len);
3878            let mut _prev_end_offset: usize = 0;
3879            if 1 > max_ordinal {
3880                return Ok(());
3881            }
3882
3883            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3884            // are envelope_size bytes.
3885            let cur_offset: usize = (1 - 1) * envelope_size;
3886
3887            // Zero reserved fields.
3888            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3889
3890            // Safety:
3891            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3892            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3893            //   envelope_size bytes, there is always sufficient room.
3894            fidl::encoding::encode_in_envelope_optional::<u32, D>(
3895                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3896                encoder,
3897                offset + cur_offset,
3898                depth,
3899            )?;
3900
3901            _prev_end_offset = cur_offset + envelope_size;
3902
3903            Ok(())
3904        }
3905    }
3906
3907    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3908        for TestCaseFinishedEventDetails
3909    {
3910        #[inline(always)]
3911        fn new_empty() -> Self {
3912            Self::default()
3913        }
3914
3915        unsafe fn decode(
3916            &mut self,
3917            decoder: &mut fidl::encoding::Decoder<'_, D>,
3918            offset: usize,
3919            mut depth: fidl::encoding::Depth,
3920        ) -> fidl::Result<()> {
3921            decoder.debug_check_bounds::<Self>(offset);
3922            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3923                None => return Err(fidl::Error::NotNullable),
3924                Some(len) => len,
3925            };
3926            // Calling decoder.out_of_line_offset(0) is not allowed.
3927            if len == 0 {
3928                return Ok(());
3929            };
3930            depth.increment()?;
3931            let envelope_size = 8;
3932            let bytes_len = len * envelope_size;
3933            let offset = decoder.out_of_line_offset(bytes_len)?;
3934            // Decode the envelope for each type.
3935            let mut _next_ordinal_to_read = 0;
3936            let mut next_offset = offset;
3937            let end_offset = offset + bytes_len;
3938            _next_ordinal_to_read += 1;
3939            if next_offset >= end_offset {
3940                return Ok(());
3941            }
3942
3943            // Decode unknown envelopes for gaps in ordinals.
3944            while _next_ordinal_to_read < 1 {
3945                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3946                _next_ordinal_to_read += 1;
3947                next_offset += envelope_size;
3948            }
3949
3950            let next_out_of_line = decoder.next_out_of_line();
3951            let handles_before = decoder.remaining_handles();
3952            if let Some((inlined, num_bytes, num_handles)) =
3953                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3954            {
3955                let member_inline_size =
3956                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3957                if inlined != (member_inline_size <= 4) {
3958                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3959                }
3960                let inner_offset;
3961                let mut inner_depth = depth.clone();
3962                if inlined {
3963                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3964                    inner_offset = next_offset;
3965                } else {
3966                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3967                    inner_depth.increment()?;
3968                }
3969                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
3970                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
3971                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3972                {
3973                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3974                }
3975                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3976                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3977                }
3978            }
3979
3980            next_offset += envelope_size;
3981
3982            // Decode the remaining unknown envelopes.
3983            while next_offset < end_offset {
3984                _next_ordinal_to_read += 1;
3985                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3986                next_offset += envelope_size;
3987            }
3988
3989            Ok(())
3990        }
3991    }
3992
3993    impl TestCaseFoundEventDetails {
3994        #[inline(always)]
3995        fn max_ordinal_present(&self) -> u64 {
3996            if let Some(_) = self.test_case_id {
3997                return 2;
3998            }
3999            if let Some(_) = self.test_case_name {
4000                return 1;
4001            }
4002            0
4003        }
4004    }
4005
4006    impl fidl::encoding::ValueTypeMarker for TestCaseFoundEventDetails {
4007        type Borrowed<'a> = &'a Self;
4008        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4009            value
4010        }
4011    }
4012
4013    unsafe impl fidl::encoding::TypeMarker for TestCaseFoundEventDetails {
4014        type Owned = Self;
4015
4016        #[inline(always)]
4017        fn inline_align(_context: fidl::encoding::Context) -> usize {
4018            8
4019        }
4020
4021        #[inline(always)]
4022        fn inline_size(_context: fidl::encoding::Context) -> usize {
4023            16
4024        }
4025    }
4026
4027    unsafe impl<D: fidl::encoding::ResourceDialect>
4028        fidl::encoding::Encode<TestCaseFoundEventDetails, D> for &TestCaseFoundEventDetails
4029    {
4030        unsafe fn encode(
4031            self,
4032            encoder: &mut fidl::encoding::Encoder<'_, D>,
4033            offset: usize,
4034            mut depth: fidl::encoding::Depth,
4035        ) -> fidl::Result<()> {
4036            encoder.debug_check_bounds::<TestCaseFoundEventDetails>(offset);
4037            // Vector header
4038            let max_ordinal: u64 = self.max_ordinal_present();
4039            encoder.write_num(max_ordinal, offset);
4040            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4041            // Calling encoder.out_of_line_offset(0) is not allowed.
4042            if max_ordinal == 0 {
4043                return Ok(());
4044            }
4045            depth.increment()?;
4046            let envelope_size = 8;
4047            let bytes_len = max_ordinal as usize * envelope_size;
4048            #[allow(unused_variables)]
4049            let offset = encoder.out_of_line_offset(bytes_len);
4050            let mut _prev_end_offset: usize = 0;
4051            if 1 > max_ordinal {
4052                return Ok(());
4053            }
4054
4055            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4056            // are envelope_size bytes.
4057            let cur_offset: usize = (1 - 1) * envelope_size;
4058
4059            // Zero reserved fields.
4060            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4061
4062            // Safety:
4063            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4064            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4065            //   envelope_size bytes, there is always sufficient room.
4066            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
4067            self.test_case_name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
4068            encoder, offset + cur_offset, depth
4069        )?;
4070
4071            _prev_end_offset = cur_offset + envelope_size;
4072            if 2 > max_ordinal {
4073                return Ok(());
4074            }
4075
4076            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4077            // are envelope_size bytes.
4078            let cur_offset: usize = (2 - 1) * envelope_size;
4079
4080            // Zero reserved fields.
4081            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4082
4083            // Safety:
4084            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4085            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4086            //   envelope_size bytes, there is always sufficient room.
4087            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4088                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4089                encoder,
4090                offset + cur_offset,
4091                depth,
4092            )?;
4093
4094            _prev_end_offset = cur_offset + envelope_size;
4095
4096            Ok(())
4097        }
4098    }
4099
4100    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4101        for TestCaseFoundEventDetails
4102    {
4103        #[inline(always)]
4104        fn new_empty() -> Self {
4105            Self::default()
4106        }
4107
4108        unsafe fn decode(
4109            &mut self,
4110            decoder: &mut fidl::encoding::Decoder<'_, D>,
4111            offset: usize,
4112            mut depth: fidl::encoding::Depth,
4113        ) -> fidl::Result<()> {
4114            decoder.debug_check_bounds::<Self>(offset);
4115            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4116                None => return Err(fidl::Error::NotNullable),
4117                Some(len) => len,
4118            };
4119            // Calling decoder.out_of_line_offset(0) is not allowed.
4120            if len == 0 {
4121                return Ok(());
4122            };
4123            depth.increment()?;
4124            let envelope_size = 8;
4125            let bytes_len = len * envelope_size;
4126            let offset = decoder.out_of_line_offset(bytes_len)?;
4127            // Decode the envelope for each type.
4128            let mut _next_ordinal_to_read = 0;
4129            let mut next_offset = offset;
4130            let end_offset = offset + bytes_len;
4131            _next_ordinal_to_read += 1;
4132            if next_offset >= end_offset {
4133                return Ok(());
4134            }
4135
4136            // Decode unknown envelopes for gaps in ordinals.
4137            while _next_ordinal_to_read < 1 {
4138                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4139                _next_ordinal_to_read += 1;
4140                next_offset += envelope_size;
4141            }
4142
4143            let next_out_of_line = decoder.next_out_of_line();
4144            let handles_before = decoder.remaining_handles();
4145            if let Some((inlined, num_bytes, num_handles)) =
4146                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4147            {
4148                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4149                if inlined != (member_inline_size <= 4) {
4150                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4151                }
4152                let inner_offset;
4153                let mut inner_depth = depth.clone();
4154                if inlined {
4155                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4156                    inner_offset = next_offset;
4157                } else {
4158                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4159                    inner_depth.increment()?;
4160                }
4161                let val_ref = self.test_case_name.get_or_insert_with(|| {
4162                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
4163                });
4164                fidl::decode!(
4165                    fidl::encoding::BoundedString<2048>,
4166                    D,
4167                    val_ref,
4168                    decoder,
4169                    inner_offset,
4170                    inner_depth
4171                )?;
4172                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4173                {
4174                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4175                }
4176                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4177                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4178                }
4179            }
4180
4181            next_offset += envelope_size;
4182            _next_ordinal_to_read += 1;
4183            if next_offset >= end_offset {
4184                return Ok(());
4185            }
4186
4187            // Decode unknown envelopes for gaps in ordinals.
4188            while _next_ordinal_to_read < 2 {
4189                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4190                _next_ordinal_to_read += 1;
4191                next_offset += envelope_size;
4192            }
4193
4194            let next_out_of_line = decoder.next_out_of_line();
4195            let handles_before = decoder.remaining_handles();
4196            if let Some((inlined, num_bytes, num_handles)) =
4197                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4198            {
4199                let member_inline_size =
4200                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4201                if inlined != (member_inline_size <= 4) {
4202                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4203                }
4204                let inner_offset;
4205                let mut inner_depth = depth.clone();
4206                if inlined {
4207                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4208                    inner_offset = next_offset;
4209                } else {
4210                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4211                    inner_depth.increment()?;
4212                }
4213                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4214                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4215                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4216                {
4217                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4218                }
4219                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4220                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4221                }
4222            }
4223
4224            next_offset += envelope_size;
4225
4226            // Decode the remaining unknown envelopes.
4227            while next_offset < end_offset {
4228                _next_ordinal_to_read += 1;
4229                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4230                next_offset += envelope_size;
4231            }
4232
4233            Ok(())
4234        }
4235    }
4236
4237    impl TestCaseStartedEventDetails {
4238        #[inline(always)]
4239        fn max_ordinal_present(&self) -> u64 {
4240            if let Some(_) = self.test_case_id {
4241                return 1;
4242            }
4243            0
4244        }
4245    }
4246
4247    impl fidl::encoding::ValueTypeMarker for TestCaseStartedEventDetails {
4248        type Borrowed<'a> = &'a Self;
4249        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4250            value
4251        }
4252    }
4253
4254    unsafe impl fidl::encoding::TypeMarker for TestCaseStartedEventDetails {
4255        type Owned = Self;
4256
4257        #[inline(always)]
4258        fn inline_align(_context: fidl::encoding::Context) -> usize {
4259            8
4260        }
4261
4262        #[inline(always)]
4263        fn inline_size(_context: fidl::encoding::Context) -> usize {
4264            16
4265        }
4266    }
4267
4268    unsafe impl<D: fidl::encoding::ResourceDialect>
4269        fidl::encoding::Encode<TestCaseStartedEventDetails, D> for &TestCaseStartedEventDetails
4270    {
4271        unsafe fn encode(
4272            self,
4273            encoder: &mut fidl::encoding::Encoder<'_, D>,
4274            offset: usize,
4275            mut depth: fidl::encoding::Depth,
4276        ) -> fidl::Result<()> {
4277            encoder.debug_check_bounds::<TestCaseStartedEventDetails>(offset);
4278            // Vector header
4279            let max_ordinal: u64 = self.max_ordinal_present();
4280            encoder.write_num(max_ordinal, offset);
4281            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4282            // Calling encoder.out_of_line_offset(0) is not allowed.
4283            if max_ordinal == 0 {
4284                return Ok(());
4285            }
4286            depth.increment()?;
4287            let envelope_size = 8;
4288            let bytes_len = max_ordinal as usize * envelope_size;
4289            #[allow(unused_variables)]
4290            let offset = encoder.out_of_line_offset(bytes_len);
4291            let mut _prev_end_offset: usize = 0;
4292            if 1 > max_ordinal {
4293                return Ok(());
4294            }
4295
4296            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4297            // are envelope_size bytes.
4298            let cur_offset: usize = (1 - 1) * envelope_size;
4299
4300            // Zero reserved fields.
4301            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4302
4303            // Safety:
4304            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4305            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4306            //   envelope_size bytes, there is always sufficient room.
4307            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4308                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4309                encoder,
4310                offset + cur_offset,
4311                depth,
4312            )?;
4313
4314            _prev_end_offset = cur_offset + envelope_size;
4315
4316            Ok(())
4317        }
4318    }
4319
4320    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4321        for TestCaseStartedEventDetails
4322    {
4323        #[inline(always)]
4324        fn new_empty() -> Self {
4325            Self::default()
4326        }
4327
4328        unsafe fn decode(
4329            &mut self,
4330            decoder: &mut fidl::encoding::Decoder<'_, D>,
4331            offset: usize,
4332            mut depth: fidl::encoding::Depth,
4333        ) -> fidl::Result<()> {
4334            decoder.debug_check_bounds::<Self>(offset);
4335            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4336                None => return Err(fidl::Error::NotNullable),
4337                Some(len) => len,
4338            };
4339            // Calling decoder.out_of_line_offset(0) is not allowed.
4340            if len == 0 {
4341                return Ok(());
4342            };
4343            depth.increment()?;
4344            let envelope_size = 8;
4345            let bytes_len = len * envelope_size;
4346            let offset = decoder.out_of_line_offset(bytes_len)?;
4347            // Decode the envelope for each type.
4348            let mut _next_ordinal_to_read = 0;
4349            let mut next_offset = offset;
4350            let end_offset = offset + bytes_len;
4351            _next_ordinal_to_read += 1;
4352            if next_offset >= end_offset {
4353                return Ok(());
4354            }
4355
4356            // Decode unknown envelopes for gaps in ordinals.
4357            while _next_ordinal_to_read < 1 {
4358                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4359                _next_ordinal_to_read += 1;
4360                next_offset += envelope_size;
4361            }
4362
4363            let next_out_of_line = decoder.next_out_of_line();
4364            let handles_before = decoder.remaining_handles();
4365            if let Some((inlined, num_bytes, num_handles)) =
4366                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4367            {
4368                let member_inline_size =
4369                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4370                if inlined != (member_inline_size <= 4) {
4371                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4372                }
4373                let inner_offset;
4374                let mut inner_depth = depth.clone();
4375                if inlined {
4376                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4377                    inner_offset = next_offset;
4378                } else {
4379                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4380                    inner_depth.increment()?;
4381                }
4382                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4383                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4384                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4385                {
4386                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4387                }
4388                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4389                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4390                }
4391            }
4392
4393            next_offset += envelope_size;
4394
4395            // Decode the remaining unknown envelopes.
4396            while next_offset < end_offset {
4397                _next_ordinal_to_read += 1;
4398                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4399                next_offset += envelope_size;
4400            }
4401
4402            Ok(())
4403        }
4404    }
4405
4406    impl TestCaseStoppedEventDetails {
4407        #[inline(always)]
4408        fn max_ordinal_present(&self) -> u64 {
4409            if let Some(_) = self.result {
4410                return 2;
4411            }
4412            if let Some(_) = self.test_case_id {
4413                return 1;
4414            }
4415            0
4416        }
4417    }
4418
4419    impl fidl::encoding::ValueTypeMarker for TestCaseStoppedEventDetails {
4420        type Borrowed<'a> = &'a Self;
4421        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4422            value
4423        }
4424    }
4425
4426    unsafe impl fidl::encoding::TypeMarker for TestCaseStoppedEventDetails {
4427        type Owned = Self;
4428
4429        #[inline(always)]
4430        fn inline_align(_context: fidl::encoding::Context) -> usize {
4431            8
4432        }
4433
4434        #[inline(always)]
4435        fn inline_size(_context: fidl::encoding::Context) -> usize {
4436            16
4437        }
4438    }
4439
4440    unsafe impl<D: fidl::encoding::ResourceDialect>
4441        fidl::encoding::Encode<TestCaseStoppedEventDetails, D> for &TestCaseStoppedEventDetails
4442    {
4443        unsafe fn encode(
4444            self,
4445            encoder: &mut fidl::encoding::Encoder<'_, D>,
4446            offset: usize,
4447            mut depth: fidl::encoding::Depth,
4448        ) -> fidl::Result<()> {
4449            encoder.debug_check_bounds::<TestCaseStoppedEventDetails>(offset);
4450            // Vector header
4451            let max_ordinal: u64 = self.max_ordinal_present();
4452            encoder.write_num(max_ordinal, offset);
4453            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4454            // Calling encoder.out_of_line_offset(0) is not allowed.
4455            if max_ordinal == 0 {
4456                return Ok(());
4457            }
4458            depth.increment()?;
4459            let envelope_size = 8;
4460            let bytes_len = max_ordinal as usize * envelope_size;
4461            #[allow(unused_variables)]
4462            let offset = encoder.out_of_line_offset(bytes_len);
4463            let mut _prev_end_offset: usize = 0;
4464            if 1 > max_ordinal {
4465                return Ok(());
4466            }
4467
4468            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4469            // are envelope_size bytes.
4470            let cur_offset: usize = (1 - 1) * envelope_size;
4471
4472            // Zero reserved fields.
4473            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4474
4475            // Safety:
4476            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4477            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4478            //   envelope_size bytes, there is always sufficient room.
4479            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4480                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4481                encoder,
4482                offset + cur_offset,
4483                depth,
4484            )?;
4485
4486            _prev_end_offset = cur_offset + envelope_size;
4487            if 2 > max_ordinal {
4488                return Ok(());
4489            }
4490
4491            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4492            // are envelope_size bytes.
4493            let cur_offset: usize = (2 - 1) * envelope_size;
4494
4495            // Zero reserved fields.
4496            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4497
4498            // Safety:
4499            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4500            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4501            //   envelope_size bytes, there is always sufficient room.
4502            fidl::encoding::encode_in_envelope_optional::<TestCaseResult, D>(
4503                self.result
4504                    .as_ref()
4505                    .map(<TestCaseResult as fidl::encoding::ValueTypeMarker>::borrow),
4506                encoder,
4507                offset + cur_offset,
4508                depth,
4509            )?;
4510
4511            _prev_end_offset = cur_offset + envelope_size;
4512
4513            Ok(())
4514        }
4515    }
4516
4517    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4518        for TestCaseStoppedEventDetails
4519    {
4520        #[inline(always)]
4521        fn new_empty() -> Self {
4522            Self::default()
4523        }
4524
4525        unsafe fn decode(
4526            &mut self,
4527            decoder: &mut fidl::encoding::Decoder<'_, D>,
4528            offset: usize,
4529            mut depth: fidl::encoding::Depth,
4530        ) -> fidl::Result<()> {
4531            decoder.debug_check_bounds::<Self>(offset);
4532            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4533                None => return Err(fidl::Error::NotNullable),
4534                Some(len) => len,
4535            };
4536            // Calling decoder.out_of_line_offset(0) is not allowed.
4537            if len == 0 {
4538                return Ok(());
4539            };
4540            depth.increment()?;
4541            let envelope_size = 8;
4542            let bytes_len = len * envelope_size;
4543            let offset = decoder.out_of_line_offset(bytes_len)?;
4544            // Decode the envelope for each type.
4545            let mut _next_ordinal_to_read = 0;
4546            let mut next_offset = offset;
4547            let end_offset = offset + bytes_len;
4548            _next_ordinal_to_read += 1;
4549            if next_offset >= end_offset {
4550                return Ok(());
4551            }
4552
4553            // Decode unknown envelopes for gaps in ordinals.
4554            while _next_ordinal_to_read < 1 {
4555                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4556                _next_ordinal_to_read += 1;
4557                next_offset += envelope_size;
4558            }
4559
4560            let next_out_of_line = decoder.next_out_of_line();
4561            let handles_before = decoder.remaining_handles();
4562            if let Some((inlined, num_bytes, num_handles)) =
4563                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4564            {
4565                let member_inline_size =
4566                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4567                if inlined != (member_inline_size <= 4) {
4568                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4569                }
4570                let inner_offset;
4571                let mut inner_depth = depth.clone();
4572                if inlined {
4573                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4574                    inner_offset = next_offset;
4575                } else {
4576                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4577                    inner_depth.increment()?;
4578                }
4579                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4580                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4581                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4582                {
4583                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4584                }
4585                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4586                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4587                }
4588            }
4589
4590            next_offset += envelope_size;
4591            _next_ordinal_to_read += 1;
4592            if next_offset >= end_offset {
4593                return Ok(());
4594            }
4595
4596            // Decode unknown envelopes for gaps in ordinals.
4597            while _next_ordinal_to_read < 2 {
4598                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4599                _next_ordinal_to_read += 1;
4600                next_offset += envelope_size;
4601            }
4602
4603            let next_out_of_line = decoder.next_out_of_line();
4604            let handles_before = decoder.remaining_handles();
4605            if let Some((inlined, num_bytes, num_handles)) =
4606                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4607            {
4608                let member_inline_size =
4609                    <TestCaseResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4610                if inlined != (member_inline_size <= 4) {
4611                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4612                }
4613                let inner_offset;
4614                let mut inner_depth = depth.clone();
4615                if inlined {
4616                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4617                    inner_offset = next_offset;
4618                } else {
4619                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4620                    inner_depth.increment()?;
4621                }
4622                let val_ref =
4623                    self.result.get_or_insert_with(|| fidl::new_empty!(TestCaseResult, D));
4624                fidl::decode!(TestCaseResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4625                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4626                {
4627                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4628                }
4629                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4630                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4631                }
4632            }
4633
4634            next_offset += envelope_size;
4635
4636            // Decode the remaining unknown envelopes.
4637            while next_offset < end_offset {
4638                _next_ordinal_to_read += 1;
4639                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4640                next_offset += envelope_size;
4641            }
4642
4643            Ok(())
4644        }
4645    }
4646}